Tracking Google Ads Conversion Rate on Shopify

By 

Kelli Harris

 on May 25, 2022. 
Reviewed by 

Romi Hector

Person using laptop at a desk

Google Ads conversion tracking helps you track sales from your Google Ads campaigns for your Shopify store, providing useful data such as location, keywords used, time converted, devices, and more to optimize the conversion process. This article will show you how to set up Google Ads conversion tracking on Shopify.

Does Google Ads Automatically Track Conversions?

The short answer is no. Conversion trackers need to be activated using HTML code produced by Google Ads. This piece of code or, more specifically, a conversion tracking tag is added to your Shopify pages, and all data related to conversions such as purchases, phone calls, and newsletter subscriptions are sent back to your Google Analytics account. 

How to Set Up Google Ads Conversion Tracking on Shopify

Before using this step-by-step guide, you need to add google analytics to Shopify, have a Google Ads account, and run or plan on running ads through Google Ads. To set up Google Ads conversion tracking, you'll need to create a conversion action and install the global site tag. Once you've done that, you can add the event snippet.

Step 1: Create a Conversion Action in Google Ads

To track conversions in Google Ads, follow the instructions on how to create a conversion action.

Tracking purchases is the most prevalent type of conversion action. Set the category to "Purchase/Sale" and the value to "Use different numbers for each conversion" to track purchases and measure whether your ads generate sales on your online store.

When you're finished, click "Create and continue."

Step 2: Install the Global Site Tag

Once you've created a conversion action, you must include the global site tag in the code of your Shopify theme.

Follow these steps:

  1. Go to the "Set up the tag" step in Google Ads, and click "Install the tag yourself."
  2. In the "Global site tag" section, choose the option that applies. The generated code depends on whether you've installed a global site tag or not.
  3. Copy your global site tag.
  4. In a separate browser window, open your Shopify admin and select "Online Store."
  5. Click "Actions" > "Edit code."
  6. Open your theme.liquid file.
  7. If this is the first time you’ve installed a global site tag, then paste the copied global site tag between the <head> and </head> tags to add the tag to all pages in your store. If you’re changing a global site tag that you’ve already installed, then find the global site tag in your theme.liquid file and edit the code as suggested by Google Ads.
  8. Hit "Save."

Step 3: Install the Event Snippet

You must add the event snippet to your checkout page after installing the global site tag. The event snippet records a conversion whenever someone clicks on one of your adverts and subsequently proceeds to your online store's checkout page.

Follow these steps:

  1. Go back to "Tag setup" in Google Ads and go to the "Event snippet" section, then choose "Page load."
  2. Copy the event snippet code.
  3. In another browser window, open your Shopify admin and click "Settings" > "Checkout."
  4. Paste the event snippet in the "Additional scripts" text box. If there is already code in the text box, place the event snippet on a new line below it.
  5. Copy the global site tag used in the "Install the global site tag" step we ran you through earlier. Add this tag above the event snippet added in step 4.
  6. If a customer reloads the checkout page, then Google Ads might record a duplicate conversion. To prevent duplicate conversions, add tags before and after the event snippet so that it triggers once per customer:
  7. On the line before the snippet, paste {% if first_time_accessed %}.
  8. On the line after the snippet, paste {% endif %}.
  9. The default currency is set to USD. If you sell in a different currency, then replace USD in the event snippet with '{{ currency }}'.
  10. The default transaction ID is blank. To prevent Google Ads from recording duplicate conversions, next to "transaction_id": replace '' with '{{ order_number }}':



11. Hit "Save."

Can't find what you're looking for?