> ## Documentation Index
> Fetch the complete documentation index at: https://docs.festtide.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 同意

> 渲染从不需要同意。统计需要，由 data-consent 决定方式。

Festtide 在您的页面上做两件相互独立的事：

* **渲染**：显示横幅、特效和颜色。不需要同意：不存储任何个人信息，也不设置 Cookie。浏览器中唯一保存的是
  最后一份有效的时间线（您的活动数据，不含任何访客信息），因此短暂中断不会带来任何可见变化。
* **统计**：以纯计数的形式发送浏览、点击、关闭和优惠码复制，不含标识符，不使用 Cookie；不保留 IP 地址。
  统计遵循访客的同意状态，由 `data-consent` 设置。

## `data-consent` 模式

| 模式 | 统计 |
| - | - |
| `auto`（默认） | 统计，除非页面上已知的同意管理工具表示拒绝。 |
| `wait` | 仅在您的页面调用 `Festtide.consent(true)` 后统计。 |
| `off` | 从不统计。该网站的**洞察**将保持为空。 |

```html theme={null}
<script
  async
  src="https://cdn.festtide.com/r/v1/loader.js"
  integrity="sha384-…"
  crossorigin="anonymous"
  data-site="site_…"
  data-consent="wait"
></script>
```

## 自行传递同意状态

使用 `data-consent="wait"` 时，在您的同意横幅回调中调用 `consent`：

```js theme={null}
function onConsentChange(analyticsAllowed) {
  window.Festtide?.consent(analyticsAllowed)
}
```

`consent(true)` 开始为该页面统计；`consent(false)` 停止统计。无论哪种情况，活动的显示都相同。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.