Search

How to set up server-side tracking for Google Ads

Set up Google Ads server-side conversion tracking for ecommerce. Choose a purchase route, map click IDs and consent, then test one paid order.

By , Founder
Updated 7 min read

Google Ads server-side conversion tracking sends purchase data from a tagging server or store backend. Start with a confirmed paid order and trace it from payment through delivery to the intended purchase action. Check whether the setup captures the value you want Shopping and Performance Max to bid on.

Steps to configure server-side tracking fast

  1. Choose an architecture for Google Ads conversions.
  2. Map the IDs, values and customer data you will send.
  3. Capture the click ID in the browser on your own domain.
  4. Send purchases server-side to Google Ads.
  5. Configure enhanced conversions if your Google Ads destination supports it.
  6. Configure Consent Mode and verify grants and denials.
  7. Prevent double counting with a transaction ID.
  8. QA in Google Ads diagnostics and Tag Assistant.
  9. (Optional) Post refunds and returns as conversion adjustments.

What you need before you start

  • Admin access to Google Ads and Merchant Center.
  • Your ecommerce platform login (Shopify, WooCommerce, Magento/Adobe Commerce, Shopware, Lightspeed or custom).
  • If you choose Google Tag Manager server-side: a Google Cloud project with billing enabled. Cloud Run is pay-per-use with an always-free tier; estimate cost with the pricing calculator.
  • If you advertise to users in the EEA: a CMP or banner that can pass Consent Mode v2 signals.
  • Basic skills: create conversions in Google Ads, publish tags, read network requests and logs.

Where should the purchase event start?

If the browser sends the purchase to server-side Tag Manager, test the web event and the server tag. If your store backend sends the event when payment is confirmed, trace the order from the store to the upload. In both routes, verify the transaction ID, currency and expected conversion action before switching what the campaign uses.

1. Choose an architecture for server-side conversions

Choose the paid-order source and the Google Ads destination separately. Use one purchase action for campaign bidding.

Route Paid-order source Google Ads destination
Server-side Google Tag Manager (sGTM) The browser forwards the purchase event to your tagging server The Google Ads Conversion Tracking tag in the server container
Direct backend delivery Your store or order management system sends the confirmed order An offline click conversion action reached through the Data Manager API
Google Analytics 4 (GA4) fallback Browser tagging or backend delivery, depending on how GA4 receives the purchase A GA4 purchase imported into Google Ads

New offline click-conversion and enhanced-conversions-for-leads integrations must use the Data Manager API following Google’s June 2026 migration notice. A GA4 import is a fallback destination. Check its event source before describing it as server-side.

2. Map the data Google Ads needs for Shopping and Performance Max

Map these purchase data points to the parameter names and requirements of your chosen route:

  • order_id - your transaction or order number, used for deduplication.
  • value and currency - the net revenue you want bidding to learn from.
  • timestamp - in UTC and within your account’s lookback window.
  • click identifier - gclid when present, otherwise wbraid or gbraid.
  • enhanced conversions data (if available) - email, phone or address hashed with SHA-256.

Result: a field-by-field map from your checkout to the payload you will send.

3. Capture the click ID on your own domain

  • Keep gclid/wbraid/gbraid on the user’s path until checkout.
  • If you run GTM server-side, configure a client to receive web requests from your browser tag, then set first-party storage on your domain.
  • If you rely on a GA4 import, verify the Google Ads account link and use the GA4 ecommerce transaction_id for the purchase. Check acquisition and attribution in GA4.
Four-step route of a Google Ads click ID: gclid in the landing URL, stored first-party on your domain, attached to the order with the order_id, then sent server-side to Google Ads
The click ID has to survive every hop between the ad click and the order; storing it on your own domain is what keeps it through checkout redirects.

Test whether the click ID and order ID survive your payment redirects.

4. Send purchases server-side to Google Ads

  • Browser-fed sGTM. Add a Google Ads Conversion Tracking tag in the server container. Trigger it on the received purchase event. Map the transaction ID, value and currency and verify the conversion linker and destination in preview.
  • Direct backend delivery. Send the confirmed purchase using the Data Manager API offline conversion schema. Map the original click identifier when available, transaction ID, timestamp, value and currency, then check delivery diagnostics.
  • GA4 import fallback. Verify that GA4 receives the purchase, link the Google Ads account and import the GA4 key event. Check the imported action separately.

5. Enable enhanced conversions on supported Google Ads actions

Google Ads uses a unified enhanced conversions setting for supported tags, Data Manager and API connections. Accept the customer data terms and send data only when permitted.

  • Server-side Tag Manager. Configure user-provided data in the web and server containers following Google’s server-side Ads tag guide. Use preview to check the available fields and consent.
  • Data Manager API. Follow the route’s documented user-data fields and normalisation and hashing requirements for the chosen conversion type. Check the API result and Ads diagnostics.
  • GA4 import. Google Ads enhanced conversions does not apply to conversions imported from Google Analytics. Use a supported Google Ads action if Google Ads enhanced conversions is required.

Set consent defaults before measurement and update them when the shopper makes a choice. With Basic Consent Mode, Google tags are blocked until the shopper grants consent. With Advanced Consent Mode, tags load with defaults and can send cookieless pings when consent is denied, subject to your policy and applicable requirements. Carry the consent state to the server and verify it for both choices. Check ad_storage, analytics_storage, ad_user_data and ad_personalization. See Google’s EU consent guidance.

7. Prevent double counting with a transaction ID

Google Ads uses the same transaction ID to deduplicate repeat purchases within a single conversion action. A browser tag and a server route can still record the same order separately if they send to different actions, including a Google Analytics 4 import. Keep one primary purchase action in the campaign’s bidding goals. During migration, validate the replacement as secondary and check campaign custom goals, which can still use a secondary action for bidding. Segment Google Ads reports by conversion action before comparing volumes or values. Follow Google’s transaction ID guidance and keep the identifier stable across retries.

8. QA that the setup works in Google Ads

Place a paid test order. Compare its order ID, action, value and currency with the tag request or supported delivery log, then check Google Ads diagnostics. Use Tag Assistant for tag routes and upload diagnostics for API routes. Delivery and attribution are different checks: compare Google Ads and store totals in aggregate after allowing for reporting lag, using the same conversion-time basis, time zone and value definition. Product Metrics users can trace paid orders in Check tracking.

9. Post refunds and returns as conversion adjustments (optional but recommended)

For adjustments supported by your route and within Google Ads’ adjustment window, test a partial refund with the original transaction ID and action. Check that RESTATE carries the full revised conversion value. Use RETRACT for an eligible fully cancelled conversion. Check the adjustment result before switching bidding.

An illustrative €120 purchase is restated to €80 after a €40 return or retracted after a full refund.
Illustrative data. Restate the remaining €80 after a €40 refund, or retract the original conversion after a full cancellation.

See the refund workflow for retailers.

Troubleshooting

  • Purchases counted twice - two sources are Primary for the same event or order_id changes between sources. Fix by keeping one Primary purchase action and one order_id format, then recheck Diagnostics.
  • “No recent conversions” - verify delivery to the expected action, then check eligible attribution and reporting lag.
  • Offline rows rejected - invalid or expired click ID, duplicate order_id, or wrong time zone. Use partial failure logs and fix the field causing the reject.
  • Enhanced conversions warning - hashing or normalisation is wrong. Normalise email and phone then SHA‑256 before sending; verify in the diagnostics report after 48 hours.
  • EEA consent issues - ads personalization paused for EEA users. Implement Consent Mode v2 on your banner and verify ad_user_data is present.

Tips and alternatives

  • If you start with a GA4 import, validate the replacement Google Ads action as secondary before changing the bidding goal.
  • If you prefer managed infrastructure, GTM server-side runs on Cloud Run with automated provisioning or manual Docker deploys. Use the pricing calculator to estimate cost by traffic. (developers.google.com)
  • Use conversion adjustments to restate values after partial returns so value-based bidding tracks contribution profit, not gross revenue.
  • For Shopping segmentation, map business rules to custom labels, for example: custom_label_0: margin_tier (high, medium, low), custom_label_1: stock_cover_days (<=14, 15-45, >45), custom_label_2: price_position (below, match, above), custom_label_3: return_rate (<=5, 5-10, >10). Use these labels in your PMax and Shopping structures.

Next step

Trace the next confirmed purchase through your selected route and use its delivery record to choose the campaign’s bidding action.

Grow revenue and profit from every order and every product.

Product Metrics is a profit optimisation platform for ecommerce advertising: one app for server-side tracking, profit bidding, product segmentation and campaign planning across Google Ads, Meta and ChatGPT Ads. It sends each order’s profit, new or returning status and lifetime value to the ad platforms, so merchants can bid on POAS, new customers and LTV. Machine learning segments every product into custom labels for Shopping and Performance Max, and the campaign plan sets out the ideal campaign structure for those segments. A dashboard shows profit, customers, stock and returns.

Compare the free analysis and Pro

Sources

Written by

, Founder of Product Metrics

1M+ products analysed · Nominated at the Dutch Search Awards for Best Measurement Campaign (2023) and Best Use of Data (2024)

Linkedin

Keep reading.

Frequently asked questions.

Does server-side tracking improve Google Shopping performance?

It improves the reliability of the data your bid strategies learn from. When verified conversions and values reach one purchase action for bidding, Performance Max can optimise towards revenue or profit signals.

Do I still need enhanced conversions if I send conversions server-side?

For supported Google Ads destinations, enhanced conversions uses permitted customer data to improve matching. Check that the selected action accepts this data. Conversions imported from Google Analytics are outside the Google Ads enhanced conversions setting.

What if my site uses app proxies or payment redirects?

Persist the click ID on your own domain and pass one consistent order_id into the event you send to Google Ads. Map the identifier to the paid order. Use the same transaction ID for repeats sent to the same conversion action.

We sell to Europe. What exactly changed with consent?

From March 2024, advertisers with EEA users must collect consent and send Consent Mode v2 signals for measurement, personalization and remarketing to continue as before. Use Google’s diagnostics to confirm signals are present. (support.google.com)

Should I use the Google Ads API for offline conversions?

If you’re building net-new as of June 15, 2026, use the Data Manager API instead. Existing integrations should be checked and migrated if needed. (developers.google.com)

See which of your products to push, fix or pause. Start with your own products, or a 30-second estimate.

See what a blocker stops with the ad blocker tracking test. Then see how your products perform once every conversion is counted.

Find your hidden profit30-second estimate · no login
Analyse your products for freeFree analysis, no credit card

Questions, or want to spar about your products? Book a demo: a video call with Berend, then a demo account.