# Tracker

Endpoints for tracking custom events

## Publish a tracking event

> This endpoint can be used in order to track events like\
> impressions and clicks. However this is generic enough and can be\
> used for tracking any custom events like user registrations,\
> logins and transactions.\
> \
> {% hint style="info" %}\
> \
> \## Tracking body\
> \
> \
> The body of the request must contain the event type an optional\
> \`user\_id\` and the actual tracking \`data\`.\
> \
> \* \`data\` can be an arbitrary \`json\` object containing the event\
> info. For each \`click/impression\` event you need to include these two\
> fields apart from the needed fields for each type:\
> &#x20; \- \`page\`: The page in the website/app the widget is located, e.g. \`/home\`, \`/live\` etc.\
> &#x20; \- \`location\`: The location of the widget, e.g. \`highlights:recommended\`. Make sure to\
> &#x20; follow the convention  of \`widget:type\` for this field.\
> \* \`event\_type\` describes the type of the event, e.g.\
> \`clicks:event\`, \`clicks:outcome\`, \`statistics:add\_bet\`.\
> Notice that it must be one of the supported event types.\
> \* \`user\_id\` must be provided if the tracking event corresponds to\
> a specific user, otherwise it should be \`null\`.\
> \
> Notice that any other additional data needed for a specific integration\
> can be included in the data field of the request as long as the required\
> fields are provided.\
> \
> {% endhint %}\
> \
> \
> {% hint style="info" %}\
> \
> \## Frontend vs Backend requests\
> \
> \
> \
> In order to be able to collect meaningful analytics we want to know the origin and the\
> device from which the request originated.\
> \
> For a \*\*frontend integration\*\* these properties are automatically added by the browser,\
> so you don't need to enhance \`data\` with these fields.\
> \
> \`\`\`json\
> {\
> &#x20; "user\_id": "123",\
> &#x20; "event\_type": "clicks:event",\
> &#x20; "data": {\
> &#x20;   "event\_id": "1018561959",\
> &#x20;   "position": 0,\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home"\
> &#x20; }\
> }\
> \`\`\`\
> \
> For \*\*backend requests\*\* since these headers are missing, it is suggested to specify\
> the \`channel\` and the \`brand\`, in the \`data\` body.\
> \
> \`\`\`json\
> {\
> &#x20; "user\_id": "123",\
> &#x20; "event\_type": "clicks:event",\
> &#x20; "data": {\
> &#x20;   "event\_id": "1018561959",\
> &#x20;   "position": 0,\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home",\
> &#x20;   "brand": "<https://website.com",\\>
> &#x20;   "channel": "android"\
> &#x20; }\
> }\
> \`\`\`\
> \
> Where\
> \
> \- \`channel\`: the channel the backend request is originated from, e.g. \`desktop\`, \`mac\`, \`ios\`\
> \- \`brand\`: a url or a brand name.\
> \
> {% endhint %}\
> \
> \
> {% hint style="info" %}\
> \
> \## Supported event types\
> \
> \
> \<details>\
> &#x20; \<summary>\`add:casino\_game\` : captures a casino game\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "game\_id": "123456",\
> &#x20;   "game\_name": "Hall Of Gods",\
> &#x20;   "category": "slots",\
> &#x20;   "provider": "GameStudioX",\
> &#x20;   "enabled": "true"\
> &#x20; },\
> &#x20; "event\_type": "add:casino\_game"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`clicks:event\` : captures a user click on a sport event. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "event\_id": "1018561959",\
> &#x20;   "position": 0,\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home"\
> &#x20; },\
> &#x20; "event\_type": "clicks:event",\
> &#x20; "user\_id": "123456"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`clicks:outcome\` : captures a user click on a sport outcome. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "event\_id": "1018561957",\
> &#x20;   "outcome\_id": "3086187161",\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home",\
> &#x20;   "position": 1\
> &#x20; },\
> &#x20; "event\_type": "clicks:outcome",\
> &#x20; "user\_id": "520535"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`clicks:sport\` : captures a user click on a sport. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "sport\_id": "1000093190",\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home",\
> &#x20;   "position": 1\
> &#x20; },\
> &#x20; "event\_type": "clicks:sport",\
> &#x20; "user\_id": "123456"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`clicks:league\` : captures a user click on a league. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "league\_id": "1000093652",\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home",\
> &#x20;   "position": 1\
> &#x20; },\
> &#x20; "event\_type": "clicks:league",\
> &#x20; "user\_id": "654321"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`clicks:combination\` : captures a user selecting the recommended combination. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "selections": \[\
> &#x20;     {\
> &#x20;       "id": "123",\
> &#x20;       "event\_id": "001234"\
> &#x20;    },\
> &#x20;     {\
> &#x20;       "id": "124",\
> &#x20;       "event\_id": "001238"\
> &#x20;    }\
> &#x20;   ],\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home"\
> &#x20; },\
> &#x20; "event\_type": "clicks:combination",\
> &#x20; "user\_id": "654321"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`clicks:menu-item\` : captures a click on a menu item. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "menu": "recommendations",\
> &#x20;   "item": "trending",\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home"\
> &#x20; },\
> &#x20; "event\_type": "clicks:menu-item",\
> &#x20; "user\_id": "654321"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`clicks:social\` : captures a user click on a sharing button. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home",\
> &#x20;   "item": "open-sharing-dialog"\
> &#x20; },\
> &#x20; "event\_type": "clicks:social",\
> &#x20; "user\_id": "654321"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`clicks:game\` : captures a user click on a casino game. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "game\_id": "HallOfGods",\
> &#x20;   "page": "CategoryPageJackpots",\
> &#x20;   "position": "3",\
> &#x20;   "location": "swim\_lane:recommended"\
> &#x20; },\
> &#x20; "event\_type": "clicks:game",\
> &#x20; "user\_id": "654321"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`impressions:events\` : captures the events that appeared on user interface. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "events": \[\
> &#x20;     {\
> &#x20;       "id": 21161819\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "id": 21161822\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "id": 21168411\
> &#x20;     }\
> &#x20;   ],\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home"\
> &#x20; },\
> &#x20; "event\_type": "impressions:events",\
> &#x20; "user\_id": "520535"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`impressions:leagues\` : captures the leagues that appeared on user interface. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "leagues": \[\
> &#x20;     {\
> &#x20;       "id": 18265893\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "id": 2969\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "id": 686\
> &#x20;     }\
> &#x20;   ],\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home"\
> &#x20; },\
> &#x20; "event\_type": "impressions:leagues",\
> &#x20; "user\_id": "520535"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`impressions:sports\` : captures the sports that appeared on user interface. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data":{\
> &#x20;   "sports": \[\
> &#x20;     {\
> &#x20;       "id": "23204141"\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "id": "23390907"\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "id": "23032119"\
> &#x20;     }\
> &#x20;   ],\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home"\
> &#x20; },\
> &#x20; "event\_type": "impressions:sports",\
> &#x20; "user\_id": "654321"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`impressions:games\` : captures the casino games that appeared on user interface. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "channel": "Desktop",\
> &#x20;   "game\_ids": \[\
> &#x20;     {\
> &#x20;       "id": "TigerEmperor"\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "id": "NarcosMexico"\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "id": "EyeOfTheStorm"\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "id": "AmazingLinkFates"\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "id": "CashUltimate"\
> &#x20;     },\
> &#x20;     {\
> &#x20;       "id": "SantasWonderland"\
> &#x20;     }\
> &#x20;   ],\
> &#x20;   "page": "CategoryPageSlots",\
> &#x20;   "location": "swim\_lane"\
> &#x20; },\
> &#x20; "event\_type": "impressions:games",\
> &#x20; "user\_id": "654321"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`engagement:add\_bet\` : captures a user adding a bet in betslip. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "event\_id": "1018642410",\
> &#x20;   "selection\_id": "1018632560",\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home",\
> &#x20;   "position": 1\
> &#x20; },\
> &#x20; "event\_type": "engagement:add\_bet",\
> &#x20; "user\_id": "654321"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`engagement:place\_ticket\` : captures a user placing a recommended bet. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "selections": \[\
> &#x20;     {\
> &#x20;       "id": "3086198780"\
> &#x20;     }\
> &#x20;   ],\
> &#x20;   "location": "widget:recommended",\
> &#x20;   "page": "/home",\
> &#x20;   "position": 1\
> &#x20; },\
> &#x20; "event\_type": "engagement:place\_ticket",\
> &#x20; "user\_id": "9860015"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`users:login\` : captures the login of a user. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "event\_type": "users:login",\
> &#x20; "user\_id": "9860015"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`impressions:page\` : captures the page that appeared on the user interface. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "user": "654321",\
> &#x20;   "previous\_location": "<http://localhost:3000/#home",\\>
> &#x20;   "location": "<http://localhost:3000/#in-play"\\>
> &#x20; },\
> &#x20; "event\_type": "impressions:page",\
> &#x20; "user\_id": "654321"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \<details>\
> &#x20; \<summary>\`impressions:widget\` : captures the widget that appeared on the user interface. \`user\_id\` is required\</summary>\
> \`\`\`json\
> {\
> &#x20; "data": {\
> &#x20;   "user": "654321",\
> &#x20;   "location": "<http://localhost:3000/#home"\\>
> &#x20; },\
> &#x20; "event\_type": "impressions:widget",\
> &#x20; "user\_id": "654321"\
> }\
> \
> \`\`\`\
> \</details>\
> \
> \
> {% endhint %}\ <br>

````json
{"openapi":"3.0.1","info":{"title":"","version":"0.1.0"},"tags":[{"description":"Endpoints for tracking custom events","name":"Tracker"}],"servers":[{"description":"Production API","url":"https://api.vaix.ai"},{"description":"Staging (integration) API","url":"https://staging-api.vaix.ai"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"scheme":"bearer","type":"http"}},"schemas":{"TrackerEvent":{"description":"A tracker event object","type":"object","properties":{"data":{"description":"The tracking event info","type":"object"},"event_type":{"description":"The type of the event","type":"string","enum":["add:casino_game","clicks:event","clicks:outcome","clicks:sport","clicks:league","clicks:combination","clicks:menu-item","clicks:social","clicks:game","impressions:events","impressions:leagues","impressions:sports","impressions:games","statistics:add_bet","statistics:place_ticket","engagement:add_bet","engagement:place_ticket","users:login","impressions:page","impressions:widget","debug:message","recommendations:add_bet","recommendations:click:betslip-outcome","recommendations:click:combination","recommendations:click:event","recommendations:click:league","recommendations:click:next_outcome","recommendations:click:outcome","recommendations:click:view-more","recommendations:impression:betslip-events","recommendations:impression:events","recommendations:place_bet","social:click","vaix-widgets-loaded","custom"]},"user_id":{"description":"The user identifier","type":"string"}},"additionalProperties":false},"Error":{"description":"The generic API's error response","type":"object","properties":{"error":{"description":"Description of the error","type":"string"},"status":{"description":"response status","type":"string"}},"additionalProperties":false},"Errors":{"description":"The generic API's errors response","type":"object","properties":{"errors":{"description":"An object with the request errors","type":"object"}},"additionalProperties":false},"UnprocessableEntityError":{"oneOf":[{"additionalProperties":false,"description":"The generic API's error response","properties":{"error":{"description":"Description of the error","type":"string"},"status":{"description":"response status","type":"string"}},"type":"object"},{"additionalProperties":false,"description":"The generic API's errors response","properties":{"errors":{"description":"An object with the request errors","type":"object"}},"type":"object"}]}}},"paths":{"/api/tracker/events":{"post":{"operationId":"create_tracker_event","summary":"Publish a tracking event","description":"This endpoint can be used in order to track events like\nimpressions and clicks. However this is generic enough and can be\nused for tracking any custom events like user registrations,\nlogins and transactions.\n\n{% hint style=\"info\" %}\n\n## Tracking body\n\n\nThe body of the request must contain the event type an optional\n`user_id` and the actual tracking `data`.\n\n* `data` can be an arbitrary `json` object containing the event\ninfo. For each `click/impression` event you need to include these two\nfields apart from the needed fields for each type:\n  - `page`: The page in the website/app the widget is located, e.g. `/home`, `/live` etc.\n  - `location`: The location of the widget, e.g. `highlights:recommended`. Make sure to\n  follow the convention  of `widget:type` for this field.\n* `event_type` describes the type of the event, e.g.\n`clicks:event`, `clicks:outcome`, `statistics:add_bet`.\nNotice that it must be one of the supported event types.\n* `user_id` must be provided if the tracking event corresponds to\na specific user, otherwise it should be `null`.\n\nNotice that any other additional data needed for a specific integration\ncan be included in the data field of the request as long as the required\nfields are provided.\n\n{% endhint %}\n\n\n{% hint style=\"info\" %}\n\n## Frontend vs Backend requests\n\n\n\nIn order to be able to collect meaningful analytics we want to know the origin and the\ndevice from which the request originated.\n\nFor a **frontend integration** these properties are automatically added by the browser,\nso you don't need to enhance `data` with these fields.\n\n```json\n{\n  \"user_id\": \"123\",\n  \"event_type\": \"clicks:event\",\n  \"data\": {\n    \"event_id\": \"1018561959\",\n    \"position\": 0,\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\"\n  }\n}\n```\n\nFor **backend requests** since these headers are missing, it is suggested to specify\nthe `channel` and the `brand`, in the `data` body.\n\n```json\n{\n  \"user_id\": \"123\",\n  \"event_type\": \"clicks:event\",\n  \"data\": {\n    \"event_id\": \"1018561959\",\n    \"position\": 0,\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\",\n    \"brand\": \"https://website.com\",\n    \"channel\": \"android\"\n  }\n}\n```\n\nWhere\n\n- `channel`: the channel the backend request is originated from, e.g. `desktop`, `mac`, `ios`\n- `brand`: a url or a brand name.\n\n{% endhint %}\n\n\n{% hint style=\"info\" %}\n\n## Supported event types\n\n\n<details>\n  <summary>`add:casino_game` : captures a casino game</summary>\n```json\n{\n  \"data\": {\n    \"game_id\": \"123456\",\n    \"game_name\": \"Hall Of Gods\",\n    \"category\": \"slots\",\n    \"provider\": \"GameStudioX\",\n    \"enabled\": \"true\"\n  },\n  \"event_type\": \"add:casino_game\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`clicks:event` : captures a user click on a sport event. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"event_id\": \"1018561959\",\n    \"position\": 0,\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\"\n  },\n  \"event_type\": \"clicks:event\",\n  \"user_id\": \"123456\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`clicks:outcome` : captures a user click on a sport outcome. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"event_id\": \"1018561957\",\n    \"outcome_id\": \"3086187161\",\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\",\n    \"position\": 1\n  },\n  \"event_type\": \"clicks:outcome\",\n  \"user_id\": \"520535\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`clicks:sport` : captures a user click on a sport. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"sport_id\": \"1000093190\",\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\",\n    \"position\": 1\n  },\n  \"event_type\": \"clicks:sport\",\n  \"user_id\": \"123456\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`clicks:league` : captures a user click on a league. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"league_id\": \"1000093652\",\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\",\n    \"position\": 1\n  },\n  \"event_type\": \"clicks:league\",\n  \"user_id\": \"654321\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`clicks:combination` : captures a user selecting the recommended combination. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"selections\": [\n      {\n        \"id\": \"123\",\n        \"event_id\": \"001234\"\n     },\n      {\n        \"id\": \"124\",\n        \"event_id\": \"001238\"\n     }\n    ],\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\"\n  },\n  \"event_type\": \"clicks:combination\",\n  \"user_id\": \"654321\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`clicks:menu-item` : captures a click on a menu item. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"menu\": \"recommendations\",\n    \"item\": \"trending\",\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\"\n  },\n  \"event_type\": \"clicks:menu-item\",\n  \"user_id\": \"654321\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`clicks:social` : captures a user click on a sharing button. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\",\n    \"item\": \"open-sharing-dialog\"\n  },\n  \"event_type\": \"clicks:social\",\n  \"user_id\": \"654321\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`clicks:game` : captures a user click on a casino game. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"game_id\": \"HallOfGods\",\n    \"page\": \"CategoryPageJackpots\",\n    \"position\": \"3\",\n    \"location\": \"swim_lane:recommended\"\n  },\n  \"event_type\": \"clicks:game\",\n  \"user_id\": \"654321\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`impressions:events` : captures the events that appeared on user interface. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"events\": [\n      {\n        \"id\": 21161819\n      },\n      {\n        \"id\": 21161822\n      },\n      {\n        \"id\": 21168411\n      }\n    ],\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\"\n  },\n  \"event_type\": \"impressions:events\",\n  \"user_id\": \"520535\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`impressions:leagues` : captures the leagues that appeared on user interface. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"leagues\": [\n      {\n        \"id\": 18265893\n      },\n      {\n        \"id\": 2969\n      },\n      {\n        \"id\": 686\n      }\n    ],\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\"\n  },\n  \"event_type\": \"impressions:leagues\",\n  \"user_id\": \"520535\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`impressions:sports` : captures the sports that appeared on user interface. `user_id` is required</summary>\n```json\n{\n  \"data\":{\n    \"sports\": [\n      {\n        \"id\": \"23204141\"\n      },\n      {\n        \"id\": \"23390907\"\n      },\n      {\n        \"id\": \"23032119\"\n      }\n    ],\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\"\n  },\n  \"event_type\": \"impressions:sports\",\n  \"user_id\": \"654321\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`impressions:games` : captures the casino games that appeared on user interface. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"channel\": \"Desktop\",\n    \"game_ids\": [\n      {\n        \"id\": \"TigerEmperor\"\n      },\n      {\n        \"id\": \"NarcosMexico\"\n      },\n      {\n        \"id\": \"EyeOfTheStorm\"\n      },\n      {\n        \"id\": \"AmazingLinkFates\"\n      },\n      {\n        \"id\": \"CashUltimate\"\n      },\n      {\n        \"id\": \"SantasWonderland\"\n      }\n    ],\n    \"page\": \"CategoryPageSlots\",\n    \"location\": \"swim_lane\"\n  },\n  \"event_type\": \"impressions:games\",\n  \"user_id\": \"654321\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`engagement:add_bet` : captures a user adding a bet in betslip. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"event_id\": \"1018642410\",\n    \"selection_id\": \"1018632560\",\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\",\n    \"position\": 1\n  },\n  \"event_type\": \"engagement:add_bet\",\n  \"user_id\": \"654321\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`engagement:place_ticket` : captures a user placing a recommended bet. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"selections\": [\n      {\n        \"id\": \"3086198780\"\n      }\n    ],\n    \"location\": \"widget:recommended\",\n    \"page\": \"/home\",\n    \"position\": 1\n  },\n  \"event_type\": \"engagement:place_ticket\",\n  \"user_id\": \"9860015\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`users:login` : captures the login of a user. `user_id` is required</summary>\n```json\n{\n  \"event_type\": \"users:login\",\n  \"user_id\": \"9860015\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`impressions:page` : captures the page that appeared on the user interface. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"user\": \"654321\",\n    \"previous_location\": \"http://localhost:3000/#home\",\n    \"location\": \"http://localhost:3000/#in-play\"\n  },\n  \"event_type\": \"impressions:page\",\n  \"user_id\": \"654321\"\n}\n\n```\n</details>\n\n<details>\n  <summary>`impressions:widget` : captures the widget that appeared on the user interface. `user_id` is required</summary>\n```json\n{\n  \"data\": {\n    \"user\": \"654321\",\n    \"location\": \"http://localhost:3000/#home\"\n  },\n  \"event_type\": \"impressions:widget\",\n  \"user_id\": \"654321\"\n}\n\n```\n</details>\n\n\n{% endhint %}\n\n","parameters":[{"name":"x-vaix-client-id","in":"header","description":"Custom client header, the value should be the name of the group the user belongs to","required":true,"schema":{"type":"string"}},{"name":"x-vaix-authentication-method","in":"header","description":"Authentication method to be used, supported values [`vaix`, `iam`]. Defaults to `vaix`","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"The tracking event to be produced to kafka","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackerEvent"}}}},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"406":{"description":"Not Acceptable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Errors"}}}},"413":{"description":"Request Entity Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Errors"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableEntityError"}}}},"425":{"description":"Too Early","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Errors"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Tracker"]}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportradar.com/personalization/api-reference/tracker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
