PostHogLike
Minimal shape of a PostHog client — satisfied by both posthog-js
(browser) and posthog-node (server). capture is always used; the identity
lifecycle methods are optional and only called by createPostHogIntegration
when the matching sync flag is on. This is a structural interface — no PostHog
package is imported or bundled (the client is injected).
Methods
Section titled “Methods”group()?
Section titled “group()?”
optionalgroup(groupType,groupKey,properties?):void
Optional — mirrors an account group when syncAccountGroup is on.
Parameters
Section titled “Parameters”groupType
Section titled “groupType”string
groupKey
Section titled “groupKey”string
properties?
Section titled “properties?”Record<string, unknown>
Returns
Section titled “Returns”void
identify()?
Section titled “identify()?”
optionalidentify(distinctId,properties?):void
Optional — mirrors a RevTurbine identify when syncIdentity is on.
Parameters
Section titled “Parameters”distinctId
Section titled “distinctId”string
properties?
Section titled “properties?”Record<string, unknown>
Returns
Section titled “Returns”void
reset()?
Section titled “reset()?”
optionalreset():void
Optional — called when the identity is cleared (logout) under syncIdentity.
Returns
Section titled “Returns”void