Created on 23 January, 2016 | Updated on 10 August, 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!

68 thoughts on “How To Add Google Ads Conversion Tracking to Shopify With Optional Enhanced Conversions”

  1. Hey,
    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!


  2. Hi Emanuel! Thanks for your great blog!

    Can we just use javascript variables from the Shopify object?


    Thanks =)

  3. 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. Hello Jon, thank you for your comment, you are right it does need to be the ISO code. I have updated the code. Thank you.

      However, I do not understand your question with regards to what is wrong with choosing website code. Do you mean the automatic method? There are multiple ways you can track enhanced conversions, I have chosen this method, to ensure the data can be submitted.

  4. 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. That isn’t easy to answer. Depending on how the original conversion action was created, you may or may not need to remove it to replace the existing installation. If you don’t know the answer, I recommend beginning a new conversion action. However, it is possible to use the existing one, but this can only work depending on how the action was created. Via an app or manually.

  5. 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.

  6. Hi,

    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 ?

  7. 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.

  8. 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?

    1. That is correct. If you are using the free shopping app, the automatically included code, can not be updated. However you can still add this code, and simply remove the automatically created conversion tracking in Google Ads.

    1. If you are replying to Craigs question, this is because the user asked how to remove the free shopping app tracking, without removing the app itself. As that was the question, you can not remove the automatically integrated tracking with the Shopify free shopping app. The only way to remove all the extra tracking is by removing the app itself.

    1. The possibility is that you have other conversion tracking codes installed. Make sure only one is tracking conversions. If you only have one conversion code and it’s tracking twice, it’s possible users are buying multiple times. Each sale, even with the same user, is counted as a unique sale. And make sure the code is correctly installed. If you continue to struggle, please email me at [email protected]

  9. 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. Hello Craig, thank you for your question. It can take a few days for Google to receive and check all data. You can test what data is on the thank you page by creating a test purchase. Then on the thank you page right-click save file. Now open your saved file in a browser and right-click view source and search for FeedArmy, here you should see all the values.

      You can not disable tracking in the free shopping app you are using. Instead, you will need to use a different app that only creates the feed.

  10. Hi,

    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?

      1. 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?

  11. 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?

  12. 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!

  13. 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!!!

    1. Emmanuel Flossie

      The global tag can be installed everywhere as this is also used for remarketing tracking. However the conversion code can only be installed in the checkout section as we don’t want to track page views, just conversions. Also do not use Tag Assistant this does not work. You need to visually look in the source code or if this is beyond your abilities, wait till Google verifies the code which is usually within 24 hours or when a conversion takes place. You can see if its verified in Google Ads > Tools > Conversion Tracking

  14. 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 %}

    1. 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.

  15. Hi,
    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?


    1. 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]

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


  17. Hi,
    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 ?

    1. 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 :

  18. Hey, and thank you for this.

    One question though,
    I did exactly as you said and pasted those codes into the Checkout Additional Code field. The thing is I’m not sure if it was done correctly, since I can’t see that on the Tag Assistant Chrome Extension (All I see is the Google Analytics).
    Perhaps I’ve done something wrong?

    I’m on the basic plan on Shopify if it matters…

    Thank you.

    1. If you are installing the new GTAG code, Tag Assistant does not support it yet, it only supports the old conversion tracking code. The best way is to check in the sourcecode if you want to see the values of the conversion. You can also confirm if the code works in Google Adwords, by going to conversions tab and view the tag activity.

      1. Thanks for the reply.
        I’m not sure how to check in the source code to be honest.
        When I go to the Conversion tab on Adwords, it says Unverified, and it’s been 12 hours.
        So I’m guessing it is not installed correctly?

        1. Have you had a sale in Shopify? If not, than the code can not trigger. If you want to test if it works, make a test sale. Also I recommend waiting at least 1 day. Conversion tracking only works when a person has visited the final checkout page.

          1. I didn’t have a sale.
            So, I found this app:
            But I’ll tell you the truth, it’s kind of scary to link my adwords account to some third partis. Who knows what they are doing with my information…

            So to cut things short, as long as I make everything just as the guide you wrote, I should be fine in term of conversion tracking? I did install the app, but it’s something I’d rather delete to be honest…

          2. Yes hundreds of people have installed it using my tutorial, and I install it personally for all my advertising clients. So I can confirm it is correct as long as you have followed the tutorial.

    2. Hi just place a test transaction and on the thank you page with the Tag Assistant Chrome Extension you will see the result show a conversion linked to your adwords account and than you know its properly installed:)

  19. This saved my day, I couldn’t figure if I should put both snippets in same place or if one should go somewhere else in my website!

    Thank you

    1. Login to Google Adwords > Conversion > and edit your conversion. Than go to value and choose the option : (The value of this conversion action may vary (for instance, by purchase price))
      Than save the code and you should see all the tags. If you continue to have issues, let me know.

      1. Hi can you help out with that, when you choose this option it says : You’ll need to edit your conversion tag to use transaction-specific values

        and thats where it becomes trikey

          1. Emmanual, your a Boss:)

            than you so much,
            like this it will show up my order# in adwords and will prevent duplicate transactions, let me know

Leave a Reply

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