Skip to main content

Target website or mobile app content for returning users based on past behavior or traits.

 

Target KPI: Increase Monthly Active Users

Desired Outcome: 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.

---

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

AD_4nXdDSesbAfEY-IB84kjEoLYbs1sK-fhigT1c40HERURc6Z9_nyTOam04M7ZIDF-cCDmvzobzMHketriBRjdzz3FGLQ9n4RXPfkx9gdTeVQBx9ejeC4TJ6rg0NI38ElYWz47_h0VY8CZMaH2UsNlgZbOv4GBf?key=9Lm1eYfOfJWERt8eSzFQ0A


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 add a source for your server, mobile app, or any other touchpoint please refer to the documentation for easy setup

 

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).

 

AD_4nXdV-59CIApXcGQ_89ff7M0fQB10Qxpi5Ic0CgIyTn77uq6wyQa8vK4ocvZDxDGqjC-KC-nmWVAfx5LAJ-ufjSbSeyNvEau4lEAQeFEkicuFiRjzrEfbzLNHmqynTSfmBlQCIRZoDk5t8yLuVyhRp6SL3EGR?key=OipCbcSyBCJruikwPmtpTQ

 

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


Ensure your data collection is configured correctly:

  1. Perform the actions you’re tracking on your development website.
  2. Check if the events are correctly recorded in your Segment debugger and analytics tool.

AD_4nXepuS-p2D5EXhQ5c-eLtBUIDflXsOlf-w7TyP0OWUm073hpsvWQClM9wxk03LEdoDo2gcAgjnsNJLZxcxagR4GyGMur5Y4awePwrn76SEipEAGZfc6CXtWmHKHwT7Qf_uhmznM2jJebHv_ZsTC1n-e7WRs?key=xuTaHkcDdgHE2UDOqf05Bg

 

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.

AD_4nXdI2pUk8TFWxKkXeG27upDekEBFA4f5FpJZrPSFGv9o5kynHV3-n06uuB_6ujKKKJ5Vb_FoARdGtHRh173YKVbhdBUT0PLS0O_9cagQsu5V8-mmzFLVuT_MZlBf8vsiXe0ghtJ7fACsWOZcumkGewPvvgXy?key=OipCbcSyBCJruikwPmtpTQ

Example of cart personalized in-app messaging

 

 

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.

 

Want to discuss this topic with the community? Start a thread in our Discussion Forum.

Be the first to reply!