Connect Google Analytics 4 to Elido

Forward Elido link clicks to GA4 via the Measurement Protocol — Measurement ID, API secret, and how client_id is built.

2 min readUpdated 2026-10-24

What you'll set up

  • Server-side click forwarding to GA4 via the Measurement Protocol — works even for users with adblockers.
  • A Measurement Protocol API secret generated from your GA4 data stream settings.
  • A link_click event in GA4 for every click on your short links.

Elido sends a GA4 event for each link click server-side using the Measurement Protocol. The events reach GA4 regardless of whether the user has an adblocker, without any JavaScript on your page.

What you need

  • A GA4 property (not Universal Analytics).
  • Access to the property's Admin panel.
  • About 5 minutes.

Step 1 — Find your Measurement ID

  1. Go to Google Analytics.
  2. Click Admin (bottom-left gear icon).
  3. Under Property, click Data streams → Web.
  4. Click your web data stream.
  5. Copy the Measurement ID — it starts with G-, e.g. G-XXXXXXXXXX.

Step 2 — Create a Measurement Protocol API secret

On the same data stream page:

  1. Scroll down to Measurement Protocol API secrets.
  2. Click Create.
  3. Give it a name ("Elido") and click Create.
  4. Copy the secret value. It's only shown once. If you lose it, create a new one — old secrets keep working until you delete them.

Step 3 — Configure in Elido

  1. Go to Dashboard → Integrations → Google Analytics 4.
  2. Paste the Measurement ID and the API secret.
  3. Click Save, then Test connection. Elido sends a link_click test event flagged with elido_test and debug_mode.

How Elido sets client_id

GA4 requires a client_id to attribute events to a user. Elido sets it to elido-<workspace_id>-<link_id>, so all clicks on one link appear under one synthetic "user" in GA4. These events do not stitch to your existing GA4 web sessions, and unique-user counts in GA4 reflect links, not people.

Event sent to GA4

Elido eventGA4 event name
Link clicklink_click

Event parameters: workspace_id, link_id, slug, country, device, destination.

Troubleshooting

No events appearing in Realtime — Check the Measurement ID and API secret. A wrong API secret returns HTTP 204 (no content) but GA4 silently drops the payload. Verify by calling the Measurement Protocol endpoint directly:

curl -X POST \
  "https://www.google-analytics.com/debug/mp/collect?measurement_id=G-XXXX&api_secret=YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"client_id":"test","events":[{"name":"elido_test","params":{}}]}'

A successful debug call returns {"validationMessages":[]}.

Events appear in Realtime but not in regular reports — Measurement Protocol events can take 24–48 hours to appear in non-realtime GA4 reports. This is a GA4 limitation, not an Elido issue.

Was this helpful?
Need more? Email the team - replies within one working day.Contact support