Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

PercentPageViewed not firing in few properties

rudrac29336202
Level 1
Level 1

I see issue with our website where "PercentPageViewed" is not firing on all website except 1.

 

When I checked setup its like below:

 

if (s.pageName) {
var ppvArray = s.getPercentPageViewed();
}
if (typeof ppvArray != 'undefined' && typeof ppvArray[1] != 'undefined') {
s.eVar9 = "initialpercent=" + ppvArray[2] + "|highestpercent=" + ppvArray[1] + "|" + ppvArray[0] + "|heightpixel =" + ppvArray[3];
} else
s.eVar9 = "";

 

Code for plugin:

s.getPercentPageViewed=function(pid,change){var s=this,ist=!s.getPPVid?true:false;pid=pid?pid:s.pageName?s.pageName:document.location.href;s.ppvChange=change?change:"1";if(typeof s.linkType!="undefined"&&s.linkType!="0"&&s.linkType!=""&&s.linkType!="e")return"";var v=s.c_r("s_ppv"),a=v.indexOf(",")>-1?v.split(",",4):[];if(a&&a.length<4){for(var i=3;i>0;i--)a[i]=i<a.length?a[i-1]:"";a[0]=""}if(a)a[0]=unescape(a[0]);if(!s.getPPVid||s.getPPVid!=pid){s.getPPVid=pid;s.c_w("s_ppv",escape(s.getPPVid));s.handlePPVevents()}if(ist)if(window.addEventListener){window.addEventListener("load",
s.handlePPVevents,false);window.addEventListener("click",s.handlePPVevents,false);window.addEventListener("scroll",s.handlePPVevents,false);window.addEventListener("resize",s.handlePPVevents,false)}else if(window.attachEvent){window.attachEvent("onload",s.handlePPVevents);window.attachEvent("onclick",s.handlePPVevents);window.attachEvent("onscroll",s.handlePPVevents);window.attachEvent("onresize",s.handlePPVevents)}return pid!="-"?a:a[1]};

 

Can someone please help us to get what's exactly went wrong into it? or where I can check to find issue?

0 Replies