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?
解決済! 解決策の投稿を見る。
トピックはコミュニティのコンテンツの分類に役立ち、関連コンテンツを発見する可能性を広げます。
表示
返信
いいね!の合計
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.
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.
Thanks!
Where is the URL with the list of all of these variables?
lastVisitPageX
lts not here...
表示
返信
いいね!の合計
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.
表示
返信
いいね!の合計
Thanks!
But where is explained in documentation that page.url is connected to previous URL visited by the user not the URL of the current page which user is on?
表示
返信
いいね!の合計
It is mentioned in the URL variables in the document. (page.url gives the url of the current page that the user is on.)
page.url is analogous to the window.location.href function. For a more detailed explanation on the set up of profile scripts watch this video.
表示
返信
いいね!の合計
So how can I use this page.url var if its connected with window.location.href function??
Or in that part I create variable for the user which is then follow-uped during multiple sessions? Could you give me more detailed explanation of your solution?
if (mbox.name === "your-mbox"){
if (page.url.toLowerCase() === "target page url"){
user.setLocal('lastVisitPageX', new Date().getTime());
}
}
表示
返信
いいね!の合計