Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Launch - Analytics Extension - How to select the correct report suite.

jefff46594541
Level 2
Level 2

I am new to Analytics and Launch and I am having some troubles finding the information I need, this is likely the first of several questions.

I have two dev website ... devsite1:3000 and devsite2:3001.  I have two report suites: devsuite1 and devsuite2.  The Analytics Extension allows you to select more than one suite for an environment, in this case I selected both devsuite1 and devsuite2 for my development environment.   I would expect that traffic from devsite1 would be funneled to devsuit1 and devsite2 would go to devsuite2 but from what I can tell that is not the case.  So my question is, how do I get each site to send the data to the correct report suite?

I have watched the tutorial videos, I have watched several pluralsight videos, I have attempted to search both the help docs and forums and I can not find this information anywhere even though it seems it would be a common task.  Does anyone have the answer?

Thank you in advance.

1 Accepted Solution
Asheesh_Pandey
Correct answer by
Community Advisor
Community Advisor

Hi Jeff,

You can select a data element in place of hardcoding it AA Extension. Here is what you need to do.

  • Create a new data element for dev report suite.
  • Data Element settings
    • Name - dev_reportSuiteID
    • Extension - core
    • Data Element Type - Custom Code
    • Store Duration - None
    • Leave everything else as is.
  • Open Editor : code should be following -

var environment = _satellite.buildInfo.environment;

var domain = window.location.hostname;

if ((environment  == "development" || environment == "staging") && host == "devsite1"){

return = "devsuite1"

} else if ((environment  == "development" || environment == "staging") && host == "devsite2"){

return = "devsuite2"

} else (

return = "devsuite" // catch all report suite

)

  • Go to AA extension > configure > report suite > Development report suite > click on DB icon > select your data element i.e. dev_reportSuiteID

Note: However best practice is to send all dev site data in single dev report suite and create virtual report suite to see data from different dev domain.

Thanks,

Asheesh

View solution in original post

2 Replies
Asheesh_Pandey
Correct answer by
Community Advisor
Community Advisor

Hi Jeff,

You can select a data element in place of hardcoding it AA Extension. Here is what you need to do.

  • Create a new data element for dev report suite.
  • Data Element settings
    • Name - dev_reportSuiteID
    • Extension - core
    • Data Element Type - Custom Code
    • Store Duration - None
    • Leave everything else as is.
  • Open Editor : code should be following -

var environment = _satellite.buildInfo.environment;

var domain = window.location.hostname;

if ((environment  == "development" || environment == "staging") && host == "devsite1"){

return = "devsuite1"

} else if ((environment  == "development" || environment == "staging") && host == "devsite2"){

return = "devsuite2"

} else (

return = "devsuite" // catch all report suite

)

  • Go to AA extension > configure > report suite > Development report suite > click on DB icon > select your data element i.e. dev_reportSuiteID

Note: However best practice is to send all dev site data in single dev report suite and create virtual report suite to see data from different dev domain.

Thanks,

Asheesh

View solution in original post

jefff46594541
Level 2
Level 2

Asheesh,

Thank you, that was exactly the information I was looking for!

-Jeff