> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/fa-bu/adaptive-content/enabling-adaptive-content/url.md).

# URL

通过 URL 查询参数将访客数据传入你的文档

{% hint style="info" %}
前往我们的指南，找到一个 [完整操作指南](https://gitbook.com/docs/guides/docs-personalization-and-authentication/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/fa-bu/adaptive-content/adapting-your-content.md#working-with-the-condition-editor) 中的未签名对象下使用这些声明：

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

{% hint style="warning" %}
通过一个 [未签名的](/docs/documentation/zh/fa-bu/adaptive-content/enabling-adaptive-content.md#set-an-unsigned-claim) 对象。此外，查询参数可以被访客轻松更改，因此最适合用于非敏感信息。
{% endhint %}

### 视频教程

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


---

# 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, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/fa-bu/adaptive-content/enabling-adaptive-content/url.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
