createPostHogIntegration
createPostHogIntegration(
options):EventConsumerProvider
Create a PostHog integration with an optional identity lifecycle (plan 144 TASK-17 / REQ-26).
A superset of createPostHogAnalyticsProvider: every event is still
posthog.capture(name, properties) with the same filter / transform
semantics (REQ-27), and — when the matching flag is on — RevTurbine’s
identify/logout, account grouping, and navigation are mirrored to PostHog’s
native identify / reset / group / $pageview. All sync flags default
false, so by default this behaves exactly like the capture-only provider.
No PostHog package is imported or bundled — the client is injected — so this code is tree-shakable and only pulled in when you import it (AC-20). A throw from any PostHog call is swallowed and never blocks RevTurbine ingest (AC-17).
createPostHogAnalyticsProvider remains exported for existing integrations.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”EventConsumerProvider