Shopify Google Ads Enhanced Conversion Tracking (2023)

I needed to figure out how to do Google Ads conversion tracking for a Shopify client. I was not impressed by the other tutorials as each was missing something. I wanted to figure out the absolute PERFECT Google Ads conversion tracking setup for Shopify.

Quick solution #1 · Hire me


You just sit back. I’ll track Google Ads conversions for you. Record a video demo showing it’s working before you pay. Not happy? No payment.

I’m a freelance who does conversion tracking all day every day. If you want an easy solution 100% sure to work, tested and done for you, just get in touch @hire.

It usually takes under 1 hour, we can send a few WhatsApp messages and get the best conversion tracking setup for Shopify + Google Ads with 0 effort.

Quick solution #2 · Buy a prebuilt-setup & install with couple clicks

If you want a cheaper way, but still want to get an easy solution without doing all the complex setup, you can buy my Shopify Google Tag Manager Setup for Google Ads. You can simply import a readymade setup in a few clicks and have the best setup in a few minutes.

@hire

The hard way - DIY

If you’re more adventurous or perhaps a new store on a Shopify basic just trying out, here’s how you can DIY for Shopify Google Ads Conversions, still getting the Enhanced Conversions and a professional end result.

Best Shopify Google Ads Conversion Tracking Setup

My criteria for the absolute perfect Shopify Google Ads conversion tracking setup:

  • We want our Shopify and Google Ads to use the new more accurate Enhanced Conversion Tracking.

  • We want our Google Tag Manager Enhanced Conversion Tracking setup to 100% complete. We want Google Ads to know:

    • Email

    • Phone

    • First Name

    • Last Name

    • Address

    • Postal / Zip

    • Country

    • Region

    • City

    • Purchase value

    • Currency code

    • Transaction ID (Shopify Order Id) - to prevent duplicates

  • Use Google Tag Manager. It’s the industry standard professional tool. We do not want to have messy inline code all around. We want a visual, version controlled, labeled setup in a neat Google Tag Manager folder, using clearly named data layer variables

  • We want a Google Ads conversion setup we can test and debug visually using the new Google Tag Assistant




A lot of tutorials miss some of these parts. Most do not do the enhanced conversion tracking, or use outdated or unprofessional stuff like gtag, inline code snippets etc.

How to get the perfect Shopify Google Ads Conversion Setup?

Creating a Shopify conversion inside Google Ads

  1. Go to Conversions inside your Google Ads admin

  2. Click the blue + New conversion action button

  3. Select Website

  4. You must scan your website. Ignore this and skip.

  5. Click + Add a conversion action manually

  6. Create your Google Ads conversion for Shopify purchases

    1. Goal category for this action: Purchase

    2. Conversion name: Shopify E-Commerce Purchase - Enhanced (via GTM)

    3. Value: Use different values for each conversion

    4. Enter a default value: 0

    5. Count: Every (Recommended for purchases because every purchase is valuable)

    6. Click-through conversion window: 90 days (or whatever you prefer)

    7. Choose Google Ads View-through conversion window and Engaged-view conversion window for your Shopify purchase. I use default values.

    8. Click “Save and continue” in the bottom

    9. Grab the Google Ads conversion ID and conversion label for the Shopify purchase


Shopify Google Ads conversions -  conversion type is website conversion
Shopify Google Ads conversions - Connecting Google Ad conversion to Google Tag Manager with ID and Label


Enabling Enhanced Conversions in Google Ads

Inside Google Ads, go to your new Conversion Shopify E-Commerce Purchase - Enhanced (via GTM) and scroll down to Enhanced Conversions.

  1. Click “Turn on enhanced conversions”

  2. how you want to set up enhanced conversions: Google tag or Google Tag Manager

  3. Click Next

  4. Again you must check the website.

  5. Just make sure it’s enabled even if Google Ads says something about missing gtag or Google Tag Manager

Installing Google Tag Manager to Shopify

We’ll then continue with installing Google Tag Manager to Shopify.

  1. Go to tagmanager.google.com

  2. Create a new Google Tag Manager container

  3. Copy the Google Tag Manager code

  4. Add it to your Shopify by going to Themes -> Your theme -> edit code

  5. Find the theme.liquid and paste your Google Tag Manager setup inside the <head> tag

  6. Publish your your Shopify theme with Google Tag Manager installed

Shopify Google Ads conversions - Get Google Tag Manager script


Shopify Google Ads conversions - Install Google Tag Manager to Shopify theme liquid inside <head> tag
Shopify Google Ads conversions - Install Google Tag Manager to Shopify theme liquid inside <head> tag part 2

Next, I recommend going to Google Tag Manager and clicking preview to make sure Google Tag Manager is installed correctly and connects.

Next we’ll install Google Tag Manager and our data layer code to Shopify
checkout Order status page

  1. Go to Shopify admin

  2. Click Settings

  3. Click Checkout

  4. Scroll to Order status page

  5. Find “Additional scripts” code field

  6. Add Google Tag Manager there ( ! Yes, we must install Google Tag Manager here as well. The one from theme.liquid is not added to the Shopify Order Status Page)

  7. Also add the following code below Google Tag Manager

<script>
  // Add Content Box with Order Details
/*
  Shopify.Checkout.OrderStatus.addContentBox(
    `<h2>Order Details</h2>
    <p>Order Number: {{ order_number }}</p>
    <p>Total Price: {{ total_price | money_without_currency }}</p>
    <p>Email: {{ email }}</p>
    <p>Phone: {{ phone }}</p>
    <p>Shipping Details:</p>
    <ul>
      <li>Name: {{ shipping_address.name }}</li>
      <li>Country: {{ shipping_address.country }}</li>
      <li>City: {{ shipping_address.city }}</li>
      <li>Province: {{ shipping_address.province }}</li>
      <li>First Name: {{ shipping_address.first_name }}</li>
      <li>Last Name: {{ shipping_address.last_name }}</li>
      <li>Phone: {{ shipping_address.phone }}</li>
      <li>Zip Postal: {{ shipping_address.zip }}</li>
    </ul>`
  );

*/
   // Push to dataLayer
  dataLayer.push({
    'event': 'shopifyOrderDetails',
    'email': '{{ email }}',
    'phone': '{{ shipping_address.phone }}',
    'firstName': '{{ shipping_address.first_name }}',
    'lastName': '{{ shipping_address.last_name }}',
    'street': '{{ shipping_address.address1 }}',
    'city': '{{ shipping_address.city }}',
    'region': '{{ shipping_address.province }}',
    'country': '{{ shipping_address.country }}',
    'postalCode': '{{ shipping_address.zip }}',
   // 'value': '{{ total_price | money_without_currency }}', //e.g. "1.348,95" - not ideal 
    'value': '{{ total_price | divided_by: 100.0 | round: 2 }}', // e.g. "1348.95"
    'currencyCode': '{{ shop.currency }}',
    'orderId': '{{ order.id }}'
  });

</script>


Install The Conversion Linker tag to Google Tag Manager

Shopify Google Ads conversions - Google Tag Manger Conversion Linker tag to store GCLID as a cookie

In Google Tag Manager, go to variables and create the matching data layer variables

Create a custom event trigger for our Shopify Google Ad Conversion purchases.

  • You can call it Custom Event - 'shopifyOrderDetails' - Shopify Order Status Page

  • Use shopifyOrderDetails as the Event name

Shopify Google Ads conversions - Custom event inside Google Tag Manager

Create the Google Ads Conversion Tag inside Google tag Manager

Shopify Google Ads conversions - Google Ads conversion tag inside Google Tag Manager with User-Provided Data variable for enhanced conversion tracking

For your Shopify Google Ads conversion, make sure to “check the Include user-provided data from your website” inside Google Tag Mager tag. This is what makes our Shopify Google Ads conversion “Enhanced Conversion”. We tell Google Ads all the information about the purchase and the person that did the purchase. Use the data layer variables to populate the User-Provided Data variable:

Shopify Google Ads conversions - User-Provided Data variable for Google Ads Enhanced Conversion Tracking

Next, click the Preview again in Google Tag Manager and make a test purchase. You can also make a test purchase and copy-paste your Order status page URL to the Google Tag Assistant preview URL.

Google Tag Assistant should now show your shopifyOrderDetails custom event trigger in the left side, and show

Tags Fired:

Google Ads Conversion - Shopify Purchase Google Ads Conversion Tracking - Succeeded

Shopify Google Ads conversions - Tag Assistant Showing shopifyOrderDetails trigger fired and Shopify Google Ads conversions - Shopify Order status page for Successful purchase


And clicking on the Google Ads Conversion - Shopify Purchase -tag should now show the following information, including Google Ads Transaction ID, Enhanced Conversion object (it’s weirdly called cssProvidedEnhancedConversionValue even if we don’t use CSS to get the enhanced conversion variables). Make sure you have currency code and conversion value also correctly.

Previous
Previous

GoHighLevel Calendar & Scheduling Conversion Tracking – Google Analytics 4, Google Ads & Meta Pixel

Next
Next

AvantLink AvantMetrics to Squarespace