Visitor tracking
2 routes. Paths are relative to https://api.intersink.com/v1.
- GET/visitor/statsVisitor report for a channel (managers)
- POST/visitor/trackTrack a new or returning anonymous visitor
Visitor report for a channel (managers)
GET/visitor/stats
Needs a signed-in user (Bearer token or access_token cookie).
Site visits for a channel I manage: totals, by day, sources, places, devices, pages.
Parameters
| Name | Type | Description |
|---|---|---|
| channel_idrequired | string, query | |
| days | number, query | One of: 7, 30, 90. |
Response
200. The payload in data is not described in the spec yet.
Track a new or returning anonymous visitor
POST/visitor/track
Public: no sign-in needed.
Parameters
| Name | Type | Description |
|---|---|---|
| x-ref | string, header |
Request body application/json
| Field | Type | Description |
|---|---|---|
| device_id | string | The browser's random id, sent only after the visitor allowed analytics. Stored as a keyed hash per channel, never as sent. At most 100 characters. |
| channel_id | string | Channel ID where the visit originated |
| country | string | Visitor country (can be populated via frontend or backend) |
| city | string | Visitor city |
| utm_source | string | UTM Source for marketing tracking |
| utm_medium | string | UTM Medium for marketing tracking |
| utm_campaign | string | UTM Campaign for marketing tracking |
| path | string | Page path that was viewed, e.g. /shop/p/mug At most 300 characters. |
| referrer | string | document.referrer (only its host is kept) At most 500 characters. |
Response
200. The payload in data is not described in the spec yet. Visitor tracked successfully