Help & Support
How Can We Help?
We Think These Might Help
Thank you for your feedback!
cannot be blank
We will respond as soon as humanly possible.

Capturing data from cookies into AdRoll Pixel

Some advertisers may have their own internal attribution systems, many of these work by placing a cookie (much like AdRoll) on users as they browse to their site. As the user returns time and time again to their site (via Retargeting, organically, etc) the cookie remains updated with various data. This cookie also defines a unique identifier for that visitor, which is then exported into data warehouses for attribution and tracking. 


note that this is an advanced feature of AdRoll and we recommend that technical teams execute these instructions. 


Hypothetically, if this data were stored in a cookie under the name "unique_internal_visitor_id" you could place the following javascript after the AdRoll Smart Pixel to execute and capture that unique value and write it to AdRoll as "Custom Data" under an attribute of the same name.

try { 
(function () { 
var splitCookies = document.cookie.split(';');
for (var i = 0; i < splitCookies.length; i++) {
if (splitCookies[i].indexOf('unique_internal_visitor_id') > -1) {
if (typeof adroll_custom_data === 'undefined') {
adroll_custom_data = {};
adroll_custom_data.unique_internal_visitor_id = splitCookies[i].split('=')[1];
} catch (e) {}

You can - and should - test this in various browsers by executing the Javascript in your developer console. You can confirm it has worked successfully by then executing "adroll_custom_data.unique_internal_visitor_id" in the developer console, it should export the same cookie value as what is stored in the original first party cookie. 

Once this data is deployed in production, Granular Conversion Reports and AdRoll SQL will begin outputting this variable in the reporting columns.

Was this article helpful?
0 out of 0 found this helpful