Connecting Termly to PostHog
Termly bundles consent management with policy generation, which means small businesses frequently end up with a privacy policy describing data practices they do not actually have. PostHog can be self-hosted, which changes the calculus entirely: the data stays on infrastructure you control, and so does the responsibility for everything that goes wrong with it. The join between them succeeds or fails on one thing: whether the distinct_id reaches the Termly consent record before the conversion happens, because PostHog can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Termly and PostHog: start opted out, opt in on consent
Initialize PostHog with capturing off, call opt_in_capturing on Termly analytics consent and opt_out_capturing on withdrawal, or use memory-only persistence for declined visitors. Mask session replay inputs and disclose recording. Server-side orders need the browser's distinct_id; for declined visitors, use your customer ID only if the policy allows, or don't send.
PostHog's JavaScript library has its own consent switches, and they are what should be wired to Termly rather than relying on the auto-blocker alone. Initialize PostHog with capturing off by default, call opt_in_capturing when Termly reports analytics consent and opt_out_capturing when it is withdrawn. PostHog also has a memory-only persistence mode that avoids cookies if you want anonymous counts for visitors who decline.
Session replay is the part teams forget. A replay records the page, including the Termly banner and form fields, so check that inputs are masked and that the policy says sessions are recorded. A generated policy describing generic analytics does not cover screen recording.
Server-side events, such as a paid order sent to the capture API, need the same distinct_id the browser used, or they land on a new person. For visitors who declined, there is no stable distinct_id, so either send the order under the customer ID you already hold, if your policy allows it, or do not send it. Self-hosting PostHog keeps data on your infrastructure but does not remove the duty to disclose it. Report how many orders came from consented sessions so the funnel numbers are read with the gap in mind.
Termly → PostHog · what breaks
Why this join usually fails — Termly → PostHog
- 01
The distinct_id never reaches Termly
Default blocking configurations stop capture before consent on the first page view.
- 02
A generated policy that does not match reality
Generated policies are templates. Adding a new conversion destination without updating the policy means you are disclosing data to a partner your own published statement does not mention, which is a real exposure that no tracking configuration fixes.
- 03
Self-hosting the analytics and the outage together
The advantage of owning the pipeline is that nothing blocks it. The cost is that when the ingestion instance fills its disk on a Saturday, the events are gone and nobody is paged. Hosted tools fail differently and more visibly.
- 04
Nothing reconciles afterwards
PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.
Termly → PostHog · the fix
What working looks like — Termly → PostHog
The distinct_id on every consent record
Conversions arriving in PostHog
The event lands on the person profile and becomes available in insights, funnels and session replay.
Reconciled against the source
Termly → PostHog · architecture
How Termly and PostHog actually connect
- 1
Termly holds the truth
The published policy is a statement about what you do. If it says you share data with categories of partner you do not use, or omits ones you do, the mismatch is the compliance exposure — not the banner.
- 2
PostHog needs a click to match
PostHog needs a distinct_id, an event name and its properties. Self-hosted instances additionally need the ingestion endpoint reachable and the project API key correct, which is a class of failure hosted tools do not have.
- 3
The identifier is the bridge
The distinct_id, captured at the visit and carried into the Termly consent record.
- 4
The event source decides reliability
Send consented conversions with the consent rate stated.
- 5
Deduplication at the destination
PostHog deduplicates on the event UUID where supplied. Without one, a retried batch duplicates, and on a self-hosted instance there is no vendor support desk to notice it for you.
Termly → PostHog · normal or broken
Working vs. broken, side by side — Termly → PostHog
Normal, not a fault
The distinct_id present on the consent record
Sent from your order system, gated on consent
Deduplicated correctly
PostHog deduplicates on the event UUID where supplied. Without one, a retried batch duplicates, and on a self-hosted instance there is no vendor support desk to notice it for you.
Reconciles with the source
Actually broken
The distinct_id missing on most records
Default blocking configurations stop capture before consent on the first page view.
Sent from the browser
Generated policies are templates. Adding a new conversion destination without updating the policy means you are disclosing data to a partner your own published statement does not mention, which is a real exposure that no tracking configuration fixes.
Counted twice, or not at all
The advantage of owning the pipeline is that nothing blocks it. The cost is that when the ingestion instance fills its disk on a Saturday, the events are gone and nobody is paged. Hosted tools fail differently and more visibly.
Nobody has reconciled it
Termly → PostHog · diagnose
Diagnostic order — Termly → PostHog
- 01
Count consent records carrying the distinct_id
- 02
Follow one real conversion end to end
- 03
Compare your destination list against what the policy discloses
Every platform you send conversions to should appear. This is a five-minute check and it is almost never done after a new integration.
- 04
Check ingestion health and disk before debugging any missing event
On self-hosted instances the answer is infrastructure far more often than it is instrumentation.
- 05
Read the match rate, not the success message
PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.
Termly → PostHog · prove
How it gets proven — Termly → PostHog
Source of truth
Your order system, with consent state attached.
- The distinct_id confirmed present on a live consent record.
- Purchase events reconciled per transaction against your billing system, with ingestion lag checked over the same window.
- Consented conversions reconciled, with the destination list verified against the published policy.
Termly → PostHog · free audit
What we check in the free audit
- Count consent records carrying the distinct_id
- Follow one real conversion end to end
- Compare your destination list against what the policy discloses
- Check ingestion health and disk before debugging any missing event
- Read the match rate, not the success message
Checked against
Your order system, with consent state attached.
Free30 minutesNo obligation
Termly → PostHog · when not to buy
When you don't need this — Termly → PostHog
- Measure identifier coverage yourself first — pull your last hundred consent records and count how many carry the distinct_id.
- Before adding any new conversion destination, update the policy. That order matters, and it is cheaper than the alternative.
- If you have no reason to keep the data on your own infrastructure and no team to run it, the hosted product removes the only real downside of this one.
Termly → PostHog · what we deliver
What gets built — Termly → PostHog
Identifier capture into Termly
Capture after consent, and make sure the policy actually describes the destinations you send conversions to.
Event source: your order system, gated on consent
Send consented conversions with the consent rate stated.
Dispatch to PostHog
The PostHog capture API, posted server-side from your backend to your own instance or to PostHog Cloud.
Reversals where they exist
Withdrawal stops future sends.
Written guarantee
95%+ tracking accuracy
Measured against Your order system, with consent state attached.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Termly → PostHog questions, answered
Start PostHog with capturing off, then call opt_in_capturing when Termly reports analytics consent and opt_out_capturing on withdrawal. Check Termly's docs for the event to listen on.
Yes. Self-hosting changes where the data lives, not whether you collect it, and session replay in particular needs to be described.
Almost always because the distinct_id never reached the Termly consent record. Default blocking configurations stop capture before consent on the first page view. Measure coverage before debugging the dispatch.
PostHog identifies by distinct_id with an alias call to merge anonymous and identified users. On a self-hosted instance you also control the ingestion endpoint, which means the identifier survives ad blockers that would kill a third-party pixel — one of the few genuine technical advantages available to a first-party setup.
Your order system, gated on consent. Send consented conversions with the consent rate stated.
PostHog shows events in the activity view within moments. On a self-hosted instance, check the ingestion lag as well — events that are queued are not events that are lost, and the two need different responses.
More on Termly → PostHog
- Stripe → PostHogConnecting Stripe to PostHog
- PayPal → PostHogConnecting PayPal to PostHog
- Shopify → PostHogConnecting Shopify to PostHog
RELATED GUIDES
Where Termly → PostHog fits in the rest of your tracking
- CookieYes → PostHogConnecting CookieYes to PostHog
- Osano → PostHogConnecting Osano to PostHog
- Complianz → PostHogConnecting Complianz to PostHog
- Termly → GA4Connecting Termly to GA4
- Termly → AmplitudeConnecting Termly to Amplitude
- Financial servicesConversion tracking for financial services, built for the compliance review
- Cookiebot → PostHogConnecting Cookiebot to PostHog
- Usercentrics → PostHogConnecting Usercentrics to PostHog
Free · 30 min
Get Termly and PostHog joined properly
Free30 minutesNo obligation
