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

getPercentPageViewed not working properly with AJAX requests

Avatar

Avatar
Level 1
livyoh31899301
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
livyoh31899301
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
livyoh31899301
Level 1

15-11-2017

Hi,

We are trying to use getPercentPageViewed function in our dtm implementation. The function works properly on every page except pages that dynamically change (like JSP). We also want to keep track of those pages which are updated dynamically with AJAX request. Since AJAX request updates the page without reloading the page getPercentPageViewed function cannot understand that the page has changed. Therefore, at the end of the function, it seems that returning value from this function is different than expected.

We've examined the function and written a Javascript code on JSP side (without changing the actual function getPercentPageViewed) to fix this issue. When JSP has been loaded this Javascript code runs and makes some changes. Consequently the problem has been solved.

But nevertheless we wanted to ask, is there any solution that you can give so that we can fix this issue?

Accepted Solutions (0)

Answers (0)