Guide for Setting up Google Ads Conversion Tracking On Shopify

Last Updated on May 30, 2022 by Jos

Fact Checked

Home » Blog » Guide for Setting up Google Ads Conversion Tracking On Shopify

Contents

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