Enhancing Personalisation with Adobe Target Profile Scripts: Session-Based Frequency Capping

Enhancing Personalisation with Adobe Target Profile Scripts: Session-Based Frequency Capping

Balancing user engagement with respect for their time and attention is one of the most nuanced challenges marketers face today. As users encounter countless ads, banners, and campaigns during their online journey, they quickly become desensitised to repetitive content. To foster meaningful engagement, businesses must rethink how they deliver personalised experiences, ensuring they are timely and non-intrusive.

Consider the frustration of encountering the same promotional experience every time you return to a website’s homepage within the same session. While the intent may be to reinforce a message or encourage action, the constant repetition often leads to irritation, not engagement. This kind of redundancy doesn’t just impact the user experience; it can also reduce the effectiveness of marketing campaigns, causing users to feel overwhelmed and undervalued.

This is where session-specific experimentation can transform user interactions. By limiting the frequency of promotional messages to just once per session, brands can strike a perfect balance between visibility and subtlety. This blog explores the significance of this approach, a practical use case, and the technical steps to implement it in Adobe Target using Profile Scripts.

Note: In this article, we will discuss about session-based frequency capping. If you want to learn more about frequency capping and how to configure a basic frequency capping use case using Adobe Target, you can refer to Art of Balance: Overcoming Marketing Fatigue Using Frequency Capping.

The Challenge of Repeated Experiences

Users crave variety and relevance in their digital interactions. When they encounter the same promotional experience repeatedly on the same page within a single session, it diminishes the experience’s impact and interrupts their seamless browsing experience. Whether it’s an eCommerce offer, a product discount, or a service highlight, excessive repetition can frustrate users and drive them away.

Take, for example, a retail website promoting a seasonal sale. Displaying the same experience every time a user returns to the page within the same session might seem like an effective way to boost visibility, but it often has the opposite effect. Instead of reinforcing the message, the repetition can lead to user fatigue, decreased trust in the brand, and ultimately, higher bounce rates.

The Solution: Display Experiences Specific Times Per Session using Adobe Target Profile Scripts

Adobe Target provides a way to address this challenge through session-based experimentation. By leveraging session identifiers and profile scripts, businesses can limit the display of specific experiments to a single or n number of appearance per session. This ensures the content is impactful without overwhelming the user, creating a thoughtful and engaging experience.

User Session in Adobe Target

In Adobe Target, a user session refers to the duration during which a visitor interacts with a website or application where Target is implemented.

A session starts when a user loads a page containing Adobe Target and continues as long as the user remains active. If there is no interaction for a predefined period, typically 30 minutes, the session expires. Sessions are crucial for personalisation, as they allow Adobe Target to track user interactions, deliver consistent experiences, and apply session-based targeting rules.

The session ID (sessionId) is a unique identifier assigned to each user session in Adobe Target. It helps in recognising a visitor’s journey during their active time on the site. The session ID remains the same for the duration of the session but is regenerated once the session expires and the user revisits the site.

This session ID is stored in the mbox cookie, which is included in Target requests sent to Adobe servers.

This session ID can be accessed within an Adobe Target profile script using user.sessionId, allowing for advanced targeting and segmentation based on session data.

A Practical Use Case: Enhancing eCommerce Experiences

Consider an eCommerce platform running a limited-time discount on winter clothing. The promotion is displayed as an experience on the homepage. To avoid annoying users with the same experience every time they return to the homepage within the same session, the business implements a session-based experiment. This ensures that the experience appears only once per session, delivering the message effectively without redundancy.

This simple adjustment can significantly improve user experience, reduce experience fatigue, and increase the likelihood of conversion.

How to Use Adobe Target Profile Scripts for Session-Based Personalisation ?

Setting up Session Based Frequency capping experiments in Adobe Target typically requires four steps:

1. Pass a unique experience-identifier

First, track when users interact with the experiment. The following code logs these interactions which can be added in the custom code of the adobe target experiment for reference:

				
					//If you are using AT.js,then its done by using the trackEvent() method. Here’s sample code for how to use this method. 

adobe.target.trackEvent({
    "mbox": "experience_interaction",
    "params": {
        "experience_id": "your_experience_identifier"
    }
});

//In case of WebSDK, please use sendEvent method as given below. 
//Please ensure that the renderDecisions value is set as false. 

window.alloy("sendEvent", {
  "renderDecisions": false,
  decisionScopes: ["experience_interaction"],
  "xdm": {
    "web": {
      "webPageDetails": {
        "experience_id": "your_experience_identifier"
      }
    }
  }
})
				
			

2. Create a Profile Script

Create a profile script which manages whether an experiment should appear based on session status. Given below is a script to control the session-based display. 

This script ensures that a specific experience in Adobe Target is shown only a limited number of times per session.

  • It first checks if the user is in a new session by comparing the current session ID with a stored one.
  • If it’s a new session, it resets the experience count and records the session ID.
  • If the experience is displayed, it sets the count to one.
  • If the session is ongoing and the user encounters the experience again, the script increments the count.
  • Every time the script runs, it returns the view count of an experience for a particular user.
				
					// Profile script to track the number of times an experience is shown in a session
// Step 1: Retrieve the existing session data for the experience
var sessionIdExperienceShown = user.getLocal('sessionIdExperienceShown') || null;
var experienceViewCount = user.getLocal('experienceViewCount') || 0;
// Step 2: Check if the user is in a new session
if (user.sessionId !== sessionIdExperienceShown) {
    // New session, reset the view count
    if (mbox.name == "experience_interaction" && mbox.param("experience_id") == "your_experience_identifier") {
        user.setLocal('sessionIdExperienceShown', user.sessionId);
        user.setLocal('experienceViewCount', 1);
        return 1; // Experience shown once in this new session
    } else {
        user.setLocal('experienceViewCount', 0);
        return 0; // Experience not yet shown in this session
    }
} else {
    // Same session, increment the view count if the experience is shown again
    if (mbox.name == "experience_interaction" && mbox.param("experience_id") == "your_experience_identifier") {
        experienceViewCount += 1;
        user.setLocal('experienceViewCount', experienceViewCount);
    }
    return experienceViewCount; // Return the number of times the experience has been viewed in the current session
}
				
			

Note: In this article, we are discussing about session-based frequency capping profile script. If you want to learn more about profile scripts and commonly used scripts you can refer to Adobe Target Commands and Profile Scripts Cheatsheet.

After this script runs and returns a view count, we can check that view count later while configuring the audience. For example, if we need to show the experience only once per session, we can create an audience later that targets users only when the view count for that user is less than 2.

3. Build an Audience according to the Business requirement

To ensure the session-specific experiment, it’s essential to define the right audience which reviews the response of the profile script in Adobe Target.

  • Access the Audiences Section:
    Navigate to the “Audiences” tab in Adobe Target.

  • Create an Audience :
    Set audience condition in adobe target for checking the profile attribute value according to your business requirement as given below:

4. Use the audience in your activity:

Link the defined audience to the activity, ensuring precise targeting.

By utilising audience segmentation using session-specific logic in profile script, businesses can deliver personalised and impactful messages.

Best Practices for Session-Based Experiments

  • Test Rigorously: Validate the implementation to ensure it behaves as expected.

  • Monitor Metrics: Regularly evaluate performance metrics to refine the approach.

  • Focus on Design: Keep promotional content visually appealing and purpose-driven.

Note: If you face any issue while configuring the use case, you can refer to the following trouble shooting guide which outlines common problems and provides targeted troubleshooting steps, including the use of response tokens, and other diagnostic techniques.
Troubleshooting Guide for Adobe Target Client Side Personalisation and Delivery
.

Conclusion 

Session-specific experiments offer a refined way to engage users, respecting their time while ensuring campaign visibility. By limiting content repetition within sessions, businesses demonstrate consideration for user preferences, fostering trust and loyalty. Leveraging Adobe Target’s capabilities, marketers can create personalised experiences that are impactful yet unobtrusive.

As digital engagement becomes increasingly complex, strategies like session-based experimentation can be a cornerstone of user-centric approaches. By delivering the right message at the right time, businesses not only enhance satisfaction but also drive sustainable results. Thoughtful implementation of these techniques signals a commitment to quality user interactions, paving the way for stronger, long-lasting connections.

Get Experience Optimisation Insights

Sign up and get the latest Experience Optimisation insights and tips straight to your inbox.

About The Authors

Picture of Vaibhav Mathur
Vaibhav Mathur

Vaibhav Mathur is a Web and App Analyst and Multi-Solution Consultant, with a proven track record for optimising digital experiences to achieve measurable outcomes. Specialising in Adobe Target, Adobe Analytics, Optimizely, and Tealium CDP, Vaibhav enhances customer journeys with expertise and precision.

Connect with VAIBHAV

What do you think?

What do you think?

1 Comment
February 24, 2025

Thanks for sharing a detailed technical solution Vaibhav!

Leave a Reply

Your email address will not be published. Required fields are marked *

What to read next

What do you think?

What do you think?

1 Comment
February 24, 2025

Thanks for sharing a detailed technical solution Vaibhav!

Leave a Reply

Your email address will not be published. Required fields are marked *

What do you think?

1 Comment
February 24, 2025

Thanks for sharing a detailed technical solution Vaibhav!

Leave a Reply

Your email address will not be published. Required fields are marked *