Skip to main content

Anomaly detection

For Rokt Ecommerce partners, placement performance makes up a key component of the ecommerce experience, providing value to your customers and generating significant value for your bottom line. Ensuring the Rokt placement is displayed as often as expected is key to maximizing the value Rokt can deliver.

Technical integrations, such as Rokt’s Web SDK, iOS SDK, or Android SDK, can be impacted by small changes to the many moving parts in the ecosystem including website updates, third-party integrations (e.g., tag managers and optimization systems), customer-installed applications (e.g., browser extensions), or even new browser versions. The severity of the impact can range significantly depending on the type of change, but even small errors affecting a tiny percentage of sessions can have significant impacts to customers—as well as the bottom line—if they linger undetected.

By default, Rokt uses a range of tools, alerts, and reporting to track these types of issues. For example, all deployments are set up with automated alarming on major drops in placement impressions. However, small deviations from the norm may be perceived as noise, so smaller errors (e.g., an error affecting some versions of Safari) may go unnoticed. To get the most accurate picture of performance, we need a trusted secondary data source that is independent of browser functionality. This secondary data source allows Rokt to run comparisons between actual placement impressions and events where a placement should have been displayed. When this data is made available, discrepancies can be quickly identified, diagnosed, and fixed.

Anomaly detection involves setting up both the Rokt Web SDK along with the Event API. While the Web SDK is integrated into your frontend, the Event API talks to your backend systems, providing a server-to-server version of the truth.

Before you begin#

Follow the steps to add the Rokt Web SDK to your site.


  1. Make sure you can log in to Rokt's One Platform and obtain your Account ID. If you don't have an account, reach out to your account manager.
  2. Get your App ID and App Secret from One Platform. You need this information in order to authenticate the Event API. You can view steps to retrieve your credentials here.
  3. Assemble your payload for the Event API. You can use the POST /v1/events endpoint to send any type of conversion event to Rokt.
    1. Include relevant key-value pairs in the objectData. Providing details about the customer device, browser, and operating system helps Rokt troubleshoot any anomalies that might appear. Suggested objectData fields are available in the table below.
Full endpoint reference

You can view full reference details for the Event API here.


POST /v1/events{    "accountId": "12345",    "events": [        {            "clientEventId": "ff3bd69c-ca74-4337-af91-4d5d0bd00e38",            "eventTime": "2020-05-22T10:21:29.339Z",            "eventType": "transaction",            "objectData": [                {                    "name": "email",                    "value": ""                },                {                    "name": "transactionid",                    "value": "123456789"                },                {                    "name": "ipaddress",                    "value": ""                },                {                    "name": "DeviceType",                    "value": "Mobile"                },                {                    "name": "os",                    "value": "iOS"                },                {                    "name": "osversion",                    "value": "14.5"                },                {                    "name": "browser",                    "value": "Safari"                },                {                    "name": "browserversion",                    "value": "11.1"                }            ]        }    ]

Suggested objectData fields#

Field nameDescriptionExample
emailEmail passed as plain text, lowercase and without trailing
transactionidTransaction ID, used to identify a unique transaction. Note: If provided, Rokt uses this identifier to deduplicate conversion events across channels.ABC789
confirmationrefConfirmation reference ID. Alternate identifier that may be used to identify a unique transaction and/or track order confirmations. Note: If provided, Rokt uses this identifier to deduplicate conversion events and transactionid is unavailable.XYZ123
ipaddressCustomer's IP address172.3.51.182
useragentBrowser user agent of converting customerMozilla/5.0 (Windows NT 6.1; Win64;x64; rv:47.0) Gecko/20100101 Firefox/47.0
DeviceTypeType of deviceDesktop Mobile Tablet
osDevice operating systemiOS
osversionOperating system version8.1
browserversionBrowser version11.1
Custom attributes#

Rokt has a data mapping system that allows us to map provided field names to our internal data fields, however we have some recommended field names and formatting requirements later in this article. If you would like to use alternate field names, let us know, and we will ensure your fields are managed accordingly. Additionally, we can accept any additional fields if you would like to provide them for reporting purposes.

Was this article helpful?