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 Littledata tracker uses script-tag, so no need to worry about theme changes).
LittledataLayer
window-scope Javascript object is added on all pages, which you can also use with Google Tag Manager (GTM).During 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
All the events below are tracked by default, but can be turned off and on during the setup or in the data pipeline settings.
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 |
view_cart | User has viewed the cart page |
view_search_results | User has viewed the product that he searched for |
sign_up | User has created an account on the store |
login | User has logged in an existing account |
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 a web order (excluding Point of Sale orders). The transaction ID is by default the Shopify order name |
refund | Web order has been refunded |
upsell | User has accepted a post-purchase upsell offer |
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
Littledata sends checkout steps to Google Analytics automatically, to ensure you can report on checkout conversions out of the box.
Littledata supports checkout funnel event tracking for:
Checkout journey starts when a user clicks the checkout button. Here is the structure of these events and how they work.
The custom event parameters listed in this table are sent with every event. The user-scope parameters are sent when the customer logged in (typically step 2 of the checkout onwards).
Most of these are automatically created as custom dimensions during the Google Analytics 4 connection setup. For example, Google Ads can be targeted at new customers only by creating an audience where the custom dimension purchase_count_ld
is 1.
Parameter | Description | Scope |
---|---|---|
user_id | Special parameter, used for user identity. Only available when user data is enabled | User |
lifetime_revenue_ld | Total of revenue from current and all previous purchases for that customer on Shopify | User |
purchase_count_ld | Count of current and all previous purchases for that customer | User |
last_transaction_date_ld | Date of customer's last order | User |
shopify_customer_id_ld | Customer ID as used on Shopify | User |
littledata_client_id | Client ID: the cookie identifier Google uses to group events by user | User |
affiliation | A coma-separated list of order tags. Untagged orders use Shopify | Event |
store_name | The name of the Shopify store generating the event. Useful when you have multiple country stores feeding into one GA property. | Event |
app_name_ld | The app name that generated the order (fallback on app ID). | Event |
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.