make audience with people who view xyz.com page three days ago | Community
Skip to main content
Michael_Soprano
Level 10
March 13, 2025
Solved

make audience with people who view xyz.com page three days ago

  • March 13, 2025
  • 1 reply
  • 715 views

Is it possible to make in Target an audience which consists of people who visited specfic page view days ago? Using Profile Scripts? Or I need to buy CDP / Analytics in enable to track previous behaviour of the user?

Best answer by Utkarsh_Balooni

Hi @michael_soprano,

It is possible using profile scripts. You don't need CDP/ Analytics for this.

 

Step-1: Configure a profile script for setting the timestamp of the required page view and calculate the no. of days since last page view.

if (mbox.name === "your-mbox"){ if (page.url.toLowerCase() === "target page url"){ user.setLocal('lastVisitPageX', new Date().getTime()); } } var lastVisit = user.getLocal('lastVisitPageX'); if (lastVisit){ return (new Date().getTime() - lastVisit) / (1000 * 60 * 60 * 24); // Convert to days } }

 

Step-2: Activate the profile script and enable response token for debugging.

 

Step-3: Create an audience based on your requirement using the "no. of days since last page view" profile attribute.

1 reply

Utkarsh_Balooni
Utkarsh_BalooniAccepted solution
Level 2
March 13, 2025

Hi @michael_soprano,

It is possible using profile scripts. You don't need CDP/ Analytics for this.

 

Step-1: Configure a profile script for setting the timestamp of the required page view and calculate the no. of days since last page view.

if (mbox.name === "your-mbox"){ if (page.url.toLowerCase() === "target page url"){ user.setLocal('lastVisitPageX', new Date().getTime()); } } var lastVisit = user.getLocal('lastVisitPageX'); if (lastVisit){ return (new Date().getTime() - lastVisit) / (1000 * 60 * 60 * 24); // Convert to days } }

 

Step-2: Activate the profile script and enable response token for debugging.

 

Step-3: Create an audience based on your requirement using the "no. of days since last page view" profile attribute.

Michael_Soprano
Level 10
March 15, 2025

Thanks!

Where is the URL with the list of all of these variables? 

lastVisitPageX

 lts not here... 

https://experienceleague.adobe.com/en/docs/target/using/audiences/visitor-profiles/variables-profiles-parameters-methods

Utkarsh_Balooni
Level 2
March 15, 2025

The link you shared contains the built-in profile and mbox parameters that Adobe provides. 

 

The "lastVisitPageX" is a custom persisted profile value that you create for storing the timestamp for the last page view.