mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
f7a35ff818
Generated-By: mintlify-agent Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
55 lines
2.0 KiB
Plaintext
55 lines
2.0 KiB
Plaintext
---
|
|
title: "Osano"
|
|
description: "使用 Osano 隐私平台管理 Cookie 同意,确保文档站点符合数据隐私法规。"
|
|
keywords: ["Osano 集成", "Cookie 同意管理器", "GDPR 合规"]
|
|
---
|
|
|
|
通过在你的存储库中添加一个[自定义 JavaScript 文件](/zh/customize/custom-scripts#custom-javascript),为文档添加 [Osano](https://www.osano.com/) Cookie 同意管理功能。
|
|
|
|
<div id="setup">
|
|
## 设置
|
|
</div>
|
|
|
|
在你的文档存储库中创建一个名为 `osano.js` 的文件,并填入以下内容:
|
|
|
|
<CodeGroup>
|
|
```js Format
|
|
var script = document.createElement("script");
|
|
script.src = "OSANO_SCRIPT_URL";
|
|
document.head.appendChild(script);
|
|
```
|
|
|
|
```js 示例
|
|
var script = document.createElement("script");
|
|
script.src = "https://cmp.osano.com/your-tenant-id/your-site-id/osano.js";
|
|
document.head.appendChild(script);
|
|
```
|
|
</CodeGroup>
|
|
|
|
将 `OSANO_SCRIPT_URL` 替换为你的 Osano 脚本 URL。你的脚本 URL 是 Osano 生成的代码片段中 `src` 的值。你的脚本 URL 始终以 `https://cmp.osano.com/` 开头,并以 `/osano.js` 结尾。
|
|
|
|
<div id="troubleshooting">
|
|
## 故障排查
|
|
</div>
|
|
|
|
<Accordion title="在 Strict 合规模式下页面无法加载">
|
|
如果在使用 Osano 的 **Strict** 合规模式时文档页面无法正常加载,你需要将 Mintlify 的 domain 加入允许列表,以允许图片和其他资源加载。
|
|
|
|
<Steps>
|
|
<Step title="前往 Managed Rules">
|
|
在 Osano 控制台中,进入 **Scripts** → **Managed Rules**。
|
|
</Step>
|
|
|
|
<Step title="添加 Mintlify domain">
|
|
将 `.mintlify.app/` 添加为一条 managed rule。
|
|
|
|
<Frame>
|
|
<img src="/images/integrations/osano-managed-rule.png" alt="Osano managed rule" />
|
|
</Frame>
|
|
|
|
<Info>
|
|
这可确保所有由 Mintlify 提供的资产 (包括图片、样式表和其他文档资源) 被视为必要内容,即使 Osano 阻止未分类的第三方内容时也会加载。
|
|
</Info>
|
|
</Step>
|
|
</Steps>
|
|
</Accordion> |