This function returns a specific set of Web Analytics Tracking parameters and values. Once the WAT parameters and values are returned, they can be manually appended to any URLs as needed. By default, parameter names and values must be static values.



Ordinal Type Required Description
1 String True External key of the WAT parameter set
2 String True Value for parameter 1 in the set
n String False Value for parameter 2 in the set (see note)

NOTE: Additional parameter values can be appended as arguments.

The default Web Analytics Connector (WAC) configured by Marketing Cloud Support automatically appends a set of URL parameters and values to every link at email send time. This string can include in line personalization strings and AMPscript.

The WAC is enabled with the SPECIAL_LINK_PARAMS and ADDITIONAL_EMAIL_ATTRIBUTES business rules. The details are stored in a Brand Tag named email_XtraLinkParameters.

Like the WAC, the WAT function requires the SPECIAL_LINK_PARAMS business rule. In addition, a Brand Tag named ENHANCED_WEB_ANALYTICS_TRACKING must be enabled. Unlike the email_XtraLinkParameters set of parameters, these analytics strings are stored with key values:


At send time, WAT parameters and values are added before WAC parameters and values.

In this example, the WAT parameter and value is retrieved, set and appended to a login URL:

Example 1


var @loginURL

set @loginURL = concat("https://limedash.com/login", WAT("verifyParams", "DfkSyhtdtYRBb"))

<a href="%%=redirectto(@loginURL)=%%" alias="Login">Login</a>


<a href="https://limedash.com/login?verify=DfkSyhtdtYRBb" alias="Login">Login</a>

To overcome for the static value limitation, the TreatAsContent function can be used to evaluate the WAT function prior to appending it to the URL:

Example 2


var @firstName
var @lastName
var @wat
var @profileURL

set @firstName = AttributeValue("FirstName") /* value from attribute or DE column in send context */
set @firstName = "Nora" /* or a literal value */

set @lastName = AttributeValue("LastName") /* value from attribute or DE column in send context */
set @lastName = "Taylor" /* or a literal value */

set @wat = treatascontent(concat('%%=WAT("nameParams","', @firstName,'","', @lastName,'")=%%'))

set @profileURL = concat("https://limedash.com/profile", @wat)

<a href="%%=redirectto(@profileURL)=%%" alias="Profile">Profile</a>


<a href="https://limedash.com/profile?fName=Nora&lName=Taylor" alias="Profile">Profile</a>