> 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* 系统：

选择 ![](https://1186853034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-6282f271b7521383385339243690b303086736d9%2F3b5a585dd2895bdf1c30d1236c72ba590dddd18717863b27074c8d313d05ae20.svg?alt=media) **\[添加]** **和** 将为规则添加条件，而选择 ![](https://1186853034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-6282f271b7521383385339243690b303086736d9%2F3b5a585dd2895bdf1c30d1236c72ba590dddd18717863b27074c8d313d05ae20.svg?alt=media) **\[添加]** **或** 将添加一条“单独”的规则。选择 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`                                                 |
| 着陆页查询字符串 | 位于问号（之后的所有参数键值&#x5BF9;**?**），该符号标记查询字符串的开始。       | `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="https://1186853034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-ee3dab75f8931eca712a926d578dc28a0f7ad7ce%2F4d153ee5b947e07c2521f4c6096a0bfa1eefbe6618e191eba77994558a3ff7c2.png?alt=media" alt=""><figcaption></figcaption></figure></div>

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

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

<div data-with-frame="true"><figure><img src="https://1186853034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-4203a86fe1f2a0537a1e555390f2c5543b2c206e%2F421f7539bfdbad9d71563cabef639ef056029c0f5e12483495f14e1ba3407283.png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
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=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
