Littledata’s tracking script for Shopify stores adds lots of detailed events while you can use to build funnels or trigger other marketing tags in Google Tag Manager (GTM).

Our script uses the naming conventions set by Google for gtag.

Note:

Littledata’s script sends events to GA by default. If you wish to disable the pre-checkout GA events, and send them yourself via GTM you can remove the webPropertyID field in the Littledata layer.

Definitions

  • Littledata Layer: the field name in the ‘LittledataLayer’ window-scope variable which you can access as a JavaScript variable in GTM.
  • GTM event: the name of the event field pushed to the GTM dataLayer, which can be used for a custom trigger in GTM.
  • GTM variables: the other properties accessible at the time of this event as a user-defined Data Layer Variable in GTM.
  • GA category: the name of the Event Category which you can report on in Google Analytics
  • GA action: the name of the Event Action which you can report on in Google Analytics
  • GA label: the possible values of the Event Label in Google Analytics

All pages

Pageview

GTM event: pageview

GTM variables: page_title, page_location

GA: pageview (not an event)

Pageviews are only sent when the page is actually rendered for the user. So if the page is loaded in the background, on a hidden tab, or the user closes the browser tag before the page renders a pageview will not be triggered.

If a customer is logged in

GTM event: gtm.js

Littledata Layer: customer

					

{
  ...  
  customer: {
    id: '1234', // same as Shopify customer ID
    name: 'John Smith',
    email: 'john@smith.com',
    phone: '+442083508061'
  }
}

GA Event: None (GA cannot accept personal data)

Product listing page

Viewing a product in the list

GTM event: view_item_list

GTM variables: ecommerce.impressions (i.e. products),

GA category: engagement

GA action: view_item_list

View item events are only sent when more than 80% of the product image becomes visible on the user’s screen. So as the user scrolls down the page, events will be sent in batches containing the items in the row that becomes visible.

Clicking on a product in the list

GTM event: select_content

GTM variables: ecommerce.click.products

GA category: engagement

GA action: select_content

Not all click events will have time to trigger tags before the page redirects. We don’t take the risk of delaying redirects to wait for tags to fire.

Product details page

When product page loads

GTM event: view_item

GTM variables: ecommerce.details.products (a single product),

GA category: engagement

GA action: view_item

Clicks on product image

GTM event:

GA category: Product details page (Littledata)

GA action: Product image click

GA label: Name of the product image

Social share

GTM event: share_product

GA category: Product details page (Littledata)

GA action: Social share

GA label: Name of the social network

 

Add to cart and Checkout

Note: All events from add to cart onwards are tracked only server-side direct from Shopify. This ensures accuracy and speed for GA tracking, but means there is no GTM event on which to trigger your other tags. Sorry.

Add (and remove) from cart

GA category: ecommerce

GA action: add_to_cart or remove_from_cart

Note: In October 2019, we changed the order and naming convention of the Checkout steps event to better reflect Shopify’s checkout flow.

Checkout steps

GA category: Ecommerce

GA action: Checkout

GA label: Contact information or Shipping information or Payment method

GA value: Total price

Order completed (including recurring orders)

GA category: Ecommerce

GA action: Transaction

GA label: The Shopify order ID

GA value: Total price

And additionally for the same order, to track sales channel or checkout more easily:

GA category: Littledata Customer Data

GA action: The Shopify order ID

GA label: Sales channel name

Order refunded

GA category: Ecommerce

GA action: Refund

GA label: The Shopify order ID