Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

targeting a page who has visited a landing page

Prarthana_Sharm
Level 2
Level 2

HI,

I am trying to target a user who has visited a landing pagexyz.com/egg during a session will then see a targeted banner for the landing page page pagexyz.com/abc.

How should I approach this?

1 Accepted Solution
ryanr701
Correct answer by
Employee
Employee

You should create a profile script to do this. You can evalauate the URL of the page a visitor is hitting and then store some profile in Target against that visitor. Here is a basic on that will work:

You could also layer on some session logic that only set it if it's a new session. This might prove helpful: Profile Script Attributes

View solution in original post

6 Replies
ryanr701
Correct answer by
Employee
Employee

You should create a profile script to do this. You can evalauate the URL of the page a visitor is hitting and then store some profile in Target against that visitor. Here is a basic on that will work:

You could also layer on some session logic that only set it if it's a new session. This might prove helpful: Profile Script Attributes

View solution in original post

zach_shearer
Level 3
Level 3
@ryanr701, could you update this answer? It looks like the code snippet is empty for me.
ryanr701
Employee
Employee

Hmm I wonder if some that got messed up when the moved Experience League to the new layout. I believe the profile script sample I shared was something like this:

if (user.sessionId != user.getLocal('lastSessionId')) { user.setLocal('lastSessionId', user.sessionId); if (page.path.indexOf("/egg") != -1) { return "true"; } else { if (user.get("sessionEggPgFlag")) { return "false"; } } } else { if (page.path.indexOf("//news.ht") != -1) { return "true"; } }

This presumes the profile script is named: sessionEggPgFlag 

Prarthana_Sharm
Level 2
Level 2

HI ryan,

so Tried the audience with -  but didnt work

Visitor Profile: user.visited_XYZ_page equals

XYZ Page

visited_XYZ_page profile -

if (page.url.indexOf("abc.com/XYZ/ ") >= 0) {

  return 'XYZ Page';

}

I did mbox trace and do not see the profile there as well. Please help.

waiting to hear back on this

ryanr701
Employee
Employee

Hi Prarthana,

Are there any errors on the profile script list screen for your new profile? I think your profile script looks fine. After viewing the XYZ page and then loading another page you do not see the XYP page show up in an mbox trace? You should find it in the trace object under this path:

trace > profile > afterExecutionProfileSnapshot > profileAttributes. It should be named user.WhatEverYouNamedIt.