Set up Google Ads Enhanced Conversions on Shopify (+Tracking Audit)

Set up Google Ads Enhanced Conversions on Shopify (+Tracking Audit)

Google Ads became extremely important for Shopify merchants, especially after the iOS 14.5 changes, which led to significant ROI decreases in Facebook Ads.?

After working with 1000+ merchants on their data analytics setup, we have seen that tracking conversions with a solid setup is still a headache for many merchants.?

Using this complete guide, you are going to:?

  • Execute an audit on your conversion tracking setup,
  • Learn the essential concepts of conversion tracking and cross-compare your Google Ads conversion results with your Shopify store,?
  • Set up Google Ads Enhanced conversions without using an app,?
  • Double-check Google Ads conversion tracking pixel for your Shopify store.?

We love sharing our knowledge & helping the Shopify community - so we decided to share our own playbook, checklists, and methods to help merchants secure a Shopify & Google Ads conversion tracking setup that works.?

Unfortunately, there's no super-easy method or hack because it's a rather complex subject with many elements.

Crafted for Shopify merchants only, this guide is designed to provide direct & effective solutions. Take your time and read it till the end if you want to make the most of Google Ads.

Chapter 1: Shopify & Google Ads Conversion Tracking Audit

We will cover the essential points of Conversion Tracking. Before we start, please remember that this audit doesn't cover all the assets. There can be 10s or more items to be checked. We tried to keep this simple and actionable.?

Executing a proper audit might show you the problems clearly. Solving those will be pretty easy when you know the exact problem:?

  • Do your conversions not work at all??
  • Do they report the wrong numbers??
  • Is there double-tracking??
  • Could it be a currency issue??

Move to Chapter 2 upon executing the audit; create a new secondary conversion using our step-by-step guide, and then you can cross-compare the results.?

? Make sure you only have one PRIMARY conversion.

If you have multiple primary conversions for the purchase conversion, your conversions will be counted twice. This will affect your ROI and reports.?

Visit your Google Ads Account > Tools & Settings [Top Menu] > Conversions [under Measurement].

No alt text provided for this image
Only one of the purchase conversions must be the Primary.

It is ok to have multiple purchase conversions; however, we DO NOT want to have various Primary conversions here. Keep only one of them as Primary and convert the others into Secondary. Learn more here: ? Primary & Secondary Conversions on Google Ads

? Use different channels as conversion sources.

Getting the same conversion event from different resources is a great practice. In the example, you will see the same Purchase conversion from various conversion sources:?

  • Website: The native Google Ads conversion tracking - is recommended. On our setup, the first one comes from Analyzify's Google Tag Manager integration, and the second one is hard coded.?
  • GA4: Google Analytics 4's purchase event.
  • UA: Universal Analytics's transaction count.?

No alt text provided for this image
Different channels of the same conversion data.

Having multiple sources for the same conversion allows us to compare the results - and, more importantly, to have backup data if one of them goes wrong. As explained above, choosing secondary for the additional conversions is crucial.?

? Check "Last seen:" as proof.

You need to verify your conversion tracking as soon as possible, and you do not have to wait until you get a sale from Google Ads. You want to make sure your conversions are being recorded correctly. However, Google Ads will only show the conversions on this table if the traffic source is Google Ads.?

No alt text provided for this image
Last Seen shows the last time the purchase event was triggered.

When you mouse over on the "Recording conversions" section, the system will show the "Last seen:". It'll be visible whether the purchase source is Google Ads or not. Ideally, you should be seeing the last time when this purchase event has been triggered.?

If your conversion tracking has been set recently, you can make a test order and wait a couple of hours. The test purchase data should be visible under the last seen within 1-3 hours.?

If you get sales in the last 12 hours and don't see them here, your conversion tracking is not set correctly.?

? Cross-compare conversion data with Shopify sales.

Google Ads shows the URLs of the pages where that conversion happened. Obviously, it is the thank you page for purchase conversion, allowing us to do a little trick.?

Go to Google Ads > Conversions and then click on the actual conversion. It'll take you to conversion settings. Click the WEBPAGES tag on the top left.?

No alt text provided for this image
Order status page URLs on Webpages.

As seen on the screenshot, you will have a list of URLs and values. You can copy those URLs and visit them. It'll show you the order status page, and then you can compare it with the value you received in the Google Ads Conversion screen.?

Pretty cool, huh?! You will see here if there is an inconsistency.?

If the conversion value is different from the purchase value, you have a problem.?

Chapter 2: Set up Google Ads Enhanced Conversions on Shopify?

Google Ads Enhanced Conversions works quite like the 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.?

This tutorial will focus solely on setting up Enhanced Conversions on Shopify as a secondary conversion. If you want to learn more about it, check out the following pages:?

Our recommendation in a nutshell:?

  • Create a new & secondary conversion on Google Ads, and set it up as an enhanced conversion using this tutorial.?
  • Watch the results for 1-2 weeks and compare your existing conversion with the new one
  • Use the enhanced conversion setup as a primary if you are happy with the result.?

Let's get started.?

Step 1: Create a new enhanced conversion in Google Ads.

This is the risk-free approach. Let's create a new conversion in Google Ads, and then we'll connect it with your Shopify store - with enhanced features. Follow the slides below:?

Important things to consider:?

  • Make sure to choose SECONDARY in the actions.?
  • Use Google Tag & Edit code settings.?

Step 2: Copy the conversion ID & label.

Use slide #10 from the tutorial above and get your Conversion ID & label. Alternatively, you can go back to conversion settings and find the conversion ID in the event snippet code, as shown below.?

No alt text provided for this image
Find the conversion ID in the event snippet code.

The "Send_to" section of the code contains your conversion ID and label; we'll need them in the following steps. Copy them.?

?'send_to': 'AW-10945050000/w7P7CLmRk4AYEMvrgggg',

In this example:?

Conversion ID: 10945050000

Conversion Label: w7P7CLmRk4AYEMvrgggg'

Step 3: Copy Analyzify's open-source Google Ads Enhanced Conversion tracking script.

You can find the script below. Copy that - but be patient. We will need to change lots of variables there. Copy the script and paste it into a new Google Doc.

(We're sure you know you can easily create one by typing docs.new on your browser.)

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

		<!-- START Cart data V1.3-->
		<script>
		gtag('event', 'purchase', {
			'send_to': '{{ gads_send_to }}',
			'transaction_id': '{{ order.order_number }}',
			'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': '{{ gads_feed_country }}',
			'aw_feed_language': '{{ gads_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" %}'{{ product_id_prefix }}' + 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 %}}        

Step 4: Edit the variables?

This is the only section we're going to make changes in the actual code. Please follow the steps below closely, and DO NOT change anything else in the block.

The steps go like this:

  1. "gads_aw_id": In the first section, add your conversion ID right after "AW-". "AW-" must stay there, so only change the numbers. If your conversion ID is 123456789, the final result should look like AW-123456789.
  2. "gads_send_to": Your conversion ID is right after the slash.
  3. "product_id": is the same product ID format used on your Google feed. Go to the Product ID section below for more information.
  4. "merchant_id": It is the ID of your Google Merchant account.
  5. feed_country & feed_language fields are pretty self-explanatory.?

Step 5: Product ID format & Merchant Center ID

We need to double-check your Google Feed product ID format.

On Google Ads, find PRODUCTS on the left menu. Your merchant ID is marked below - the product ID format next to it. Our example uses "shopify_AU_..." because the native Google Sales Channel is used for product feed on Shopify. ?

No alt text provided for this image
Product feed on Google Ads.

If your store uses a different format, change the codes accordingly. As the main difference, if you only see the variant ID as opposed to Shopify's classic format, update the code like the below:?

{% assign product_id = "variant-id" %}

{% assign product_id_prefix = "" %}

????Don't forget to replace other fields:

  • Your merchant ID,
  • Product feed country code and language.

Replace all the values, and the code is good to go. Hang tight; only a step left.?

Step 6: Paste the updated code into Shopify Checkout Additional Scripts

Go to your Shopify Admin and find Additional Scripts on Settings. Paste the code block there. It'll look something like this:?

No alt text provided for this image
Paste the code block into Shopify Checkout Additional Scripts.

You did it! Your data flow will soon include brand-new enhanced conversion data. Let's emphasise our previous point again.?

The feature is relatively new, and our tests resulted great, but it doesn't mean it'll work flawlessly.?

? If you're up for further reading, head to the reference from Shopify documentation.

Method 2: Set up Enhanced Conversions with Google Tag Manager

At the moment, our favourite method is the one we did above. But if you're up for the challenge, there is a trickier alternative. That is, using Google Tag Manager. It requires your store to have a couple of data layers and a killer GTM container to work correctly.?

We will soon include a tutorial on this setup. But if you still prefer using GTM, here are our suggestions:?

  • ? Check the official documentation. Bit of a no-brainer.?
  • Purchase Analyzify, another no-brainer if we do say so. Our support team will handle the setup at no extra cost. Plus, you'll enjoy the benefits of Analyzify on your Shopify store. ?? Check out our Analyzify Features page to discover more.

Final Words

Google Ads Enhanced Conversions is a relatively new feature but promising enough to be a must-have for Shopify store owners. Adopting this feature will help you count and attribute more conversions and improve your overall data flow.?

要查看或添加评论,请登录

Analyzify的更多文章

社区洞察

其他会员也浏览了