Setting the report suite in DTM for custom tracking
We have set, 2 report suites for our site tracking globally. For one custom tracking we would like to send the data to only one report suite.Is there a way we can do that in DTM?
We have set, 2 report suites for our site tracking globally. For one custom tracking we would like to send the data to only one report suite.Is there a way we can do that in DTM?
Hi Vidya,
As per the above scenario mentioned by you, Basically you want to set the report suite dynamically based on the some criteria of custom tracking like Page URL etc. Please follow the points mentioned below to achieve the same.
1.If you use custom code hosted in DTM inside "Library management tab" of Adobe Analytics tool then
Open the Adobe Analytics tool , Go to the 'Library Management' tab, tick the checkbox which says - 'Set report suites using custom code below' and then set the report suite ID(s) inside the Custom code editor overlay like the below code .
//Sample code to set report suite on the basis of page URL s.usePlugins=true ; function s_doPlugins(s) { var get_url=window.location.href; var suiteid; if(get_url.indexof("www.xyz.com")!=-1) { suiteid="account1"; } else { suiteid="account2"; } s.account=suiteid; }
2. If you use code configuration managed by Adobe inside "Library management tab" in Adobe Analytics tools then
Open the “Customize Page Code” editor and add the code that will set the report suite based on checking the custom tracking conditions like Page URL etc.. Please make sure the precedence setting under the global “Customize Page Code” configuration is set to “After UI Settings” This will allow your code changes to override the use of default staging or production report suite settings.
//Sample code to set report suite on the basis of page URL s.usePlugins=true ; function s_doPlugins(s) { var get_url=window.location.href; var suiteid; if(get_url.indexof("www.xyz.com")!=-1) { suiteid="account1"; } else { suiteid="account2"; } s.account=suiteid; }Please let me know if you have any queries regarding the same.
Thanks & Regards
Parit Mittal
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.