Expand my Community achievements bar.

Join us WEDNESDAY, 6/7/23 @8am PT for the next Adobe Target Community Q&A Coffee Break! Bill Ozinga, John Mosbaugh, Justin Patrick, and Eric Thibeault will be taking all of your Target Recommendations questions in the chat ~ learn more and register today!
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

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

page footer