Guide for Setting up Google Ads Conversion Tracking On Shopify

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

 

 

Did you enjoy reading this post? Help us spread the word by sharing with a friend who might enjoy it.

Posted in

RELATED POSTS