Chapter 1. Basics
Integrating ops is very similar to integrations Mixpanel, Amplitude, Posthog or any other analytics tool.
We have three recommendations:
1. Use our official SDK if you’re using nodejs, or use a wrapper around our REST api for other programming languages.
Our SDK can be found here. If you’re other programming language, use our REST api.
2. Use a dedicated file/class for sending ops events instead of peppering ops code in your codebase.
Over time you will have peppered so many events around your codebase you’ll easily lose track of all events around your codebase. We highly recommend keeping all events centralized in one place.
3. We recommend you use ops in your backend only.
Ops is meant to track vital events. In the frontend, ops api endpoints will be eventually banned by uBlock and other plugins, and you won’t get an accurate picture of what’s happening in your app.
What should you track?
Start with a few key events:
- User signs up
- User’s trial expires
- User starts paying for your product
- User stops paying for your product
Most operational issues are centered around these areas.
Later on, you want to add essential data, eg: did someone complete their onboarding process, was a email sent suceessfully on invoice, when did a user reset their email/password, etc. This can help you resolve support issues.
Finally, depending on your needs, you might also want to log kyc data, eg save ip address on user login, signup events.