PercentPageView as a integer | Community
Skip to main content
New Participant
Jul 22, 2021 6:49 AM UTC
Solved

PercentPageView as a integer

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.linkTrackVars="prop32,prop33";
s.prop32= ppv[1]; //the maximum percentage viewed
s.prop33=previousPageName;
}

 

Thanks a lot in advance!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
VaniBhemarasetty
VaniBhemarasettyAccepted solution
Employee
Jul 25, 2021 2:41 PM UTC

@marcel3 

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

https://experienceleague.adobe.com/docs/analytics/implementation/vars/page-vars/events/events-overview.html?lang=en

 

This would turn the percentage viewed as metric in reporting

 

 

2 replies

VaniBhemarasetty
VaniBhemarasettyAccepted solution
Employee
Jul 25, 2021 2:41 PM UTC

@marcel3 

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

https://experienceleague.adobe.com/docs/analytics/implementation/vars/page-vars/events/events-overview.html?lang=en

 

This would turn the percentage viewed as metric in reporting

 

 

Translate
marcel3Author
New Participant
Jul 26, 2021 6:47 AM UTC
Hello @vanibhemarasetty thanks for your hint! I wanna try it 🙂
Translate