Send Events From PostHog
Send the conversions you already track in PostHog to Revnu, so your ads optimise on them without the Revnu Tag or the ad platforms' pixels.
If you already track sign-ups, bookings and purchases in PostHog, PostHog can send each one to Revnu as it happens. Revnu ties it to the ad click that brought the person and passes it on to Google, LinkedIn, Reddit and your other ad platforms, so your campaigns learn from real conversions.
Set it up in PostHog
Open Data pipelines, then Destinations, and add a new HTTP Webhook destination.
Set the webhook URL to
https://revnu.com/api/measurement/posthogand the method toPOST.Leave the JSON body as PostHog's default:
{"event": "{event}", "person": "{person}"}.Under Secret headers (not Headers), add
Authorizationwith the valueBearerfollowed by your event key. Secret headers are encrypted and kept out of PostHog's logs. The key starts withrsk_live_and is in Ads → Revnu Tag, under Install Details and Keys.Under the destination's filters, match only your conversion events, such as your sign-up, booked call and purchase events. Don't send page views.
Turn on Log responses, so Revnu's answer for each event, including any
not_matchable_reason, shows in the destination's logs.Enable the destination.
Revnu stores each event under its name in lowercase snake_case: Signed Up becomes signed_up, checkout completed becomes checkout_completed. Your win definition in Revnu has to count those names. The response's event_name shows the name Revnu stored.
What Revnu reads from each event
| From PostHog | Used for |
|---|---|
event.uuid |
The event id. PostHog's retries of the same event are recorded once. |
event.event |
The event name, converted to snake_case. |
event.timestamp |
When it happened. |
utm_* and click ids (gclid, li_fat_id, rdt_cid, fbclid, msclkid, ttclid, twclid, gbraid, wbraid) on the event, its $current_url, or its session's landing page ($session_entry_*) |
Which ad click and campaign brought the person. |
The person's email (or $set.email) and phone |
Hashed on arrival, then used to match the person on your ad platforms. |
event.distinct_id |
Hashed. Joins a later event, such as a payment captured on your server, to the same person's earlier sign-up. |
revenue or value, with currency |
The conversion's value, in whole currency units. |
| Your own event properties | Kept for your win definition's rules. PostHog's $ properties, emails, names and IP addresses are dropped. |
Revnu never stores a raw email, phone, name, IP address or distinct id from PostHog.
Make every conversion matchable
An ad platform can only use a conversion that carries the click id from the ad, or the person's email or phone. To make sure yours do:
Identify people in PostHog with their email (
posthog.identify(userId, { email })) when they sign up.Capture sign-ups and bookings in the browser, or in the same session as the ad click, so the landing page's click id rides along.
Capture server-side events, such as Stripe payments, with the same
distinct_idyou identify the person with in the browser.
A conversion with no click id, email or phone is still recorded, and the response includes not_matchable_reason.
Response
Same as the Event API, plus:
not_matchable_reasonappears when the event carried no ad click id and no email or phone, and wasn't joined to the person's earlier event, so no ad platform can match it.
| Code | Meaning |
|---|---|
| 200 | Recorded and credited to one of your Revnu ad campaigns, or a retry of an event already recorded |
| 202 | Recorded, not credited to a campaign |
| 400 | The body is not PostHog's webhook body. Restore the destination's default JSON body |
| 401 | Missing or invalid event key in the Authorization header |
| 413 | Body over 64 KB |
| 422 | A field failed validation; error says which |
| 429 | Rate limited. PostHog retries |
Frequently Asked Questions
Do I still need the Revnu Tag or the ad platforms' pixels?
No. PostHog sends the conversions, and Revnu sends them to your ad platforms through their conversion APIs. The Revnu Tag adds visit-level reporting on top, but ads can optimise without it.
Why does my conversion say not_matchable_reason?
PostHog sent it without an ad click id and without the person's email or phone. Identify people with their email in PostHog, and capture the event in the browser or with the same distinct_id as the person's browser events.
Will PostHog's test button create a real event?
Only if you turn off mocking in the test panel. A real test request is recorded like any other conversion.