Created on 23 January, 2016 | Updated on 11 December, 2022

How To Add Google Ads Conversion Tracking to Shopify With Optional Enhanced Conversions

Easily add Google Ads conversion tracking to Shopify in less than 15 minutes.

Supported Functions

  • Automatically supports multi currencies.
  • Automatically converts European prices with commas to dots.
  • Optional choice for disabling tax and shipping in your checkout value.
  • Includes the new Google Ads enhanced conversion option


  • Access to Google Ads > Conversions
  • Access to Shopify > Settings

Step 1: Open Shopify Checkout Settings

Open a new tab in your browser and log in to your Shopify Admin Panel

Navigate to Settings (Gear Icon) and choose Checkout

Shopify Checkout

Step 2: Setup & Copy Your Google Ads Conversion Code

In a second browser tab, login to Google Ads and click on the tools and settings menu in the top right corner and select Conversions under the Measurement column.

Google Ads Conversion

Click on the big blue plus sign (New Conversion Action).

Now select website as your tracking template.

It will now ask you to scan your website URL. Enter your URL and click on scan.

Scroll to the bottom and choose to install the conversion action manually.

Then do the following :

  • Conversion name
    • enter any name
  • Category
    • Purchase / Sale
  • Value
    • Use different values for each conversion
  • Attribution model
    • Choose Position-Based (recommended for growth based businesses)
  • The rest can be as default

I have written a great article on how to choose your attribution model.

Click on Create and continue

Create your website conversion action

Now you can click on Save And Continue

Google Ads Continue Conversion Action

Click on See Event Tag

Google Ads See Event Tag

Copy your Event Snippet and save it in a temporary file, for later use.

Google Ads Copy Event Snippet

Click on Done

Google Ads Conversion Action Done

Click on the recently added conversion action

Google Ads Conversion Action

Enabling Enhanced Conversions is optional and not required. Some accounts may not see this option yet. So you can continue the steps below, excluding those related to enhanced conversions. (Skip to Step 3)

Check the box next to Turn on enhanced conversions and enter your website URL and click on Check URL.

By enabling enhanced conversions you allow Google to improve its accuracy to track conversions. This seems to be required due to Apple’s IOS14 no tracking prompt.

Turn On Enhanced Conversions

If you have multiple tags installed, you can choose which tag to use. I recommend selecting Global Tag

If you can not select Global site tag, make sure to install Google Ads Remarketing.

Then enter your domain URL again and append ?v1 this will force Google to recheck. If you add the same URL it will not recheck.

Google Ads Enhanced Conversions Choose Global Tag
  • Leave the Tag type alone.
  • Check the box next to Email and choose Javascript
  • Enter the following values
  • Email

Repeat the steps for Phone and Name and Address

  • Phone
    • enhanced_conversion_data.phone_number
  • First name
    • enhanced_conversion_data.first_name
  • Last name
    • enhanced_conversion_data.last_name
  • Street address
    • enhanced_conversion_data.home_address.street
  • City
  • State
    • enhanced_conversion_data.home_address.region
  • Country
  • Postal code
    • enhanced_conversion_data.home_address.postal_code
Google Ads Enhanced Conversion Tracking for Shopify Using Javascript

You might ask, why the javascript values? Well on your thank you page, the javascript selector for all the values is added as a javascript variable when using the conversion tracking code below (From V1.5). This will only work if you use the code below.

Step 3: Editing and Pasting Your Google Ads Conversion Tracking

Go back to Shopify and scroll down until you see Order Processing (from step 1), at the bottom of this section you will have a field where you can paste code that is labeled Additional Scripts.

Shopify Additional Scripts

Copy the send_to value (image below) and replace fa_send_to value with your value in the code template below.

  1. replace the value for fa_send_to
    • replace the value AW-123456789/abcdefghijlklmnopq with your event snippet send_to value
  2. Choose yes or no for fa_include_tax_and_shipping
    • choose yes if you want to include tax and shipping in the checkout value or no to not include tax and shipping values.

Sometimes on rare occasions, when you set fa_include_tax_and_shipping to no, it would still include the shipping. I’m not sure why this sometimes happens, but it might have to do with the account country. So if you notice shipping is included, set the value to yes, and it will remove shipping.

Code Template (change the fa_send_to value with your code snippet send_to value)

<!-- FEEDARMY START Global site tag (gtag.js) - Google Ads V1.8 -->
{% assign fa_send_to = 'AW-123456789/abcdefghijlklmnopq' %}
{% assign fa_include_tax_and_shipping = 'no' %}

{% comment %}DO NOT EDIT BELOW{% endcomment %}
{% if fa_google_coding %}{% assign fa_google_coding = true %}{%- else -%}{% assign fa_google_coding = false %}{%- endif -%}
{% if fa_include_tax_and_shipping == 'no' %}
{% assign fa_checkout_price = checkout.subtotal_price | divided_by: 100.0  %}
{%- else -%}
{% assign fa_checkout_price = checkout.total_price | divided_by: 100.0   %}
{%- endif -%}
{% assign fa_google_ids = fa_send_to | split: "/"  %}
{% if fa_google_coding == false %}
<script async src="{{fa_google_ids[0]}}"></script>
{%- endif -%}
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', '{{fa_google_ids[0]}}', {'allow_enhanced_conversions':true});
{% if first_time_accessed %}
  gtag('event', 'conversion', {
      'send_to': '{{ fa_send_to }}',
      'value': {{ fa_checkout_price }},
      'currency': '{{ currency }}',
      'transaction_id': '{{ order_number }}'
  var enhanced_conversion_data = {
  "first_name": "{{ billing_address.first_name }}",
  "last_name": "{{billing_address.last_name}}",
  "home_address": {
  "street": "{{billing_address.street}}",
  "region": "{{billing_address.province}}",
  "postal_code": "{{}}",
  "country": "{{billing_address.country_code}}"
  if("{{ }}"){ = "{{ }}";
  if("{{ }}"){
    enhanced_conversion_data.phone_number = "{{ }}";
{% endif %}
<!-- FEEDARMY END Global site tag (gtag.js) - Google Ads V1.8 -->

Verifying and Testing


You can verify if the code is working if you go to Google Ads > Tools and Settings > Conversions > here check if the status is verified.


First open up Tag Assistant when the new window opens up make a test payment to check if the conversion tracking is correctly installed. When you are on the final thank you page check the data within Tag Assistant.

first_time_accessed is for the page, not for the customer. Subsequent orders will run a first_time_access again for the same person if it is a new browser session.

Trouble Shooting Enhanced Conversions

Make sure you have waited at least 3 to 7 days. Google requires time to compile the data.


You may encounter issues with regard to coverage. This can happen when customers pay through a third-party payment processor (PayPal), which may require that they enter customer data on a different domain instead of directly on your website like they do when they do not use a third-party payment processor. 

Google Ads Enhanced Conversion By Tags

Match status:

If you are having issues with the match status, not all users fill out all the fields in your checkout. What you could do is remove the attributes in your Google Ads conversion list to only track emails or only track mandatory fields in your checkout.

By removing non-mandatory fields, you will avoid submitting empty fields to Google.

Google Ads Enhanced Conversions Match Status Issues

Enable Remarketing

Track your existing website visitors by installing remarketing for Shopify. A returning visitor is twice as likely to convert as a first-time visitor. Use this data for display remarketing ads and audience targeting.

Enable Micro Conversions

If you like to track more minor conversion actions ie, micro-conversions such as add to cart, view cart, add a delivery address. Then install Google Analytics Goals.

Support My Work!

My conversion tracking code is constantly updated and provided free for anyone to use. As I don’t ask for anything in return, I would be grateful if you consider leaving a review:

Change Log

  • V1.8 – 10 August 2022 – Added enhanced conversion checks for email and phone number
  • V1.7 – 07 June 2022 – Fixed incorrect total value when changing shipping and tax settings
  • V1.6 – 28 April 2022 – Fixed the country code not adding the value correctly as highlighted by Jon Yildiz
  • V1.5 – 27 July 2021 – Added Enhanced Conversions using Javascript and removed CSS
  • V1.4 – 21 July 2021 – Added Enhanced Conversions using CSS
  • Due to server migration, older changes are not listed

Need Help?
Do You have a question or need specialist support? Get in touch!

Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Oldest Most Voted
Inline Feedbacks
View all comments
3 months ago

Shouldn’t {{ checkout.currency.iso_code }} be used instead of {{ currency }}? I believe {{ currency }} outputs the symbol of the currency, but google wants the ISO code…

Reply to  Emmanuel Flossie
3 months ago

I think you misunderstood my original question. I was asking if the code should read as follows:

gtag(‘event’, ‘conversion’, {
‘send_to’: ‘{{ fa_send_to }}’,
‘value’: {{ fa_checkout_price }},
‘currency’: ‘{{ checkout.currency.iso_code }}’,
‘transaction_id’: ‘{{ order_number }}’

But after doing some testing myself, I see that {{ currency }} is correct (checkout.currency.iso_code does not output anything on the thank-you page), and even chatGPT got this one wrong (this will age well!). All resources I found indicate that checkout.currency.iso_code should be used, but as I said previously after testing it you are indeed correct.

Last edited 3 months ago by Jon
3 months ago

Hi. Thanks for the post. I don’t have an “additional scripts” form in my checkout -> order processing. Did this change recently when they added the post purchase form to checkouts?

4 months ago

Hi – have you got an update for this for G4 tracking? Many thanks, George

5 months ago

Hi, for UK market we get Issues detected with your enhanced conversion setup, I believe this is because they do not use a “State”, if we leave State blank in the Enhanced Conversions setup page we still get errors, is there another enhanced_conversion_data. that should be used?

Jonathan Reed
Jonathan Reed
5 months ago

awesome! It works. I have a question, I have two accounts, how to merge and paste their enhanced conversion codes? Or do I need to paste the code twice?

6 months ago

Hey, Emmanuel . Please help, I have left my comments in this question
We have doubling of events when debugging in Tag Manager – view_item, add_to_cart, begin_checkout, purchase. Everything doubles. Seems that in TagManager all these events are pushed to dataLayer. How can we turn off this doubling of conversions in Ads as we don’t need it.
There is no shopping app in Shopify, but Ads and Merchant Center are connected to Shopify. Appreciate your help.
Thank you

Reply to  Emmanuel Flossie
5 months ago

Hi Emmanuel! Thank you for your answer . I found this trekkie when inspecting the code so I suppose it is it who doubles my events. They are pushed with dataLayer with the conversion labels exactly the same as my Google Ads tag ‘AW-…’ Moreover the names of events are the same as reserved GA4 ecommerce events – view_item, add_to_cart , etc. But there is no GA4 configuration in GTM set up twice.
Also I found comment on December 3, 2020 at 5:51 am in this article I think it is Google Shopping app who creates them automatically and sends to Ads.

Odera Joseph
6 months ago

What the FFFF! It works. Love this!!!

10 months ago

I setup everything as you mentioned.
Google conversions says “Recording enhanced conversions” in the diagnostics tap.
But I can’t see any of the test purchase data with Tag Assistant!


10 months ago

Did it work for you?

11 months ago

Hi Emanuel! Thanks for your great blog!

Can we just use javascript variables from the Shopify object?


Thanks =)

Jon Yildiz
Jon Yildiz
1 year ago

Two things: The “country” variable you’re passing from the billing_address object passes the full name of the country, but Google expects the ISO country code, which is billing_address.country_code

Also, can I ask why we’re making changes to the code but then using the code to pass javascript variables? What’s wrong with choosing “website code” as the implementation method and just passing those in the “order page additional tracking” edit?

1 year ago

Hi, before install this Google Ads Enhanced Conversion Code, should I need to delete the original Google Ads Conversion code which be installed before? Is the Enhanced conversion code can replace the conversion code?

1 year ago

Hello Emmanuel

I dont have the option of enhanced option to check you know why ?

1 year ago

Is there a way to delete the tracking caused by the app in the first place?
as in I replaced the tracking with my own tracking and the feed from the app is no longer needed.

Gooner Fermat
Gooner Fermat
1 year ago


I set up following your guide and there are some problems:
1. There are 2 google site tag in my site (duplicated, I also add remarketing tag from your guide)
2. When I made a test payment and check via Tag Assistant:
– There is no enhanced code. It seemed not work
– There is a “purchase” event that I believe from Remarketing setup
– In “Conversion” event, the label did not come from our account
– There are more 6 google site tags in final checkout page (total 8 google site tags), it seemed duplication

Can you help resolve this problem ?

1 year ago

How to added enhanced conversion tracking for shopify rechargeapp?

1 year ago

little off topic Emmanuel, in the default shopify app is there anyway to exclude some variants of a product from syncing to merchant center? right now i am manually deleting that specific variants everyday from merchant center because app is auto uploading everyday.

Agata Matusz
1 year ago

I have Google Sales Channel App installed and hence all conversion tracking is installed automatically. Having read the comments and also having tried to implement the enhanced conversion, it seems that the enhanced conversion for Shopify (NOT Shopify Plus) can only be installed with the conversion tracking set up in a way this tutorial outlines – and not through Google Sales Channel App. Is this correct?

Derrest S Williams
1 year ago

Why would you get rid of the App? Just make conversion action sets and add it to AD Word Campaigns

Tejo Ramakanth Ravuri
1 year ago

Hi Emmanuel,
After implemtation of this script in Shopify additional scripts, few conversions are counted twice.

Craig Berger
Craig Berger
1 year ago

Thanks for the response Emmanuel! Much appreciated.

Craig Bergerg
1 year ago

Hello Emmanuel,

I am trying to used Enhanced Conversions and have completed the steps you listed in this article, and I am getting the below error message under Diagnostics of Enhanced conversion by tags.

“Your customer data setup has some issues. Make sure your customer data is formatted correctly.”

Would you know how to correct this?

I am currently using the Google Shopping Sales channel, and also wanted to know if there is anyway to disable or remove the automatic tracking code that the Sales channel uses and insert my own code for Google Ads tracking, while still keeping the product feed from the Google Shopping Sales Channel.

Thanks for your help!

1 year ago


I used this code and made a test order. When viewing the source I noted the value was “59999” not “599.99”, can you help resolve this?

Reply to  Emmanuel Flossie
1 year ago

I have an error in Enhanced conversion by tags. 1 out of 4 will show some error \”Your match status has some issues \” that is match status. All other three Current status, Coverage, Customer data validity are fine.
Can you please guide me on how I can solve this issue?

3 years ago

ok…so this is completely different from what Shopify says to do- and what we think was done by our developer. We had google analytics installed first. What if the GlobalTag snippet is already in the “theme.liquid. code? right under <head>do we add it again in the in the “order processing” field?

Sérgio Chaves
Sérgio Chaves
3 years ago

Hi Emmanuel, just to confirm This global site tag, defintly is not to put as i already put your remarkting in checkout right? also google tag assitance dont work to check convertion, and has to be inspecting the code is that? just to double check! keep blasting!

4 years ago

Hi Emmanuel, Thanks for this tutorial! I want to confirm we add the global tag and the snippet to the checkout page, but we don’t add any tags to the theme.liquid? I currently don’t have any global tag on my theme.liquid to test it. When I did have it, google tag assistant wouldn’t recognize it, with your tutorial I took it out and just added both tags to the checkout page. My store is not shopify plus. Thanks!!!

Amandeep Sandhu
Amandeep Sandhu
5 years ago

1) What was the purpose of writing “order.order_number” after transaction_ID? I saw a video that did it without that so i’m just curious what exactly it does.

2) I’ve heard that if someone refreshes the checkout page or clicks the back button to the checkout page, then it can cause another conversion to fire. Have you encountered this problem before? I saw in a video someone entered if statement (the 2 lines of code i pasted below), and all the other code you talk about in the instructions is entered in this if statement. I’m just wondering if you’ve had the issue of multiple conversions firing from a single purchase and if it’s worth entering the code below?

{% if_first_time_accessed %}

{% endif %}

Emmanuel Flossie
Reply to  Amandeep Sandhu
5 years ago

1) This is to avoid duplicate orders. It registers the order id to avoid the same order being registered more than once.
2) It fires the code, not another conversion as the order ID is already registered. If you check the tutorial I have added a second fail safe with if_first_time_accessed

Hope it helps.

Chris Sauthat
Chris Sauthat
5 years ago

Thanks Emmanuel for this tuto, but I do the same that you wrote, but when I test with Google assistant for see if the code is installedvery well , I have a message ‘some product are not valide’ and I have already synch with merchand center. I don’t know why.

Each tile to try to validate, I have still same error.

Could you help me please?


Emmanuel Flossie
Reply to  Chris Sauthat
5 years ago

You will need to make a test payment to check if the conversion tracking is correctly installed. When you are on the final thank you page of the checkout, use Tag Assistant to validate the code. You can not view the conversion tracking on any other page than the single final page in the checkout. Also you can not check with Merchant Center if the code works, conversion tracking has nothing to do with Google Merchant. I think you are confused with the remarketing code, which is something completely differently. Please go to the previous mentioned URL. As currently you are asking questions regarding conversion tracking. If you want personal assistance, please email me [email protected]

Chris Sauthat
Chris Sauthat
5 years ago

i would like also add conversion code for add to cart and remarketing, where i can put these code please on shopify?


Emmanuel Flossie
Reply to  Chris Sauthat
5 years ago

For conversion tracking, please follow the tutorial above, for remarketing please check here :

Stan Grzs
Stan Grzs
5 years ago

I’ve done your tutorial, thanks a lot, this is really helpful.
But i cannot see the global site tag on my website page.
Do you know how to add it on my entire website through shopify admin please ?

Emmanuel Flossie
Reply to  Stan Grzs
5 years ago

Conversion tracking is only installed on the final page after the payment is made, the code is not visible to the rest of the website. Otherwise it would trigger a conversion every time someone visits a random page. If you want to check the code, you need to make a test purchase and check the code in the final page of the checkout. If you want to install remarketing on every page, please visit this tutorial here :

Would love your thoughts, please comment.x