Skip to main content
Level 2
Mar 14, 2022 6:27 PM UTC
Solved

Previous Page URL profile script

Would this be the correct way to construct a script that would show the visitor's previous page?

 

var lastCurrentPage = user.getLocal('currentPage') || "";
user.setLocal('currentPage', page.url);
return lastCurrentPage;

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
EugeniaFang
EugeniaFangAccepted solution
Level 2
Apr 8, 2022 7:51 AM UTC

Does it make more sense to use the out of the box audience setting provided by Target? you can find the current page url and previous page url with the value you want.

 

1 reply

EugeniaFang
EugeniaFangAccepted solution
Level 2
Apr 8, 2022 7:51 AM UTC

Does it make more sense to use the out of the box audience setting provided by Target? you can find the current page url and previous page url with the value you want.

 

Translate