Google Ads - Set up enhanced conversions manually with the global site tag (beta)

Solved
NickHo
Tourist
5 0 2

Recently, Google ads published a new feature to improve the accuracy of the conversions for online stores. I have tried to contact customer service for what Google needs for the implementation. But they don't have an answer. This is the link to the new conversion set up which I think is important 

https://support.google.com/google-ads/answer/9888145

It requires at least a javascript about the customers' email address to fill in the Google ads account when checkout. Could anyone help me out here as it is something new and I don't find any article to talk about this on Shopify?

Thanks in advance.

Accepted Solution (1)

Accepted Solutions
Ultrabender
Excursionist
24 2 12
Replies 18 (18)
DWTK
Excursionist
19 0 2

I'm very curious about this as well. 

Kyle_Wescott
Tourist
6 0 2

I set mine up today. I wasn't sure how to test it right away though, so I have to wait 72 hours and look at a Google Ads report. If I set it up right, I'll share what I did here.  I believe you basically just have to put some code with the rest of your conversion codes in the Additional Scripts area in the Checkout section in Settings.  

Kyle_Wescott
Tourist
6 0 2

Actually, I'll just share it now.  I think you use liquid for the variables. I don't believe you can do the customer names or addresses because the liquid variables the order confirmation page uses don't seem to split these up into first name, last name, street address, zip etc.  I could be wrong though.

THIS CODE MIGHT BE WRONG

<!-- Google Ads Enhanced Conversions -->
<script>
var enhanced_conversion_data = {
"email": {{ order.email }},
"phone_number": {{ order.phone }},
};
</script>
<!-- END Google Ads Enhanced Conversions -->

DWTK
Excursionist
19 0 2

Thanks for the help! Any update on whether it got verified for you?

NickHo
Tourist
5 0 2

Thanks for your sharing. Should I add the script in the theme.liquid? Or, which liquid should I add it? Thank you!

DWTK
Excursionist
19 0 2

I forgot to ask - where did modify the global site tag since Shopify automatically handles that? I didn't have to manually install the global site tag.

  • Add “{'allow_enhanced_conversions': true}” to the config line to your global site tag that triggers across all pages.

 

Ultrabender
Excursionist
24 2 12

This is an accepted solution.

Hello,

This tutorial is very interesting and perfectly functional:

https://feedarmy.com/kb/adding-adwords-conversion-tracking-to-shopify/

DWTK
Excursionist
19 0 2

Just what I needed, thanks so much!

NickHo
Tourist
5 0 2

Thank you so much. Just try to follow his guidance. 

Kyle_Wescott
Tourist
6 0 2

Not verified yet so it's probably broken.  I'm going to try the solution below.

Czarto
Shopify Partner
70 2 28

Here is a simpler solution to this, that doesn't require any code changes and uses existing Shopify javascript variables on the checkout page.

NOTE: This assumes you have the Google Shopping App already installed for you Google Ads conversion tracking, but I *think* it should still work even if you don't.

 

  1. Turn on Enhanced Conversions in your Purchase conversion action
  2. Enter your site URL (ideally your order receipt / thank you page)
  3. Choose the Global Site Tag
  4. Select "Enter Javascript or CSS Selectors"
  5. Email: Javascript&colon; Shopify.checkout.email
  6. Phone: Javascript&colon; Shopify.checkout.phone
  7. Name and Address: Javascript&colon;
    • Shopify.checkout.billing_address.first_name
    • Shopify.checkout.billing_address.last_name
    • Shopify.checkout.billing_address.address1
    • Shopify.checkout.billing_address.city
    • Shopify.checkout.billing_address.province_code
    • Shopify.checkout.billing_address.country_code
    • Shopify.checkout.billing_address.zip

 

A full writeup of this and other tweaks to make to Shopify's conversion tracking available here:
https://business.czarto.com/2020/09/29/shopify-google-ads-conversions/

Screen Shot 2021-08-05 at 8.43.09 AM.png

 

 

DWTK
Excursionist
19 0 2

Fantastic! I was having a difficult time figuring out how to pull this off with the Google channel already activated.

I'm curious about the attributes used for the JavaScript setup and why they differ from the other guide which suggested using these:

  • Email
    • enhanced_conversion_data.email
  • 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

 

EDIT: Google support was able to verify that I have it correctly set up using the settings I just pasted. So maybe there are multiple ways of doing it?

Amar_Gandhi
Shopify Partner
9 0 1

You can also use this app to get it done if you are like me and don't like coding or are not very technical 

https://apps.shopify.com/magic-google-ads-tracking-1

Czarto
Shopify Partner
70 2 28

I think there are definitely multiple ways of doing this as there are multiple ways to get the customer information. 

DWTK
Excursionist
19 0 2

Ahh, I see.. I'm going to try your setup instead since the other one created this error: 

Customer data validity: Make sure your customer data is formatted correctly.

ekuplu
Shopify Partner
39 0 6

Dear all, 

We have created an in-depth tutorial and an updated code block for Google Ads Enhanced Conversion Setup on Shopify. Click here to see the tutorial, you can also leave your questions in the comments section of the tutorial or here. 

Complete Tutorial: Setup GA4 on Shopify including E-comm Reports

Data Analytics & Marketing Focused Content Platform for Shopify Merchants: Analyzify Hub

Check out our free Shopify - Google Tag Manager Course on Youtube
Yakovhertz
New Member
4 0 0

Have you figured this out yet? I'm not sure what code to enter for the javascript variables.

DWTK
Excursionist
19 0 2

This one ended up working for me: https://business.czarto.com/2020/09/29/shopify-google-ads-conversions/

I thought there was an issue, but it seems to have resolved itself.