Attribution Digital Marketing eCommerce Google Ads Shopify

Optimize Shopify’s Google Ads Conversion Tracking

Important tweaks to Shopify’s default Google Ads conversion tracking to tighten up attribution and reduce wasted ad spend

Here are some essential changes to make to your Google Ads conversion tracking after you connect Shopify’s Google Shopping Channel.

Install the Google Shopping Channel

This guide assumes that you have the Google Shopping Channel installed on your Shopify store. If this is not the case, then:

  1. Install the Google Shopping Channel
  2. Connect your Google Account (must be an account that has access to both Google Merchant Center and Google Ads)
  3. Connect your Google Ads Account in the “Smart Shopping campaign” section

Remove Old Conversion Tracking Code

By connecting Shopify to Google Ads via the Google Shopping Channel, Shopify will begin sending conversion data to your Google Ads account. If you were already tracking conversions in Google Ads, then you need to make sure you are not duplicating your conversion data:

  • If you previously had a Google Ads conversion tracking script installed in your checkout, then remove that code.
  • If you were importing conversions from Google Analytics, stop importing those conversions.

Fix Conversion Categories

Log into Google Ads and then Go to
Tools & Settings > Measurement > Conversions

You should see a bunch of new conversion actions created by Shopify. You will also see a warning that your conversion categories are out of date, and that you should update 4 of your conversions actions.

Click Update Now and update the settings to the following:

Conversion Windows and Attribution Models

Although Shopify created multiple conversion actions, you only need to worry about the Google Shopping App Purchase conversion event.

Click on the Google Shopping App Purchase conversion action and update the following settings:

Old ValueNew Value
CountEvery ConversionOne
View-through Conversion Window30 days1 day
Attribution ModelLast clickLinear

One Conversion per click

If you count “Every Conversion” you increases the risk of double attribution across your various channels.

For example: A user clicks on your Google ad and makes a purchase. It makes sense to count and attribute this conversion to Google Ads. If this same user later receives your newsletter, and purchases again, then you probably want to attribute that sale to the Newsletter and NOT to Google. Setting conversion count to “One” instead of “Every” ensures that only the first sale gets attributed to google, and not the second.

Counting “Every” conversion increases the risk of double attribution

Click-Through Conversions

Arguably, you should set your Click-Through Conversion window to 30 days. 90 days seems extremely long, and could increases your chances of double attribution across multiple sales channels.

However, if you are using Smart Campaigns or Smart Bidding, the bidding algorithm can only take into account conversions that have occurred within the specified conversion window. So theoretically, the longer your conversion window, the more data for Smart Bidding to optimize with. So the 90 day click-conversion window can probably stay.

View-Through Conversions

Set the View-Through Conversion window to only 1 day. A longer View-Through conversion window is dangerous, and will lead to over attributing sales to Display Remarketing, YouTube, and Smart Shopping. This will invariably cause you to overspend on those campaigns.

A View-Through conversion window greater than 1 day is dangerous, and will lead to over attributing sales to undeserving channels.

Which Attribution Model to use?

Linear, Time Decay, Position Based, or Data Driven are all better than First or Last click, as they allow you to attribute sales across a wider range of ad interactions, which allows you to spend more evenly across your entire funnel.

I personally usually choose Linear or Position Based, as I like pushing more attribution (and therefore spend) into the top part of the funnel.

Enhanced Conversion Tracking

This option is still in beta, and so you may or may not have access to this in your account. At the bottom of your Purchase conversion action, you should see a section called “Enhanced Conversions”

Expand this section and enter the following settings:

  • Turn on Enhanced Conversions
  • Enter your site URL (ideally your order receipt / thank you page)
  • Choose the Global Site Tag
  • Select “Enter Javascript or CSS Selectors” (note that all of the below are case sensitive. So the first “S” of Shopify needs to be capitalized, and the remaining characters need to be lower case)
  • Email: Javascript:
  • Phone: Javascript:
  • Name and Address: Javascript:
    • Shopify.checkout.billing_address.first_name
    • Shopify.checkout.billing_address.last_name
    • Shopify.checkout.billing_address.address1
    • Shopify.checkout.billing_address.province_code
    • Shopify.checkout.billing_address.country_code

Click Save

Further Reading

21 replies on “Optimize Shopify’s Google Ads Conversion Tracking”

Hi Alex, great article!

I’m also running Google Display alonsgide by Shopping ads. So if I have only “Google Shopping App Purchase” in my Conversion settings, will this pick up any sales that come from the Display campaign? I would have thought I would need the Google Analytics eCommerce goal ticked as a conversion too?



Hi Chris,
Yes, “Google Shopping App Purchase” will pickup all conversions from any Google Ads campaign type, including display. If you ALSO tick the Google Analytics goal, then you will be double counting conversions.


Thanks Alex. So someone seeing a Display ad > clicking straight to website (not via Shopping) > Purchasing, will get picked up by the “Google Shopping App Purchase” event?


Yes. When you install Shopify’s Google Shopping Channel, Shopify installs a bunch of conversion tracking code on your site. So although it’s called “Google Shopping Channel”, it’s actually what properly sets up your site with Google Ads. So anyone using Google Ads should probably install the Shopping sales channel even if they’re not planning on using Google Shopping.


Hi! Thanks a lot for this and every other article of your site – it has been an amazing help! Have one question regarding the conversion actions setting – do you select “yes” for the “Include in Conversions” column only for “Google Shopping App Purchase”, and “no” for every other conversion actions? As a e-commerce obviously we only want to use purchases to optimize our smart bidding, but I’m not sure if that is the way to go and want to make sure. Please let me know. Thanks


Hi Alex,

Thanks a lot for the informative article, it is very simple and easy to understand. However, I have the following queries:

1. The duplication will only happen once I add the AdWords account to my Google sales channel right? it won’t happen by just linking the adding the sales channel of syncing the products to GMC? I am not sure when should I remove the hardcoded tracking codes.

2. Do I have to remove the global site tag snippet that I have inserted in the theme.liquid file if I am linking Google Sales Channel?

3. I believe the Analytics ID that I have linked through Preferences, remains unchanged.

Your help will be highly appreciated


Hi Varun,

1. Although not 100% sure, I believe that YES, the conversion tracking only gets added once you connect Google Ads to the sales channel.
2. Having duplicate Global Site Tags seems to be fine. I would run Google Tag Assistant and see if you have duplicate tags, and then remove your tag if appropriate.
3. Correct. Nothing should change with your Google Analytics.


Hi Alex,
I have been struggling with setting up a dynamic remarketing campaign. I use the Google Channel App and Shopify states that no manual code should be implemented to ensure no duplicate data streams. However, if I want to set up dynamic remarketing via Google Ads, all information says to manually set up the conversion tags.

I stumbled upon this conflict, because I already tested the smart shopping campaign from the Shopify GChannel App side of things, but there was an issue which the Google Support diagnosed as “there is no code to track dynamic remarketing events, implement it manually”.

Do you have any suggestions?


Thanks for the quick response! I read your post, very helpful!
If Shopify updates the Google Channel App to implement dynamic remarketing, the code implementation might get pretty messy, right? Could I implement it via Google Tag Manager instead as well?


Thanks for the link — I posted a reply on the reddit:
Overall, I think the difference between “every” and “single” is minor. But I like to keep my attribution tight and conservative, and so I go with “single”. I usually operate with an “unlimited” budget philosophy, where I want to spend as much as possible as long as it’s profitable. If the attribution is too loose or too optimistic, then you risk wasted spend.


Hi Dylan,

In my experience and testing, View Through conversions are not a real-life indication of incremental sales on your site (in particular for campaigns containing remarketing audiences). They are simply taking credit for conversions that would have happened regardless, and are not causing any conversions. So they are misleading you to believe your campaigns are performing better than they are, which leads you to overspend. If it were possible, I would set the View Through conversion window to Zero.
For more information on some of the tests I’ve run:


Hi Alex, thanks for the great article, but I realized that Google Channel App will add a additional Global site tag (gtag.js) under trekkie.load( ) section from Shopify which can cause multiple global site tags issue on my website which can duplicate the tracking results for remarketing in google adwords. The only workouts I’ve found is to use this code to replace the value of the Google Gtag in trekkie.load( ) to make it useless. But this solution is not ideal and I’m not on Shopify pro plan so I can’t change the code for checkout page.
{% comment %}{{ content_for_header }}{% endcomment %}
{{ content_for_header | replace:’Google Gtag Pixel’, ” }}

Do you know any better way to disable the additional Global Site Tag added by Google Channel App? Thanks.


Hi Eric — unfortunately I don’t have a solution to this — I didn’t know about the multiple gtags. Although I would investigate further to 100% confirm that it’s the Google Channel that’s adding the gtag and not some other script (On my sites, Google Tag Manager is showing 2 gtags firing: one is the Shopify one, and the second is my own for dynamic remarketing)


Hey Alex, thanks for the reply. I’ve done a quick test by disconneting google ads account and uninstalling the Google Channel App, the gtag called “Google Gtag Pixel”:{“conversionId”:”AW- xxxxxxxxx” from shopify within trekkie.load( ) was disappeared after the uninstallation. So the gtag from Shopify is added by Google Channel App. Do you have problem to have 2 gtags firing on your website? I saw your latest dynamic remarketing code from this other page, do you think by changing this code: {% assign load_gtag = true %} to “false” and just use the gtag within trekkie.load section from shopify would be a solution? Thanks.


Actually, thinking about this more, it *DOES* make sense that the Google Channel would install another Gtag. It needs that to do it’s conversion tracking.

In all my scripts, I’m using assign load_gtag = true. I initially added that option because I was seeing multiple gtags as well. But setting this to false causes errors as the gtags arn’t being fired in the right order, or don’t exist at the correct time, etc…

For me, I’m NOT seeing any duplicate tracking…


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s