Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Setting the report suite in DTM for custom tracking

Avatar

Level 3

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

View solution in original post

10 Replies

Avatar

Correct answer by
Level 10

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

Avatar

Level 3

Thanks Parit, In our site we have defined the report suite in the omniture.js and we are using the option "page code is already present". In this case shall i update the code that you mentioned in the omniture.js itself?

Avatar

Level 10

yes, Vidya you can go ahead and update the code in the omniture.js itself.

Thanks & Regards

Parit Mtittal

Avatar

Level 3

Sorry Parit, i have another requirement here. We need to add new report suite for the top navigation tracking. as per your logic if i add, all the data will go to the new report suite. But our requirement is only the top navigation tracking should go to the new report suite. Is there a way we can do this?

Thanks in advance.

Regards,

Vidya

Avatar

Level 10

Hi Vidya, 

No problem :)

Can you please elaborate more what exactly you are trying to say by "Top navigation tracking" ?

Thanks & Regards

Parit Mittal

Avatar

Level 3

We are tracking our main navigation in the site. It is a custom tracking. If you go to netapp.com site, the main navigation in the page is what iam talking about. Here we are tracking the clicks on the navigation links and the requirement is to send these data to a separate report suite.

Now these links are on all the pages. If i have to add the report suite on the URL basis this will not work. So my question is, Is there any other criteria i can use to have separate report suite for this custom tracking?  

Let me know if you have any question.

Avatar

Level 10

Hi Vidya , 

Thanks for the clarification. I hope and assume that you are using Event based rule to track Top Navigation links on the netapp.com website. Hence to track the Navigation links in a separate report suite , Please add the following code in the custom code section of the Adobe Analytics tab in the Event based rule. 

s.sa('rsid');

The s.sa() function lets you dynamically change a report suite at any time on the page, before or after an image request fires.

Please see the following link for more information about the same.

https://marketing.adobe.com/resources/help/en_US/sc/implement/function_sa.html

Thanks & Regards

Parit Mittal

Avatar

Level 3

Cool Parit, I was badly in search of this solution. Thanks so much. One last question :). Hope this will work with s_code latest version. We have not yet moved to appmeasurement.

Regards,

Vidya

Avatar

Level 10

Hi Vidya, 

yes, It will work with s_code latest version. 

Thanks & Regards

Parit Mittal

Avatar

Level 3

Thanks so much. I appreciate your help.