Just follow the steps carefully and have your Google Ads Enhanced Conversion working on your Shopify store.

You all probably have received the emails from Google Ads saying you can now set up your Enhanced Conversions weeks or months ago. But let's be honest, it wasn't quite possible to set it up on Shopify when it was first launched. We tried to make it work for a long and tried all the possible methods - and we finally have a fully working solution that we are happy to share.

This is a free and fully functional tutorial so you will not have to purchase Analyzify or another app. Just follow the steps carefully and have your Google Ads Enhanced Conversion working on your Shopify store.

Things change quite fast in the data analytics world - especially for Shopify merchants. And I know it is quite too hard to catch up! Make sure to subscribe to Analyzify Hub where we share tutorials and best practices.

Are you using an ad blocker? The tutorial contains a lot of images - and most image names include "Google Ads" or "Ads". Ad blockers think that it is an ad and blocks those. So make sure to temporarily disable your ad blocker to properly view the content.

What is Google Ads Enhanced Conversion?


It works quite similarly to Facebook Conversion API. It's a feature that allows you to share more data about your conversions with Google Ads so that the conversion tracking will work better.

As an example, on regular Google Ads conversion tracking; the order ID, revenue, and optionally purchased products are being sent. With Google Ads Enhanced Conversion - you can also send customer details such as email, name, address, and phone number. The data is being sent as encrypted as Google explains:

The feature uses a secure one-way hashing algorithm called SHA256 on your first party customer data, such as email addresses, before sending to Google. The hashed data is then matched with signed-in Google accounts in order to attribute your campaign conversions to ad events, such as clicks or views. source

Do I need it?


The conversion tracking has become significantly hard after the new changes in the world of data tracking such as iOS 14.5, Safari ITP, and with arise of adblockers. You can't optimize and measure your advertising spends if you don't measure them well. So the answer is yes if you want to count and attribute more conversions.

How to set up Google Ads Enhanced Conversions on Shopify


As usual, there are several methods. You can easily do it yourself using the first method. You can choose the 2nd, Google Tag Manager method if you want a more sophisticated setup. We only covered the Purchase tracking as it is the only place where the related user data (email, phone, address) is available.

Enable Enhanced Conversion setting on Google Ads

You can either create a new conversion or apply it to your existing conversion. In this tutorial, I will use an existing Google Ads conversion. However, it will very similar if you want to make a new conversion as well.  

Step 1: Go to Google Ads > Tools & Settings > Measurement - Conversions

Enable Enhanced Conversion setting on Google Ads - Step 1

Step 2: Find your Purchase conversion. The conversion source should be "Website". You can not apply Enhanced Conversions into a Google Analytics or GA4 sourced conversion.

Enable Enhanced Conversion setting on Google Ads - Step 2

Step 3: You should be seeing the "Enhanced Conversions" section right below "Tag setup". If you are not seeing that, it means this feature is not available for your Ads account yet. Click the checkbox. Now we will need to choose our setup method.

Method 1: Set up with the global site tag

I will now share the steps and code blocks you need. You can check this official article if you are not using Shopify or if you want to learn more about it.

Step 0: Make Sure You're Using Global Site Tag

To be able to move on with me here, you should have the Global Site Tag (gtag.js) installed on your store. You will need to type your URL and click CHECK URL. If Global Site Tag is not installed on your store; you will only be shown the Google Tag Manager Option. If that's the case; move to Method 2. Alternatively, you can learn how to install Global Site Tag on Shopify.

Google Ads Enhanced Conversions Global Site Tag Control
Step 1: Choose The Setup Method: Edit Code/Event Snippet

As mentioned above, if you have the Global Site Tag installed; you should be seeing something like below. Follow the steps:
Choose Global Site Tag > Edit Code > Use Event Snippet - and SAVE.

Enhanced Conversions - Global Site Tag Setup - Event snippet
Step 2: Find and Copy Your Conversion ID and Label

We will also need to learn your Conversion ID and label. Just scroll up to the "Tag Setup" part and choose Google Tag Manager. We will NOT use Google Tag Manager. We are choosing this just to get your Conversion ID and Label easier. Copy your Google Ads Conversion ID and Label and move to the next step.

Get your Google Ads Conversion ID & Label
Step 3: Take a Backup of Your Existing Scripts

Better safe than sorry! Let's take the backup of your existing codes - just in case.

Go to your Shopify Store Admin > Settings > Checkout > Additional Scripts

Shopify Settings > Additional Checkout Scripts 

Things are quite sensitive here. Copy all of the existing code blocks and save it somewhere safe, you can email yourself :)

Take a sip from your coffee. Now the fun part begins! We will add & remove some codes from your Shopify Checkout scripts.

Step 4: Find Your Existing Conversion Script

You most probably have a conversion script there. If you can't see in the first place; you can try searching "AW-" - and search should lead you. It should look like below:

Google Ads Conversion Script on Shopify 

If you don't have it there, there are two possibilities:
a) Your conversion tracking wasn't already working properly.
In this case; just continue to the next step because our code snippet will already include the conversion tracking script as well.

b) You are using Google Tag Manager to track conversions.  
In this case; you can either pause your conversion tag in Google Tag Manager or use the 2nd Method to implement the Enhanced Conversions.

Step 5: Add the New Enhanced Conversion Tracking Code on Shopify Checkout

The code block is below. Please read these points carefully before you implement them:

  • Make sure that you have the backup of the existing scripts.
  • You will need to update the code block with your conversion ID and label in the next step - don't just copy and paste the and block and leave the page. The next step matters a lot!
  • This is a new feature and it is still in "beta". Even though we tested very well and observed great results, it might not perform perfectly for your case.

Agreed? Great! Now copy the code block below and go to the next step.

<!-- Google Ads Enhanced Conversion - Purchase Event Snippet by Analyzify - V1.3 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-000000000"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config','AW-000000000', {'allow_enhanced_conversions':true});
</script>
<script>
var enhanced_conversion_data = {
"email": "{{ checkout.email }}",
"phone_number": "{{ checkout.customer.phone }}",
"address": [
{street: "{{ checkout.billing_address.address1 }}", city: "{{ checkout.billing_address.city }}", region: "{{ checkout.billing_address.province }}", postal_code: "{{ checkout.billing_address.zip }}"}]
};
</script>

<script>
  gtag('event', 'conversion', {
      'send_to': 'AW-000000000/REPLACEWITHCONVERSIONLABEL',
    'value': {{ checkout.subtotal_price | divided_by: 100.0 }},
    'currency': '{{ currency }}',
    'transaction_id': '{{ order_number }}'
  });
</script>
Google Ads Enhanced Conversion Code Snippet for Shopify

Once again, ONLY copy; don't paste it yet.

Step 6: Add the New Enhanced Conversion Tracking Code

Now we will go to "Checkout Scripts" and choose the existing conversion pixel; replace it with the new - updated code. It is not done yet; we will also need to replace the Conversion ID and Label. Kindly watch the GIF below a few times.

Don't SAVE it yet, and move to the next step.

Add Google Ads Enhanced Conversions on Shopify
Step 7: Add Your Conversion Values into the Code

You will see three pieces of 000000000 and one REPLACEWITHCONVERSIONLABEL in the code block.

  • All of the three 000000000 should be replaced with the Conversion ID that you copied on Step 2. Only replace the numbers. "AW-" should still stay there. So if your conversion ID is 123456789 - the updated version of the code should be like AW-123456789.
  • And replace REPLACEWITHCONVERSIONLABEL with your conversion label.

The final version should look like below:

Final Sample Code - Google Ads Enhanced Conversion on Shopify

We are still not done. We will have to add {% if first_time_accessed %} condition so that the code will only be triggered at the first visit. However, let's do a test before we add the code.

Step 8: Test & Validate the Setup

Don't worry, I won't ask you to make a test purchase. I know it is boring. I will show you a trick :) We will view the thank you page and test our code without making a test purchase on Shopify and we will test if the Google Ads Enhanced Conversion setup worked properly on our Shopify store.

Shopify Admin > Orders > Click an old order (see GIF below)

Shopify View Order Status Page 

You should see the Shopify Order Status page of that specific order. View the source code of the page.

View Page Source - Shopify Order Status Page

There will be 100s of lines. Just search (CTRL + F or CMD + F) "Analyzify" on the page. You should be seeing the code block we have added. The variables should be replaced with the real values from this order. Address, email, phone number, order ID, order value. See the screenshot below.

Enhanced Conversion Tag Verification

As you are on this page, just verify your conversion ID and label one more time.
Note: In my example, OOOOOOO and label values are not replaced. Yours shouldn't look like that. If it is verified, let's go to the final step.

Step 9: Add FirstTimeAccessed Condition

As mentioned above, you might have double-counted transaction issues if we don't do this.

Go back to Shopify Admin > Settings > Checkout > Additional Scripts and find the code block we have added.

Add the following code:

{% if first_time_accessed %}

right below the first part of the code. It should look like below:

Shopify Liquid - If First Time Accessed

Lastly, add the following code:

{% endif %}
Shopify Liquid - End If

at the very bottom of the code as the first. And it should look like this:

We are done! If you are curious, here is the reference from Shopify documentation.

Method 2: Set up Enhanced Conversions with Google Tag Manager

This is a more complex setup and it requires your store to have a set of data layers and a correctly structured Google Tag Manager container to make it work. We will add a separate series of tutorials for this.

For now, we recommend you using the method explained above. If you still want to use Google Tag Manager;

  • You can check the official documentation and follow the steps there.  
  • You can purchase Analyzify and our support team will complete your setup at no extra cost. Analyzify provides countless benefits for your Shopify store. You can check the features on our ANALYZIFY FEATURES page.

Final Words

Google Ads Enhanced Conversions feature is quite new and still in beta. You might not receive a huge spike in your conversion reports. We always recommend adopting these changes as early as possible. There is no harm in that.

Thanks for reading our tutorial. Make sure to subscribe to Analyzify Hub where we share tutorials and best practices.

You can also leave your questions as comments and we will do our best to get back to you! Also feel free to share your comments, appreciations, frustrations, or any other feelings :)

Leave your questions & comments, get help from the Analyzify team & community.

Table of Contents
Great! Next, complete checkout for full access to Analyzify Hub.
Welcome back! You've successfully signed in.
You've successfully subscribed to Analyzify Hub.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.