> 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="规则目标" %}
规则将在哪里查找 *规则值*。这是在创建 *识别规则*.

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

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

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

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

{% 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>搜索</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>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.
