> 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="规则目标" %}
“Where” 规则将查找以下内容的位置： *规则值*。这是在创建 *识别规则*.

请参阅 *更新识别规则* 部分中的第一个表，以查看所有可用的 *规则目标* 选项。

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

{% tab title="规则逻辑" %}
“How” 规则 *规则* 将尝试识别流量的方式。这是在创建 *识别规则*.

请参阅 *更新识别规则* 部分中的第一个表，以查看所有可用的 *规则逻辑* 选项。

{% 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 连接的条件都将识别该渠道的推荐来源。选择 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>搜索</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>搜索</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>搜索</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>搜索</code></p><p><strong>示例包含的 URL：</strong></p><p><code><https://www.impact.com?utm_medium=someentry></code></p>                                                                             |
| 匹配正则表达式    | 该 *规则目标的* 值必须与 [正则表达式](/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（或 [创建支持工单](https://app.impact.com/support/portal.ihtml?createTicket=true)) 以获取有关此规则逻辑选项的帮助。                                                                                                                                                                   |
| 不完全匹配      | 精确的 *规则值 2* 配置值必须 **不** 出现在 *规则目标*.                                                                                                                                                                                                                    | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 不完全匹配 <code>搜索</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>搜索</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（或 [创建支持工单](https://app.impact.com/support/portal.ihtml?createTicket=true)) 以获取有关此规则逻辑选项的帮助。                                                                                                                                                                   |
| 任意匹配       | 该 *规则值 2* 是一系列以逗号分隔的 *完全匹配* 值（参见 *完全匹配* 行）。各项之间不要使用空格。                                                                                                                                                                                                 | <p><strong>规则：</strong></p><p>落地页参数 <code>utm\_medium</code> 任意匹配 <code>搜索,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>搜索,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.
