Install guides · Shopify
How to install Google Ads conversion tracking on Shopify
Last updated
What conversion tracking actually is
Conversion tracking is a small piece of code that sits on your “thank you” page — the page a customer sees right after they place an order. When someone clicks your Google ad and then completes a purchase, that code sends a quiet signal back to Google Ads saying “this click turned into a sale.” That’s it. Without it, Google sees clicks going out but has no idea which ones came back as paying customers.
Why it matters
Without conversion tracking, Google is flying blind on your behalf. It cannot tell whether the clicks it sends you are turning into orders or just bouncing away. That means its automatic bidding — the part that’s supposed to find you more customers for less money — has nothing real to learn from. Your remarketing lists (the audiences made up of people who visited but didn’t buy, so you can show them ads again) also stop working correctly. Your dashboard will show you clicks and costs, but it won’t show you revenue tied to those clicks. In practice, this means you will overpay for clicks that never convert and underpay for the ones that do.
What you’ll need
- A Google Ads account (free to create at ads.google.com — you don’t need to be running ads yet to set up tracking)
- Your Conversion ID — this is the “AW-XXXXXXX” number Google Ads assigns when you create a conversion action; it identifies your account
- Your Conversion Label — a short string of letters and numbers that sits alongside the Conversion ID and identifies the specific action (a purchase, in this case)
- Admin access to your Shopify store (the login that can reach Settings and the checkout editor)
- A desktop browser — some of these steps don’t work well on mobile
Step-by-step install
-
Log in to Google Ads, click Goals in the left sidebar, then click Summary underneath it to open your conversion actions list.
-
Click the blue New conversion action button, choose Website, and enter your Shopify store’s URL when prompted.
-
On the next screen, scroll down to Purchase under the “Recommended for you” section and click Add next to it — this creates a purchase conversion action tied to your store.
-
On the settings page that follows, leave the default values as they are (category: Purchase, value: use different values for each conversion, count: one), then click Save and continue.
-
Google will now show you a panel titled Set up your conversion action. Choose Install the tag yourself, and you’ll see two strings appear: your Conversion ID (it looks like
AW-123456789) and your Conversion Label (it looks likeAbCdEfGhIjKlMnOp). Copy both of these somewhere safe — a notes app is fine. -
Now go to your Shopify admin. In the left sidebar, click Settings (the gear icon at the very bottom), then click Customer events in the settings menu that opens.
-
On the Customer events page, click the Add custom pixel button in the top-right corner.
-
Give your pixel a name — something like “Google Ads Purchase” — then click Add pixel. Shopify will open a code editor panel on the right side of the screen.
-
In the code editor, paste the following code exactly, replacing
AW-XXXXXXXwith your Conversion ID andYOUR_CONVERSION_LABELwith your Conversion Label:
analytics.subscribe("checkout_completed", (event) => {
const order = event.data.checkout;
gtag("event", "conversion", {
send_to: "AW-XXXXXXX/YOUR_CONVERSION_LABEL",
value: order.totalPrice.amount,
currency: order.totalPrice.currencyCode,
transaction_id: order.order.id,
});
});
- Above that code, you also need to load the Google tag itself. Click at the very top of the code editor (before the code you just pasted) and add these two lines, again replacing
AW-XXXXXXXwith your actual Conversion ID:
const script = document.createElement("script");
script.src = "https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXX";
document.head.appendChild(script);
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag("js", new Date());
gtag("config", "AW-XXXXXXX");
-
Click Save in the top-right corner of the code editor panel, then click Connect (the button that appears after saving) to activate the pixel.
-
Back on the Customer events page, confirm your new pixel shows a green Connected status next to its name — that means Shopify has accepted it and it is live on your store.
-
Finally, go back to Google Ads, return to Goals → Summary, find your new Purchase conversion action, and confirm its status reads Unverified (that’s normal and expected — it will change to Recording within a few days once a real purchase fires the tag).
How to test that it’s actually working
The easiest way to test is with Tag Assistant, Google’s free Chrome extension. Install it from the Chrome Web Store, then place a real test order on your store (use a discount code for 100% off if you want to avoid the charge). After the order confirmation page loads, open Tag Assistant and look for your Conversion ID in the list of detected tags — if it appears with a green checkmark, the tag fired correctly.
If you want a second confirmation without placing an order, you can use your browser’s built-in developer tools:
- Open Chrome, go to your store, and press F12 (or right-click anywhere and choose Inspect) to open developer tools.
- Click the Network tab at the top of the developer tools panel.
- In the filter box, type
googleadservicesto narrow the list. - Complete a test checkout and watch the Network tab — you should see a request appear that starts with
googleadservices.com/pagead/conversion/. - If that request appears, the tag fired. If nothing appears after the order confirmation page loads, the tag is not firing and you need to recheck your pixel code for typos.
Common gotchas on Shopify
-
Checkout extensibility is required. Shopify’s Customer Events pixel system only works if your store has migrated to checkout extensibility. If your store is still on the legacy “Additional scripts” box (found at Settings → Checkout → Order status page), the Customer Events tab may not be available to you yet. Check your Shopify plan — checkout extensibility is available on all plans as of 2024, but older stores sometimes need to manually trigger the migration inside Settings → Checkout.
-
Double-counting from a previous install. If you or a previous developer ever pasted Google Ads code into the old Settings → Checkout → Additional scripts box, and you now also add a Customer Events pixel, both will fire on the same purchase. Go to Settings → Checkout, scroll to the Order status page section, and delete any Google Ads conversion code you find there before going live with the new pixel.
-
The Google & YouTube channel app. If you installed Shopify’s official Google & YouTube sales channel app, it may already be sending conversion data to a Google Ads account — possibly one you don’t recognize or no longer use. Check Apps → Google & YouTube and look at which Google Ads account it is connected to. If it’s the right account, you may not need a manual pixel at all. If it’s the wrong account, disconnect it before adding your own pixel.
-
Currency mismatch. The code above pulls the currency code directly from the order, which is correct. But if your Shopify store is set to display prices in a currency different from your Google Ads account’s currency, the conversion values will look wrong in your reports. Confirm both are set to the same currency under Settings → Store details → Store currency.
-
Pixel not showing “Connected” status. If your pixel saves but shows a yellow or grey status instead of green, it usually means the pixel code has a JavaScript syntax error. Go back into the pixel editor, read the code carefully, and make sure every bracket and quotation mark is in the right place. A single missing comma will break it silently.
-
Password-protected stores. If your store is still in password-protected mode (common during setup), the tag will never fire because customers can’t reach the checkout. Remove the password under Online Store → Preferences → Password protection before testing.
What to do if your platform doesn’t allow this
Shopify is generally cooperative about custom tracking, but if you are on a very old store configuration that still lacks Customer Events and cannot migrate, you have a few options. Google Tag Manager (GTM) can be installed on Shopify by pasting the GTM container snippet into your theme’s theme.liquid file — this gives you a flexible container that can fire any tag you need. If you can’t touch the theme code either, the last resort is offline conversion uploads: you export a CSV of orders from Shopify, match them against your Google Ads click data manually, and upload the file to Google Ads under Goals → Upload. It’s slow and imperfect, but it’s better than no data at all. The cleanest long-term fix is usually just completing the checkout extensibility migration, which Shopify has made straightforward for most stores.
Get a free audit when you start running ads
When you’re ready to run Google Ads, InspectMyAds will review your tracking setup, confirm your conversion actions are firing correctly, and flag anything that could waste your budget before you spend a dollar. Share your email with us and we’ll reach out once we’ve verified your tracking is clean and ready to go. Management fee only. Your Google Ads spend is billed directly by Google to your own card — we never touch your ad budget.
Free audit when you start
Get a free audit when you start running ads
Tracking installed? Good. When you’re ready to actually launch your first Google Ads campaign, drop your email and we’ll do a free audit on your account — conversion tracking verification, keyword sanity check, and the three things to fix first.
Management fee only. Your Google Ads spend is billed directly by Google to your own card — we never touch your ad budget.