Set up Google Ads conversion tracking

Google Ads conversion tracking can track actions that a person took on your website after clicking on one of your ads. If you want to track these actions, then you need to add a conversion tracking tag to your store.

You can create conversion tracking for several different actions, depending on your goals. You can read more about how this feature works before getting started at Google's Help Center.

Many merchants use Google Ads to track one conversion event that represents their main goal, like sales, and use analytics to track multiple other conversion events.

Get a Google Ads conversion tracking tag


  1. Click Tools.
  2. Click Conversion.
  3. Under Website, click Select.
  4. In the Value section, select The value of this conversion may vary.
  5. In the Count section, select Every.
  6. In the Conversion windows section, select the time period that you want to track conversions for. 30 days is the default and recommended time period.
  7. Click Save and Continue.

Adding the Google Ads conversion tracking tag to your Shopify store

To track conversions, you need to add your conversion tracking tag to your store. You need to determine which Google Ads experience you're using at Google's Help Center. You will need to know which experience you are using to complete the setup correctly.

Add the tag using Google's previous Ads experience


  1. From the Shopify admin, click Settings.
  2. Click Checkout.
  3. Scroll down the page to the Order processing section.
  4. In the Additional scripts text box, paste your Google Ads tracking tag.
  5. Click Save.

Add the tag using Google's new Ads experience

Google has updated the process for installing the conversion tracking tag. To make use of the conversion tracking tag, you need to add a global event site tag to every page of your store. The global event tag and the conversion tracking tag work together to track your conversions.

Install the global site tag


  1. If this is the first time you are adding the global site tag to your store, then select I haven't installed the global site tag on my website under Global site tag.
  2. Copy all of the tag code.
  3. From the Shopify admin, click Online Store.
  4. Click Actions and then Edit code.
  5. Select the theme.liquid file, and paste the copied code in between the <head> and </head> tags. This will apply the tag to every page on your store.
  6. Click Save.

If this is not the first time you are adding the global site tag to your store, then you can find more information on the steps to update your tag on the Google Help Center.

Installing the conversion tracking tag

  1. From your Google Ads account, select which way to track conversions next to Event snippet.
  2. Copy the snippet.
  3. From the Shopify admin, click Settings.
  4. Click Checkout.
  5. Scroll down the page to the Order processing section.
  6. In the Additional scripts text box, paste your Google Ads tracking tag. If you already have a code snippet in the Additional scripts text box, then add the conversion tracking tag on a new line below the existing snippet.
  7. Click Save.

Complete documentation of the global site tag and conversion tracking tag for both Google Ads experiences can be found on the Google Help Center.

Manipulating your conversion tracking tag to provide live data

In the code snippet you just pasted, replace:

var google_conversion_value = 1;

With this code:

if ({{ subtotal_price }}) { var google_conversion_value = {{ subtotal_price | money_without_currency }}; }

If you prefer to include taxes and shipping in the conversion amount, use this instead of the code snippet above:

if ({{ total_price }}) { var google_conversion_value = {{ total_price | money_without_currency }}; }

We need to take care of the noscript tag as well, since customers might disable JavaScript in their browser when checking out.

Replace the following in the pixel tracking URL:



value={{ subtotal_price | money_without_currency }}

Or this:

value={{ total_price | money_without_currency }}

Troubleshooting conversion tracking

  • Why are some of my sales are not tracked?

Keep in mind that only sales that originated with someone clicking on your ad will be recorded.

Take note also that unless your order status page is visited after a transaction, the conversion tracking code just won't run. There will be no tracking if your customer is not returning to Shopify after a transaction has been completed using an offsite payment provider. This is hit and miss, and sadly, there's nothing we can do to help with that, other than suggest using a fully-integrated-with-Shopify payment provider in which case the order status page is always visited.

  • What are these values for?

google_conversion_id: A unique value that allows Google to identify the advertiser receiving the conversion.

google_conversion_value: A numeric value defined by the advertiser equaling the value of the conversion.

google_conversion_label: The type of conversion that occurred (purchase, sign-up, page view, or lead).

google_conversion_language: The language of the conversion tracking Google Site Stats text that appears on your website.

Shopify supports Google remarketing and dynamic remarketing. Remarketing helps you target ads to people who visited your store in the past. Dynamic remarketing targets ads to your store's visitors based on the specific products they viewed on your site.

To create either a remarketing or a dynamic remarketing campaign, you need to have both a Google Analytics account, as well as a Google Ads account. You also need to have both of these accounts linked together.

Set up remarketing

The majority of the setup for remarketing and dynamic remarketing is done through your Google Ads account. Read Google's setup guides for remarketing and dynamic remarketing.


  1. Sign in to Ads.
  2. Click Campaigns.
  3. Click Create your first campaign.
  4. Click the Shared Library option on the left hand sidebar.
  5. In the Audiences section, click View.
  6. Click the Set up remarketing button. You will then be given a block of code.
  7. Enter your email address to receive the code by email.
  8. When you receive the code, copy it.

  1. Find the theme you want to edit, and then click Actions > Edit code.

    1. Click theme.liquid to open it in the editor.
    2. Paste the code you received from Google on a blank line just above the </body> HTML tag:
      Bottom of theme.liquid template
    3. Click Save. If you use a Shopify theme other than Narrative, then you are done. If you use Narrative, then complete the next step.
    4. If you use the Narrative theme, then you need to add some CSS to prevent the Google remarketing code from affecting the formatting of your website:

      1. In the Assets folder, click theme.scss.liquid.
      2. At the bottom of the file, paste the following code:
       iframe[name="google_conversion_frame"] {
      1. Click Save.

Ready to start selling with Shopify?

Try it free