GA4 / GTM Server
Forward events to GA4 via Measurement Protocol or to a server-side GTM container.
Prefer screenshots over text? Open the illustrated manual setup guide →
GA4 (Measurement Protocol)
AdsPing forwards events to GA4 via the Measurement Protocol. You provide a Measurement ID + API Secret; AdsPing posts events server-side as the right user (client_id from pb.js).
Find your credentials
- GA4 admin → Data Streams → pick your web stream.
- Copy the Measurement ID (format
G-XXXXXXXXXX). - Click Measurement Protocol API secrets → Create → name it "adsping" → save.
- Copy the API Secret.
Connect in AdsPing
- Pixel detail → GA4 card → Manual setup.
- Paste Measurement ID + API Secret → Save.
- AdsPing validates by sending a test event to GA4's
/debug/mp/collectendpoint. Card turns green if the credentials work.
GA4 has its own real-time view: GA4 → Reports → Realtime → DebugView. Events show within seconds when
debug_mode: true is set in the payload. AdsPing doesn't toggle this automatically yet — to test, use the GA4 Realtime report (60-min window) which shows production events.GTM Server container
If you run a server-side GTM container, AdsPing can forward events to its endpoint instead of (or alongside) GA4 directly.
- GTM dashboard → server container → Server URL (e.g.
https://gtm.example.com). - Optional: Container ID (
GTM-XXXXX) for routing inside the container. - AdsPing pixel detail → GTM card → paste both → Save.
- AdsPing posts to
{server_url}/g/collectwith the GA4 measurement protocol body — works with the standard GA4 Client in your server container. - From there your GTM container can fan-out to other destinations (Snapchat, custom HTTP, etc.).