Annotated Example Engine API Request
The following code is an example request to the Monetate Engine API. Each object is described separately afterward.
The device ID can be sent with new visitors without mt.v, but it's normally used for apps and similar situations in which cookie IDs are not possible. It's used for targeting and action conditions.
If no customer identifier is passed in the request, then a monetateID value is returned and the session is considered as a new visitor for targeting and analytics. See User Identity Persistence in Requests for more information.
If the session is a preview, then include the token ID for this object for experience and split preview.
A unique customerID value is used for Customer View and customer datasets.
The channel value is your Monetate account information.
The following objects are data passed to Monetate for experiences and analytics.
The following code example is an Engine API decision request event with filtering for certain action types, managed impressions, and whether to include reporting in the response. The filters parameter can be used to filter certain action types.
The following code example is an Engine API decision request event for the IP address. This information is used for targeting and analytics.
The following code example is an Engine API decision request event for a customer device's physical coordinates expressed in longitude and latitude. This information is used for targeting and analytics.
The following code example is an Engine API decision request event for the User-Agent header. This information is used for targeting and analytics.
The following code example is an Engine API decision request event for the screen size of the customer's device. This information is used for targeting.
The following code example is an Engine API decision request event for customer-specific metadata. This information is used for targeting and action conditions.
The following code example is an Engine API decision request event for a custom variable and its value. This information is used for targeting.
The following code example is an Engine API decision request event for a page view and its page type. This information is used for action conditions. See Action Condition Mapping for more details.
The following code example is an Engine API decision request event for a referring URL. This information is used for targeting and action conditions.
The following code example is an Engine API decision request event for custom page events. This information is used for analytics.
The following code example is an Engine API decision request event captures product thumbnail views on search results pages, product list pages. This information is used for targeting and action conditions.
The following code example is an Engine API decision request event captures product detail page views. This information is used for targeting and action conditions.
The following code example is an Engine API decision request event captures information about products in a customer's cart. This information is used for targeting, action conditions, and analytics.
The following code example is an Engine API decision request event that captures information about products that a customer has finished buying that appear on a "Purchase Complete" or similar page. This information is used for targeting and analytics.
The following code example is an Engine API decision request event that captures impressions. When manageImpressions is set to true, this event tells Monetate that the impression happened.