Previous Page URL profile script | Community
Skip to main content
New Participant
March 14, 2022
Solved

Previous Page URL profile script

  • March 14, 2022
  • 1 reply
  • 1166 views

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.
Best answer by EugeniaFang

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
New Participant
April 8, 2022

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.