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

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

Thanks for the great article. is actually null in all of my tests (note we have a phone number as required on our checkout options). We actually found that Shopify, was the correct alternative. I’m not sure why your experience is different to our own? Perhaps Shopify has changed this recently?

That said, this was not the reason that brought me here. We actually have a current error on our enhanced conversions screen – “Missing user-provided data”. We’ve validated that all Javascript selectors are available on the target page by running in the console and conversions are coming in OK on our conversions screen, but we’re unable to verify the enhanced conversion data. When we check our checkout page – we don’t see any requests with the em param… will using javascript selectors trigger the use of this em param do you know? Are the same debug steps valid for javascript/css selectors?


OK thanks, if we sell a consumer product like face masks, I doubt people will search for more than a couple days. What do you think of these settings? Do I make it 90 days click-through to get more data to analyze?

Click-through conversion window 90 Days
Engaged-view conversion window 1 Day
View-through conversion window 1 Week
Attribution model – Data Driven

Also for a retail ecommerce site would you set anything on primary other then purchases? Would you set everything else to secondary? So they aren’t used to optimize bidding? Or would you choose add to cart and start checkout to primary. Currently I have only Purchases as primary.

Thanks for the advice it has been really helpful.


Click-Through Conversion window: I usually set it to 30 days, as I most frequently review my data and take actions on a 30 day time scale. Although 90 days does give you the opportunity to collect more data, you won’t see the extra data if you are looking back only 30 days. But this probably only matters if you are manually adjusting bids. If you are using a SmartBidding algorithm, then the algorithm will use the full 90 day look-back window when making decisions.

View-Through Conversion window: IMO View-through conversions are garbage and lead to attribution poaching, in particular for lower-funnel remarketing campaigns. I would set this to zero if I could (but I can’t).

Primary: I would stay with only Purchase as primary. I would consider setting add-to-cart / start checkout as secondary, but to be honest I don’t really know how secondary conversions are used exactly in the bidding algorithm. You definitely don’t want to set your add-to-carts as primary as the algorithm will treat them as revenue, and spend/bid against that unrealized revenue.

Glad I could help.



Any ideas on how to create a conversion action in google Ads for Organic Conversions so that Google Ads can optimize bidding for? If we don’t advertise on Google Ads we are unlikely to get organic Google Conversions. I thought maybe creating some action in google analytics and then syncing it back to google ads.


Actually, I believe the opposite is true: Google ads is stealing from your organic search, particularly for branded and other terms you rank #1 organically for. 95%+ of your branded searches would have converted anyway via direct or organic channels.

We ran a test in 2020 where we turned off all branded search for 3 days, and it was almost a 1:1 transition in GA from Paid search to Organic+Direct attribution.

It varies business to business, but generally my recommendation is to (1) separate branded from unbranded search when measuring performance and bidding; (2) Bid very little for branded search as its mostly a defensive play. All those conversations are not incremental.


One of the reasons I wanted to do this is if I don’t place ads I won’t get Google Organic Conversions or not as easily. I am guessing not all the listings in the shopping tab are charged for. If I stop Google Ads, organic ads through Google Shopping will cease.

My idea was getting Google to bid on the conversions from those organic Google Conversions to help improve performance.


Hi Alex,

Thanks for the great content. We recently connected Google Ads account to shopify. It automatically created new conversion actions as you mentioned. If we choose to disconnect Google Ads account from Shopify in the future, does shopify automatically delete/remove them? Or they stay active and continue to run. Asking this in case we dont want to create shopping campaigns using shopify marketing, instead use Google Ads only, but continue to optimize with Shopify-created conversion actions, and avoid losing previously collected data.

Second question is, shopify invites our google ads account to a new manager account. We are already connected to a manager account created by Google team. Do you think being connected to 2 manager account breaks something? I guess shopify sends this new manager account invitation to manage/create campaigns. Thanks

Liked by 1 person

Hi Ata,

1. If you disconnect Google Ads from Shopify you will stop receiving conversion data for those converstion events. Although the events will NOT be deleted, you will no longer receive data. Note that you don’t have to create a shopping campaign using Shopify — just connect Shopify + Google Ads and use the Shopify conversion actions.

2. Having two manager accounts will not break anything.



Hello Alex,

Thank you for the great article!

I have a question regarding Google Shopping app by Shopify conversion tracking and its values. Now I see that imported “Purchase” conversion action shows full product prices of both product variations in conversion “All conv. value” column. I want to see profit margin values of both products instead. Will I need to edit code on Shopify or I need to just add new values in Google Ads?



Hi Alex,

Thanks for the guide above, it’s exactly what I was looking for. I have had one issue though… I had Google Shopping Channel installed around a year ago but then uninstalled it, I decided to reinstall it and I’ve followed your instructions word for word. However, the tracking status for all the Google Shopping Channel actions on my Ads manager is “Tag Inactive”. Do you have any idea why this would be? The Google Shopping Channel on Shopify is connected to my Google Account, Ad Account and Merchant Centre correctly.

Any help would be much appreciated.




This has happened to me on occasion as well, and it’s tricky to fix. Try the following:
– Remove the Shopify Shopping channel
– Rename all the Shopify conversion events in Google Ads
– Remove all the renamed Shopify conversion events in Google Ads
– Reconnect the Shopify Shopping channel
– Check to see if new conversion events have been created. If yes, then you are probably good to go. If no, then you probably need to open a support ticket with Shopify.

Good luck!


I ran into this same issue. Spent 2 days troubleshooting. Turns out, after reaching out to Shopify support, they needed to trigger a regeneration of gtag/conversions. 5 minutes later, all good.

Liked by 1 person

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 )

Facebook photo

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

Connecting to %s