How to implement next session personalization for users

The desired outcome of implementing next session personalization is to enhance user engagement and satisfaction by providing a tailored experience that reflects their previous interactions. By personalizing content, recommendations, and messages based on users' past behaviors and preferences, the goal is to increase user retention, reduce bounce rates, and ultimately drive higher conversion rates and customer loyalty.

Segment Made by Segment

What do you need?

  • Segment Connections

  • An in-app messaging tool

Easily personalize customer experiences with first-party data

With a huge integration catalog and plenty of no-code features, Segment provides easy-to-maintain capability to your teams with minimal engineering effort. Great data doesn't have to be hard work!

On this page

Step 1: Add the required Sources: 

In your workspace, add a new prod or dev source for your website and (optional) another for your order processing system. This should be your website where checkout events will be tracked and the system that captures completed orders. These sources will be responsible for collecting the required Track Events and sending them to Segment.

  •     Sign Up or Log In to Segment

First, access the Segment platform by signing up or logging into your existing account.

  •     Create a Source for Your Website

A source in Segment acts as the origin of data you collect, such as user interactions on your website.

  1. In your Segment workspace, navigate to the Sources section.

  2. Click the Add Source button.

  3. From the catalog of sources, select JavaScript (for websites)

  4. Provide a name for your source, e.g., "i.e. Company Website - Dev or Prod".

  5. Optionally, add labels for organization.

  6. Enter your website URL.

  7. Click Create Source button
  •       Install the Segment Snippet

After creating your source, Segment will provide you with a JavaScript snippet.

  1. Copy the JavaScript snippet provided by Segment.

  2. Paste the snippet into the <head> tag of your site to install Segment.

If you need to connect your website, mobile app, or server as a source please refer to our documentation on these touchpoints. 

Step 2: Track your events 

In order to build the funnels needed for next-session personalization, you'll need to track three key events: 'Page Viewed', ‘Screen Viewed’, and ‘Page Scrolled’ from your website source. 

  • Page Viewed: This event will start sending to Segment once Analytics.js is added to the site.

  • Screen Viewed: This event will start sending to Segment once Analytics.js is added to the site.

    • *Applicable for mobile sources only 

  • Page Scrolled: Manually add this event to your site (See Spec: Track documentation).

 

In this example, we're not only tracking events, but also sending additional properties like 'page_category' and ‘pct_scrolled. These properties provide important context about the event and can be extremely valuable in your analysis. Learn more about properties.

By tracking these events, you can make inferences about anonymous users based on their browsing behavior such as the page categories visited and the percentage of each page that was scrolled during a given session. This is invaluable data that you can use to build a personalized experience on your site or app during their next session. 

Step 3: Add Destinations

Choose where you want to send the collected data—you can use an in-app messaging or livechat tool such as Intercom to remind returning users which pages they had previously visited at the beginning of their next session.  

  1. In your Segment workspace, add a new destination.

  2. Select your preferred tool from the catalog. This destination will receive the data collected by your source and use it according to your needs.

[OPTIONAL] With Segment Unify, you can build a Profile API for the traits and events that make up a user's journey through your product. 

You can use this API to:

  • Build an in-app recommendation engine to show users or accounts the last five products they viewed but didn’t purchase

  • Empower your sales and support associates with the complete customer context by embedding the user profile in third-party tools like Zendesk

  • Power personalized marketing campaigns by enriching dynamic / custom properties with profile traits in marketing tools like Braze

Qualify leads faster by embedding the user event timeline in Salesforce

Step 4: Test your setup

Finally, test your setup to ensure data is being collected and sent correctly. You can do this by performing the actions you're tracking on your dev website and checking if the corresponding events appear in your Segment debugger and analytics tool.
 

The Source Debugger is a tool that helps you confirm that API calls made from your website, mobile app, or servers arrive to your Segment Source, so you can troubleshoot your Segment setup even quicker. 

Your data may not show up instantaneously and there may be a delay, but once the data is flowing you are ready to move to the next step. 

Step 5: Analyze and activate

With accurate setup and data flow:

  1. Analyze the data to understand user behavior throughout the initial browsing process.

  2. Identify which pages or categories users spend the most time scrolling so that your in-app messaging tool can make personalized recommendations during the next session.  

  3. Below is an example of an in-app message tailored to a specific user based on their previous behavior. Because of the events and properties you are tracking, you can use a similar approach to deliver next-session personalization to returning users. 

 



Final Thoughts 

Implementing next session personalization enhances the user experience by delivering content that is relevant and engaging based on their past interactions. By leveraging Twilio Segment's capabilities to track, analyze, and act on user data, businesses can create a more personalized and effective engagement strategy. This not only helps in retaining users but also in converting casual visitors into loyal customers, driving long-term business success.

 

Getting started is easy

Start connecting your data with Segment.