Expand my Community achievements bar.

SOLVED

Adobe Target Display call only firing on first page view with Adobe Web SDK

Avatar

Level 1

I am using the Adobe Web SDK to implement Adobe Target. I am setting up my audiences from values in the XDM Object and I have one test that should fire if the user has seen the page before, but the Display call only appears to fire on the first view of the page when the user doesn't fall into the audience yet. I am using a custom value in my XDM Object to populate the audiences and the values are updating correctly but the Target Test is not rendering and I'm not seeing the Display call in the response of the request send. I am not sure if the audiences only set on the first page view, or if there is something else that I am missing. We have not been using the SDK very long. 

 

I've not found the documentation to be very helpful here. So any help is appreciated! Thanks!

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @kristinae599482 ,

So the main thing is you need to "remember" that they have been to the page the first time they go there. Using a profile script (or profile parameter) is Target's main way of "remembering" something happened. You could use a data element in tags/Launch to do this, but you would need to persist it using the "Storage Duration" setting of the data element to something like "visitor" so it is persisted across multiple pages.

 

My recommendation is to use a profile script in Target like this. This profile script, which I've named "homePageViews" will increment any time the visitor loads a URL containing "https://luma.enablementadobe.com/content/luma/us/en.html" and remember this value in Target's profiling system. You would then build an audience defined as homePageViews > 1, so that people viewing the page for the second time would qualify for the audience. Does that make sense?

 

Note that the script uses the Target internal syntax "page.url" instead of the value you will see in the web sdk call "web.webPageDetails.URL":

var homePageViews = user.get('homePageViews') || 0;
if (page.url.indexOf('https://luma.enablementadobe.com/content/luma/us/en.html')!=-1) {
    return homePageViews + 1;
}

View solution in original post

3 Replies

Avatar

Employee Advisor

Hi @kristinae599482 ,

Is your goal to do something like this?

  1. Visitor loads a page.
    1. If this is the first time they load the page, they do not qualify for the test. You want Target to remember they have seen the page.
    2. If this is the second or more time they have loaded the page, they now qualify for the test and should get a test experience.

Am I understanding your scenario correctly? Are you using a profile script to "remember they have seen the page"?

 

Daniel

Avatar

Level 1

Hi Daniel,

 

This is my goal. We are not using a cookie and instead using a Data Element inside launch that's value changes to true once they have seen it. I have this value passing through my XDM Object and being read inside Target. Would a Profile Script be better in the future?

 

Thanks!

 

Kristina

Avatar

Correct answer by
Employee Advisor

Hi @kristinae599482 ,

So the main thing is you need to "remember" that they have been to the page the first time they go there. Using a profile script (or profile parameter) is Target's main way of "remembering" something happened. You could use a data element in tags/Launch to do this, but you would need to persist it using the "Storage Duration" setting of the data element to something like "visitor" so it is persisted across multiple pages.

 

My recommendation is to use a profile script in Target like this. This profile script, which I've named "homePageViews" will increment any time the visitor loads a URL containing "https://luma.enablementadobe.com/content/luma/us/en.html" and remember this value in Target's profiling system. You would then build an audience defined as homePageViews > 1, so that people viewing the page for the second time would qualify for the audience. Does that make sense?

 

Note that the script uses the Target internal syntax "page.url" instead of the value you will see in the web sdk call "web.webPageDetails.URL":

var homePageViews = user.get('homePageViews') || 0;
if (page.url.indexOf('https://luma.enablementadobe.com/content/luma/us/en.html')!=-1) {
    return homePageViews + 1;
}