function trackIt5ba5d6d59b00a() {}trackIt5ba5d6d59b00a();function eaTms() { var _this = this; this.criteria_js_referrer = ''; this.rpc_url = ''; if (this.rpc_url == '') this.rpc_url = '//tracking.bdi-services.de/trck/etms/rpc.json'; this.triplet = ''; this.triplet_cache = { }; this.click_url = ''; this.anychannel_id = ''; this.touchpoint_url = ''; this.conversiontracking_url = ''; this.init = function () { this.referrer = document.referrer; this.href = window.location.href; this.referrer_get = this.getParams(this.referrer); this.href_get = this.getParams(this.href) } this.getCookie = function (cname) { var name = cname + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1); if (c.indexOf(name) == 0) return c.substring(name.length, c.length); } return ""; }; this.insertAndExecute = function (id, text) { domelement = document.getElementById(id); domelement.innerHTML = text; var scripts = []; ret = domelement.childNodes; for (var i = 0; ret[i]; i++) { if (scripts && _this.nodeName(ret[i], "script") && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript")) { scripts.push(ret[i].parentNode ? ret[i].parentNode.removeChild(ret[i]) : ret[i]); } } for (script in scripts) { _this.evalScript(scripts[script]); } } this.nodeName = function (elem, name) { return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); } this.evalScript = function (elem) { data = ( elem.text || elem.textContent || elem.innerHTML || "" ); var head = document.getElementsByTagName("head")[0] || document.documentElement, script = document.createElement("script"); script.type = "text/javascript"; script.appendChild(document.createTextNode(data)); head.insertBefore(script, head.firstChild); head.removeChild(script); if (elem.parentNode) { elem.parentNode.removeChild(elem); } } this.getParams = function (addr) { var params = new Array(); if (addr.indexOf('?') !== -1) { addr = addr.split('?')[1].split('&'); for (var i = 0; i < addr.length; i++) { var item = addr[i].split('='); if (item[0]) params[item[0]] = (item[1]) ? item[1] : ""; } } return params; }; this.runByJsReferrer = function () { if (typeof this.referrer_get[this.criteria_js_referrer] !== 'undefined') { this.tripletCriteria = this.referrer_get[this.criteria_js_referrer]; } else if (typeof this.href_get[this.criteria_js_referrer] !== 'undefined') { this.tripletCriteria = this.href_get[this.criteria_js_referrer]; } }; this.registerClick = function (triplet) { if (this.click_url != '') { this.click_url = this.click_url.replace('{$triplet}', triplet); this.click_url = this.click_url.replace('{$ref}', encodeURIComponent(this.referrer)); this.getScript(this.click_url); } } this.registerTouchpoint = function () { if (this.touchpoint_url != '') { this.touchpoint_url = this.touchpoint_url.replace('{$referrer}', encodeURIComponent(this.referrer)); this.getScript(this.touchpoint_url); } } this.getScript = function (source, callback) { var script = document.createElement('script'); var prior = document.getElementsByTagName('script')[0]; script.async = 1; prior.parentNode.insertBefore(script, prior); script.onload = script.onreadystatechange = function (_, isAbort) { if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) { script.onload = script.onreadystatechange = null; script = undefined; if (!isAbort) { if (callback) callback(); } } }; script.src = source; } this.serialize = function (obj, prefix) { var str = []; for (var p in obj) { if (obj.hasOwnProperty(p)) { var k = prefix ? prefix + "[" + p + "]" : p, v = obj[p]; str.push(typeof v == "object" ? this.serialize(v, k) : encodeURIComponent(k) + "=" + encodeURIComponent(v)); } } return str.join("&"); } this.getJSON = function (path, data, success, error) { var xhr = new XMLHttpRequest(); path = path + '?' + this.serialize(data); xhr.onreadystatechange = function () { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { if (success) success(JSON.parse(xhr.responseText)); } else { if (error) error(xhr); } } }; xhr.open("GET", path, true); xhr.send(); } this.getTriplet = function () { if (typeof this.tripletCriteria !== 'undefined') { var cache_criteria = this.tripletCriteria.trim().replace(' ', ''); if (typeof this.triplet_cache[cache_criteria] != 'undefined') { this.registerClick(this.triplet_cache[cache_criteria]); } else { this.getJSON( this.rpc_url, { function: 'getTriplet', data: { triplet: this.tripletCriteria } }, function (data) { eaTms.registerClick(data.triplet); } ); } } else if (this.getCookie('trs') != '') { this.registerTouchpoint(); } }; this.runTracking = function () { if (this.conversiontracking_url != '') { var params = this.getParams(window.location.href); if (typeof basketOrderUUID != 'undefined' && basketOrderUUID != 'undefined' && basketOrderUUID != '') { this.conversiontracking_url = this.conversiontracking_url.replace('{$token}', basketOrderUUID); this.conversiontracking_url = this.conversiontracking_url.replace('{$ref}', encodeURIComponent(window.location.href)); this.getScript(this.conversiontracking_url); } else if (typeof params['pagetype'] != 'undefined' && params['pagetype'] == 'checkout_step_thanks' && params['OrderID'] != '') { this.conversiontracking_url = this.conversiontracking_url.replace('{$token}', params['OrderID']); this.conversiontracking_url = this.conversiontracking_url.replace('{$ref}', encodeURIComponent(window.location.href)); this.getScript(this.conversiontracking_url); } else if (typeof params['OrderID'] != 'undefined' && params['OrderID'] != '') { var source = $('head').html(); var token = source.slice(source.search('basketOrderUUID'), source.indexOf(';', source.search('basketOrderUUID'))).split('="')[1].replace('"', '').trim(); this.conversiontracking_url = this.conversiontracking_url.replace('{$token}', token); this.conversiontracking_url = this.conversiontracking_url.replace('{$ref}', encodeURIComponent(window.location.href)); this.getScript(this.conversiontracking_url); } } }; this.registerTrackingByReferrer = function (referrer) { this.getJSON( this.rpc_url, { function: 'getTripletByReferrer', data: { referrer: referrer } }, function (data) { eaTms.registerClick(data.triplet); } ); } this.run = function () { if (this.criteria_js_referrer != '') { this.runByJsReferrer(); } this.triplet = this.getTriplet(); this.runTracking(); }; } function eaConvSys() { this.etrack_url = '//tracking.bdi-services.de/trck/etrack/'; this.init = function () { }; this.serializeObj = function(obj) { var str = ''; for (var key in obj) { if (str != "") { str += "&"; } str += key + "=" + encodeURIComponent(obj[key]); } return str; }; this.addConversion = function(data) { var url = this.etrack_url + '?' + this.serializeObj(data); console.log('Start ' + url); eaTms.getScript(url, function() { console.log('Done ' + url); }); }; } var eaTms = new eaTms(); eaTms.init(); eaTms.run(); var eaConvSys = new eaConvSys(); eaConvSys.init(); /* A JavaScript implementation of the SHA family of hashes, as defined in FIPS PUB 180-2 as well as the corresponding HMAC implementation as defined in FIPS PUB 198a Copyright Brian Turek 2008-2016 Distributed under the BSD License See http://caligatio.github.com/jsSHA/ for more information Several functions taken from Paul Johnston */ 'use strict';(function(W){function w(d,a,c){var b=0,f=[],h=0,g,e,n,k,m,q,v,p=!1,r=[],t=[],l,u=!1;c=c||{};g=c.encoding||"UTF8";l=c.numRounds||1;n=L(a,g);if(l!==parseInt(l,10)||1>l)throw Error("numRounds must a integer >= 1");if("SHA-1"===d)m=512,q=M,v=X,k=160;else if(q=function(a,c){return N(a,c,d)},v=function(a,c,b,f){var h,C;if("SHA-224"===d||"SHA-256"===d)h=(c+65>>>9<<4)+15,C=16;else if("SHA-384"===d||"SHA-512"===d)h=(c+129>>>10<<5)+31,C=32;else throw Error("Unexpected error in SHA-2 implementation"); for(;a.length<=h;)a.push(0);a[c>>>5]|=128<<24-c%32;c=c+b;a[h]=c&4294967295;a[h-1]=c/4294967296|0;b=a.length;for(c=0;c>>3;f=h/4-1;if(h a/8){for(;c.length<=f;)c.push(0);c[f]&=4294967040}for(a=0;a<=f;a+=1)r[a]=c[a]^909522486,t[a]=c[a]^1549556828;e=q(r,e);b=m;p=!0};this.update=function(a){var d,c,g,k=0,p=m>>>5;d=n(a,f,h);a=d.binLen;c=d.value;d=a>>>5;for(g=0;g>>5);h=a%m;u=!0};this.getHash=function(a,c){var g,m,n,q;if(!0===p)throw Error("Cannot call getHash after setting HMAC key");n=O(c);switch(a){case "HEX":g=function(a){return P(a,n)};break;case "B64":g=function(a){return Q(a, n)};break;case "BYTES":g=R;break;case "ARRAYBUFFER":try{m=new ArrayBuffer(0)}catch(t){throw Error("ARRAYBUFFER not supported by this environment");}g=S;break;default:throw Error("format must be HEX, B64, BYTES, or ARRAYBUFFER");}q=v(f.slice(),h,b,e.slice());for(m=1;m>>3;if(0!==b%2)throw Error("String of HEX type must be in byte increments");for(f=0;f>>1)+n;for(g=e>>>2;a.length<=g;)a.push(0);a[g]|=h<<8*(3-e%4)}return{value:a,binLen:4*b+c}}function Z(d,a,c){var b=[],f,h,g,e,b=a||[0];c=c||0;h=c>>>3;for(f=0;f>>2,b.length<=g&&b.push(0),b[g]|=a<<8*(3-e%4);return{value:b,binLen:8*d.length+c}}function aa(d,a,c){var b=[],f=0,h,g,e,n,k,m,b=a||[0];c=c||0;a=c>>>3;if(-1===d.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string"); g=d.indexOf("=");d=d.replace(/\=/g,"");if(-1!==g&&g'); } else if(window.jQuery) { $('body').append(''); } }; this.isEmail = function (email) { return /^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/.test(email); }; this.pushEmail = function (value) { value = value.trim(); value = value.replace(' ', ''); if (this.isEmail(value)) { value = this.getSha256Value(value); eaTms.getJSON('//' + _this.domain + '/trck/ematch/?trackid=' + _this.session_id + '&pty=ham&val=' + value, function () { }); } ; }; this.getSha256Value = function (text) { var shaObj = new jsSHA('SHA-256', 'TEXT'); shaObj.update(text); return shaObj.getHash('HEX'); ; } this.run = function () { var profile_ids = []; profile_ids.push({'adf': this.runAdform()}); }; }; var eaDmp = new eaDmp(); eaDmp.init(); eaDmp.run(); (function () { 'use strict'; var DEFAULT_MAX_DEPTH = 6; var DEFAULT_ARRAY_MAX_LENGTH = 50; var seen; // Same variable used for all stringifications Date.prototype.toPrunedJSON = Date.prototype.toJSON; String.prototype.toPrunedJSON = String.prototype.toJSON; var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, meta = { // table of character substitutions '\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\' }; function quote(string) { escapable.lastIndex = 0; return escapable.test(string) ? '"' + string.replace(escapable, function (a) { var c = meta[a]; return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); }) + '"' : '"' + string + '"'; } function str(key, holder, depthDecr, arrayMaxLength) { var i, // The loop counter. k, // The member key. v, // The member value. length, partial, value = holder[key]; if (value && typeof value === 'object' && typeof value.toPrunedJSON === 'function') { value = value.toPrunedJSON(key); } switch (typeof value) { case 'string': return quote(value); case 'number': return isFinite(value) ? String(value) : 'null'; case 'boolean': case 'null': return String(value); case 'object': if (!value) { return 'null'; } if (depthDecr<=0 || seen.indexOf(value)!==-1) { return '"-pruned-"'; } seen.push(value); partial = []; if (Object.prototype.toString.apply(value) === '[object Array]') { length = Math.min(value.length, arrayMaxLength); for (i = 0; i < length; i += 1) { partial[i] = str(i, value, depthDecr-1, arrayMaxLength) || 'null'; } v = partial.length === 0 ? '[]' : '[' + partial.join(',') + ']'; return v; } for (k in value) { if (Object.prototype.hasOwnProperty.call(value, k)) { try { v = str(k, value, depthDecr-1, arrayMaxLength); if (v) partial.push(quote(k) + ':' + v); } catch (e) { // this try/catch due to some "Accessing selectionEnd on an input element that cannot have a selection." on Chrome } } } v = partial.length === 0 ? '{}' : '{' + partial.join(',') + '}'; return v; } } JSON.pruned = function (value, depthDecr, arrayMaxLength) { seen = []; depthDecr = depthDecr || DEFAULT_MAX_DEPTH; arrayMaxLength = arrayMaxLength || DEFAULT_ARRAY_MAX_LENGTH; return str('', {'': value}, depthDecr, arrayMaxLength); }; }()); function eaOnsiteTrck() { var _this = this; this.session_id = '5ba5d6d5187996019b4d1597'; this.touchpoint_url = '//tracking.bdi-services.de/trck/etp/?campaign_id=144&t=onsite&trackid=SESSION_ID'; this.campaign_id = '144'; this.init = function () { _this.data = { 'document.title': document.title, 'document.referer': document.referrer, 'navigator': { 'appCodeName': navigator.appCodeName, 'appName': navigator.appName, 'appVersion': navigator.appVersion, 'cookieEnabled': navigator.cookieEnabled, 'language': navigator.language, 'platform': navigator.platform, 'product': navigator.product, 'productSub': navigator.productSub, 'userAgent': navigator.userAgent, 'vendor': navigator.vendor, 'vendorSub': navigator.vendorSub }, 'window': { 'screen': window.screen }, 'times': {'starttime': Date.parse(new Date())} }; if (typeof(sessionStorage) !== 'undefined' && sessionStorage.s_eamSessionId && sessionStorage.s_eamSessionId.length == 24) { this.session_id = sessionStorage.s_eamSessionId; } else if (typeof localStorage !== 'undefined' && localStorage.getItem('ls_eamSessionId') && localStorage.getItem('ls_eamSessionId').length == 24) { this.session_id = localStorage.getItem('ls_eamSessionId'); } if (typeof sessionStorage !== 'undefined') { sessionStorage.s_eamSessionId = this.session_id; } if (typeof localStorage !== 'undefined') { localStorage.setItem('ls_eamSessionId', this.session_id); } }; this.serialize = function (obj, prefix) { var str = []; for (var p in obj) { if (obj.hasOwnProperty(p)) { var k = prefix ? prefix + "[" + p + "]" : p, v = obj[p]; str.push(typeof v == "object" ? this.serialize(v, k) : encodeURIComponent(k) + "=" + encodeURIComponent(v)); } } return str.join("&"); }; this.postJSON = function (path, data, success, error) { if (window.jQuery) { window.jQuery.post(path, {'data': JSON.pruned(data)}, success); } else { var xhr = new XMLHttpRequest(); xhr.open("POST", path, true); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.onreadystatechange = function () { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { if (success) success(JSON.parse(xhr.responseText)); } else { if (error) error(xhr); } } }; xhr.send(encodeURI('data=' + JSON.pruned(data))); } }; this.getJSON = function (path, data, success, error) { var xhr = new XMLHttpRequest(); path = path + '?' + this.serialize(data); xhr.onreadystatechange = function () { if (xhr.readyState === XMLHttpRequest.DONE) { if (xhr.status === 200) { if (success) success(JSON.parse(xhr.responseText)); } else { if (error) error(xhr); } } }; xhr.open("GET", path, true); xhr.send(); }; this.run = function () { this.touchpoint_url = this.touchpoint_url.replace('SESSION_ID', this.session_id); this.postJSON(this.touchpoint_url, {'type': 'entry', 'data': _this.data}); }; } var eaOnsiteTrckDocumentReady = (function () { var readyList, DOMContentLoaded, class2type = {}; class2type["[object Boolean]"] = "boolean"; class2type["[object Number]"] = "number"; class2type["[object String]"] = "string"; class2type["[object Function]"] = "function"; class2type["[object Array]"] = "array"; class2type["[object Date]"] = "date"; class2type["[object RegExp]"] = "regexp"; class2type["[object Object]"] = "object"; var ReadyObj = { // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function (hold) { if (hold) { ReadyObj.readyWait++; } else { ReadyObj.ready(true); } }, // Handle when the DOM is ready ready: function (wait) { // Either a released hold or an DOMready/load event and not yet ready if ((wait === true && !--ReadyObj.readyWait) || (wait !== true && !ReadyObj.isReady)) { // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if (!document.body) { return setTimeout(ReadyObj.ready, 1); } // Remember that the DOM is ready ReadyObj.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if (wait !== true && --ReadyObj.readyWait > 0) { return; } // If there are functions bound, to execute readyList.resolveWith(document, [ReadyObj]); // Trigger any bound ready events //if ( ReadyObj.fn.trigger ) { // ReadyObj( document ).trigger( "ready" ).unbind( "ready" ); //} } }, bindReady: function () { if (readyList) { return; } readyList = ReadyObj._Deferred(); // Catch cases where $(document).ready() is called after the // browser event has already occurred. if (document.readyState === "complete") { // Handle it asynchronously to allow scripts the opportunity to delay ready return setTimeout(ReadyObj.ready, 1); } // Mozilla, Opera and webkit nightlies currently support this event if (document.addEventListener) { // Use the handy event callback document.addEventListener("DOMContentLoaded", DOMContentLoaded, false); // A fallback to window.onload, that will always work window.addEventListener("load", ReadyObj.ready, false); // If IE event model is used } else if (document.attachEvent) { // ensure firing before onload, // maybe late but safe also for iframes document.attachEvent("onreadystatechange", DOMContentLoaded); // A fallback to window.onload, that will always work window.attachEvent("onload", ReadyObj.ready); // If IE and not a frame // continually check to see if the document is ready var toplevel = false; try { toplevel = window.frameElement == null; } catch (e) { } if (document.documentElement.doScroll && toplevel) { doScrollCheck(); } } }, _Deferred: function () { var // callbacks list callbacks = [], // stored [ context , args ] fired, // to avoid firing when already doing so firing, // flag to know if the deferred has been cancelled cancelled, // the deferred itself deferred = { // done( f1, f2, ...) done: function () { if (!cancelled) { var args = arguments, i, length, elem, type, _fired; if (fired) { _fired = fired; fired = 0; } for (i = 0, length = args.length; i < length; i++) { elem = args[i]; type = ReadyObj.type(elem); if (type === "array") { deferred.done.apply(deferred, elem); } else if (type === "function") { callbacks.push(elem); } } if (_fired) { deferred.resolveWith(_fired[0], _fired[1]); } } return this; }, // resolve with given context and args resolveWith: function (context, args) { if (!cancelled && !fired && !firing) { // make sure args are available (#8421) args = args || []; firing = 1; try { while (callbacks[0]) { callbacks.shift().apply(context, args);//shifts a callback, and applies it to document } } finally { fired = [context, args]; firing = 0; } } return this; }, // resolve with this as context and given arguments resolve: function () { deferred.resolveWith(this, arguments); return this; }, // Has this deferred been resolved? isResolved: function () { return !!( firing || fired ); }, // Cancel cancel: function () { cancelled = 1; callbacks = []; return this; } }; return deferred; }, type: function (obj) { return obj == null ? String(obj) : class2type[Object.prototype.toString.call(obj)] || "object"; } } // The DOM ready check for Internet Explorer function doScrollCheck() { if (ReadyObj.isReady) { return; } try { // If IE is used, use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ document.documentElement.doScroll("left"); } catch (e) { setTimeout(doScrollCheck, 1); return; } // and execute any waiting functions ReadyObj.ready(); } // Cleanup functions for the document ready method if (document.addEventListener) { DOMContentLoaded = function () { document.removeEventListener("DOMContentLoaded", DOMContentLoaded, false); ReadyObj.ready(); }; } else if (document.attachEvent) { DOMContentLoaded = function () { // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if (document.readyState === "complete") { document.detachEvent("onreadystatechange", DOMContentLoaded); ReadyObj.ready(); } }; } function ready(fn) { // Attach the listeners ReadyObj.bindReady(); var type = ReadyObj.type(fn); // Add the callback readyList.done(fn);//readyList is result of _Deferred() } return ready; })(); var eaOnsiteTrck = new eaOnsiteTrck(); eaOnsiteTrckDocumentReady(function () { eaOnsiteTrck.init(); eaOnsiteTrck.run(); }); function runEtmsTags() {document.write(' '); document.write(' '); } runEtmsTags();