/
Attribution
/
Web
/
PostHog

How to Integrate Campaignswell with PostHog‍

Step 1. Get your Campaignswell webhook URL

  1. Reach out to your Campaignswell CSM
  2. You'll receive a unique webhook URL in this format: https://<instance>.campaignswell.xyz/posthog-webhook/v1/<app_id>

Step 2. Connect the webhook in PostHog

  1. Go to your PostHog project
  2. Open the Destinations section in the UI
  3. Paste the Campaignswell webhook URL
  4. Save and enable the destination

Step 3. Implement Campaignswell custom events

For correct attribution of subscribers and revenue, implement two custom events in PostHog and send them to Campaignswell along with $pageview.

cw_subscribe — subscription started

Trigger this event whenever a user signs up for any type of subscription (no trial, intro offer, free trial). Do not trigger on subscription renewals.

cw_nrc_purchase — non-recurring purchase (if applicable)

Trigger this event for one-time purchases that are not part of a subscription.

Your CSM will share the detailed events spec for the full structure of both events (required and optional properties).

Step 4. Send $pageview + cw_subscribe + cw_nrc_purchase to Campaignswell

Once the events are implemented on your side, make sure the following events are sent to the Campaignswell webhook:

  • $pageview
  • cw_subscribe
  • cw_nrc_purchase

Step 5. Notify Campaignswell about the switch

If you are migrating to PostHog from another analytics tool (Amplitude, Mixpanel, etc.), let your Campaignswell CSM know:

  1. The exact date and time of the switch
  2. Whether the migration is complete or partial (e.g., web funnel only)

This is critical to avoid duplication of first-visit events on our side.

‍FAQ

When should I send cw_subscribe if I have a free trial?
The event should be triggered whenever a user signs up for any type of subscription (no trial, intro offer, free trial). It does not need to be triggered on renewals.

I'm switching to PostHog from Amplitude — what should I do?
Let your Campaignswell CSM know the exact moment of the switch, and confirm whether the migration is complete or partial. This is important to avoid duplication of first-visit events.

Questions? Contact your Campaignswell CSM.‍‍