Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

getPercentPageViewed v3.0 plug in question

Avatar

Community Advisor

Hello Team,

I am using the new plugin getPercentPageViewed v3.0 with getPreviousValue​ but somehow its not working correctly.

I have implemented like below

Added both the plugin code in PLUGIN Section, and doPlugin section added below code.

s.prop9 = s.getPreviousValue(s.pageName, 's_ppn', '');

if (s.pageName !== undefined) {

var ppv = s.getPercentPageViewed(s.pageName); // passing the page name as parameter

if (ppv) {

s.prop9 = ppv[0]; // contains the previous page name

s.prop55 = ppv[1]; // contains the total percent viewed

s.prop56 = ppv[2]; // contains the percent viewed on initial load

s.prop54 = ppv[3]; // contains the total number of vertical pixels

}

}

getting the result as undefined. s.getPercentPageViewed(s.pageName) is not executing. Even though I tried to debug the plugin code, it says pid is not defined.

Please check attached screenshot

1671131_pastedImage_10.png

Can someone please help ?

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi Gokul,

In  s.getPercentPageViewed(s.pageName) function call don't pass s.pageName as parameter since it default to Analytics Pagename variable.

Thanks,

Charles

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

Hi Gokul,

In  s.getPercentPageViewed(s.pageName) function call don't pass s.pageName as parameter since it default to Analytics Pagename variable.

Thanks,

Charles