Advanced State Use Case
var dataLayer = [{
event: "1"
name: "event_1"
},{
event: "2",
name: "event_2"
}];function(initState){
//generate this object with the mentioned properties in an appropriate scope
optionalParamObj = {};
//resetting the JENTIS Data Layer is optional in this case, as no further information is pushed this time
optionalParamObj.stateCallback = function() {
window.jentis.tracker.resetDatalayer();
}
for(var i = 0; i < dataLayer.length; i++){
optionalParamObj.contextualStateInformation = dataLayer[i];
initState(optionalParamObj);
}
}Last updated
Was this helpful?