Gifts for Runners | Running Decathlon Store

Gifts for Runners | Running Decathlon Store

<!–

–>

(new Date).getTime()) {
//If available parse and return
if (ytDmpSessionReset) {
sessionStorage.setItem(sessionStorageKey, JSON.stringify({data: savedVisitorInformation.data, expired_at: (new Date).getTime()+(this.ttl*1000)}));
}
opts.cbSuccess(savedVisitorInformation.data);
return null;
} else {
//If not available, override success to save back in sessionStorage
var cbSuccessOrigin = opts.cbSuccess;
opts.cbSuccess = (function(data) {
sessionStorage.setItem(sessionStorageKey, JSON.stringify({data: data, expired_at: (new Date).getTime()+(this.ttl*1000)}));
return cbSuccessOrigin(data);
}).bind(this);
//Do AJAX call
return this.xhr.call(opts);
}
};

//Profile match retrieval
if (_dmpID !== undefined && _dmpID !== “”) {
criterias.pm_id = _dmpID;
criterias.pm_src = ytDmpPMSrc;
}

//From here you have the code which interact with the live api
var api = new YtApi({
accountId: ytAccountId,
domainId: ytDomainId,
strategy: new SessionStorageStrategy(ytSessionStorageTtl),
token: token
});

var xhrAnswered = false;

var xhr = api.findCurrentVisitor(
criterias,
function (data) {
window.ytVisitorInformation = data;
xhrAnswered = true;
var setPersoUpdate = 0;
Object.keys(data).map(function(item){
if (ytDmpKeysException.indexOf(item) < 0) {
tc_vars["dmp_user_"+item] = data[item]; setPersoUpdate ++; } else if (item === ytDmpKeySegments) {var segments = data[item];
for (segmentIdx = 0; segmentIdx 0 && PERSOFramework) {
//Force to update profile customer on server
PERSOFramework.setLocalStorage();
}
});
},
function (e) {
xhrAnswered = true;
tagCommanderAjaxExternalServiceCpt++;
tagCommanderIncludeContainerGlobal(null);
}
);

//Add a timeout to the request
setTimeout(
function () {
if (!xhrAnswered) {
console.debug(‘api.findCurrentVisitor : timeout’);
if (xhr) {
xhr.abort();
}
tagCommanderAjaxExternalServiceCpt++;
tagCommanderIncludeContainerGlobal(null);
}
},
ytCallTimeout
);
} catch(err) {
console.debug(err);
tagCommanderAjaxExternalServiceCpt++;
tagCommanderIncludeContainerGlobal(null);
}
}
tagCommanderAjaxExternalServiceList.push(ytAddDmpVariablesService);
/* End Ysance and service configuration */
} else {
tagCommanderIncludeContainerGlobal(null);
}

//Call all the services added to tagCommanderAjaxExternalServiceList
for (i = 0; i

.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.