/* 2015-02-15 01:01:35 +0100 */ function __isS2MTOSEnabled(){ return true; } function __addS2MEvent(el, ev, fn) { if (el.addEventListener) { el.addEventListener(ev, fn, false); } else if (el.attachEvent) { el.attachEvent('on' + ev, fn); } else { el['on' + ev] = fn; } } function S2MPixel(){ this.dtLoadedAt = new Date(); pixel_instance977 = this; if( __isS2MTOSEnabled() ){ if( this.isMobileSafari() || this.isFirefoxVersionGt30() ){ window.addEventListener(this.isMobileSafariGtVersion7() ? 'pagehide' : 'unload', function(){ pixel_instance977.onUnloadPageEvent(); }) } else { __addS2MEvent( window, "beforeunload", function(){ pixel_instance977.onUnloadPageEvent(); } ); } } } S2MPixel.prototype.getTimeOnSite = function(){ return ( new Date() - this.dtLoadedAt ) / 1000; } S2MPixel.prototype.ctSessionNew = 0; S2MPixel.prototype.ctSessionExists = 1; S2MPixel.prototype.ctSessionExpired = 2; S2MPixel.ctCookiePermissionsFunctionalCookies = 1; S2MPixel.ctCookiePermissionsPersonalInformation = 2; S2MPixel.ctCookiePermissionsAnonymousStatisticTracking = 4; S2MPixel.ctCookiePermissionsPersonalDeal = 8; S2MPixel.ctCookiePermissionsStatisticsForOnSiteTracking = 16; S2MPixel.ctCookiePermissionsPersonalAdvertisements = 32; S2MPixel.ctCookiePermissionsSocialMediaCookies = 64; S2MPixel.ctCookiePermissionsIncognito = 5; S2MPixel.ctCookiePermissionsAllwaysSecure = 29; S2MPixel.ctCookiePermissionsPersonal = 125; S2MPixel.ctPageTypeCart = "cart"; S2MPixel.ctPageTypeProduct = "product"; S2MPixel.ctPageTypeCategory = "category"; S2MPixel.ctPageTypeHome = "home"; S2MPixel.ctPageTypeOrder = "order"; S2MPixel.ctPageTypeStopRetargeting = "stop_retargeting"; S2MPixel.ctCookiePermissionsAll = 0xffff; S2MPixel.prototype.getSecurityKey = function(){ return /*UUID*/"ad34a9ffca10bd6f6b7686c6a740763a"/*UUID*/; }; S2MPixel.prototype.md5 = function (string) { function RotateLeft(lValue, iShiftBits) { return (lValue<>>(32-iShiftBits)); } function AddUnsigned(lX,lY) { var lX4,lY4,lX8,lY8,lResult; lX8 = (lX & 0x80000000); lY8 = (lY & 0x80000000); lX4 = (lX & 0x40000000); lY4 = (lY & 0x40000000); lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF); if (lX4 & lY4) { return (lResult ^ 0x80000000 ^ lX8 ^ lY8); } if (lX4 | lY4) { if (lResult & 0x40000000) { return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); } else { return (lResult ^ 0x40000000 ^ lX8 ^ lY8); } } else { return (lResult ^ lX8 ^ lY8); } } function F(x,y,z) { return (x & y) | ((~x) & z); } function G(x,y,z) { return (x & z) | (y & (~z)); } function H(x,y,z) { return (x ^ y ^ z); } function I(x,y,z) { return (y ^ (x | (~z))); } function FF(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }; function GG(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }; function HH(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }; function II(a,b,c,d,x,s,ac) { a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac)); return AddUnsigned(RotateLeft(a, s), b); }; function ConvertToWordArray(string) { var lWordCount; var lMessageLength = string.length; var lNumberOfWords_temp1=lMessageLength + 8; var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1 % 64))/64; var lNumberOfWords = (lNumberOfWords_temp2+1)*16; var lWordArray=Array(lNumberOfWords-1); var lBytePosition = 0; var lByteCount = 0; while ( lByteCount < lMessageLength ) { lWordCount = (lByteCount-(lByteCount % 4))/4; lBytePosition = (lByteCount % 4)*8; lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount)<>>29; return lWordArray; }; function WordToHex(lValue) { var WordToHexValue="",WordToHexValue_temp="",lByte,lCount; for( lCount = 0;lCount<=3;lCount++ ) { lByte = (lValue>>>(lCount*8)) & 255; WordToHexValue_temp = "0" + lByte.toString(16); WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2); } return WordToHexValue; }; function Utf8Encode(string) { string = string.replace(/\r\n/g,"\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c); } else if((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128); } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); } } return utftext; }; var x=Array(); var k,AA,BB,CC,DD,a,b,c,d; var S11=7, S12=12, S13=17, S14=22; var S21=5, S22=9 , S23=14, S24=20; var S31=4, S32=11, S33=16, S34=23; var S41=6, S42=10, S43=15, S44=21; string = Utf8Encode(string); x = ConvertToWordArray(string); a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476; for (k=0;k 0; } catch(err){ return false; } } S2MPixel.prototype.isFirefoxVersionGt30 = function(){ return navigator.userAgent.match(/Firefox\/3[0-9].[0-9]/) } S2MPixel.prototype.protocolForTOS = function(){ return "https://"; } S2MPixel.prototype.onUnloadPageEvent = function(){ var visit_id = this.readCookie( this.s2mUUIDCookieName(), this.maxLengthValueCookieResolver ); var s2m_optin = this.readCookie( "optin", this.maxLengthValueCookieResolver ); if( !this.isEmpty( visit_id ) ) { var srcPixel = this.protocolForTOS() + this.s2mTrackerHost() + "/v3/update_tos.js?" + this.hashToUrl({ s2m_shop:this.shopId(), time_on_site: this.getTimeOnSite(), cookie_uuid: visit_id, stamp: this.getRandomStamp() }) + "&" + "s2m_optin=" + s2m_optin + "&" this.hashToUrl( this.pixelOptions ) ; if( this.isSafari() ){ this.putImage( srcPixel ); } else{ this.putScript( srcPixel ); } this.pauseComputation( 300 ); } } S2MPixel.prototype.pauseComputation = function( millis ){ var date = new Date(); var curDate = null; do{ curDate = new Date(); }while( curDate - date < millis ); } S2MPixel.prototype.shopId = function(){ return 977; } S2MPixel.prototype.documentLocationProtocol = function(){ return document.location.protocol; } S2MPixel.prototype.hostLocationProtocol = function(){ return ( "https:" == this.documentLocationProtocol() ? "https://" : "http://" ); } S2MPixel.prototype.isEmpty = function( value ){ return value == undefined || value == null || ( typeof( value ) === 'string' && value == "" ); } S2MPixel.prototype.s2mTrackerHost = function(){ var demoS2MHost = "demo.shop2market.com"; if( this.isHostMatch( this.documentLocation(), this.testHosts() ) ){ return demoS2MHost; } else{ return "track.shop2market.com"; } } S2MPixel.prototype.get = function(){ return "track.shop2market.com"; } S2MPixel.prototype.documentLocationUrl = function(){ return document.location.href.toString(); } S2MPixel.prototype.documentLocationHost = function(){ return document.location.host.toString(); } S2MPixel.prototype.documentLocation = function(){ var rStrValue = this.documentLocationUrl(); if( !this.isEmpty( window.s2m_location ) ){ rStrValue += ( rStrValue.indexOf("?") == -1 ? "?" : "&" ) + window.s2m_location; } if( !this.isEmpty( window.s2m_add_to_location ) ){ rStrValue += ( rStrValue.indexOf("?") == -1 ? "?" : "&" ) + window.s2m_add_to_location; } return rStrValue; } S2MPixel.prototype.shopName = function(){ return "Azerty - NL"; } S2MPixel.prototype.cookiesAcceptancePolicy = function(){ return 0; } S2MPixel.prototype.isActivateCookiePermissions = function(){ return false; } S2MPixel.prototype.userCookieExpirationTime = function(){ return 5256000; /*10 years in minutes*/ } S2MPixel.prototype.cookieDomain = function(){ return ""; } S2MPixel.prototype.generateUUID = function( size ){ var symbols = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9"]; var str = ""; for( var i = 0; i < size ; i++ ){ str += symbols[ parseInt(Math.random() * (symbols.length)) ]; } return str; } S2MPixel.prototype.restrictedHosts = function(){ return [/^(.*)$/]; } S2MPixel.prototype.orderPagesUrls = function(){ return []; } S2MPixel.prototype.excludeFromCookiesCheckPages = function(){ return []; } S2MPixel.prototype.testHosts = function(){ return []; } S2MPixel.prototype.sessionIdCookieName = function(){ return "__s2m_sid_" + this.shopId(); } S2MPixel.prototype.cartCookieName = function(){ return "__s2m_order_page_sid_" + this.shopId(); } S2MPixel.prototype.sessionTimeIdCookieName = function(){ return "__s2m_stid_" + this.shopId(); } S2MPixel.prototype.sessionPIdCookieName = function(){ return "__s2m_pid_" + this.shopId(); } S2MPixel.prototype.s2mUUIDCookieName = function(){ return "__s2m_vals_" + this.shopId(); } S2MPixel.prototype.checkIfOrderPage = function(){ if( this.isHostMatch( this.documentLocation(), this.orderPagesUrls() ) ){ this.createCookieWithSecurityCheck( this.cartCookieName(), ( parseInt( (new Date).getTime() / 1000 ) ).toString() ); } } S2MPixel.prototype.documentReferrer = function(){ var rStrValue = document.referrer.toString(); if( !this.isEmpty( window.s2m_referrer ) ){ rStrValue += "&" + window.s2m_referrer; } return rStrValue; } S2MPixel.prototype.putScript = function( link, name ){ name = ( name == undefined ) ? "s2m_pixel" : name; var s2mPixel = document.createElement("script"); s2mPixel.name = name; s2mPixel.src = link; s2mPixel.async = true; s2mPixel.type = 'text/javascript'; try{ var pageBody = document.getElementsByTagName('body')[ 0 ]; var bodyTags = pageBody.children; pageBody.insertBefore( s2mPixel, bodyTags[ bodyTags.length - 1 ] ); } catch(err){} } S2MPixel.prototype.putImage = function( link, name ){ name = ( name == undefined ) ? "s2m_pixel" : name; var s2mPixel = new Image(); s2mPixel.src = link; s2mPixel.name = name; s2mPixel.border = 0; s2mPixel.width = 1; s2mPixel.height = 1; s2mPixel.setAttribute('style', 'border:0px;display:none;'); try{ var pageBody = document.getElementsByTagName('body')[ 0 ]; var bodyTags = pageBody.children; // pageBody.insertBefore( s2mPixel, bodyTags[ bodyTags.length - 1 ] ); } catch(err){} } S2MPixel.prototype.putPixel = function( link, name ){ var s2mPixel = document.createElement('iframe'); s2mPixel.src = link; s2mPixel.name = name; s2mPixel.setAttribute('width', '0px'); s2mPixel.setAttribute('height', '0px'); s2mPixel.setAttribute('style', 'border:0px;display:block;'); s2mPixel.setAttribute('frameborder', '0px'); s2mPixel.setAttribute('marginwidth', '0px'); s2mPixel.setAttribute('marginheight', '0px'); s2mPixel.setAttribute('vspace', '0px'); s2mPixel.setAttribute('hspace', '0px'); s2mPixel.setAttribute('allowtransparency',"true"); s2mPixel.setAttribute('scrolling',"no"); try{ var pageBody = document.getElementsByTagName('body')[ 0 ]; var bodyTags = pageBody.children; pageBody.insertBefore( s2mPixel, bodyTags[ bodyTags.length - 1 ] ); } catch(err){} } S2MPixel.prototype.normalizeDomain = function( strDomain ){ try{ return ( /(?:(?:www\.)*([^:]*)(?:\:\d+)?)/.exec( strDomain )[1] ); } catch(e){ return strDomain; } } S2MPixel.prototype.backupReferrerHost = function(){ var fake_anchor = document.createElement("A"); fake_anchor.href = this.documentReferrer(); return this.isEmpty( this.documentReferrer() ) ? "" : fake_anchor.hostname; } S2MPixel.prototype.locationHost = function(){ var fake_anchor = document.createElement("A"); fake_anchor.href = this.documentLocation(); return fake_anchor.hostname; } S2MPixel.prototype.parseUrlParams = function( urlsArray, paramsArray, defaultValue ){ var strFetchedValue = ""; for( var urlNo = 0; urlNo < urlsArray.length; urlNo++ ){ for( var nParamNo = 0; nParamNo < paramsArray.length; nParamNo++ ){ var strParamName = paramsArray[ nParamNo ]; if( this.isEmpty( strFetchedValue ) && !this.isEmpty( strParamName ) ){ try{ var query = ( new RegExp( /[^?]*\??([^#]*)/ ) ).exec( urlsArray[ urlNo ] )[ 1 ], urlParams = {}, match, pl = /\+/g, search = /([^&=]+)=?([^&]*)/g, decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); }; while( match = search.exec( query ) ){ urlParams[ decode( match[ 1 ]).toLowerCase() ] = decode( match[ 2 ] ); } strFetchedValue = urlParams[ strParamName.toLowerCase() ]; if( this.isEmpty(strFetchedValue) ){ var query = ( new RegExp( /[^#]*\#?[^?]*\??(.*)/ ) ).exec( urlsArray[ urlNo ] )[ 1 ], urlParams = {}, match, pl = /\+/g, search = /([^&=]+)=?([^&]*)/g, decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); }; while( match = search.exec( query ) ){ urlParams[ decode( match[ 1 ]).toLowerCase() ] = decode( match[ 2 ] ); } strFetchedValue = urlParams[ strParamName.toLowerCase() ]; } if( this.isEmpty(strFetchedValue) ){ var query = ( new RegExp( /[^#]*\#?(.*)/ ) ).exec( urlsArray[ urlNo ] )[ 1 ], urlParams = {}, match, pl = /\+/g, search = /([^&=]+)=?([^&]*)/g, decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); }; while( match = search.exec( query ) ){ urlParams[ decode( match[ 1 ]).toLowerCase() ] = decode( match[ 2 ] ); } strFetchedValue = urlParams[ strParamName.toLowerCase() ]; } } catch(err){} } } } return this.isEmpty( strFetchedValue ) ? defaultValue : strFetchedValue; } S2MPixel.prototype.parseLocationUrlParams = function( paramsArray, defaultValue ){ return this.parseUrlParams( [ this.documentLocation() ], paramsArray, defaultValue ); } S2MPixel.prototype.parseReferrerUrlParams = function( paramsArray, defaultValue ){ return this.parseUrlParams( [ this.documentReferrer() ], paramsArray, defaultValue ); } S2MPixel.prototype.parseBothUrlParams = function( paramsArray, defaultValue ){ return this.parseUrlParams( [ this.documentLocation(), this.documentReferrer() ], paramsArray, defaultValue ); } if (typeof JSON !== 'object') { JSON = {}; } JSON.stringify = JSON.stringify || function (obj) { var t = typeof (obj); if (t != "object" || obj === null) { if (t == "string") obj = '"'+obj+'"'; return String(obj); } else { var n, v, json = [], arr = (obj && obj.constructor == Array); for (n in obj) { v = obj[n]; t = typeof(v); if (t == "string") v = '"'+v+'"'; else if (t == "object" && v !== null) v = JSON.stringify(v); json.push((arr ? "" : '"' + n + '":') + String(v)); } return (arr ? "[" : "{") + String(json) + (arr ? "]" : "}"); } }; JSON.parse = JSON.parse || function (str) { if (str === "") str = '""'; eval("var p=" + str + ";"); return p; }; S2MPixel.prototype.getletter = function(num) { if (num < 10) { return num; } else { if (num == 10) { return "A" } if (num == 11) { return "B" } if (num == 12) { return "C" } if (num == 13) { return "D" } if (num == 14) { return "E" } if (num == 15) { return "F" } } } S2MPixel.prototype.hexfromdec = function(num) { if (num > 65535) {return ("error")} else { first = Math.round(num/4096 - .5); temp1 = num - first * 4096; second = Math.round(temp1/256 -.5); temp2 = temp1 - second * 256; third = Math.round(temp2/16 - .5); fourth = temp2 - third * 16; return (""+this.getletter(third)+this.getletter(fourth)); }} S2MPixel.prototype.encrypt = function( str ){ var hex=""; var i; for (i=0; i < str.length; i++){ hex = hex + "%" + this.hexfromdec( str.charCodeAt( i ) ); } return hex; } S2MPixel.prototype.hashToUrl = function( hashOptions ){ var params = []; for( var key in hashOptions ){ if( typeof( hashOptions[ key ] ) === "object" ){ var _array_tojson; if( window.Prototype && typeof Array.prototype.toJSON === "function" ) { _array_tojson = Array.prototype.toJSON; delete Array.prototype.toJSON; } hashOptions[ key ] = this.encrypt( JSON.stringify( hashOptions[ key ] ) ); if( window.Prototype && typeof _array_tojson === "function" ) { Array.prototype.toJSON = _array_tojson; } } params.push( key + "=" + encodeURIComponent( hashOptions[ key ] ) ); } return params.join("&"); } S2MPixel.prototype.getChannelIdFromByReferrers = function(){ var hashRefsAndChannels = this.getS2MReferrersHosts(); var rValue = "" if( this.backupReferrerHost() != this.documentLocationHost() ){ for( var refHostChannel in hashRefsAndChannels ){ var host_regexp = new RegExp( hashRefsAndChannels[ refHostChannel ], "i" ); if( this.documentLocation().match( host_regexp ) != null || this.documentReferrer().match( host_regexp ) != null ) { rValue = refHostChannel; } } } return rValue; } S2MPixel.prototype.getS2MReferrersHosts = function(){ return {}; } S2MPixel.prototype.externalClickReferrers = function(){ return {"70":"gclid","110":"gclid","319":"gclid","34":"trackingData","544":"gclid","210":"gclid","8":"s2m_exclickid"}; } S2MPixel.prototype.affiliateIdsReferrers = function(){ return {"34":"affiliateID","8":"cookie_shot"};; } S2MPixel.prototype.isShopHasExtPixels = function(){ return true; } S2MPixel.prototype.directTrafficChannelId = function(){ return 410; } S2MPixel.prototype.organicSearchTrafficChannelId = function(){ return 409; } S2MPixel.prototype.organicSearchTrafficBingChannelId = function(){ return 714; } S2MPixel.prototype.organicSearchTrafficYahooChannelId = function(){ return 715; } S2MPixel.prototype.organicSearchTrafficGoogleChannelId = function(){ return 713; } S2MPixel.prototype.otherTrafficChannelId = function(){ return 411; } S2MPixel.prototype.channelId = function(){ return this.pixelOptions["s2m_channel"]; } S2MPixel.prototype.externalClickIdValue = function(){ var strClickId = this.parseLocationUrlParams( [ "s2m_exclickid" ], "" ); if( this.isEmpty( strClickId ) && !this.isEmpty( this.channelId() ) && !this.isEmpty( this.externalClickReferrers()[ this.channelId() ] ) ){ strClickId = this.parseBothUrlParams( [ this.externalClickReferrers()[ this.channelId() ] ], "" ); } return strClickId; } S2MPixel.prototype.affiliateIdValue = function(){ var strAffiliateId = ""; strAffiliateId = this.parseLocationUrlParams( [ "s2m_exaffid" ], "" ); if( this.isEmpty( strAffiliateId ) && !this.isEmpty( this.channelId() ) && !this.isEmpty( this.affiliateIdsReferrers()[ this.channelId() ] ) ){ strAffiliateId = this.parseBothUrlParams( [ this.affiliateIdsReferrers()[ this.channelId() ] ], "" ); } return strAffiliateId; } S2MPixel.prototype.isHostMatch = function( host, hosts ){ for( var __n = 0 ; __n < hosts.length ; ++__n ){ if( host.match( hosts[__n] ) ){ return true; } } return false; } S2MPixel.prototype.firstValueCookieResolver = function( arrValues ){ if( values != null && values != undefined && values instanceof Array ){ return values[ 0 ] || ""; } else{ return values; } } S2MPixel.prototype.maxLengthValueCookieResolver = function( arrValues ){ if( values != null && values != undefined && values instanceof Array ){ var maxLengthValue = ""; for (var i = 0; i < values.length; i++) { if( maxLengthValue.length < values[ i ].length ){ maxLengthValue = values[ i ]; } } return maxLengthValue; } else{ return values; } } S2MPixel.prototype.readCookie = function( strCookieName, multiValuesResolver ){ multiValuesResolver = multiValuesResolver == undefined ? this.firstValueCookieResolver : multiValuesResolver; values = [] if( document.cookie.length > 0 ) { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var crumbs = cookies[i].split('='); var name = unescape(crumbs[0]).replace(/^\s+|\s+$/g, ''); // trim any whitespace var value = unescape(crumbs[1]).replace(/^\s+|\s+$/g, ''); // trim any whitespace if( strCookieName == name ) { values.push( value ); } } } return multiValuesResolver( values ); } S2MPixel.prototype.removeCookie = function( strCookieName ){ this.removeCookieWithDomain( strCookieName, this.cookieDomain() ); } S2MPixel.prototype.removeCookieWithDomain = function( strCookieName, domain ){ document.cookie = strCookieName + "=;expires=Fri, 02-Jan-1970 00:00:00 GMT; path=/" + ( this.isEmpty( domain ) ? "" : "; domain=" + domain ); } S2MPixel.prototype.createCookieWithSecurityCheck = function( strCookieName, strValue, nExpiredMinutes ){ // NOTE: #issue 15286 // var cookiesOptin = this.readCookie( "optin" ); // if( !this.isActivateCookiePermissions() || ( this.CheckCookiesPermissions( S2MPixel.ctCookiePermissionsPersonal ) || this.CheckCookiesPermissions( S2MPixel.ctCookiePermissionsAllwaysSecure ) || this.isEmpty( cookiesOptin ) ) ){ this.createCookie( strCookieName, strValue, nExpiredMinutes ); // } } S2MPixel.prototype.createCookie = function( strCookieName, strValue, nExpiredMinutes ){ var exdate = new Date(); exdate.setMinutes( exdate.getMinutes() + nExpiredMinutes ); document.cookie = strCookieName + "=" + escape( strValue ) + ( ( nExpiredMinutes == null ) ? "" : ";expires=" + exdate.toGMTString( ) ) + "; path=/" + ( this.isEmpty( this.cookieDomain() ) ? "" : "; domain=" + this.cookieDomain() ); } S2MPixel.prototype.isAllowedHost = function(){ return this.isHostMatch( this.locationHost(), this.restrictedHosts() ); } S2MPixel.prototype.isCartCookiesSet = function(){ var strCartCookieTimeStamp = this.readCookie( this.cartCookieName() ); var bIsSet = false; if( !this.isEmpty( strCartCookieTimeStamp ) && parseInt( strCartCookieTimeStamp ) > 0 ){ if( ( parseInt( (new Date).getTime() / 1000 ) ) - parseInt( strCartCookieTimeStamp ) >= 1800 ){ this.removeCookie( this.cartCookieName() ); } else { bIsSet = true; } } return bIsSet; } S2MPixel.prototype.visitDisabledStatus = function(){ var vDisabled = 0 if( !this.isAllowedHost() ){ vDisabled = 1;; } if( this.isCartCookiesSet() ){ vDisabled = 3; }else{ if( window.top != window ){ vDisabled = 7; } } return vDisabled; } S2MPixel.prototype.areThereOrganicChannels = function(){ return this.organicSearchTrafficChannelId() != 0 || this.organicSearchTrafficBingChannelId() != 0 || this.organicSearchTrafficYahooChannelId() != 0 || this.organicSearchTrafficGoogleChannelId() != 0; } S2MPixel.prototype.collectSpecialChannel = function(){ var strChannelId = '', strSeachQ = '', strAffiliateId = '', strSearchPattern = this.parseReferrerUrlParams( [ 'p', 'q' ], '' ); if( this.directTrafficChannelId() != 0 && ( this.isEmpty( this.documentReferrer() ) || ( !this.isEmpty( this.cookieDomain() ) && this.backupReferrerHost().match( this.cookieDomain() ) != null ) ) ){ strChannelId = this.directTrafficChannelId().toString(); } else{ var strGcid = this.parseBothUrlParams( [ 'gcid' ], '' ); if( this.areThereOrganicChannels() && !this.isEmpty( this.documentReferrer() ) && this.isEmpty( strGcid ) ) { if( this.backupReferrerHost().match( /google/i ) !== null ){ if( this.organicSearchTrafficGoogleChannelId() !== 0 ){ strChannelId = this.organicSearchTrafficGoogleChannelId().toString(); strSeachQ = strSearchPattern; } else{ strChannelId = this.organicSearchTrafficChannelId().toString(); strSeachQ = strSearchPattern; } }else{ if( this.backupReferrerHost().match( /yahoo\.com/i ) !== null ){ if( this.organicSearchTrafficYahooChannelId() !== 0 ){ strChannelId = this.organicSearchTrafficYahooChannelId().toString(); strSeachQ = strSearchPattern; } else{ strChannelId = this.organicSearchTrafficChannelId().toString(); strSeachQ = strSearchPattern; } } else{ if( this.backupReferrerHost().match( /bing\.com/i ) !== null ){ if( this.organicSearchTrafficBingChannelId() != 0 ){ strChannelId = this.organicSearchTrafficBingChannelId().toString(); strSeachQ = strSearchPattern; } else{ strChannelId = this.organicSearchTrafficChannelId().toString(); strSeachQ = strSearchPattern; } }else{ if( this.locationHost() != this.backupReferrerHost() && !this.isEmpty( strSearchPattern ) ){ strChannelId = this.organicSearchTrafficChannelId().toString(); strSeachQ = strSearchPattern; } } } } strSeachQ = this.stripStr( strSeachQ ); if( !this.isEmpty( strChannelId ) && !this.isEmpty( this.shopName() ) ){ if( !this.isEmpty( strSeachQ ) ) { var shopNameAjusted = /^(?:\d+[^\s]*\s)?(?:\s*)?([^.\s]*)(?:.*)$/.exec( this.shopName() )[1]; var rSearchRegexp = new RegExp( strSeachQ, "i" ); var rShopRegexp = new RegExp( shopNameAjusted, "i" ); if( rShopRegexp.exec( strSeachQ ) ){ strAffiliateId = "Branded"; } else{ strAffiliateId = "Non-Branded"; } } else{ strAffiliateId = "-1"; } } } if( this.isEmpty( strChannelId ) && this.otherTrafficChannelId() != 0 && !this.isEmpty( this.documentReferrer() ) && this.locationHost() != this.backupReferrerHost() && ( this.isEmpty( this.cookieDomain() ) || this.backupReferrerHost().match( this.cookieDomain() ) == null ) ){ strChannelId = this.otherTrafficChannelId().toString(); } } return { "s2m_channel":strChannelId, "s2m_search_q":strSeachQ, "s2m_affiliate_id":strAffiliateId }; } S2MPixel.prototype.stripStr = function( strValue ){ return String( strValue ).replace(/^\s+|\s+$/g, ''); } S2MPixel.prototype.getRandomStamp = function(){ return Math.random(); } S2MPixel.prototype.getSessionUUID = function(){ return this.generateUUID( 32 ); } S2MPixel.prototype.getSessionTID = function(){ return (new Date).getTime(); } S2MPixel.prototype.isSpecialChannel = function(){ return ( this.directTrafficChannelId() != 0 && this.directTrafficChannelId() == this.channelId() || this.otherTrafficChannelId() != 0 && this.otherTrafficChannelId() == this.channelId() ); } S2MPixel.prototype.getParamsPairsDocumentLocation = function(){ var strResult = ""; try{ strResult = /(?:[^?]*)\?(.*)/.exec( this.documentLocationUrl() )[1].split("&").sort().join("&"); } catch(err){} return strResult; } S2MPixel.prototype.getSessionInfo = function(){ var sessionInfo = {}; sessionInfo["s2m_session_id"] = this.readCookie(this.sessionIdCookieName()); sessionInfo["is_click"] = true; sessionInfo["disabled"] = 0; var oldSessionParamsHash = this.readCookie(this.sessionPIdCookieName()); var strParamsPairsFromLink = this.getParamsPairsDocumentLocation(); var newSessionParamsHash = this.md5( strParamsPairsFromLink ) var oldSessionTID = parseInt( this.readCookie(this.sessionTimeIdCookieName()) ); var newSessionTID = this.getSessionTID(); if( this.isEmpty( sessionInfo["s2m_session_id"] ) || ( !this.isSpecialChannel() && oldSessionParamsHash != newSessionParamsHash ) ){ sessionInfo["s2m_session_id"] = this.getSessionUUID(); sessionInfo["s2m_session_status"] = this.ctSessionNew; this.createCookieWithSecurityCheck(this.sessionIdCookieName(), sessionInfo["s2m_session_id"] ); this.createCookieWithSecurityCheck(this.sessionTimeIdCookieName(), this.getSessionTID() ); this.createCookieWithSecurityCheck(this.sessionPIdCookieName(), newSessionParamsHash ); } else{ if( newSessionTID - oldSessionTID >= 1800000 /* 30.minutes */ ){ sessionInfo["s2m_session_id"] = this.getSessionUUID(); sessionInfo["s2m_session_status"] = this.ctSessionExpired; this.createCookieWithSecurityCheck(this.sessionIdCookieName(), sessionInfo["s2m_session_id"] ); this.createCookieWithSecurityCheck(this.sessionTimeIdCookieName(), newSessionTID ); this.createCookieWithSecurityCheck(this.sessionPIdCookieName(), newSessionParamsHash ); } else{ sessionInfo["s2m_session_status"] = this.ctSessionExists; this.createCookieWithSecurityCheck(this.sessionTimeIdCookieName(), newSessionTID ); sessionInfo["is_click"] = !this.isSpecialChannel(); sessionInfo["disabled"] = 1; } } return sessionInfo; } S2MPixel.prototype.isOptinSettingsPlaced = function(){ var optinValue = this.readCookie( "optin" ); return optinValue && optinValue != 0; } S2MPixel.prototype.getShopName = function(){ return "Azerty - NL"; } S2MPixel.prototype.renderOptinWindow = function(){ var pageHead = document.getElementsByTagName("head")[0]; var pageBody = document.getElementsByTagName("body")[0]; if( pageHead && pageBody ){ var firstChild = pageBody.firstChild; pageBody.insertBefore( this.getS2MCookieOptinDivDialogHTML(), firstChild ); } } S2MPixel.prototype.renderOptinWindowStyles = function(){ var pageHead = document.getElementsByTagName("head")[0]; if( pageHead ){ pageHead.appendChild( this.getS2MCookieOptinDivDialogCSS() ); } } S2MPixel.prototype.skipCookiesWindows = function(){ return this.isHostMatch( this.documentLocation(), this.excludeFromCookiesCheckPages() ); } S2MPixel.prototype.shopOldCookiesDomains = function(){ return []; } S2MPixel.prototype.isShopHasOldCookiesDomains = function(){ return this.shopOldCookiesDomains().length > 0; } S2MPixel.prototype.wipeOldCookies = function(){ var oldCookiesDomains = this.shopOldCookiesDomains(); for (var nIter = 0; nIter <= oldCookiesDomains.length; nIter++ ){ if( !this.isEmpty( oldCookiesDomains[ nIter ] ) ){ if( oldCookiesDomains[ nIter ] != this.cookieDomain() ){ this.removeCookieWithDomain( this.sessionTimeIdCookieName(), oldCookiesDomains[ nIter ] ); this.removeCookieWithDomain( this.sessionPIdCookieName(), oldCookiesDomains[ nIter ] ); this.removeCookieWithDomain( this.cartCookieName(), oldCookiesDomains[ nIter ] ); this.removeCookieWithDomain( this.s2mUUIDCookieName(), oldCookiesDomains[ nIter ] ); this.removeCookieWithDomain( this.sessionIdCookieName(), oldCookiesDomains[ nIter ] ); this.removeCookieWithDomain( "optin", oldCookiesDomains[ nIter ] ); if( oldCookiesDomains[ nIter ] == this.documentLocationHost() ){ this.removeCookieWithDomain( this.sessionTimeIdCookieName(), "" ); this.removeCookieWithDomain( this.sessionPIdCookieName(), "" ); this.removeCookieWithDomain( this.cartCookieName(), "" ); this.removeCookieWithDomain( this.s2mUUIDCookieName(), "" ); this.removeCookieWithDomain( this.sessionIdCookieName(), "" ); this.removeCookieWithDomain( "optin", "" ); } } } }; } S2MPixel.prototype.pickUpShopCode = function(){ var strShopCode = ""; strShopCode = this.isEmpty( window.s2m_shop_code ) ? "" : window.s2m_shop_code; if( typeof( s2m_configuration ) !== "undefined" && s2m_configuration != null && typeof( s2m_configuration.s2m_product_id ) !== "undefined" ){ strShopCode = s2m_configuration.s2m_product_id; } return strShopCode; } S2MPixel.prototype.getReferrer = function(){ return document.referrer; } S2MPixel.prototype.render = function(){ if( this.isShopHasOldCookiesDomains() ){ this.wipeOldCookies(); } if( this.isActivateCookiePermissions() ){ this.renderOptinWindowStyles(); } if( this.isActivateCookiePermissions() && !this.skipCookiesWindows() && !this.isOptinSettingsPlaced() ) { switch( this.cookiesAcceptancePolicy() ){ case 2: case 0:{ this.renderOptinWindow(); break; } case 1:{ this.createCookie( "optin", S2MPixel.ctCookiePermissionsPersonal ); break; } } } var optinValue = this.isActivateCookiePermissions() ? this.readCookie( "optin" ) : 0 ; this.pixelOptions = {}; this.checkIfOrderPage(); this.pixelOptions["s2m_optin"] = optinValue; this.pixelOptions["s2m_shop"] = 977; this.pixelOptions["s2m_channel"] = this.parseLocationUrlParams( [ "channel_code", "s2m_channel" ], "" ); if( !this.isEmpty( this.parseLocationUrlParams( [ "channel_code" ], "" ) ) && !this.isEmpty( this.parseLocationUrlParams( [ "product_code" ], "" ) ) ){ this.pixelOptions["s2m_type"] = 1; } else{ this.pixelOptions["s2m_type"] = this.parseLocationUrlParams( [ "s2m_type" ], 3 ); } if( this.isEmpty( this.pixelOptions["s2m_channel"] ) ){ this.pixelOptions["s2m_channel"] = this.getChannelIdFromByReferrers(); } if( this.isEmpty( this.pixelOptions["s2m_channel"] ) ){ var hSpecialChannelsResults = this.collectSpecialChannel(); this.pixelOptions["s2m_channel"] = hSpecialChannelsResults["s2m_channel"]; this.pixelOptions["s2m_search_q"] = hSpecialChannelsResults["s2m_search_q"]; if( !this.isEmpty( hSpecialChannelsResults["s2m_affiliate_id"] ) ){ this.pixelOptions["s2m_affiliate_id"] = hSpecialChannelsResults["s2m_affiliate_id"]; } } else{ this.pixelOptions["s2m_search_q"] = ""; } this.pixelOptions["s2m_campaign"] = this.parseLocationUrlParams( [ "s2m_campaign" ], "Untagged" ); this.pixelOptions["s2m_promotion_id"] = this.parseLocationUrlParams( [ "s2m_promotion_id", "product_code" ], "" ); this.pixelOptions["disabled"] = this.visitDisabledStatus(); this.pixelOptions["s2m_medium"] = this.parseLocationUrlParams( [ "s2m_medium" ], this.backupReferrerHost() ); var s2m_product_id = this.parseLocationUrlParams( [ "s2m_product_id" ], "" ); if( !this.isEmpty( s2m_product_id ) ){ this.pixelOptions["s2m_product_id"] = s2m_product_id; } if( this.isEmpty( this.pixelOptions["s2m_affiliate_id"] ) ){ this.pixelOptions["s2m_affiliate_id"] = this.affiliateIdValue(); } this.pixelOptions["s2m_external_click_id"] = this.externalClickIdValue(); this.pixelOptions["s2m_shop_code"] = this.pickUpShopCode(); if( !this.isEmpty( this.pixelOptions["s2m_shop_code"] ) || !this.isEmpty(this.pixelOptions["s2m_product_id"]) ) { this.pixelOptions["s2m_type"] = 1; } this.pixelOptions["s2m_indirect"] = this.parseBothUrlParams( [ "s2m_indirect" ], "" ); this.pixelOptions["s2m_page_url"] = this.documentLocationUrl(); this.pixelOptions["s2m_full_location"] = this.documentLocation(); this.pixelOptions["stamp"] = this.getRandomStamp(); this.pixelOptions["s2m_key"] = this.getSecurityKey(); if( this.isEmpty( this.pixelOptions["s2m_indirect"] ) && !this.isEmpty( this.pixelOptions["s2m_channel"] ) ){ this.pixelOptions["cookie_uuid"] = this.readCookie("__s2m_vals_" + this.pixelOptions["s2m_shop"], this.maxLengthValueCookieResolver ); this.pixelOptions["s2m_session_id"] = this.readCookie(this.sessionIdCookieName() ); var sessionInfo = this.getSessionInfo(); this.pixelOptions["s2m_session_id"] = sessionInfo["s2m_session_id"]; this.pixelOptions["s2m_session_status"] = sessionInfo["s2m_session_status"]; this.pixelOptions["disabled"] = this.pixelOptions["disabled"] == 0 ? sessionInfo["disabled"] : this.pixelOptions["disabled"]; if( this.isEmpty( this.pixelOptions["cookie_uuid"] ) || sessionInfo["is_click"] && this.pixelOptions["cookie_uuid"].length < 32 ){ this.pixelOptions["cookie_uuid"] = this.generateUUID( 32 ); } this.createCookieWithSecurityCheck( "__s2m_vals_" + this.pixelOptions["s2m_shop"], this.pixelOptions["cookie_uuid"], this.userCookieExpirationTime() ) this.pixelOptions["s2m_referer"] = this.getReferrer(); if( sessionInfo["is_click"] && this.pixelOptions["disabled"] != 1 ){ this.putPixel( this.hostLocationProtocol() + this.s2mTrackerHost() + "/v3/update_visit.html" + "?" + this.hashToUrl( this.pixelOptions ), "shop2market_visit_tracker_pixel" ); } } else{ this.createCookieWithSecurityCheck(this.sessionTimeIdCookieName(), this.getSessionTID() ); } if( this.isRenderVisitsIframe() ) { var s2m_configuration = typeof( window.s2m_configuration ) === "undefined" ? [] : window.s2m_configuration; if( typeof( s2m_configuration.s2m_products ) !== "undefined" && s2m_configuration.s2m_products instanceof Array ){ s2m_configuration.s2m_products = s2m_configuration.s2m_products.slice(0, 5); } var pixelPath = "/v3/visit_iframe.html"; if( !this.isEmpty( s2m_configuration["s2m_page"] ) && ( s2m_configuration["s2m_page"] == S2MPixel.ctPageTypeCart || s2m_configuration["s2m_page"] == S2MPixel.ctPageTypeProduct || s2m_configuration["s2m_page"] == S2MPixel.ctPageTypeCategory || s2m_configuration["s2m_page"] == S2MPixel.ctPageTypeHome ) ){ pixelPath = "/v3/visit_iframe_" + s2m_configuration["s2m_page"] + ".html" } this.putPixel( this.hostLocationProtocol() + this.s2mTrackerHost() + pixelPath + "?" + this.hashToUrl({ s2m_shop: this.pixelOptions["s2m_shop"], s2m_configuration: s2m_configuration, s2m_shop_code_ex: this.pixelOptions["s2m_shop_code_ex"], s2m_page_url_raw: this.documentLocationUrl(), stamp: this.getRandomStamp() }), "shop2market_visit_iframe" ); } } S2MPixel.prototype.reload = function(){ this.render(); } S2MPixel.prototype.isExternalAllowed = function(){ return this.CheckCookiesPermissions( S2MPixel.ctCookiePermissionsPersonal ) || !( this.CheckCookiesPermissions( S2MPixel.ctCookiePermissionsAllwaysSecure ) || this.CheckCookiesPermissions( S2MPixel.ctCookiePermissionsIncognito ) ) && this.cookiesAcceptancePolicy() == 2 } S2MPixel.prototype.isRenderVisitsIframe = function(){ return this.isShopHasExtPixels() && ( !this.isActivateCookiePermissions() || this.isExternalAllowed() ); } S2MPixel.prototype.getS2MCookieOptinDivDialogCSS = function(){ var headCss = document.createElement("style"); var styleText = ".s2mCookiesOptinDialog, .s2mCookiesOptinDialog * { margin:0; padding:0; }\r\n.s2mCookiesOptinDialog { font-size: 11px; font-family: Arial, Helvetica, sans-serif; font-weight: normal; text-align: left; border: 3px solid #ffffff; background-color: #ffffff; }\r\n#s2m_cookies_optin_dialog { position: fixed; right: 20px; bottom: 20px; width: 400px; z-index: 10005; box-shadow: 0px 0px 6px #888; -moz-box-shadow: 0px 0px 6px #888; -webkit-box-shadow: 0px 0px 6px #888; text-align: center; }\r\n#s2m_cookies_optin_settings_dialog { position: fixed; left: 50%; top: 30px; width: 550px; z-index: 10020; margin: 0 0 0 -275px; }\r\n#s2m_cookies_optin_settings_dialog h1 { font-size:14px; padding-top:10px; padding-bottom:10px; }\r\n#s2m_cookies_optin_settings_overlay_dialog { position: fixed; z-index: 10010; top: 0; left: 0; height: 100%; width: 100%; background-color: #000; opacity: 0.75; filter:Alpha(opacity=75); }\r\n#s2m_cookies_optin_dialog_title { font-size: 16px; padding: 6px; background-color: #2B5570; font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: white; }\r\n.s2m_cookies_optin_settings_dialog_more_details { width: 100%; }\r\n.s2m_cookies_optin_settings_dialog_more_details div { float: left; width: 40%; padding: 10px; margin: 10px; }\r\n.s2m_cookies_optin_settings_dialog_more_details ul { padding: 15px; font-size: 12px; }\r\n.s2m_cookies_optin_settings_dialog_more_details_list_only { list-style-image:url('{LocationProtocol}{S2MEndPoingHost}/images/unblock.png'); }\r\n.s2m_cookies_optin_settings_dialog_more_details_list_no { list-style-image:url('{LocationProtocol}{S2MEndPoingHost}/images/block.gif'); }\r\n#s2m_cookies_optin_dialog_main_body { padding: 10px; }\r\n#s2m_cookies_optin_dialog_settings_controls { padding: 10px; padding-left: 160px; }\r\n#s2m_cookies_optin_dialog_main_body p { text-align:left }\r\n.s2m_cookies_optin_dialog_button { display: block; float: left; margin: 5px 8px 10px 40px; width: 140px; height: 25px; line-height: 24px; font-size: 13px; color: #ffffff; text-align: center; cursor: pointer; background: #bbbbbb }\r\n.s2m_cookies_optin_dialog_button_default { color: #ffffff; background: #056839 }\r\n ".split("{LocationProtocol}").join( this.hostLocationProtocol() ).split("{S2MEndPoingHost}").join( this.s2mTrackerHost() ); headCss.type = "text/css"; headCss.styleSheet ? headCss.styleSheet.cssText = styleText : headCss.appendChild( document.createTextNode( styleText ) ); return headCss; } S2MPixel.prototype.hideCookiesOptinDialog = function(){ var dialogS2MCookiesPermissions = document.getElementById("s2m_cookies_optin_dialog"); if( dialogS2MCookiesPermissions ){ dialogS2MCookiesPermissions.style.display = 'none'; } } S2MPixel.prototype.hideCookiesOptinSettingsDialog = function(){ var dialogS2MCookiesPermissions = document.getElementById("s2m_cookies_optin_settings_dialog"); dialogS2MCookiesPermissions.style.display = 'none'; var dialogS2MCookiesPermissions = document.getElementById("s2m_cookies_optin_settings_overlay_dialog"); dialogS2MCookiesPermissions.style.display = 'none'; } S2MPixel.prototype.showCookiesOptinSettings = function(){ if( this.isActivateCookiePermissions() ){ this.hideCookiesOptinDialog(); var cookieOptinInstalled = parseInt( this.readCookie("optin") ); cookieOptinInstalled = !( cookieOptinInstalled > 0 ) ? S2MPixel.ctCookiePermissionsAll : cookieOptinInstalled; var dialogS2MCookiesPermissionsSettingsDialog = document.getElementById("s2m_cookies_optin_settings_dialog"); var dialogS2MCookiesPermissionsSettingsOverlayDialog = document.getElementById("s2m_cookies_optin_settings_overlay_dialog"); if( dialogS2MCookiesPermissionsSettingsDialog && dialogS2MCookiesPermissionsSettingsOverlayDialog ){ dialogS2MCookiesPermissionsSettingsDialog.style.display = ''; dialogS2MCookiesPermissionsSettingsOverlayDialog.style.display = ''; }else{ var pageBody = document.getElementsByTagName("body")[0]; if( pageBody ){ pageBody.appendChild( this.getS2MCookieOptinSettingsDivDialogOverlayHTML() ); pageBody.appendChild( this.getS2MCookieOptinSettingsDivDialogHTML() ); } } var domInputObject; if( ( cookieOptinInstalled & S2MPixel.ctCookiePermissionsPersonal ) == S2MPixel.ctCookiePermissionsPersonal ){ domInputObject = document.getElementById("s2m_cookies_optin_dialog_settings_options_set_personal"); } else{ if( ( cookieOptinInstalled & S2MPixel.ctCookiePermissionsAllwaysSecure ) == S2MPixel.ctCookiePermissionsAllwaysSecure ){ domInputObject = document.getElementById("s2m_cookies_optin_dialog_settings_options_set_allways_secure"); } else{ if( ( cookieOptinInstalled & S2MPixel.ctCookiePermissionsIncognito ) == S2MPixel.ctCookiePermissionsIncognito ){ domInputObject = document.getElementById("s2m_cookies_optin_dialog_settings_options_set_incognito"); } } } domInputObject.click(); window.scrollTo( 0, 0 ); } } S2MPixel.prototype.acceptCookiesPerimissions = function(){ this.createCookie( "optin", S2MPixel.ctCookiePermissionsAll, this.userCookieExpirationTime() ); this.hideCookiesOptinDialog(); if( window.OnS2MCookiesPermissionsChanged != undefined && typeof( window.OnS2MCookiesPermissionsChanged ) == "function" ){ OnS2MCookiesPermissionsChanged(); } if( window.OnS2MCookiesPermissionsChanged977 != undefined && typeof( window.OnS2MCookiesPermissionsChanged977 ) == "function" ){ OnS2MCookiesPermissionsChanged977(); } } S2MPixel.prototype.getS2MCookieOptinSettingsDivDialogOverlayHTML = function(){ var mainDiv = document.createElement("div"); mainDiv.id = "s2m_cookies_optin_settings_overlay_dialog"; mainDiv.className = "s2mCookiesOptinDialog"; return mainDiv; } S2MPixel.prototype.removeCookieOptin = function(){ this.createCookie( "optin", 0, this.userCookieExpirationTime() ); this.removeCookie( "optin"); this.hideCookiesOptinSettingsDialog(); if( window.OnS2MCookiesPermissionsChanged != undefined && typeof( window.OnS2MCookiesPermissionsChanged ) == "function" ){ OnS2MCookiesPermissionsChanged(); } if( window.OnS2MCookiesPermissionsChanged977 != undefined && typeof( window.OnS2MCookiesPermissionsChanged977 ) == "function" ){ OnS2MCookiesPermissionsChanged977(); } } S2MPixel.prototype.acceptCookiesPerimissionsSettings = function(){ var cookiesOptinSelected = this.getSelectedOptinValue(); this.createCookie( "optin", cookiesOptinSelected, this.userCookieExpirationTime() ); this.hideCookiesOptinSettingsDialog(); if( window.OnS2MCookiesPermissionsChanged != undefined && typeof( window.OnS2MCookiesPermissionsChanged ) == "function" ){ OnS2MCookiesPermissionsChanged(); } if( window.OnS2MCookiesPermissionsChanged977 != undefined && typeof( window.OnS2MCookiesPermissionsChanged977 ) == "function" ){ OnS2MCookiesPermissionsChanged977(); } } S2MPixel.prototype.getSelectedOptinValue = function(){ if( document.getElementById("s2m_cookies_optin_dialog_settings_options_set_personal").checked ) return S2MPixel.ctCookiePermissionsPersonal; if( document.getElementById("s2m_cookies_optin_dialog_settings_options_set_allways_secure").checked ) return S2MPixel.ctCookiePermissionsAllwaysSecure; if( document.getElementById("s2m_cookies_optin_dialog_settings_options_set_incognito").checked ) return S2MPixel.ctCookiePermissionsIncognito; } S2MPixel.prototype.changeCookiesPerimissionsSettings = function( permissionValue ){ if( document.getElementById("s2m_cookies_optin_settings_dialog_more_details_incognito") ){ document.getElementById("s2m_cookies_optin_settings_dialog_more_details_incognito").style.display = 'none'; } if( document.getElementById("s2m_cookies_optin_settings_dialog_more_details_always_secure") ){ document.getElementById("s2m_cookies_optin_settings_dialog_more_details_always_secure").style.display = 'none'; } if( document.getElementById("s2m_cookies_optin_settings_dialog_more_details_personal") ){ document.getElementById("s2m_cookies_optin_settings_dialog_more_details_personal").style.display = 'none'; } var cookiesOptinSelected = permissionValue == undefined ? this.getSelectedOptinValue() : permissionValue; if( ( cookiesOptinSelected & S2MPixel.ctCookiePermissionsPersonal ) == S2MPixel.ctCookiePermissionsPersonal ){ if( document.getElementById("s2m_cookies_optin_settings_dialog_more_details_personal") ){ document.getElementById("s2m_cookies_optin_settings_dialog_more_details_personal").style.display = ''; document.getElementById("s2m_cookies_optin_dialog_settings_options_set_personal").checked = true; } } else{ if( ( cookiesOptinSelected & S2MPixel.ctCookiePermissionsAllwaysSecure ) == S2MPixel.ctCookiePermissionsAllwaysSecure ){ if( document.getElementById("s2m_cookies_optin_settings_dialog_more_details_always_secure") ){ document.getElementById("s2m_cookies_optin_settings_dialog_more_details_always_secure").style.display = ''; document.getElementById("s2m_cookies_optin_dialog_settings_options_set_allways_secure").checked = true; } } else{ if( ( cookiesOptinSelected & S2MPixel.ctCookiePermissionsIncognito ) == S2MPixel.ctCookiePermissionsIncognito ){ if( document.getElementById("s2m_cookies_optin_settings_dialog_more_details_incognito") ){ document.getElementById("s2m_cookies_optin_settings_dialog_more_details_incognito").style.display = ''; document.getElementById("s2m_cookies_optin_dialog_settings_options_set_incognito").checked = true; } } } } } S2MPixel.prototype.getS2MCookieOptinSettingsDivDialogHTML = function(){ var mainDiv = document.createElement("div"); mainDiv.id = "s2m_cookies_optin_settings_dialog"; mainDiv.className = "s2mCookiesOptinDialog"; mainDiv.innerHTML = "
Azerty - NL maakt gebruik van cookies
\r\n
\r\n

\r\n Azerty - NL maakt gebruik van cookies. Wij gebruiken cookies om uw website ervaring te verbetern, \r\n advertenties aan te passen aan uw interesses en integratie met social media mogelijk te maken.
\r\n U kunt zelf instellen welke cookies u van ons accepteern of verder gaan op Azerty - NL.
\r\n Houd er rekening mee dat door het niet accepteren van cookies uw website ervaring neit optimaal kan zijn. \r\n Meer informatie over het gebruik van gegevens can verschillende cookies vindt u in ons cookiebeleid.
\r\n

\r\n

Kies uw gewenste cookie instellingen

\r\n

\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n

Alleen

\r\n
    \r\n
  • Functionele cookies
  • \r\n
  • Anonieme statistieken bijhouden
  • \r\n
\r\n
\r\n
\r\n

Geen

\r\n
    \r\n
  • Persoonlijke informatie delen
  • \r\n
  • Persoonlijke aanbiedingen tonen
  • \r\n
  • Social Media mogelijkheden
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Alleen

\r\n
    \r\n
  • Statistieken over het gebruik van de site bijhouden
  • \r\n
  • Persoonlijke aanbiedingen op de site tonen
  • \r\n
\r\n
\r\n
\r\n

Geen

\r\n
    \r\n
  • Persoonlijke informatie delen
  • \r\n
  • Persoonlijke advertenties
  • \r\n
  • Social Media mogelijkheden
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Alleen

\r\n
    \r\n
  • Statistieken over het gebruik van de site bijhouden
  • \r\n
  • Persoonlijke advertenties tonen
  • \r\n
  • Social Media mogelijkheden tonen
  • \r\n
\r\n
\r\n
\r\n

Geen

\r\n
    \r\n
  • Persoonlijke informatie delen
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Annuleren
\r\n
Opslaan
\r\n
".split("{LocationProtocol}").join( this.hostLocationProtocol() ).split("{S2MEndPoingHost}").join( this.s2mTrackerHost() ); return mainDiv; } S2MPixel.prototype.CheckCookiesPermissions = function( valPermissions ){ var currentCookiesOptinValue = parseInt( this.readCookie("optin") ); currentCookiesOptinValue = currentCookiesOptinValue > 0 ? currentCookiesOptinValue : 0; return ( currentCookiesOptinValue & valPermissions ) == valPermissions; } S2MPixel.prototype.getS2MCookieOptinDivDialogHTML = function(){ var mainDiv = document.createElement("div"); mainDiv.id = "s2m_cookies_optin_dialog"; mainDiv.className = "s2mCookiesOptinDialog"; mainDiv.innerHTML = "
Azerty - NL maakt gebruik van cookies
\r\n
\r\n

\r\n Wij zorgen er graag voor dat u een goede website ervaring bij ons heeft.
\r\n Om dit te verbetern maken wij gebruik van cookies. U ziet advertenties die bij u passen en u kunt uw interesses delen via social media. \r\n Heeft u dit liever niet? Klik hieronder op Instellingen.\r\n

\r\n
\r\n
\r\n
Instellingen
\r\n
Doorgaan
\r\n
\r\n "; return mainDiv; } function S2MCookiesConfigration(){} S2MCookiesConfigration.prototype.isAnalyticsCookiesAllowed = function(){ var cookieValue = __s2mPixel977.readCookie("optin"); if( __s2mPixel977.isActivateCookiePermissions() && !__s2mPixel977.isEmpty( cookieValue ) ){ cookieValue = parseInt( cookieValue ); cookieValue = cookieValue > 0 ? cookieValue : 0; return ( cookieValue & S2MPixel.ctCookiePermissionsAnonymousStatisticTracking ) == S2MPixel.ctCookiePermissionsAnonymousStatisticTracking; } else{ return true; } } S2MCookiesConfigration.prototype.isSocialMediaCookiesAllowed = function(){ if( __s2mPixel977.isActivateCookiePermissions() ){ return __s2mPixel977.isExternalAllowed(); } else{ return true; } } S2MCookiesConfigration.prototype.isAnonymous = function(){ var cookieValue = __s2mPixel977.readCookie("optin"); if( __s2mPixel977.isActivateCookiePermissions() && !__s2mPixel977.isEmpty( cookieValue ) ){ cookieValue = parseInt( cookieValue ); cookieValue = cookieValue > 0 ? cookieValue : 0; return cookieValue == S2MPixel.ctCookiePermissionsIncognito; } else{ return false; } } if( __s2mPixel977 == undefined ){ var __s2mPixel977= new S2MPixel(); __s2mPixel977.render(); var __s2mPixel = __s2mPixel977; if( window.OnS2MPixelLoaded != undefined && typeof( window.OnS2MPixelLoaded ) == "function" ){ OnS2MPixelLoaded(); } if( window.OnS2MPixelLoaded977 != undefined && typeof( window.OnS2MPixelLoaded977 ) == "function" ){ OnS2MPixelLoaded977(); } }