All things Shopify and commerce
Hi, community,
I need help to set up the code of the Google conversion tag on the "thank you" of my Shopify store. Can you please provide guidance or help to do this?
This is my store: https://thegiftcompany.com.au/
This is the email I have received from google:
The Google Ads user joegr7@gmail.com has shared a tracking tag to track conversions on your website. To add this tag to your website, follow the instructions below.
How to use the tag
For conversion tracking to work, you'll need to install the conversion tracking tag, which consists of a global site tag and an event snippet. If installing the tag with Google Tag Manager, follow these instructions instead.
If any of your web pages are built using AMP, you'll need to add tags to both the AMP and HTML versions. Instructions are included for both.
HTML pages
Install the global site tag on every page of your website.
Open the HTML for each page.
Choose from the following options:
If you haven't installed the global site tag on your website, copy the tag below and paste it between the head tags (<head></head>):
<!-- Global site tag (gtag.js) - Google Ads: 823381560 --> <script async src="https://www.googletagmanager.com/gtag/js?id=AW-823381560"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-823381560'); </script>
See more guidelines on setting up the global site tag.
If you installed the global site tag on your website from another Google product (e.g. Google Analytics) or from another Google Ads account, copy the 'config' command below and add it to every instance of the global site tag, right above the </script> end tag.
gtag('config', 'AW-823381560');
If you or a manager account already installed the global site tag on your website while setting up the tag for another conversion action, make sure that the tag is on every page of your website and check that the 'config' command has this Google Ads account's conversion ID: AW-823381560
Save the changes to your web pages.
Install the event snippet on the conversion page. This is the page your customers reach on your website after they've completed a conversion – the "Thank you for your order" page, for example.
Open the HTML for the conversion page.
Copy the snippet below and paste it between the head tags (<head></head>) of the page, right after the global site tag.
<!-- Event snippet for Purchase conversion page --> <script> gtag('event', 'conversion', { 'send_to': 'AW-823381560/voYKCOyVuJ8DELicz4gD', 'transaction_id': '' }); </script>
Add code to dynamically pass a value to the transaction_id parameter. When tracking purchases, sales or leads on your website, this parameter ensures that each conversion is only counted once.
Save the changes on your web page.
AMP pages
You should follow these instructions for any of the pages built using the AMP framework.
Install the global site tag on every page of your website.
Open the HTML for each page.
Choose from the following options:
If you haven't installed the global site tag on your website, add these two tags:
First, copy the tag below and paste it between the head tags (<head></head>), before the AMP JS library.
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
Then, copy the tag below and paste it between the body tags (<body></body>) of all of your AMP pages
<!-- Global site tag (gtag) - Google Ads: 823381560 --> <amp-analytics type="gtag" data-credentials="include"> <script type="application/json"> { "vars": { "gtag_id": "AW-823381560", "config": { "AW-823381560": { "groups": "default" } } }, "triggers": { } } </script> </amp-analytics>
See more guidelines on setting up the global site tag.
If you installed the global site tag on your website from another Google product (e.g. Google Analytics) or from another Google Ads account, copy the line below and include it in the ‘config’ section of every instance of the global site tag.
"AW-823381560": { "groups": "default" }
If you or a manager account already installed the global site tag on your website while setting up the tag for another conversion action, make sure that the tag is on every page of your website and check that the ‘config’ section has this Google Ads account's conversion ID: AW-823381560
Save the changes to your web pages.
Install the event snippet on the conversion page. This is the page your customers reach on your website after they've completed a conversion – the "Thank you for your order" page, for example.
Open the HTML for the conversion page.
Copy the snippet below and paste it into the ‘triggers’ section of the global site tag.
"C_0s2DLeLxcps": { "on": "visible", "vars": { "event_name": "conversion", "transaction_id": "", "send_to": ["AW-823381560/voYKCOyVuJ8DELicz4gD"] } }
Add code to dynamically pass a value to the transaction_id parameter. When tracking purchases, sales or leads on your website, this parameter ensures that each conversion is only counted once.
Save the changes on your web page.
Learn more about adding a conversion tracking tag to your website.
Thank you,
The Google Ads Team
I have a full tutorial explaining how to install Google ads conversion tracking here: https://feedarmy.com/kb/adding-adwords-conversion-tracking-to-shopify/
Hi @EmmanuelFlossie ,
I watched your video, you have a very clear explanation, thank you.
Although, I still need to check if I understand right (my bad!):
to track conversions, do I only need to place the google tag in Settings / Checkouts / Additional scripts and not in the theme.liquid?
Does the 'Settings / Checkouts / Additional scripts' track automatically the Thank you page?
I have my tag installed in both places and it looks like my google account tracks all the clicks on my website and not the conversions (definitely not the conversions).
Thanks a lot for your help in advance!
Kind regards,
Barbara
Do not install conversion tracking in the theme.
Only the additional scripts in the settings.
Hey Emmanuel,
Thanks for the guide.
Since the Shopify settings has been updated, are we going to add the script on the "Post-purchase page"? Also, we no longer need to add the GTAG in theme? Because when we run the troubleshooter in the conversion action it is asking for the gtag and can't be detected? Any update with this post are highly appreciated.
Thanks.
@nairbdb Yes it will be the post purchase page.
You don't need to add GTAG in the theme, as there is no purchase conversion action tracked in the theme.
However, GTAG is used for many other areas such as Google Tag Manager, Google Ads Remarketing, Google Analytics, etc.
So you might be mixing different areas.
However, for the conversion for purchases, only add the Google Ads code in the additional scripts for the checkout.
So I've added the code, it's working all the way up to checkout/thank you page but doesn't send data after that. I got on with shopify support and they said the issue is on google's end, but it doesn't look like it to me. Here' what I see on the tag details test from google.
Can you also please tell me the complete steps to add other pixels such as "Add to cart", "View Page" and "Checkout"
Basically i have trouble finding specific conversion pages for these pixels
I can not tell you. As I have no coding for this. I recommend you use the Google and Youtube app to set this up.
Hi @Joegr7
We help you install the conversion tracking on your store automatically. Using the Tracking for Google app by AdNabu, you can automatically install the tracking code on your thank you page.
You do not have to do any manual changes and easily set up the pixel.
Hope this helps.
Sampy Mishra | Customer Success Manager @ AdNabu
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- Try our Nabu for Google Shopping Feed from Shopify App Store.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025