This is a guide to how Littledata’s CartHook connection works with your Google Analytics setup. The connection works for any merchant using the Carthook checkout.

How it works

The marketing attribution of orders through CartHook frequently goes wrong with CartHook’s basic Google Analytics integration. The primary reason why that happens is when customers are referred to the CartHook checkout the original source of the customer is often lost.

Littledata has worked with CartHook to solve this problem by maintaining a unique Google Client ID for each customer through the whole journey from product viewed to checkout. The Google Client ID is then ultimately passed on to Google Analytics, where you can view and analyze a unified customer journey along with accurate attribution to the marketing source.

Tip: Our CartHook connection works with the CartHook checkout product. If you are using CartHook’s new Shopify app, CartHook Post Purchase Offers, with the Shopify checkout, this is tracked via our main Shopify to Google Analytics connection (you do not need to activate the CartHook connection).

What happens behind the scenes?

Littledata makes a server-side integration between Shopify and Google Analytics. Every time an order is processed on Shopify we link that revenue to the customer session on Google Analytics.

To link those two we add a script to the checkout pages to link the GA Client ID and CartHook checkout ID with the Shopify order for correct attribution. Upon authorizing Littledata with CartHook, we insert a tracking script within CartHook’s checkout pages which does the following:

  • Loads gtag.js with the customer’s reporting Google Analytics property ID;
  • Ensures cross-domain tracking between storefront and checkout;
  • Communicates to Littledata’s servers the GA Client ID and CartHook sessions ID;
  • Tracks events on the checkout and upsell pages.

Google Analytics events

Our script triggers the following events on CartHook’s pages, all with event category set as CartHook (Littledata).

Checkout steps

GA event action: Checkout

These events are consistent with the Shopify checkout funnel, and are triggered on:

  • Step 1 (Contact information): landing on CartHook checkout page
  • Step 2 (Shipping information): after completing email field
  • Step 3 (Payment method): after completing ZIP/postal field

Landing on upsell page

GA event action: View upsell offer

GA event label: product name

GTM trigger: Transaction step completed

GTM variables: orderId, value, items, tax, subtotal, shipping

Accepts upsell offer

GA event action: Accepted upsell offer

GA event label: product SKU or ID

Rejects upsell offer

GA event action: Rejected upsell offer

GA event label: product SKU or ID

Landing on downsell page

GA event action: View downsell offer

GA event label: product name

GTM trigger: Transaction step completed

GTM variables: orderId, value, items, tax, subtotal, shipping

Accepts downsell offer

GA event action: Accepted downsell offer

GA event label: product SKU or ID

Rejects downsell offer

GA event action: Rejected downsell offer

GA event label: product SKU or ID

Landing on thank you page

No event is sent here, as you can use the transaction event triggered by Shopify.

GTM trigger: Transaction completed

GTM variables: transactionId, transactionSubTotal, transactionTotal, transactionTax, transactionShipping, transactionProducts

GTM trigger: Transaction step completed (just for the last step)

GTM variables: chTransactionId, transactionStepSubTotal, transactionStepTotal, transactionStepTax, transactionStepShipping, transactionStepProducts, stepCharged,

 

Learn more

You can install the CartHook connection directly in the Littledata app, or from your CartHook admin.