roshanbluekai
10/9/2019 - 9:54 AM

DMP - e_id_s grabber

<!--
- Add lines 15-32 within your existing DMP tracking tag
-->

<!-- Begin BlueKai Tag -->
<script type="text/javascript">
window.bk_async = function() {

 // ALLOW MULTIPLE CALLS/SINGLE PAGE APPS
bk_allow_multiple_calls=true; bk_use_multiple_iframes=true ;

...

// SHA-256 HASHED EMAIL GRABBER : START
var urlParams;
var match,
	pl = /\+/g, // Regex for replacing addition symbol with a space
	search = /([^&=]+)=?([^&]*)/g,
	decode = function(s) {
		return decodeURIComponent(s.replace(pl, " "));
	},
	query = (window.location.href.toLowerCase().split('?')[1]) ? window.location.href.toLowerCase().split('?')[1] : "";

urlParams = {};
while (match = search.exec(query))
	urlParams[decode(match[1])] = decode(match[2]);

if (urlParams.e_id_s) {

	bk_addPageCtx("e_id_s",urlParams.e_id_s);

}

// SHA-256 HASHED EMAIL GRABBER : END

...

// Send Data 
BKTAG.doTag(ENTER CONTAINER ID HERE, 4);  // change "ENTER CONTAINER ID HERE" to the container ID/Site ID you want to use
};
(function() {
  var scripts = document.getElementsByTagName('script')[0];
  var s = document.createElement('script');
  s.async = true;
  s.src = "//tags.bkrtx.com/js/bk-coretag.js";
  scripts.parentNode.insertBefore(s, scripts);
}());
</script>
<!-- End BlueKai Tag -->