Skip to main content
Level 2
October 16, 2026
Question

pagetitle profile script

I am passing pageTitle to Adobe Target and have created a profile script to save the value as a profile attribute.

For testing, I would like to create a single XT activity with three experiences:

Experience A → profile.pageTitle = Page 1 → Banner A

Experience B → profile.pageTitle = Page 2 → Banner B

Experience C → profile.pageTitle = Page 3 → Banner C

Can XT audiences use this profile attribute to determine which experience should be displayed?

More importantly, will the profile script value be available for audience qualification on the same Target request in which pageTitle is first passed, or will it only be available from the subsequent request/page view?

Is this a recommended way to validate that the profile script is functioning correctly?

1 reply

Prasanth
Level 2
October 16, 2026

Hi ​@KumarMu1 ,

Yes, Experience Targeting (XT) audiences can use profile attributes generated by profile scripts. However, how and when profile scripts execute determines whether your user qualifies on the first page load.

1. The Core Question: Same-Request vs. Next-Request Availability

YES, the profile script value IS available for audience qualification on the EXACT SAME Target request in which pageTitle is passed.

Technical Execution Flow (Single Request Lifecycle):

  1. The browser sends an mbox/delivery request to Target containing the parameter pageTitle = "Page 1".
  2. Profile Script Execution Phase: Target executes all active Profile Scripts on the server edge first. Your script evaluates the incoming parameter param('pageTitle') and writes it to profile.pageTitle.
  3. Audience Evaluation Phase: Target evaluates the XT activity rules after profile scripts have executed during the same request thread.
  4. Offer Delivery Phase: Target evaluates profile.pageTitle == "Page 1", qualifies the visitor for Experience A, and returns Banner A in the response.

Key Rule: Because profile scripts run prior to audience evaluation within the request pipeline, there is no 1-page delay. The visitor will qualify and see the correct banner immediately on Page 1.

2. Is this a recommended way to validate Profile Script functionality?

Yes, but with one important caveat regarding Target Caching.

While using an XT activity is a great visual way to test, mboxes have profile stickiness once assigned.

If a visitor hits Page 1 first, they qualify for Experience A. If they then navigate to Page 2 within the same session, XT priority rules and activity session state might keep them locked into Experience A depending on your activity's Refinement Rules (e.g., Evaluated on every page view vs Evaluated on entry).

Best Practice for XT Activity Refinement:

In your XT Activity setup, under Experience Targeting Settings:

  • Ensure Re-evaluating Audiences is enabled / set to "Evaluated on every page view" rather than "On entry". Otherwise, once a visitor gets bucketed into Experience A, Target won't re-evaluate them when they navigate to Page 2.

3. Step-by-Step Profile Script Setup

Step 1: Create the Profile Script

In Target, go to Audiences -> Profile Scripts and create savePageTitle:

JavaScript

// Profile Script Name: savePageTitle

if (mbox.param('pageTitle')) {

  return mbox.param('pageTitle');

}

return user.parameter('savePageTitle'); // Retain previous value if missing

Step 2: Build the XT Audiences

Create three separate Audiences under Audiences -> Create Audience:

  • Audience A: Visitor Profile -> user.savePageTitle -> equals -> Page 1
  • Audience B: Visitor Profile -> user.savePageTitle -> equals -> Page 2
  • Audience C: Visitor Profile -> user.savePageTitle -> equals -> Page 3

Step 3: Configure XT Activity

  1. Set Experience 1 Audience = Audience A -> Offer = Banner A
  2. Set Experience 2 Audience = Audience B -> Offer = Banner B
  3. Set Experience 3 Audience = Audience C -> Offer = Banner C
Translate