Back

This article describes the Tally attribute and how to use it in the Universal Data Hub (UDH) product.

In this article:

Table of Contents Placeholder

How It Works

The Tally attribute maintains a count of specific values that occur across many events, which provides a view into the intent and browsing preferences of a visitor. You can use the Tally attribute to assign badges, segment visitors into relevant audiences, or to create new string attributes.

Each Tally attribute creates a corresponding visitor string attribute by default. This newly-created string attribute has the same name as the tally with the word "(favorite)" appended and automatically captures the name of the item with the highest tally value.

Key/Value Pairs

Data collected from the Tally attribute is organized as a collection of key/value pairs.

  • Key represents the item that occurred
  • Value represents the number of times it occurred

Example

The following table illustrates an example of a tally named "Category Viewed", which counts the number of times a product category was viewed and then creates a visitor string attribute for the item with the highest value.

Tally Attribute: "Category Viewed"
Tally Key Tally Value
"Shoes" 7
"Pants" 1
"Shirts" 3
"Jeans" 10
"Shorts" 1
String Attribute: "Category Viewed (favorite)" "Jeans"

Available Experiments

Enabling Experiments for the Integer attribute type allows you to change the type of an existing Tally attribute type from decimal to integer or to select from two (2) Number attribute types when creating a new Tally attribute:

  • Decimal
    • Default value.
    • Needed for attributes that represent monetary values or integers.
  • Integer
    • Useful for whole number attributes that represent quantities, counters or scores.
    • The Integer value type, and the ability to select between the two, is currently available as an experiment only and must enabled prior to use.
    • To learn more about how to enable this feature, see Experiments.

Add a Tally Attribute

Use the following steps to add a Tally attribute:

  1. In the left sidebar, go to Audience Stream > Visitor/Visit Attributes.
  2. Click + Add Attribute on the top-right.
    The Add Attribute dialog displays.
  3. Under Choose a scope, click Visit or Visitor.
    Add a Number Attribute_Choose Visit or Visitor.jpg
  4. Click Continue.
  5. In the Data Type listing, click the Tally radio button to select and then click Continue.
  6. In the Title field, enter a descriptive name for the Tally instance.
    Add a Tally Attribute_Attribute Properties.jpg
    This is a required field. The title must not exceed 250 characters and must only contain ASCII characters (0 to 127).
  7. (Optional) In the Notes field, provide helpful comments or recommendations.
  8. Check the Restricted Data checkbox if the attribute will include personal information about the visitor. (Learn more)
  9. Check the AudienceDB checkbox to make this attribute available to AudienceDB.
    Enabling will send data from this Number attribute to Amazon Redshift.

    This feature is available to DataAccess users only and requires AudienceDB to be enabled in the profile. (Learn more)

  10. Proceed to the next section to add an enrichment.

Add an Enrichment

In order to set or update a Tally attribute, you must first apply an Enrichment.

Use the following steps to apply an enrichment:

  1. Click Add Enrichment and select one of the following from the drop-down list:
    • Increment Tally
      Increment a number within a tally based on a set of conditions.
    • Increment Tally Value
      Increment a specific value within a tally based on a set of conditions.
    • Increment Tally by Tally
      Increment the values in a tally by the values found in another tally.
    • Increment Tally by Set of Strings
      Increment the values in a tally based on the values found in a Set of Strings.
    • Set Rolling Average Based on Timeline
      Set the tally to the rolling average values of the tally captured within a timeline.
    • Set Rolling Sum Based on Timeline
      Set the tally to the rolling sum values of the tally captured within a timeline.
    • Set Tally by Corresponding Arrays
      Set the tally to the values defined in two corresponding arrays.
    • Remove Tally
      Remove tally based on set of conditions.
    • Remove an Entry in a Tally
      Remove the following entry in a tally based on a set of conditions.
    • Increment by 1 for Each Item in an Array
      Increment by one (1) for each item in an array.
  2. Configure the Enrichment you selected.
    • Under For this tally, increment the value based on, select an attribute from the drop-down list.
    • In the by field, select an attribute from the drop-down list.
  3. From the When drop-down list, select one of the following to choose when to trigger the enrichment.
    This step tells AudienceStream when to listen for changes that require updating the Tally attribute.
    • New Visitor
      Enrichment will occur when the visitor is new to your site.
    • New Visit
      Enrichment will occur on a new visit by a visitor.
    • Any Event
      Enrichment will occur anytime a page event occurs.

      Choose this option if you are not sure what to select.

    • Visit ended
      Enrichment will occur when a visit ends.
  4. To add more enrichments, repeat the steps in this section.
  5. Proceed to the next section to create a rule and apply rule conditions.

Apply Rule Conditions

Applying a rule is not mandatory but is highly recommended. Rules make it possible to more finely control when and where an enrichment triggers and provides additional an trigger that supersedes what is configured in the WHEN options.

Use the following steps to apply a one or more rules:

  1. To apply a predefined rule, select a predefined rule from the Choose a rule drop-down list.
    Add a Number Attribute_Add Predefined Rule.jpg
    Once selected, the rule is attached.
  2. To apply a new rule, click Create Rule. (Learn more).
    Adding a new rule using the Enrichments dialog automatically applies it to the enrichment.
  3. To add more rules, use the steps above to add another predefined rule or create a new rule.
  4. When complete, click Finish.

Save and Publish

Use the following steps to verify your changes, save your work, and publish the change:

  1. View and confirm your changes.
    By default, applying the "Category Viewed" Tally attribute creates a "Category Viewed (favorite)" string attribute, as shown in the following example.
    Add a Tally Attribute_Duplicate Favorite Created.jpg
  2. Click Save/Publish at the top-right corner to confirm the changes you introduced in your profile.

    If you delete a Tally attribute, the corresponding "(favorite)" attribute is removed automatically when the browser is refreshed.