GA4 — manual setup

GA4 forwarding uses the Measurement Protocol — a server-side endpoint that takes the same event payload as gtag.js but bypasses the browser. You'll copy two values: a Measurement ID and an API Secret.

GA4 vs Google Ads: these are separate destinations. GA4 is for analytics + audience building; Google Ads is for conversion attribution + bidding. AdsPing connects to both, but they each get their own AdsPing pipeline and separate credentials. This page covers GA4 only.

Before you start

  • You need a GA4 property already created. If you're still on Universal Analytics (UA), GA4 is a separate property — create one at GA4 admin → Create property. UA stops collecting July 1, 2024; if your property still says "UA-…" you have a much bigger migration to do first.
  • You need Editor or Admin role on the GA4 property. Marketer/Analyst roles can view streams but can't create API secrets. Check at GA4 → Admin → Property access management.
  • The data stream must be a "Web" stream. GA4 also has App and Measurement Protocol streams; AdsPing targets Web streams since pb.js fires from a browser. Multi-stream properties are fine — you pick which stream to use during setup.
The Measurement Protocol is rate-limited. GA4 accepts up to 25 events per request and ~50 requests/sec per stream. AdsPing sends one event per request and stays well under the limit for normal traffic, but if you're running >100K events/day on a single pixel, contact us — we may need to enable batch mode for you.
1

Open GA4 Admin

GA4 Admin lives under the gear icon in the bottom-left. Don't confuse with the Property settings page — Data Streams is a separate sub-section.

Direct link: analytics.google.com. Bottom-left ⚙ Admin → make sure the right property is selected in the top-left scope picker → click Data Streams in the property column.

Note:GA4's admin layout has three columns: Account / Property / (sub-page). Data Streams is in the middle column under "Property". If you don't see it, double-check your property selection — Data Streams is property-scoped.

analytics.google.com/analytics/web/.../admin/data-streams
  • Reports
  • Explore
  • Advertising
  • Admin

Data Streams

Property: Acme Inc — Production

Acme Inc — Web

acme.com · Stream ID 1234567890

G-ABCDEF1234
1Click the row

Acme Inc — iOS App

App ID com.acme.ios · Firebase

Screenshot pending

GA4 Admin — Data Streams list

Capture GA4's Admin → Data Streams page so users can match the navigation. Distinguishes Web vs App streams clearly.

Real screenshot — to be added
2

Open the web stream

Click the row matching your domain. The detail page has the Measurement ID at the top + a section for Measurement Protocol API secrets at the bottom.

If you have multiple web streams (staging, production, dev), pick carefully — events sent with one stream's credentials don't appear under another. AdsPing has no way to detect this mismatch; you'll just see "no events" in GA4.

3

Copy your Measurement ID

Format: G-XXXXXXXXXX (G- prefix, 10 alphanumeric characters). It's at the top of the stream detail page in a prominent card.

analytics.google.com/analytics/web/.../streams/1234567890

Web stream details

Stream URL

https://acme.com

Stream name

Acme Inc — Web

Measurement ID

G-ABCDEF1234📋 Copy
2Copy this

Stream ID

1234567890

Different from Measurement ID — used for ID-based event routing, not what AdsPing needs.

Screenshot pending

GA4 web stream detail page showing Measurement ID

Capture the top of the stream detail page where Measurement ID lives. Easy to confuse with Stream ID — annotate clearly.

Real screenshot — to be added

Note:Don't paste the Stream ID by mistake — it looks similar but starts with digits, not G-. AdsPing's validation will catch it (the Measurement Protocol rejects requests with the wrong ID format) but you'll waste time debugging.

4

Create a Measurement Protocol API Secret

Same stream detail page → scroll to the bottom → Measurement Protocol API secrets section.

Click + Create, give it a nickname (so you can identify which integration owns it later — recommend adsping-prod), and submit. GA4 generates the secret on the fly — fully shown after generation, no "shown once" restriction. You can come back and view it anytime from the admin panel.

analytics.google.com/analytics/web/.../streams/1234567890

Measurement Protocol API secrets

Send events server-side via Measurement Protocol

No secrets created yet. Each secret you create here lets one server-side caller send events to this stream.

+ Create
3Click to generate
adsping-prod

Internal label so you remember what created this

Created — secret value:

Xy9LmNOpQrSt-uVwXYz1234abCdEfGh📋 Copy

Copy and paste into AdsPing. You can revisit this page later to view the same secret.

Note:GA4 lets you have multiple API secrets per stream. Useful when you swap integrations or want isolation between staging and production. Each secret can be revoked independently — the secret AdsPing uses will keep working even if you generate another for a different tool.

5

Paste both into AdsPing

Pixel detail → GA4 card → Manual setup.

adsping.io/dashboard/pixels/abc-1234/settings

GA4 — Manual setup

Server-side events via Measurement Protocol

G-ABCDEF1234
4Paste Measurement ID

Format: G-XXXXXXXXXX — from step 3

Xy9LmNOpQrSt-uVwXYz1234abCdEfGh
5Paste API Secret

From step 4

SaveCancel

On Save, AdsPing validates by sending a test event to GA4's /debug/mp/collect endpoint (the validation-only mirror of the production endpoint). If the credentials are right and the request is well-formed, GA4 returns 200 with no validationMessages. AdsPing flips the GA4 card green.

Note:The test event uses a synthetic client_id and an internal_test event name — it doesn't pollute your real GA4 reporting. Production events from pb.js carry the real per-visitor client_id from the user's first-party cookie.

6

Verify in Realtime / DebugView

GA4 has two real-time views. Pick the right one for what you're verifying.

Realtime report (production traffic)

GA4 → Reports → Realtime → Overview. Shows events from the last 30 minutes across your entire production property. Trigger an event on your site; within ~30-60 seconds you should see it count in the "Event count by Event name" widget.

This is the right view to verify production wiring. Doesn't require any configuration on the AdsPing side.

DebugView (filtered debug events)

For per-event inspection (each event with full param list), GA4 has DebugView under Admin → DebugView. It only shows events sent with debug_mode: true in the payload OR from devices configured as debug devices.

AdsPing currently doesn't expose a debug-mode toggle in the UI. To force debug routing, contact support or use the Realtime view instead — the field is on our roadmap.

GA4 doesn't have a Test Event Code like Meta and TikTok. The closest equivalent is the Realtime report. For most setups, that's sufficient — events appear within ~60 seconds of being fired, and the Realtime report has 30 minutes of history.

Common issues

403 Forbidden on Save

The API Secret has trailing whitespace or was partially copied. GA4 secrets are exactly 23 characters. Re-copy from the GA4 admin (the secrets page shows the full value, you don't have to regenerate).

Card is green but no events show in GA4 Realtime

  • Wrong stream. Multi-stream property + production/ staging confusion. Double-check the Measurement ID matches the stream you're viewing in Realtime.
  • Wrong property. Multiple GA4 properties on the same account. The dropdown at the top of GA4 picks property — make sure you're looking at the property whose stream secret you copied.
  • Visitor consent / pb.js not firing. Open your site, DevTools → Network → trigger an event → look for the POST to api.adsping.io/api/v1/t/.... If you don't see that, pb.js isn't running for some reason (CSP, consent gate, etc.).

VALIDATION_ERROR: invalid_measurement_id

You pasted a Stream ID instead of a Measurement ID. Stream ID is all-digits; Measurement ID starts with G-. Re-copy from the right field.

Events appear in Realtime but not in standard reports

Standard GA4 reports (Acquisition, Engagement, etc.) populate from Realtime hits but on a delay (4-24 hours typical, up to 48h for new properties). Don't panic if a fresh setup looks empty for a day — Realtime is the source of truth for "is data flowing", standard reports for "is data being attributed correctly".

Next