# Gateway Tracking Templates

{% hint style="warning" %}
**Important:** Refer to [Configure Gateway Tracking Settings](https://help.impact.com/brand/what-would-you-like-to-learn-about/account-administration/program-settings/tracking-settings/configure-gateway-tracking-settings) before continuing with this help article.
{% endhint %}

#### Program Tracking Template

* This is where you can define query string parameters for all tracking links within your program. These parameters will be applied to links from all of your media sources and partners. Refer to the *Query string parameters reference* below for help.

  <div data-with-frame="true"><figure><img src="https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-422e6e8b326b14a80daa5ee21aab986ed660b696%2F3d76da12dc97e78d0ddf7cd246112694cb9c28a3a4688b56ff4842e2b7200ce2.png?alt=media" alt=""><figcaption></figcaption></figure></div>

#### Partner Tracking Template

* This is where you can add global query string parameters to partner tracking links. If a click comes from a partner's tracking link, the parameters you establish in the template will be applied. This is a good place to add UTM Parameters. Learn how to [Collect Campaign Data with Google Analytics](https://help.impact.com/brand/what-would-you-like-to-learn-about/platform-features/tracking/set-up-tracking/collect-campaign-data-with-google-analytics) using UTM parameters. Refer to the *Query string parameters reference* below for help.

  <div data-with-frame="true"><figure><img src="https://4048883401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-1fbe52bc324fa7e80a9edb528405f8deb93850c1%2F110927caf82107f1d1887d89d1d502229a1b0a7d4cc402ac955fbe597d24c46a.png?alt=media" alt=""><figcaption></figcaption></figure></div>

#### Query string parameters for tracking templates

* Parameters with curly brackets ({}) are dynamic query strings that will automatically populate with a value when the link is clicked
* Hardcoded values are supported—simply add a value without curly brackets ({}), and it will always be passed on a click.
* Custom values are supported, however, we recommend [contacting support](https://app.impact.com/support/portal.ihtml?createTicket=true) to discuss how to use them.
* Use underscores to add multiple parameters within a single query string.

<details>

<summary>Query string parameters reference</summary>

| URL Parameter                               | Example                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `{clickid}`                                 | 2uz3sQWFlxyJRcqwUx 0Mo34VUkiyviUnPwZbQM0 | <p><strong>Click ID</strong></p><p>Unique ID assigned by impact.com associated with the click event. When a tracking link is clicked, this will populate with the unique click ID associated with the customer.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `{iradid}`                                  | 828416                                   | <p><strong>impact.com Ad ID</strong></p><p>Unique ID associated with the ad that is associated with the click event. When a tracking link is clicked, this will populate with the Ad ID associated with the click.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `{ircid}`                                   | 10306                                    | <p><strong>impact.com Campaign/Program ID</strong></p><p>Unique ID associated with your impact.com program (campaign). When a tracking link is clicked, this will populate with the campaign/program ID associated with the click.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `{irpid}`                                   | 1234567                                  | <p><strong>impact.com Partner ID</strong></p><p>Unique ID assigned to the partner that drove the click. When a tracking link is clicked, this will populate with the partner ID associated with the click.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `{iradname}`                                | My Ad                                    | <p><strong>impact.com Ad Name</strong></p><p>The name you've assigned to the ad that was associated with the click. When a tracking link is clicked, this will populate with the ad's name.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `{iradtype}`                                | Banner                                   | <p><strong>impact.com Ad Type</strong></p><p>When you create ads in impact.com, you define the type of the ad (e.g., banner, text, image) before uploading creative. When a tracking link is clicked, this will populate with the ad type.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `{iradsize}`                                | 100x100                                  | <p><strong>impact.com Ad Size</strong></p><p>impact.com requires you to specify an ad's size. When a tracking link is clicked, this will populate with the size of the ad that you specified when it was created.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `{prodsku}`                                 | 123ABC987                                | <p><strong>Product SKU</strong></p><p>Unique SKU assigned to the product associated with the ad. When a tracking link is clicked, this will populate with the product SKU value associated with the ad.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `{irmpname}`                                | CoyoteInfluencer                         | <p><strong>impact.com Partner Name</strong></p><p>The name of the partner in impact.com. When a tracking link is clicked, this will populate with the partner's name associated with the click.</p><p><strong>Note:</strong> Partners may have duplicate names or names with special characters, which will likely skew your data analytics findings. To ensure accurate data, use <code>{irpid}</code> instead. (You can look up partner IDs on the <a href="https://app.impact.com/secure/advertiser/report/viewReport.report?handle=adv_mp_date_joined"><em>Partner Listing Report</em></a>.)</p>                                                                                                                                                                                  |
| `{irmptype}`                                | mediapartner                             | <p><strong>impact.com Media Type</strong></p><p>This will return either <em>mediapartner</em> or <em>mediasource</em> depending where the click originated from—either from one of your partners, or from one of your media sources (such as traffic from a search engine).</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `{sharedid}`                                |                                          | <p><strong>Shared ID</strong></p><p>Partners can append a Shared ID value as a query string parameter to their own tracking links, which is then visible to you in reporting. When a tracking link is clicked, this will automatically populate with the Shared ID a partner has specified, if available.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `{mp_value1}`, `{mp_value2}`, `{mp_value3}` | Deal                                     | <p><strong>Partner Custom Value</strong></p><p>This will populate with a custom value you can assign to a partner. <strong>This setting is applied across your entire account, not just for a single Program/Campaign</strong>.</p><p>Custom values can be assigned to partners in <strong>Partners → Partners → Actions → Tracking</strong>. From here, you can define up to three custom values for each partner. These are most commonly used to label partners (e.g., influencer, Cashback/Loyalty, Deal, etc.).</p><p>You can also bulk upload and edit partner custom values in <strong>Partners → Partners → Bulk Edit</strong>. You will need an Excel or CSV file with the Partner IDs as well as the Partner Values themselves that you want to assign to that partner.</p> |
| `{timestamp}`                               | 1598556546                               | <p><strong>Timestamp</strong></p><p>Generates the UNIX timestamp when the click event occurred. When a tracking link is clicked, this will be appended as a query string parameter. This can be used as a cache-buster in some platforms.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `{randint}`                                 | 1,234,567                                | <p><strong>Random Integer</strong></p><p>Generates a random integer between 0–9,999,999 when a tracking link is clicked.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `{impacttest}`                              | 1                                        | <p><strong>Test</strong></p><p>Append this parameter when you test your tracking links.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `{irmpgroupname}`                           | ”influencers”,”preferred”                | <p><strong>Group name</strong></p><p>Lists one or multiple groups that a partner belongs to within a query string.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `{CUSTOM}`                                  |                                          | <p><strong>Custom</strong></p><p>Use a custom dynamic query string parameter. impact.com recommends contacting support (or your CSM) to discuss your specific use case.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

</details>

#### Parameter deduplication explained

The various parameters specified for an ad in a program can sometimes lead to duplicate values being returned, especially when multiple parameters have the same name. Duplicate parameter values can create a discrepancy between impact.com's reporting and the reporting of your wider marketing team's tools, such as Google Analytics. To avoid this, impact.com considers only a single parameter value in the following order of priority (from highest to lowest).

This order prioritizes brand-specified parameters over partner-specified ones:

<details>

<summary>Parameter type reference</summary>

| Parameter type            | Description                                                                                                                                                                                                                      |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ad landing page           | The parameters you configure within your ad’s landing page metadata. (These parameters always take precedence unless a deep link is provided with the request, in which case deep link params override the landing page params.) |
| Program tracking template | The parameters you configure under **Settings → Gateway** (found in the *Tracking* section) → **Program Tracking Template**.                                                                                                     |
| Partner gateway           | The parameters you configure under **Settings → Gateway** (found in the *Tracking* section) → **Program Tracking Template**.                                                                                                     |
| Passthrough variable      | The parameters that your partners can specify within a deep link, using the `p.` notation. (In rare cases, passthrough parameters can override parameters that you specify.)                                                     |
| Deep link query string    | The parameters that your partners can use to pass a deep link containing pre-defined landing page query string parameters.                                                                                                       |

</details>

<details>

<summary>Example</summary>

If the `utm_medium` parameter is appended to both the landing page deep link used by a partner and your own *Program Tracking Template* as shown below:

* *Deep Link URL:* `https://brand.example?utm_medium=seo`
* *Program Tracking Template:* `https://brand.example?utm_medium=affiliate`

  The final landing page will be:
* *Program Tracking Template:* `https://brand.example?utm_medium=`**`affiliate`**

  This is because the *Program Tracking Template* parameter was defined by you and is thus given a higher priority than the one defined by your partner.

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.impact.com/brand/what-would-you-like-to-learn-about/account-administration/program-settings/tracking-settings/gateway-tracking-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
