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

Direct Call Rules - pageName

Avatar

Level 2

Hi 

I am starting to use direct call rules which appears to be working fine, I should mention that for these pages the URL does not change. 

When I refresh the page I get two calls going off, one for my direct call rule and the other from the main library, how can I prevent the main library from sending the image off only for certain pages? 

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Glenn, 

As per our understanding from the use case, you want to fire image request from main library  for certain pages only on first page load and when page is refreshed,  only the direct call rule is fired and other call from main library is aborted. For this use case, we can define below code under Adobe Analytics tab in the custom page code of the page load rule of the page :

if(window.performance) { if(performance.navigation.type  == 1 ) { s.doPlugins = function(s) {               s.abort = true; }; } }

The abort flag can be set inside doPlugins to cause the current track call to not be sent. The abort flag is reset with every tracking call, so if a subsequent tracking call also needs to be aborted the flag will need to be set again inside doPlugins.

Thanks & Regards

Parit Mittal

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi Glenn, 

As per our understanding from the use case, you want to fire image request from main library  for certain pages only on first page load and when page is refreshed,  only the direct call rule is fired and other call from main library is aborted. For this use case, we can define below code under Adobe Analytics tab in the custom page code of the page load rule of the page :

if(window.performance) { if(performance.navigation.type  == 1 ) { s.doPlugins = function(s) {               s.abort = true; }; } }

The abort flag can be set inside doPlugins to cause the current track call to not be sent. The abort flag is reset with every tracking call, so if a subsequent tracking call also needs to be aborted the flag will need to be set again inside doPlugins.

Thanks & Regards

Parit Mittal

Avatar

Level 2

Thanks for your reply but it's not working, I pasted your code into a page load rule within the Adobe Analytics tab, i tried setting the rule against a specific page but it did not work so I removed the condition and it still did not work, I read that this method only works with a specific version on the s_code, we are using 'H.25-D6EF' and it's not that simple for us to upgrade.

Is there another way that you can think of?