How it works: Shopify to Google Ads

Updated on 2024-07-24

Server-side tracking for Google Ads

Client-side (browser) tracking

During the automatic installation process, Littledata adds a data layer and tracking script to all the store pages.

  • A minified tracking script, loaded via Littledata's app embed in your Shopify theme
  • Google's gtag library is then loaded on each page
  • Fully compatible with Online Store 2.0

Client-side events

Event NameDescription
page_viewUser has viewed any page
view_itemUser has viewed an item on your website
view_item_listUser has seen a collection page on your website

Client-side events respect Shopify's consent mode so, if your store has a cookie banner, users can opt out of the tracking of these events.

All events are sent with your chosen Conversion Tag (e.g. AW-123). Conversion events include value and currency of the purchase, along with the Conversion Tag + Conversion Label (e.g. AW-123/label).

How to check client-side events are working

Google Ads does not offer a real-time view of events to check that your whole setup is working correctly, but for client-side events you can use Google Tag Assistant to check what events are being sent from your store to your Google destinations. By clicking to Add Domain, you can check how your data is being sent to Google.

Google Tag Assistant

Server-side tracking using enhanced conversions

note:

Enhanced Conversions tracking is now in public beta. This will add server-side tracking for Google Ads conversions.

Our Enhanced Conversions implementation uses server-side so that each time a user purchases on our servers can relay that event to Google Ads, ensuring 100% accuracy.

The client-side script fetches all the necessary information from the storefront and sends it to our servers where we enrich the conversion payload and send it to Google Ads.

There are many advantages to this approach:

  • Smaller script in the browser = faster page load
  • No scripts are loaded on the sensitive and secure checkout pages
  • Complete conversion tracking, even when the thank you page is not tracked
  • Avoids missed tracking or double tracking of the order status page
  • Accurate marketing attribution for Google Ads

Server-side events

Event nameDescription
PurchaseAn order has been completed on your Shopify store

What are Enhanced Conversions?

Enhanced Conversions is a feature of Google Ads that allows Littledata to send first-party customer data, securely and privately, directly to Google's servers to enable identification and attribution based on:

  • email address
  • customer name
  • shipping address
  • phone number

Enhanced Conversions improves the accuracy of your Google Ads measurement by increasing observable data and improving the overall quality of conversion modeling. Your first-party data from Shopify is matched with signed-in Google accounts that engage with your ads. When a match happens, a conversion is attributed based on that customer's interactions with Google Ads - rather than based on the Google cookie alone.

tip:

Advertisers who implement Enhanced Conversions see a conversion uplift of 17% on YouTube

Some of the other benefits of Enhanced Conversions are:

  • Recover conversions that otherwise wouldn’t have been measured
  • Better Ad attribution
  • Improve bidding optimization through better data
  • Privacy safe with hashing of first-party customer data

How to enable Enhanced Conversions

You will need to enable Enhanced Conversions for Leads and accept Customer data terms in your Google Ads account.

You can do this either in the Littledata installation process (where there is a step that will redirect you to the above-mentioned settings) or beforehand.

  1. Accept Customer data terms
  • In your Google Ads account, go to Goals > Conversions > Settings, expand Customer data terms, and accept.

After you're done it should look like this:

Accept Customer data terms

The terms may have previously been accepted in Google Ads.

note:

If you can't see Customer data terms, it is because the conversions are tracked by a manager account. The customer data terms need to be accepted by the manager's account and any Google Ads manager account that uploads on behalf of the manager account using cross-account tracking.

  1. Accept Enhanced conversions for leads
  • In your Google Ads account, go to Goals > Conversions > Settings > expand Enhanced conversions for leads, turn on and save
  • For Littledata's implementation, it does not matter which method (Google tag / Google Tag Manager) you select before saving.

After you're done it should look like this:

Accept Enhanced conversions for leads

  1. Creating a conversion action in Google Ads

A conversion action is created automatically by Littledata during the setup process.

The name of the conversion action will be Purchase - Littledata so you can easily identify and measure the performance of our integration.

You can see your conversion action by going to Goals > Summary

conversion action in Google ads

The Inactive status means that the conversion action is not currently being tracked or used for optimization in your campaigns.

After the conversion action starts receiving data, the Inactive status should disappear while the conversion value and the number of conversions should increase.

Why Enhanced Conversions for Leads instead of Web?

Google's documentation states that

  • Enhanced conversions for web are relevant for advertisers who want to track sales and events that happen on a website.
  • Enhanced conversions for leads are relevant for advertisers who want to track sales that happen off a website (for example, phone or email) from website leads.

It may seem counterintuitive that Shopify stores would track lead conversions.

However, where the gclid (Google cookie ID) is missing, Google will reject the evens if the implementation uses Enhanced Conversions for web. Google will process events that don't contain gclid when Enhanced conversions for leads is used, so this is the safer option to ensure even conversions without a known gclid will be processed.

Matching first-party user data

The server-side event payload contains SHA256 hashed (which is the industry standard for one-way hashing) customer data:

  • email address
  • first name
  • last name
  • address

And data that can be sent unhashed:

  • city
  • country
  • postal code

Google will try to match this first-party data with Google accounts.

Email and phone matching

  • Google keeps track of the email addresses and phone numbers for Google accounts and the corresponding hashed strings for those email addresses or phone numbers
  • If there's a match with the hashed strings we send, Google associates the account with the data.

Mailing address matching

  • Google joins hashed name and mailing address data for Google accounts to construct a matching key.
  • Google will construct a similar key based on the data we send, and If there's a match Google associates the account with the matching key.