A while ago we noticed a spike in Google search results for _uetsid cookie pointing to our page dedicated to the cookie — these were most likely people like you, trying to write a cookie policy, and searching for the description and purpose of each cookie seen on their website. Well, this is precisely why WebCookies.org was created in the first place and we definitely have seen _uetsid quite a lot, but so far we haven't recorded its purpose or originating company, which probably left most of the people visiting disappointed.

In fact, if you search for the cookie by its name it's indeed quite a mysterious one — it's only found in people's cookie policies where it's described only as "unclassified". There's no mention of this cookie in any of the popular advertisers documentation or policies, as it's the case with many well-known cookies (such as Google Analytics or CloudFlare). Solving this riddle required a bit of manual investigation...

We used one of the websites (https://www.dimanoinmano.co.uk/) we knew was setting this cookie and rendered it using a custom PhantomJS script (see at the bottom) that records each resource loaded and scans its HTTP Set-Cookie headers to find any cookies set by HTTP. But... no luck here — the cookie wasn't seen in any of the headers returned with any of the 60+ external resources (images, JavaScript, CSS etc) loaded by the website.

This implies the cookie must have been set using JavaScript document.cookie interface which is a bit more tricky to debug — the cookie name may not even appear in the script code as it may be generated programmatically. The next step was to see if _uetsid maybe appears in PhantomJS cookie jar after loading some specific JavaScript file and then look at it more thoroughly.

And indeed, https://bat.bing.com/bat.js appeared always just before the cookie was created in PhantomJS. And we were lucky here, this is excerpt from the file contents:

function UET(o) ... this.sessionCookieName="_uetsid"

Now, knowing that it's Microsoft's Bing and armed with the "UET" acronym we were able to quickly find out that it's a Microsoft Bing Ads Universal Event Tracking (UET) and link appropriate Microsoft's policy document on the _uetsid cookie page, hopefully helping people to write more accurate policies!

And the PhantomJS script:

// search for a specific cookie name in all resources loaded by a website
// Usage:
// phantomjs URL COOKIE_NAME
// WebCookies.org 2017

var system = require('system');
var fs = require('fs');
var url = system.args[1];
var cookie_name = system.args[2];
var found = false;
var page = require('webpage').create();
var res_count = 0;

page.onResourceReceived = function (response) {
        if(!found && response['stage'] === 'start') {
        // search in HTTP headers
        for(var i=0; i<response.headers.length; i++) {
                var header = response.headers[i];
                if(header['name'].match(/set-cookie/i)) {
                        if(header['value'].match(cookie_name)) {
                                system.stderr.writeLine('*** FOUND HTTP *** ' + JSON.stringify(header));
        // search in PhantomJS cookie jar for cookies set by JavaScript
        for(var i=0; i<phantom.cookies.length; i++) {
                var cookie = phantom.cookies[i];
                if(cookie['name'] === cookie_name) {
                        if(!found) {
                                system.stderr.writeLine('*** FOUND JAR *** ' + JSON.stringify(cookie));
                                found  = true;

page.open(url, function(status) {
        system.stderr.writeLine('*** resources count= ' + res_count);