Is it possible to track headless Shopify setups?

Headless commerce is not a new concept, but it's an increasingly popular solution. As larger brands continue to move to streamlined ecommerce checkouts such as Shopify and BigCommerce, they look to headless setups as a way to maintain speed or flexibility. An increasing number of those bigger DTC brands are going headless, whether that means a collection of landing pages leading directly to a Shopify checkout, or a full-on headless architecture implementation with a dynamic CMS. The question today is less whether you should consider headless in the first place (everyone is at least considering it), but more about your overall tech stack. When looking at the details of your stack (cost, functionality, maintenance, etc), it's important to consider headless pros and cons in general. But it's often even more useful to highlight specific use cases. We've previously written about how it's now possible to maintain your favorite Shopify Plus tech stack with a headless Shopify architecture. But what about your data stack? Does headless mean that your analysts will be dealing with a snow storm of anonymous IDs? Are there sacrifices to data accuracy, such as marketing attribution for recurring orders? With the right tools and plug-ins, you can still capture the complete headless journey on your headless site. In this post we look at headless Shopify tracking from several different angles and share resources for further reading. Why headless? DTC brands with a headless Shopify Plus setup now include Inkbox, Rothy's, Verishop, Allbirds, Recess, and many more. So why do merchants go headless? [caption id="attachment_10778" align="aligncenter" width="419"] Headless commerce overview from Shopify Plus[/caption] The main reason is speed, or site speed to be precise. When built the right way, modern headless sites are insanely fast. Ballsy increased conversion rates by 28% after going headless, thanks to dramatically faster page load times. (The average Shopify site sees around 4 seconds to full page load). At the same time, as our agency partner We Make Websites has noted, "extreme performance" isn't for everybody. Sometimes it can be like "the difference between buying a BMW or Audi, versus buying a Ferrari". Additional reasons for going headless include flexibility of controlling and customizing the complete frontend (with a CMS or other content framework). Of course, there are also limitations. When it comes to headless Shopify sites specifically, some trade-offs are the need to maintain multiple technologies or platforms, and the fact that Shopify's Storefront API uses GraphQL (there's currently no REST API for Storefront). Without the right tools, the other limitation is data accuracy and completeness. That can include: Marketing channels (paid channels, organic social communities, SEO) Browsing behavior (landing pages, product lists, website, mobile apps) Sales data (checkout behavior; one-off, first-time and repeat purchases) Ecommerce data from additional checkout apps (subscriptions and upsell flows) Headless tracking in Google Analytics / GTM It's no secret that Shopify and GA need some help to play well together. For every 10,000 orders processed on Shopify, 1,200 go missing in Google Analytics. For your average headless site, the stats are even worse. By default, different customer interactions with your brand — ppc campaigns, product lists, adds-to-cart, checkouts, refunds, recurring orders and subscriptions, email campaigns — are often either not tracked at all or not linked to the original user or session. In that way, you can end up with siloed data in different apps and platforms. Or even worse, everything could show up as anonymous activity or "Direct" traffic, even for repeat purchases. This isn't Las Vegas; what happens in the checkout should definitely not stay in the checkout! We have solved this problem by extending Littledata's server-side tracking to stitch sessions together from the client-side events captured on headless frontends . . . which is a rather technical way of saying that our Google Analytics app for Shopify now tracks headless sites automatically, from browsing behavior through the checkout funnel and beyond (we even capture subscriptions such as ReCharge payments!) This guarantees accurate sales and marketing data for any headless Shopify site. Check out Littledata's headless demo to see how our headless Shopify tracking works for Google Analytics. [tip]Using Google Tag Manager? Read more about our GTM / Data Layer spec.[/tip] Headless tracking in Segment As mentioned, we have offered server-side tracking for Shopify since the beginning, and automatically linked this with client-side events. Now this is available for any headless setup as well. In theory, it should be easy to send data from additional cloud sources to Segment. Each part of your headless frontend stack can just plug right in. But in practice this means manually adding a hodgepodge of client-side and server-side event tracking, and maintaining this as you scale. If you're using Segment as your CDP — or considering using Segment — rest assured that Littledata's headless tracking now fully supports Segment as a data destination. You can try to set this up yourself, but it's much easier (not to mention cheaper and more reliable) to just use our Shopify source for Segment to track your checkout. With Littledata, you can automatically send sales and marketing data from a headless Shopify site to your Segment workspace. We also recently added more flexibility around which fields to send as the userId for known customers. Check out our headless tracking demo to see how our headless Shopify tracking works for Segment. Tracking landing page builders Not every headless site is using a Content Management System (CMS). For those who do, Contentful is the most popular with straightforward headless Shopify builds. There are also "soft headless" sites that rely on a series of landing pages or similar flows, which then lead to the main Shopify site or even directly to the checkout. In the first case, where the landing pages are truly landing pages and lead to your main site, you can use the default settings in Littledata's Shopify app and generally do not need to take the headless install route. For cases where landing pages go directly to the checkout, see the headless tracking demo linked above. We also need to take landing pages seriously. It can actually be just as difficult to get complete marketing attribution or even to link sessions together and track the purchases customers make after landing on one of these pages. To solve this problem, Littledata's automated tracking now tracks landing pages as "additional apps" on top of our main Shopify connections for Segment and Google Analytics. As long as the Littledata script is loading on those landing pages, everything will link together automatically. We have tested this functionality with three of the most popular landing page builders for Shopify stores: Shogun Pages Zipify Pages  Gem Pages  Drop us a line if you have any questions about additional apps or special requests for landing page tracking. Preferred headless tech partner: Nacelle Our merchants looking for a complete headless Shopify solution often choose our tech partner Nacelle. Nacelle powers storefronts that stand out from the competition, offering headless website builds backed by a robust data stack. Focused on Progressive Web App (PWA) technology, they build lightning-fast, responsive sites for modern DTC brands. We've been working closely with Nacelle on tracking setup for some initial merchants (many brands you would recognize...) and are excited to now be able to offer headless tracking for any Nacelle customer. Read our shared ebook on going headless Explore our headless tracking demo Check out our NPM package for grabbing client IDs [or forward this to your developer!] Littledata's Nacelle tracking works automatically once you follow a few simple setup steps. Plus, the data can be sent to Segment, Google Analytics, or any connected data warehouse or reporting tool. [subscribe heading="Learn more about headless tracking" button_text="book a demo" button_link="https://www.littledata.io/app/get-free-trial"]

by Ari
2021-09-10

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

10 reasons to move to GA4 for ecommerce analytics

In November 2020 Google surprised the analytics world by making the beta of Google Analytics 4 (GA4) the default for all new web properties. Many GA4 ecommerce features are yet to be released, but I think there are compelling reasons to start using GA4 now, especially for data-driven Shopify Plus stores.Google is clear that GA4 is the future for integrating marketing data with Google Ads. Yet there's more to the picture, including custom funnels and other key features which were previously restricted to GA360 (costing $100k and upwards per annum), but are now free for anyone to use in GA4. Here are my top 10 benefits of GA4 from a data analyst’s perspective: Faster reportingCustom funnels *Analysis module *Export raw data to BigQuery *No event collection limits *Track mobile app events alongside web events **Streamlined audience buildingPredictive insightsMore custom dimensions *There’s more to come * Previously only available with GA360** Requires a roll-up property in GA360 Read on to dive into the details of each reason. We'll look at what's new in GA4 and how we expect these features to be useful to ecommerce managers and data scientists. 1. Faster reporting If you’ve used GA with high-traffic sites, especially with GA 360 properties, then you’ll be all too familiar with the ‘Loading…’ bar -- waiting many minutes for some reports to load. Ultimately Universal Analytics was built on 10-year-old data processing, and although the GA4 user interface looks similar, Google has rebuilt it from the ground up for speed and flexibility. In GA4, standard reports generate more quickly and are more powerful at the same time, bringing us to Reason #2: Custom funnels. 2. Custom funnels Goal funnels have always been a useful feature of GA, but the full power to choose a series of events to analyze was previously restricted to GA360, due to high processing costs. With GA4 you easily build a funnel using any combination of events or pageviews, filtered by any event property (see reason #9), with clever features like measuring elapsed time through the funnel. This is equivalent to the funnel functionality that made Mixpanel and Amplitude really popular, and is a massive upgrade on the previous version of GA -- where you could only add events or pages but not both. And where you had to set the goal funnel up in advance to see any report at all! 3. Analysis module The funnel reporting is part of a new ‘analysis’ tab in GA4 that brings more powerful report-building functionality. Compared with the previous ‘custom reports’ in Google Analytics (Universal Analytics), it is more intuitive to add dimensions, with more report templates like the Segment Overlap report below. Hopefully Google extends the template gallery to allow other analysts to share reports, as we’d love to see more reports for ecommerce metrics. 4. Export raw data to BigQuery This is a big one. Power users who wanted to go further and run their own algorithms, or build unsampled reports from raw, row-level data, previously needed a GA360 account. In GA4 you can set up an export to Google BigQuery, steaming events within a few minutes of them being recorded from your website. You pay for the BigQuery transfer and storage, but this is free for smaller sites and merely hundreds of dollars a month for larger sites. This makes GA4 + BigQuery a very viable data warehouse solution for ecommerce, and an insurance policy if you want to own your own data for future analysis. 5. No event collection limits In the free version of Universal Analytics you are limited to 10M hits (pageviews and events) per month, and 500 hits in any one session. For GA4, Google’s policy is ‘there is no limit on the total volume of events your app logs.’ Google has made no announcements on GA360 support for GA4, so these event limits may be subject to change. However, I see unlimited event collection as fitting with Google’s strategy to enable more ad retargeting and head off competition from tools like Heap (which has always advocated maximum possible event collection).There are limits to data export via the reporting API, with higher quotas for GA360 customers. But those limits could be bypassed by maintaining a BigQuery export (see above). 6. Track mobile app events alongside web events GA4 was originally called ‘app+web’ as it built on Firebase’s tracking for mobile apps and extended this tracking for web. Google calls this ‘customer-centric measurement’ as it allows the user-identified app sessions to be measured side-by-side with public website / web app sessions, where user-identification is harder. You could do something similar with roll-up properties in GA360 previously, but getting user identification right was a pain. I don’t rate this as a key feature for ecommerce, because most stores only run a public website, but if you are investing in a native mobile experience for loyalty then this is a killer feature for you. [subscribe heading="Love analytics? Littledata is seeking an Analytics Advocate" button_link="https://blog.littledata.io/2021/01/29/shopify-analytics-littledata-is-hiring/" button_text="See Open Positions"] 7. Streamlined audience building  It is telling that one of the first features launched for GA4 was linking a Google Ads account. Google wants to make GA4 the key way you build audiences for retargeting, and export them to Google’s other products. In GA4, Audiences can be configured with any combination of events, demographics or channel, and then synced with Google Ads. For example, let’s say you want to retarget users over the next 30 days who added a product from the ‘handbags’ category to cart, with a value of more than $100 -- but never purchased. No problem! Go ahead and include users who have triggered the add to cart event with a certain product category and product price, and exclude those that triggered a purchase. 8. Predictive insights GA4 adds a number of features for predictive insights. For example, in analysis and audience building you can add predictive metrics: purchase probability and churn probability. Purchase probability is the chance that a user will purchase in the next 7 days, based on their patterns of behavior so far. Churn probability is the chance that they will no longer be an active user in 7 days. This further improves the kind of audiences you can build. How much more would you be willing to pay to re-engage customers that were in the top 10% of people most likely to buy? For ecommerce analytics, we see predictive insights being used alongside metrics already enabled by Littledata's tracker, such as LTV by channel. Yet another reason to be excited about GA4 for DTC growth. 9. More custom dimensions and user properties At Littledata we add custom dimensions about user behavior over time (their lifetime spend, date of last purchase, and more) to aid in audience building and LTV analysis. This used to eat into the 20 custom dimension slots provided in Google Analytics, but with GA4 you can specify as many hit-scope dimensions with events as you like (not just limited to Category, Action and Label). You can also add up to 25 user properties that are persisted with each user as they get tracked across your site. The only downside is there is no support for product-scope custom dimensions (like sizing or gross margin) as such. You can add multiple item_category fields, which could be used as extra product fields, but I hope custom product properties are on the roadmap. 10. There’s more to come Google stopped developing Universal Analytics a few years ago and any new features will only launch on GA4. Although GA4 is not yet perfect I am really excited about the direction and speed of travel of the product. As Spencer Connell at Praxis Metrics puts it: “GA4 feels like a house which is 60% built - missing a couple of walls, and maybe the roof … but you definitely don’t want to wait until the house is 100% finished before you start moving in.” At Littledata we’re so excited that we have built a beta GA4 connection for Shopify, and we will launch it just as soon as GA4’s APIs are ready. Please get in touch in you're interested in access to the beta release. What you can do now If you want to watch the GA progress from the sidelines, keep checking for GA4 product releases and jump in when you’re ready. But I recommend getting started right now by tracking your site on GA4 in parallel with Universal Analytics (or ‘doubling tagging’ in marketing analytics speak). Josh Katinger at our Google Analytics Sales Partner, Cardinal Path, explains: “Why now? You need an overlap of data. Moving to GA4 is really equivalent to a migration from Adobe Analytics - it’s a platform migration. And when you have a platform migration you want to have overlap, so you have time to understand the difference in the data model, understand the data variations and how to handle them. We are counseling everyone to double tag if you can.” Note that adding GA4 tracking to a Shopify store will not slow down your pages, as Littledata shares the same gtag tracker and server-side tracking for both versions of GA. Have you already started playing around with GA4? Let us know what you've discovered. [subscribe heading="Love analytics? Littledata is seeking an Analytics Advocate" button_link="https://blog.littledata.io/2021/01/29/shopify-analytics-littledata-is-hiring/" button_text="See Open Positions"]

2021-02-04

How to track Klaviyo flows and email campaigns in Google Analytics

Klaviyo is one of the most popular email marketing platforms for Shopify stores, but the analytics setup is often overlooked. By following a few simples rules, you can ensure accurate Klaviyo data alongside other sales and marketing data in Google Analytics. In this article we cover how to set up Google Analytics tracking for Klaviyo, including best practices for UTM parameters and dynamic variables, and how this tracking works alongside Littledata's Shopify to Google Analytics connection. Why Klaviyo Klaviyo is a popular customer engagement platform used by over 50,000 Shopify merchants. Their focus is on email and SMS automation, and they have been one of the major success stories in the Shopify ecosystem, recently closing a $200 million funding round. Klaviyo's features for Shopify include: Codeless signup forms Pre-built flow templates for quick automation Email campaigns for customers and leads Advanced segmentation and personalization, including product recommendations Many of Littledata's Shopify customers use Klaviyo in one way or another, as do almost all of our Shopify Plus customers. But we've noticed a trend where even the biggest Klaviyo users aren't correctly tracking Klaviyo flows in GA, which ends up blocking data-driven decisions for growth. Read on to see how to fix this. Why Google Analytics The Klaviyo dashboard has useful built-in reporting, but for ecommerce managers focused on more than just email, there are some significant limitations compared with a dedicated analytics platform like Google Analytics (GA). One key limitation is for sales attribution (marketing attribution for online sales). In Klaviyo, any sale that happens after engagement with an email is attributed to that email. This overstates Klaviyo's contribution to sales. For example, if a user first comes from a Facebook Campaign, then clicks on an abandoned cart email from Klaviyo, then goes on to complete a purchase after being retargeted in Facebook, Klaviyo will claim this as owned revenue attributed to that email engagement and credit Facebook with nothing! Another limitation of reporting in Klaviyo's dashboard is that it's hard to see the contribution of an entire email flow to sales, as opposed to the impact of a particular email message in the flow. In Google Analytics (if set up correctly) you can see multi-channel contribution to sales, comparing apples with apples across different marketing channels. What is UTM tracking? UTM parameters are extra data in the link the user clicks to tell Google Analytics (and Shopify) where the click came from. These parameters are automatically added by Google Ads, but for other platforms (e.g. Facebook or Klaviyo) you will need to add them manually or via the software. Why does this matter? Because link clicks coming without a UTM tag will typically be treated by GA as "direct" traffic -- in other words, the source of those visits will be unknown. [note]Read Littledata's free guide to common reasons Shopify doesn't match Google Analytics[/note] Recommended settings To provide the most reporting flexibility we recommend having the same standard UTM parameters across all email flows and campaigns. Klaviyo allows dynamic variables to be used in your default UTM tracking settings. To get the most out of your Klaviyo reporting in GA, we recommend using static values for Source and Medium, and dynamic values for Campaign and Content. You can change these defaults in go to  Account > Settings > UTM Tracking UTM Parameter Campaign Email Value Flow Email Value Source (utm_source) 'Klaviyo' 'Klaviyo' Medium (utm_medium) 'email' 'email' Campaign (utm_campaign) Campaign name (Campaign id) Flow email name (Flow email id) Content (utm_content) Link text or alt text Link text or alt text [tip]Content is not a default parameter in Klaviyo, so you will need to add that manually (enter `utm_content` as a new parameter).[/tip] With static values for Source and Medium (Klaviyo / email), you will be able to see Klaviyo compared against other marketing channels in GA, and in particular how Klaviyo campaigns contribute to customer lifetime value and other key metrics for Shopify sales and marketing. We do not recommend sticking with Klaviyo's default UTM settings, where Klaviyo flows, for example, are  given a dynamic variable that pulls in the name of the flow. You can already see that type of data in the Klaviyo analytics dashboard -- better to use GA for complete marketing analysis. Whichever naming convention you choose, consistency is essential. Many Littledata customers create internal spreadsheets to manage UTM naming conventions and channel groupings in GA, and run regular QA checks to ensure consistency. Note that we have analytics audit checks within the Littledata app, and we now offer analytics training on Plus plans. Enabling UTM parameters In addition to setting up the UTM Parameter values in your Klaviyo account, you need to enable UTM tracking to ensure that those parameters are applied to all emails in flows and campaigns. The first step is to enable global UTM settings. Go to Account > Settings > UTM Tracking Switch Automatically add UTM parameters to links to ON. Then click Update UTM Tracking Settings. This will ensure that the UTM parameters are added automatically to all emails sent via Klaviyo. Now that you have enabled UTM tracking, you need to make sure that you are using 'account defaults' for UTM tracking in your flows and email campaigns (as opposed to custom tracking). This should already be the case, but it's good to double-check. Disable any custom UTM tracking for flows or campaigns Make sure that the UTM settings for individual flows are set to 'Yes, use account defaults'  Make sure that overall email campaign settings are set to use default UTM tracking as well. In your overall campaign settings, select 'Yes, use account defaults' In addition, when creating/editing a campaign, go to Tracking and make sure that 'Include tracking parameters' is ON and 'Customize tracking parameters' is OFF Tracking across all marketing channels The UTM settings above only solve part of the marketing attribution problem: getting the campaign information to the landing page. Commonly this marketing attribution is lost between the landing page and the order completing. You can try to do this manually with an in-house dev team, but Littledata has built a complete ecommerce tracking solution for Shopify and Google Analytics that works automatically. Our connections use a combination of client-side and server-side tracking to make sure that all marketing channels -- including email, paid channels, organic search and referrals -- are linked to sales, along with all touch points in between. We also track returns/refunds, repeat purchases, and subscriptions, so you can understand customer lifetime value on a deeper level. Read about all of the the events Littledata sends automatically. You can use these events for reporting and analysis, and also to build audiences for your Klaviyo campaigns! Reporting on Klaviyo flows in Google Analytics Google Analytics is a powerful reporting tool once you get to know how channel groupings and custom dimensions work. Here's a quick look at how to analyze your Klaviyo data in GA. Looking at campaign conversions in Google Analytics After you have enabled our recommended settings for UTM tags, you will have access to Klaviyo flow and campaign data in GA. You can look at this on its own, but also compared against other channels for engagement and acquisition. To see revenue and orders attributed to these campaigns, drill into the Klaviyo source and add campaign as a secondary dimension. If you set up the Flow email name as the utm_campaign above, then you can look at the contribution of that whole flow to sales. For example, without caring if the user clicked on email 1 or 2 in a 4-email flow, did clicking on any of the emails in that flow -- for example, the 'Browse Abandonment' flow -- result in sales? Going further, you could create a segment of users who came via an Instagram campaign, and see to what degree they were influenced by the email sequence. Will Google Analytics match Klaviyo? How does the data you now have in Google Analytics compare with what you see in your Klaviyo dashboard? Under the Conversions > Multi-Channel Funnels > Model Comparison Tool in GA, you can compare the default email attribution in GA (last non-direct click), with other attribution models more similar to Klaviyo's dashboard. Keep in mind that there is no model for 'all click' attribution, so the numbers you'll see in GA will always be lower. You can also look at the Multi-Channel Funnels > Top Conversion Paths report to see where Klaviyo fits into the user journey on your ecommerce site.   [note]Google Analytics data can also be used as a source for other reporting tools, such as Data Studio and Tableau.[/note] Using Klaviyo with Segment If you are looking to do more with your Shopify and Klaviyo data, consider Segment. Littledata's Shopify source for Segment automatically sends a rich data set for use with a range of Segment destinations. Not only does our Segment connection get all of the post-click events into Segment, but it also sends any event associated with an email address onto Klaviyo as well -- providing a richer set of events, without a developer, than Klaviyo's own Shopify event tracking. For example, you can retarget users in Segment who have purchased a certain value, or got certain products to a stage of the checkout -- all without writing a line of code. Read more about how Littledata's Segment connection works, and check out the latest updates to our Shopify source for Segment. The connection now supports analytics destinations such as Mixpanel, Vero and Kissmetrics, and email marketing destinations including Klaviyo, Hubspot and Iterable. [subscribe]

2020-11-25

Going international? How to optimize for BFCM sales around the world

More sales might be happening exclusively online this year. And retailers might be creating their own "sales day" events. But one thing that hasn’t changed with COVID-19 is the surge in Black Friday Cyber Monday (BFCM) events around the globe. Black Friday might have started in the USA, but it’s now a popular shopping event in other countries too, especially the UK (where Littledata started). Shopify now supports multi-currency “stores” (one for each currency). In fact, Shopify Payments now supports over 120 currencies, and brands selling in multiple countries are promoting BFCM deals across all of them. [subscribe heading="Free ebook: Top 5 BFCM Benchmarks" background_color="grey" button_text="Get Your Copy" button_link="https://www.littledata.io/app/top-5-holiday-benchmarks"] Our Shopify Plus customers started preparing for these sales earlier than ever, some launching holiday promotions as early as October! Not only that, but the sales are seemingly endless. Glossy recently reported that 37% of brands will run holiday promotions for at least 8 weeks this year, and Littledata's Shopify benchmarks are already showing the signs of increased promotions: lower conversion rates but a lot more traffic, especially from social channels. (We also found last year that holiday promotions increased next season purchasing -- and I expect this trend to continue). Resources for Shopify stores doing multi-currency BFCM promotions With multiple country stores and a longer sales period, accurate data becomes even more important. These free resources will help you answer the questions in the back of your mind: are you tracking multi-currency sales correctly? 4 tips for Shopify Plus merchants selling internationally A common mistake of many companies is quickly jumping into international ecommerce without taking time to develop a proper strategy. Read these 4 tips to help your Shopify Plus business sell in a more cost-effective way. How Shopify Plus stores can set up multi-currency reporting in Google Analytics Our recommendations for what to track and how to track it. In this detailed post, Littledata’s CEO looks at the differences in analytics for single store and multi-store international setups.  Multi-currency tracking for Shopify Payments Many Shopify Plus merchants rely on Shopify Payments to manage multi-currency. For those stores, Littledata's multi-currency tracking is an out-of-the-box solution to get accurate sales and marketing data. This article outlines how Littledata’s multi-currency support works for different parts of the data processing. We use Shopify’s definition of presentment currency and shop currency. Overview of automated multi-currency tracking Are you selling internationally? If you're already selling internationally, it’s important to get tracking set up correctly before BFCM. Learn how to track sales in multiple currencies directly in Google Analytics, so you can scale the smart way during the busiest shopping season. [subscribe]

by Ari
2020-11-19

4 deep dives into customer lifetime value for ecommerce sites

Subscription ecommerce consistently scaled throughout the COVID-19 pandemic, with consumables like beverages and meal kits rising particularly fast in North America. Shopify sites selling by subscription have always been a core part of our customer base at Littledata, and with even traditional brick-and-mortar retailers moving online and trying out subscription ideas, we've got our hands full with new subscription sites these days. It might be easier than ever to start a subscription box (companies like Bulu have transformed the market), but getting accurate data about marketing attribution and customer lifetime value is difficult without the right data setup. So, we thought it would be useful to share some of our best tips about subscription analytics. Here are our top four posts on LTV. Enjoy! 1. Two ways to calculate customer lifetime value for ecommerce using Google Analytics data Ecommerce businesses that are paying attention to their data know of the importance of customer lifetime value. Measuring it correctly, though, isn't always clear. In our Learning Videos series, we tackled this exact question and illustrated two different methods of calculating customer LTV using Google Analytics data for both one-off and subscription customers. Watch the video (or read the article) to learn how to add these LTV calculation skills to your data toolbox. https://blog.littledata.io/2021/05/27/calculate-customer-lifetime-value-for-ecommerce-using-google-analytics/ 2. How to calculate LTV for ecommerce subscriptions Lifetime value is a core metric for many online companies these days. This is especially important for ecommerce sites because, whether you're focusing on repeat purchases or actual subscriptions, marketing to (and product alignment with) the highest LTV customers can make or break a DTC brand today. In this post, our founder breaks down the basics of LTV calculations for ecommerce, focused on Shopify stores using ReCharge for subscriptions. https://blog.littledata.io/2020/01/14/how-to-calculate-lifetime-value-ltv-for-subscription-ecommerce-in-google-analytics/ 3. How to use Custom Dimensions in Google Analytics to increase subscription sales Custom Dimensions are a remarkably powerful feature in Google Analytics, often overlooked because they can be complicated to set up manually (also, they "sound complicated"). But the truth is that, with a little background research, custom dimensions are easy to understand. More importantly—they're easy to apply to your daily, weekly, and monthly reports in order to get a clear view of different order types, repeat purchasing behavior, and more. https://blog.littledata.io/2019/09/19/quick-tips-for-subscription-stores-using-custom-dimensions-in-google-analytics/ In this detailed post, our lead analyst dives into the complications of modern DTC brands selling a mix of product types and subscriptions. You'll learn to reconcile differences in reporting tools and create segments or reports to fit your unique business model. After all, talk is cheap. How can you put LTV calculations to work for your business? [note]Did you know? Littledata automatically tracks first-time and recurring purchases and ties them back to the original marketing source.[/note] 4. The ultimate guide to LTV tracking In this popular guest post on the Shogun blog, we take a look at everything you need to know about LTV. When you know your LTV, you can: Know which kinds of products your high-LTV customers want more of Know how much to spend to acquire a “similar” customer and still make a profit based on their projected buying habits Promote the products with the highest profitability Increase your marketing budget and inbound efforts to attract your most profitable types of customers [subscribe]

by Ari
2020-09-30

Why does shop.app appear as a referral source in Google Analytics?

You may have noticed a new referral source appearing in your Google Analytics, or an increase in sales from the 'Referral' channel. This is a change Shopify made with the launch of the new Shop app, and can be easily fixed. What is Shop.app? SHOP by Shopify is a consumer mobile app, aggregating products and experiences from many Shopify merchants. It is heavily integrated with ShopPay, and so Shopify is now directing one-click checkout traffic to the shop.app domain instead of pay.shopify.com. How would SHOP fit into the user journey? There are two scenarios: 1. Customer is using Shop.app for checkout and payment Example journey: User clicks on Facebook Ad Lands on myshop.myshopify.com?utm_source=facebook Selects a product Logged in, and directed to shop.app for checkout Returns to myshop.myshopify.com for order confirmation In this scenario we should exclude shop.app as a referrer, as the original source of the order is really Facebook 2. End customer is using Shop.app for browsing / product discovery Example journey: User discovers product on shop.app Clicks product link to myshop.myshopify.com?utm_source=shop_app Logged in, and directed to shop.app for checkout Returns to myshop.myshopify.com for order confirmation Here, shop.app is the referrer but it will show up with UTM source How do I see the true source of the referral in Google Analytics? Firstly, you need to exclude shop.app as a referral source. Only in scenario 2 is SHOP genuinely a source of customers, and there the UTM source tag will ensure it appears as a referrer. Littledata's latest tracking script sets this up automatically. The second fix is harder. Unfortunately, at the time of writing, Shopify only sets utm_source=shop_app in the URL query parameters in scenario 2, and Google Analytics won't consider this a referral unless utm_medium is also set. So it appears under the (not set) channel. I've written a patch for our tracking script so that we set utm_medium as referral if only the source is specified, but you can also edit the default channel grouping in GA so that shop_app is grouped as a referral. Thirdly, you want to differentiate orders going through shop.app from the normal Shopify checkout. Littledata's Shopify app does this by translating the order tag shop_app into the transaction affiliation in Google Analytics, so the affiliation is Shopify, Shop App. Conclusion So if you're a Littledata customer: our app has got you covered. And if not there's a few changes you'll need to make in Google Analytics settings to make sure shop.app traffic is treated correctly.

2020-09-22

How to set up cross-domain tracking in Google Analytics

Cross-domain tracking makes it possible for Google Analytics to track sessions on two related sites (e.g. an ecommerce site and a separate shopping cart site) as one single session. This is also known as site linking. In other words, with cross-domain tracking, you can see a user in a single Google Analytics account throughout their journey across multiple domains you control (e.g. mysite.com and myshoppingcart.com). It’s a seamless shopping and checkout experience for your online shoppers, so shouldn’t you track it seamlessly? Why you need to set up cross-domain tracking Here’s what it looks like with a standard configuration of the Google Analytics script on your site:  Every time a user loads a page on a different domain, a new session is generated even if the branding looks seamless to the user and the previous session has ended.  Even if the customer is still active and continues to generate events and page views on the other domain, the sessions are still interrupted.  Until you implement the cross domain tracking on your site, you won’t have an accurate customer journey. For example, let’s take a standard website, www.siteA.com, and its blog, www.blogB.com. To track sessions, Google Analytics collects a Client ID value at every hit. Client ID values are stored in 1st party cookies, and these cookies are only available to web pages on the same domain.  When tracking sessions across multiple domains, the Client ID value has to be transferred from one domain to the other. To do this, the Google Analytics tracking code has linking features that allow the source domain to place the Client ID in the link URL, where the destination domain can access it.  First, the source domain needs to ensure all URLs pointing to the destination domain contain the Client ID of the source domain. Second, the destination domain needs to know to check for the presence of a Client ID in the URL once a user navigates there. If you're using gtag.js, cross domain tracking can be done by adding a linker parameter containing the Client ID (as well as the current timestamp and browser metadata encoded within it) to URLs pointing to the destination domain.  When a value is configured for the domains property of the linker parameter, gtag.js will check for linker parameters in the URL. If the linker parameter is found and is valid, gtag.js extracts the client ID from the parameter and stores it. By enabling cross domain tracking with gtag.js, you have the option to add the linker parameters either automatically or manually to URLs in links and forms on the page. Setting up cross-domain tracking by modifying the tracking code To set up cross domain tracking for multiple top-level domains, you need to modify the Google Analytics tracking code on each domain. You should also have basic HTML and JavaScript knowledge (or work with a developer) to set up cross domain tracking. The examples in this article use the Global Site Tag (gtag.js) framework. To get started, within the source domain you’ll need to configure the Domains property of the Linker parameter in your property's config for URLs pointing to the destination domain.  After that, gtag.js will listen for selections on links that point to the destination domain(s), and it will automatically add the linker parameter to those links before the navigation starts. You can also set the optional decorate_forms property of the linker parameter to true if you have forms on your site pointing to the destination domain. For example, this code will append the linker parameter to any links on the page that point to the target domain 'siteA.com': [dm_code_snippet background="yes" background-mobile="yes" bg-color="#0fa69d" theme="dark" language="javascript" wrapped="no"] gtag('config', 'GA_Property_ID', {   'linker': {     'domains': ['siteA.com']   } }); [/dm_code_snippet] If the destination domain is not configured to automatically link domains, you can instruct the destination page to look for linker parameters by setting the accept_incoming property of the linker parameter to true on the destination property's config: [dm_code_snippet background="yes" background-mobile="yes" bg-color="#0fa69d" theme="dark" language="javascript" wrapped="no"] gtag('config', 'GA_Property_ID', {   'linker': {     'accept_incoming': true   } }); [/dm_code_snippet] Bear in mind, there are sometimes cases where it is unclear which domain your users will see fist.  In such cases, there is also the option to implement "bi-directional cross domain tracking". With this config, each domain is configured to work as either the source or the destination.  To implement bi-directional cross-domain measurement, enable auto linking on both domains and configure them both to accept linker parameters and automatically link domains. To keep the same code snippet on every domain, you can add all possible domains you want to track in the domains property of the linker parameter. [dm_code_snippet background="yes" background-mobile="yes" bg-color="#0fa69d" theme="dark" language="javascript" wrapped="no"] gtag('config', 'GA_Property_ID', {   'linker': {     'domains': ['example-1.com', 'example-2.com']   } }); [/dm_code_snippet] Setting up cross-domain tracking with Littledata's Shopify app If you use Shopify or Shopify Plus and have already installed one of Littledata's Shopify apps to fix your analytics tracking, then the cross-domain linker implementation will be even easier. We offer versions for Google Analytics and Segment, but they work in basically the same way. When you install Littledata, the app replaces Shopify's integration with Google Analytics with its own improved tracking script (LittledataLayer). This script contains the extraLinkerDomains property where you can add extra sites for domain linking, keeping everything very robust: [dm_code_snippet background="yes" background-mobile="yes" bg-color="#0fa69d" theme="dark" language="javascript" wrapped="no"] LittledataLayer = { transactionWatcherURL: 'https://transactions.littledata.io', referralExclusion: /(paypal|visa|MasterCard|clicksafe|arcot\.com|geschuetzteinkaufen|checkout\.shopify\.com|checkout\.rechargeapps\.com|portal\.afterpay\.com|payfort)/, googleSignals: true, anonymizeIp: true, productClicks: true, extraLinkerDomains: ["domain1.com", "domain2.com"], persistentUserId: true, googleAdsConversionIds: ['AW-12345'], hideBranding: false, ecommerce: { currencyCode: '{{shop.currency}}', impressions: [] } }; [/dm_code_snippet] How to test your cross-domain tracking setup One of the easiest ways to test if the new cross-domain tracking is set up properly, is to check if the same client ID (cid) is tracked on all available page sessions using Tag Assistant Recordings.   Get help from Littledata enterprise If you’re an enterprise customer, just ask your account manager to help add the secondary domains and audit your set up. This is the easiest way to do it and one of the time-saving benefits enterprise customers enjoy.  Using filters to report on cross-domain tracking By default, Google Analytics only includes the page path and page title in page reports - not the domains name. For example, you might see one page appear in the Site Content report like this: /contactUs.html Because the domain names aren’t listed, it might be hard to tell whether this is www.siteA.com/contactUs.html or www.blogB.com/contactUs.html. To get the domain names to appear in your reports you need to do two things: Create a copy of your reporting view that includes data from all your domains in it Add an advanced filter to that new view. The filter will tell Google Analytics to display domain names in your reports. Follow this example to set up a view filter that displays domain names in your reports when you have cross-domain tracking set up. For some fields, you need to select an item from the dropdown menu. For others, you need to input the characters here: Filter Type: Custom filter > Advanced Field A: Hostname Extract A: (.*) Field B: Request URI Extract: (.*) Output To: Request URI Constructor: $A1$B1 Click Save to create the filter. You can validate that filters are working as you expect using Google Tag Assistant Recordings. Tag Assistant Recordings can show you exactly how your filters change your traffic. In your Google Analytics reports, you should start seeing the domain names populated alongside the page path.  Want to double check to ensure it's working? When you sign up for a trial, you can check your full setup with our  smart analytics audit. Get started today with a 14-day free trial! [subscribe heading="Get my smart analytics audit" background_color="green" button_text="audit my site" button_link="https://www.littledata.io/features/audit"]

2019-11-19

Try the top-rated Google Analytics app for Shopify stores

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