Post analytics records
Body
-
required in the body because no possible custom header with navigator.sendBeacon api
POST /widget/analytics
curl \
-X POST https://domain.tld/api/v2/widget/analytics \
-H "Content-Type: application/json" \
-d '{"X-Popsell-Domain":"example.com","session_id":"string","referrer":"string","history":[{"widget":42,"action":42,"element":42,"type":42,"data":[{}],"date_event":"string"}]}'
Request examples
{
"X-Popsell-Domain": "example.com",
"session_id": "string",
"referrer": "string",
"history": [
{
"widget": 42,
"action": 42,
"element": 42,
"type": 42,
"data": [
{}
],
"date_event": "string"
}
]
}
Response examples (201)
{
"message": "analytics stored successfully"
}
Response examples (401)
{
"message": "Unauthorized."
}