Wexlyn
Back to the docs

Automation and AI

Connecting PostHog

The PostHog events you switch on, each as a journey event, tag, stage or sale (your mapping); every experiment variant a person saw as a tag \`experiment:<flag>=<variant>\`, so reports grouped by tag show revenue and ROI per variant; and, the other way, Wexlyn sales, calls and stage changes as \`wexlyn_*\` events in PostHog for revenue goals in experiments. Where the credentials live, the connect steps, what becomes what in Wexlyn and how to check it.

PostHog is listed under Settings → Integrations → PostHog in Wexlyn. The PostHog events you switch on, each as a journey event, tag, stage or sale (your mapping); every experiment variant a person saw as a tag `experiment:<flag>=<variant>`, so reports grouped by tag show revenue and ROI per variant; and, the other way, Wexlyn sales, calls and stage changes as `wexlyn_*` events in PostHog for revenue goals in experiments.

What Wexlyn reads

  • Events from your PostHog project, each mapped to a journey step, a tag, a stage, a sale or an identify
  • Experiment flags as tags
  • Wexlyn's own events sent back to PostHog

Before you start, in PostHog

  1. In PostHog create a personal API key (Settings → Personal API keys) with project read and hog function write, and note the project id and region.

Connect in Wexlyn

  1. Open Settings → Integrations → PostHog.
  2. Enter Personal API key; Project id; Region or host. Press Connect. Wexlyn checks the credentials before saving them, encrypted.

In PostHog, after connecting

  • Wexlyn creates a webhook destination in the project; on the PostHog page choose which events become what, and which Wexlyn events flow back.

Events Wexlyn listens for: $identify, $feature_flag_called, your custom events.

What becomes what

  • Identified events on a known person become journey steps, tags, stages or sales as mapped; anonymous events never create people.

Check it works

Fire a mapped event from your app; it appears under Recent deliveries and on the person's journey.

If something is off

The integration page keeps the last deliveries it received with the event, whether it was processed or ignored, and the reason in plain words (no email or phone on the record, not a sale event, a signature that did not match). Failed deliveries can be replayed after the cause is fixed.

  • Nothing arrives: the URL or credentials in PostHog differ from the connection card, or the events are not enabled on that side. For connections Wexlyn registers itself, the card says if PostHog refused.
  • People without a source: the person never visited a page with the Universal Script. Their later visits and purchases are attributed once a tracked visit matches their email or phone.
  • Stages do not move: a tag, status or pipeline stage only moves a person when a rule under Settings → Lead stages names it (or, for GoHighLevel and HubSpot, a rule on the connection's own page).