climatemind-backend
climatemind-backend copied to clipboard
analytics endpoint
User story
We need user interaction tracked through an endpoint so we can improve their experience by tracking user journeys. We have historically been using google tag manager to track clicks but are switching now to have a dedicated endpoint for it.
Acceptance criteria
- [ ] /analytics POST endpoint with Header: X-Session-Id and body of category, action, label, eventValue, eventTimestamp, and pageUrl
- [ ] includes documentation
- [ ] unit test for adding an event