Skip to main content
Skip table of contents

Analytics Tracking

Capturing Tracking Events

You can use the Web SDK or Info Ident Track API directly to send any key-value or JSON formatted tracking information, for example from your data layer(s).

The Web SDK allows you to specify the data layer(s) with specific variables and their position in the data layer to only capture relevant information. This includes nested JSON objects.

Tracking data is sent under the data field within the following request payload structure using an object with a list of keys, which can hold an object or array of objects:

JSON
{
  "data": {
    "action": [
      {}
    ],
    "event": [
      {}
    ],
    "keyA": [
      {}
    ],
    "keyB": {},
    "keyN": {}
  }
}

Example Payload

JSON
{
  "data": {
    "add_to_cart": {
      "currency": "EUR",
      "value": "5.49",
      "items": [
        {
          "item_category": "Fresh Food",
          "item_category2": "Organic",
          "item_category3": "",
          "item_category4": "",
          "item_category5": "",
          "item_brand": "Pending to define",
          "item_id": "",
          "item_name": "Whole Foods Market, Organic Coleslaw Mix",
          "coupon": "Pending to define",
          "affiliation": "Pending to define",
          "price": "5.49",
          "discount": 0,
          "quantity": 1
        }
      ]
    }
  }
}

Example Event Log

The events log provides an extensive view of tracking events, which can be viewed via Elastic (Kibana), aggregated for reporting and segment building, and used as user-level trigger events, for example with outbound marketing messages.

JSON
{
  "origin": "https://www.brand-demo.com",
  "latency": 7,
  "ua": {
    "bType": "BR",
    "os": "Windows",
    "latency": 2,
    "hdr": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
    "bFamily": "Chrome",
    "dName": "PC",
    "bVer": "141.0.0.0"
  },
  "identMethod": 0,
  "out": {
    "resp": "{\"umid\":\"16cf9b1a-aca6-475f-8fb9-08648b3141c9\",\"state\":0}"
  },
  "geo": {
    "cc": "GB",
    "loc": {
      "lon": -0.13946999609470367,
      "lat": 50.8283805847168
    },
    "mobileBrand": "BT",
    "mnc": "00/76",
    "reg": "England",
    "city": "Brighton",
    "latency": 2,
    "isp": "British Telecommunications Plc",
    "domainName": "bt.com",
    "mcc": "234",
    "usageType": "ISP/MOB"
  },
  "ref": "https://www.brand-demo.com/",
  "nbaGiven": true,
  "httpStatus": 200,
  "host": {
    "name": "7ee09fa7269d"
  },
  "info": {
    "notificationStatus": {
      "CS-UTIQ": false,
      "CS-NBA": true,
      "CS-OM": true,
      "CS-OPT": true
    },
    "nextBestIdentifiers": [],
    "identifiers": [],
    "permissions": {
      "CS-NBA": true,
      "CS-OPT": true,
      "CS-OM": true
    }
  },
  "rType": "Info",
  "method": "POST",
  "in": {
    "data": "{\"add_to_cart\":{\"currency\":\"EUR\",\"value\":\"5.49\",\"items\":[{\"item_category\":\"Fresh Food\",\"item_category2\":\"Organic\",\"item_category3\":\"\",\"item_category4\":\"\",\"item_category5\":\"\",\"item_brand\":\"Pending to define\",\"item_id\":\"\",\"item_name\":\"Whole Foods Market, Organic Coleslaw Mix\",\"coupon\":\"Pending to define\",\"affiliation\":\"Pending to define\",\"price\":\"5.49\",\"discount\":0,\"quantity\":1}]}}",
    "out": "json"
  },
  "pId": "brand-demo-info",
  "td": {
    "createdDate": "2025-10-30T08:48:27.474Z",
    "umid": "16cf9b1a-aca6-475f-8fb9-08648b3141c9",
    "profileId": "6903265bf480652c774776d1",
    "cat": "visitor",
    "lookupIds": [
      {
        "src": "ck",
        "name": "umdid",
        "sel": true,
        "value": "257958d8-bef3-4a97-b2b3-8b3a85fd4308"
      }
    ]
  },
  "node": "backend-1a",
  "@timestamp": "2025-10-30T08:48:47.470Z",
  "ids": {
    "umdid": "257958d8-bef3-4a97-b2b3-8b3a85fd4308",
    "umid": "16cf9b1a-aca6-475f-8fb9-08648b3141c9"
  },
  "status": [
    300,
    540,
    552
  ]
}

Google Analytics

dataLayer

Our library enables you to track events from Google's dataLayer. For detailed information, please read Data Layer Data Capture.

UMID in UID

Our library enables user identification in Google Analytics through the use of umid as uid or user_id. This functionality allows for the creation of historical user reports that do not expire, regardless of the user's login status. For detailed information, please read the entry UMID_TO_DATALAYER_CONFIGURATION in the section Google Analytics.

An additional configuration is needed in the GTM container to allow using user_id in Google Analytics reports.

First, you must create a new variable to read the user_id from the dataLayer. In the left sidebar menu, go to Variables → User-Defined Variables and add a new one with type Data Layer Variable. The Data Layer Variable Name field must be user_id. See the following example:

Screenshot 2024-10-28 at 14.54.37.png

Now, in the Tags section, this variable must be added as a parameter to the Google Analytics integration tag. The tag type is usually Google Tag, and every tag with the type Google Analytics: GA4 Event. See the following example:

Screenshot 2025-03-05 at 11.14.08.png

The Configuration parameter must be user_id and the Value is the previously created Data Layer Variable. This is another example of this implementation in Google Analytics: GA4 Event Tag:

Screenshot 2025-03-05 at 11.27.23.png

Matomo

The Web SDK enables you to track events from Matomo’s data layer. See config options.

Tealium Utag

The Web SDK enables you to track events from Tealium’s utag data layer. See Data Layer Data Capture.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.