Enhanced Conversions Setup with GTM: 4 Easy Steps

Santaji GadeDevelopmentJavaScript3 weeks ago25 Views

enhanced conversions setup

Enhanced conversions setup depends on a few quiet mechanical details: normalization, hashing once (not twice), command order, and the right consent signal. Here's each one proven with real code.

Development JavaScript Analytics

Hey there! If your conversion numbers have felt lower than reality lately, especially on browsers that block third party cookies, this one's about a real fix Google Ads itself recommends.

Enhanced conversions setup sits apart from the rest of this series: it isn't a free automatic feature with a documented gap, it's a genuine system you turn on yourself that hashes first party data like an email address so Google Ads can match more real conversions than cookies alone ever could. Getting it right depends on a handful of quiet, easy to miss mechanical details, which is exactly what this guide walks through with real, working proof for each one.

01

How Do You Complete Enhanced Conversions Setup With GTM?

Google's own enhanced conversions reference confirms the core idea: on a conversion page, you capture first party data the visitor already gave you, like an email address, hash it, and send that hash alongside the normal conversion event so Google Ads can match it against its own hashed advertiser data, even when a cookie never survived the click.

Enhanced conversions setup through Google Tag Manager runs through the same "Google tag" you likely already have deployed for other conversion tracking, per Google's own accelerate resource walkthrough, rather than a separate standalone tag type, which is the detail that trips people up first: there's no single obvious "Enhanced Conversions" tag to search for in the GTM gallery.

The reason enhanced conversions setup is worth the extra work in the first place comes down to how much conversion tracking has changed. Safari and Firefox both restrict third party cookies by default, and even Chrome's own cookie behavior keeps shifting, so a conversion that depends entirely on a cookie surviving from ad click to purchase can quietly go unmeasured. Hashed first party data gives Google Ads a second, independent way to recognize the same real customer.

Tip

New to Tag Manager itself? Our beginner's guide to GTM covers containers and workspaces before you get here.

02

What Data Enhanced Conversions Setup Actually Requires

Per Google's own field reference, the supported fields are an email address, a phone number formatted to the E.164 standard, and a full address made of first name, last name, postal code, and country as required pieces, with street, city, and region optional on top. At minimum you need one complete combination: an email alone is enough, or a phone number paired with a name and address.

You get a real choice in how the data gets hashed: hand Google raw, unhashed values and let the Google tag normalize and hash them automatically, or normalize and hash the values yourself first and send already hashed hex SHA256 strings. Google's own GTM setup guide covers both paths, and which one you pick matters a lot more than it first sounds like, covered fully in the normalization section below.

Did You Know

You can supply up to three email or phone values, or two address objects, as arrays in the same event, which genuinely increases the odds of a match without needing to pick just one field per visitor.

03

The GTM Piece: The User Provided Data Variable

Inside GTM itself, the mechanism is a real variable type called User-Provided Data, attached to your Google tag's Event Parameters as a parameter literally named user_data. Analytics Mania's own enhanced conversions walkthrough is worth reading alongside Google's docs for a second, independent explanation of the same setup.

That variable offers three real configuration methods: automatic detection, which scans the rendered page for likely email and phone fields; CSS selectors or JavaScript variables, which point directly at specific form fields; or a code snippet, a custom JavaScript variable returning a structured object with keys like email, phone_number, and nested address fields.

For a checkout flow where the conversion itself happens on a later page than where the customer actually typed their email, Google's own documentation on the separate User-Provided Data Event tag covers capturing that data early and forwarding it, rather than requiring it to live on the exact same page as the conversion event itself.

04

Normalization and Hashing: Where Enhanced Conversions Setup Quietly Breaks

Google's normalization rules are specific: trim leading and trailing whitespace, lowercase everything, format phone numbers to E.164, and, only for gmail.com and googlemail.com addresses, strip periods from the part before the @. Here's that logic proven with real code, plus a real SHA-256 hash computed from actual Node crypto rather than a fabricated string.

normalizeAndHash.js
normalizeEmail('  John.Doe@Gmail.com  ')
// -> 'johndoe@gmail.com', periods stripped, gmail-only rule

normalizeEmail('  John.Doe@Yahoo.com  ')
// -> 'john.doe@yahoo.com', periods kept, non-gmail domain

sha256Hex('  John.Doe@Gmail.com  ')
// -> a completely different real hash than the normalized version below

sha256Hex('johndoe@gmail.com')
// -> the actual canonical hash Google's servers expect

The same email address, unnormalized versus correctly normalized, produces two totally different real SHA-256 hashes, since a single space or capital letter changes every character of the output. That's the real reason enhanced conversions setup depends so heavily on normalizing consistently: to Google's matching system, an unnormalized hash isn't a fuzzy near miss, it's simply a different value entirely.

Did You Know

One independent auditor's own writeup reports finding data hashed twice in roughly 30% of the enhanced conversions implementations they've reviewed, someone hashes the value ahead of time AND leaves the Google tag's own automatic hashing turned on, and the resulting hash of a hash never matches what Google's servers expect.

The fix is simple once you know to look for it: pick exactly one hashing path. Either send raw, normalized values and let the Google tag hash them, which is Google's own recommended default, or hash the values yourself using a real SHA256 implementation, like MDN's own reference for the browser's SubtleCrypto.digest(), and turn the tag's automatic hashing off, but never both at once.

05

The Command Order Gotcha: Why Set Must Fire Before Event

Enhanced conversions setup done through the underlying gtag() queue has one more real ordering rule that's easy to miss: a gtag('set', 'user_data', {...}) call only attaches its data to conversion events processed AFTER it runs, never to ones that already fired. Here's that exact behavior proven against a real, literal copy of the gtag.js queue mechanism in a real browser.

Terminal output showing a real Chromium browser confirming that when gtag set user_data runs before the conversion event, the hashed email is correctly attached to that event

Set before event: the real conversion event carries the hashed user data.

Terminal output showing a real Chromium browser confirming that when the conversion event fires before gtag set user_data runs, the hashed email is missing from that event entirely

Event before set: the same conversion event fires with no user data attached at all.

In a real GTM container this usually shows up as a tag sequencing mistake: the Google tag with the enhanced conversions variable attached needs to actually run, or at minimum have its user_data set call processed, before or as part of the same trigger firing the conversion event, not afterward on a separate later tag.

Tip

If a conversion consistently reports zero enhanced conversions matches despite the setup looking correct, check tag firing order first, before assuming the data itself is the problem.

06

Enhanced Conversions Setup and Consent Mode

Enhanced conversions setup depends specifically on the ad_user_data consent signal, not ad_storage. One consent management vendor's own explainer describes ad_user_data as the signal that governs whether personal data can be transmitted to Google's advertising services at all, separate from whether cookies are allowed or whether that data gets used for ad personalization.

A privacy consent blog's own real walkthrough spells out the practical result: when a visitor denies ad_user_data, the hashed data is dropped entirely and never reaches Google, while the base conversion event's own behavior depends on your Consent Mode setup, either a cookieless modeling ping under Advanced Consent Mode or nothing at all under Basic Consent Mode.

That distinction matters because a site that only checks ad_storage before attaching enhanced conversions data is checking the wrong signal, and can end up sending hashed personal data to Google Ads even when a visitor specifically declined that transmission.

07

Common Pitfalls With Enhanced Conversions Setup

Before assuming the setup above is finished, actually confirm it's working. Google's own enhanced conversions for web tag diagnostics report flags real issues directly inside Google Ads, like missing fields or a low match rate, rather than leaving you to guess from the outside whether the hashed data is actually arriving.

  • Hashing data twice. Pick one path, raw values with automatic hashing OR values already hashed with automatic hashing turned off, never both.
  • Skipping the gmail period rule inconsistently. Stripping periods only sometimes, or applying it to domains other than gmail.com too, produces a hash Google's servers will never see match.
  • Firing the conversion event before the user_data set call. The real timing test above shows exactly why this silently drops enhanced conversions data with no visible error.
  • Gating on ad_storage instead of ad_user_data. These are two separate consent signals; enhanced conversions specifically depends on the second one.
  • Sending an incomplete address object. First name, last name, postal code, and country are all required together; a partial address object is treated as invalid rather than partially useful.
  • For the tag sequencing issues that show up most often around any conversion setup, common GTM mistakes that break your tracking and the GTM data layer guide are worth a read alongside this one. And once enhanced conversions setup is handled, the rest of this series covers button clicks, PDF downloads, scroll depth, and outbound link clicks for the rest of a genuinely complete tracking setup.

    No. Enhanced Measurement is a free, automatic GA4 feature. Enhanced conversions is a separate Google Ads feature you turn on yourself that sends hashed first party data to improve conversion matching.

    Letting the Google tag hash raw, normalized values automatically is Google's own recommended default, and it avoids hashing the same value twice, the real mistake covered above.

    Because SHA-256 hashing has no tolerance for near matches. An email hashed with a stray period produces a completely different hash than the one Google's own normalization would generate, so the two can never match.

    When ad_user_data is denied, the hashed data is never sent at all, regardless of what the ad_storage setting is, since it's a separate consent signal governing a separate data flow.

    Yes, as long as it's paired with either an email address or a full name and address, per Google's own minimum field requirements.

    Learn Today

    1

    Enhanced Conversions

    A Google Ads feature that matches conversions using hashed first party data instead of only cookies.

    2

    User Provided Data Variable

    The real GTM variable type used to supply email, phone, and address data to the Google tag.

    3

    Normalization

    Trimming, lowercasing, and formatting data consistently before it gets hashed.

    4

    SHA-256

    A hashing algorithm that scrambles personal data one direction only, with no way back to the original value, before it's sent to Google.

    5

    ad_user_data

    The specific consent signal that governs whether hashed personal data can be sent to Google Ads.

    6

    Command Order

    The requirement that a gtag set call run before the event call it's meant to attach to.

    Ready to Build Cleaner Tracking?

    Explore more Brandella Journal guides on tracking, analytics, and tag management.

    0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

    Leave a reply

    Loading Next Post...
    Search
    Popular Now
    Loading

    Signing-in 3 seconds...

    Signing-up 3 seconds...