Getting Started: Headless Shopify to Segment connection

This guide highlights the install steps for Littledata's Shopify to Segment connection on a headless Shopify store. 1. Add the by Littledata app by going to the Shopify app store listing and click Add app to begin the installation process:   2. Configure Segment. Log into your Segment workspace, and Connect Shopify (by Littledata):   3. You will need to add your Segment workshop write key. Follow this guide to find your write key, then enter it and hit NEXT: 4. Select the Manual route: 5. Tick the Select for headless Shopify store set up box, then click NEXT: 6. Then follow steps 2 to 5 from our headless demo guide: 7. Go to and select the SEGMENT tab at the top of the page: 8. First, add the Segment tag: 9. Add pre-checkout event tracking: 10. Then get the anonymous ID from the browser: 11. Lastly, send the anonymous ID in checkout customAttributes:   Your set up is now complete:  


Getting Started: Headless Shopify to Google Analytics connection

This guide highlights the install steps for Littledata's Shopify to Google Analytics connection on a headless Shopify store. Step 1. On your Shopify store page, select apps on the left-hand side. There you will see the Apps button. On the right-hand side, select Visit Shopify App Store. Step 2. Type in Littledata into the search bar. Step 3. Once you've typed it in click 'Add app'  to begin the installation process: Step 4. Install the app. [note] There is no login required. We use Shopify's store admin email to create the subscription. This allows you to log into Littledata directly from the Shopify store apps tab.[/note] Step 5. Select the Manual route: Step 6.  Tick the Select for headless Shopify store set up box, then click NEXT: Step 7. Then follow steps 2 to 5 from our headless demo guide: Step 8. Go to and select the Google Analytics tab at the top of the page: Step 9. Add the Google Analytics tag: Step 10. Add pre-checkout event tracking:   Step 11. Get the Client ID from browser: Step 12. Send that Client ID in checkout customAttributes : Your set up is now complete:


Shopify cart token API

POST This method requires two parameters: clientID : user identifier stored by Google Analytics cookie and accessed via the GA tracker object cartID : cart token generated by Shopify when an item is added to cart Littledata's Shopify script attempts to post this data on the cart page. This works for 95% of Shopify stores, but in custom themes where a user can buy straight from the landing page and checkout it is necessary to post the data to Littledata in callback - after the user has a cart token created but before the user is directed to checkout on another domain. The data is sent as a JSON object, with the HTTP header set to Content-Type: application/json.  Here is an example of how to POST JSON to the endpoint using JQuery, after the Shopify cart has been updated. [code language="javascript"]'/cart/update.js', { updates: { 123456: 1 } }, function(cart) { ga(function() { //wait for ga library var clientID = ga.getByName('littledata').get('clientId');'', { clientID : clientID, cartID : cart.token //returned from cart update }) }); // continue the redirect to checkout });[/code] This clientID - cartID pair must be sent for every user navigating to checkout, regardless of whether they pay during that session. A 200 HTTP response indicates the clientID and cartID have been accepted. After the checkout is completed, and Shopify processes the order, Littledata's server will then match the cartID when the one sent from Shopify's order web-hook - and so link the Google Analytics web session with the eventual payment.


How to get accurate Shopify data in Google Analytics (VIDEO)

If you're using Google Analytics to report on Shopify data, you need to watch this video. Ecommerce analytics were complicated, so we built a better way. Don't spend money on custom setups or expensive ETL configurations for your analytics. Just use this one automated tool.  Check out this quick demo of Littledata's popular Shopify to Google Analytics connection, available in the Shopify app store. Littledata is the easiest way to automate Google Analytics for your Shopify store. By connecting your Shopify store to Google Analytics, get: Smart audits to check for accurate tracking Seamless connections with apps like ReCharge and CartHook Benchmarks against thousands of ecommerce sites Easily extensible via Google Tag Manager (GTM) Own the data in Google Analytics And that's not all. We also add custom dimensions to track LTV and payment gateways like Klarna, Paypal and ShopPay. In the video above, see how the Littledata Shopify app for Google Analytics fixes tracking automatically. Fix your tracking Littledata works behind the scenes to fix your Shopify tracking and ensure accurate data. From marketing channels to checkout steps, Littledata's automated audit checklist gives you a clear picture of what to track and how to track it, and how each integration works. [note] Why doesn't Shopify match Google Analytics? Get the Shopify analytics ebook. [/note] Benchmark your Shopify site Say goodbye to guessing games and start benchmarking your site against top performers with Littledata's automated benchmark tool. Filter by industry, location, website size and more. We look at technical factors like server response time, as well as classic ecommerce benchmarks like conversion rates by device (mobile vs desktop). Check out the top Shopify benchmarks to get started. Automatic tracking for marketing and checkout apps Scalable tracking for Shopify and Shopify Plus Automated import of Facebook Ad Costs and Instagram Ad Costs Checkout flows like CartHook Subscription ecommerce apps like ReCharge and Bold Subscriptions  [note]Do you trust your Shopify tracking in GA? Here's a free guide to how you can[/note] If you're about to watch this video, chances are that you're still doing analytics by hand. Or you've tried other apps that were just connectors -- they didn't fix the tracking. Littledata works with popular reporting apps like Google Data Studio, Tableau and Power BI. Littledata's app for Shopify will give you an edge on the competition with accurate data across the entire customer life cycle. For ecommerce managers and developers With Littledata's smart script to fix your tracking, you can enjoy accurate data about marketing channels, product performance, transactions, revenue, shopper behavior and more! Check out our help center for documentation and free training on: Tracking the Shopify checkout funnel events The best GTM and Google Analytics data layer for Shopify How to use custom dimensions to calculate LTV We're here to help you make data-driven decisions based on accurate data. Let us keep up with the complications of webhooks, APIs and server-side tracking, so you can focus on scaling your business! Get started with a 30-day free trial for a full month of accurate Shopify data. [subscribe]

by Nico

The state of mobile ecommerce for Shopify stores (VIDEO)

Is mobile a better channel than your current data suggests? We recently caught up with Will from Underwaterpistol and Claudia from Klevu to chat about the state of mobile ecommerce. The average mobile conversion rate tends to be only 1-2% for Shopify stores. But that's just the beginning of the story. Optimizing for mobile is an ongoing process. There isn't just one solution. In addition to technical factors like page load speed (time to first paint, etc.), you have to consider the entire user journey and optimize the flow accordingly. This includes social presence, the details of browsing behavior (eg. on-site search, product list views), and checkout funnel tracking, which can be difficult to do manually for Shopify stores. That said, unless you get marketing attribution right in the first place, you might be beating a dead horse. [note]How do you compare? Check out our list of essential benchmarks for Shopify stores, including average order value (AOV) and bounce rate from mobile search.[/note] Multi-touch attribution models are useful, but it's important to fix basic tracking issues first (such as cross-domain tracking in the checkout flow), and even once you get that tracking set up correctly, it's essential to understand how users are behaving at each touchpoint, rather than just giving each touchpoint a certain percentage of credit for the conversion. This is especially true for Shopify stores and DTC brands where popular mobile channels such as Instagram and Pinterest are a strong draw. For example, if your best (highest LTV) customers are actually coming from Instagram Ads on mobile devices, and then purchasing on desktop once they get into your brand story on a deeper level, then maybe your mobile site should focus on visual brand stories with an email signup CTA, instead of discounts and cart abandonment campaigns aimed at direct ecommerce conversions. Thanks to Underwaterpistol (UWP) for putting together the video chat! UWP is one of our Shopify Plus agency partners at Littledata. Do you run a team of Shopify experts that would like to use Littledata to fix tracking for your clients? Learn more about our partner program.

by Ari

Join our virtual Shopify Meetup on July 15th

What are you doing on 15 July? Asking us Shopify questions, that's what! Join Littledata, CartHook and Electric Eye for a Shopify expert roundtable. This summer has seen virtual events galore for the Shopify world, and we really like the AMA (Ask Me Anything) format. So Littledata is excited to join our friends at CartHook and Electric Eye for a virtual Shopify meetup on July 15. It will be a Shopify expert roundtable with the option to submit questions in advance, and plenty of time to chat. At this meetup, the panel of Shopify experts—consisting of Jordan Gal of CartHook, Chase Clymer of Electric Eye and Honest Ecommerce, and our own Ari Messer—will answer questions asked by attendees. At the request of past Meetup attendees, the event will be held during the workday (so yes you can practically be paid to attend!). [tip]Have a question for the panel? Submit your questions online here.[/tip] Event details When: 1:30pm ET on 15 July 2020 Where: Zoom! Who: Ari Messer (Littledata) and Jordan Gal (CartHook), hosted by Chase Clymer (Electric Eye) Sponsored by Shopify and Klarna You can register for the event here About Shopify Meetups Shopify Meetups are hosted by Shopify Experts to share knowledge with the growing Shopify enthusiast community. This also includes those who work predominantly on Shopify Plus. The meetings are free and open to everyone. Education and value is the focus of these Meetups, with each event featuring speakers and offering networking opportunities. Attendees range from seasoned ecommerce experts to budding entrepreneurs. What to ask Really any Shopify questions are fair game. Actually, scratch that, anything about ecommerce in general is good too! Interested in ecommerce trends during COVID? We've got the data. Wondering how to choose the most important metrics for your store? Ask away. Looking for more technical details about how Shopify, CartHook and Littledata work (together or apart)? Now's your chance to dive in deep. How to register You can register for the event here. It's a free online event and anyone can register. See you then!

by Nico

The Shopify merchant's guide to reducing cart abandonment

For many Shopify stores, it's an all-too-familiar question: why do online shoppers decide last-minute not to buy a product? Whether you're on Shopify or Shopify Plus, shopping cart abandonment is a serious issue. But surprisingly the main reasons for visitors and even current customers abandoning their carts (ie not making it all the way through your checkout flow) are actually shared by many merchants. On the plus side, so are the ways to reduce cart abandonment! Cart abandonment is not a mystery. While not every reason a shopper abandons their cart is within your control, some things are in your hands. When your cart abandonment rate is high, there are active steps you can take toward minimizing it. [tip]Download the Shopify merchant's guide to reducing cart abandonment for free[/tip] Maybe you've spotted lower checkout completion rates on mobile, or maybe it's a cross-device issue. Maybe it's a significant issue for paid traffic, organic, or both. But first, let's explore cart abandonment from the ground up: What it is Why it matters Why it's a crucial metric, not a mystery What causes cart abandonment? While there’s no quick answer, carts get abandoned for a variety of reasons — although a lower abandonment rate tends to reveal a more intuitive customer experience and a more trustworthy store. Many shoppers may browse your store in hopes of finding a hidden discount, to compare prices, or to see how your product stacks up against similar products. Some shoppers might even be building a wishlist for the future, with no intention of purchasing right now. For this type of shopper, there’s not much you can do to compel a purchase. This means your focus should be on the shoppers who are willing to buy but haven’t, maybe due to a website element or step in the checkout process that sent them scurrying away. As part of the same cart abandonment study, the Baymard Institute conducted a survey of over 4,500 US adults asking why they abandoned their purchase after passing the add-to-cart stage: Many of the factors above can be countered by making tweaks to the checkout process. (We cover as many as possible in our free cart abandonment ebook.) For example, let’s take the second most prevalent response — the site wanted me to create an account. By offering a guest checkout option where an account is not necessary, this 28% group would be one step closer to a purchase, helping you avoid an abandoned cart. How can you improve your checkout experience? Industry lingo like “streamline the checkout process” is often thrown around, but what does this actually mean? What are the parts of your site that eliminate friction in the checkout process rather than causing it? More specifically, we’re referring to the step after a user adds a product to his or her cart. Optimizing add-to-cart rate is, in itself, a separate stage in the purchase funnel that we have discussed before. In any case, here are a few things to consider for a better checkout experience... [subscribe heading="Don't wait to reduce cart abandonment" background_color="green" button_text="Download our free guide" button_link=""]

by Nico

How it works: Shopify to Google Analytics

Littledata's Shopify to Google Analytics connection uses a combination of client-side (browser) and server-side tracking to ensure 100% accurate data about your Shopify store in Google Analytics. Littledata automatically integrates with Shopify and Shopify Plus sites to capture every customer touchpoint, including sales, marketing, customer and product performance data. Client-side (browser) tracking During the automatic installation process, Littledata applies adds a data layer and tracking script to all the store pages (the LittledataLayer snippet is included in theme.liquid). A LittledataLayer window-scope Javascript object is added on all pages, which you can also use with Google Tag Manager (GTM). A minified tracking script, hosted on a content delivery network (CDN), is loaded in the <head> of each page Google's gtag library is then loaded on each page Google's client ID (user identifier) is passed to our servers to ensure consistent user journey tracking Server-side tracking During the setup, Littledata also adds a set of webhooks to your Shopify store. This means that each time a user takes action we our servers can relay that event to Google Analytics, ensuring 100% accuracy. There are many advantages to this approach: Smaller script in the browser = faster page load No scripts are loaded on the sensitive and secure checkout pages Complete event capture for checkout flow, including sales and refunds/returns Avoids no tracking of the order when the user either doesn't wait for the thank you page to load Avoids double tracking of the order status page when the user reloads Accurate marketing attribution (sessions stitched together) across all checkout types [note]Using a headless Shopify setup? Follow the setup steps for headless Shopify tracking with Littledata.[/note] What can you track These are the events that Littledata sends from Shopify to Google Analytics. These events will show up as events under the Shopify (Littledata) event category and in Google Analytics' enhanced ecommerce reports. Read more details on the event properties in our Google Analytics data layer guide. Client-side events Client-side events tracked by Littledata, via a script loaded within your Shopify theme. Event Action Description (pageview) User has viewed a page view_item_list User has viewed a product collection page select_content User has clicked a product view_item User has viewed a product Product Image Click User has clicked a product image Social Share User has shared a product Server-side events Server-side events are tracked by Littledata server's from Shopify and passed onto any destination in cloud mode. Event Name Description add_to_cart User has added a product to the cart remove_from_cart User has removed a product from the cart Checkout User has viewed a step in the checkout Customer created User created as a customer Customer updated Customer information updated Transaction Customer has completed an order Refund Order has been refunded Subscription ecommerce events Additional events available via Littledata's ReCharge connection. Event Name Description Subscription Created Customer has created a subscription Subscription Updated Customer has updated a subscription Subscription Cancelled Customer has cancelled a subscription Order Processed Recurring order has been processed Charge Failed Failed to charge customer Charge Max Tries Reached Maximum tries to charge customer has been reached Payment Method Updated Customer has updated the payment method Customer Update Customer information updated   Custom dimensions With all the ecommerce events from the checkout onwards we sent extra user-scope custom dimensions to help you build audiences and analyze behavior. Custom dimension Description Lifetime Revenue Total of all previous purchases for that customer on Shopify Purchase Count Count of all previous purchases for that customer Last Transaction Date Date of customer's previous order Shopify Customer ID Customer ID as used on Shopify Payment Gateway The gateway used to process the last order's payment

Try the top-rated Google Analytics app for Shopify stores

Try the top-rated Google Analytics app for Shopify stores

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

Free Trial