This article describes how to track of a visitor's favorite attribute over a rolling time period. A visitor favorite can apply to any attribute associated with visitor activity, such as product category, site section, product brand, etc. A rolling time period is a length of time that always ends on the current day.

In this article:

Table of Contents Placeholder

How It Works

In this example we will track a visitor's favorite product category viewed over the past 10 days. The solutions includes the following components:
  • Event attribute to track: page_subcategory
  • Visit tally to track occurrences of the event attribute: vtTlyPageSubcategory
  • Visitor timeline attribute based on rolling time period: vrTml10DayPageSubcategory
  • Visitor tally based on rolling time period: vrTlyPrevious10DaysPageSubcategory
  • Master visit tally to capture all occurrences: vtTlyMasterPageSubcategory


Visit Tally

This tally will contain the values of page_subcategory seen in the current visit session.

  1. Add a visit-scoped tally attribute named vtTlyPageSubcategory.
  2. Add the Increment Tally enrichment to increment this tally by 1 for every occurrence of  page_subcategory.

Visitor Timeline

This timeline will contain the visit tallies from the last 10 days.

  1. Add a visitor-scoped timeline named vrTml10DayPageSubcategory.
  2. Add the Update Timeline enrichment with the following settings:
    • Record event: Time of event received
    • Capture attribute data:  vtTlyPageSubcategory
  3. Add the Set Expiration For Timeline Events enrichment and set the timeline to 10 days.

Visitor Tally

This tally will contain the page subcategories seen by the visitor over the last 10 days, not including the present visit. 

  1. Add a visitor-scoped tally named vrTlyPrevious10DaysPageSubcategory.
  2. Add the Set Rolling Sum Based on Timeline enrichment with the following settings:
    • Rolling Sum Values of: vtTlyPageSubcategory
    • Captured in Timeline: vrTml10DayPageSubcategory

Master Visit Tally

This tally will contain the favorite page categories from all visits that ocurred within the past 10 days. It increments based on current events in the visit as well as the tally values from previous visits. This tally automatically generates a "favorite" attriubute that will contain the category with the maximum value.

  1. Add a visit-scoped tally named vtTlyMasterPageSubcategory.
  2. Add the Increment Tally enrichment with the following settings:
    • Based on the value in: page_subcategory
    • Increment by Custom Value: 1
  3. Add the Increment Tally by Tally enrichment with the following settings:
    • Based on the values in: vrTlyPrevious10DaysPageSubcategory


Version history
Last update:
‎10-29-2020 10:16 AM
Updated by: