---
schema_version: "1"
id: 8df35518b7831dac4b859c4143a53ac1dcb1145cc90a91decb7bc504d3e48f1c
title: WAT() and WATP()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/content/mc-ampscript-reference-content-wat.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-content/mc-ampscript-reference-content-wat.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d47fc9a5f0ee689d9d3cf6555d0f0d5e21a45502d48ec1ee5023bd585b62649a
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# WAT() and WATP()

Returns the values of the Web Analytics Tracking (WAT) parameter with the specified external key. Contact Salesforce support to set the external key values in the Web Analytics Connector. The function substitutes optional parameters for calls to the WATP function within the tracking parameter set in the Sender Profile.

The WAT call parameters must use constant or numeric values. Variable, attribute, field, and faction values don't allow job-level resolution to the desired link query string parameters.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
WAT(parameterSetKey,
    parameterValue1, [parameterValue2] ... )
```

The `WAT()` function has two parameters:

- `parameterSetKey` (string): Required. The key of the WAT parameter set.
- `parameterValue1` (string): Required. Value used to replace the WATP function tracking parameter.

You can optionally append additional parameter values (`parameterValue2, parameterValue3...`) to the end of the function.

## Usage

```
WAT('Omniture','1234')
```

This example returns the value of the Omniture tracking parameter with 1234 substituted for references to Omniture within the tracking parameter. The parameter for the WAT function specifies the ordinal of the parameter inside the tracking parameter set in the Sender Profile Analytics Profile.

```
WAT('Omniture','1234','5678')
```

This example returns the value of the Omniture tracking parameter with 1234 substituted for references to WATP(1) within the tracking parameter. This call also substitutes 5678 for references to WATP(2) within the tracking parameter.
