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

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.

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

Now you can click on Save And Continue

Click on See Event Tag

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

Click on Done

Click on the recently added 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)
Now go to Tools and Settings > conversions > settings or click here: https://ads.google.com/aw/conversions/customersettings
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.
After you have checked the box and clicked on save, you will get a terms and conditions prompt, read it and confirm.

Now choose Google Tag and click on Tag Details.

Now check the box next to Specify CSS selectors or JavaScript variables
- Change CSS selector to Global Javascript variable
- Enter the following values for Email
- enhanced_conversion_data.email
Repeat the steps for Phone number 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
- enhanced_conversion_data.home_address.city
- State
- enhanced_conversion_data.home_address.region
- Country
- enhanced_conversion_data.home_address.country
- Postal code
- enhanced_conversion_data.home_address.postal_code

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.
If you have two fields such as post purchase and order status, then add the code to the order status field.

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

- replace the value for fa_send_to
- replace the value AW-123456789/abcdefghijlklmnopq with your event snippet send_to value
- 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 V2.2 -->
<!-- For the latest and updated code or tutorial: https://feedarmy.com/kb/adding-adwords-conversion-tracking-to-shopify/ -->
{% assign fa_send_to = 'AW-123456789/abcdefghijlklmnopq' %}
{% comment %}DO NOT EDIT BELOW{% endcomment %}
{% if fa_google_coding %}{% assign fa_google_coding = true %}{%- else -%}{% assign fa_google_coding = false %}{%- endif -%}
{% assign fa_google_ids = fa_send_to | split: "/" %}
{% if fa_google_coding == false %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{fa_google_ids[0]}}"></script>
{%- endif -%}
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{fa_google_ids[0]}}', {'allow_enhanced_conversions':true});
var checkout = window.Shopify.checkout;
</script>
{% if first_time_accessed %}
<script>
gtag('event', 'conversion', {
'send_to': '{{ fa_send_to }}',
'value': checkout.total_price_set.presentment_money.amount,
'currency': checkout.total_price_set.presentment_money.currency_code,
'transaction_id': '{{ order_id }}',
});
var enhanced_conversion_data = {
{% unless billing_address.first_name == blank %}"first_name": "{{ billing_address.first_name }}",{% endunless %}
{% unless billing_address.last_name == blank %}"last_name": "{{ billing_address.last_name }}",{% endunless %}
{% unless checkout.email == blank %}"email": "{{ checkout.email }}",{% endunless %}
{% unless billing_address.phone == blank %}"phone_number": "{{ billing_address.phone }}",{% endunless %}
"home_address": {
{% unless billing_address.street == blank %}"street": "{{ billing_address.street }}",{% endunless %}
{% unless billing_address.city == blank %}"city": "{{ billing_address.city }}",{% endunless %}
{% unless billing_address.province_code == blank %}"region": "{{ billing_address.province_code }}",{% endunless %}
{% unless billing_address.zip == blank %}"postal_code": "{{ billing_address.zip }}",{% endunless %}
{% unless billing_address.country_code == blank %}"country": "{{ billing_address.country_code }}"{% endunless %}
}
};
</script>
{% endif %}
<!-- FEEDARMY END Global site tag (gtag.js) - Google Ads V2.2 -->
Verifying and Testing
Verifying
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.
Testing
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.
Tip:
first_time_accessed
is for the page, not for the customer. Subsequent orders will run afirst_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.
Coverage:
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.

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.

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: https://www.trustpilot.com/review/feedarmy.com
Change Log
- 8th September 2023 – updated the steps for enhanced conversion tracking
- V2.2 – 11 July 2023 – updated code to validate every value
- V2.1 – 24 June 2023 – updated checkout price to use presentment_money
- 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
hey my freinds, now shopify use “customer events” to manage tracking code now,can you tell how to convert you code which added on Additional Scripts section to “customer events” section? Many Thanks…
Currently my code is not supported for Pixels or Customer Events.
Super helpful, although on google ads its still listing my conversion as “inactive”. I see the snippet code on the view source page so cannot for the life of me figure out what is wrong. It looks like it’s capturing every action up to clicking “pay now”.
This code, should not track anything else except for the conversion itself, Shopify seems to be having issue with the if first time check. A few months ago, I heard it was causing Shopify to block the data from being sent. You might want to try and disable this.
I configured the enhanced conversion (Using Google Tag) as per the provided reference. However, as per the Google Tag Configuration, It takes up to 45 days to validate the data. Is there any way the validations can be confirmed earlier? The purchase conversion is verified and it’s recording conversion properly.
From Google’s side no, from your side, you can perform a test purchase and using Tag Assistant you can view the values submitted.
Hi,
I think the guide might be out of date by now as there are 2 additional code sections under Checkout section in Shopify now? In your guide just one field / section.
Please advise.
Seems I got it working by adding to the Post-Purchase page. Shopify is officially adding code to Order Status field instead.
The tutorial is not out of date, some merchants have two field, some don’t. It depends if you have enabled a feature or app that allows for post purchace processing. The code should be added in the order status field. I will update the tutorial to include this info. Thanks.
Thanks – good to know 🙂
What if I desire the prices to be sent to GA in shop currency instead of presentment currency?
From what I can see, Shopify does not expose the prices in Shop currency, only presentment currency. Is there a way around this? (Additionally, would not want GA doing the FX conversion for reasons such as they do not know the FX rate used for the transaction, etc.)
If you only list your products in the shop currency, when a user reaches the checkout and, ultimately, the thank you page, the conversion value sent to Google will be the shop currency price. The presentment currency and price will match what you charge at the checkout.
Hi Emmanuel!
In the last code versione V2.2 , where can I edit fa_include_tax_and_shipping? I’m using V1.8, where I’ve {% assign fa_include_tax_and_shipping = ‘no’ %} text code but don’t found it in code template V2.2. Am I missing something? Thank you!
Hello Fabrizio, including or excluding tax and shipping is no longer available in the new code, as new version is using better but limited coding.
Great Guide, I feel like a lot has changed since you wrote this.
1) Currently, I am not developing the Pixel version, as of writing it’s very inconsistant in when it works vs not works. Installing my code, does not require checkout.liquid and the code can be used by any Shopify subscription.
2) You can configure the settings near the drop down by clicking tag details. Google just did not make it clear.
This is awesome! Thankyou.
One question, when setting up my Google Ads tag and enhanced conversions, it automatically linked the tag creation to my existing gtag on site. Is this normal and is there anything extra I need to do?
Will it still work? I followed everything you did.
Yes, you will always use the same GTAG account id, regardless of conversion or remarketing tracking. It’s the data that follows that defines what info is sent.
Great article Emmanuel. I have a few questions…
I recently noticed that I was missing a lot of conversions inside my Google ads account. This was after the migration to GA4. However, after doing more research and tests, I noticed that some users bounce back from my post-purchase page after they buy and because of this, I wasn’t able to track the conversions.
I’ve been using enhanced conversions through GTM and then added the tracking scripts from my order status page to the post-purchase page.
However, after reading the Shopify official document about this, it seems that liquid code isn’t accepted on the post-purchase page, which from what I understand is the base on which is build the enhanced conversions tracking code…
Also, detailed address attributes like street, city, and region were not listed among the provided fields for the post-purchase page.
Would this mean that we can’t send enhanced conversion data in order to effectively track conversions that bounce from the post-purchase page?
If liquid coding is not supported in the post purchase page, then my recommendation is to use the javascript variables, namely Shopify.checkout
However, you need to check if address details are within the variables.
Hi.
I have set this up as descibed.
However the google ads pages have been updated.
The questions i have are as follows
-If i was not able to put in my enhanced conversion tracking information for variable, email, address etc, would your code still work as its meant to?
-Do we still add our google tag code to our shopify code between the <head></head>?
Thanks
To add the ehanced javascript variables, go to Conversions > Settings tab. Here you will see enhanced conversions, and you can configure it here.
Conversion tracking is only added in the additional scripts.
I have added the conversion code to the Shopify checkout section.
After that I got 2 sales.
Conversion status in Google Ads dashboard changed from “Inactive” to “No recent conversions”.
Last seen – “today”. Conversion value – 0. When I check Google Ads dashboard, there are 0 conversions.
What could be the reason? Maybe it’s because my website currency is in GBP, yet my conversion value in Google Ads is in EUR?
Thank you.
The reason could be that you have not yet had a conversion that originated from Google Ads. When the status is No recent conversions, it means the code is detected, which will be from a non-Google Ads conversion.
Only clicks on an ad that led to a conversion will be tracked.
There is no issue with Google Ads being in EUR, it will automatically convert to EUR values.
how can I add this conversion to GA4?
This is not for GA4, so you can not. This code is for Google Ads.
Now that Shopify allows users to make purchases in their native currencies, how will this convert the transaction value to the currency of the Google Ads account?
Please see below what Digital Darts says on the topic:
https://www.digitaldarts.com.au/google-ads-conversion-tracking-shopify
Firstly, it uses the currency and currency code from the user at checkout. The currency someone checks out with is called the “customer currency” or “presentment currency“. Shopify makes this available through JavaScript at checkout. This saves us a load of pain in having to format the ever growing number of currencies accepted in Shopify.
Many currencies like the Euro use a comma for the decimal point. The Norwegian Krone has a comma for decimals then separates three digits with a full stop. Google requires the purchase value to be free of commas and to have the decimal point a full stop. Shopify handles this for all currencies with
Shopify.checkout.total_price_set.presentment_money.amount
so let’s not recreate the wheel.Google will accurately convert the currency to match the billing currency on your ad account. Google documentation says, “…if the Google Ads account driving a click that converts has a different billing currency, the conversion value will be converted to that account’s currency using the average daily foreign exchange rate.”
Hello Yoni, thank you for pointing this out. The code is now updated to use presentment money. If the currency in the checkout is different from the currency in Google Ads, then Google will convert it to the Google Ads currency using the currency rate of the time of purchase. Using Google Finance.
For info, for several websites, the conversions tag doesn’t seem to be triggered anymore. The tag is not found on the thank-you page when I do a test.
I think you are testing it incorrectly. Please note that if you view the source (which is the second page view), part of the code will not be visible, because it will only show when you first view the page, any subsequent views will remove the conversion trigger to avoid double tracking. I also daily check my clients accounts and all are tracking sales.
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…
To allow for multi-currency support, which a lot of merchants have, checkout.currency.iso_code is required to ensure the correct currency code is added depending on the checkout currency. If this is not used, then the default currency will always show, which is not what we want.
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.
I see, I did not test your code example, and assumed it was a valid code. I am not able to test myself at this moment as Shopify is having an issue accessing my developer store. However as you have already done the test if checkout.currency.iso_code does not work, then it doesn’t work.
ChatGPT is not updated, and uses data prior to 2021. ChatGPT also does not credit where it gets its info from.
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?
Depending on other 3rd party apps you are using that affects the checkout, yes it will be order processing in this case.
Hi – have you got an update for this for G4 tracking? Many thanks, George
I recommend using the Shopify Google Shopping and Youtube app: https://apps.shopify.com/google?search_id=2458fd57-5663-4ea1-87e2-410b083d500a&surface_detail=google+shopping&surface_inter_position=1&surface_intra_position=12&surface_type=search
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?
I have re-tested the code and there are no errors, so you may have other conflicting issues. You can reach to me for personal support at [email protected]
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?
Hello Jonathan, yes, you will need to install the code twice. Each with the correct identifiers (account id and conversion label).
Hey, Emmanuel . Please help, I have left my comments in this question https://stackoverflow.com/questions/73611320/ga4-purchase-event-duplicate/74266851#74266851
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
Hello Dmitry. Apologies for the late reply. Your message ended up in the trash. Usually, the doubling is caused by the GTM GA4 configuration being set up twice. Which means the code is submitted twice.
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 https://business.czarto.com/2020/09/29/shopify-google-ads-conversions/. I think it is Google Shopping app who creates them automatically and sends to Ads.
Correct, the free google shopping app in Shopify, sets up conversion and remarketing automatically.
What the FFFF! It works. Love this!!!
Pleasure Odera.
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!
Thanks!
For a conversion to be shown in Google Ads, wait at least 24 hours.
For enhanced tracking to show / confirm tracking wait up to 75 days.
Did it work for you?
Yes, it works. You need to wait 24 hours for normal conversions, and 75 days for enhanced conversions.
Hi Emanuel! Thanks for your great blog!
Can we just use javascript variables from the Shopify object?
Like
Shopify.checkout.email
Shopify.checkout.phone
Shopify.checkout.shipping_address.first_name
Shopify.checkout.shipping_address.last_name
Shopify.checkout.shipping_address.address1
Shopify.checkout.shipping_address.city
Shopify.checkout.shipping_address.province
Shopify.checkout.shipping_address.country_code
Shopify.checkout.shipping_address.zip
Thanks =)
You can use Google Tag Assistant to see if data is available, if yes, I would assume it would work.
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?
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.
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?
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.
Hello Emmanuel
I dont have the option of enhanced option to check you know why ?
Yes, if you are in niche that is considered sensitive, you can not track enhanced conversions. Such as healthcare, I have the full details here: https://feedarmy.com/kb/why-enhanced-conversions-are-not-available-in-google-ads/
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.
Hello Mathias, Yes simply click on the radio button and choose delete.
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 ?
Hello Gooner, thank you for your question and sorry for the late reply. Your message ended up getting flagged. Yes I am happy to help. Please email me at [email protected]
How to added enhanced conversion tracking for shopify rechargeapp?
Hello Raman, simply follow the instructions. And install the code the same way.