We support requesting the Sticky.ID using XMLHttpRequest. Make sure that you set withCredentials = true so that cookies are properly sent in the request. The result can then be parsed using JSON.parse.

Get user's Sticky.ID using XHR

var xhr = new XMLHttpRequest(); 
xhr.withCredentials = true;
xhr.open('GET','https://stickyid-a.akamaihd.net/id?o='+encodeURIComponent(window.location.protocol+'//'+window.location.host));
xhr.onload = function() {
  var response = JSON.parse(xhr.responseText);
  var globalUserId = response.id;
  var timestamp = response.ts;
  var cookieSupport = response.cs;
};
xhr.send();