This is an exemplary PostHog plugin. It adds property "greeting"
to every event, with a configurable value (by default: "Hello world!"
).
Use it as a base for your own plugins!
- TypeScript for best reliability and development experience
- Jest for convenient testing
- Prettier and ESLint for code style and best practices – both handled by pre-commit hooks
- GitHub Actions set up to run code quality and functionality tests in pull requests, and also to publish a new npm release when the package version is incremented in
main
(the latter requires an automation type npm access token to be set with a repo secretNPM_TOKEN
)
Want to simply get started, without the above bloat? PostHog Plugin Starter Kit should be just the right fit for you – only the essentials needed to get off the ground.
- Open PostHog.
- Head to the Plugins page from the sidebar.
- Either install Hello World from Available plugins, or install from URL using this repository's URL.
We're here to help you with anything PostHog!