Expand my Community achievements bar.

Join us for an upcoming in-person Adobe Target Skill Builders event ~~> We're hosting these live learning opportunities to equip you with the knowledge and skills to leverage Target successfully. Learn more to see if we'll be coming to a city near you!
SOLVED

Previous Page URL profile script

Avatar

Level 2

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;

1 Accepted Solution

Avatar

Correct answer by
Level 2

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.

Screenshot 2022-04-08 at 3.47.43 PM.png

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

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.

Screenshot 2022-04-08 at 3.47.43 PM.png