If you're using Universal Analytics, from before 2021, you need How It Works for Universal Analytics
Littledata's Shopify to Google Analytics 4 connection uses a combination of client-side (browser) and server-side tracking to ensure 100% accurate data about your Shopify store in Google Analytics 4. Littledata automatically integrates with Shopify and Shopify Plus sites to capture every customer touchpoint, including sales, marketing, customer and product performance data.
During the automatic installation process, Littledata adds a data layer and tracking script to all the store pages (the LittledataLayer snippet is included in theme.liquid
).
LittledataLayer
window-scope Javascript object is added on all pages, which you can also use with Google Tag Manager (GTM).<head>
of each pageDuring the setup, Littledata also adds a set of webhooks to your Shopify store. This means that each time a user takes action our servers can relay that event to Google Analytics 4, ensuring 100% accuracy. There are many advantages to this approach:
Complete tracking schema alongside parameter details can be found HERE
Client-side events tracked by Littledata, via a script loaded within your Shopify theme.
Event Name | Description |
---|---|
page_view | User has viewed a page |
view_item_list | User has viewed a product link as they scroll down the page |
select_content | User has clicked a product within a product list |
view_item | User has viewed a product |
click | User has clicked a product image |
share | User has shared a product |
Server-side events are tracked by Littledata server's from Shopify and passed onto any destination in cloud mode.
Event | Description |
---|---|
add_to_cart | User has added a product to the cart, and left it in the cart for more than 10 seconds |
remove_from_cart | User has removed a product from the cart |
begin_checkout | User has started the checkout |
add_shipping_info | User has completed checkout step 1 |
add_payment_info | User has completed checkout step 2 |
purchase | Customer has completed an web order (excluding iOS, Android, POS and draft orders). The transaction ID is by default the Shopify order name |
refund | Web order has been refunded |
Transaction events may be delayed by 40 seconds to include any updates to order tags or status made by other apps after the order was created
With all the ecommerce events from the checkout onwards we sent extra user properties to help you build audiences and analyze behavior. You will need to create user-scope custom dimensions to use these in reporting.
User property | Description |
---|---|
lifetime_revenue_littledata | Total of current and all previous purchases for that customer on Shopify |
purchase_count_littledata | Count of current and all previous purchases for that customer |
last_transaction_date_littledata | Date of customer's last / current order |
shopify_customer_id_littledata | Customer ID as used on Shopify |
payment_gateway_littledata | The gateway used to process the last order's payment |
littledata_client_id | Client ID: the cookie identifier Google uses to group events by user |
For example, Google Ads can be targeted at new customers only by creating an audience where purchase_count_littledata
is 1.
Littledata also provides support for customers who rely on Amazon Marketplace as a sales channel. Amazon is processing the order themselves instead of directing the user to the Shopify checkout and this can create issues with reconciling the transactions and tracking. A recent update brings more clarity when analyzing transaction sources and will help avoid confusion.