2024 Complete Shopify Google Ads Enhanced Conversions Tracking Setup Guide (With Code, No Plugins, No GTM) (41)
Shopify Pixel greatly simplifies Google Ads tracking setup. Complete guide to setting up Google Ads Enhanced Conversions tracking without Google Tag Manager or third-party plugins, with full code included.



Preface
Let me give newcomers a shot in the arm early:
Since the appearance of Shopify Pixel, it has greatly simplified the tracking conversion settings for Google, Meta, TikTok, and Pinterest.
This issue will focus on how to set up Enhanced Conversion Tracking for Google Ads.
Let me put up a shield early - there are actually multiple methods and tools that can achieve this. Please view it dialectically and choose the method that suits you.
This issue will not use Google Tag Manager, and there are no third-party plugin advertisements.

Prerequisites
- Shopify has Google & YouTube installed, and your Google account has been successfully bound. (And it's strongly recommended to install Google Analytics 4 following the instructions - this is not covered in this tutorial)

- Your Google account is functioning normally.

Let's Go: Create Conversion Tracking Goal in Google Ads







At this point, Google will monitor whether you have installed the Google code and which SaaS platform your website uses.
If Google code is already installed: (Note! For most Shopify players, if you've completed the prerequisites and opened Google Analytics in the Google & YouTube app following the instructions, you've actually already had the code installed by default!)
If not installed (in my case, the website is WordPress, so Google detected WordPress and guided me to continue):







In rare cases, if we haven't installed it, we need to insert the code: Copy the above code and enter Shopify, go to theme code editing, and paste it under <head> in the theme.liquid file, then save.
After the code installation is complete (or if you already have it), it will show that your tag has been detected.
Add Event Code
The next step is quite important, and there are multiple ways to handle it. But the core task is that we need to put these event codes on the website so that relevant event actions can be correctly identified (such as purchase, begin checkout, add to basket, etc.)



Open the event snippet, copy the code and paste it somewhere else for later use.
Add Custom Pixel in Shopify
Next, return to Shopify and add a custom pixel here:


Give it any name, and for the code snippet, you can directly copy:
const script = document.createElement('script');
script.setAttribute('src', 'https://www.googletagmanager.com/gtag/js?id=AW-1111111');
script.setAttribute('async', '');
document.head.appendChild(script);
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-1111111', {'allow_enhanced_conversions':true});
analytics.subscribe("checkout_completed", (event) => {
gtag('set', 'user_data', {
email: event.data?.checkout?.email,
phone: event.data?.checkout?.phone,
address: {
first_name: event.data?.checkout?.shippingAddress?.firstName,
last_name: event.data?.checkout?.shippingAddress?.lastName,
street: event.data?.checkout?.shippingAddress?.address1,
city: event.data?.checkout?.shippingAddress?.city,
region: event.data?.checkout?.shippingAddress?.province,
postal_code: event.data?.checkout?.shippingAddress?.zip,
provinceCode: event.data?.checkout?.shippingAddress?.provinceCode,
country: event.data?.checkout?.shippingAddress?.country,
countryCode: event.data?.checkout?.shippingAddress?.countryCode,
}
});
gtag('event', 'conversion', {
send_to: 'AW-1111111/d11lvsao1niubi11',
transaction_id: event.data?.checkout?.order?.id,
value: event.data?.checkout?.subtotalPrice?.amount,
currency: event.data?.checkout?.subtotalPrice?.currencyCode,
});
});Important: Please replace AW-1111111 in the code with your actual Google Ads ID, and replace AW-1111111/d11lvsao1niubi11 with your actual conversion ID.


Complete Setup
Then return to Google Ads and continue with various saves. Done.


When you move your mouse over the status of this tracking goal, you'll see its status.
Generally speaking, if your site has continuous conversions, the first green checkmark will appear after several hours; wait another 1-3 days, and the second enhanced conversions green checkmark will appear.




Other Settings Check
For some old accounts, you can check whether you've enabled this feature overall.









FAQ


