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

这将允许您在以下位置使用这些声明： [条件编辑器](/docs/documentation/zh/zhan-dian-fang-wen/adaptive-content/adapting-your-content.md#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>\_" %}


---

# Agent Instructions: 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://gitbook.com/docs/documentation/zh/zhan-dian-fang-wen/adaptive-content/enabling-adaptive-content/url.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.
