# URL

{% hint style="info" %}
前往我们的指南以查找 [完整的逐步教程](https://gitbook.com/docs/guides/product-guides/how-to-personalize-your-gitbook-site-using-url-parameters-and-adaptive-content) 有关使用 cookie 设置自适应内容的说明。
{% endhint %}

您可以通过 URL 查询参数将访客数据传递到您的文档。下面是该方法的概述：

<table data-full-width="false"><thead><tr><th width="325.45703125">方法</th><th width="266.6015625">使用场景</th><th width="206.58984375">设置难易度</th><th width="202">安全性</th><th>格式</th></tr></thead><tbody><tr><td>查询参数 <code>visitor.&#x3C;prop>=</code></td><td>功能开关、角色</td><td>易于使用</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span> 访问者可以覆盖这些属性</td><td>JSON</td></tr></tbody></table>

### 查询参数

要通过 URL 参数将数据传递给 GitBook，您需要以以下格式在 URL 中传递数据 `visitor.<prop>`.

例如：

```url
https://docs.acme.org/?visitor.language=fr
```

这将允许您在以下位置使用这些声明： [条件编辑器](https://gitbook.com/docs/documentation/zh/publishing-documentation/adapting-your-content#working-with-the-condition-editor) 在未签名对象下：

```javascript
visitor.claims.unsigned.language === "fr"
```

{% hint style="warning" %}
通过查询参数传递的数据必须通过一个对象在您的访客模式中定义。 [未签名的](https://gitbook.com/docs/publishing-documentation/adaptive-content/enabling-adaptive-content#setting-unsigned-claims) 此外，查询参数可以被访客轻易更改，因此最适合非敏感信息。
{% endhint %}

### 视频教程

{% embed url="<https://www.youtube.com/embed/hCd2_AAHU_I?si=jm2VOThMVh7NdJm>\_" %}
