Expand my Community achievements bar.

Demandbase api causing double pageview issue

Avatar

Employee

Hi ,
We have "Global all pages" rules firing on al page to track a pageload
and This rule has a demandbase event .
When ECID is present then only this rule is firing.

In current situation we are getting double pageview call? I search it on google on demandbase api.
I assumed that because of this demand base api is causing this issue.
Anyone  knows how this demand base api's are working ?

VidhyaAk1_0-1718708737936.png



VidhyaAk1_0-1718708795606.png

 



7 Replies

Avatar

Community Advisor

Hi @VidhyaAk1 

have you validated by looking at the executed rules / logs that the rule executed more than once?

Is there a chance to figure out what type of demandbase event (success/fail/timeout) triggered the rule e.g., through a separate data element?

 

Alternatively, what do you see if you add a custom code action that only prints out the current event?

_satellite.logger.debug(">>> demandbase event", event);
Cheers from Switzerland!


Avatar

Employee

Hi @bjoern__koth 

Yes i validated using setDebug(true) i can see that "global all pages" rules fires twice.

i tried executing the above line of code on console it gives me "undefine" value

Avatar

Community Advisor and Adobe Champion

I agree with @bjoern__koth, it looks like Demandbase is likely triggering multiple events, and each one is triggering the rule.

 

You could add a second condition for Max Frequency (assuming the events are very close together even something like a Max Frequency of: "Return true no more than once every 1 seconds"

 

Jennifer_Dungan_0-1718723454273.png

Avatar

Employee

Hi @Jennifer_Dungan 

where i need to add "max frequency" condition ? before  "custom code" condition or after "custom code" condition in the rule ?
why we need to set unit as seconds why not as pageview?

I tried putting max frequency condition before and after custom code still i am getting multiple pageview calls.

Avatar

Community Advisor and Adobe Champion

Hi @VidhyaAk1,

 

it shouldn't matter, since both conditions must pass in order to proceed (and I think they are run in parallel (they say "AND" not "THEN" or "WAIT, THEN" like the Actions).

 

Technically you can use Page Views, however, I wasn't sure if your website was an SPA (which technically would only have one "page view" condition - these aren't based on the Adobe "Page Views" but actual page loads). I am also not familiar with your site, and whether or not you might get failure or timeouts from demandbase within the "page view". Ultimately, you can play with the settings and fine a condition that works for you. Once per page view may be exactly what you need.

 

Now, as for still getting multiple page view calls, have you confirmed (using the satellite debugger) that this rule is the one that is firing multiple times, or is it possible this rule and another rule are both triggering (or maybe the calls are more than a second apart if you have only tried my 1 second suggestion, your could try increasing that, or try page view as per above discussion)?

 

To enable Satellite Debugging, run the commands in your browser's console:

// Turn on Satellite Debugging
_satellite.setDebug(true);

// Turn off Satellite Debugging
_satellite.setDebug(false);

 

This will tell you what rules are firing, and in what order... 

Avatar

Employee

Hi @Jennifer_Dungan 

Its a tradition site, its not a SPA
I just checked the second pageview call we are getting is because of the below code which is present in extension

VidhyaAk1_0-1718806360648.png


but why we are getting this values in second pageview call ?

rules sequencing

VidhyaAk1_0-1718806446584.png

 

Avatar

Community Advisor and Adobe Champion

I'm not sure why you think the custom code inside of the s_DoPlugins(s) is causing additional page views, that all looks like standard items to me... though a lot of those could leverage the plugins set variables to do a lot of that.

 

Basically the execution of tracking follows this flow:

  1. Variable are set (Launch Rule)
  2. Beacon is sent (Launch Rule)
  3. App Measurement comes into play here... 
  4. As the request string is actually being built (before it actually sends), the Do Plugins code (if turned on, which in your case it is), runs and add additional values into dimensions and metrics... once those are added, then the tracking request is made.

This is part of the core functionality of how the Analytics calls are made.. while I can't speak to your particular implementation as being "right" or "wrong".. nothing there jumps out at me as an obvious issue. 

 

Now, from the debugger, I only see Global All Pages (the rule you posted above) fired once... and while I don't know what all those rules are doing, my suspicion is that another rule must be triggering Adobe tracking....

 

Also, not to cause a headache, but just a thought on potential optimization, since many of these rules all fire on page load, have you considered making one rule that contains all the items in one place? Something like:

Jennifer_Dungan_0-1718812131953.png

 

This can reduce the number of rules being fired, and if a trigger has to change, then you don't have to make as many rule updates (just a thought....)