Send a funnel event using the Events REST API
There are many types of events you can send using the Events API. However, there are some you are required to send, including all funnel events. This topic shows sample steps for how to send a funnel event (add to cart
) using the Events REST API.
To send an add to cart
event using the Events Rest API:
-
Retrieve your API URL.
-
Create the
add to cart
event object as shown in the following code:RequestResponse{ "value": { "context": { "geo": <geo object> }, "products": [ { "sku": "3x112f92d16", "quantity": 1, "price": 9.99 } ] }, "type": "a2c", "name": "pdp", "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>}" }