> 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).

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

*识别规则* 在你的 *优化渠道* 确定流量如何归因到该渠道。每条规则至少使用以下其中一项元素： *引荐来源网址* 或 *落地页网址* 这些元素是在引荐过程中捕获的，用于识别流量来源。

*识别规则* 在你 [创建优化渠道](https://help.impact.com/brand/zh/what-would-you-like-to-learn-about/platform-features/cross-channel-performance-insights/optimize-channels/create-an-optimize-channel.md) 时进行配置，并且可以随时通过 [编辑渠道](https://help.impact.com/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" %}
**示例**：落地页网址
{% 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) **\[添加]** **AND** 会向规则添加条件，而选择 ![](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 时，OR 连接的任一条件都可用于识别渠道引荐来源。选择 AND 时，必须满足 AND 连接的所有条件，才能识别渠道引荐来源。

创建或更新 **用于识别的规则**时，impact.com 建议尽可能保持逻辑简单易读。这样可以让后续的规则维护更加有效、高效。

以下是可用于 *规则目标* 的说明，可用于 *用于识别的规则*。进行更改后，请务必选择 **保存** 。请参阅 [优化设置场景](https://help.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="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>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>                                                                                     |
| 匹配正则表达式    | 该 *规则目标的* 值必须与 [正则表达式](https://help.impact.com/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>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），或 [创建支持工单](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 中。仅在以下条件下可用： `Rule Target=Landing Page Parameter`.                                                                                                                                                                                                          | <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 中。仅在以下条件下可用： `Rule Target=Landing Page Parameter`.                                                                                                                                                                                                     | <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.
