Specify report suite with a data element | Community
Skip to main content
Level 4
December 18, 2019
Solved

Specify report suite with a data element

  • December 18, 2019
  • 2 replies
  • 6702 views

Hi everyone!

 

We have two websites that are nearly identical. One is an internal facing version and the other is the public version.

 

We would like to deploy the same Launch code but have the reporting to go into separate report suites. Is it as simple as creating a data element defining the report suite name and then adding it into the Adobe Analytics tool configuration?

 

Also, is there any secret Adobe syntax I need to be aware of when setting up my data element or can I do something like the below:

 

var reportSuite = (window.location.hostname == "www.hostnameInternal.com") ? hostnameInternalProduction : hostnameExternalProduction;

return reportSuite;

 

Many thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AnalyticsAlice

Yes, it is that simple! Instead of writing a lot of custom code, you can leverage the Adobe Analytics extension by setting the report suites for each environment using data elements. You reference the value (which should be a string) from the data element by wrapping the data element name in %'s. See below:

2 replies

AnalyticsAlice
AnalyticsAliceAccepted solution
Level 2
December 18, 2019

Yes, it is that simple! Instead of writing a lot of custom code, you can leverage the Adobe Analytics extension by setting the report suites for each environment using data elements. You reference the value (which should be a string) from the data element by wrapping the data element name in %'s. See below:

Level 4
December 19, 2019
Excellent! Many thanks for the reply. That's nice and easy.
franzli
Level 4
January 3, 2020

This is exactly what I do for my implementations. Using a data element is also nice so you only have one place to change everything.

 

How you have your data element is good. 

 

You can even shorten in by:

return window.location.hostname == "www.hostnameInternal.com" ? hostnameInternalProduction : hostnameExternalProduction;
Level 4
January 6, 2020
Thanks for the tip. I can confirm that this is working nicely.