This plugin integrates Discourse with PostHog, sending events like pageviews, topic/post creation, and likes. It supports anonymous tracking, email-based identification, or SHA256-hashed emails via a custom Discourse endpoint.
| Summary | Send events from Discourse to Posthog | |
| Repository Link | https://github.com/christophdb/discourse-posthog | |
| Install Guide | How to install plugins in Discourse |
Features
- Track Events: pageview, pageleave, create topic, create post, like/unlike post
- Identify User: you decide if you โidentifyโ the user. This is a posthog term and means that you can either send anonymous events or events that are connected to a person in posthog.
- Privacy levels of the event tracking: use either anonymous, user email or hashed email
Configuration
There is no much configuration needed. You have to activate the plugin and provide at least your posthog_api_key and select your posthog instance.
After the next page load, you will see new events in your PostHog project.
Settings
| Name | Description |
|---|---|
| posthog_api_host | PostHog API Host URL (e.g. https://eu.i.posthog.com, https://us.i.posthog.com or any proxy) |
| posthog_ui_host | PostHog API UI URL (e.g. https://eu.posthog.com or https://us.posthog.com) |
| posthog_api_key | PostHog project API key |
| posthog_identify_user_by | User identification in PostHog |
| posthog_feature_disable_surveys | Disable PostHog surveys |
| posthog_feature_disable_session_recording | Disable PostHog session recording |
| posthog_cookie_expiration_in_days | Cookie expiration (in days) |
| posthog_api_version | PostHog defaults value |
Screenshots
See the events in the browser console. You have to enable verbose logging.
Receive the events in PostHog
like identify
or topics created, โฆ



