Fix Enhanced Conversions Unverified Customer Data PHP Checkouts
Resolve 'unverified user data' in Google Ads enhanced conversions on multi-page PHP checkouts. Full debugging guide, GTM fixes, and normalization code.
By AdTurbo Team · 2026-10-16
Seeing the warning "Unverified user data" or finding that your enhanced conversions diagnostics failed in PHP checkouts can stall your Google Ads performance. When Google Ads detects that hashed customer data (like email addresses or phone numbers) provided by your conversion tag fails formatting checks, lacks volume, or fails validation against Google's identity graph, it throttles or disables the enhanced conversion bidding signals.
Multi-page custom PHP checkouts (common across custom WooCommerce builds, Magento/Adobe Commerce, Laravel applications, and legacy LAMP stacks) are uniquely susceptible to this issue. Unlike single-page applications (SPAs) or managed platforms like Shopify where user data remains in a centralized client-side state, multi-page PHP flows frequently isolate customer inputs behind separate HTTP POST requests, server-side session cookies, redirects, and sanitized thank-you views.
Below is a comprehensive technical breakdown of why multi-page PHP architectures trigger unverified customer data alerts, followed by production-ready code examples, Google Tag Manager (GTM) configurations, and debugging workflows to restore verified status.
---
Anatomy of Enhanced Conversions and the "Unverified User Data" Warning
To diagnose the issue effectively, you must first understand what Google expects from your application and how verification occurs behind the scenes.
How Enhanced Conversions Work vs. Standard GCLID Tracking
Standard Google Ads conversion tracking relies heavily on cookies (gclaw, gac) and the Google Click Identifier (gclid) or wbraid/gbraid URL query parameters captured when a visitor clicks an ad. When the user completes a purchase on your confirmation page (/checkout/success.php), the Google tag reads these first-party cookies and attributes the conversion to the matching ad auction.
However, privacy restrictions, Safari's Intelligent Tracking Prevention (ITP), cross-device purchasing paths, and browser privacy extensions regularly strip or expire click identifiers before a checkout finishes. Enhanced Conversions bridges this gap. When a visitor submits their personal details during checkout, your code hashes that data using SHA-256 and sends it alongside the conversion ping. Google matches that hashed data (such as sha256([email protected])) against its logged-in user database (YouTube, Gmail, Chrome, Android) to recover lost attribution and inform Smart Bidding models.
What the "Unverified User Data" Alert Actually Means
Within your Google Ads account (Goals Conversions Summary [Your Conversion Action] Diagnostics), Google evaluates incoming enhanced conversion payloads. If you encounter "Unverified user data", it signifies one of four specific structural breakdowns:
1. Payload Structure Mismatch: The data sent to the tag does not adhere to the exact key names Google expects (e.g., sending emailaddress instead of email inside the userdata object).
2. Unnormalized Strings Prior to Hashing: The customer's email or phone number was hashed before whitespace was trimmed, before capital letters were downcased, or without an international calling code.
3. Premature or Empty Tag Execution: The conversion tag fires on page load before the PHP session, database query, or GTM dataLayer push has populated the customer data object, resulting in empty strings or undefined values being dispatched.
4. Low Match Rate Sample: If less than a critical threshold of incoming conversions contains recognizable hashed data over a trailing 7- to 14-day rolling window, Google flags the implementation as unverified because it cannot reliably confirm that your setup is working correctly.
The Diagnostic Lifecycle: From Active to Needs Attention
Google Ads tracks Enhanced Conversions through distinct diagnostic statuses:
• Recording enhanced conversions (Active): Over 70-80% of conversion pings include correctly formatted, matchable user data.
• Processing / Learning: Data has started flowing, but Google requires up to 48 hours to assess formatting integrity and match quality.
• Unverified user data (Needs Attention): Conversion pings are arriving with user data fields present, but Google's automated validators are rejecting the payload due to formatting, hashing, or empty parameters.
• No recent data: The tag has stopped sending enhanced conversion fields entirely.
When your status degrades to "Unverified," Smart Bidding algorithms gradually lose confidence in conversion values and volume, leading to volatility in your target CPA (tCPA) or target ROAS (tROAS) bidding models. If you are already troubleshooting campaign performance swings, review our guide on Google Ads not working to see if tracking failures are skewing your automated bidding.
---
Why Multi-Page PHP Checkouts Break User Data Verification
Custom PHP multi-page checkouts present unique tracking hurdles that rarely occur on modern headless architectures or pre-packaged SaaS stores. Here is why custom PHP setups frequently break enhanced conversions.
Multi-Page PHP Flow (Where Data Drops Occur):
[Step 1: /checkout/billing.php]
│ User inputs Email, Phone, Address
▼
[Step 2: POST /checkout/process-payment.php]
│ PHP writes data to $SESSION['customer']
│ Payment gateway gateway redirect (302/303)
▼
[Step 3: /checkout/thank-you.php]
├── Issue A: Session destroyed prematurely before GTM fires
├── Issue B: DataLayer push executed AFTER Google Tag fires
└── Issue C: String sanitization strips + from phone numbers
The State Loss Problem Across PHP Session Boundaries
In a traditional three-step PHP checkout:
• Step 1: /checkout/cart.php
• Step 2: /checkout/billing.php (User inputs name, email, billing address, phone)
• Step 3: /checkout/payment.php (User inputs credit card details or redirects to an external processor like PayPal, Stripe, or Adyen)
• Step 4: /checkout/thank-you.php?orderid=12345 (Receipt page with conversion script)
By the time the user lands on thank-you.php, the billing form data is no longer present in the client-side DOM. The frontend browser has navigated through multiple HTTP requests. The user data resides solely in the server-side $SESSION array or the database record matching orderid.
If the PHP developer did not explicitly write code on thank-you.php to extract that customer data from the database/session and output it into the HTML or window dataLayer, frontend tools like GTM or the Google Tag (gtag.js) have nothing to read. Many setups inadvertently attempt to read form fields that no longer exist on the final page, passing empty strings to Google.
Timing Desynchronization Between Form Submission and Thank-You Page
Even when developers attempt to inject customer data via PHP into the confirmation page, race conditions often emerge. If your dataLayer.push({ userdata: { ... } }) executes in a script tag located after the main Google Tag Manager container snippet in your document , the Google Ads Conversion Tag may fire on the gtm.js (Page View) event before the user data object exists in memory.
When this occurs, the Google conversion ping fires with an empty userdata payload. While the conversion itself registers, Google records an enhanced conversion attempt with missing user data. Over dozens of transactions, this triggers the "unverified customer data" flag.
DOM Element Destruction and AJAX Checkout Bottlenecks
In hybrid PHP checkouts, steps are often loaded via jQuery or native fetch() calls that swap out DOM elements without full page reloads. If your GTM setup uses "DOM Scraping" (CSS Selectors) to pull the customer's email from an field, that element is frequently destroyed when the payment step loads. Trying to fire the conversion tag upon order completion while referencing a deleted input element yields null or empty strings.
Header Obfuscation, Content Security Policies, and Sanitization
PHP applications typically pass customer inputs through strict sanitization pipelines. For example:
php
// Over-sanitization that breaks phone formatting:
$phone = filtervar($POST['phone'], FILTERSANITIZENUMBERINT);
While FILTERSANITIZENUMBERINT removes spaces and invalid characters, it often misinterprets international prefixes or leading zeroes depending on the regex applied. Similarly, if your PHP server sends strict Content-Security-Policy (CSP) headers that block inline scripts, any dynamic script block printing customer variables into the page will be blocked by the browser, leaving GTM blind.
---
Step-by-Step Diagnostic: Isolating Where Customer Data Drops
Before modifying code, you must locate the exact point where user data breaks. Follow these diagnostic steps to pinpoint the failure.
Inspecting Network Payloads (Google Ads /collect Calls)
Open your browser's Developer Tools (F12 or Cmd + Option + I), switch to the Network tab, and complete a test purchase on your PHP staging or live site. Filter the network requests by googleadservices.com or collect.
1. Locate the request to /pagead/1p-user-list/ or /pagead/conversion/.
2. Inspect the Payload / Query String Parameters.
3. Look for the em (hashed email), ph (hashed phone), or ud (user data) parameter.
// Example of a valid enhanced conversion payload parameter:
em=tv.1~em.e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
If you see em=tv.1~em. with no hash following the prefix, or if the parameter is completely absent despite Enhanced Conversions being enabled in Google Ads, your frontend tag is dispatching an empty string. Google registers this as a malformed attempt, eventually throwing the unverified data error.
Verifying SHA-256 Hashing and Normalization
Google requires that customer data be processed with specific normalization rules prior to SHA-256 hashing:
• Email: Trim leading and trailing whitespace, convert all characters to lowercase, and hash using SHA-256 (64 hex characters).
• Phone Numbers: Strip all punctuation, spaces, and leading zeros, and format according to the E.164 standard (e.g., +14155552671).
• Name & Address: Convert to lowercase, remove punctuation, and use ISO 3166-1 alpha-2 country codes (e.g., US, GB, AU).
If your PHP script or JavaScript hashes an email like " [email protected] " without trimming and lowercasing, the resulting hash will never match Google's database:
Raw: " [email protected] "
Incorrect Hash: 7b5a88dc1be1a65f... (Unnormalized)
Correct Normalization: "[email protected]"
Correct Hash: 23b670390f4e0c4... (Verified Match)
When Google's validation algorithms process your batches, an unnormalized hash fails identity resolution, dropping your match rate to zero and triggering diagnostics warnings.
Debugging via Google Tag Manager Preview Mode
If you deploy tracking via GTM:
1. Launch GTM Preview Mode and connect it to your PHP checkout checkout URL.
2. Navigate through the checkout steps to the final confirmation page.
3. In Tag Assistant, click on the event that triggers your Google Ads Conversion Tracking tag (e.g., Purchase or Container Loaded).
4. Select the Google Ads Conversion Tag and navigate to Tag Details.
5. Check the User Data property. If it reads undefined, an empty object {}, or values consisting of empty strings "", your GTM trigger is firing before the variable is accessible in the dataLayer.
Auditing PHP Server Logs and Session Dumps
If user data appears in GTM on some orders but fails on others, check your PHP session garbage collection and session serialization settings (php.ini).
When payment processors use off-site redirects (e.g., 3D Secure verification or external checkout portals), the user's session cookie might be dropped if your SameSite cookie attribute is set to Strict instead of Lax. When the customer returns to thank-you.php, PHP generates a brand-new, empty session ID. The confirmation script cannot find the customer record, fails to print the dataLayer variables, and the enhanced conversion tag fires without user data.
---
Comparison of Data Injection Methods in PHP Checkouts
The following table compares the most common methods for passing customer data into Google Enhanced Conversions within PHP environments:
| Method | Reliability | Security / Privacy | Maintenance Overhead | Risk of Verification Failure |
| :--- | :--- | :--- | :--- | :--- |
| DOM Scraping via CSS Selectors | Low | Low (client-visible inputs) | High (breaks on UI redesigns) | Very High (elements often absent on confirmation page) |
| Pre-GTM Header dataLayer Push | High | Medium (requires server-side sanitization) | Low | Low (synchronous, fully available on load) |
| Hashed DataLayer Injection (Server-Side PHP Hash) | Very High | High (raw PII never exposed in browser HTML) | Medium | Very Low (meets Google normalization perfectly) |
| Server-Side GTM via cURL / Google Ads API | Highest | Highest (zero client-side data exposure) | High (requires developer maintenance) | Near Zero (bypasses browser ad blockers and CSP issues) |
---
Core Architectural Fixes for Custom PHP Multi-Page Flows
To resolve "unverified user data" permanently, implement one of the following architectural patterns directly into your PHP application.
Pattern 1: Secure DataLayer Injection in PHP Templates
The most resilient client-side approach involves pulling the validated order details from your database on thank-you.php, normalizing and hashing the data in PHP, and outputting it into the dataLayer above the Google Tag Manager container.
Here is a production-grade PHP function to normalize and hash customer data according to Google's strict requirements:
php
<?php
/
• Normalizes and hashes customer data for Google Ads Enhanced Conversions.
/
function getGoogleEnhancedConversionData(array $order): array
{
$userData = [];
// Normalize and hash Email
if (!empty($order['email'])) {
$cleanEmail = strtolower(trim($order['email']));
$userData['sha256emailaddress'] = hash('sha256', $cleanEmail);
}
// Normalize and hash Phone (E.164 format)
if (!empty($order['phone'])) {
// Strip everything except numbers and '+'
$cleanPhone = pregreplace('/[^0-9+]/', '', trim($order['phone']));
// Ensure leading '+' exists; default to country code if missing (e.g., US +1)
if (!strstartswith($cleanPhone, '+')) {
$cleanPhone = '+1' . ltrim($cleanPhone, '0');
}
$userData['sha256phonenumber'] = hash('sha256', $cleanPhone);
}
// Address details (optional but increases match quality)
$address = [];
if (!empty($order['firstname'])) {
$address['sha256firstname'] = hash('sha256', strtolower(trim($order['firstname'])));
}
if (!empty($order['lastname'])) {
$address['sha256lastname'] = hash('sha256', strtolower(trim($order['lastname'])));
}
if (!empty($order['postalcode'])) {
$address['postalcode'] = trim($order['postalcode']);
}
if (!empty($order['countrycode'])) {
$address['country'] = strtoupper(trim($order['countrycode'])); // ISO 3166-1 alpha-2
}
if (!empty($address)) {
$userData['address'] = $address;
}
return $userData;
}
?
Next, render this directly into your thank-you.php template. Crucial: Place this script tag before the GTM container or gtag.js script tag in your document's :
html
Thank You for Your Order
<?php
// Fetch order safely using session or sanitized query parameter
$orderId = filterinput(INPUTGET, 'orderid', FILTERSANITIZENUMBERINT);
$order = fetchOrderFromDatabase($orderId); // Your application's DB lookup
if ($order && verifyUserCanViewOrder($order)) :
$enhancedUserData = getGoogleEnhancedConversionData($order);
?
<?php endif; ?
<!-- Google Tag Manager Snippet --
By normalizing and hashing server-side, you completely bypass client-side race conditions, DOM element scraping failures, and formatting discrepancies. Most importantly, raw personally identifiable information (PII) is never written directly to the DOM in plain text.
Pattern 2: Server-Side Session Forwarding Across Redirects
If your PHP checkout uses third-party payment gateways (like Stripe Checkout or PayPal), the user leaves your domain and returns to thank-you.php via a GET redirect. Often, cross-site tracking limits prevent cookie reading. Configure your PHP session handling to ensure the customer ID or temporary token persists:
php
// In your payment initialization controller:
sessionsetcookieparams([
'lifetime' = 3600,
'path' = '/',
'domain' = $SERVER['HTTPHOST'],
'secure' = true,
'httponly' = true,
'samesite' = 'Lax' // Must be 'Lax' to retain cookie across external payment redirects
]);
sessionstart();
// Store a temporary verification token tied to the checkout session
$SESSION['checkoutorderid'] = $newOrder['id'];
$SESSION['checkouttoken'] = bin2hex(randombytes(32));
When handling the return URL, read the order safely without relying exclusively on URL query parameters that ad blockers or privacy proxies might strip.
Pattern 3: Direct Server-to-Server Enhanced Conversion Dispatch
For enterprise PHP architectures where client-side JavaScript is subject to aggressive ad blocking, dispatching conversion events directly from PHP to Google's measurement infrastructure provides absolute verification reliability. This can be achieved using a server-side Google Tag Manager (sGTM) container endpoint or via the Google Ads API.
Here is how you dispatch an enhanced conversion ping directly to a server-side GTM endpoint using PHP cURL:
php
<?php
function sendServerSideEnhancedConversion(array $orderData, string $sgtmEndpoint):
bool
{
$payload = [
'clientid' = $COOKIE['ga'] ?? null,
'userdata' = getGoogleEnhancedConversionData($orderData),
'eventname' = 'purchase',
'value' = (float)$orderData['totalamount'],
'currency' = $orderData['currency'],
'transactionid' = (string)$orderData['id'],
'pagelocation' = 'https://' . $SERVER['HTTPHOST'] . '/checkout/thank-you.php'
];
$ch = curlinit($sgtmEndpoint . '/mp/collect');
curlsetoptarray($ch, [
CURLOPTPOST = true,
CURLOPTRETURNTRANSFER = true,
CURLOPTHTTPHEADER = ['Content-Type: application/json'],
CURLOPTPOSTFIELDS = jsonencode($payload),
CURLOPTTIMEOUT = 5
]);
$response = curlexec($ch);
$httpCode = curlgetinfo($ch, CURLINFOHTTPCODE);
curlclose($ch);
return ($httpCode === 200 || $httpCode === 204);
}
?
Server-side execution guarantees that network-level packet drops, client-side script blockers, or script execution delays never corrupt the customer payload.
---
Client-Side Resolution: Correcting Google Tag Manager Configuration
If you prefer to keep conversion tags inside client-side Google Tag Manager while your PHP script pushes raw or unhashed data to the dataLayer, you must configure GTM to parse the fields without errors.
Step 1: Create a User-Provided Data Variable
1. In your GTM Container, navigate to Variables User-Defined Variables New.
2. Choose User-Provided Data as the Variable Type.
3. Set the mode to Manual Configuration.
4. Link each field to a corresponding Data Layer Variable:
• Email: {{dlv - userdata.email}} (or {{dlv - userdata.sha256emailaddress}} if pre-hashed in PHP).
• Phone Number: {{dlv - userdata.phone}}.
• First Name: {{dlv - userdata.address.firstname}}.
• Last Name: {{dlv - userdata.address.lastname}}.
• Postal Code: {{dlv - userdata.address.postalcode}}.
• Country: {{dlv - userdata.address.country}}.
5. Save the variable as Google Ads - User Provided Data.
GTM User-Provided Data Variable Mapping:
[Field] -- [Data Layer Variable]
Email -- dlv - userdata.email
Phone -- dlv - userdata.phone
First Name -- dlv - userdata.address.firstname
Last Name -- dlv - userdata.address.lastname
Postal Code -- dlv - userdata.address.postalcode
Country -- dlv - userdata.address.country
Step 2: Attach the Variable to Your Conversion Tag
1. Navigate to Tags and select your Google Ads Conversion Tracking tag.
2. Locate the checkbox labeled Include user-provided data from your website.
3. In the dropdown, select the {{Google Ads - User Provided Data}} variable configured in Step 1.
4. Change the tag triggering from All Pages or Page View to a Custom Event Trigger set to purchaseready (matching the event pushed in your PHP script).
Firing the tag on a custom event guarantees that the conversion tag executes only after the PHP-generated dataLayer object has finished loading into browser memory.
---
Formatting and Normalization Standards That Prevent Diagnostic Rejections
Even a single misplaced character can invalidate a customer record during Google's backend processing. Ensure your normalization functions respect these standards.
E.164 Phone Formatting in PHP
The E.164 standard is the international telephone numbering format that ensures every phone number is globally unique. It requires:
• A leading plus sign (+)
• An international country calling code (e.g., 1 for the US/Canada, 44 for the UK)
• A subscriber number with no spaces, dashes, or parentheses
• Maximum 15 digits
If your PHP checkout collects phone numbers via two separate fields (e.g., an area code input and a local number input), merge and format them before transmission:
php
function formatToE164(string $rawPhone, string $defaultCountryCode = '+1'): string
{
// Remove all non-digit characters
$digits = pregreplace('/\D/', '', $rawPhone);
// If the user already typed a leading +, retain it
if (strstartswith(trim($rawPhone), '+')) {
return '+' . $digits;
}
// Handle US numbers missing +1
if ($defaultCountryCode === '+1') {
if (strlen($digits) === 10) {
return '+1' . $digits;
} elseif (strlen($digits) === 11 && strstartswith($digits, '1')) {
return '+' . $digits;
}
}
return $defaultCountryCode . $digits;
}
Email Trimming and Domain Canonicalization
Google accounts automatically normalize Gmail addresses by disregarding periods and handling domain aliases (like @googlemail.com). While Google performs these adjustments on their end, failing to perform fundamental client-side formatting will cause rejection. Always apply strtolower(trim($email)) in PHP before running hash('sha256', ...). Never send uppercase letters to the SHA-256 algorithm; [email protected] produces a completely different cryptographic digest than [email protected].
---
Verifying the Fix and Restoring Smart Bidding Confidence
Once your technical updates are deployed to your PHP production environment, Google Ads does not immediately update the status column. Understanding the evaluation timeline prevents premature troubleshooting.
The 48-Hour Conversion Diagnostics Latency Window
Google Ads aggregates conversion diagnostics in asynchronous batches. After deploying the fix:
1. Check the Google Ads Diagnostics tab 24 to 48 hours post-deployment.
2. Review the Conversion Action Status. You should see it change from "Unverified user data" to "Recording enhanced conversions (Learning)".
3. Over the next 7 days, as live transaction volume accumulates, the status will finalize to "Recording enhanced conversions".
4. Check the match rate graph. A healthy e-commerce or lead generation checkout should maintain an enhanced conversion match rate between 40% and 75%, depending on your audience demographics and international traffic distribution.
Assessing Impact on Smart Bidding Algorithms
When enhanced conversion diagnostics fail, bidding algorithms like Maximize Conversions, Target CPA, and Target ROAS operate on degraded data. They struggle to link user clicks to completed purchases across mobile-to-desktop browsing sessions. Once verification is restored, bidding models will gradually adjust. During the first 14 days following a tracking fix, avoid making drastic target changes; give the bidding model time to calibrate against the improved conversion attribution.
For a complete roadmap on auditing your conversion pipelines and campaign efficiency, consult our detailed PPC audit checklist and weekly Google Ads optimization checklist.
If you manage complex multi-campaign structures where tracking errors can quietly inflate your acquisition costs, automated campaign management software can safeguard your ad spend. Platforms like AdTurbo ($149/month with a 7-day trial, credit card required) continuously analyze account telemetry, helping advertisers identify conversion discrepancies, flag wasted budget, and optimize bid allocations across Search and Performance Max campaigns.
---
Related Guides
• PPC Audit Checklist: 12 Steps to Fix a Leaking Google Ads Account
• Google Ads Not Working? 11 Things to Check Before You Panic
• Google Ads Optimization Checklist: 15 Things to Check Every Week
---
Frequently Asked Questions
Why does Google Ads show "Unverified user data" even when my test conversion succeeded?
Google Ads does not verify enhanced conversion data based on a single test transaction. The diagnostic engine evaluates your conversion stream in rolling batches over several days, requiring a statistically valid sample of properly formatted and matchable records before changing your status from "Unverified" to "Recording enhanced conversions."
Can I send raw customer data to Google Ads, or must it be hashed in PHP first?
Both approaches are supported. If you send raw, unhashed strings via the Google Tag or Google Tag Manager's User-Provided Data variable, the tag automatically formats and applies SHA-256 hashing in the browser before transmission. However, hashing the data server-side in PHP provides higher privacy compliance and prevents sensitive customer PII from ever being exposed in the client-side DOM.
What happens to my Smart Bidding performance while Enhanced Conversions is unverified?
When enhanced conversions are unverified, Google Ads falls back to standard click-based tracking (relying solely on cookies and GCLIDs). Smart Bidding continues to function, but it loses cross-device and modeled attribution signals, which typically results in reported conversion drops of 5% to 15% and less efficient bid distribution until the verification issue is resolved.