Send a widget event using the Events REST API
There are many types of events you can send using the Events API. If you integrate using the API, you must send all widget appear
and widget click
events when a visitor sees or clicks on a widget. This topic shows sample steps for how to send a widget click
event using the Events REST API.
To send a widget click
event using the Events REST API:
-
Retrieve your API URL.
-
Create the
widget click
event object as shown in the following code:RequestResponse{ "value": { "context": { "geo": <geo object>, "browser": <browser object> } "rfkid": "<widget rfkid>" }, "type": "widget", "name": "click", "t": 1625144306397, "t0": 1625144306397, "uuid": "<Discover UUID>", "user_id": "<anonymous user ID>" }
ImportantYou must provide either
uuid
oruser_id
. -
Send the event object to your Events API URL as shown in the following code sample:
RequestResponsePOST {EVENT_URL} { "data": "{<event object goes here>}" }