Profile script: Has seen pages?
Hi,
I'm hoping to set up a profile script to create a user parameter which tells me whether or not the user has viewed a certain set of pages before. This must be across sessions.
At the moment I have this for my script called 'LastContentPage:
if(!user.get("LastContentPage")){
if(mbox.name==="target-global-mbox" && page.url.includes("contentpage")){
return 'Content Page';
}
The script is referring to the global mbox to grab a page URL. If that URL contains 'contentpage', then a parameter is passed to the user. I'd then set up a rule saying 'If this user parameter equals "Content Page", apply offer'.
Will this work? How can I test it without applying it directly to an activity?
Thanks,
Chris