URL
Pass visitor data into your docs through URL query parameters.
You can pass visitor data to your docs through URL query parameters. Below is an overview of the method:
Method
Use-cases
Ease of setup
Security
Format
Query parameters visitor.<prop>=
Feature flags, roles
Easy to use
❌ Visitor can override the properties
JSON
Query parameters
To pass data to GitBook through URL parameters, you’ll need to pass the data in the URL in the format visitor.<prop>
.
For example:
https://docs.acme.org/?visitor.language=fr&visitor.country=fr
Visiting this URL would pass in the following claims when the site loads:
{
"language": "fr",
"country": "fr"
}
Data passed through query parameters must be defined in your visitor schema through an unsigned object. Additionally, query parameters can be easily changed by the visitor and are best suited for non-sensitive information.
Last updated
Was this helpful?