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