convex-analytics
Hey, I released the first version of convex-analytics, a lightweight package for integrating any analytics tool and admin notification system into your Convex backend.
What it does:
- Call
analytics.track() from your actions/mutations to register events.
- Register processors at installation to handle those events however you want.
- 2 prebuilt processors included: Discord webhooks & PostHog (more coming soon).
- Build custom processors to fit your specific needs.
What's planned:
- Improved typing of events names and content.
- Automatic retries on processor failures.
- Post-processing hooks (cleanup, archiving, etc).
- More built-in processors.
- And more...
To try it out: https://github.com/raideno/convex-analytics
Still early stage, so expect things to evolve. If you try it out, I'd love your feedback, suggestions, or bug reports. Check out the repo and demo app to get started.GitHub
GitHub - raideno/convex-analytics
Contribute to raideno/convex-analytics development by creating an account on GitHub.
3 Replies
Then inside of an action or a mutation you can do:
Your processors will be automatically waken up to process this event and do whatever you want with it.
Wild timing! I was just considering building my own posthog integration from scratch!
If you use it and notice any bugs or think some feature would be nice to have, please let me know!