The server-side request adscapi builds when you track() a purchase and GA4 (Google Analytics) is configured. Secrets and hashed values show as placeholders.
https://www.google-analytics.com/mp/collect?measurement_id={GA4_MEASUREMENT_ID}&api_secret={GA4_API_SECRET}Content-Type: application/json
{
"client_id": "<hashClientId(order_1001)>",
"consent": {
"ad_user_data": "GRANTED",
"ad_personalization": "GRANTED"
},
"events": [
{
"name": "purchase",
"params": {
"transaction_id": "order_1001",
"value": 49.99,
"currency": "USD"
}
}
]
}Verified against the library dispatcher (src/dispatchers/ga4.ts). See the GA4 (Google Analytics) setup guide for where to get each secret.
GA4_MEASUREMENT_IDGA4_API_SECRETGA4 (Google Analytics) activates when every secret is present. One missing key and the platform no-ops — the rest still receive the event.
| Canonical event | GA4 (Google Analytics) receives |
|---|---|
page_view | page_view |
lead | generate_lead |
signup_start | signup_start (custom event passthrough) |
signup | sign_up |
checkout_created | begin_checkout |
purchase | purchase |
reply_generated | reply_generated (custom event passthrough) |
upgrade_clicked | upgrade_clicked (custom event passthrough) |
Discover more free tools to fix your tracking
Pick a canonical conversion event, fill the fields, and see the exact JSON payload adscapi builds — before you write a line of code.
Try it nowType a raw email or phone number and see the normalized value plus its SHA-256 hash — the exact rules adscapi applies per platform. Nothing leaves the browser.
Try it nowSearch all 26 ad platforms adscapi dispatches to — support level, required secrets, and setup docs, always in sync with the library registry.
Try it nowadscapi is free and open source. Set your platform tokens, call track() once, and every configured Conversions API receives the event — hashed the way each platform expects.