Redirect a returning visitor to a new URL based on some condition | Community
Skip to main content
Employee
October 29, 2021
Solved

Redirect a returning visitor to a new URL based on some condition

  • October 29, 2021
  • 2 replies
  • 1448 views

Hi,

 

We are trying to create a test such that if a visitor has visited the /receipt page, the next time they visit home page (returning visitor) , the test version should take them to a different test page URL.

 

Current implementation is that we are using audience rule as  --> Site Pages: Current Page URL contains receipt

But above method doesn't seems to work as I can see no traffic in the report. Is there any way we can implement it using the audience rule. Or if we use profile script as well, please guide what can be the correct implementation.

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 MihneaD

@mayurik,

The simple way to do it woudl be to build audience around if referrer URL contains "receipt" however this would only function for those who immediately return to the homepage after getting the receipt. It seems a more comprehensive solution would indeed be one that leverages profile data as @al85 has suggested.

2 replies

MihneaD
MihneaDAccepted solution
Employee
October 29, 2021

@mayurik,

The simple way to do it woudl be to build audience around if referrer URL contains "receipt" however this would only function for those who immediately return to the homepage after getting the receipt. It seems a more comprehensive solution would indeed be one that leverages profile data as @al85 has suggested.

New Participant
October 29, 2021

Hi,

 

You will have to create a profile script something like below

 

if (page.url.indexOf("Unique identifier of the page URL") > -1) {
user.setLocal("pageSeen", "true");
}

 

Use the 'pageSeen' equals 'true' parameter along with 'returning visitor'  in your audience and you can use a redirect offer using this audience.

New Participant
May 13, 2024

What's wrong?