If many of your orders from Shopify in Google Analytics are attributed to the Direct channel, or you are seeing strange clusters of events, there are a few steps of Littledata’s tracking that could be going wrong.
The add to cart, checkout steps, orders and ReCharge events are sent from Littledata’s servers in Clifton, New Jersey – so you will see sessions and conversions at that location if the link between the end users’ browser session and our server is broken.
If you’re using our Segment source, this problem will manifest itself as events coming from Boardman, Oregon – where Segment’s servers relay our events to Google Analytics.
In the following situations we have no way of linking orders to the preceding website visit:
- When the pages before a product was added to cart are not tracked (see below)
- When the order is from a source other than your own website, for example one processed on Amazon Marketplace. You can see this by adding the custom dimension `Payment gateway` to the sales reports
- When the order is recurring charge from a subscription which was set up before Littledata was installed
- When the user has blocked tracking, so no events are sent from the user’s browser
In these cases you will see in Google Analytics:
- The channel is Direct
- The landing page for the session is (not set)
- All dimensions set form the web browser (version, screen size etc) are (not set)
- In the User Explorer report, the anonymous ID is set as
default.littledatawith some long number
Issues to investigate
If you are using Littledata’s Chrome plugin you may get notified of one of the following issues.
All pages need Littledata’s snippet included in the Shopify theme – which populates the LittledataLayer with ecommerce data on that page. You can include that snippet manually or login to Littledata to update the snippet across your store.
LittledataLayer into the console to see if it is defined.
Outdated data layer version
If your store is not using the latest Littledata data layer, it may have been reverted when the Shopify theme was updated. You can update that snippet manually or login to Littledata to update the snippet across your store. The current version at the time of writing was
LittledataLayer to see the
Littledata tracking script not loading
Tip: Go to the Network tab of your developer tools and look for
segmentTracker in the network requests. It should return with a 200 response
Google Analytics cookie not added to cart attributes
Littledata’s script stores the client ID from Google Analytics’s cookie within the Shopify cart. If this is not set correctly, then the data collection will fail.
Tip: Request the current cart from Shopify and check that
attributes field contains
google-clientID as a long number
You can log the cart contents by using this jQuery code:
jQuery.getJSON('/cart').then(res => console.log(res))
Checks for ReCharge checkout
ReCharge stores need to check further steps.
Shopify domain not linking with ReCharge checkout
If the Google Analytics cookie on the ReCharge checkout domain is not the same as on the preceding Shopify store page, the user journey will be fragmented. Please check you have the Google Analytics integration activated for ReCharge, and check for any console errors on the ReCharge checkout.
Littledata integration not activated
Littledata needs permission to add this cookie tracking to the ReCharge order notes. Go to ReCharge integrations page to enable Littledata.