Automate Browse-Abandonment Responses

When Sailthru detects that a known user has browsed your site without making a purchase, your automated, personalized messages can help convert each browser into a buyer.

How It Works

Sailthru detects when each visitor has ended their session on your site by identifying a lapse in pageviews that lasts more than 30 minutes.

Many of these site visitors will have previously been identified by Sailthru when they last clicked a link to your site in email, logged in or registered on your site, or made a purchase. If the abandoned browsing session is held using the same web browser as above, and the Sailthru cookie is still present, Sailthru links the abandoned session to the known user profile on your account.

Using a single Lifecycle Optimizer (LO) flow, you can:

  • automate the detection of abandoned sessions by using a Browse Abandoned entry
  • restrict these flows to users who
    • visited a minimum number of pages of a certain type (based on URL path or pattern)
    • spent a minimum amount of time on site
  • automate follow-up communication to help convert each known browser into a buyer, personalizing content based on the user and their most recently viewed items

To prevent unnecessary messaging, the flow will not be started if the user has made a purchase or retained an item in their cart since the last applicable pageview.


Interaction with Cart Abandonment and Purchases

At the close of the 30 minute window, when a session is considered to have ended, Sailthru checks to determine whether an item has been added to (and remains within) the user’s cart or if the user has made a purchase since the last registered pageview. If either had occurred, a Browse Abandoned flow is not initiated.

After the 30-minute window, the possible cases are evaluated in the following sequence:

  • If the user has made a purchase
      • No Abandoned Cart or Abandoned Browse entries are activated.
      • Flows with Purchase entries would have been activated immediately upon purchase.
  • If an incomplete cart exists
      • Flow(s) with the Abandoned Cart entry are activated.
      • Flow(s) with the Abandoned Browse are not activated.
  • If no incomplete cart exists
    • Flow(s) with the Abandoned Browse entry are activated.
    • Flow(s) with the Abandoned Cart are not activated.


Before creating and activating a Browse Abandoned flow, ensure that the following prerequisites are in place:

  1. The latest Sailthru JavaScript tag. Users who click links in email will automatically be identified and cookied when they arrive on site. If you identify a site visitor by other means (login or purchase), it is also recommended that you set their Sailthru cookie using the user API or userSignUp JavaScript function.
  2. An up-to-date Content Library being crawled by Sailthru Tag or updated by the Content API.
  3. For commerce sites, it is recommended that you are passing purchases and incomplete carts through the Purchase API or the JavaScript API calls. This helps us automatically distinguish between sessions with an abandon cart and sessions that were truly browse abandonment
  4. A customized Browse Abandon template. Default templates are provided by Sailthru and are configured to receive the array of applicable URLs the user visited prior to abandoning the session.

Configuring the Browse Abandoned Entry

Similar to Cart Abandoned entries, the Browse Abandoned entry monitors any pageview where the Sailthru Tag is placed within your site. When a user’s session ends, as determined by the industry-standard 30-minutes after last activity, a customer matching the entry settings and with and empty customer profile cart will enter the flow.

When you select “Browse Abandoned” as an entry type, Lifecycle Optimizer will automatically display our best practice flow layout for your account. Simply, this layout consists of:

  • A wait period (additional to the 30 minutes after a session ended)
  • Check for additional pageviews
  • Check for purchases, if applicable to your Sailthru account
  • Send Email action

You can easily modify this default layout, for instance, if you’d like to add an AB test based on wait duration.

Entry Options


When you select the Browse Abandoned entry in Lifecycle Optimizer, you can modify the default thresholds for number of pageviews and the total length of the session (time on site). These are the minimum levels that must be met for the session to start a flow. If you configure URL targeting rules, than the number of pageviews only applies to URLs that match your rules.


URL Targeting

You can optionally add URL filters to that determine which URLs count for the pageview threshold and session length thresholds, as well which URLs are then passed on to the templates in your flow as viewed content. There are three types. You can add any number of each. If a visited URL matches any rule, it will be counted.

Filter type What it does Example entry
Exact Match Matches a specific webpage address (URL)
Contains Looks for a substring of the address that matches exactly what is entered /product/
Pattern Match Uses Regular Expression to target specific groups of similar pages https?://[^/]+($|/(?!admin)/?.*$)Matches every page except your /admin pages


  • If there are multiple URL Targeting Rules, only *one* rule will need to be met, in order for a user to enter the flow
  • There is no limit of URLs or rules you can input
  • Filters affect “number of pageviews” and the “total length of session” in the conditions threshold
  • For contains and pattern, URL paths are case-sensitive in accordance with URL standards. Protocol (http:// or https://) is not case sensitive for exact match.


To match:

Use: .*product-.*-registry

(You must lead off with a wildcard if not specifying the full domain.)


Selecting Content for your Abandonment Follow-up Message

We send the last 10 pageviews to the template. The personalize Zephyr function to quickly sort and display these viewed items.

Default Browse Abandon Templates

All Sailthru accounts are preloaded with browse abandonment templates. You can use these templates with your own logo and footer details, or use them as examples to create your own templates.

These templates are expertly crafted by our in-house Implementation team. They also include suggested call-to-action phrases prepared by our customer-focused Strategy and Optimization team. Expect additional templates to be released soon.

Template Name What it displays Default Pageview Sorting Best For Example Image
Sample Browse
Abandon: 1 hero
One item session_interest Commerce Screen Shot 2018-03-28 at 7.52.29 PM
Sample Browse
Abandon: 1 hero and 4 small items
1 hero item, and
4 sub-items
displayed in a row
session_interest Commerce browse-abandon-template-preview-5-items

Each template will display items from the session. For templates that are configured to display multiple content items, they will be selected and ordered based on the chosen algorithm. All default to the session_interest algorithm, but this can easily be changed.

If the available content slots is greater than the number of session pageviews, the template uses a fallback mechanism to bring in your most popular (most viewed) products.

Skip the HTML Tab and Easily Configure Settings

When viewing the template in the Template Editor, many settings can be configured using the Setup box in the Advanced tab. This includes call-to-action text, template colors/styles and the default sorting method for the browse session.

Testing and Previewing

Use the “Test Vars” box in the Preview tab to mimic a browse abandon session for your site, which will allow products/content to appear in the template. In the Test Vars box, replace only the URLs with URLs from your Sailthru Content Library. Hit Refresh to see the items displayed in the template below.

Alternatively, if you remove the contents of the Test Vars box and click Refresh, the template’s fallback mechanism will display your most-popular content.

Customizing Browse Abandon Templates

While you can use the default Browse Abandon templates in your account and perform some customizations on the Advanced tab of the template editor, you may want to use this section if you intend to make modifications of the HTML code or personalize Zephyr function.

Sorting Type What it Does (Up to 10 URLs included in the browse session) personalize Algorithm Selection to Use
Recently Viewed Pageviews in reverse-chronological order, as determined by page start times (in the event multiple tabs close at once) recently_viewed
Browse Duration First item is the longest-viewed page in the session browse_duration
Session Interest Items are ordered based on Sailthru’s standard interest ratings session_interest

The personalize function will output a list (array) of content that mimics the format of a Sailthru Content Data Feed.

Here’s an example use of the personalize function to display the most recently viewed items.

{my_pageviews = personalize({
"algorithm" : "recently_viewed",
"session": session

The Personalize function will sort the session pageviews by what was most recently viewed, as the defined sort algorithmIn the above example, “my_pageviews” is an arbitrary name we’ve used to store the list of pageviews after it is sorted. When the template is sent:

  1. The function will also use your Content Library to display details for each page, such as title, description, price, etc
  2. The sorted content and its details will be accessible using {my_pageviews}

Here’s a detailed example for a session that had two pageviews:

Using this code: {my_pageviews} will display:
{my_pageviews = personalize({
"algorithm" : "recently_viewed",
"session": session
   "title":"Sailthru Item 2",

Using the above example, you would then be able to use {my_pageviews} in a similar way to {content} for content data feeds.

Additional Considerations

What if there are multiple views of the same URL?

Personalize will de-duplicate multiple views of the same URL, leaving only one instance to display in its results. It will use the view with the longest duration or most-recent page-open time, depending on the sorting mechanism requested.

What if the pageview was not in my content library?

The personalize function will continue working through the list and quietly ignore any URL it cannot locate in your content library. If you’re unsure about your content library matching your URL rules, you may consider using an assert function to cancel the send if there is no output from the personalize function.

What’s a good way to test my template structure?

The session pageviews are passed at send time, and are not stored on the profile. To test, we recommend pasting in an example session object into the “Test Vars” of the Template editor.

NOTE: In the code below, you should replace the Sailthru marketing URLs with URLs you know exist in your content library. The template will show up empty, otherwise.

  1. Open the template in the template editor.
  2. In the Code tab, insert the following code.
    {my_pageviews = personalize({
     "algorithm" : "recently_viewed",
     "session": session
  3. In the Preview tab, select Test Vars from the drop-down, and then insert the following sample session object. You must change the URLs to match URLs that exist in your Content Library, and you can optionally edit the other included session attributes.
    {"session": {  

What’s the best way to test send with real session information?

There are two best-practice options you may choose from:

  1. Create a check at the start of the flow to look at a custom field. Apply this custom field only to users (such as your staff) that you want to have receive the email.
  2. Use a template “assert” function (in Advanced>Setup in the Template Editor) to check against the email address and match. For example, to match all email addresses, you would use assert(contains(,