After completing over one hundred audits of Google Ads accounts for Shopify businesses, I am dumbfounded at the number of accounts that don’t have accurate conversion tracking set up. Agencies and store owners will spend tens of thousands each month with no idea what, if any part of the campaigns, generate sales.
One mistake is upsells in Shopify’s post-purchase page are rarely tracked. Another mistake we see every month in Shopify is the failure to consider multiple currencies due to Shopify Markets or the multi-currency feature. The features let users shop in their local currency. A 20,000 South Korean won purchase equal to US$17 ends up looking mighty fine when Google receives it as US$20,000 order.
The most common Google Ads tracking mistake we see in Shopify is someone installs some version of a tracking code. When it’s time to set up a shopping feed in Shopify, they need a simple solution given their lack of technical skills so they install Shopify’s Google channel. The channel installs its own conversion codes. The result is usually a doubling-up of purchase data to bloat the account manager’s ego that they are raking in coin. Here’s an example of this from a recent audit:
You have to know what searches, ads, products, and audiences succeed or fail at bringing in your ROAS goal. That requires accurate tracking.
This tutorial covers how to create the most perfect Google Ads conversion code you can with the latest features of cart data (basket data) and enhanced conversions using Shopify’s latest Customer Events. These features result in more purchase and customer data. You’ll get the exact solution that we use on client stores to help Shopify stores grow through Google Ads.
There are three ways to set up Google Ads conversion tracking in Shopify.
Option 1: If you accurately track sales in Google Analytics, the quickest solution is to import your transactions as a conversion goal. See the steps to import transactions from analytics to Google Ads. View-through conversions are not tracked. We never use this method.
Option 2: Google channel in Shopify. This option is better than the first because it is more foolproof. People still stuff this by doubling up with other purchase conversion events. You get a variety of additional conversions automatically created like “Add to Cart” and “Begin Checkout”. The data doesn’t distort reporting because the events are excluded from the “Conversions” reporting column and associated metrics.
The downside of the option is it makes no use of cart data and enhanced conversions that result in more data and more conversions. This tutorial shows you how to implement these features. Here’s a comparison of the how much better this code that I’ll give you performs versus what Shopify tracks, for one of our Google Ads clients.
Option 3: Manual implementation with full features covered in this guide. The tutorial covers how to edit the existing Google Ads conversion code and add to it the latest features for ecommerce. The post-purchase page is also included to track upsells. We use this option to help Shopify stores grow.
I also like our option over importing a purchase conversion through Google Analytics because my testing has repeatedly shown sales through Google Ads are lost to the (direct)/(none) traffic source in Google Analytics due to cross-domain tracking limitations or other marketing channels depending on your attribution settings. For one of my Google Ads clients I was able to attribute more than double the sales of Google Ads with the conversion tracking code compared to analytics. That level of data accuracy can be the difference between the death of a business and it thriving.
Here we go.
Step 1. Create Your Conversion in Google Ads
1. In your Google Ads account from the top-right, click the spanner icon. Under the “Measurement” column, go to “Conversions”:
2. Create a new conversion. Click “Website”.
3. Enter your website domain then click “Scan”. We don’t care about this step, but have to do it to get to the next step.
4. Click “Add a conversion action manually”. Use the following settings for your conversion:
- Category: “Purchase”.
- Click “Conversion action optimisation options”. The setting lets you decide if these conversions should be included in your “Conversions” and “Conversion value” columns. A primary action is added to your “conversion” columns and can be used for bidding. A secondary action is included in your “all conversion” columns. Select primary. The secondary option can be helpful when debugging since the data won’t affect campaigns.
- Name: The name can be anything. I recommend “Purchases with Cart Data”.
- Value: “Use different values for each conversion” and select the currency used in your Shopify store. It is okay if this currency is different to your ad account as Google will do the currency conversion. You could enter your average order value (AOV) taken from Google Analytics as the default value. Your average order value can be gather from the “Conversions” > “Ecommerce” > “Overview” section. However, as you’ll see, this value is never empty because we’ll replace this with a liquid variable that contains the order amount in dollars.
- Count: “Every”.
- Conversion windows: “30 days”. If your products cost more than $200 or you know customers take weeks to research a product before buying, extend the value to “90 days”.
- Engaged-view conversion window: “3 days”.
- View-through conversion window: “1 day”.
- Attribution: “Data-driven” if available otherwise “Linear”. Let’s say a person clicks one ad then returns to Google for another search. They then click another ad and buy. The first ad should receive recognition for the sale so you can more accurately optimise campaigns with this data. The linear model means each ad and search term will get 0.5 of a conversion. If you used the last-click option, the first ad would get 0 and the second ad would get 1 conversion. Never use the last-click option because it ignores the effect of upper funnel ads. We will geek out on the various models soon. Linear is a good default.
Your event tag options will look something like:
5. Save to finish creating your conversion code in Google Ads. Before we install the code yourself, I want to educate you about attribution.
Picking the Perfect Attribution Model
If someone clicked on you Google Shopping ad, looked at a product but didn’t buy, then later returned to the site through a branded search ad before purchasing, would you attribute 100% of that purchase to the branded keyword? Unfortunately, most stores use an attribution model that ignores earlier interactions.
Attribution modelling in Google Ads and Analytics is a set of rules that determines how each transaction or conversion is credited. Within Analytics, the last-click model is most commonly used by novices to measure sales and goal completions. It attributes 100% of the sale to the last action, such as organic search, with how the user accessed the website. The first click model does the opposite granting 100% to the first interaction. Realistically, ecommerce stores see a journey with a variety of interactions before a user becomes a customer. This is why you must consider what model is best.
Here are all the attribution models and what I think of them:
Linear: I recommend this model when you first set up your attribution modelling. It attributes the sale evenly across all touchpoints or interactions the customer has throughout their buying cycle. This will help you understand how each platform in your multi-channel marketing strategy influences revenue. For example, if the customer originally came to the site through a Facebook product ad, came back again through Google Shopping, came back again via a search ad, and eventually arrived at the site organically, there was four touchpoints. The linear attribution model will award 25% of the sale to each channel.
First click: This model awards 100% of the conversion or sale to the first interaction or touch-point the customer had. It is useful to identify how your customers are finding you, but the model disregards later touch-points the visitor has with your business. You will not know what led to the sale when there is more than one click.
Last click: The opposite of first click attribution—it attributes 100% of the sale to the last interaction had by the customer. It is unknowingly favoured by online retailers because the last interaction is what got the customer over the line. No store these days has every sale come from a single channel. Last click doesn’t give you this information.
Position-based: The model is a mixture of all of the above but with the majority of the conversion (about 80%) split between the first and last click. The remaining 20% is attributed to the middle of the funnel. This can work for ecommerce retailers. Those with expensive items may find the model fails to give middle touch-points enough attribution since product price is correlated with a customer’s depth of research.
Time decay: The most complex model of all of them. Time decay puts the most emphasis on the last click, but it attributes a percentage to other touch-points in the journey. The touch-points furthest away from the sale get the least attribution, building up to the most attribution at the final touch-point. This model is worth considering if your customers take a long time-to-purchase.
Data-driven: An automated attribution method that uses real historical data. Google will look at many data points to build your own attribution model. You may not have this model available as it initially requires 600 conversions through a single conversion action over 30 days. Use it when you meet the requirements. You can learn more about data-driven attribution.
For further help in selecting the best attribution model once your campaigns progress, refer to the Model Comparison Tool. You get to test the affect each model has on your data.
Step 2. Edit the Google Ads Conversion Code for Shopify and Add All Features
1. In the details of the new conversion action, click “Tag Set-Up”:
2. Click “Install the tag yourself”. You will see a Google tag and then a standard event code responsible for purchase tracking that looks something like:
<!-- Event snippet for Purchases with Cart Data conversion page --> <script> gtag('event', 'conversion', { 'send_to': 'AW-880346044/44BbCP7Vz3AQvIfkowM', 'value': 188.0, 'currency': 'AUD', 'transaction_id': '' }); </script>
Copy the send_to
variable somewhere for use soon.
We’re going to jazz up the standard purchase tracking code with more than sparkles and cologne. We’re putting the standard code under full anaesthetic for a total body transformation. You don’t need technical knowledge to do it.
3. Copy this template code:
// Google Ads purchase tracking including enhanced conversions and conversions with cart data digitaldarts.com.au/google-ads-conversion-tracking-shopify v1.0 // Enter your settings var aw_id = "AW-GOOGLE_CONVERSION_ID"; // Google Ads conversion ID. var send_to = "AW-XXX/XXX"; // The send_to variable from the Google conversion code. var aw_merchant_id = "YYY"; // The Google Merchant Center ID. var aw_feed_country = "AU"; // The country associated with the feed. Use CLDR territory codes. var aw_feed_language = "EN"; // The language associated with the feed. Use ISO 639-1 language codes. var product_id = ""; // The format of product IDs in the Google Merchant Center feed. 3 accepted values: "sku" (SKU of the variant e.g. aga-012), "id" (variant ID e.g. 21283160948841), or "" (leave blank for product ID underscore then variant ID e.g. 28541777_212831609) var prefix_product_id = "shopify_AU_"; // Leave blank if there's no prefix required for product_id. Needed if product_id is blank so 123456_789012 becomes shopify_AU_123456_789012 // Do not edit below const script = document.createElement('script'); script.setAttribute('src', 'https://www.googletagmanager.com/gtag/js?id='+aw_id); script.setAttribute('async', ''); document.head.appendChild(script); window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', aw_id); //Google Consent Mode v2 gtag('consent', 'update', { 'ad_personalization': 'granted', 'ad_storage': 'granted', 'ad_user_data': 'granted', 'analytics_storage': 'granted' }); analytics.subscribe("checkout_completed", (event) => { var digitalDarts = { dataLineItems(lineItems) { let items = [] for (const item of lineItems) { let item_id; if (product_id === 'id') { item_id = item.variant?.id.toString() } else if (product_id === 'sku') { item_id = item.variant?.sku.toString() } else { item_id = (prefix_product_id + item.variant?.product?.id + '_' + item.variant?.id).toString() } items.push({ 'id': item_id, 'quantity': item.quantity, 'price': item.variant?.price?.amount }) } return items } } // Calculate the discount amount const calcTotalDiscountAmount = (lineItems) => { let totalDiscount = 0; lineItems.forEach(item => { item.discountAllocations.forEach(discount => { totalDiscount += parseFloat(discount.amount.amount); }); }); return totalDiscount.toFixed(2); }; const totalDiscountAmount = calcTotalDiscountAmount(event.data?.checkout?.lineItems); gtag('set', 'user_data', { 'email': event.data?.checkout?.email, 'phone': event.data?.checkout?.phone, 'first_name': event.data?.checkout?.shippingAddress?.firstName, 'last_name': event.data?.checkout?.shippingAddress?.lastName, 'address1': event.data?.checkout?.shippingAddress?.address1, 'city': event.data?.checkout?.shippingAddress?.city, 'country_code': event.data?.checkout?.shippingAddress?.countryCode, 'province_code': event.data?.checkout?.shippingAddress?.provinceCode }); gtag('event', 'conversion', { 'send_to': send_to, 'transaction_id': event.data?.checkout?.order?.id, 'value': event.data?.checkout?.totalPrice?.amount, 'currency': event.data?.checkout?.currencyCode, 'discount': totalDiscountAmount, 'aw_merchant_id': aw_merchant_id, 'aw_feed_country': aw_feed_country, 'aw_feed_language': aw_feed_language, 'items': digitalDarts.dataLineItems(event.data?.checkout?.lineItems) }); });
4. Log into the admin section of your Shopify store. Go to “Settings” > “Customer events”. Click “Add custom pixel”. Name it “Google Ads Tracking”.
5. Paste the template code.
6. You’ll now edit the top part of the code:
- Replace
AW-GOOGLE_CONVERSION_ID
with your Google Ads conversion ID. - Set the ID variables based on your shopping feed:
- There’s three accepted values of
sku
(SKU of the variant e.g. aga-012),variant-id
(variant ID e.g. 21283160948841), or leaving it blank (product ID underscore then variant ID e.g. 28541777444969_21283160948841). To see what to select based on the ID format you’re using in the feed, log into Merchant Center, click “Products” then “All products”. View the column “Item ID”. You may also find it helpful to log into the Shopify admin then cross-check a product’s settings with Merchant Center. When editing product pages in the Shopify admin, the last number in the URL is the product ID. You can see if this value is used in the ID format of your feed. - Replace
shopify_US_
with the prefix for the ID format in your feed. Leave blank if there’s no prefix. A prefix is only needed ifproduct_id = ""
. This is so 28541777444969_21283160948841 becomes shopify_AU_28541777444969_21283160948841 in order for the format to match the “Item ID” values you see in Merchant Center, which is the most common ID format in Shopify feeds.
- There’s three accepted values of
- Set your variables for Google conversions with cart data.
AW-XXX/XXX
is thesend_to
variable from the Google conversion code. This value is inside the “Event snippet” of the conversion. - Replace
YYY
for theaw_merchant_id
variable with your Google Merchant Center ID. You can get this number from the very top-right corner of your Merchant Center account. It is typically a seven to nine digit number. - Replace
AU
with the country associated with the feed. Use CLDR territory codes. - Replace
EN
with the language associated with the feed. Use ISO 639-1 language codes.
6. Adjust the permission settings to suit your store and legal requiremetns. Stores in the EU are required to have a cookie compliance banner where users opt-in to accept tracking. Such stores would select “Marketing” and “Analytics”. If there are no requirements, select “Not required” for the most complete tracking accuracy.
7. Click “Save” in Shopify and “Connect” to make the pixel live. You now have the best way to track purchases with all the latest Google Ads conversion features.
Step 3. (Conditional) Track Purchases in Shopify on the Post-Purchase Page
If you have upsells that use Shopify’s native upsell feature, you need to configure the post-purchase page to track purchases. The method below will track purchases when an upsell is never seen, rejected, ignored, or accepted. All Google Ads conversion features set up on the order status page including enhanced conversions, cart data, and new customer acquisition reporting, are done on the post-purchase page.
Google Tag Manager is used since Shopify’s Customer Events doesn’t push any events for upsells. I know, how stupid.
1. Copy our dataLayers for the post-purchase page from our Google Analytics guide. In the Shopify admin, paste it in the “Additional scripts” of the “Post-purchase page”. There’s nothing to add or modify in the code to make function for what we’re about to do with Google Ads.
2. Replace GTM-XXXXXXX
with your Google Tag Manager ID and https://shopifydemo.com
with the domain of your store.
3. Download our GA4 for Shopify Google Tag Manager container.
4. In Google Tag Manager, click “Admin” > “Import Container”.
5. Choose the downloaded container file. For the “choose workspace” option, select “Existing”. If you have nothing set up in Google Tag Manager, click “Merge”. Click “Confirm”.
6. Click the “GAds – post-purchase – purchase” tag then enter your values for:
- Conversion ID.
- Conversion label.
- Merchant ID. Use the same merchant ID in the tracking code set up earlier.
- Feed country. Use the same feed country in the tracking code set up earlier.
- Feed language. Use the same feed language in the tracking code set up earlier.
Use the same conversion action you set up earlier in the guide for the order status page. The conversion ID and label can be found in the conversions of Google Ads, click on the conversion. Select “Tag set-up” then click “Use Google Tag Manager”:
The “GAds – post-purchase – purchase” tag will look something like:
7. Submit the GTM container to make it live.
Enhanced conversions on the post-purchase page is unfortunately limited to only the customer email. While Google would like to see more information with the customer’s phone number and address, these are unavailable.
Step 4. (Optional) Server-Side Tracking
In my course to scale your Shopify store, Clear Cut Growth, I suggest working towards a server-side setup. To help you understand how to do this, I’ll take this lesson from the video course.
Conversion tracking is imperfect because there’s ad blockers that stop tags from loading, cookie limitations, privacy laws that limit what can be collected, browser controls, and app updates that change what is possible. That doesn’t even include the technical challenges of implementation with code errors or data accuracy.
If you ignore this because it’s too hard, you are starving Google’s algorithm. You’re inhibiting Google from learning what works for your campaigns, which leads to inaccurate predictions, inefficient spending, and ultimately, subpar results. Don’t deprive your campaigns from the food it needs to grow.
To help you with your conversion tracking, I see it in three levels. There’s the minion level, which is where to begin. You want purchases tracking on the data-driven attribution model—most likely through a simple Google Analytics import. You want your analytics tracking to be as accurate as possible otherwise you will have sales that go untracked or attributed to your payment gateway like PayPal.
You don’t want to stay at this level since you’ll miss a lot of data. The attribution in a Google Analytics imports is weak. There’s no advanced tracking features that help you make decisions. Also, multi-device tracking is lacking, so that traffic numbers are likely inflated.
The second level of conversion tracking is the manager level. At this stage, you’ve got purchase tracking done through the Google Ads conversion code with all possible features. You’re at the manager level by following this guide.
At the master level, you’ve got all conversion features implemented in a server-side solution. You’re also tracking all secondary conversions like wholesale form enquiries or phone calls.
Server-side tracking offers a more reliable and secure method for collecting user data on your website. It bypasses the limitations of client-side tracking, such as ad blockers and privacy settings, resulting in a more complete picture of user behavior. When you have server-side tags, you will probably see 10-20% more purchases tracked.
To set up your own server solution, you need a third-party tool to process the data since it doesn’t happen at the browser-level. I suggest Stape.io. By checking a few checkboxes, you can get set up and use their datalayers. You need to create the Google Ads conversion container yourself in a server-side Google Tag Manager workspace.
The master level also means you’re using a third-party attribution tool like Triple Whale to supplement your decisions. Triple Whale is a fantastic tool to make campaigns more profitable as it gives you extra insight for decisions.
When you see your conversion tracking through this model of minion, manager, and master, you can put in the work overtime to achieve the highest level.
How to Test Google Ads Conversion Tracking in Shopify
We’ve yet to run into issues with the above code for our Google Ads Shopify clients. The only problems I’ve encountered came when using the old “Additional scripts” section, instead of “Customer events”, and there were other scripts in conflict or giving errors that stopped Google Ads conversion tracking from firing. Shopify’s “Customer events” is meant to stop any such conflict.
To test what is output, just before the final line });
, add the following:
// ** Debugging console logs (comment out for production) ** console.log("** User Data **"); console.log("Email:", event.data?.checkout?.email); console.log("Phone:", event.data?.checkout?.phone); console.log("First Name:", event.data?.checkout?.shippingAddress?.firstName); console.log("Last Name:", event.data?.checkout?.shippingAddress?.lastName); console.log("Address:", event.data?.checkout?.shippingAddress?.address1); console.log("City:", event.data?.checkout?.shippingAddress?.city); console.log("Country Code:", event.data?.checkout?.shippingAddress?.countryCode); console.log("Province Code:", event.data?.checkout?.shippingAddress?.provinceCode); console.log("** Conversion Event Data **"); console.log("Transaction ID:", event.data?.checkout?.order?.id); console.log("Value:", event.data?.checkout?.totalPrice?.amount); console.log("Currency:", event.data?.checkout?.currencyCode); console.log("Discount:", totalDiscountAmount); console.log("aw_merchant_id:", aw_merchant_id); console.log("aw_feed_country:", aw_feed_country); console.log("aw_feed_language:", aw_feed_language); console.log(digitalDarts.dataLineItems(event.data?.checkout?.lineItems));
Save the pixel then click “Test”.
The pixel helper is useful to see what data is available for the checkout_completed
event in case you’re not collecting the right data.
Couple the pixel helper with the detailed console.log
commands, and you’ll see everything you need!
To debug the post-purchase page, see the troubleshooting section of our Google Analytics for Shopify tutorial.
For other debugging, go to the conversions section in Google Ads, click on the conversion, then click on “Webpages” from the top to view what pages are triggering the conversion. There’s also an enhanced conversions diagnostics report.
Dynamic Remarketing
Dynamic remarketing lets you show relevant products to people, as they browse the web, based on how they’ve interacted with your store. I’ve got a tutorial to set up dynamic remarketing in Shopify in my free Google Shopping for Shopify book.
Alternative: Google Analytics Import
The primary method shared above will work with everyone. However, there is another way that requires Google Analytics. You may want to resort to this solution while you get the better method implemented.
1. Go through my Google Analytics setup for Shopify to get clean data in Analytics. Your goal is to have your source/medium report in Google Analytics with conversion data attributed to traffic sources like google / cpc:
2. Create a new conversion. Click “Import”.
3. Select the type “Transaction” from the primary view you use in Google Analytics that has the most complete and accurate data.
4. Click “Import and Continue”.
5. Once you’ve created the goal, click the conversion name to view its settings. Change your attribution window and model following the advice earlier. You are done importing transaction data from Google Analytics into Ads.
As a Shopify Marketing Expert and Google Premier Partner, our ability to set up conversion tracking and use all conversion features, is a tiny sample of the expertise Shopify clients get when we manage their Google Ads. If you’d like us to take away the stress of doing paid advertising well, get in contact with us. See our Google Ads service for Shopify stores.
Liked this article? Get more free Shopify guides:
Enter your primary e-mail address to receive notifications when there are new educating Shopify tutorials and free practical tips to increase sales. You'll also immediately download a 30+ page deck "4 Rules of Store Growth: To Sell More on Shopify, Escape Work You Hate, Boost Profit, and Have a Business You're Proud Of".
205 Comments.
Thanks for your article, it’s been really helpful 🙂
Just one issue I’m experiencing: conversions are being tracked by Adwords like twice the real amount… I have set the “{% if first_time_accessed %} -tracking code- {% endif %}” tags to avoid the code running again when the user comes back to visit the status page, but even doing that the issue persists… Do you know what could be wrong? We can’t take the information Adwords give us seriously to take campaigns decisions, it’s a real problem. Thanks for your help!
Mine is set up right according to your instructions, but no conversion data is being shown in Adwords (and there should be.) Initially, conversions were being attributed to “referral traffic” so I added the “checkout.shopify”, paypal, and my own domain, to the “referral exclusions list”, however still no conversions are being attributed to Adwords. I went back through my GA Import steps and all are set up as you outline. One note, I decided to change from “last click” to “first click” attribution just in case something about the click attribution is throwing off the tracking. Any thoughts?
I recommend last-click attribution for most campaigns. Changing of this setting should only be done for marketing goals rather than technical issues. Sounds like you are using an analytics import goal in which case you must go through my guide mentioned.
Thanks for this tutorial. But if I just pasted this code provided without some further edits it would be wrong correct? Just want to make sure, in step #2, with web browsers with javascript disabled. I can’t just paste that code provided here, without also making sure my conversion_id, conversion_label and conversion_currency match my original code provided by Google right?
Does this work if I’m using the Shopify Lite version which is just the “Buy Button”?
I haven’t tested on Shopify Lite, but if you get to the thank you page on checkout.shopify.com after payment, which loads the code, it will work.
I too am using the Shopify Buy button and Shopify Lite. So everything is hosted on my own website at one domain then at checkout it opens a second window with the .myshopify.com URL.
Will your instructions work or is this cross domain thing mean I need extra steps?
Hey Joshua, thanks for the tutorial,
In the script i get from Google i don’t have the line : var google_conversion_value = 1.00;
Should i add anyway : if ({{ subtotal_price }}) { var google_conversion_value = {{ subtotal_price | money_without_currency }}; }
When setting up the conversion code in AdWords, select the value field that is suggested in the guide. This insert the google_conversion_value line. It may work if you insert the custom-coded line, but just follow what is suggested.
This isn’t really clear. What suggested value? Why does “This insert the google_conversion_value line. ” mean?.
Thanks for the tutorial Joshua..
In the “Shopify additional content & scripts” in the checkout tab, I already have a code for google trusted stores, so can I just put both codes together; one after another? or this won’t work?
Hi Joshua,
Thanks for this, very useful!
How do you stop duplicate conversions being tracked in Google Analytics when someone revisits the thank you page?
Just wanted to know if i can use 2 separate codes in additional script section?
Other code as you’ve seen in the guide can be placed inside the additional script section. It’s a question of what you’re trying to do.
Hi Joshua,
In an email, I asked you if I should use the same conversion tracking tag for two separate Shopify stores and you told me to create a new conversion code for the second store.
However, when I try to create a second code, Adwords just keeps giving me a code with the same conversion ID. So, how do I go about creating a second tag with a unique conversion ID?
Thanks!
Norma
There’s no problem Norma. The google_conversion_label will be different between conversion codes.
Thanks, Joshua!!
Hi Josha – i just edited per your instructions within the additional scripts box on Shopify. But, I pasted the original script from Google right beneath the affiliate conversation tracking script – is this OK?
It doesn’t matter if you place the conversion tracking code before or after other code. You should not use the original conversion script for Google.
Will this now need updating inline with the new Google Conversion tracking pixel? E.g I have received this email from google “We strongly recommend that you replace your pixel-only conversion tags with the new website conversion tracking tag in AdWords. The pixel-only conversion tags that you are currently using on your site(s) are unable to measure conversions on Safari. If you don’t take any action you will no longer be able to measure conversions on Safari.
The new tag consists of two snippets that are only available in the new AdWords experience, which is now accessible to all advertisers. Here are the steps you should follow to create and implement the new tags:
1. Log into the new AdWords experience (the Conversions page)
2. Click the website conversion action for which you want to update the tag
3. Expand the “Tag setup” panel at the bottom of the page
4. Follow the instructions on this page to install both tag snippets:
a. The global site tag snippet should be placed on all pages of your website so it can set new cookies on your domain, which will store information about the ad click that brought a user to your site. You only need one global site tag snippet across your entire website, even if you track multiple actions.
b. The event tag snippet should be installed on the conversion page(s)”
Yes Anthony, it can be updated. Accounts are still in transition to the new AdWords interface and following the above tutorial still works great for everyone and will continue to. I will update it probably in a few weeks. It’s a lot simpler to do. The code you’ll want to use for registering a conversion is:
Hi ! Where do we post the global site tag?
It will need to go in the “Additional Google Analytics Javascript” section. However, you cannot copy and paste the code. I have started to work on a solution for the new tag, but this is not confirmed to work:
(function(d){
var s = d.createElement("script");
s.src = "https://www.googletagmanager.com/gtag/js?id=AW-XXXXX";
s.async = 1;
d.body.appendChild(s);
})(document, window);
You should use the old tag as that is the most supported solution.
Looks the old code like this:
ga(‘set’, ‘userId’, “cid”);
Thanks for the article, very clear and helpful.
Hi Joshua
Thanks very much for your instructions which I have followed for our website at http://www.losari.com.au.
Some of our clients use discount codes and I have just noticed that the sale amount are being reported in Analytics with the full purchase price, rather than the discounted price. Are you able to please tell me how to amend the Adwords conversion code to take the discount into effect?
Many thanks
Jonathan
Hi Joshua,
How come my conversion code is so different? Below is the Event snippet. How do we replace with the new generated revenue tracking?
function gtag_report_conversion(url) {
var callback = function () {
if (typeof(url) != ‘undefined’) {
window.location = url;
}
};
gtag(‘event’, ‘conversion’, {
‘send_to’: ‘AW-937539801/hL49COrXsHkQ2fGGvwM’,
‘value’: 1.0,
‘currency’: ‘USD’,
‘transaction_id’: ”,
‘event_callback’: callback
});
return false;
}
Hi Kelvin,
If you’re using the new AdWords interface, which most AdWords accounts are now, you will get the new gtag code. I do not advise using it because Shopify is not yet setup for that tracking code. Swap back to the old interface and you will be able to get the “old” code I suggest.
Hey Joshua,
But if he swaps back to the old code, doesn’t that mean he will miss conversions from Safari? (if he’s in any of the western countries, Safari would not be an insignificant volume of traffic).
Joshua Thank You for this Info.
I need to start simply by tracking all leads to my site; what should I change the tag to in my case ?
Hey dude did you figure out what to do with the new code yet?
So far we’ve got this, which we put in Checkout -> Additional Scripts :
gtag(‘event’, ‘conversion’, {
‘send_to’: ‘XXXXX/XXXXX’,
‘value’: {{ subtotal_price | money_without_currency }},
‘currency’: ‘AUD’,
‘transaction_id’: ‘{{ order.order_number }}’
});
BUT where tf are we supposed to put the Global Site Tag? Will it still work if it’s just in the HEAD section?
I set up Google Ad words tracking exactly like this but I’m still not getting an accurate reporting. When I look at my Google Anaylitcs report for Adwords it’s different than the number of conversions I have in Google Adwords dashboard. Is it cause conversions are set to 30 days from the first click? or something else that could cause Google Adwords to report more conversions than I’m getting daily?
Will tracking conversions this way work when embedding the shopify store with in a wordpress website?
Can I paste the google conversion tracking straight below my Facebook pixel code in “additional scripts”.
Or is it just possible to have either the fb pixel oder google conversion tracker pasted there?
It sounds like you’re not using Shopify’s native Facebook pixel integration as that has its own field. If your FB pixel is in the additional, yes, the Google Conversion Pixel code can also be in there. Other codes can be inserted there.
Hi – Is it still a problem to use the tracking code from the new Adwords interface?
Thanks.
You can Jared. You just need to put the universal gtag snippet also on the thank you page. Page views may double fire though given the standard ga pageview snippet will still be sent through.
I have finally updated the guide to use gtag. I recommend the solution given it works more accurately with Safari.
Awesome thanks!
Hi Joshua, I added the code as per your tutorial however my conversions aren’t being tracked anymore. Do I need to the event snippet for sales conversion page on the thank you page that you mentioned? I can’t see that page in my files. Thanks in advance.
I’ve had Shopify look at the code and I’m waiting for a reply.
Also, I realised that the shopify thank you page is the page where the code is added under settings.
Everything is setup correctly as per your tutorial but no conversions are coming through now so I’ve reverted back to the old code.
If you’d like to me to resolve any tracking or analytics issues Jared, I suggest reaching out to me on the contact form. It is something you want right, otherwise you will just mindlessly blow through ad spend.
Thanks for the offer. It’s working now.
Turns out I was missing a single quote in one of the values 🙁
Hello Joshua, great guide ! thanks !
I have a question. I have configured the Global Configure Tag as part of the Google Analytics Tracking code in the Online Store Preferences as I want to measure conversions in other pages (signups and similars). So I guess that my Global Configure Tag is for all pages and not only for the checkout page.
Should I use the “{ ‘send_page_view’: false })” under this configuration or it applies only when the Global Tag is set only for the checkout page?
Thank you very much
Hi Carlos,
gtag does not work with Shopify’s default analytics setup so I do not suggest using it there. If you want to use it “site wide” (which will exclude the checkout and is unavoidable), put the same global tag mentioned in the guide that excludes sending pageview data, in the theme.liquid file.
Thanks Joshua,
Let me see if I understand. In OnlineStore>Preferences>Google Analytics I pasted the Google Analytics Tracking Code and I added my AW conversion ID, in my case: gtag(‘config’, ‘AW-963238833’);
But this does not work, correct?
I am not familiar with Theme.Liquid, I am too rocky.
Is it safe to just copy and paste the Global Tag directly into the Theme.Liquid?
For the checkout page I guess I have to follow your indictions and paste the global tag and the event snippet in “Settings” > “Checkout” > “Additional scripts”. Correct?
Thank you very much for your attention
To setup Google Analtyics how I recommend, follow my analytics guide.
If you also want to use gtag.js, paste the global site tag snippet I provided above inside the theme.liquid. It is safe to edit. Put it right after the opening
<head>
tag.Thanks Joshua, you are very kind.
I have only one problem now.
When I use the original snippet everything runs ok. Google´s Tag Assistant identifies both the Global Site Tag and the Adwords Conversion Tracking.
But when I change
‘value’: 1.0,
with
‘value’: {{ subtotal_price | money_without_currency }},
Google’s Tag Assistant does not identify the Adwords Conversion Tracking. It only sees the Global Site Tag.
What can it be?
Interesting observation Carlos. Don’t worry about Google’s Tag Assistant in that case. You can confirm the value yourself by:
Thanks Joshua, really helpful blog post.
I happend to be using Danish Kroner as currency. I don’t really understand how to change the | remove: ‘.’ | replace: ‘,’, ‘.’ and where to insert the code
Hi Carl. I’m unsure how your exact currency is displayed. If the remove and replace filter example is right for you (which you can test by viewing it on the order status page – see the guide on how), then use:
{{ subtotal_price | money_without_currency | remove: '.' | replace: ',', '.' }}
Thank you Joshua. Really kind of you to reply so fast. And thanks for all this valuable content. Keep it up!
How do I do this with Google Tag Manager instead of installing the snippet into the theme.liquid? If I’m guessing correctly, I still have to use the snippet on the Setting > Checkout page in Admin and in the Additional Scripts box unless there is a way to make that Conversion Linker Tag work.
GTM fields are:
Conversion ID (Adwords gives me a value to input)
Conversion label (Adwords gives me a value to input)
Conversion Value (Is there where I input {{ subtotal_price | money_without_currency }}?)
Order ID (Is there where I input {{ order.order_number }}?)
Currency Code (guessing USD)
Then of course there are Conversion Linking and Tag Firing sections with fields as well. Or should I not even be using Google Tag Manager with Adwords for Shopify?
AdWords tracking in GTM is completely different to what this tutorial teaches. I suggest you read GTM tutorials if you’re asking about tag firing sections. They will help you more. I prefer to use the method in this article for all clients as it’s quick.
Thanks Josh!
Just checked on the order status page and I see the code which is great, but it is situated in the tags, I thought it had to be in the tags? does this matter?
Not sure what you mean by “in the tags”, Alex.
Sorry missed a word out there, found code in “body” tags not in “head” tags – I’ve checked and it has started tracking (thanks for the guidance by the way) but does the above matter?
The only issue with having it in the
<body>
like it is, is if people leave the page before the code gets a chance to load. This is so unlikely for someone who has just made a purchase. By the time the words on the page load, the tracking will have loaded.Great post – just what I was looking for! Your Shopify guides have been really helpful over the past couple of years! For this one, the conversion script is straight forward, but I’m still a little unclear as to where the gtag/Global Site tag should be located. We currently have the following installed in the two areas of Shopify:
*****Shopify > Online Store > Preferences > Google Analytics*****
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘UA-###’);
gtag(‘config’, ‘AW-###’);
*****Shopify > Settings > Checkout > Additional Scripts*****
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘AW-###’, { ‘send_page_view’: false });
Is this the suggested setup? I’m just unsure if we should have a version of the Global site tag in both the Shopify online store preferences and ALSO in the Shopify settings checkout scripts area. Any additional pointers would be greatly appreciated!
Hi LC,
This is a guide for Google Ads conversion tracking, but I answered your question in the tutorial. If you want to install gtag, you can use the suggested global gtag that has the send_page_view option set to false. I suggest putting it in the theme.liquid file. I don’t know if putting it in the additional scripts section is functional, though that is pointless given Shopify is not gtag compatible and you’d get everything you need.
Good post, thanks for sharing. Can I clarify why
gtag('config', 'AW-880123456', { 'send_page_view': false });
is needed? I thought this was to stop sending page view data to GA, however it appears you have appended this to the Google Ads account. Thanks.Hi Matt,
The
send_page_view
parameter does stop sending page view data to GA and it is not appended to the Google Ads code.Why do you recommend bother searching for and inputting AOV when the code is going to be changed anyway? Also, I think you should make it clear when adjusting the gtag not to get the adwords code mixed up with your sample code.
Thanks Joshua for the article, I need some help with this can you spare a couple minutes for me?
This is pretty cool. I especially like the localisation side of switching decimals to comma’s and the run once, which I’d never come across with Shopify, but makes sense from having localisations and internationalisation experience in other e-commerce and wider software. Thanks for writing up, especially the tips.
Hi Joshua – your tutorial is by far the best I have found. However I am still having issues when debugging (and verifying) the installed solution to Google Ads. My conversion actions page still indicates unverified. I have seen and verified the solution like you explained and it seems to be correct in the page but however when debugging through Chrome webdeveloper your script doesn’t trigger googleadservices.com like said in the Google Ad debugging instructions. Also when using the Google Tag Assistant I only see the global site tag but not the triggering conversion. Any ideas?
Hi Joshua, nice article. I have a little confusion on your “Alternative: Google Ads With Google Analytics Global Site Tag” section.
In that section you state
I would like to add the Global Site tag everywhere on my site in order to enable remarketing and I understand why it makes sense to set send_page_view to false. However, could I instead just not include the line “gtag(‘config’, ‘UA-76118106-1’);” in the Global Site tag (both in the theme and on the checkout page) at all?
We are using Shopify’s standard Google Analytics setup so I don’t know why I’d also want to include “gtag(‘config’, ‘UA-76118106-1’);” in the Global Site tag. It seems like it would be repetitive to include and lead to double counting page views unless there is some other interdependency that requires keeping that line of code?
I’m just not sure why I’d want to include “gtag(‘config’, ‘UA-76118106-1’);” in the Global Site tag in the theme and/or the additional checkout scripts if I also use Shopify’s standard Google analytics tag? Is it required in the Global Site tag to use remarketing? Maybe some other functionality / reason requires it in the Global Site tag even though we also use Shopify’s standard Google Analytics implementation?
Thanks,
Will
Hi Will,
My understanding is the gtag config command is required setup if you want to do anything with Google Analytics gtag (such as dynamic remarketing.) The setup you quoted that I described will work well and not double count page views. I don’t know why you’re looking to exclude the config.
Ahh, that makes sense. Thank you.
It sounds like if we do standard Adwords remarketing we could implement the Global Site tag without the line gtag(‘config’, ‘UA-76118106-1’, { ‘send_page_view’: false }); because standard Adwords remarketing only needs the Global Site Tag and a conversion event tied to our Adwords gtag. Basically, standard adwords remarketing doesn’t require a Google Anlytics gtag so we wouldn’t need to include it at all?
But to do Dynamic Remarketing we would want to include gtag(‘config’, ‘UA-76118106-1’, { ‘send_page_view’: false }); since Dynamic Remarketing requires the use of Google Analytics gtags? Further, not only do we need to include the Google Analytics gtag, we also need to use ‘send_page_view’: false to avoid double counting page views. The same would be true of anything else that required the use of Google Analytics gtags.
I haven’t tested it nor can find any documentation to confirm that is true, but I believe that’s all correct. Your second paragraph is what we do for clients.
Thank you very much! I did that for our Goggle Ads conversion tracking and it works NOW! I don’t know why Shopify doesn’t update the instructions. Thank you again!
You’re welcome. I’m sure Shopify will copy parts of this guide soon to update theirs 🙂
Hi Joshua
I have implemented the conversion tracking as described above. However the source code of the order status page (which I assume is the “thank you page” mentioned above) returns an error called “unexpected token” for the value line:
‘value’: {{ checkout.total_price | money_without_currency }},
The total price is not shown, instead I see the error. At the same time, the Id is represented correctly in the source code.
Any idea what could be wrong here?
Thanks
Your currency settings could be different to the standard store so the money filter is outputting something unintended. Review your settings. Remove the money filter. Test other money filters.
Thanks for the reply Joshua.
I finally found the problem: The order I was testing with has not been placed online via the checkout process, but was generated as draft. This results in {{ checkout.total_price | money_without_currency }} having no value.
So there is not really problem, as we are measuring online conversions here, which is not the case for manually generated orders. It is just a bit confusing if you end up doing your tests with such draft-based orders…
Thanks
Hello Joshua, Thanks a lot for making this page. It really goes into details regarding the setup of the tracking.
Thanks for this wonderful content, pls I want some clarifications, At the moment, I am tracking call conversions and form submissions on my website and I have installed the global site tag on every page of the website.
Now, I want to configure the purchase conversion in my store which is a shopify.
This is my question, should I install another global site tags or should I only cope the event snippet and edit it as you outlined in your guilded steps here. Thank you
You will need to follow the guide as whatever is inserted into your Shopify theme will not carry across to checkout. The global site tag script needs to be installed in the checkout as described.
Hi Joshua,
thank you very much for your step-by-step guide. I did everything you teached, but when i go in my shopify backend to paste in the code there is no field for addtional script. I go to “settings” –> “checkout” but there is no text-box for additional scripts.
1. Do you have any idea why i don’t have the textbox for additional scripts?
2. Where else can i past my block of code?
{% if first_time_accessed %}
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘UA-xxx’, { ‘send_page_view’: false });
gtag(‘config’, ‘AW-xxx’);
gtag(‘event’, ‘conversion’, {
‘send_to’: ‘AW-xxx’,
‘value’: {{ checkout.total_price | money_without_currency }},
‘currency’: ‘{{ shop.currency }}’,
‘transaction_id’: ‘{{ order.order_number }}’
});
{% endif %}
I would be really thankfull for your help!
Best regards,
Bakbert
I’ve never heard of a store that doesn’t have it as the admin is near-universal.
More directions from Shopify: “From your Shopify admin, go to Settings > Checkout. In the Order processing section, find the Additional scripts text box.”
Hi Joshua,
I installed the Google Ads tags as you’ve shown above, however when checking the setup with Google Tag Assistant it shows 2 tags installed when a purchase is completed.
I’m really hoping you can please clarify 1 thing for me:
Should I remove the Google Analytics account number from the box above the Additional Google Analytics JavaScript box? Or do I leave my Google Analytics account number in this box as well as adding the Global site tag into the Additional Google Analytics JavaScript box? I think this may be why I’m getting 2 tags firing on checkout when I test the code, but I may be wrong. I’m a newbie at this!
Thank you so much!
Had a call with the Google Implementation Team which helped us implement the gtag for one of our accounts on the Shopify platform.
Some background info:
We have two separate AdWords accounts. One houses the text ads and remarketing, the other houses the PLAs.
The issue has been how do we add the new gtag tracking for both accounts?
It seemed that what the Google Implementation Team did work, however, now some conversions are tracking the correct conversion value, but the majority are not and are showing the value as 0.
Below is the source code on an order confirmation page which was implemented into the “Additional Scripts” box. Wondering what you think about this implementation and if you have any suggestions? We have had issues switching over to the gtag, (or Tag Manager) with a lot of our accounts. Any help would be much appreciated.
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘AW-931570196’);
gtag(‘event’, ‘conversion’, {
‘send_to’: ‘AW-931570196/jOMzCLuOgHEQlMSavAM’,
‘value’: 579.99,
‘currency’: ‘USD’,
‘transaction_id’: ‘18262’
});
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘AW-808547907’);
gtag(‘event’, ‘conversion’, {
‘send_to’: ‘AW-808547907/qO5oCMi-lIABEMPsxYED’,
‘value’: 579.99,
‘currency’: ‘USD’,
‘transaction_id’: ‘18262’
});
Hi Josh,
Thanks for another great writeup.
To simplify implementation of this (allowing easier cut/paste) I assign the Google Conversion Id and Google Tag Id in a liquid variable at the top of the page and inject them later down in the script.
Code here: https://github.com/Czarto/ShopifyScripts/blob/master/settings/checkout/adwords-conversion.liquid
Best,
Alex
Really awesome article. Concise, to the point and helpful! I think Shopify should be paying you guys royalties for this info. Their help docs certainly aren’t as good. cheers
Siva
Thanks for this very good article!
We’ve seed recently by installing the new Shopify Google Shopping App that some of this setup is being made automatically. But, I’m not quite sure how it is doing compared to your article (eg. doing it programmatically). So, I’m wondering now which one I should do : letting the Google Shopping App do everything automatically or uninstalling it and implementing the javascript proposed into this article?
I would say I like the Google Shopping App synchronizing all of our products with our Google Merchant account. I would not want to loose that.
Anyone experienced the new Shopify Google Shopping App and how’s the success who had with it? Does all the conversion goals are well received by Google Ads?
Many thanks.
Pierre
https://www.boutique-lollipop.com
Hi Joshua,
Thank you so much for your brilliant articles. Absolutely amazing!
I’ve followed all the steps and successfully implemented the Ad Conversions and Re-marketing.
I have just a small question. If I’ve added the re-marketing snippet in the “Settings” > “Checkout”. Under the field “Additional scripts, Do I need to include the ‘Google Ads conversion tracking’ snippet AS WELL AS the Remarketing Code For The Checkout snippets? i.e.
[CODE]
{% if first_time_accessed %}
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘UA-76118106-1’, { ‘send_page_view’: false });
gtag(‘config’, ‘AW-880123456’);
gtag(‘event’, ‘conversion’, {
‘send_to’: ‘AW-880123456/44BbCP7Vz3AQvIfdafM’,
‘value’: {{ checkout.total_price | money_without_currency }},
‘currency’: ‘{{ shop.currency }}’,
‘transaction_id’: ‘{{ order.order_number }}’
});
{% endif %}
+++++++++++++++++++++++++++++++++
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘UA-PROPERTY_ID’, {‘send_page_view’: false, ‘custom_map’: {‘dimension1’: ‘ecomm_prodid’, ‘dimension2’: ‘ecomm_pagetype’, ‘dimension3’: ‘ecomm_totalvalue’}});
gtag(‘config’, ‘AW-GOOGLE_CONVERSION_ID’);
gtag(‘event’, ‘page_view’, {
‘ecomm_pagetype’: ‘purchase’,
‘ecomm_prodid’: [{% for item in checkout.line_items %}’shopify_US_{{ item.product_id }}_{{ item.variant_id }}'{% unless forloop.last %}, {% endunless %}{% endfor %}],
‘ecomm_totalvalue’: {{ checkout.total_price | money_without_currency | replace: ‘,’, ‘.’ }},
‘non_interaction’: true
});
Thank you so much!
Don
I don’t know why you’d want to just implement remarketing without conversion tracking—perhaps if you were importing transactions through Google Analytics rather than using the Google Ads conversion snippet. You only need one instance of gtag so you can remove the first paragraph of code. The gtag should also load before events so you’d want to move the second lot of gtag you have to the top above the if statement.
Hi Josh, thanks so much for your reply.
Apologies, my initial question was unclear.
I would like to implement the re marketing tracking using Google Analytics with Conversion Tracking using Adwords.
Will the following code work?
The remarketing code for Google Analytics uses GA property ID in the while the conversion is using the Google Adword ID (i.e. <script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxx12-1" vs
Also the GA version is adding {‘send_page_view’: false, ‘custom_map’: {‘dimension1’: ‘ecomm_prodid’, ‘dimension2’: ‘ecomm_pagetype’, ‘dimension3’: ‘ecomm_totalvalue’}}); which is not in the Adwords Conversation tracking.
Can I mix the 2 examples in such a way??
I really appreciate your help with this!
Don
hey did you sort this?
Is there a resolution to this.
We got the GTM working, but the google ads account is complaining about the inability to serve dynamic remarketing ads to the customer.
Hi Joshua
I have added both the global tag and purchase conversion tag to the additional scripts box in shopify settings. I have just done a test purchase and checked the code on the thank you page. I can see the global site tag code but i cannot see anything referencing the conversion tag. Any ideas why?
Thanks
Paul
Hi Paul. Remove
{% if first_time_accessed %}
from the conversion code, then view the thank you page. See if that shows. Chances are you reviewed the code the second time you viewed the thank you page.Hi Joshua, thanks for your reply, yes code is there now and it’s showing as verified on google ads. I did a test purchase yesterday yet the number of conversions purchases is still showing as 0 in google ads. Any ideas why that would be?
Performance data isn’t available instantly. Google have a general, clear guideline now saying to allow for 3 hours. Review the conversions in Tools > Conversions to see if it is recording a conversion there. If it is, but not inside Google Ads columns, you’ll need to check “Include in ‘Conversions'” as advised in the guide.
Hi Joshua
It’s been two days now and none of the purchases i’ve done have been recorded as a conversion.
Everything seems set up fine other than that!
One other question. Will the conversion show on google ads if i’m just going direct to my website and making a purchase? I don’t have any ads set up yet.
The whole point of Google Ads conversion tracking is to track sales in Google Ads from Google Ads—not other traffic sources. So yes, you need to be clicking on one of your ads for the data to show.
Hi Joshua,
I have added the code for Google Ads Conversion Tracking in Shopify according to your instructions and my Adwords sales are beeing tracked. But it seems the code is not working for dynamic remarketing as there is still an issue showing in Adwords under Audience sources saying I need to fix the tag for dynamic remarketing.
How can I get your code to work for dynamic remarketing as well?
Hi Josh,
Thanks for this great article. I have a question, though, which may be out of topic. I have been researching on this for days but I still don’t know how to change the currency from USD to PHP in my Google Analytics.
I’m able to change the currency symbol but the actual numbers stay the same, they’re not converted from USD to PHP. Any thoughts on this? TIA.
Hi Haze,
See step 10 in my Google Analytics tutorial to learn how to change the currency. Also:
Hi Joshua, thank you for this great tutorial article. I’m so grateful find your site.
I added gtag code into my shopify theme.liquid and purchase conversion code into my shopify checkout script as the following:
in shopify theme.liquid:
However, today I still see that the ‘Google Shopping App Purchase’ conversion tag still shown as unverified in my google ads account.
Note that I enable Google Analytic thru shopify preference setting and do not include the gtag.js into the checkout script as I follow the shopify instruction. Could this be the problem? I also tried the suggested test, ie. viewing the order status of an existing order.
Thank you so much in advance for your time and help.
Hi Joshua,
If the currency on the website is different than “euro”, how can we make sure that it’s passed already converted (to euros) to the Google Interface?
I don’t know what currency your website is or what you’re setting it to with the tracking code. Regardless, whatever you set it to, if it’s different to the Google Ads currency, Google will convert it based on current exchange rates:
Hi Joshua,
First of all thanks so much for all the work you have put in.
My issue is, I did everything exactly as you have stated and all of the conversions track properly EXCEPT when a user purchases on a 2nd session. “converted after direct visit” type of deal.
Shopify does however track the 1st session with the proper UTM and I have tried “first click, last click, linear attribution” with no result.
Do you have any idea why conversions that show more than one session are not tracking properly?
Thanks for your help!
Hey Steffan,
What you’re saying is counter to what Google Ads is suppose to do with attribution. Google Ads is going to credit revenue to an ad campaign, ad group, ad, or keyword based on the last click even if the sale happens on another channel. Google Analytics solves what you’re asking with Google Ads influence in a multi-channel strategy. Even in that case with Google Analytics, it would attribute the sale to the channel that came before direct.
Hi Joshua, your directions on how to ad AdWords conversion tracking using the Google Analytics global site tag have been really helpful. I use Shopify’s Google Analytics setup, but if the integration uses Google universal analytics vs the global site tag, does that mean I actually don’t have a global site tag implemented on my site? In addition to your directions, should I be adding the AdWords global site tag to my theme.liquid file? And if so, do I need to add all of the tag or just the config command? Thanks.
Hey Maria. I don’t know what’s on your site as everything can vary, but Shopify’s Google Analytics setup does not use the global site tag. This article is about conversion tracking for Google Ads, which doesn’t require the global site tag in the theme.liquid file.
I really want to know if I have already added google analytics and google ad tracking code. so I added both codes but currently only works for google anlytics and not work for google ad tracking conversation code. so my question is what shoud I do only add to google analytics code or google ad tracking code?
Hello Joshua! Thank you for this instruction. Have you tried to setup conversion tracking with reporting conversions with cart data? Does this implementation have any benefits for ads optimization process? Thanks!
Hi Eugeniu. Yes, we have set it up the new Conversions with Cart Data. However, it was extremely inconsistent in reporting, missing conversion values but also the extra data you’re suppose to get with it in the Google Ads interface. It has many new benefits for reporting and will become the new standard when Google fix the beta bugs. I will update this guide when it’s proven to work.
Hi Joshua,
Thank you for writing this detailed article. Would you say using the Google analytics import method is easiest and best since all you would have to do is import the data from analytics into google ads? It wasn’t clear to me but can you skip all the previous steps you mentioned in this article if you use this method?
Also, would you still have to paste the code in the Shopify store > “Online Store” > “Preferences” > Google Analytics section?
Hey Peter,
The pros and cons are explained at the start. If you were to do Google Analytics, you want to make sure it’s setup well. My guide explains how: https://www.digitaldarts.com.au/google-analytics-shopify
Your guide is very helpful. Thank you very much.
I currently have Google Analytics setup on my store through “Online store – Preferences” in Shopify. I am not sure whether I should follow the instructions in section “Alternative: Google Ads With Google Analytics Global Site Tag.” Could you advise?
Thank you in advance!
The tutorial answers that Jason. If you use analytics import, the only conditions I recommend that are if you follow my whole recommended analytics setup for Shopify stores.
Hey Joshua, great tutorial mate, thank you so much.
Currently our store just launched multi-currency and so some of our countries use commas in the order price (like countries with EUR, they say 1,95 instead of 1.95).
But some countries, the commas is actually a comma for example 1,000 USD. So I can’t just directly use:
{{ checkout.total_price | money_without_currency | replace: ‘,’, ‘.’ }} or | remove: ‘.’ | replace: ‘,’, ‘.’
Is there any way around that? Maybe some sort of IF statement?
Check out the currency object. From the Shopify Partners blog: “Once a shop enables multiple currencies, the checkout’s default currency will always be in the presentment currency, the currency that is presented to the customer. So, for example, if a customer is checking out in Japanese yen, the currency and all values with be in Japanese yen.” For a start with the liquid to do this, you can refer to a case statement example for the checkout page in my Google Customer Reviews tutorial.
this article says that analytics import only works if google ads is last non-direct click. Is this true?
https://www.searchenginejournal.com/why-using-conversions-imported-from-analytics-to-google-ads-does-not-actually-make-sense/346036/
Yes. The Analytics import option uses a completely different method of attribution.
Hi Joshua,
I installed the pixel according to your instructions in admin>settings>checkout:
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag(‘js’, new Date());
gtag(‘config’, ‘AW-000’);
gtag(‘event’, ‘conversion’, {
‘send_to’: ‘AW-000/xxx’,
‘value’: {{ checkout.total_price | money_without_currency }},
‘currency’: ‘{{ shop.currency }}’,
‘transaction_id’: ‘{{ order.order_number }}’
});
When I inspect the checkout summary with google tag assistant, I don’t see the conversion tag. Global site tag (green), google ads remarketing and analytics are there (both blue).
Any idea whats going wrong here?
Thanks
Zin
Do you or your agency set this up for people? If so, how much do you charge ?
Hey Nick. We do it as part of Google Ads setup and management, not a standalone.
Hi Joshua, thanks for the wealth of information and set up in this article. I have everything set up correctly in Shopify as per this guide but I believe there is a problem tracking conversions with Shop Pay. Are you familiar with that problem or is it just us? Any advice? Thanks again
Your guide is great, thanks! However, in the recommendations of my ad campaign, Google Adwords keeps saying I should finish setting up conversion tracking.
It describes two steps:
1Your conversion action has been created
2 Set up your conversion tracking tag
The first one is detected and done, but Adwords keeps saying I still have to do the second step.
I checked if the conversion tag is live with the Google Chrome Tag Assistant, and it’s there. Also, Analytics tracks the conversion. But it doesn’t seem to work with Google Adwords…
Adwords and Analytics are linked.
What could be wrong here?
What about the new updated Google Sale Channel?? If am just starting my account. Do i still need to do all theses setup? Or they are being sync automatically? They the seem to be included now as i see that i have “Conversion” that were setup automatically thought the app.. What do you think?
If you’re referring to Google Surfaces, but you’re not running Google Ads, there’s no point in setting up Google Ads tracking. But Google Ads can run across extra Surfaces placements, in which case tracking should be setup.
Thanks for your response. No im not talking about surfaces placement. Sorry i might not have been clear with my question, here more details. Within Shopify you can add various sale channels ” fb,amz,ig,pos,google, etc” Google just release not to long ago an updated version witch allow you to connect your GG ads, analytic & GMC.. I did the tag assistant and all tag seem to have been setup and look like are firering just fine. You can create only 1 Smart shopping campaign for all your product. When i created the campaign within the app/sale channels. It automatically created conversions in my gg ads witch they seem to be well setup tracking purchase, atc, view, etc. Now im going to create more campaigns in gg ads Do you think i still need to create more conversions and setup the code for all the new ones? Or no
Thanks. I import from Google analytics and waiting for its result.
Your tutorial is different from Shopify:https://help.shopify.com/en/manual/promoting-marketing/analyze-marketing/tracking-adwords-conversions.
It told me to Install the event snippet to “Settings > Checkout.” But you sa “Adding The Google Ads Conversion Code To Shopify to Checkout”—–adding global site tag to checkout
Damn good article. I think if you look at the Google analytics user stats, my time on page is probably close to 45mins.
Hello,
Great article! I got issues getting tracking working (tag inactive error message). I realized your guide and Shopify’s one are different, where Shopify recommend to install the gtag on theme.liquid whereas you mention only as an additional script. Google also mentiones that gtag needs to be on all pages of your site so looks like adding it in theme.liquid is the best way? In anyway on either method I will get the same error. When I go to webpages it appears empty. Any ideas what I could be doing wrong? Thanks
The tag being reported as inactive within the Google Ads conversion section can just mean you haven’t had a sale from someone clicking the ad. The best way to verify the code is with the last step shared in the main method.
Hello Joshua,
I followed your other guide https://www.digitaldarts.com.au/google-analytics-shopify for Google Analytics. I have also just followed this guide for the Google Ads Conversion tracking.
However, If I am interested in running remarketing ads in the future, do I need to also create a separate remarketing tag to add into the additional scripts section in the Checkout section of Shopify? Where would I place this tag if I do?
Hello and thanks for the article!
When I use Google Tag Assistant, I see that both the Universal analytics and the Global site tags (google ads and google analytics) are green and active. No warnings or optimization suggestions.
Is it fine in your opinion?
Thank you very much.
That is normal if you follow the tutorial.
Hello,
thank you for this great guide. I included the version like described in the section (“Alternative: Google Ads With Google Analytics Global Site Tag”) because we need remarketing data.
I am now just wondering as GTAG does not show up in the Google tag assistant chrome plugin on every page? But isn’t this needed so that the tag could gather all the data?
Remarketing tags should show on all pages. See the Google Shopping for Shopify book on how to setup remarketing.
my google conversion is working now thanks to this article but now its says this
Fix your audience source that’s not sending a required parameter
Your campaigns can’t tailor dynamic ads based on user activity when your audience source doesn’t send the required parameter. Make sure the required parameter is being sent correctly.
Your audience source may not have the required parameter for your business type on all relevant pages or events. Check that you’re passing the required parameter for your business type anytime users interact with products or services you want to advertise. Note that Google Analytics refers to parameters for remarketing as Dynamic Attributes. Learn more
and asks me to update my code and says use the new code instead of the previous. how do I do it where do it out it
Hello and thank you.
Do I also need to do the following step in the Google Shopping for Shopify guideline, when I have integrated the code like on this page in section “Google Ads With Google Analytics Global Site Tag”
“With that done, your theme is setup for dynamic remarketing. However, an alternate version of the code needs to be inserted on the order confirmation page because it is not connected to your theme.
Go to “Settings” in Shopify then “Checkout”. In the “Additional scripts” section, copy-and-paste the following:”
Can you show me which code that is?
Hi Bilal,
We are encountering the same issue. After following the guide, everything works, but google ads is complaining
“Your campaigns can’t tailor dynamic ads based on user activity when your audience source doesn’t send the required parameter. Make sure the required parameter is being sent correctly.”
Did you manage to fix it?
Hi Joshua or Anyone who knows what they are doing!
Shopify non Plus member here. Hoping you can clarify something between three of the separate Google/Shopify related guides since they are segregated (rightfully so) into their own dedicated pages, but each have some potential overlap which is causing some real confusion for me =( I will try my best to ask this questions in chronological order of which guides I followed, first to last. I really hope you can help me. If you need compensation for such a response, name a price for an hour of your time and I will be happy to oblige. If there is anyone else lurking around that might be able to help me if Josh doesn’t respond, this also applies.
I started first with your Analytics guide. Having previously followed your Google Analytics guide, I opted to download your Shopify Goal Checkout Template using regex since I am a non-plus Shopify user. I also setup my own funnel per your instructions in step #9-Setup Funnels & Goals not knowing any better. So that leaves me with two goals within my filtered primary Analytics view. Should I delete one of these or turn one of them off? And I guess where the confusion comes in is when following this current guide under the “Alternative: Google Analytics Import” section, I followed your instructions and selected transaction from the primary view, clicked Import & Continue to create goal, and changed it to linear. So in my Google Ads account, I have both of these two goals showing as conversions now.
Now I am following this Conversion Tracking guide it appears that you start it off by creating a new conversion in the beginning of this guide. Because I previously followed your Analytics guide, I opted to take your instruction to use the “Alternative: Google Ads with Google Analytics Global Site Tag”. That being said, I now have a total of three conversions in my google ads account: 2 of which are your Regex template and “Checkout Complete” method imported from Google Analytics, and now another one that I created per the beginning of this guide named sales.
The two goals which were imported from Google Analytics are showing they are tracking my conversions, however the one labeled as “Sales” with the source of Website is remaining unverified even after having checked that it is within the page source with “if_first_time_accesed” temporarily removed, and testing a fake purchase on my shopify store via a google search campaign.
Which of the three conversions/goals should I be using going forward? I ask because there is no conversion values showing up in google ads either.
If anyone comes across this post that can help, reach out to a brother here trying to level up in this Google/Shopify game. I will be periodically checking the comments to see if there is any feedback, and perhaps we can connect outside of Joshua’s site out of respect to him.
Thanks in advance.
Hi Jayco,
Don’t use a checkout goal inside your Google Analytics as a conversion inside Google Ads. It is inferior without revenue information, which this guide provides. You should still have the goal in analytics, but don’t import it into Google Ads.
We prefer to use Google Ads conversion snippet in this guide rather than importing transactions. So once you get it working, you don’t want both imported as conversions in Google Ads.
Thanks Josh! Apologies for the book I wrote previously, but I figured the more details I provided the better it is for someone to assess my error. For what it’s worth, I’ve been using your Analytics guide for 3 years now for three different ventures. It’s just as of more recently I made the decision to utilize Google Ads in conjunction with Facebook Ads and your other guides are becoming just as imperative to use.
I have been scratching my head creating bald spots trying to damn near reverse engineer all your guides, Googles guides, reddit, Youtube, etc… to try to understand WTF I was or was not doing correctly for over a week. You have pointed me in the right direction. You are the G.O.A.T.
If I ever find myself in your neck of the woods, steaks & beers on me. Cheers from the USA.
Hey Joshua,
Great article!
I have one remaining question: If Google Ads is set up via the Google channel, should the tracking code listed above be removed from the checkout pages to prevent duplicate conversions?
Yes. Possible alternatives is to remove the conversion inside Google Ads which stops the reporting or changing the column to not be included in the conversions column. The later lets you compare data if you wish while not messing with reporting.
I pasted in the Google Analytics gtag in the theme.liquid before doing Adwords. If I use your first method do I then delete that code from the theme.liquid? So there is not duplication.
Google says there’s no harm in having a gtag code running side-by-side with Universal Analytics, which is what Shopify’s Google Analytics uses.
Thanks to your article I’ve got everything tracking beautifully now in GA! One thing I am noticing is that Recharge recurring subscription payments and Shopify Mobile for iphone data are not capturing in GA – any suggestions on how to correct?
Quick comment on the checkout additional scripts for those with multi currency sites:
There appears to be a bug in your code that prevents saving the checkout additional scripts:
‘value’: {%- if order.currency == “EUR” -%}{{ checkout.total_price | money_without_currency | remove: ‘.’ | replace: ‘,’, ‘.’ }}{%- else -%}{{ checkout.total_price | money_without_currency | remove: ‘,’ }},
is missing a {%- endif -%} at the end. It should be:
‘value’: {%- if order.currency == “EUR” -%}{{ checkout.total_price | money_without_currency | remove: ‘.’ | replace: ‘,’, ‘.’ }}{%- else -%}{{ checkout.total_price | money_without_currency | remove: ‘,’ }}{%- endif -%},
Hope that helps some other people!
Cheers, Matt. Have updated it.
Shopify Google Ads channel is not always adding tracking or not enough tracking. There are two versions apparently. Shopify help has documentation but it’s not accurate – as states can determine which is being used abd how to add extra events. In the past I have setup tracking fir Shopify stores missing google ads tracking code with Shopify’s Google shopping app installed
Following your articles.
There are two issues I am finding – no google ads tracking code found but impressions and tracking found in Google Ads.
Retargeting data is not being tracked and
Error message noted in google ads for retargeting audience.
Other situation is that impressions are not being tracked in google analytics.
When the google Shopping Channel is being used we have Berne told to not add tge code in checkout due to possible duplicate data will be tracked.
A concise accurate method of tracking all data correctly would be wonderful 🙂
Also in one situation – one Shopify store using a Google Ads Expert has been told not all events are being tracked
Where can I find accurate information to be sure correct tracking is setup for Shopify stores using the Google Channel ?
Thanks
Hi ,
Would you help me ?
Our website link is :https://joyasdechina.myshopify.com/
Here is our problem with Google ads tracking and Google Analytics tracking.
I asked the Google team for help to check our tracking code, and there are all correct.but right now there are still could not figure out why mine is not working, i.e. Google Ads conversion action status is still stuck in ‘Unverified’ state and conversions are not being tracked by Google Ads although I think I configured everything as suggested and tested it via a test order on my store.
I following this Shopify help center document to setting Google ads tracking https://help.shopify.com/en/manual/promoting-marketing/analyze-marketing/tracking-adwords-conversions
Thanks so much
Thanks for providing the steps. I followed the steps and the google Ads conversion started working, but the dynamic remarketing stopped working.
Can you please advise how to fix dynamic remarketing issue.
Hey Joshua,
it is an amazing article. I would further like to ask you something regarding setting up the GA tracking properly.
Initially i connected Shopify with GA by doing the following thing: Preferences > google Analytics > then put the GA account number starting with : UA-****
After I read your article I have put the tracking code
in the liquid.theme header tag.
Just wanted to clarify if I have done it right or not? is it I should have pasted the modified tag that you mentioned in the “Additional Google Analytics JavaScript” under Preferences where I put the GA account Number?
Hi Joshua, following this example I was creating the conversion tracker for ”add to cart”, but where in Shopify should i place the event snippet for it?
Hi Josh,
After having followed this conversion guide, your analytics guide, and your remarketing guide – I am showing three Global site tags with my analytics (UA-XXXXXXXXX-X) in Google Tag assistant on my product pages.
Two of them are green that show up as (gtag.js), and one is blue which I suspect is the Google Analytics code entered in the Online Store>Preferences box.
Is this normal?
My Adwords conversion tracking wasn’t working. I followed the instructions here and now I am seeing more conversions than clicks. i.e. something isn’t right. Can you advise how to debug that problem and what might cause it. Thanks
I can see that you’ve recently made a huge update to your conversion tracking code. It would be interesting to know why the old code had been removed. Is it because it didn’t take into account the newish enhanced conversions feature? Would it do any harm leaving the old code in? It seems to be doing a decent job to date (November 2021).
Anyhow, very rarely do I give up on a tutorial, but this time I’m stumped! I just don’t understand step #3: Set the ID variables based on your shopping feed. I’m also not completely sure about #4 & #5. Where do I find this info? Is there a clearer way you can phrase this?
Thank you anyway. Generally I find your work very informative and useful!
Hey Dave,
As you see on the date of the guide, it was recently upgraded. This is what we use internally for clients so it’s the first time “outsiders” have seen it. I expect a few things to be unclear. I will clarify those points you asked in the guide over the coming week. Might have to wait after Black Friday madness.
The old code is removed because it’s inferior. It’s void of two new tracking features plus it accommodates for multi-currency.
This has been updated Dave. If the steps are still unclear, let me know where you’re getting stuck.
It’s much better now Joshua! Sorry my confirmation has taken a little time. I needed to see if the ‘Check enhanced conversions’ in red would go away before I replied and eureka! It seems now to be recording and processing enhanced conversions correctly. It took about 3 days for the ‘error’ or ‘tracking warning’ to be replaced with the correct status. Worth mentioning this to anyone else who’s trying to set up enhanced conversions for the first time. Don’t worry – just be patient and hopefully all will work fine. Thank you again!
Hello Josh. Quick question:
In Ads I have set up a conversion action applying the linear attribution model and using your new conversion code with enhanced conversions. In Ads, the status says: ‘Recording (processing enhanced conversions)’ – so everything looks good.
Temporarily I have kept my original conversion action which is based on Google Analytics conversions. I know this is naughty of me (!) but I wanted to check them both side-by-side for a short while to compare datasets.
In your introduction you said: “For one of my Google Ads clients I was able to attribute more than double the sales of Google Ads with the conversion tracking code compared to analytics”. With that in mind, would you think it was unusual – perhaps even impossible for my original conversion action from the Google Analytics source to be tracking about 30-50% MORE conversions than your new action with enhanced conversions containing your code. If anything, shouldn’t it be the other way around?
What are your thoughts?
You’re unlikely to get that many more conversions with enhanced conversions. If you want to test side-by-side, disable the analytics conversions from appearing in the conversions column. It’s likely time is a factor if you’ve just set one up and not the other as conversions come through over time.
Hi Josh,
I really appreciate you sharing this code! Everything seems to be working for us, except for one issue. When I run the diagnostics, under “Customer data validity,” it says ,”Make sure your customer data is formatted correctly.” There seems to be a syntax error when I add it to a javascript ui. Any idea how to fix?
I haven’t seen any diagnostic issues with the current version of the code. If it’s saying customer data isn’t formatted correctly, are there any samples or more information? You can remove the {% if first_time_accessed %} conditional statement then view a few sample orders to see the liquid output for the customer details (how customer data is formatted).
Hi Joshua,
Thanks for the quick response. I use Shopify to add the code in our checkout page. Once I remove the {% if first_time_accessed %} from the code, how would I be able to view sample orders? would it be through “All orders > select orders > View order status page?
Hey Joshua,
First of all, loving all your detailed articles. Seriously amazing. Thank you!
I had two questions for you:
– First, my conversion doesn’t have an option for ‘Enhanced Conversions’ – maybe I’m not eligable for some reason, but I thought I’d flag it in case this is a new change. Will this impact the code I entered?
– Second, now that I’ve added yuor beautiful code to my order page via the additional scripts, does that mean I should get rid of the auto-generated Google sales converion from the Shopify-made App? What about the rest of them?
To try and help, I’ve added a screenshot that includes examples: https://screenshot.click/13-21-lz7z4-cr3o8.png
Thank you again!!
Hi Jordan,
Being a beta feature, not all accounts have access to Enhanced Conversions. If you do not, you can remove the lines between <!– START enhanced conversions –> and <!– END enhanced conversions –>. This maybe unnecessary, but it is untested keeping it there without the feature present.
There’s no harm in keep the non-purchase conversion events through the Shopify app. If you know what you’re doing, they can help you. You do need to remove the purchase one.
Fantastic. Thank you for all of your help – and the quick reply. You’re a saint!
Hey!
>Being a beta feature, not all accounts have access to Enhanced Conversions. If you do not, you can remove the lines between and . This maybe unnecessary, but it is untested keeping it there without the feature present.
What lines need to be removed?
Ah. WordPress stripped the code from my comment due to HTML characters. I’ve edited the comment answering your question.
Just for anyone else that has any trouble – I had to put the Google Tag Manager snippet below the Digital Darts code in the checkout section on Shopify. Then it worked without trouble.
Thank you Joshua for this helpful guide. I have 2 problems when applying this guide:
1. My Store use multiple languages and currencies. I also have multiple feeds in google merchant with many languages for many countries.
=> Which aw_feed_country / aw_feed_language I should use in this case? or I have to use many lines of code for each language?
2. Do you have a guide for GA4 ?
Hi Albert,
1. I think multiple languages and currencies (from multiple feeds) is a challenge. There is no way to tell 100% of the time at checkout what feed someone came from. There’s nothing from Google on how they expect you to deal with such a situation.
To do it, it is contingent on assumptions. You could set the
{{ aw_feed_country }}
and{{ aw_feed_language }}
variables based on the delivery address of the customer or the currency they checked out with.The main thing to get right is the consistency of IDs (whether they use SKUs, variant IDs, etc.) in all feeds.
2. No guide for GA4. It is unsupported in Shopify. All the hacky solutions for it are incomplete (tracking code on pages with purchase information at checkout.) Very few stores benefit from going on it. I suspect Shopify will upgrade to it in 2022.
Thank you Joshua for fast reply.
At this time I have 2 stores with main domain and sub domain (2 Shopify stores, one for US and one for EU countries). Do I have to create 2 conversions in Google ads manager (each conversion for each sites) or Is it okay to keep one only for both?
If you are using the one Google Ads account, it is fine to use the one conversion code pasted then configured in both stores. We like to create new conversion codes per store though for clarity of separation if you are driving traffic to the right country served by a store, which you should be doing.
Thank you.
I tried to setup in my store with new Conversion.
However after finishing, Google ads show that the conversion is “Unverified” with Troubleshoot button.
I troubleshoot and tag config show that they did not recognize the conversion info though I added right AW id and conversion label.
Hello Joshua, thank you very much for all the guides you publish, they are very helpful!
How does this new feature and code relate to your other guides for Shopify conversion tracking and analytics reporting? What do we need to remove? What do we need to modify? And what code can be safely kept on-site?
Thank you very much for all your help 🙂
And also using the enhanced conversions code with the dynamic remarketing code from your other guide?
Hi Seiffedden,
Dynamic Remarketing code as shared in the Google Shopping book no longer functions with the code. I will update it soon.
Great tutorial. One small improvement:
{% assign UA-ID = “UA-PROPERTY_ID” -%}
Notice the first {% does not have a hyphen, but the closing -%} does. This should be corrected to:
{%- assign UA-ID = “UA-PROPERTY_ID” -%}
This will ensure whitespace is trimmed successfully.
Hi,
Thanks for the article!
I have a question on the match status troubleshooting. The thing is that after setting this up and letting it run for 2 weeks, I noticed that on Google Ads account under this ”Enhanced conversion by tags” Diagnostics tab, the Match Status shows up as ‘Your match status has some issues’ -> ‘Increase your matches by providing more customer identifiers and ensuring that your customer data is valid and correctly formatted.’
I wonder what might be wrong and how to fix it. The email field is almost certain issue free, and the ‘first name’ & ‘last name’ should also be just fine, so the issue is likely appearing either because of some input discrepancies in one of the address fields or I’m also thinking that it could be because of the different phone number formats that is accepted by Shopify and Google. I found out that Google apparently prefers phone numbers without symbols or dashes, while Shopify basically doesn’t care- you can type into the phone number field on Shopify checkout a phone number in whatever format you want. Anyway, all of this still doesn’t help me to fix the Match Status issues on Google Ads account for this particular Enhanced Conversions tracking setup. Does anyone have any experience troubleshooting and fixing this? Could you please advise on the steps in this process? Thanks!
You can view the orders in Shopify to see the below data you’re collecting. Then take the next step, follow the directions “How To Test The Code” to confirm what’s output for several orders. The phone plus email, or address and name plus phone, must be available:
1. Email address (preferred)
2. Name and home address (street address, city, state/region and postcode)
3. Phone number (must be provided in addition to one of the other two pieces of information above)
Thanks for your response, appreciate it!
Well, yes, I already viewed the orders in Shopify to see what data I’m collecting (unfortunately I can’t add any screenshots to this msg here)-> it all seems fine – email, first&last name, address, phone number- all of them are collected just fine without no apparent issues (checked this for around 10 orders). On top of that, the email is collected with 100% accuracy as far as I can tell. When it comes to name, address, phone number-> these are recorded/collected just fine, too, for the most part at least. Yes, I noticed that here and there a customer might type a company name in the last name field, or provide an inaccurate address not according to the format Shopify requires- but these are ‘one-off’ instances. Besides, they are outside of our control anyway. So, everything (Enhanced Conversion Tracking code) seems to be set up just fine, however, I still see the same msg in the Diagnostics tab on Google Ads under Tools&Settings->Measurement->Conversions->Sales Conversions->Diagnostics. The error msg reads as follows:
‘Increase your matches by providing more customer identifiers and ensuring that your customer data is valid and correctly formatted.’
Any other idea how to troubleshoot this further?
Thanks for your time!
Hello!
An inquiry please.
I have configured Shopify with Google Universal Analitycs, I have also created the sales funnel in Analitycs.
Then I have linked Google Analitycs with Google Ads and I have created a conversion method doing the “Alternative: Google Analytics Import” step and it has created “Transactions” in the conversion action.
My question is, is it now?
But… do I also have to add the global tag in shopify in the shopify checkout in the additional script?? or is it not necessary to do this?
Hi there,
I am attempting to implement the code but am not sure if its done right.
Step 2: Is the AW-GOOGLE_CONVERSION_ID the conversion ID you can see in the google tag manager tab?
Step 3: How do I select my value of SKU in the code? Do I need to delete the other SKU types? Mine is ‘product-id_variant-id’. If so, how do I do this?
If I have selected my options in each step do I need to delete other parts of the code? Like parts that outline instructions?
Hey Alex,
I’ve added an example of the code filled in so you can see. Refer to “Click To Reveal An Example Of The Code Filled In”.
Thank you for this (somewhat) easy-to-follow guide, Joshua! Quick question; the whole script needs to be placed in just one place under “Additional Scripts” > “Order status page” – correct?
See step 4, Malte.
Is there a way to implement GA4 into Shopify yet? Or is it too soon.
GA4 in Shopify has been possible for some time with a custom-build in Google Tag Manager or a pre-made solution like Elevar: https://www.getelevar.com/. However, there is nothing native in Shopify.
I’m confident Shopify will release a GA4 solution since Google announced Universal Analytics will be going away in 2023.
Hi Joshua, excellent and well detailed instructions, just a quick question regarding an Update on Dynamic Remarketing code? As in your Google Shopping book it’s v1.3, is there any new updated code? If yes, will appreciate if you can provide link to it 🙂
Thanks
G’da Hamdan, yes there is. I will update it some time in the next few months. It is simple though. For the line with
ecomm_totalvalue
, it can be, 'ecomm_totalvalue': Shopify.checkout.total_price_set.presentment_money.amount, 'non_interaction': true });
.Hi Joshua, thanks for this guide. Sadly when I disconnected & reconnected the Google Ads link in Shopify, the conversion tags were no longer active so your guide has come handy to fix the issue. Question… I can’t locate the Additional Scripts box in my Checkout settings so I’m guessing I’ll need to post in the Order status page scripts. Please excuse my lack of skills in the coding area… Should I paste the code above or below current script? Thanks for your help.
That is the right place. I will update the guide given Shopify changed its name.
Hi Joshua
I hope you are well.
This is such a great guide! Thank you very much for sharing!
I have a quick question please.
With regards to the aw_feed_country variable: {%- assign aw_feed_country = “EN” -%}{%- comment -%}The country associated with the feed. Use CLDR territory codes.{%- endcomment -%}
We are using multiple manual feeds in GMC per country. For example, we have EN, IE, US, CAN, NZ, AUS feeds – so my question is, what country would we put there? I have put EN – however, we have 6 country feeds.
Thank you for your time.
Kim
See an earlier comment.
If my product item ID inside Merchant Center is in the “product-ID_variant-ID” form with “Shopify_US_” already in front of it, do I still need to include the “assign product-ID-prefix” section of the code? It says do not include if there is no prefix. But mine is already showing this prefix and I’m just worried it will double add it if I include this section of code!
Yes, you need to include because it is used for you inside Merchant Center. It’s about matching the product IDs in the code at checkout to what’s inside Merchant Center.
Hi there, fantastic article.
I have a few questions:
– Is the this upgraded event code meant to be placed under the standard Google Site Tag?
– How long after implementing this code should events start to be recorded in Google Ads?
– Does this event code require eCommerce settings to be enabled in UA?
Thank you!
Hi Alexander. The placement is described in the article. Events can take up to 48 hours to appear. I don’t know what you mean by ecommerce settings, but you should have revenue, checkout steps, etc. setup anyway. You just need your UA ID to use the tracking code.
What if the business has a weird setup like this:
1 Domain URL (no subdomains or different .com/.ca/etc)
1 Google Ads Account
1 Merchant Center Account
2 Merchant Center Feeds Each Targeting A Different Country Of Sale (US & Singapore)
2 Performance Max Shopping Campaigns Each Targeting 1 Country Of Sale
Do they create 2 conversion events inside Google Ads with each one for a specific country to match the feed? Do they create a dynamic country of sale like “address.country” (if that’s even possible). How do we make this as streamlined as possible? With different subdomains this would be easy, but with it all on one URL, I’m not sure how to proceed.
Thanks for the help!
The domain, ads account, merchant center, and P Max change nothing. The tweak needed is to accommodate different feeds. You want to make sure the product ID, currency, merchant ID, country, and language line up with each feed. You can customize the one code snippet to suit where only one event fires.
Joshua Thanks for all your articles, they’ve made a huge difference to my Analytics and tracking.
With respect to the Google shopping app for shopify, it’s auto created all the different conversions in the ads platform. Would you suggest deleting those conversion actions from the conversions page in the Googles Ads Platform, to stop the duplicate conversions?
Cheers
Tim
Only the purchase one. I’ll be updating this guide soon to account for the post-purchase upsell page.
Hi Joshua,
My product id’s in GMC range between all 3 options as I have multiple feeds working together. How would I go about including all three within your code?