Michael Johns
Michael Johns

Reputation: 441

Adobe DTM - How Does Adobe provided code determine sCodeURL

I have the following Adobe provided code which is used in the "Customize Page Code section of the Adobe Analytics Tool set-up.

 function getAnalyticsAccount() {
    // Used to retrieve the satellite configuration report suite
    for (var toolid in _satellite.tools) {

        if (_satellite.tools[toolid].settings.engine == "sc") {
            console.log("---> toolid: " + toolid, _satellite.tools[toolid]);
            return _satellite.tools[toolid].settings.account;
        }
    }
}

The issue is in a production environment, I'm getting a dev report suite returned which I believe is due to the sCodeURL pointing to the staging version of the satellite-Lib.js file. enter image description here

I'm not sure how DTM determines which version of the file to load. Does anyone know? Does anyone know more about this functionality?

Thanks, MJ

Upvotes: 0

Views: 1916

Answers (1)

MisterPhilip
MisterPhilip

Reputation: 2452

According to your screenshot you're in staging mode (note the console.logs are coming from a JS file ending in -staging.js). You either have DTM set the staging mode via the localstorage flag

localStorage.setItem('sdsat_stagingLibrary', true);

Or the embed code, which has -staging.js at the end, is included on the page.

The code you provided works fine for each environment... so once you're out of staging mode it'll return the prod RSID(s).

Upvotes: 1

Related Questions