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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

PercentPageView as a integer


Level 1

Hello Guys,


I have a question again. Is it possible to transform PercentPagedViewed (is a string) as an integer?


For info: PercentPagedViewed is a costum JavaScript code



var previousPageName=s.getPreviousValue(s.pageName,'s_ppn');
_satellite.logger.log('previousPageName pageName s_ppn ' + previousPageName);
var ppv = s.getPercentPageViewed(previousPageName); //get array of data on prev page % viewed
_satellite.logger.log('ppv[0]: ' + ppv[0]);
_satellite.logger.log('ppv[1]: ' + ppv[1] + ' the maximum percentage viewed ');
//if( ppv && typeof ppv=='object' && ppv[0] == previousPageName) { // this is from doku, but does not work
if (ppv && typeof ppv=='object') {
s.prop32= ppv[1]; //the maximum percentage viewed


Thanks a lot in advance!

2 Replies


Employee Advisor


You can try to send or set the PercentageViewed to an event as well 

copy your prop value to event and this event can be set as interger or numeric event

Below is the documentation on different types of event types in adobe analytics


This would turn the percentage viewed as metric in reporting