Post analytics records

POST /widget/analytics
application/json

Body

  • X-Popsell-Domain string Required

    required in the body because no possible custom header with navigator.sendBeacon api

  • session_id string(nullable) Required
  • referrer string(nullable) Required
  • history array[object] Required
    Hide history attributes Show history attributes object
    • widget integer Required
    • action integer Required
    • element integer Required
    • type integer Required
    • data array[object]

      Additional properties are allowed.

    • date_event string(timestamp) Required

Responses

  • 201 application/json

    analytics stored successfully

    Hide response attribute Show response attribute object
    • message string
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
    • message string
POST /widget/analytics
curl \
 --request POST 'https://domain.tld/api/v2/widget/analytics' \
 --header "Content-Type: application/json" \
 --data '{"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."
}