The short answer: To send Google Ads conversions with enhanced conversions from server-side GTM: in the web container, create a User-Provided Data variable and add it to the Google tag as the configuration parameter user_data; in the server container, add a Conversion Linker tag and a Google Ads Conversion Tracking tag with your conversion ID and label, fired on the purchase event from the GA4 client. The server tag reads the order ID, value, currency and the customer data from the GA4 event by itself, and Google hashes the email and phone. Switch on enhanced conversions in Google Ads first.
This guide follows Google's own server-side Tag Manager documentation and adds the parts that usually go wrong: missing click IDs, unhashed data in GA4 and Safari's cookie limits.
Why do it server-side
- The click ID survives longer. The server's Conversion Linker stores the Google Ads click ID in a cookie set by your own server on your own subdomain, which Safari does not cut to 7 days like script-set cookies.
- Fewer blocked conversions. The browser sends one request to your domain; ad blockers that stop
googleadservices.comdo not see it. - Enhanced conversions match more sales. A hashed email or phone lets Google match a conversion to a signed-in Google user even when the click ID is gone.
Before you start
- A server GTM container on your own subdomain that already receives GA4 events. See Connect web GTM to your server container.
- A purchase event in GA4 format with
transaction_id,valueandcurrency. See How to track ecommerce events in GA4. - In Google Ads: Goals → Conversions → Settings → Enhanced conversions, switch it on, choose Google Tag Manager as the method and accept the customer data terms.
- The conversion action's Conversion ID and Conversion label (Goals → Conversions → your action → Tag setup → Use Google Tag Manager).
Step 1: Collect the customer data in the web container
- Create a variable of type User-Provided Data. Choose Code configuration if your site pushes the customer data to the dataLayer on the order confirmation page (most reliable), or Manual configuration with CSS selectors, or Automatic collection.
- Open your Google tag and add the configuration parameter
user_datawith this variable as its value. - If you send the purchase with a separate GA4 Event tag, add the event parameter
user_datathere too.
Send at least the email or the phone number. You can send them raw (Google hashes them) or already hashed with SHA-256 in hex, using keys that start with sha256_.
Keep it out of GA4. Google Analytics does not allow personal data. Use user_data only for Google Ads, and never copy the email or phone into another event parameter, a page address or a custom dimension. If you are unsure, exclude user_data from your GA4 tag in the server container with a transformation.
Step 2: Add the Conversion Linker in the server container
New tag → Conversion Linker → trigger on all events from the GA4 client (or all page views). It reads the gclid from the landing page address and stores it in a first-party cookie set by your server. Skip this if the server container already has one.
Step 3: Add the Google Ads Conversion Tracking tag
- New tag → Google Ads Conversion Tracking. Enter the Conversion ID and Conversion Label.
- Leave value, currency and transaction ID empty: the tag reads them from the GA4 ecommerce fields. Fill them only to override, for example to send profit instead of revenue.
- Trigger: Custom, Client Name equals
GA4and Event Name equalspurchase. - Save. The tag sends the user-provided data from Step 1 automatically as enhanced conversion data.
For a lead form instead of a purchase, use your lead event (for example generate_lead) and a separate conversion action.
Step 4: Test
- Open Preview in both containers and click a link with a test
gclidparameter, for example?gclid=test123, then place a test order. - In the server Preview, check that Conversion Linker and Google Ads Conversion Tracking fired, and look at the outgoing request to Google Ads.
- In the Console tab, check for errors about user data.
- After a day or two, Google Ads shows the enhanced conversions status in the conversion action's diagnostics. It needs real traffic, not only tests.
When the click ID goes missing
- Safari and Brave Private mode remove
gclidfrom the page address. A backup parameter in your Google Ads tracking template, for examplemygclid={gclid}, keeps a copy. Taglinc's Click ID Restorer turns it back intogclidin the server container. - Payment pages on another domain (PayPal, local gateways) can lose the cookie when the shopper comes back. Enhanced conversions still match on the email or phone.
- Shopify checkout runs in a sandbox where the server cannot read cookies. See Shopify server-side tracking for how to pass the click ID.
FAQ
Do I still need the Google Ads tag in the web container?
No. With this setup the web container sends GA4 events only, and the server container sends the conversion to Google Ads. Remove the old web Google Ads conversion tag for the same action, or the conversion counts twice.
Can I use GA4 imported conversions instead?
Yes, but imported GA4 conversions arrive later and with GA4's attribution. A Google Ads conversion tag reports directly and supports enhanced conversions, which most advertisers prefer for bidding.
Is the customer data safe?
It travels over HTTPS to your own server, and Google hashes it with SHA-256 before matching if you send it raw. Hash it in the browser if your privacy policy requires that nothing raw leaves the page.
How many extra requests does this use?
None. The server container sends the conversion from the purchase request it already receives. Taglinc counts incoming requests only.
Related reading
- Meta Conversions API with server-side GTM
- TikTok Events API with server-side GTM
- WooCommerce server-side tracking
Sources
Get new articles in your inbox
New guides on tracking and analytics, once or twice a month. No spam, unsubscribe any time.