Ads for Breakfast
← All posts

GTM template: Shopify conversion tracking with Google Ads

A free GTM container for Shopify stores: Google Ads conversion tracking, enhanced conversions and remarketing, wired up the way it should be.

5 min read

Originally written in German — read it on visnakovs.de.

GTM Shopify conversion tracking template for Google Ads

Shopify’s own tracking isn’t enough for serious Google Ads, and getting GTM onto a Shopify store cleanly frustrates most store owners. This template hands you a finished setup with conversion tracking, enhanced conversions and remarketing.

What’s in the template

Tags (4)

  • Google tag — base tag with conversion linker
  • Conversion Linker — for correct click attribution
  • Google Ads remarketing — fires on view_item and add_to_cart for dynamic remarketing
  • Google Ads enhanced conversion — passes customer data on checkout_completed

Triggers (2)

  • view_item | add_to_cart — for remarketing audiences
  • checkout_completed — for the purchase conversion

Variables (13)

  • Order data: orderId, subtotal, currency, tax, shipping
  • Customer data: email, phone, firstName, lastName, street, city, region, countryCode
  • Google Ads IDs: conversion ID, conversion label

Shopify + GTM: the awkward part

Shopify won’t let GTM run natively on the checkout page unless you’re on Shopify Plus. Custom Pixels (the Web Pixels API) gave that an official route:

  1. Shopify admin → Settings → Customer events
  2. Create a custom pixel
  3. Push dataLayer events on the checkout page

checkout_completed, view_item and add_to_cart then reach GTM through the dataLayer.

Setup

1. Import the template

Import container → upload the JSON → merge.

2. Swap the IDs

Search for XXXXX in the container and replace:

  • G-XXXXX → your Google tag ID
  • Conv ID XXXXX → your Google Ads conversion ID
  • Conversion label → your specific label

3. Set up the Shopify custom pixel

In Shopify, under Customer events, create a pixel that implements the e-commerce events as dataLayer pushes.

4. Switch on enhanced conversions

In Google Ads under Conversions → Settings → Enhanced conversions. The customer data (email, address) is passed hashed.

Why enhanced conversions matter on Shopify

Without them you lose a meaningful share of your conversions — above all with:

  • iOS users (Safari ITP blocks third-party cookies)
  • Cross-device purchases (click on the phone, buy on the laptop)
  • Consent refusals (the user declines cookies)

Enhanced conversions take the first-party data the customer types into checkout anyway and match it, hashed, against Google accounts. Google puts the gain at 10–20% more recorded conversions.

Download the template

The configurator that generates this container — along with the other six templates — sits on my German site: GTM configurator (in German). The interface is German; the JSON it produces is language-neutral.

Grab the container file below and import it into your Google Tag Manager container under Admin → Import Container. No sign-up, no email wall — it’s a plain file.

Downloadgtm-template-shopify-conversion-tracking.jsonGTM container, ~23 KB — import it straight into your container

Want your Shopify tracking set up properly, or checked before you scale spend? Write to me.