How to Setup Adwords Conversion Tracking Shopify
Easily add Google Ads conversion tracking to Shopify in less than 15 minutes.
Supported Functions
- Automatically supports multi currencies.
- Automatically converts European prices with commas to dots.
- Optional choice for disabling tax and shipping in your checkout value.
- Includes the new Google Ads enhanced conversion option
Requirements
- Access to Google Ads > Conversions
- Access to Shopify > Settings
Step 1: Open Shopify Checkout Settings
Open a new tab in your browser and log in to your Shopify Admin Panel
Navigate to Settings (Gear Icon) and choose Checkout
Step 2: Setup & Copy Your Google Ads Conversion Code
In a second browser tab, login to Google Ads and click on the tools and settings menu in the top right corner and select Conversions under the Measurement column.
Click on the big blue plus sign (New Conversion Action).
Now selectwebsiteas your tracking template.
It will now ask you to scan your website URL. Enter your URL and click on scan.
Scroll to the bottom and choose to install the conversion action manually.
Then do the following :
- Conversion name
- enter any name
- Category
- Purchase / Sale
- Value
- Use different values for each conversion
- Attribution model
- Choose Position-Based (recommended for growth based businesses)
- The rest can be as default
I have written a great article on how to choose your attribution model.
Click onCreate and continue
Choose to install the tag yourself.
Enabling Enhanced Conversions is optional and not required. Some accounts may not see this option yet. So you can continue the steps below, excluding those related to enhanced conversions. (Skip to Step 3)
Check the box next to Turn on enhanced conversions and enter your website URL and click on Check URL.
By enabling enhanced conversions you allow Google to improve its accuracy to track conversions. This seems to be required due to Apple's IOS14 no tracking prompt.
If you have multiple tags installed, you can choose which tag to use. I recommend selecting Global Tag
If you can not select Global site tag, make sure to install Google Ads Remarketing.
Then enter your domain URL again and append ?v1 this will force Google to recheck. If you add the same URL it will not recheck.
- Leave the Tag type alone.
- Check the box next to Email and choose Javascript
- Enter the following values
- Email
- enhanced_conversion_data.email
Repeat the steps for Phone and Name and Address
- Phone
- enhanced_conversion_data.phone_number
- First name
- enhanced_conversion_data.first_name
- Last name
- enhanced_conversion_data.last_name
- Street address
- enhanced_conversion_data.home_address.street
- City
- enhanced_conversion_data.home_address.city
- State
- enhanced_conversion_data.home_address.region
- Country
- enhanced_conversion_data.home_address.country
- Postal code
- enhanced_conversion_data.home_address.postal_code
You might ask, why the javascript values? Well on your thank you page, the javascript selector for all the values is added as a javascript variable when using the conversion tracking code below (From V1.5). This will only work if you use the code below.
Now choose Install tag yourself.
Click on download snippet for the Event snippet
Step 3: Editing and Pasting Your Google Ads Conversion Tracking
Go back to Shopify and scroll down until you see Order Processing(from step 1), at the bottom of this section you will have a field where you can paste code that is labeled Additional Scripts.
Copy the send_to value (image below) and replace fa_send_to value with your value in the code template below.
- replace the value for fa_send_to
- replace the value AW-123456789/abcdefghijlklmnopq with your event snippet send_to value
- Choose yes or no for fa_include_tax_and_shipping
- choose yes if you want to include tax and shipping in the checkout value or no to not include tax and shipping values.
Code Template (change the fa_send_to value with your code snippet send_to value)
<!-- FEEDARMY START Global site tag (gtag.js) - Google Ads V1.5 --> {% assign fa_send_to = 'AW-123456789/abcdefghijlklmnopq' %} {% assign fa_include_tax_and_shipping = 'no' %} {% comment %}DO NOT EDIT BELOW{% endcomment %} {% if fa_google_coding %}{% assign fa_google_coding = true %}{%- else -%}{% assign fa_google_coding = false %}{%- endif -%} {% if fa_include_tax_and_shipping == 'yes' %} {% assign fa_checkout_price = checkout.total_price | divided_by: 100.0 %} {%- else -%} {% assign fa_checkout_price = checkout.subtotal_price | divided_by: 100.0 %} {%- endif -%} {% assign fa_google_ids = fa_send_to | split: "/" %} {% if fa_google_coding == false %} <script async src="https://www.googletagmanager.com/gtag/js?id={{fa_google_ids[0]}}"></script> {%- endif -%} <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', '{{fa_google_ids[0]}}', {'allow_enhanced_conversions':true}); </script> {% if first_time_accessed %} <script> gtag('event', 'conversion', { 'send_to': '{{ fa_send_to }}', 'value': {{ fa_checkout_price }}, 'currency': '{{ currency }}', 'transaction_id': '{{ order_number }}' }); var enhanced_conversion_data = { "email": "{{ customer.email }}", "phone_number": "{{billing_address.phone}}", "first_name": "{{ billing_address.first_name }}", "last_name": "{{billing_address.last_name}}", "home_address": { "street": "{{billing_address.street}}", "city":"{{billing_address.city}}", "region": "{{billing_address.province}}", "postal_code": "{{billing_address.zip}}", "country": "{{billing_address.country}}" } }; </script> {% endif %} <!-- FEEDARMY END Global site tag (gtag.js) - Google Ads V1.5 -->
Verifying and Testing
Verifying
You can verify if the code is working if you go to Google Ads > Tools and Settings > Conversions > here check if the status is verified.
Testing
First open up Tag Assistant when the new window opens up make a test payment to check if the conversion tracking is correctly installed. When you are on the final thank you page check the data within Tag Assistant.
Tip:
first_time_accessed
is for the page, not for the customer. Subsequent orders will run afirst_time_access
again for the same person if it is a new browser session.
Trouble Shooting Enhanced Conversions
Make sure you have waited at least 3 to 7 days. Google requires time to compile the data.
Coverage:
You may encounter issues with regard to coverage. This can happen when customers pay through a third-party payment processor (PayPal), which may require that they enter customer data on a different domain instead of directly on your website like they do when they do not use a third-party payment processor.
Match status:
If you are having issues with the match status, not all users fill out all the fields in your checkout. What you could do is to remove the attributes in your Google Ads conversion list to only track emails or only track mandatory fields in your checkout.
By removing non-mandatory fields, you will avoid submitting empty fields to Google.
Enable Remarketing
Track your existing website visitors by installing remarketing for Shopify. A returning visitor is twice as likely to convert than a first time visitor. Use this data for display remarketing ads and audience targeting.
Enable Micro Conversions
If you like to track smaller conversion actions ie, micro-conversions such as add to cart, view cart, add a delivery address. Then install Google Analytics Goals.
Support My Work!
My conversion tracking code is constantly updated and provided free for anyone to use. As I don't ask for anything in return, I would be grateful if you consider leaving a review: https://www.trustpilot.com/review/feedarmy.com
Change Log
- V1.5 – 27 July 2021 – Added Enhanced Conversions using Javascript and remvoed CSS
- V1.4 – 21 July 2021 – Added Enhanced Conversions using CSS
- Due to server migration, older changes are not listed
Need Help?
Do You have a question or need specialist support? Get in touch!
How to Setup Adwords Conversion Tracking Shopify
Source: https://feedarmy.com/kb/adding-adwords-conversion-tracking-to-shopify/