This is a PostHog plugin template.
The existing sample code adds property "greeting"
to every event with a configurable value (default: "Hello world!"
).
But that is just to help you get started! To make it your own:
- Add your code to
index.js
. - Add your metadata and configuration schema to
plugin.json
. - Search for
<TODO:
, make sure none are left! - Optional: Add a
logo.png
file to give this plugin its own logo.
If you're looking for inspiration, here are a few exemplary plugins:
- Hello World – basic event processing, with tests
- S3 Export – event export using the AWS SDK, with TypeScript
- GeoIP – advanced event processing using the GeoIP feature, with tests, formatting, linting, TypeScript, and GitHub Actions CI
- PagerDuty – periodic job using external HTTP API access
To get up to speed with the environment of plugins, check out our Plugins overview in PostHog Docs.
For a crash course, read the Plugins tutorial in PostHog Docs.
- Open PostHog.
- Go to the Plugins page from the sidebar.
- Head to the Advanced tab.
- "Install from GitHub, GitLab or npm" using this repository's URL.
We're here to help you with anything PostHog!