> 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/advocate-program/manage-advocate-participants/custom-and-calculated-fields/tracking-windows-for-calculated-fields-explained.md).

# 计算字段的跟踪窗口说明

{% hint style="info" %}
**注意**：请查看我们关于 [计算字段](/brand/zh/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/calculated-fields-explained.md) 的文章，了解它们是什么以及何时有用。如果您正在寻找为您的计算字段设置追踪窗口的帮助，请参阅 [设置计算字段](/brand/zh/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/set-up-a-calculated-field.md).
{% endhint %}

追踪窗口可让您为计算字段添加基于时间的元素。您可以将追踪窗口添加到任何使用求和或计数计算的计算字段中。

如果您希望允许参与者按周期累积某个值（例如购买金额），然后根据该值给予奖励，那么在计算字段中包含追踪窗口会很有用。事件数据只会在您选择的窗口期间进行计算——随着时间推移和窗口更新，之前的数据将不会被纳入考虑。

您可以使用该字段中的值来设置项目规则，以激励参与者朝着以下目标保持一致：

* **近期性**：鼓励沉睡参与者重新激活或进行新购买。
* **频率**：激励您最常购买的客户继续参与您的项目和服务。
* **货币价值**：奖励高消费用户达到某个购买金额门槛。

在设置计算字段时，您可以从两种类型的追踪窗口中进行选择：

{% tabs %}
{% tab title="固定追踪窗口" %}
固定窗口可让您在一个日历日、周、月或年内追踪某个值。窗口从该时间段的开始时刻启动，并在结束时重置。开始和结束时间将取决于您 impact.com 账户的时区设置。

当您创建带有固定窗口的计算字段时，它将从字段创建的那一刻开始计数——它不会等到下一个完整时间段开始，也不会（默认情况下）对当前时间段开始以来您错过的任何值进行追溯计算。

<details>

<summary>示例</summary>

您希望设置一条项目规则，为每月消费超过某个金额的参与者发放特殊奖励。为此，您需要一个计算字段，用于在为期 1 个月的固定窗口内汇总购买金额。一旦设置完成，购买事件将从当月第一天的午夜到当月最后一天的晚上 11:59 计入。

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

</details>
{% endtab %}

{% tab title="滑动追踪窗口" %}
滑动窗口可让您在最长 90 天、周、月或年的自定义时间段内衡量一个值。与固定窗口不同，滑动窗口不依赖于预设的单个日历时间段——您可以将窗口设置为 10 天、5 周、3 个月、2 年，等等。

在每个时间段内都有一个单独的 **单位** 时间。随着每个单位过去，并且我们收到符合您条件的新事件时，计算字段将会更新。

| 示例时间段 | 时间单位                    | 您的字段将会更新…… |
| ----- | ----------------------- | ---------- |
| 10 天  | 1 天（凌晨 12:00 至晚上 11:59） | 每过一天后      |
| 5 周   | 1 周（周日至周六）              | 每过一周后      |
| 3 个月  | 1 个月（每月 1 日至每月最后一天）     | 每过一个月后     |
| 2 年   | 1 年（1 月 1 日至 12 月 31 日） | 每过一年后      |

滑动窗口允许您为追踪窗口的每个单位设置一个可求和或计数的最大值，例如，90 天窗口中的每一天，或 12 周窗口中的每一周。这并不会为整个时间段设置最大值，只是为每个单位设置最大值。

无论您的时间段如何，我们都将每个单位的开始时间视为凌晨 12:00，结束时间视为晚上 11:59。我们使用 impact.com 账户的时区设置来确定这一点。

<details>

<summary>示例</summary>

您希望允许参与者根据他们在 90 天内的消费金额累积积分。随着每一天过去，并且我们收到新的匹配事件数据，计算字段值将更新，以反映过去 90 天内的消费金额。

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

</details>
{% endtab %}
{% endtabs %}


---

# 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:

```
GET https://help.impact.com/brand/zh/what-would-you-like-to-learn-about/advocate-program/manage-advocate-participants/custom-and-calculated-fields/tracking-windows-for-calculated-fields-explained.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
