Hi!
I am trying to set up an activity that does the following:
Upon entry to the site with a URL that contains this parameter PST_V2, hide two pieces of content (was using display:none to do this) and persist hiding for rest of session
That URL parameter is only present on initial entry page, it falls off should a user navigate to another page.
I tried setting up a profile scriptlike so:
try{
var mboxParam = page.query('PST_V2') || "";
if (mboxParam != "") {
return mboxParam;
}
}
catch(e){
// Error handling...
}
and then set up an audience like this:
I am not having any luck. What am i doing wrong? Thanks!
Solved! Go to Solution.
If this helps anyone else....after a few more tries, i figured out what i was doing wrong.
My audience was fine, my profile script was keying off the wrong thing.
My url is formatted as such:
www.mysite.com?param_here=PST_V2
i was initially looking for just "PST_V2", when i really needed to use "param_here".
Updated profile script to this and I was back in business!
try{
var mboxParam = page.param('param_here').toLowerCase() || "";
if (mboxParam != "") {
return mboxParam;
}
}
catch(e){
// Error handling...
}
If this helps anyone else....after a few more tries, i figured out what i was doing wrong.
My audience was fine, my profile script was keying off the wrong thing.
My url is formatted as such:
www.mysite.com?param_here=PST_V2
i was initially looking for just "PST_V2", when i really needed to use "param_here".
Updated profile script to this and I was back in business!
try{
var mboxParam = page.param('param_here').toLowerCase() || "";
if (mboxParam != "") {
return mboxParam;
}
}
catch(e){
// Error handling...
}
@strrjms thank you so much for following up here with your Target Community peers with what worked well for you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies