> For the complete documentation index, see [llms.txt](https://help.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.impact.com/brand/zh/what-would-you-like-to-learn-about/account-administration/program-settings/tracking-settings/gateway-tracking-templates.md).

# 网关跟踪模板

{% hint style="warning" %}
**重要：** 请参阅 [配置网关跟踪设置](/brand/zh/what-would-you-like-to-learn-about/account-administration/program-settings/tracking-settings/configure-gateway-tracking-settings.md) 然后再继续阅读本文帮助文章。
{% endhint %}

#### 项目跟踪模板

* 在这里，您可以为项目中的所有跟踪链接定义查询字符串参数。这些参数将应用于来自您所有媒体来源和合作伙伴的链接。请参阅 *查询字符串参数参考* 下方获取帮助。

<div data-with-frame="true"><figure><img src="/files/f96cda457b7f69ac56661664da014e2d74fc2c0f" alt=""><figcaption></figcaption></figure></div>

#### 合作伙伴跟踪模板

* 在这里，您可以向合作伙伴跟踪链接添加全局查询字符串参数。如果点击来自合作伙伴的跟踪链接，则您在模板中设置的参数将被应用。这是添加 UTM 参数的好地方。了解如何 [使用 Google Analytics 收集活动数据](/brand/zh/what-would-you-like-to-learn-about/platform-features/tracking/set-up-tracking/collect-campaign-data-with-google-analytics.md) 使用 UTM 参数。请参阅 *查询字符串参数参考* 下方获取帮助。

<div data-with-frame="true"><figure><img src="/files/dff18c1b014d9f7e7d442a514d1e17130b458808" alt="" width="563"><figcaption></figcaption></figure></div>

#### 跟踪模板的查询字符串参数

* 带有花括号（{}）的参数是动态查询字符串，在点击链接时会自动填充一个值
* 支持硬编码值——只需添加不带花括号（{}）的值，它在点击时将始终被传递。
* 支持自定义值，不过我们建议 [联系支持团队](https://app.impact.com/support/portal.ihtml?createTicket=true) 来讨论如何使用它们。
* 使用下划线在单个查询字符串中添加多个参数。

<details>

<summary>查询字符串参数参考</summary>

| URL 参数                                      | 示例                                       | 说明                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------------------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `{clickid}`                                 | 2uz3sQWFlxyJRcqwUx 0Mo34VUkiyviUnPwZbQM0 | <p><strong>点击 ID</strong></p><p>由 impact.com 分配并与点击事件相关联的唯一 ID。当跟踪链接被点击时，这里将填充与客户相关联的唯一点击 ID。</p>                                                                                                                                                                                                                                                                       |
| `{iradid}`                                  | 828416                                   | <p><strong>impact.com 广告 ID</strong></p><p>与点击事件相关联的广告唯一 ID。当跟踪链接被点击时，这里将填充与点击相关联的广告 ID。</p>                                                                                                                                                                                                                                                                            |
| `{ircid}`                                   | 10306                                    | <p><strong>impact.com 活动/项目 ID</strong></p><p>与您的 impact.com 项目（活动）相关联的唯一 ID。当跟踪链接被点击时，这里将填充与点击相关联的活动/项目 ID。</p>                                                                                                                                                                                                                                                        |
| `{irpid}`                                   | 1234567                                  | <p><strong>impact.com 合作伙伴 ID</strong></p><p>分配给带来点击的合作伙伴的唯一 ID。当跟踪链接被点击时，这里将填充与点击相关联的合作伙伴 ID。</p>                                                                                                                                                                                                                                                                      |
| `{iradname}`                                | 我的广告                                     | <p><strong>impact.com 广告名称</strong></p><p>您为与点击相关联的广告指定的名称。当跟踪链接被点击时，这里将填充广告名称。</p>                                                                                                                                                                                                                                                                                     |
| `{iradtype}`                                | 横幅                                       | <p><strong>impact.com 广告类型</strong></p><p>当您在 impact.com 中创建广告时，会在上传创意素材之前定义广告类型（例如：横幅、文本、图片）。当跟踪链接被点击时，这里将填充广告类型。</p>                                                                                                                                                                                                                                                  |
| `{iradsize}`                                | 100x100                                  | <p><strong>impact.com 广告尺寸</strong></p><p>impact.com 要求您指定广告尺寸。当跟踪链接被点击时，这里将填充您在创建广告时指定的广告尺寸。</p>                                                                                                                                                                                                                                                                       |
| `{prodsku}`                                 | 123ABC987                                | <p><strong>产品 SKU</strong></p><p>分配给与广告相关联的产品的唯一 SKU。当跟踪链接被点击时，这里将填充与广告相关联的产品 SKU 值。</p>                                                                                                                                                                                                                                                                                |
| `{irmpname}`                                | CoyoteInfluencer                         | <p><strong>impact.com 合作伙伴名称</strong></p><p>impact.com 中合作伙伴的名称。当跟踪链接被点击时，这里将填充与点击相关联的合作伙伴名称。</p><p><strong>注意：</strong> 合作伙伴可能具有重复名称或包含特殊字符的名称，这很可能会影响您的数据分析结果。为确保数据准确，请使用 <code>{irpid}</code> 代替。（您可以在 <a href="https://app.impact.com/secure/advertiser/report/viewReport.report?handle=adv_mp_date_joined"><em>合作伙伴列表报告</em></a>.)</p>                             |
| `{irmptype}`                                | mediapartner                             | <p><strong>impact.com 媒体类型</strong></p><p>这将返回以下任一值 <em>mediapartner</em> 或 <em>mediasource</em> ，具体取决于点击的来源——要么来自您的某个合作伙伴，要么来自您的某个媒体来源（例如来自搜索引擎的流量）。</p>                                                                                                                                                                                                               |
| `{sharedid}`                                |                                          | <p><strong>共享 ID</strong></p><p>合作伙伴可以将 Shared ID 值作为查询字符串参数附加到自己的跟踪链接中，然后您可以在报告中看到。当跟踪链接被点击时，如果可用，这里将自动填充合作伙伴指定的 Shared ID。</p>                                                                                                                                                                                                                                        |
| `{mp_value1}`, `{mp_value2}`, `{mp_value3}` | 优惠                                       | <p><strong>合作伙伴自定义值</strong></p><p>这里将填充您可分配给合作伙伴的自定义值。 <strong>此设置适用于您的整个账户，而不仅仅是单个项目/活动</strong>.</p><p>可在 <strong>合作伙伴 → 合作伙伴 → 操作 → 跟踪</strong>中为合作伙伴分配自定义值。从这里，您最多可以为每个合作伙伴定义三个自定义值。这些值最常用于为合作伙伴添加标签（例如：influencer、Cashback/Loyalty、优惠等）。</p><p>您也可以在 <strong>合作伙伴 → 合作伙伴 → 批量编辑</strong>中批量上传和编辑合作伙伴自定义值。您需要一个 Excel 或 CSV 文件，其中包含合作伙伴 ID 以及您要分配给该合作伙伴的合作伙伴值。</p> |
| `{timestamp}`                               | 1598556546                               | <p><strong>时间戳</strong></p><p>生成点击事件发生时的 UNIX 时间戳。当跟踪链接被点击时，这将作为查询字符串参数附加。它可在某些平台中用作缓存清除器。</p>                                                                                                                                                                                                                                                                          |
| `{randint}`                                 | 1,234,567                                | <p><strong>随机整数</strong></p><p>当跟踪链接被点击时，生成 0–9,999,999 之间的随机整数。</p>                                                                                                                                                                                                                                                                                                    |
| `{impacttest}`                              | 1                                        | <p><strong>测试</strong></p><p>在测试跟踪链接时附加此参数。</p>                                                                                                                                                                                                                                                                                                                         |
| `{irmpgroupname}`                           | ”influencers”,”preferred”                | <p><strong>组名</strong></p><p>在查询字符串中列出合作伙伴所属的一个或多个组。</p>                                                                                                                                                                                                                                                                                                                |
| `{CUSTOM}`                                  |                                          | <p><strong>自定义</strong></p><p>使用自定义动态查询字符串参数。impact.com 建议联系支持团队（或您的 CSM）以讨论您的具体用例。</p>                                                                                                                                                                                                                                                                                 |

</details>

#### 参数去重说明

在项目中为广告指定的各种参数有时会导致返回重复值，尤其是在多个参数具有相同名称时。重复的参数值可能会造成 impact.com 的报告与您更广泛的营销团队工具（例如 Google Analytics）的报告之间出现差异。为避免这种情况，impact.com 仅按以下优先级顺序（从高到低）考虑单个参数值。

此顺序优先考虑品牌指定的参数，而不是合作伙伴指定的参数：

<details>

<summary>参数类型参考</summary>

| 参数类型      | 说明                                                              |
| --------- | --------------------------------------------------------------- |
| 广告落地页     | 您在广告落地页元数据中配置的参数。（这些参数始终优先，除非请求中提供了深度链接；在这种情况下，深度链接参数会覆盖落地页参数。） |
| 项目跟踪模板    | 您在 **设置 → 网关** （位于 *追踪* 部分）→ **项目跟踪模板**.                        |
| 合作伙伴网关    | 您在 **设置 → 网关** （位于 *追踪* 部分）→ **项目跟踪模板**.                        |
| 透传变量      | 您的合作伙伴可以在深度链接中使用 `p.` 表示法指定的参数。（在极少数情况下，透传参数可能会覆盖您指定的参数。）       |
| 深度链接查询字符串 | 您的合作伙伴可以使用这些参数传递包含预定义落地页查询字符串参数的深度链接。                           |

</details>

<details>

<summary>示例</summary>

如果 `utm_medium` 参数会同时附加到合作伙伴使用的落地页深度链接和您自己的 *项目跟踪模板* 如下所示：

* *深度链接 URL：* `https://brand.example?utm_medium=seo`
* *项目跟踪模板：* `https://brand.example?utm_medium=affiliate`

  最终落地页将是：
* *项目跟踪模板：* `https://brand.example?utm_medium=`**`联盟营销`**

  这是因为 *项目跟踪模板* 参数由您定义，因此其优先级高于合作伙伴定义的参数。

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
