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

Target Personalisation for return users based on last page visited.

Avatar

Level 2

Hi all, 

 

I am looking for some help on a campaign I am looking to set up. We want to be able to change the content in the hero banner of our homepage for returning users based on the previous URL set they last viewed. 

 

For example it is their second visit and the last page they viewed was a product page for pets. I want to now show them a specific message relating to pets on our home page. 

 

Setting up the content I am comfortable with but its the targeting and audience setup that confuses me. 

 

I know that I will need to use the returningVisitor under visitor profile in the create and audience section. My question is what do I combine it with? Another question is what activity type would I use in target, would it still be an a/b test?

My understanding is that this would be personalisation?

 

For example we may have 5 pages relating to pets so how can I target users that were previously on these pages?

 

Thanks in advance.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @ThomasHa  - the way to achieve your use-case is profile-scripts. You can capture the URL of the previous page in a profile-script as an example below. Given your use-case, you may extend the code to capture the 'last-page-category' if the page-category is passed as an mbox-parameter OR you can do some string-checks.

if (page.url != "") return page.url

 

if (page.url != "") {
  var url = "" + page.url.toLowerCase();
  if (url.indexOf("pets") >-1) return "pets";
  else if(url.indexOf("dogs") >-1) return "dogs";
  else if(url.indexOf("cats") >-1) return "cats";  
   
 }

 

Refer to https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/variables-profiles-p... for more ways of creating profile-scripts

Afterwards, your can use the profile-parameters created by your profile-scripts to create Audiences. 

 

Let me know if you have any further queries

 

Regards

Rajneesh

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @ThomasHa  - the way to achieve your use-case is profile-scripts. You can capture the URL of the previous page in a profile-script as an example below. Given your use-case, you may extend the code to capture the 'last-page-category' if the page-category is passed as an mbox-parameter OR you can do some string-checks.

if (page.url != "") return page.url

 

if (page.url != "") {
  var url = "" + page.url.toLowerCase();
  if (url.indexOf("pets") >-1) return "pets";
  else if(url.indexOf("dogs") >-1) return "dogs";
  else if(url.indexOf("cats") >-1) return "cats";  
   
 }

 

Refer to https://experienceleague.adobe.com/docs/target/using/audiences/visitor-profiles/variables-profiles-p... for more ways of creating profile-scripts

Afterwards, your can use the profile-parameters created by your profile-scripts to create Audiences. 

 

Let me know if you have any further queries

 

Regards

Rajneesh