What are enhanced conversions on Google Ads?

Enhanced conversions is a feature that aims to help improve conversion tracking accuracy. It works by recovering conversions that otherwise wouldn’t have been measured. It’s also privacy-safe since it involves the hashing of first-party customer data.

Link your Shopify store to Google Shopping to maximise your visibility.

How to set up Google Ads conversion tracking on Shopify

Enhanced conversions can be turned on within your Google Ads account.

This method involves some basic coding and can be tricky, but we’ll try to keep it simple.

Turn on enhanced conversions in Google Ads

Follow these steps:

  1. From your Google Ads account, go to Tools & Settings and then Measurement - Conversions.
  2. Find your Purchase conversion with the ‘Website’ source.
  3. You should be greeted with the Enhanced Conversions section.
  4. Tick the box to turn on the feature.

How to set up enhanced conversions for Shopify with the global site tag

For this method, you must have the Global Site Tag (gtag.js) installed on your Shopify store. We recommend following Shopify’s guidance available here to install the Global Site tag onto your store.

To set up enhanced conversions, follow these steps:

  1. From the Measurement - Conversions page you were on earlier, you should see Tag type. Select Global site tag, then Edit code and Use event snippet.
  2. Go back up on the page to the ‘Tag Setup’ section and click Google Tag Manager. From here, you need to get both your Conversion ID and Conversion label - save these for later use.
  3. Next, from your Admin page, go to Settings, then Checkout, and finally Additional Scripts. Copy all of the code blocks you see here and keep them somewhere safe, just in case you need them in the future.
  4. Locate your conversion script on that page.
  5. Copy the code below (don’t paste it anywhere just yet): 
{% comment %}
Analyzify - Enhanced Conversions Tag V1.3
SECTION 1: ONLY EDIT HERE
Add your relevant values here. Detailed guideline: https://analyzify.app/hub/google-ads-enhanced-conversion-setup-on-shopify/
{% endcomment %}


{% assign gads_aw_id = "AW-111111111" %}
{% assign gads_send_to = "AW-111111111/conversionlabelhere" %}
{% assign product_id = "product_id_variant-id" %}
{% assign product_id_prefix = "shopify_us_" %}
{% assign gads_merchant_id = "222222222" %}
{% assign gads_feed_country = "US" %}
{% assign gads_feed_language = "EN" %}


{% comment %}
SECTION 2: DO NOT EDIT BELOW - ONLY EDIT SECTION 1
{% endcomment %}

<!-- Global site tag (gtag.js) - Google Analytics -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '', { 'allow_enhanced_conversions': true });
</script>
{% if first_time_accessed %}

<!-- START Google Ads Enhanced Conversions V1.3-->
<script>
var enhanced_conversion_data = {
{% unless checkout.email == blank %}"email": "",{% endunless %}
{% unless billing_address.phone == blank %}"phone_number": "",{% endunless %}
{% unless billing_address.first_name == blank %}"first_name": "",{% endunless %}
{% unless billing_address.last_name == blank %}"last_name": "",{% endunless %}
"home_address": {
{% unless billing_address.street == blank %}"street": "",{% endunless %}
{% unless billing_address.city == blank %}"city": "",{% endunless %}
{% unless billing_address.province_code == blank %}"region": "",{% endunless %}
{% unless billing_address.zip == blank %}"postal_code": "",{% endunless %}
{% unless billing_address.country_code == blank %}"country": ""{% endunless %}
}
};
</script>
<!-- END Google Ads Enhanced Conversions V1.3-->

<!-- START Cart data V1.3-->
<script>
gtag('event', 'purchase', {
'send_to': '',
'transaction_id': '',
'value': Shopify.checkout.total_price_set.presentment_money.amount,
'currency': Shopify.checkout.total_price_set.presentment_money.currency_code,
'discount': discount(),
'aw_merchant_id': {{ gads_merchant_id }},
'aw_feed_country': '',
'aw_feed_language': '',
'items': items()
});

function discount(){
return (Shopify.checkout.discount == null) ? 0 : Shopify.checkout.discount.amount;
}

function items(){
var jsonarray = [];
for (var line_item_count = 0; line_item_count < Shopify.checkout.line_items.length; line_item_count++){
jsonarray.push({
id: {% if product_id == "product_id_variant-id" %}'' + Shopify.checkout.line_items[line_item_count].product_id + '_' + Shopify.checkout.line_items[line_item_count].variant_id{% elsif product_id == 'variant-id' %}Shopify.checkout.line_items[line_item_count].variant_id{% elsif product_id == 'sku' %}Shopify.checkout.line_items[line_item_count].sku{% endif %},
quantity: Shopify.checkout.line_items[line_item_count].quantity,
price: Shopify.checkout.line_items[line_item_count].line_price
})
}
return jsonarray;
}
</script>
<!-- END Cart data V1.3-->
{% endif %}
{% comment %}
END Analyzify - Enhanced Conversions Tag V1.3 Detailed guideline: https://analyzify.app/hub/google-ads-enhanced-conversion-setup-on-shopify/
{% endcomment %}
  1. You’ll need to update these sections of the code with your own information:
    1. gads_aw_id - Add the Conversion ID that you saved earlier, after the ‘AW-’ part.
    2. gads_send_to - This is your Conversion ID and Conversion label.
    3. product_id - This is the product ID format that’s used in your Google feed.
    4. merchant_id - Your Google Merchant account ID.
    5. feed_country and feed_language - Simply the country and language of your feed.
  2. Paste the code with your updated information into the Additional Scripts section.

If you’ve followed all of these steps, enhanced conversion should be set up correctly.

This guide is informed by information from Analyzify, which built the code used above.

Liked this post? You might want to see other posts like this...

Google Shopping best practices and insights

Follow us on the channels where you are.