A Google Tag Manager Server-Side tag template to send your conversion events (online and offline) to Google Ads and Google Analytics 4 through Google's Data Manager API — the successor of the Google Ads Offline API and the GA4 Measurement Protocol API.
- Server-to-server tracking: bypass ad blockers, cookie restrictions, and Safari ITP.
- Offline conversion import from your CRM, POS, or CDP.
- Multiple destinations in one request: Google Ads conversion actions and GA4 properties.
- Automatic SHA-256 hashing of user data (already-hashed values are passed through).
- Consent Mode support: consent read from the incoming event and normalized (
granted/denied/true/false→CONSENT_GRANTED/CONSENT_DENIED). - Test mode (
Validate Only): validate requests without recording conversions.
- Authorize your service account on the destination: Standard role in Google Ads and/or Editor role in GA4.
- Download
template.tpland import it in your GTM Server container (Templates → Tag templates → New → ⋮ → Import). - Create a tag from the template, fill in your destinations (Google Ads Customer/Conversion ID, GA4 Property/Measurement ID), and trigger it on your conversion event.
- Send your events to the GTM Server endpoint in Measurement Protocol (GA4) format:
{
"events": [{
"name": "purchase",
"params": {
"gclid": "123",
"transaction_id": "12345",
"value": "30",
"currency": "EUR",
"consent": { "ad_user_data": "CONSENT_GRANTED", "ad_personalization": "CONSENT_GRANTED" },
"user_data": { "email_address": "john.doe@acme.com", "phone_number": "+33627362122" }
}
}]
}- Test with
Validate Onlyset totrue, then switch it tofalsein production.
Full step-by-step guides (authentication, Measurement Protocol client, field mapping, testing with Postman):
- 🇬🇧 Offline Google Ads & GA4 conversions with Data Manager API
- 🇫🇷 Conversions offline Google Ads & GA4 avec Data Manager API
Open an issue or contact support@addingwell.com.
Maintained by Addingwell.