User has visited a URL
Sep 12, 2017Sometimes, you may want to target a user depending on if they have visited a specific url on your page. This may be helpful if the user landed on a specific landing page and then you want to display some information to them later on in the sales funnel or a later page. Below is a profile script that tracks if a user has already visited a specific page.
if (page.url.indexOf('urlToMatch') > -1) {
return 1;
}else{
if (!user.get('nameOfScript')) {
return 0;
}
}
return 1;
}else{
if (!user.get('nameOfScript')) {
return 0;
}
}