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. - Create a README.MD for your plugin which follows our documentation guidelines.
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.
When you're done, you can submit your plugin to our integration library so that it can be used by other users, including those on PostHog Cloud.
To submit your plugin, email your plugin GitHub URL to [email protected]
Once we get your email, we'll review the plugin to ensure it's secure, performant, and adheres to best practices. Then, we add it to our official repository and make it available for everyone to use!
We're here to help you with anything PostHog!