Import data using Visitor Data Enrichment (/vdata)


You are likely familiar with the following two standard methods of ingesting data into EventStream:

Did you know there is a third method for EventStream to receive data? This additional method is called Visitor Data Enrichment and can be used to send real-time data updates to EventStream from any external system. The following sections provide details and examples.

What is /vdata/i.gif ?

  • The /vdata/ path in the Tealium Collect endpoint is used to receive data typically in a name/value pair format traditional to tracking pixels.

  • The /vdata/ URL has some key values that are special and required (those that begin with “tealium_”), but everything else is simply used to build the data layer

  • Data collection can be isolated to a specific region.
    For example, use for data collection only in Germany

Potential Use Cases

The following list describes potential uses of Visitor Data Enrichment.

  • Send data to vendors via EventStream
    Mobile apps have the ability to trigger data directly from the application to EventStream, skipping the webview, using Tealium /vdata/i.gif.
  • Use as an endpoint for cookie sync services
    This allows a tag vendor to redirect to the /vdata/i.gif location and send their visitor ID to EventStream
  • Impression Tracking
    Display advertisements are typically loaded in an iFrame. The Visitor Data Enrichment can help track which ads have been displayed to a visitor.
  • A CMS/CRM/BI/etc system can POST a JSON object of data to EventStream
    This method can be used if your system generates sensitive data that you do not want to be fed through the browser, but EventStream needs the data in real-time to take action on the visitor.

Required Parameters for the Tealium REST Endpoint

The following table describes required parameters for the Tealium REST endpoint:

Parameter Description
tealium_account The account name for EventStream/Tealium iQ
tealium_profile The profile name where you have EventStream configured
tealium_vid The unique Visitor ID or Secondary ID, such as encoded Email Address or Device ID, from which the tracking request originates
tealium_trace_id Optional. Required only for testing with Trace feature

Sample GET Request

GET //

What this ‘Might’ Look Like Embedded in an Email

<img src="//

Using the /vdata/i.gif is the most common method for using the Visitor Data Enrichment and we strongly suggest using it. As there may be limitations or requirements around sending the data in a different format directly from a server, we provide options for doing so in the following sections.

Sample GET Request using JavaScript

The following example shows how to code a display ad to send the impression tracking information to EventStream.

//build your object of data
var a={

//stringify the object for the GET event
var json_string = JSON.stringify(a);

//send the data to your collect endpoint
var img = new Image();

Sample POST Request

The POST request examples are similar to GET except that the POST of data is not as limited to the amount of data it can send as compared to GET.

Sample POST Request using JavaScript

//build your object of data
var a={
   "event":"view" //change this to "link" or "view" depending on the type of event

//stringify the object for the POST event
var json_string = JSON.stringify(a);

//POST the data to your collect endpoint
if (json_string!="") {
   var formData = new FormData();
   formData.append("data", json_string);
   function postData(data) {
      var xhr = new XMLHttpRequest();'post', "//", true);
      xhr.withCredentials = true;

Sample POST Request using cURL

The following example shows how to POST data to EventStream from a Command Line Interface (CLI) or terminal for Mac. This example would likely only be used for testing.

curl -H "Content-Type: application/json" -X POST -d '{"data":{"event_name":"myEvent","customer_id":"","cp.trace_id":"12345"},"event":"view"}'

Sample POST Request using Python

The following example shows how to programmatically code this to run using Python and is based on an example from

import requests, json
body = {'data':{'event_name':'abc_score','cp.trace_id':'04759','abc_score':'0.56','customer_id':'9999999'},'event':'view'}
headers = {"Content-Type": "text/plain","Accept": "image/gif"}
r ='', data = json.dumps(body), headers=headers);

This example uses the Python “Requests” module, which can be installed using the following command:

pip2 install requests

For Python3, use:

pip3 install requests

When complete, update and test accordingly.

Was this page helpful?

This page was last updated: January 7, 2023