New Shopify Certification now available: Liquid Storefronts for Theme Developers

Google Ads Conversion Tracking Pixel Not Working - Need Help

Daebak
Visitor
1 0 0

For the last couple of weeks, I've been trying to get Google Ads Conversion Tracking up and running, and I just can't seem to get it properly implemented. 

 

This is the global tag added to the theme.liquid file: 

 

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-67004568-8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-67004568-8');
gtag('config', 'AW-940126836');
</script>

 

And this is the code installed in the checkout page: 

 


<!-- Event snippet for JustAnimeThings Purchase conversion page -->
<script>
gtag('event', 'conversion', {
'send_to': 'AW-940126836/YS1dCK2k5LMBEPTkpMAD',
'value': {{ checkout.subtotal_price | money_without_currency }},
'currency': 'USD',
'transaction_id': '{{ order_number }}'
});
</script>

 

 I have removed {% if first_time_accessed %} and {% endif %} wrapping from the conversion code but the conversion pixel is still unverified. 

 

Thank you for your support.

 

Reply 1 (1)
Luka_Koczorowsk
Shopify Partner
11 0 9

You have to add

 

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-67004568-8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-67004568-8');
gtag('config', 'AW-940126836');
</script>

 

into the additional checkout script as well. That's because the post "Thank You" page doesn't include your theme.liquid. Which means it doesn't include the tag code you pasted in there either.