Expand my Community achievements bar.

SOLVED

DTM: Excluding a path from analytic tag calls

Avatar

Level 1

I have a website successfully wired up with DTM, and one tool (Adobe Analytics) configured. I'm getting data through to my report suite as expected.

My CMS uses an IFRAME to preview content, and this means every time a page is navigated to in the CMS, my analytics tag is fired.

My CMS lives on www.mysite.com/EPiServer and I thought I should just add a page load rule that excludes paths that include "EPiServer". I configured one as attached, but I'm still getting analytics tags fired when pages are viewed in the CMS.

Any ideas?

1 Accepted Solution

Avatar

Correct answer by
Level 3

I would try controlling this at the tool level in order to bypass any timing issues with the page load rule and the analytics tool. So, in your Adobe Analytics tool settings in DTM, you could add some code like the following to your 'Customize Page Code' editor to suppress the beacon if a certain path is detected.

var Path = location.pathname;

 if (Path === "/EPiServer")

   return false;
   else
   return true;

The return false here should prevent the beacon from firing on the indicated path. Of course though, please test this out / manipulate the code to ensure this behaves as expected.

Hope this helps!

Anna

View solution in original post

3 Replies

Avatar

Correct answer by
Level 3

I would try controlling this at the tool level in order to bypass any timing issues with the page load rule and the analytics tool. So, in your Adobe Analytics tool settings in DTM, you could add some code like the following to your 'Customize Page Code' editor to suppress the beacon if a certain path is detected.

var Path = location.pathname;

 if (Path === "/EPiServer")

   return false;
   else
   return true;

The return false here should prevent the beacon from firing on the indicated path. Of course though, please test this out / manipulate the code to ensure this behaves as expected.

Hope this helps!

Anna

Avatar

Level 1

Sorry for the delay in replying, I've had some time out of the office. Thanks for your solution, works perfectly and much better than my idea :)

Avatar

Level 1

For anyone else reading this, Adobe Customer Care confirmed this as the right solution, and offered alternative JS to achieve same goal, copied below FYI. I will include the "/" either end of the string to match (in case we ever do a news story about our use of EPiServer which would end up in the filename, and also make the comparison lower case, just in case someone navigates directly to the CMS but doesn't get the capitalisation right.

 

if(window.location.href.indexOf("EPiServer") > -1 {
   return false;
   }