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

PercentPageView as a integer

Avatar

Avatar
Validate 1
Level 1
marcel3
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
marcel3
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
marcel3
Level 1

21-07-2021

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!

Accepted Solutions (0)

Answers (0)