User browsing history in Target in previous sessions | Community
Skip to main content
Michael_Soprano
Level 10
June 26, 2025
Solved

User browsing history in Target in previous sessions

  • June 26, 2025
  • 1 reply
  • 440 views

We only have Target at our disposal.

I would like to combine two audiences:

1. Current session - easy

Comes from Google + landing page contains "real-estate" 

2. Past session - not sure if feasible without AEP, AAM or AA 

Session from > 7days , comes from Linkedin (utm) and landing page parameter also contains "real-estate" 

 

Is Target able to keep events from past sessions? Going through documentation most parameters are about current behaviour

Best answer by NarenKotipalli

@michael_soprano

Good question!

Target can easily handle the first case — someone coming from Google and landing on a page with "real-estate" in the URL. That’s based on the current session, which Target works well with.

For the second case — someone who visited from LinkedIn more than 7 days ago — it’s a bit trickier. Target doesn’t store past session data by default.

But there are a couple of ways to work around this:

  1. Use a profile attribute or script
    When someone visits your site with a specific utm_source (like LinkedIn), you can save that value to their Target profile. That way, you can target them later based on that info — as long as their profile is still active.
  2. Use a cookie
    You can store the utm_source value in a cookie, and then pass it to Target as a parameter. Then, create an audience based on that cookie value.

Both options require capturing the data when the user first visits — Target can’t go back and get it after the fact.

Let me know if you'd like help setting this up!

1 reply

NarenKotipalli
NarenKotipalliAccepted solution
Level 3
June 27, 2025

@michael_soprano

Good question!

Target can easily handle the first case — someone coming from Google and landing on a page with "real-estate" in the URL. That’s based on the current session, which Target works well with.

For the second case — someone who visited from LinkedIn more than 7 days ago — it’s a bit trickier. Target doesn’t store past session data by default.

But there are a couple of ways to work around this:

  1. Use a profile attribute or script
    When someone visits your site with a specific utm_source (like LinkedIn), you can save that value to their Target profile. That way, you can target them later based on that info — as long as their profile is still active.
  2. Use a cookie
    You can store the utm_source value in a cookie, and then pass it to Target as a parameter. Then, create an audience based on that cookie value.

Both options require capturing the data when the user first visits — Target can’t go back and get it after the fact.

Let me know if you'd like help setting this up!

maccg12
Level 3
July 1, 2025

Is there a reference on how to create profile scripts like you described?

NarenKotipalli
Level 3
July 2, 2025

@maccg12 Here is a simple profile script that captures the utm_source parameter along with a timestamp on a new session page visit. The script stores all utm_source values, adding the most recent one at the beginning of the string.

Please note: Profile attributes can store a maximum of 256 characters. If the total value exceeds this limit, the excess characters will be trimmed.

 

var utm_source = page.param('utm_source'); if(utm_source && user.isNewSession){ var prevVal = user.get('utm_source'); var timeStamp = new Date(); return utm_source + '|' + timeStamp + (prevVal ? '||' + prevVal : ''); }

 

Let me know if you have any questions or need further adjustments!