An open letter to Mark Zuckerberg from Littledata Founder, Edward Upton

Dear Zuck, You’re a developer. I’m a developer. And I thought Facebook was a developer-friendly company to work with — after all, you’re trying to recruit tens of thousands of engineers to work at Meta. But our experience trying to integrate with Facebook Ads makes me really doubt that. It’s been frustrating. At times, eyeball-gougingly frustrating. Littledata runs a popular data integration, allowing hundreds of ecommerce brands spending a LOT of money on Facebook Ads to export their cost and click data to better calculate return on advertising spend. Until October this Facebook app was running just fine, and our mutual customers were happy social marketers. The trouble started when Facebook needed to verify our business manager account earlier this year. We’ve heard that Facebook needs to know their business customers better — some of those Russians spending big on election Ads were not quite who they said they were. We understand. Littledata is trusted by thousands of Shopify stores around the world, so we’d be happy to show Facebook our company paperwork. The problem is the app in question is linked to a legacy business manager account with no admin user. Hands up, that was my fault — as someone who’s led a hyper-growth startup I hope you’ll see why sorting out a duplicate Facebook account never got prioritised. So, we never got the memo back in February 2021 that the business manager account was unverified and suspended. No Facebook message, email, push notification or carrier pigeon. Nada. This time bomb carried on ticking until 5th October when we needed to add back app permissions after an update to Facebook’s marketing API. But we were not able to do so without — you guessed it — a verified business manager account. On 5th October you probably had bigger fish to fry with Facebook’s network meltdown, but I hope a coder like you couldn’t fail to spot the classic infinite loop: Littledata can’t verify the Facebook business manager account, because there is no admin user with access to that business Facebook can’t add an admin to an unverified business when it's been inactive for more than 60 days We can’t move the app to another Facebook business, as there is no admin user with accesss Since October, I’ve been in contact with Facebook business support nearly every day because our Facebook advertiser customers are complaining every day. And over 8 weeks — EIGHT WEEKS — I have felt like I’m head-butting a concrete wall. Since this scenario isn’t one that was imagined by the business verifications team, it apparently just can’t be fixed. Maybe this is how those data centre managers felt on 5th October, locked out of their own building because Facebook’s authentication systems were offline? So now our app can’t be used. So advertisers spending tens of millions with Facebook Ads are upset too. I’m just a developer wanting to work with Facebook. Can you or anyone else get us out of this verification Meta-hole? Best regards, Edward Founder, Littledata P.S. If you can take a short break from the metaverse, it's support ticket 622162645450139

2021-11-30

Why stores are using Facebook’s Conversions API

Over three million businesses worldwide use Facebook Ads. Their massive reach ensures they play a part in every ecommerce store’s marketing strategy. Of course, the key to a successful Facebook Ads strategy comes down to creating ads and targeting audiences based on good data. If you want to measure the return on investment from your Facebook Ads accurately, you need to share page-view and conversion events with Facebook. In the past, Facebook recommended you add Facebook Pixel onto all your web pages to enable this event tracking, which triggers a ping to Facebook’s servers. Originally this ping was in a request for a single white pixel loaded at the bottom of the page (hence ‘Pixel’), but nowadays the ping is usually sent from Facebook’s Javascript. In this post we’ll explain: Why you need to set up Conversions API today to improve your marketing How this extra tracking opens up more advertising options How you can implement the Conversions API on a Shopify store What’s wrong with Facebook Pixel? Over the 10 years since Pixel’s launch, three big trends have reduced its effectiveness at tracking return on Facebook Ad spend: Usage of ad blockers to stop third-party scripts from known advertising platforms (like Facebook) from sending a ping Browsers (e.g. Safari’s ITP) restricting what third-party scripts and cookies can track The increasing share of clicks from Facebook’s mobile app, exacerbating the 2nd trend The introduction of GDPR and similar regulation requiring that customers opt into being tracked in their web browser presents the latest obstacle, and perhaps the biggest yet. The combined effect is that a smaller percentage of Facebook users who click on your ad can be tracked on subsequent web sessions. So a smaller percentage of the purchases which resulted from Facebook Ads can be attributed to Facebook. [tip] Want to dig deeper into the challenges of measuring ROI from Facebook? See our recent webinar[/tip] Why did Facebook launch Conversions API? The lack of marketing attribution is a big problem for Facebook, as it makes their Ads look relatively less effective and more expensive than other channels. To combat these trends Facebook launched the Conversions API (CAPI) in 2020, and in 2021 expanded it to enable tracking of any event (not just the purchase) directly on Facebook’s servers. In contrast to Pixel, Facebook Conversions API is a server-to-server data connection, allowing events linked to a visitor from Facebook to be sent independent of the browser sessions.   What's the advantage of CAPI over Pixel? Firstly, the server-side events are not sent from the customer’s browser, so they are not interrupted by the web browsing and privacy trends mentioned above. Close to 100% of the purchases from your store can be shared with Facebook via CAPI. Secondly, even if the customer has opted out of marketing cookies — meaning the purchase cannot be attributed via Facebook’s Pixel ID — CAPI can send some extra user identifiers like email address, physical address and phone number. These give Facebook a better chance of linking the purchase to a user, and from there to the Ad the user clicked on. See more on user data below. This personally identifiable data is sent securely from Shopify to Facebook via a SSL connection, so there is no risk of security leaks. Conversions API also gives stores the ability to link delayed conversions back to the original ad campaign. A good example is subscription commerce (see Facebook’s case study), where stores need to see the 2nd or 3rd purchase to evaluate if the Facebook campaign is effective. [tip]Littledata’s connectors capture recurring payments from the Shopify checkout automatically[/tip] Using CAPI might not fix all your attribution issues, but one agency reported a 25% to 35% boost in attribution for Shopify stores using this technique. If you are a big Facebook spender, even a 20% improvement in attribution might be worth thousands of dollars of implementation costs. How should I use CAPI on my Shopify store? Facebook recommends you use a partner integration work with CAPI, and there are three ways to integrate Conversions API with your Shopify store: Shopify’s inbuilt Facebook channel Server-side Google Tag Manager (sGTM) Littledata + Segment To help you decide which is right for you, here is a quick comparison table. Integration route CAPI used for Supports all FB account and campaign setups Complexity of setup Cost of maintenance Shopify’s Facebook channel Just conversions No Low  Low sGTM All events triggered in GTM Yes High High Littledata + Segment All server-side events from Littledata Yes Low Low You might be alright using Shopify’s Facebook channel if your campaign structure is simple, uses just one Facebook account, and you only target based on first-time purchases. Otherwise you should look at Segment’s Facebook CAPI destination or sGTM. sGTM is a version of Google Tag Manager where a trigger on the browser (e.g. the customer viewing a checkout step) is passed on to a dedicated cloud server, where the GTM container logic decides which events to trigger. So it’s a hybrid of client and server side tracking. What are the limitations of using sGTM? You might have been told server-side GTM (sGTM) is the best way to work with CAPI. I disagree. Firstly, you have a complex setup to get all the events triggered from the browser in a way that the GTM server can handle. An analytics agency will typically charge you a few thousand dollars to get this working. Then you have to spin up your own GTM server in Google Cloud. That’s not a big cost - probably a few hundred dollars a month - but it is a maintenance headache. Who is going to check the server is up and running as expected? There are some limitations of where you can add the GTM container on the Shopify storefront. Unless you are using Shopify Plus, you can’t add to the checkout pages - so you can’t capture the checkout steps in the example above. Finally, you have to consider all the many changes Facebook makes to its APIs every year. Typically there is an update every few months that whoever maintains the GTM container would need to work with. With the other integration options this is included in the subscription fee. Yes, sGTM is flexible and will allow you to send similar event data to other destinations - but that’s also something that Segment does at no additional cost. Server-side tracking for Shopify stores Littledata’s solution is to send comprehensive event data from Shopify to Segment, and include event properties that are compatible with Segment’s Facebook CAPI destination. The setup is as easy as: Create a workspace on Segment.com Install Littledata’s Shopify app for Segment Configure Segment’s Facebook destination What this brings you - in addition to the purchase event sent from Shopify’s integration - is complete server-side tracking of Add to Cart and Checkout Step events to Facebook, all linked back to the users on Facebook. These extra events can be used to target users who abandon cart or checkout. You can use Segment’s Facebook audience sync to build even more powerful retargeting audiences - e.g. a lookalike audience of your most valuable customers. Things to note on custom user information Sending the Facebook events direct from server to server allows Littledata to add a number of customer user identifiers, so Facebook can better match the event to which Ad was clicked on. User properties that are automatically mapped to Facebook include: Email Phone number City state ZIP Country Client IP address Click ID (fbc) Browser ID (fbp) You can control which properties are passed on to Facebook in Segment Protocols, so better manage customer privacy choices. Conclusion If Facebook Ads is an important part of your store’s marketing strategy then Facebook CAPI is an essential tool to start using. The trends that make it more reliable that Facebook Pixel are ongoing, so if you don’t think you need it now you may well need it in a few months time. Your options to integrate Facebook on a Shopify store include Shopify’s in-built Facebook channel and server-side GTM, but we recommend using Littledata’s Shopify source plus Segment’s Facebook destination for quick setup and easy maintenance. Then you can get: More accurate attribution of Ads Better retargeting for abandoned carts Better audience matching in Facebook. Give it a try and see what better results you can achieve!

2021-10-07

Segment Q2 Updates

Shopify to Segment is one of our most popular connections, so we're always making improvements that give users the capabilities they need to optimize revenue. This update adds key tracking tools that give stores greater insight into customer checkout behavior, Facebook marketing attribution, recurring billing, and more. Supporting subscriptions in the checkout Littledata’s Shopify source is now fully compatible with most common subscription billing apps using Shopify’s checkout. Our app captures all recurring orders — linking them back to the user who first purchased if possible — and tags the events to differentiate between one-time purchases, first-time subscription orders and recurring orders. You can now use Littledata to send event data from subscription apps in the Shopify checkout, including: ReChargeBoldOrdergrooveSmartrr If you are using ReCharge you can take advantage of the subscription lifecycle event tracking as well. Learn more about the subscription lifecycle events we push to Segment for churn analysis, including Subscription Created, Subscription Updated, Subscription Cancelled and Payment Method Updated. Facebook Conversions API destination Segment’s cloud-mode Facebook destination is now out of beta, and becoming increasingly popular with marketers looking to more accurately target their Facebook Ads in the face of increasing browser limitations. Next month Littledata will be adding all the extra event parameters needed for Facebook CAPI, so please contact us if you’d like to join the private beta. Opting out of client-side events We understand some of our customers want to instrument their own event tracking (maybe using Littledata’s Google Tag Manager data layer), but retain the server-side events from Shopify. In this case, Littledata’s tracking script is still needed on the Shopify storefront to initialise Segment AnalyticsJS library and capture the anonymous ID for server-side events. But, you can add disableClientSideEvents: true or disablePageviews: true in a manual settings update. GDPR cookie compliance If your store is using a Shopify-compatible cookie banner (or using a consent management platform like OneTrust or TrustArc), the Littledata’s tracker can respect your users’ choices by switching just one setting. For OneTrust we also push the user consent choices as a user trait, so you can control which personas are shared with other platforms. Simpler accepts_marketing flag User traits for all events where the user is known now contain a simple true/false accepts_marketing field — useful in CRM destinations for email marketing. This is in addition to the marketing_opt_in_level field, which can give more detail on whether this was a single or double opt-in for marketing. How to get Littledata's Shopify source for Segment If you aren't yet a Littledata user, you can start a free trial directly from the Shopify app store. If you already have a Littledata account, you can activate the Shopify-to-Segment connection directly in the Littledata app. On Shopify Plus? Learn more about Littledata Plus.

2021-07-23

How to add Google Analytics to Shopify

Google Analytics is the world’s most popular marketing analytics platform, used by 98% of online stores. Shopify is the world’s most popular ecommerce platform, used by over two million active merchants. But these two popular platforms don't work together automatically. We’ll show you how to get Shopify to work with Google Analytics, and some of the common problems and solutions when adding Google Analytics to Shopify. Read on to learn step by step how you can add Google Analytics to Shopify, or jump to the section that answers your question in the guide below. 1. What are the options for adding Google Analytics to Shopify?2. The First Step: Creating a Google Analytics property for Shopify3. Option 1: Shopify’s in-built tracker4. Option 2: Using Littledata5. Option 3: Adding GA tags within Google Tag Manager (via GTM)6. Handling refunds and recurring orders7. Top seven things to check after adding Google Analytics Why add Google Analytics to Shopify? With the advent of Shopify Analytics, some of our customers ask why they need Google Analytics (GA) at all. Yet, GA has continued to be the most popular choice for web analytics since launching in 2007. [tip]Download our free ebook to learn why Shopify Analytics data doesn’t match Google Analytics[/tip] Shopify Analytics can answer some questions about products and revenue on your store. But, there are many important questions Google Analytics is better at answering. Things like: How your orders correspond to multiple marketing touchpoints Who your web visitors are, segmented by location, demographics, and page interactions Which shopping behaviors and ecommerce funnels drive revenue (with more detail than Shopify Analytics) How to sync audiences or conversion data with Google Ads to improve ad targeting How your Shopify store’s performance compares with previous years on another ecommerce platform To get all that juicy extra reporting, you will need to first add Google Analytics Enhanced Ecommerce tracking to your store. What is Enhanced Ecommerce tracking? If you want to track your customers in Google Analytics, you don’t just need to track the page views—which is easy. You also need to see key parts of the buyer’s journey, especially the purchase itself (with the order value). Google calls this Enhanced Ecommerce tracking: measuring the full customer journey—and what products got to which stage of the journey—from the product listing page, through adding to cart, all the way to checkout and purchase. This type of ecommerce tracking is a bit harder to set up. You need data about your product variants, SKUs, prices, and quantities available to send to Google. Enhanced Ecommerce is Google’s best solution for ecommerce analytics. It gives you a way to analyze not just the campaigns that led to pageviews, but how users interacted with products and payments. What are the options for adding Google Analytics to Shopify? For Universal Analytics Universal Analytics (UA) was the default for GA prior to 2020. You can tell if your store has Universal Analytics already because your web property ID will start `UA-` and then a string of numbers. To connect Shopify to Universal Analytics, your options are: Using the built-in tracking in Shopify’s store preferences Using Littledata’s advanced Shopify to Google Analytics app (which we’ll explain more later) Adding GA tags within Google Tag Manager (via GTM)—which is possible in combination with option 1 Pasting the gtag snippet directly into your store layout (not our recommended option as it makes maintenance of the tracking hard) Adding Google Analytics 4 Since October 2020, GA4 has been the default when setting up any new Google Analytics properties. GA4 brings a number of advantages, including faster, smarter reports, but unfortunately GA4 is not yet supported by Shopify—so using their built-in tracking is not possible. Note: There is still a way to create a new Universal Analytics property (see below) so you can choose any option above. What is the best way to add Google Analytics to Shopify? The method you choose for adding Google analytics to Shopify depends on your need for data completeness and accuracy as well as how much time you have to configure the setup. Achieving a good GTM implementation can take many days of experimentation. Even then, it can be liable to break when making edits to your theme.   Time to set up Completeness of data Who maintains it Shopify in-built tracking MINUTES LOW - * Littledata’s app MINUTES HIGH LITTLEDATA Via GTM DAYS MEDIUM YOU * We haven’t seen any updates to Shopify’s GA tracking since they launched enhanced ecommerce reports back in 2016 The First Step: Creating a Google Analytics property for Shopify Whichever route you take, you’ll need to set up the web property in Google Analytics to receive the data. To do this, follow each step listed below: Under the admin settings (cog in the bottom left), click on the blue +CREATE PROPERTY button. If you don’t see the button, you need someone with edit permissions on the account to set this up for you Add a name for the property, and set the currency and timezone to match the currency and timezone in your Shopify store. This will ensure daily revenue and metrics closely match Shopify’s Click on the Show advanced options link and then toggle the switch on the right to Create a Universal Analytics property Then enter a website URL and opt to create a GA4 property as well if you need it Next, complete GA’s simple survey Once complete, Google will take you to the GA4 property first. So navigate back to the admin page, and find Property … Tracking Info … Tracking code Now you can copy the tracking ID starting with “UA-” Now that you have your GA property set up to receive data, it’s time to add Google Analytics to your Shopify store. Option 1: Shopify’s in-built tracker If you want to use Shopify admin to set up the tracking, you can paste that tracking ID straight in by following these steps: From Admin, go to Sales Channels .. Online Store … Preferences Paste in the tracking ID to Google Analytics account section and SAVE Note: You can ignore the "latest version" of Google Analytics. They mean Universal Analytics… see what I mean about it not being maintained? Option 2: Using Littledata You can follow Littledata's Getting Started guide to add Google Analytics to your Shopify store in a few minutes.  Without any extra effort on your part, Littledata gives you much more complete data in GA and weekly updates to your tracking as Google and Shopify launch new features. If you want to also send data to GA4, then simply reach out to Littledata’s support team after installing. [tip]See how Littledata's Google Analytics connection helps you fix your tracking while integrating with your other Shopify apps.[/tip] Option 3: Adding GA tags within Google Tag Manager (via GTM) If you prefer total control of how you add Google Analytics to Shopify, then using GTM could be the best option. Set up a new web container in GTM Copy the GTM container code to use in your store EITHER… Add the GTM container snippet to the theme.liquid file, just before the closing </head> tag. This will include the container in all pages except for the checkout and order confirmation page. (Note: Shopify Plus stores can also add the snippet to the checkout.liquid file to add to the checkout page) OR... use the box for ‘Additional Javascript’ to add it to all pages, including the order confirmation page (though this is being phased out for new stores). You need to leave out the starting <script> and ending </script> tags as this box is for Javascript, not HTML Create a new Google Analytics settings variable and paste in your Google Analytics tracking ID from above Enable Enhanced Ecommerce tracking for that variable Create a trigger for when the page DOM loads. This is considered a more reliable measure of the user ‘viewing’ a page than just firing it when GTM first loads Create a pageview tag using those settings and a trigger Tracking the “thank you page” with GTM The “thank you page” (or order completed page) is most critical to track; not just the pageview but the purchase value itself. First, you have to add the GTM container. In Shopify store preferences, if you still see the Additional Javascript box you can add the container code there. If not, you can also add the container in the Additional Scripts section of the checkout page. From your Shopify admin, go to Settings > Checkout Under Order processing, go to the Additional scripts text box Paste in the GTM container To send ecommerce data such as the order value and product SKUs to Google Analytics as well, you need to build a data layer based on the Shopify Order object. That is out of scope for what this guide covers. For a valid enhanced ecommerce transaction event, you’ll need at least the following fields: Order ID Order value Product IDs (or SKUs) [tip]Did you know? Littledata's app provides a GTM data layer for the order object, and a ready-made variable template to use that data in GTM.[/tip] Handling refunds and recurring orders Some customer events (like refunds) happen without an accompanying page view and are impossible to track with GTM, as there is no browser trigger to hook into. The only way to send them to Google Analytics is with a server-side Google Analytics integration—which is how Littledata works. This is also true for subscriptions, where recurring orders are sent directly to Shopify’s servers and are not part of a web session. If you want to track the Customer Lifetime Value from a subscription, not just the first subscription order, then Littledata handles recurring orders too. Handling GDPR consent management One more topic to consider if you want to add Google Analytics to Shopify using GTM is how to respect customers opting out of tracking, as is their right under European GDPR legislation (Shopify and Littledata’s tracking handle GDPR cookie consent already). Google released some support for Consent Management this year, but there is no standard integration with Shopify’s customer privacy API. So, you would need to set up triggers for when customers have opted into cookies manually. Again, this is out of scope for this guide. Top seven things to check after adding Google Analytics to Shopify Whichever method you choose, here are my tips to make sure you get the most accurate tracking.  Do you have duplicate tracking? If you add more than one Google Analytics tracker (maybe one via Shopify admin and one via GTM), then you’ll see an artificially low bounce rate (usually below 5%), since every page view is sent twice to Google Analytics. Is Google Analytics added to every page? This can be hard to check, but you can run through a typical shopping journey and view the real-time pageviews in Google Analytics. The most common issue is with landing page builders (e.g. Gem Pages and Zipify) which don’t use the same Shopify layout. Are you using the same Currency and Timezone as Shopify? Check your currency and timezone settings in Shopify by going to “Settings” > “General”. For any view in Google Analytics, use these currency and timezone settings. We have seen several store owners worry their sales were inaccurate in Google Analytics compared to Shopify, when the problem was actually that sales were pushed differently between days due to the disparity in these settings. Are all your country stores tracked? If you have multiple country stores for your brand, then we recommend adding the same Google Analytics property ID to all your stores. You can then create segments in Google Analytics to look at customers in just one country/domain. Do you see revenue attributed to your top marketing campaigns? Accurate marketing attribution could be blocked by certain third-party checkouts or payment gateways. Go to Acquisition … All Traffic … Channels report in GA and check that all the top campaigns you would expect to be generating sales have sales recorded against them. Is your internal traffic skewing the reports in GA? Your web developers, content writers and marketers will be heavy users of your own site. You need to filter this traffic out from your Google Analytics data to get a view of genuine customers or prospects. Have you set up filtered views for reporting? So you can still test the data capture, we recommend you set up a “Raw data” view in GA without filters, then add filters (for spam, internal traffic, etc.) in a reporting view. How to get the most from connecting Google Analytics to Shopify Whichever method you choose to get the reporting in Google Analytics, remember that good analytics is not a one-time activity. Every time you make a change to your store layout, traffic acquisition, or checkout options, you need to think about how this will impact your data collection—and the ability to report on your website performance. For a maintained, robust tracking solution you can try out free trial of Littledata’s Google Analytics app. For even greater setup support, talk to us about account management on a Plus Plan.

2021-07-20

Is your Shopify cookie banner GDPR compliant?

A new set of privacy rules have transformed companies' online relationships with European clients. General Data Protection Regulation (GDPR) is here to stay, and whether you currently trade in Europe or plan to in the future, you need to make sure your website cookie usage complies with it. Fail, and your company could face some very big fines. How big, you ask? The penalties for getting GDPR compliance wrong are huge: the greater of €20M or 4% of your company's annual revenue. In one case, Vodafone Spain received €8M in fines in 2020 for violations relating to improper marketing data usage. The good news is that Littledata has you covered; GDPR compliance is as easy as installing our app. We'll show you exactly how Littledata helps you comply with GDPR and protects you from a major financial headache. But first, let's dive into the details of GDPR for ecommerce sites: how it works, what good and bad compliance look like, and how to check that your store is GDPR compliant. How does GDPR govern cookie usage? The European Union ePrivacy Directive (2009), together with GDPR (2018), make it compulsory to ask European internet users for informed consent before using cookies to store their personal data. In other words, a user needs to opt-in by clicking on a cookie banner or popup before a website can track their activity with analytics tools. This also gives the user the right to opt-out of their previous consent for cookie usage, and stop any tracking (known as revocable consent). How does GDPR cookie consent affect Google Analytics tracking? Each time a user triggers the Google Analytics script to load on your website, it adds a cookie (the _ga cookie) with an identifier to track the user across multiple pages and sessions. Next, it sends that cookie identifier to Google's servers, along with each page view and event. To be compliant with GDPR, you can't allow Google Analytics to add that cookie before the user has opted in. The problem here is that many online stores track users on Google Analytics before they consent to cookie usage. If they didn't, they could lose valuable marketing attribution by not tracking the user after they opt in. Littledata now has an easy way to get this right. How cookie banner consent should work Right now, the most common way to get informed consent from a user is to show them a cookie banner or popup explaining that your store uses cookies, then allow them to accept or reject being tracked. See this webinar for more discussion on the legality of different wording and displays you can use. Shopify's app store lists many such cookie banner apps, but just having the Accept Cookies button is not enough. Remember, you need to make sure that you do not track users before they opt in. To use the example given by Shopify's own banner app, when a visitor first lands on Kay Nine Supply's website they're shown a banner, and any tracking or setting of cookies has to wait. After the first page of the visit loads, the user has a choice: OK or No thanks. Users who click OK can be immediately tracked (even though it happens after the page load), and users that click No thanks must not be tracked. How Shopify's Customer Privacy API helps with cookie consent Shopify recognized stores had a problem trying to integrate with these myriad cookie consent apps. So, they created a Customer Privacy API where apps can share whether and when the user consented to be tracked. If you want to integrate Littledata's tracking with your cookie consent app, you need to make sure it's using this Customer Privacy API. That way when the user clicks to consent or not, their choice is shared first with Shopify, then with Littledata's tracking script. You will also need to change your store settings so that your store waits for the user to grant consent before tracking. Here's how to set that up: In your Shopify admin, click Online Store. Click Preferences > Customer privacy. Click Limit tracking for customers in Europe. How to configure Littledata to use the Customer Privacy API If you're already a Littledata customer, you can change to respectUserTrackingConsent in the LittledataLayer settings. We don't enable this by default due to the changes below. Our tracking script waits for the user to grant consent, then whenever that happens — on the first page or later — we send the tracking calls to either Google Analytics or Segment. The downside of GDPR cookie compliance for marketing attribution Complying with GDPR does come at a cost to marketing attribution, which is why Shopify and Littledata let you opt into this feature. For example, if your landing page contains UTM parameters in the link to track a campaign, and the user does not consent to tracking, then you will lose the source of the user's visit. If the user continues to checkout and purchase, Littledata's server-side tracking will record the sale without any link to the marketing campaign which brought them. In Google Analytics, these non-consenting users will appear in the "Direct" marketing channel (although in a future feature we are planning to clarify that they Opted Out). In reality, most users do consent for sites to track them, so this feature will limit but not remove all marketing attribution in Google Analytics or other tools. What more can your store do to comply with GDPR? Many of the cookie banners I've seen lack an option for the user to revoke consent or adjust their preference after the first page. I don't believe this has been tested in court, but some stores may want to go further and use a tool such as OneTrust PreferenceChoice to give users finer control over which cookies they want to allow and when. Littledata also integrates with OneTrust, making use of Shopify's Customer Privacy API. So, when the user consents to 'Cookies for performance' (category 2), we will start tracking on Google Analytics and stop when the user revokes consent. This requires the addition of another script. Here's an example of OneTrust setup with Age UK. When the user clicks "Accept all Cookies" Littledata's tracking starts. Then, if the user opts out of "Cookies for performance," the tracking stops. How does cookie consent relate to CCPA compliance? The California Consumer Protection Act (CCPA) does not require you to get cookie consent prior to tracking. CCPA does require stores to disclose what data they collect through cookies and what they do with the data (i.e. in your cookie policy) so users can opt out of their data being sold. Since there is no way you can sell personal data from Google Analytics, CCPA doesn't apply here. How can you check if your store is GDPR compliant? You'll need to be familiar with Chrome's developer tools to run these checks. Firstly, open your store landing page in an incognito window to make sure no cookies were previously stored. Next, leave the cookie banner or popup open and check that there is no _ga cookie... ...and that there is no network request to Google Analytics by searching for collect URL that Google uses: Then click to "accept cookies," but stay on the same page. You should now see: 1. The _ga cookie is present 2. A network request is sent to Google Analytics Didn't pass all these checks? Then you'll need Littledata's help to avoid those GDPR fines.

2021-06-18

Does Littledata work with Google Tag Manager (GTM)?

Google Tag Manager (GTM) is a popular solution for adding marketing tags to your ecommerce website. But, it can be complex and time-consuming to set up — not to mention the cost and hassle of ongoing maintenance. Using Littledata’s direct analytics connectors helps you avoid this hassle by replacing GTM tags on your Shopify store. We also provide a GTM data layer for reuse with less common marketing tags. For many ecommerce stores, including larger Shopify Plus brands on Littledata Plus plans, Littledata eliminates the need for custom GTM setup by automatically tracking common marketing channels and ecommerce checkout flows. The same is true for DTC subscription brands, as Littledata's tracking automatically integrates with subscription apps in the Shopify checkout such as Recharge, Smartrr and Ordergroove. To show you how Littledata can replace Google Tag Manager for your store, let's look at the situations where it replaces GTM and what you get from the tool itself. When will you not need Google Tag Manager? As more DTC brands move to streamlined ecommerce platforms such as Shopify and BigCommerce, they are looking for automated tracking solutions instead of custom tracking plans. Littledata’s connections easily replace GTM tags for: Google Analytics Google Ads Thanks to our robust, server-side tracking, you no longer need to maintain tagging for these data destinations. You can also forget worries about breaking the data layer and tags or tagging system when you change store themes. Plus, Littledata’s Shopify source for Segment can relay data to hundreds of additional destinations, replacing GTM for many use cases. For example, our recent updates include support for a broader range of data destinations, such as email marketing tools and CRMs. When will you still need Google Tag Manager? Any further marketing tags (e.g. Pinterest, TikTok, Twitter) will still need to be set up in Google Tag Manager. If you are on a Littledata Plus plan, we can help set up those tags to ensure accurate tracking for these additional marketing channels. We're working on rolling out better support for Facebook's Conversions API soon. This is essentially a server-side Facebook Ads connection, so we're excited about the possibilities. In the meantime, we have an out-of-the-box Facebook Pixel connector in the Pixel Perfect app. What Google Tag Manager triggers are available with Littledata? Littledata’s tracking script for Shopify stores adds lots of detailed events which you can use to build funnels or trigger other marketing tags in GTM. For this client-side tracking, we support all the standard ecommerce events except for add to cart (which is hard to track on the browser) and checkouts. [tip]From add-to-cart through the checkout, Littledata uses server-side tracking. Learn more about how this works for the Google Analytics and Segment destinations[/tip] So for GTM triggers, Littledata does support: Product list viewed Product list clicked Product detail viewed Thank you page Customer login We enable this additional event tracking because most marketing platforms need specific ecommerce data to enable retargeting ads, not just the page views. With Littledata, every time something triggers one of these events on your storefront, our script adds the associated product data to the GTM data layer like this: { "event": "view_item", "ecommerce": { "detail": { "products": [ { "id": "AD-01-white-5", "name": "ADIDAS | SUPERSTAR 80S", "price": "170.00", "brand": "ADIDAS", "category": "all", "variant": "5 / white", "list_name": "/products/adidas-superstar-80s", "handle": "adidas-superstar-80s", "shopify_product_id": "4169037742142", "shopify_variant_id": "30293803139134", "compare_at_price": "0.00", "image_url": "https://cdn.shopify.com/s/files/1/0197/3698/5662/products/44694ee386818f3276566210464cf341.jpg?v=1571736156", "list_position": 4 } ] } }, } This helps with both marketing analysis and retargeting, as you can drill down to product-level data. Advanced users can get even more specific with GTM variables. What Google Tag Manager variables are available with Littledata? Littledata’s tracking script fetches product and customer data from Shopify and makes it available in the GTM data layer events (or the window.dataLayer array). To take advantage of this data, you can use GTM variables. What is a GTM variable? Google defines GTM variables like this: A variable is a named placeholder for a value that will change, such as a product name, a price value, or a date. We make it easy to choose the right variable for your tag using our GTM variable template. Common variables such as product SKU, price, and category are available with all product events. You can view the full list of variables here. [subscribe] What's the best practice for using Google Tag Manager with Shopify? Google Tag Manager works by first building a single container of all the triggers, tags, and variables, then loading that container on every page. This makes it easy to maintain, but on the downside every extra tag you add to the container increases the first-time page load speed for every visitor. Container bloat also makes GTM hard to maintain, as making a change might impact a lot of other tags. To keep your GTM container small and lean, we recommend you: Reuse variables across different tags where possible Reduce the amount of custom JavaScript variables (having a consistent data layer helps) Regularly review GTM to remove unused tags (quarterly works for most of our clients) There are apps like Elevar which provide GTM templates for ecommerce sites that you may consider using. If you have different country stores with very different marketing tags required, you might also consider having a different GTM container for each store and reusing Littledata's GTM variable. Is using Google Tag Manager on your Shopify store secure? I've written before about how to prevent GTM being hacked, and the tips are still relevant today. In short, GTM can be a security vulnerability — especially when you let untrusted 3rd party tracking providers load their own script on your checkout pages. You can reduce the risk by having a developer review your GTM setup and being especially careful on checkout pages. What's next for Littledata's Google Tag Manager support? We regularly add new events and properties to better support tagging, so please contact us if you have suggestions. We are also looking at supporting server-side GTM (sGTM). Server-side tagging has the advantage of reducing the code loaded onto web pages (see best practices above) and handles customer data more securely. Littledata's servers already process sensitive customer data on our servers, so server-side GTM is a good fit with our philosophy of making tagging more robust and secure. In the meantime, I recommend you check out the Shopify to Segment connection, which provides these same server-side benefits without maintaining your own servers to host the tracking.

2021-06-15

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

Optimizing Littledata's Shopify tracking script for speed and accuracy

At Littledata we know that page load speeds are essential for ecommerce success, and we have made some major improvements to our Shopify apps this month to improve both page speed and data accuracy. Having benchmarked over 20,000 ecommerce sites, and worked closely with larger DTC brands on Littledata Plus plans, we are well aware that technical factors such as page load speed are major drivers of ecommerce conversion rates. We have always had a minimal, super-fast script and GTM data layer, but v9 brings this to a whole new level. [subscribe] What’s new in LittledataLayer v9? The need for speed is driving some of our customers to headless setups, but for many stores there are lots of optimizations to be had from their existing Shopify theme and apps. Littledata’s main advance in this area is our server-side tracking, which means that our app has zero impact on your add to cart, checkout or payment steps. So the changes in v9 are focused on the landing pages, product listing pages and product details pages. The latest update improves both page speed and the accuracy of the data we track Some of the major improvements in LittledataLayer v9 are: Tracking all product list impressions, on whatever pages they are displayedThe correct product variant is tracked, if the listing is for a specific variantProducts loaded after the initial page load (i.e. "lazy-loaded" products) will also be trackedListing pages of more than 50 products (e.g. infinite scroll pages) are tracked In addition we’ve improved how some types of checkout are tracked, to ensure the marketing attribution of the order is correct, for: Buy Now buttons leading to an accelerated checkout (e.g. Paypal, Google Pay)Headless stores leading to a Shopify checkoutCustom checkouts which do not reuse the same Shopify cart token See our help center for more details about how tracking product list views works as the user scrolls down the page. All these changes will be automatically added for current customers, unless you opt out and choose manual updates, in which case you will need to manually upgrade. Please contact your account manager if you are unsure which option to take. [note]Unless you opt for manual updates, we will now automatically update the snippet Littledata adds to your Shopify store[/note] How does v9 of the Littledata tracking script improve page load speed? To send accurate product list views, product list clicks and product detail views, our app builds a data layer containing all the products on the page. This is true for both our Segment app and our Google Analytics app in the Shopify app store. Building this data layer on Shopify’s servers took time before the page was ever seen by a user; in this improved version we get the product data after the user has interacted with the page. This results in almost no impact to page load speeds from adding Littledata’s app, as measured by PageSpeed Insights - improving the score from 62% to 70%. And yes, a score of 73 out of 100 is not very impressive...but for our test store we haven’t done all the good things you should be doing to optimize your store, like compression and lazy-loading of images. So whatever your page speed was before the improvements, it should be up to 10 percentage points higher now. Speed test So how did we make the latest snippet faster? To start, it’s no longer requiring the same liquid code. We can see the difference using Shopify’s speed profiler extension for Chrome. Before the changes Shopify is spending over 80ms (out of 155ms total) processing the LittledataLayer snippet - and this test store does not have a particularly complex list of products. After changing to v9, we see this has dropped to less than 1ms, because now all the product data is fetched asynchronously from Shopify’s APIs as the user interacts with the page. The good news is that this comes at no cost to data accuracy. Our script already tracked the product impressions after the page load - now we wait to get the product data until it is really needed. As a key part of the modern data stack for DTC brands, we are always investing in efficiency and accuracy at Littledata. Schedule a demo to learn more, and let us know if you have suggestions for further technical improvements! [subscribe]

2021-04-19

Try the top-rated Google Analytics app for Shopify stores

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