Yext Events API icon

Yext Events API

Interact with Yext Events API

Send Events

AI-generated

Summary

Send an event to Yext's Events API by specifying the event action and related contextual data such as visitor details, page information, and custom tags or values.

Inputs

  • action (required) — The action which caused the event, selected from a predefined list of standard actions (e.g., ADD_TO_CART, CHAT_RESPONSE). For CHAT_RESPONSE, responseId must be included in the chat object.
  • authorization — Optional alternative authorization string overriding the HTTP Authorization header (e.g., 'KEY ' or 'Bearer ').
  • bot — Boolean to specify if the event should be treated as non-bot traffic (default true).
  • browserAgent — JSON object describing the visitor's browser and device information.
  • chat — JSON object with Yext Chat properties associated with the event.
  • clientSdk — JSON mapping client SDK names to their version labels involved in the event.
  • count — Number representing how many events the record summarizes; treated as if event is duplicated this many times (default 1).
  • customTags — JSON object with up to 10 custom string key-value pairs (keys case-insensitive) to associate with the event.
  • customValues — JSON object with up to 10 custom string keys mapped to numeric values to associate with the event.
  • destinationUrl — URL of the page the event directs the visitor to.
  • entity — Customer-settable entity ID associated with the event.
  • internalUser — Boolean indicating if the event is from internal activity (default false).
  • ip — JSON object with IP-related information about the visitor.
  • label — Label assigned to the event, such as a CTA label.
  • locale — Locale of the visitor, e.g., 'en-US'.
  • location — JSON object specifying geographic coordinates of the visitor.
  • pages — JSON object with fields specific to Yext Pages Analytics Events.
  • pageUrl — URL of the page where the event occurred.
  • referrerUrl — URL of the page the visitor came from before the event.
  • search — JSON object with fields specific to Yext Search Analytics Events.
  • searchTerm — The query entered by the user.
  • sessionId — Session identifier string.
  • timestamp — Timestamp when the event occurred in date-time format.
  • value — JSON object representing the monetary value of the event.
  • visitor — JSON object with visitor methods as keys and visitor IDs as values.
  • requestOptions — Node setting collection for configuring batching, SSL, proxy, and timeout options for the HTTP request.

Output shape

a JSON object representing the API response from Yext after sending the event

The response shape depends on the Yext Events API. The node sends the collected event data as a JSON body in a POST request to the API endpoint with required authentication credentials supplied.

Discussion