Hi,
I would like to pull the report suite id's dynamically from the page. I have stored the report suite id in a JSON data layer.
It seems that the report suit ID can be set as a static variable or automatically be pulled from the tool Account ID field. I would like to be able to pull the report suite id via either a data element directly in the account ID field %dl_reportsuiteid% or in the s_code.
I have managed to get this to work by giving the tool account ID a static value which i then verify with an if statement in the s_code file like this:
function getAnalyticsAccount() {
for(var toolid in _satellite.tools) {
if(_satellite.tools[toolid].settings.engine == "sc") {
return _satellite.tools[toolid].settings.account;
}
}
}
if(s.account = "Staging") {
s.account = _satellite.getVar("DL_Binfo-reportSuiteListStaging");
}
else if (s.account = "Production") {
s.account = _satellite.getVar("DL_reportSuiteListProd");
}
This works on a page load event but when i fire an event based rule, the report suite id seems to be pulled from the tool account ID which in this case is "Staging" or "Production".
Have anyone solved this, by pulling a report suite list from a data layer?
Thanks