Introduction
Google Ads and Shopify Tracking can be a difficult task to do it properly without doubling up conversions.
The Code
Add the code below to Shopify Via
Settings > Checkout > Additional Scripts
Replace UA with your google analytics UA code
And AW with your Google Ads Conversion Code
Recommended Tracking:
N.b. change total_price to subtotal_price if you donโt want to include taxes in tracked value amount
{% if first_time_accessed %} <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-XXXXXXXXX-1', { 'send_page_view': false }); gtag('config', 'AW-XXXXXXXXX'); </script> <!-- CONVERSION CODE --> <script> gtag('event', 'conversion', { 'send_to': 'AWXXXXXXXXX/YOURCONVERSIONCODE', 'value': {{ checkout.total_price | money_without_currency }}, 'currency': '{{ shop.currency }}', 'transaction_id': '{{ order.order_number }}' }); </script> {% endif %}
Born as a serial ‘thinker’ I’ve always had a fascination for understanding how and why people do the things they do. As I’ve grown up this fascination turned into a career in film & tv, then sales and marketing. You name it I’ve probably sold it! (and have a lesson or two to share about the journey)
I’d love for you to connect with me here or on Facebook/LinkedIn.