Overview
The Analytics API provides endpoints to track user events on tenant landing pages and retrieve analytics data for dashboards. Events are tracked anonymously using hashed IP addresses for privacy.Track Event
Track analytics events from the frontend. This is a public endpoint that does not require authentication.Rate Limiting
- Limit: 100 events per minute per tenant
- Status Code:
429when limit is exceeded
Request Body
The ID of the tenant
Type of event. Must be one of:
pageview- Page viewclick_whatsapp- WhatsApp button clickclick_call- Call button clickclick_toggle_currency- Currency toggle clicktime_on_page- Time spent on pageqr_scan- QR code scanproduct_click- Product click
Optional additional event metadata
Response
Privacy
- IP addresses are hashed with SHA-256 before storage
- Only the first 45 characters of the hash are stored
- User agents and referrers are stored for analytics purposes
Example
Get Analytics Data
Retrieve analytics data for a tenant’s dashboard. This endpoint requires authentication.Path Parameters
The ID of the tenant
Response
Whether the request was successful
Get Today’s Analytics
Retrieve a quick summary of today’s analytics. This endpoint requires authentication.Path Parameters
The ID of the tenant
Response
Whether the request was successful
Unique visitors today
WhatsApp button clicks today
QR code scans today
Product clicks today