How Littledata handles User ID for Shopify and Segment

Is Segment a good customer data platform (CDP) for ecommerce? We hear that question a lot at Littledata, and are always happy to chat about the modern data stack. But the reality is that you should be asking more detailed questions: will your CDP be able to handle both anonymous browsers ("visitors") and customers ("users")?  Will it enable both analysis and marketing automation? Will you need an entirely different stack to support your data warehouse? Our DTC ecommerce customers have found Segment to be a powerful solution because it offers a unified approach to customer data. As long as it's set up correctly, that is. Four options for user identity There are many different approaches to user identity, but the most important thing is to be consistent. Make sure the identifier you choose works with your current data destinations and those you know you plan to implement in the future. In Segment, every identify call must have a User ID or an Anonymous ID. Littledata's Shopify source for Segment is an easy way to ensure accurate ecommerce data, rather than building and maintaining the schema yourself to match Segment's detailed ecommerce spec. Our scope includes sales, marketing, and customer data, captured from a combination of client-side and server-side tracking. We agree with Segment's best practices in identifying users, including the use of static IDs whenever possible. To support a broader range of use cases, our app lets you choose which of the following fields you want to send as the userId for known customers: Shopify customer ID (default) – Recommended if you have a simple Shopify setup with minimal integrations.Hashed email – The MD5 email hash is useful if you have other marketing platforms sending traffic where you know the email of the visitor (e.g. email marketing like Bronto or Marketo), but not their Shopify customer ID.Email – Recommended when other platforms use the email and can’t hash it, and you are comfortable with the privacy implications.None (no identifier) – Recommended only if user identity is already handled by your Segment implementation and you only need the extra events powered by Littledata’s Shopify source. Learn more about what you can track with our Segment connection. Since we started offering identifier options beyond Shopify customer ID earlier this quarter, it's been interesting to see the uptake. Perhaps most surprising is that it's not just larger stores on Littledata Plus who are using alternative unique IDs. There are already merchants on our Standard and Pro plans using the option as well. Note: For merchants using Segment Personas, Littledata also sends shopify_customer_id as an External ID for advanced matching What is your approach to user identity? Are you planning for the future? Let us know in the comments or on Twitter.

by Ari
2021-06-10

Introducing Littledata Plus plans for Shopify and Shopify Plus

As Shopify has continued to scale its Shopify Plus plans, Littledata has developed both technology and services to enable customer success. Today, we're pleased to announce new Littledata Plus plans to support modern data stacks for larger direct-to-consumer (DTC) brands. Our enterprise plans have been around in various guises since the beginning. But clients’ data needs—and the DTC market overall—have continued to evolve, from more sophisticated lifetime value analysis to connecting Shopify with data warehouses like Redshift and BigQuery. The coronavirus pandemic also forced many businesses that had been planning to move online to do so sooner than expected. Traditional consumer packaged goods companies (CPGs) needed to try out DTC and ecommerce subscription models. And, to be blunt, they needed to speed up plans for finding ways to compete with Amazon. With more known brands moving to Shopify and BigCommerce, core data needs have skyrocketed. In fact, without Littledata, 12 orders still go missing in Google Analytics for every 100 orders in Shopify! It seems ecommerce in general is finally waking up to the fact that the key to growth is focusing on the right KPIs with accurate data to support them. The renewed focus on data has extended beyond PPC campaigns to channels like social and email marketing, as well. As merchants get "back to the basics", we've also started to see less customization and an increased focus on data accuracy and throughput. That goes for both our Google Analytics and Segment data destinations. All this illustrates what has been our outlook from the beginning: nothing is more important than data accuracy. So we're excited to now be opening up Littledata Plus plans to all DTC brands. Whether you're a recently funded scale-up with a headless Shopify site or you've been on Shopify Plus since the beginning. Options for Littledata Plus plans We have long optimized Littledata for Shopify Plus, from higher service level agreements and throughput metrics to multi-currency tracking for brands with multiple country stores (e.g. see how we handle order names). Our team has experimented with Littledata Plus features, tracking plans, and account management levels to ensure that our tech and support are as effective as possible. We've worked closely with top Shopify brands like Rothy's, Boll & Branch, and Craft Gin Club, as well as agency and tech partners supporting those brands to fine-tune our solutions. We don’t just want to be proactive, we want to be useful. "Don’t mistake the forest for the trees. Our ecommerce customers know that accurate data is essential for real growth." Littledata Plus plans are a must-have for any merchant processing over 10,000 orders per month (including recurring orders or subscriptions). They're also now available to anyone serious about data-driven growth. We now offer two distinct paths within the Littledata Plus journey: Plus: Plus plans give you access to a dedicated account manager to help with onboarding and data audits, and include tracking for any number of country stores.Enterprise Plus: Our higher-tier Enterprise Plus plans allow unlimited data thresholds, and can also include a custom tracking plan, solution engineering, analytics training, or other options to support your in-house team. All Littledata Plus plans include essentials like in-depth data audits and dedicated account management. But with Enterprise Plus, you get a deeper experience, more support time, and a custom tracking plan. We built Littledata around smart connections. A big advantage of using our data connectors is that we keep those connections up to date for you with an in-depth knowledge of APIs, webhooks, properties, and events. For example, our connections now support headless Shopify setups and subscriptions in the Shopify checkout—without any additional coding needed on your website. "All Littledata Plus plans include essentials like in-depth data audits and dedicated account management." Recent updates to our Plus plans include: Advanced headless setup supportUnique identifiersHistoric data import for Segment users For Google Analytics users, we now offer analytics training and a Measurement Protocol endpoint to make it easy to get complete ecommerce data into Google BigQuery. That said, we have many happy Littledata Plus customers who simply want to ensure accurate Shopify and ReCharge data in Google Analytics. Can you risk making decisions based on bad data? Put another way: how much faster could you scale if your sales and marketing data were accurate, reliable, robust, and complete? Whatever your data goals, Littledata Plus is here to help. Book a demo today and let's start the conversation.

by Ari
2021-06-02

Why doesn't Shopify analytics match Google Analytics? [ebook]

Shopify analytics is fine for what it is: a siloed data source that is good at tracking Shopify orders. But if you want to track the complete customer journey and get accurate marketing data, you need to look elsewhere. Because it's both free and flexible, Google Analytics has become a top choice for a "single source of truth" to supplement Shopify analytics and other tools you might be using. And GA4, the newest version of Google Analytics, promises to be even more powerful. In our experience with hundreds of customers at Littledata we've found that many merchants turn to overblown solutions outside of GA (eg. fancy dashboards and generic data connectors) and then come back around to wanting to just fix the data in Google Analytics. After all, what good is the data if you can't trust it? Free ebook on Shopify and Google Analytics It's well known that Shopify's own analytics connection misses out on key issues like product list views, repeat purchases and marketing attribution. But where exactly does the tracking go wrong? What's going on behind the scenes? This new ebook is an insider's guide to Shopify Analytics vs Google Analytics. You will learn: Why transactions go missing in Google AnalyticsCommon issues for Shopify storesThe difference between marketing tags and Google Tag ManagerHow to set up checkout funnel trackingAnd all of the main reasons why Shopify doesn't match GA Download the ebook >>> Top brands turn to GA for a single source of truth, but there are some common things that go wrong. Even if you don't have a custom setup, things go wrong quickly -- including the "basics" like tracking ecommerce orders. We built Littledata to fix these issues automatically, saving you time and money. (Here's a quick demo video and our complete spec). But before you get into the details of the solution, it's important to understand the problem and what might be going wrong for your store in particular, whether you're seeing a lot of traffic that appears to be "Direct" but is actually from marketing channels like Facebook Ads or Klaviyo email marketing, you're missing repeat purchasing data, or your checkout funnel tracking is somehow out of whack. Get the ebook today. How to add Google Analytics to Shopify You can set up Enhanced Ecommerce in Google Analytics and then add Google Analytics to Shopify, but Shopify's default GA integration misses many key elements. Tip: With Shopify's default Google Analytics integration, 12 orders go missing for every 100 in Shopify. We highly recommend using an advanced data connector instead! If you would rather just get accurate data automatically, check out Littledata's 30-day free trial. It's the easiest way to avoid all of the known issues with Shopify's default Google Analytics integration. Plus, you still own the data in GA, whether or not you continue using our advanced data connections.

by Ari
2021-05-20

Top 7 rule-based audiences for ecommerce marketing

Rule-based audiences are customer groups or segments derived by customer activities. It sounds simple, but rule-based audiences can be a game changer -- and too many DTC brands miss out on the basics of this powerful type of customer segmentation. In ecommerce, rule-based audiences can be made using transactional activities (checkout date, coupon applied, etc.), marketing actions (email opened, promotion entered, etc.) or even product details (eg. type of product, color or type purchased). Ecommerce companies use the intersection of these events to group customers for the purpose of reporting, remarketing, targeting, and other customer enrichment activities. But one size doesn't fit all. Let's take a look at the top rule-based audiences and how they are used in ecommerce marketing. Benefits of rules based segmentation There are a number of benefits to deploying rules based audience recipes in your business. Whether you are a small-to-medium sized business, fast-growing startup, or have been around the block for some time like Littledata customers Dr Squatch and Rothy's, audience recipes are the building blocks for broader, innovative ways to segment your customers. Rule-based audiences can help you increase customer retention while improving product visibility in the crowded ecommerce marketplace Powerful tools like the Adobe Experience Cloud have highlighted rules-based personalization and audience building as a core part of their feature set. As they put it, "With rules-based personalization, you’re in the optimization driver’s seat." We agree, but with traditional enterprise tools that type of personalization can get really expensive. The good news is that brands using a modern data stack don't necessarily need to shell out for Adobe. Rule-based audiences can now be used by any ecommerce store, no matter how big or small. Here are some of the key benefits: Increase personalization through tailor-made product marketingImprove existing products and/or servicesIncrease upgrades and product upsellingEnhance profitability through the targeting of high-value customersIncrease retention with automation and buyer stage recognitionFurther marketing reach of customer types for remarketing, targeting and look-a-like audiencesEnhanced visibility and reporting of customer cohorts for tracking new acquisition and customer lifetime value Rule-based segmentation results in a hyper-personalized approach to directly influencing your customers’ experience. The ability to be attentive during each stage of the customer’s lifecycle allows for a better understanding of what drives good and bad experiences.  Recipes for the top 7 rule-based audiences There are tons of different audiences you can build, but 7 always come up for successful DTC brands. In our case, we call them recipes, as they are the right number of ingredients to profile your customer base. X and Y in these examples will depend on your particular business: what you sell, how you sell it, and how often it makes sense for an ideal customer to come back and make a purchase or referral. Audience NameRecipe⭐️ First Time PurchasersCustomers who have made their first purchase in the last [X] number of days⭐️ Repeat PurchasersCustomers who have made at least 2+ purchases in the last [X] number of days⭐️ High SpendersCustomers who have made a purchase with order value greater than [$Y] in the last [X] number of daysAbandoned CheckoutsSite visitors that have added items to their shopping cart, but have not purchased in the last [X] number of daysBargain HuntersSegment of customers that have applied a promotional code on more than 1 purchase in the last [X] number of daysRecent BuyersCustomers who have made a purchase in the last [X] number of days⭐️ Inactive CustomersCustomers who have not made a purchase in the last [X] number of months*Additional segments include Loyal, Cancelled Customers, Location-based, Personalization (age, gender, preferences, income) Three audiences you should build today, with downstream activation examples All of these types of segmentation are potentially useful, even transformational, to your business. So where should you start? Today I will focus on the four most common and effective audience recipes that can generate immediate value to your store’s ability to identify, engage and enrich your customers’ experience. As highlighted above, those are: First-time purchasersInactive customersHigh spendersRepeat buyers To make things even clearer, we'll even combine High spenders and Repeat buyers into a high-LTV segment: your best possible customers, big spenders who are also loyal to your brand. 1. First-time purchasers First Time Purchasers are a good starting point for audience segments. The ability to identify these customers early will pay big dividends into maturing their relationship with your brand and products. Also, first-time customers are always the most likely to engage with your content (for example, opening welcome emails or sharing on social media), which ends up increasing the return on your investment and the potential for longer life cycles.  How to Create a Welcome Email Template via Omnisend How to identify? Utilizing Littledata's order event tracking from your Shopify store, you can identify Order Completed in the last [X] number of days with a Customer Created event in the same time frame.  How to activate? A great opportunity is through personalized welcome emails. By connecting to your ESP (eg. Klaviyo, MailChimp, Iterable) and building a customized message to all first time customers can be the first step to long-standing customer relationships.  2. Inactive customers Inactive Customers are a great win-back opportunity to gain customers back that have been inactive (or not purchasing) in a particular period of time. When a customer has been deemed inactive it’s too late to start formulating a strategy on returning them to your active customer pool. Instead building a strategy to identify, entice, and track appropriately is a must in any customer-focused business.  Drive Repeat Purchases To Your Shopify Store With Automated Emails via Privy How to identify? Utilizing Littledata's order event tracking from your Shopify store, you can identify customers who have (at one-point) had an Order Completed event and with no purchase activities in the last [X] number of days. How to activate? Winback or revive email campaigns catered towards time-sensitive discounts, hyper-personalization (reference specific product categories a customer engaged or purchased in the past), summaries of product improvements, and membership benefits are effective strategies. Utilizing your current ESP, SMS, or retargeting platform alongside these customer groups can push once-active customers to return. 3. Repeat buyers & high spenders Repeat Buyers & High Spenders are the backbone of your business. As the tenured marketer would attest: “It’s easier to keep a happy customer than to find a new one”. Building customer loyalty requires a business to deliver on what is promised and to do so with their highest-value customers in the right channels and messaging.  How to identify? Utilizing Littledata's order event tracking from your Shopify store, you can identify customers that have completed Order Completed events and total purchase count, purchase total, and revenue collected, during a [x] period of time and [x] number of times. Google Analytics users can also export data based on specific custom dimensions for LTV: Littledata – Lifetime Revenue Littledata – Purchase Count Littledata – Shopify Customer ID How to activate? There are several options here, including email and SMS (texting). SMS is a great tool to continuously engage with your customers. Invitations for users to sign-up for a loyalty program to provide exclusive offers or to release product updates can come simply through a users’ most desirable medium - their phone. With SMS boasting a +95% open rate, it's the most effective way to have a two-way connection with your customer and showcase value-added services.  For Littledata's Shopify Plus customers, the most popular platforms for this type of engagement are Yotpo and Loyalty Lion. Technology for activating rules based segmentation Leveraging modern technology furthers the ability to do so repeatedly and with best-in-class platforms. Here are two examples of leaders in that space: Segment (sometimes called Segment.com) and Hightouch. Hightouch Hightouch syncs the data from your data warehouse to the tools your business relies on. It’s called operational analytics and it allows customers to leverage their existing technology (ie. your data warehouse) to pipe customer data to downstream platforms for activation, engagement, and other business activities. Since Littledata's no-code event collection is captured downstream in your Google Analytics platform, customers can leverage that same data when it is stored in their data warehouse. Modeled inside the platform with out-of-box SQL logic, segments can be then pushed automatically (and scheduled) to deliver on the intended goals.  In fact, that's one of Hightouch's taglines: No scripts. No APIs. Just SQL. Segment Segment is a customer data platform (CDP) that integrates cohesively with Littledata's no-code event collection. Segment allows customers to integrate data from a catalog of sources (including the Shopify source, maintained by Littledata) and activate to destinations for customer engagement, activation and reporting. Inside the platform there are features that allow customers to create personas or audience segments, deploy functions, and build out layers of automation to seamlessly leverage their platforms’ source data. [tip]See what's new in Littledata's Shopify source for Segment, including more consistent product properties and enhanced Personas matching [/tip] Littledata Littledata is designed for the modern stack, whether you're using just a couple of tools such as Google Analytics and Data Studio or a whole modern data pipeline (eg. Segment, Fivetran and Redshift). If you're using a Shopify or BigCommerce checkout, you can use Littledata's analytics connectors to capture complete sales and marketing data and send it downstream. It's the easiest way to ingest the data you need to create enriched audience personas, and the only way to get 100% accurate ecommerce data automatically with extensive, ongoing development efforts. Not sure which tools you need? Book a demo with our data experts to discuss your analytics plan.

2021-04-29

Property and destination updates in our Shopify source for Segment

Over the last 6 months, we’ve continued to enhance Littledata’s Shopify source for Segment to work with any modern data stack. We have focused on providing a more comprehensive range of events and properties to sync with any destination in Segment, including email marketing tools, data warehouses, and Segment Personas. Our Segment connection uses a combination of client-side (browser) and server-side tracking to ensure 100% of your Shopify store data is sent to Segment. Littledata automatically integrates with Shopify and Shopify Plus sites to enable complete ecommerce analytics, including sales, marketing, customer, and product performance data. Recent updates include better matching with Personas, more consistent product properties, and more. Here are some highlights. Tracking plan for Segment Protocols We've written a full tracking plan and event schema, which is ready to upload into Protocols to prepare for robust data consistency in your data warehouse. Better matching with Segment Personas You can now choose which userId to use for Segment events from a standard list of common identifiers: Shopify customer ID - This is the default for new installs. Recommended if you have a simple Shopify setup with minimal integrations. Hashed email - The MD5 email hash is useful if you have other marketing platforms sending traffic where you know the email of the visitor (e.g. email marketing like Bronto or Marketo), but not their Shopify customer ID. Email - The email identifier is recommended when other platforms use the email and can’t hash it, and you are comfortable with the privacy implications. None (no identifier) - Choose “none” if user identity is already handled by your Segment implementation and you only need the extra events powered by Littledata's Shopify source. All user traits below are now being sent in the context.traits, and are synced with your CRM destinations every time the customer record in Shopify is updated. Trait Description Type createdAt The date customer record was created Date customerLifetimeValue The total spend of customer on the Shopify store Double default_address.street The customer’s default street address String default_address.city The customer’s city address String default_address.postalCode The customer’s ZIP / post code String default_address.state The customer’s state address String default_adress.country The customer’s country String description The customer notes String email The customer’s email address String firstName The customer’s first name String lastName The customer’s last name String marketingOptIn The marketing_opt_in field from Shopify customer String phone The customer’s phone number String purchaseCount The number of orders by this customer Integer state Whether the customer account is enabled (user has opted in) or disabled String tags The custom tags applied to the customer String userId Chosen user identifier, defaulting to Shopify Customer ID Double verified_email Whether the customer has verified their email Boolean Import historic Shopify orders into Segment For Enterprise Plus customers we can now import orders and refunds from before the date Littledata was connected to Segment. This allows you to build a complete customer record in destinations that support historic events, such as a data warehouse. If you are already a Littledata Plus customer, please contact your account manager to discuss setting up an order import. If you haven't yet tried Littledata or are still investigating solutions for you data stack, book a demo today with one of our data experts. [subscribe] Consistent product properties across all events We understand you need a consistent set of product properties with every ecommerce event to make analysis easier. For example, the product image URL is available within a Product Added event to make it easy to set up dynamic product retargeting campaigns. Previously, we only got the following properties from Shopify’s webhooks: shopify_product_idshopify_variant_idname (title)brand (vendor)sku And now we add these extra product properties for all events: variant (variants.title)image_url (from images.[0].src)cart_id (only with Product Added / Product Removed)urlcompare_at_price (variants.compare_at_price) Extra revenue properties We’ve added more reporting flexibility with how we send revenue data to Segment. Specifically, on Order Completed and all Checkout events, you will now see a subtotal = (product revenue including discounts). For the Order Completed event only, your store can opt in to an additional revenue property (product revenue excluding discounts, shipping and tax) via the Littledata application. Revenue is a reserved property in many Segment destinations. Opting in will override the total property sent to Google Analytics. Supporting the Iterable email destination Iterable is a cross-channel marketing platform that powers unified customer experiences and empowers you to create, optimize and measure every interaction across the entire customer journey. With this update, when an Iterable campaign leads to an Order Completed event the event properties will contain campaignId and templateId. To get these extra properties, you will need to edit the LittledataLayer setup to track the iterableEmailCampaignId and iterableTemplateId cookies. In addition we send an email field with all events linked to a user, so Iterable and other email marketing destinations can use the events. Supporting the Google Analytics destination in Cloud Mode In Cloud Mode, Segment will send event data to Segment’s cloud servers, and from there, we will translate and route that data to Google Analytics. This reduces the amount of third-party code on your site and you will be able to replay historical data in Google Analytics. We are happy to announce that you can now switch Google Analytics connection mode to Cloud Mode to relay events to GA from Segment's servers. This will increase page performance and provide greater control of the schema. More Subscription Event Properties On Subscription Created, Subscription Updated and Subscription Cancelled events we have added: statusproduct_id = shopify_product_idname = product_titlepricequantityskushopify_variant_idvariant = variant_titleorder_interval_frequencyorder_interval_unit On the Subscription Cancelled event only we have: cancellation_reasoncancellation_reason_comments And on the Charge Failed event we added:  error_type Change of product ID used in Segment events Previously, we used the product SKU for client-side events to be consistent with the GA destination. From this month, we have changed this to send the Shopify product ID as the product_id field in Segment for all events. Ability to send anonymized IP instead of full IP to Segment Segment’s AnalyticsJS library sends the whole IP address by default in Track and Page events. This is contrary to our GDPR recommendations, and we now set context.ip with the last octet (3 digits) anonymized. This still allows geolocation of the events, but ensures IP addresses are not accidentally captured in end locations.

2021-04-23

How to get complete ReCharge data in Google Analytics [ebook]

It's hard enough for Shopify stores to get accurate sales and marketing data. And if you're selling by subscription, this can seem even more complicated. In fact, 88% of Shopify stores have Google Analytics setup incorrectly, leading to a throughput of less than 90% (for every 100 orders in Shopify, 12 or more go missing in GA). I hate to break it to you, but for subscription merchants the reality is even harsher. Many brands can't even segment out first-time purchases from recurring orders, let alone tie them back to marketing campaigns! Luckily there's now a better way. Top subscription brands use modern data stacks to get the data they need to make informed decisions. This means understanding your checkout flow, yes, but also product lists, subscription bundles, discounts, returns, subscription lifecycle behavior, and top marketing channels for higher LTV customers. In this new ebook on ReCharge analytics, we show you how to do just that -- no developer skills needed! Free ebook on ReCharge analytics best practices Subscription analytics are a beast, and too many brands make one of these three common mistakes: Procrastination. "We know we have a data problem but will fix it next quarter...year...never..."The wrong tools. "We bought a fancy new dashboard, that will solve everything, right?" or "We bought this subscription analytics tool that works really well for SaaS companies. Why isn't it working well for ecommerce?"Completely manual approach. "Excel is my full-time job. I don't have time for data-driven growth." Top brands use modern data tools to tame the beast of analytics. In this new ebook, you'll learn how to get the data you need to accelerate growth. See how to automatically capture data at every turn: Track one-off orders and first-time subscriptionsTrack recurring payments and tie them back to the original marketing channelCalculate customer lifetime value ("CLV" or "LTV") and build more valuable cohortsCapture subscription lifecycle events like "Subscription updated"Get accurate marketing attributionUltimately make better decisions for your store Download the free ebook >>> Learn more about what you can track with Littledata's ReCharge connection. [tip]Advanced users can also now send data directly to Segment (and any connected data warehouse, email marketing platform or reporting tool).[/tip]

by Ari
2021-04-15

For every 100 orders in Shopify, 12 go missing

If you’re using Shopify’s default Google Analytics tracking you might have noticed that the revenue in Google Analytics never matches what you see in the Shopify dashboard. This is a big problem: missing orders means orders that can’t be attributed to marketing campaigns, whether those channels are paid or organic. Littledata’s improved Google Analytics app for Shopify increases order throughput to Google Analytics from worse than 90% to better than 99.9% -- and it works automatically in the data layer. How big is the problem? We sampled a set of larger DTC brands on Shopify, together processing 50,000 orders a month through a standard Shopify checkout. Looking at a month of traffic, we compared the paid orders for these Shopify stores with the Thank You pages tracked in Google Analytics. Remarkably, only 88% of orders were tracked on average, ranging from 78% tracked in the worst store setup to 96% in the best store. That is a big loss. For every 10,000 orders processed, 1,200 were going missing. Assuming each of those customers cost $50 to acquire, that is $60,000 of marketing spend which can't be attributed to sales. Whatever the CAC for your ecommerce brand, you can’t afford to miss significant data like this about transactions, not to mention the marketing campaigns that led to those sales in the first place! For every 10,000 orders processed, 1,200 went missing Revenue aside, what about those 1,200 customers who are likely still being retargeted by abandoned checkout campaigns, even though they did complete the checkout process? There is a good case to be made for remarketing to your best customers for upsells, cross-sells, referrals and more. But remarketing to your new customer base as if they never made a purchase is certainly bad business. And it gets worse. When I looked at 10 stores that have non-standard checkout setups, using apps such as ReCharge or CartHook, the percentage of orders tracked (excluding recurring orders) ranged from a pathetic 9% up to a disappointing 70%. Shopify’s order tracking relies on customers seeing the Shopify Thank You page, and many other checkouts do not immediately redirect there. What are the main reasons for missing transactions in Google Analytics? Littledata has had five years of experience debugging GA tracking, so at this point we’ve pretty much seen it all. In fact, it's the most common question our sales team hears: why doesn't my data in Shopify match my data in Google Analytics? The ecommerce ecosystem is constantly evolving, including headless setups and subscriptions in the Shopify checkout. But some things remain the same. The most common problem areas for disappearing orders are: 1. Users not waiting for the Thank You page to load Many tech-savvy buyers know that your store will email them an order confirmation, so if they’re in a hurry - and the thank you page takes a few seconds - why should they wait? This is especially true with payment gateways like PayPal, which have their own payment confirmation page. 2. Thank you page overloaded with marketing tags Most order tracking relies on a script to fire on the thank you page, and if your store has lots of these scripts then it could take 10+ seconds before the crucial Google Analytics script is run. Customers won’t wait 10 seconds to see a page which has no value for them. 3. Draft orders paid at a later date Does your store create draft orders? This is more common for B2B stores, and means the order is completed well after the customer web session finishes. That means no thank you page, so no way to track the orders in a standard GA implementation. 4. Third-party checkouts That Thank You page on Shopify may never appear at all if your store uses third-party checkouts. 5. Recurring orders Like paid draft orders, recurring orders are payments that happen outside of the customer’s web session. The user never goes through a checkout or sees the thank you page. 6. Duplicate tracking Refreshing the order confirmation page, or clicking through on an order confirmation email to view the page again, might cause another transaction event to be fired from the page. [tip]Get the free ebook about why Shopify doesn't match Google Analytics[/tip] How is Littledata’s tracking different? Littledata offers server-side order tracking, hooking into the order creation in Shopify after the payment has been made. That allows us to track draft orders paid after the event, recurring orders, and orders through channels like Amazon that don’t use the Shopify Checkout. It also allows us to add refunds back in real-time, so you can track net sales against marketing channels. Littledata de-duplicates all orders, so an order is only ever reported once - giving a 100% match with what is in Shopify admin. Server-side tracking ensures complete analytics If you want to compare like-for-like, as I did for this article, our app also sends a ‘Thank you page’ event (in the same way the order tracking done in Shopify’s standard setup). This event can also be used to trigger Google Tag Manager tags, using the built-in GTM data layer. Interested in improving your Google Analytics setup? You might be interested in 6 common reasons why GA is not accurate and how Littledata’s Google Analytics app works. [subscribe]

2021-04-08

Replacing Additional Google Analytics JavaScript for Shopify stores

On 1st March 2021 Shopify is permanently removing scripts added in the ‘Additional Google Analytics JavaScript’ preference. This field has been hidden for some time, but was previously used to inject all kinds of additional scripts into the checkout pages. Why is Shopify removing these additional scripts? Primarily they represent a security risk: injecting key-stroke-tracking scripts into checkout pages is a common way to steal credit card information. Shopify just can’t take the risk that if the store admin gets hacked, so could the customer card details. Additionally, being able to customise the Shopify checkout pages (via the checkout.liquid file) is a key feature of Shopify Plus and so a reason for stores to upgrade to Plus. How to replace Google Analytics code added in this Additional JavaScript field I know many stores were using this preference for exactly the reason it intended: to modify the functionality of the Universal Analytics tracking script Shopify adds, if configured in the online store preferences. The good news is that the scripts you need to run (excluding the checkout) can be added in the theme <head>. You can add settings or events to GA’s command queue, which get executed when the Universal Analytics (GA) library is ready. You need to add this line of code before any additional commands below, to ensure that: If the ga function is defined already, calls to ga() are queued If the ga function is not yet defined, calls to ga() are added to a new queue [dm_code_snippet background="yes" background-mobile="yes" slim="yes" bg-color="#abb8c3" theme="light" language="javascript" wrapped="yes" copy-text="Copy Code" copy-confirmed="Copied"] window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; [/dm_code_snippet] Shopify Plus stores can do the same thing on checkout.liquid to customise Google Analytics tracking on the checkout pages. Here are some of the common uses of Additional JavaScript, and alternatives I know of: 1. Anonymising IP address GDPR regulation in Europe requires stores not to send full IP addresses to Google’s servers in the US. You can opt out in GA by using this - but it will NOT affect pageviews sent from the checkout. [dm_code_snippet background="yes" background-mobile="yes" slim="yes" bg-color="#abb8c3" theme="light" language="javascript" wrapped="yes" copy-text="Copy Code" copy-confirmed="Copied"] ga('set', 'anonymizeIp', true); [/dm_code_snippet] 2. Tracking checkout steps To measure how far users get in the checkout, and with what products, many stores want to track checkout steps in GA. Shopify does track pageviews and some events from the checkout (not including product values), but unfortunately you can no longer add a script on Shopify’s checkout. However, Littledata’s app has a more robust solution to send checkout step events and pageviews from our servers. Tracking the checkout steps across all checkouts, including third party checkouts on ReCharge and CartHook, enables stores to retarget abandoned checkouts with Google Ads and understand how shipping and payment options affect checkout conversion. 3. Cross-domain linking Shopify already accepts incoming cross-domain tracking, but to add cross-domain tracking to links from your Shopify store you need to instruct GA to automatically decorate links: [dm_code_snippet background="yes" background-mobile="yes" slim="yes" bg-color="#abb8c3" theme="light" language="javascript" wrapped="yes" copy-text="Copy Code" copy-confirmed="Copied"] ga('linker:autoLink', ['yourblog.com']); [/dm_code_snippet] For more examples on when you need to set up cross-domain linking (for example, to third-party checkouts), see our cross-domain Shopify tracking guide. 4. Tracking logged-in users To enable a registered users view in Google Analytics you need to send a customer ID when known. The window-scope object `__st` includes that `cid` field, when the user is logged in. [dm_code_snippet background="yes" background-mobile="yes" slim="yes" bg-color="#abb8c3" theme="light" language="javascript" wrapped="yes" copy-text="Copy Code" copy-confirmed="Copied"] if(__st["cid"]) ga('set', '&uid', __st["cid"]); [/dm_code_snippet] 5. Tracking additional events You may want to trigger additional GA events, like clicks on a particular button. I’d recommend you set these up using Google Tag Manager, but you can also run a SEND command at any stage and it will send to the GA tracker Shopify loads on the page. [dm_code_snippet background="yes" background-mobile="yes" slim="yes" bg-color="#abb8c3" theme="light" language="javascript" wrapped="yes"] ga('send', 'event', 'List Filter', 'Change size filter', 'XL'); [/dm_code_snippet] 6. Tracking additional web properties Many stores need multiple tracking IDs to send data to multiple web properties, and Shopify by default only allows a single property.  I’d again recommend you set these up using Google Tag Manager, but you can also run a CREATE command in your head to track to additional properties. [dm_code_snippet background="yes" background-mobile="yes" slim="yes" bg-color="#abb8c3" theme="light" language="javascript" wrapped="yes" copy-text="Copy Code" copy-confirmed="Copied"] ga('create', 'UA-XXXXXXXX-X', 'auto'); [/dm_code_snippet] 7. Adding GTM triggers If you are using Google Tag Manager to fire other marketing tags you might have used the Additional JavaScript to run triggers - for example when customers completed an order. This could be replaced by using Littledata’s GTM data layer, which is included with our Google Analytics app.  The final result Assuming you just need items 1 and 4 from the list above, this is how the script tag in your liquid theme might look: [dm_code_snippet background="yes" background-mobile="yes" slim="yes" bg-color="#abb8c3" theme="light" language="html" wrapped="yes" copy-text="Copy Code" copy-confirmed="Copied"] <head> … <script> // Scripts moved from Additional Google Analytics JavaScript preferences window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; ga('set', 'anonymizeIp', true); if(__st["cid"]) ga('set', '&uid', __st["cid"]); </script> </head> [/dm_code_snippet] Is there anything else your store has added? Let me know and we can add it to the list.

2021-02-22

Try the top-rated Google Analytics app for Shopify stores

Get a 30-day free trial of Littledata for Google Analytics or Segment