Analytics Events
Send user events from your Yext digital experiences to Yext Analytics in near real-time.
Request Body schema: application/json
JSON object containing the events to be sent to Yext Analytics
required | Standard (string) or Custom (string) The action which caused the event. |
authorization | string [ 1 .. 8192 ] characters ^(KEY|Bearer)\s.+$ An alternative to using the Authorization HTTP header. If a value is provided, it will override any Authorization header. Api keys should be formatted like "KEY <apiKey>", access tokens should be formatted like "Bearer <bearerToken>" |
boolean or $auto (string) Default: "$auto" Whether the event is the result of bot activity. | |
object Default: {"browser":"$auto","browserVersion":"$auto","device":"$auto","deviceClass":"$auto","os":"$auto","osVersion":"$auto","userAgent":"$auto"} Information about the visitor's device and browser. | |
object (Chat) The Yext Chat properties of the event. | |
count | integer [ 1 .. 1000000000 ] Default: 1 When one record summarizes multiple events, this is the number of events the record represents. The event is treated as if it is duplicated this many times. |
object <= 10 properties Up to 10 pairs matching custom string keys to string values to associate with the event. Keys are case-insensitive; values are case-sensitive. Property Name | |
object <= 10 properties Up to 10 pairs matching custom string keys to number values to associate with the event. Keys are case-insensitive. Property Name | |
destinationUrl | string <uri> (URL) The URL of the page the event is directing the visitor to. |
entityId (string) or entityUid (integer) | |
internalUser | boolean Default: false Indicates whether the event is the result of internal activity. |
IP (object) or null (null) Default: {"address":"$auto","algorithm":"HASH"} The IP address for the event. | |
label | string [ 1 .. 16777216 ] characters A label assigned to the event, e.g. a CTA label. |
Locale (string) or $auto (string) or null (null) Default: "$auto" The locale of the user who generated the event. | |
Location (object) or $auto (string) or null (null) Default: "$auto" The location information of the visitor for the event. | |
URL (string) or $auto (string) or null (null) Default: "$auto" The URL of the page the event occurred on. | |
URL (string) or $auto (string) or null (null) Default: "$auto" The URL of the page which the visitor came from prior to the event. | |
searchTerm | string [ 1 .. 16777216 ] characters The query entered by the user. |
sessionId | string^[\x20-\x7E]{1,36}$ ID of the user session associated with event. |
ISO Timestamp (string) or Epoch millisecond (number) or $auto (string) Default: "$auto" The timestamp at which the event occurred. | |
object (Value) The monetary value of the event | |
object <= 1 properties The visitor related to the event. Keys are visitor methods and values are visitor IDs. PropertyName pattern: "^[a-zA-Z0-9_-]{1,16}$". Value pattern: "^[\x20-\x7E]{1,64}$" |
Responses
Request samples
- Payload
{- "action": "ADD_TO_CART",
- "authorization": "string",
- "bot": "$auto",
- "browserAgent": {
- "browser": "$auto",
- "browserVersion": "$auto",
- "device": "$auto",
- "deviceClass": "$auto",
- "os": "$auto",
- "osVersion": "$auto",
- "userAgent": "$auto"
}, - "chat": {
- "botId": "string",
- "conversationId": "MDFIQjlKWkM5SlhaU0dEUjJNRFBCUFdLWTHeIqvURTeRr2EC",
- "responseId": "string"
}, - "count": 1,
- "customTags": {
- "^[a-zA-Z][a-zA-Z0-9_]{0,31}$": "string"
}, - "customValues": {
- "^[a-zA-Z][a-zA-Z0-9_]{0,31}$": 1
}, - "entity": "string",
- "internalUser": false,
- "ip": {
- "address": "$auto",
- "algorithm": "HASH"
}, - "label": "string",
- "locale": "$auto",
- "location": "$auto",
- "pageUrl": "$auto",
- "referrerUrl": "$auto",
- "searchTerm": "string",
- "sessionId": "string",
- "timestamp": "$auto",
- "value": {
- "amount": 0,
- "currency": "str"
}, - "visitor": {
- "^[a-zA-Z0-9_-]{1,16}$": "string"
}
}
Response samples
- 202
- 429
- default
{- "id": "string"
}