Using response tokens
-
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:
- Platform Web SDK: See Install the SDK in the Platform Web SDK overview guide.
- at.js: See Download at.js.
-
In Target, click Administration > Response Tokens.
-
Activate the desired response tokens, such as
activity.id
andoffer.id
.The following parameters are available by default:
Type Parameter Notes Built-in Profiles profile.activeActivities
Returns 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.isFirstSession
Returns “true” or “false.” profile.isNewSession
Returns “true” or “false.” profile.daysSinceLastVisit
Returns the number of days since the visitor’s last visit. profile.tntId
Returns the visitor’s tntID profile.marketingCloudVisitorId
Returns the visitor’s Experience Cloud Visitor ID. profile.thirdPartyId
Returns the visitor’s third-party ID. profile.categoryAffinity
Returns the visitor’s favorite category. profile.categoryAffinities
Returns an array of the visitor’s top 5 categories as strings. Activity activity.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.Geo geo.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.trafficAllocationId
Returns 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.trafficAllocationType
Return “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. -
(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.
-
Create an activity.