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_clickevent 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
- Go to Google Analytics.
- Click Admin (bottom-left gear icon).
- Under Property, click Data streams → Web.
- Click your web data stream.
- 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:
- Scroll down to Measurement Protocol API secrets.
- Click Create.
- Give it a name ("Elido") and click Create.
- 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
- Go to Dashboard → Integrations → Google Analytics 4.
- Paste the Measurement ID and the API secret.
- Click Save, then Test connection. Elido sends a
link_clicktest event flagged withelido_testanddebug_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 event | GA4 event name |
|---|---|
| Link click | link_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.