Using response tokens

  1. Ensure that you are using Platform Web SDK version 2.6.0 (or later) or at.js version 1.1 (or later).

    For more information:

  2. In Target, click Administration > Response Tokens.

  3. Activate the desired response tokens, such as activity.id and offer.id.

    The following parameters are available by default:

    TypeParameterNotes
    Built-in Profilesprofile.activeActivitiesReturns an array of the activityIds the visitor is qualified for. It increments as users are qualified. For example, on a page with two Target requests delivering two different activities, the second request includes both activities.
    profile.isFirstSessionReturns “true” or “false.”
    profile.isNewSessionReturns “true” or “false.”
    profile.daysSinceLastVisitReturns the number of days since the visitor’s last visit.
    profile.tntIdReturns the visitor’s tntID
    profile.marketingCloudVisitorIdReturns the visitor’s Experience Cloud Visitor ID.
    profile.thirdPartyIdReturns the visitor’s third-party ID.
    profile.categoryAffinityReturns the visitor’s favorite category.
    profile.categoryAffinitiesReturns an array of the visitor’s top 5 categories as strings.
    Activityactivity.name
    activity.id
    experience.name
    experience.id
    offer.name
    offer.id
    Details of the current activity.
    Note that values for offer parameters are evaluated on the experience level.
    Geogeo.country
    geo.state
    geo.city
    geo.zip
    geo.dma
    geo.domainName
    geo.ispName
    geo.connectionSpeed
    geo.mobileCarrier
    See Geo for more information about using geo targeting in activities.
    Traffic Allocation Method
    (Applies to Auto-Target and Automated Personalization activities only.)
    experience.trafficAllocationIdReturns 0 if a visitor received an experience from being in “control” traffic and 1 if a visitor received an experience from the “targeted” traffic distribution.
    experience.trafficAllocationTypeReturn “control” or “targeted.”

    User profile attributes and Customer Attributes also display in the list.

    NOTE
    Parameters with special characters do not display in the list. Only alphanumeric characters and underscores are supported.
  4. (Conditional) To use a profile parameter as a response token, but the parameter has not been passed through a Target request and, thus, has not loaded into the Target UI, you can use the Add Response Token button to add the profile to the UI.

    Click Add Response Token, provide the token name, then click Activate.

  5. Create an activity.