Skip to content

Instantly share code, notes, and snippets.

@MKorostoff
Created February 28, 2014 00:46
Show Gist options
  • Save MKorostoff/9262911 to your computer and use it in GitHub Desktop.
Save MKorostoff/9262911 to your computer and use it in GitHub Desktop.
<!--Site Pixel HEAD Script For:golfchannel.com-->
<!--Krux Interchange - Krux Writes to Cookie UPDATED:2012-08-30 08:48:31-->
<script>
window.Krux || ((Krux = function () {
Krux.q.push(arguments);
}).q = []);
(function () {
function retrieve(n) {
var m, k = 'kx' + n;
if (window.localStorage) {
return window.localStorage[k] || "";
} else if (navigator.cookieEnabled) {
m = document.cookie.match(k + '=([^;]*)');
return (m && unescape(m[1])) || "";
} else {
return '';
}
}
var kvs = [];
Krux.user = retrieve('user');
if (Krux.user) {
kvs.push('u=' + Krux.user);
}
Krux.segments = retrieve('segs') && retrieve('segs').split(',') || [];
for (var i = 0; i < Krux.segments.length; i++) {
kvs.push('ksg=' + Krux.segments[i]);
}
Krux.dartKeyValues = kvs.length ? kvs.join(';') + ';' : '';
})(); </script>
<!--Legacy DFP: Krux Interchange - Krux KVs Written to AdTag UPDATED: 2013 - 07 - 02 11: 30: 57-->
<script> (function () {
var kvs = window.Krux ? window.Krux.dartKeyValues : '';
if (top.__nbcudigitaladops_inject && top.__nbcudigitaladops_inject.dtprm) {
top.__nbcudigitaladops_inject.dtprm(kvs);
}
})();
</script>
<!--Default Pixel - Header(Do Not Delete) UPDATED: 2012 - 02 - 28 13: 35: 47-->
<script></script>
<!--DFPP Network ID N2620 rewrite - Step 1 UPDATED: 2013 - 08 - 13 16: 03: 49-->
<script>
if (top.__nbcudigitaladops_inject) {
window.__nbcudigitaladops_orig_doc_write = document.write;
document.write = function (markup) {
var SITE_VAR = "N2620";
markup = markup.replace(/(http|https):\/\/(ad|iv)\.doubleclick\.net\/adj\/(nbcu|test|team)/i, '$1:\/\/$2.doubleclick.net\/' + SITE_VAR + '\/adj\/$3');
window.__nbcudigitaladops_orig_doc_write.call(document, markup);
}
} </script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment