> 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/platform-features/cross-channel-performance-insights/set-up-rules-to-identify-channel-traffic.md).

# 设置规则以识别渠道流量

*识别规则* 在你的 *优化渠道* 以确定流量如何归因到该渠道。每条规则至少使用来自以下任一项的一个元素： *引荐 URL* 或 *着陆页 URL* 中捕获的推荐信息，以识别流量来源。

*识别规则* 会在你 [创建优化渠道](/brand/zh/what-would-you-like-to-learn-about/platform-features/cross-channel-performance-insights/optimize-channels/create-an-optimize-channel.md) 时进行配置，并且可随时通过 [编辑渠道](/brand/zh/what-would-you-like-to-learn-about/platform-features/cross-channel-performance-insights/optimize-channels/edit-an-optimize-channel.md).

#### 识别组件的规则

{% hint style="info" %}
此功能仅适用于 Optimize 附加组件。 [点击这里](https://app.impact.com/secure/advertiser/fr/upgrade.ihtml?u=/secure/advertiser/optimize/landing-page.html) 获取附加组件！
{% endhint %}

在创建 *识别规则*时，你需要填写 3 到 4 个字段。请参阅下方选项卡，了解每个字段的更多信息。

{% tabs %}
{% tab title="规则目标" %}
规则将在哪个“位置”查找 *规则值*。这在创建 *识别规则*.

时从第 1 个下拉菜单中选择。请参阅 *更新识别规则* 部分中的第 1 个表，以查看所有可用的 *规则目标* 选项。

{% hint style="info" %}
**示例**：着陆页 URL
{% endhint %}
{% endtab %}

{% tab title="规则逻辑" %}
“如何” *规则* 将尝试识别流量。这在创建 *识别规则*.

时从第 2 个下拉菜单中选择。请参阅 *更新识别规则* 部分中的第 1 个表，以查看所有可用的 *规则逻辑* 选项。

{% hint style="info" %}
**示例**：完全匹配
{% endhint %}
{% endtab %}

{% tab title="规则值 1" %}
该 *规则逻辑* 将使用哪个参数键来尝试识别流量。该值在 *规则目标* 和 *规则逻辑*.

之间输入。仅当 *规则目标* 是 **落地页参数** 或 **引荐参数**.

{% hint style="info" %}
**示例**：utm\_medium
{% endhint %}
{% endtab %}

{% tab title="规则值 2" %}
该 *规则逻辑* 将使用哪个值来尝试识别流量。虽然该值在 *识别规则*之间可能不同，但它最适合被理解为规则将寻找什么来识别流量。

如果 *规则逻辑* 是 **存在** 或 **不存在**.

{% hint style="info" %}
**示例**：ppc
{% endhint %}
{% endtab %}
{% endtabs %}

#### 设置一条识别规则

该 *识别规则* （RTI）采用 *AND/OR* 系统：

选择 ![](/files/a4d92afe6e302635e52a9d3b155bca7a8dedb2ea) **\[添加]** **和** 会向规则添加条件，而选择 ![](/files/a4d92afe6e302635e52a9d3b155bca7a8dedb2ea) **\[添加]** **OR** 则会添加一条“单独的”规则。选择 OR 时，任何由 OR 连接的条件都可以识别该渠道的推荐来源。选择 AND 时，必须满足所有由 AND 连接的条件，才能识别该渠道的推荐来源。

在创建或更新 **识别规则**时，impact.com 建议尽量保持逻辑尽可能简单、清晰。这样可使对你规则的持续支持更有效、更高效。

下面是可在 *规则目标* 中使用的 *识别规则*说明。完成更改后，请务必选择 **保存** 。有关 [优化设置场景](/brand/zh/what-would-you-like-to-learn-about/platform-features/cross-channel-performance-insights/optimize-channels/optimize-channel-setup-scenario-examples.md) 文章中的示例，请参阅 *识别规则*.

{% hint style="info" %}
**备注**：你无法为 *识别规则* 配置 *直接* （即没有推荐来源）和 *自然推荐* （即有推荐来源）渠道，这些渠道也称为 *默认渠道*。这些渠道专用于流量不符合任何可应用识别规则的资格条件的情况。
{% endhint %}

**规则目标**

|          |                                                      |                                                                       |
| -------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| **规则目标** | **描述**                                               | **示例**                                                                |
| 着陆页 URL  | 推荐流量着陆的整个 URL。                                       | `https://www.landingpage.com?key=valueparameter&key=parametervalue`   |
| 着陆页域名    | URL 中位于协议之后、子目录/路径之前（如果存在路径），或位于查询字符串之前（如果不存在路径）的部分。 | `www.landingpage.com`                                                 |
| 着陆页查询字符串 | 问号（**?**）之后的所有参数键值对，问号标记着查询字符串的开始。                   | `key=value&parameterkey=parametervalue`                               |
| 落地页参数    | 查询字符串中存在的特定键值对。                                      | `parameterkey=parametervalue`                                         |
| 引荐 URL   | 流量来源的整个 URL。                                         | `https://www.referringpage.com?key=value&parameterkey=parametervalue` |
| 引荐域名     | URL 中位于协议之后、子目录/路径之前（如果存在路径），或位于查询字符串之前（如果不存在路径）的部分。 | `www.referringpage.com`                                               |
| 引荐查询字符串  | URL 路径之后的所有内容（如果存在路径），或者顶级域名之后的所有内容（如果不存在路径）。        | `key=value&parameterkey=parametervalue`                               |
| 引荐参数     | 查询字符串中存在的特定键值对。                                      | `parameterkey=parametervalue`                                         |

<details>

<summary>查看每个规则目标会查找什么</summary>

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

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

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

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

</details>

**规则逻辑选项**

你还可以选择如何将 *规则目标* （见上表）应用于 **规则值 2** （你在 *识别规则*的最后一个字段中输入的内容），方法是选择 **规则逻辑**。有关 *规则逻辑* 选项。

<details>

<summary>选项</summary>

|            |                                                                                                                                                                                                                                                          |                                                                                                                                                                                                                                                                            |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **规则逻辑选项** | **描述**                                                                                                                                                                                                                                                   | **示例**                                                                                                                                                                                                                                                                     |
| 完全匹配       | 必须在 *规则值 2* 中找到配置的准确 *规则目标*，前后不能有任何附加字符。                                                                                                                                                                                                                 | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 完全匹配 <code>search</code></p><p><strong>包含的示例 URL：</strong></p><p><code><https://www.impact.com?utm_medium=search></code></p>                                                                                  |
| 包含         | 该 *规则值 2* 必须在 *规则目标*.                                                                                                                                                                                                                                    | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 包含 <code>search</code></p><p><strong>包含的示例 URL：</strong></p><p><code><https://www.impact.com?utm_medium=somesearchentry></code></p>                                                                           |
| 开头匹配       | 该 *规则值 2* 配置的必须位于 *规则目标*.                                                                                                                                                                                                                                | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 开头匹配 <code>search</code></p><p><strong>包含的示例 URL：</strong></p><p><code><https://www.impact.com?utm_medium=searchentry></code></p>                                                                             |
| 结尾匹配       | 该 *规则值 2* 配置的必须位于 *规则目标*.                                                                                                                                                                                                                                | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 结尾匹配 <code>search</code></p><p><strong>包含的示例 URL：</strong></p><p><code><https://www.impact.com?utm_medium=someentry></code></p>                                                                               |
| 匹配正则表达式    | 该 *规则目标的* 值必须与 [regex](/brand/zh/what-would-you-like-to-learn-about/platform-features/promo-codes/regular-expression/regex-explained.md) 正则匹配 *规则值 2*。了解更多关于 [正则表达式](https://en.wikipedia.org/wiki/Regular_expression) 和 [测试正则表达式](https://regexr.com/). | 请联系你的 CSM（或 [，例如 GoogleAds，可以在 Optimize 中跟踪，但必须由 impact.com 设置。如果你想添加媒体来源（例如 Google SEO、Criteo 等），请联系你的 CSM（或](https://app.impact.com/support/portal.ihtml?createTicket=true)）以获取此规则逻辑选项的帮助。                                                                               |
| 不完全匹配      | 必须在 *规则值 2* 配置的必须 **不** 在 *规则目标*.                                                                                                                                                                                                                        | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 不完全匹配 <code>search</code></p><p><strong>排除的示例 URL：</strong></p><p><code><https://www.impact.com?utm_medium=search></code></p>                                                                                 |
| 不包含        | 该 *规则值 2* 配置的必须 **不** 在 *规则目标*.                                                                                                                                                                                                                          | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 不包含 <code>search</code></p><p><strong>排除的示例 URL：</strong></p><p><code><https://www.impact.com?utm_medium=search></code></p>                                                                                   |
| 不匹配正则表达式   | 该 *规则目标的* 值不得与 *规则值 2*。了解更多关于 [正则表达式](https://en.wikipedia.org/wiki/Regular_expression). [测试正则表达式](https://regexr.com/).                                                                                                                                 | 请联系你的 CSM（或 [，例如 GoogleAds，可以在 Optimize 中跟踪，但必须由 impact.com 设置。如果你想添加媒体来源（例如 Google SEO、Criteo 等），请联系你的 CSM（或](https://app.impact.com/support/portal.ihtml?createTicket=true)）以获取此规则逻辑选项的帮助。                                                                               |
| 匹配任意       | 该 *规则值 2* 是由逗号分隔的一系列 *完全匹配* 值（见 *完全匹配* 行）。各项之间不要使用空格。                                                                                                                                                                                                    | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 匹配任意 <code>search,ppc</code></p><p><strong>包含的示例 URL：</strong></p><p><code><https://impact.com?utm_medium=search></code></p><p><code><https://impact.com?utm_medium=ppc></code></p>                           |
| 包含任意       | 该 *规则值 2* 是由逗号分隔的一系列 *包含* 值（见 *包含* 行）。各项之间不要使用空格。                                                                                                                                                                                                        | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 包含任意 <code>search,ppc</code></p><p><strong>包含的示例 URL：</strong></p><p><code><https://www.impact.com?utm_medium=somesearchentry></code></p><p><code><https://www.impact.com?utm_medium=someppcentry></code></p> |
| 存在         | 提供的着陆页参数值必须包含在 URL 中。仅在以下情况下可用： `规则目标=着陆页参数`.                                                                                                                                                                                                            | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 存在</p><p><strong>包含的示例 URL：</strong></p><p><code><https://www.impact.com?utm_medium_ppc></code></p>                                                                                                           |
| 不存在        | 提供的着陆页参数值必须 **不** 包含在 URL 中。仅在以下情况下可用： `规则目标=着陆页参数`.                                                                                                                                                                                                     | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 不存在</p><p><strong>排除的示例 URL：</strong></p><p><code><https://www.impact.com?utm_medium_ppc></code></p>                                                                                                          |

</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/platform-features/cross-channel-performance-insights/set-up-rules-to-identify-channel-traffic.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.
