You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After enabling adaptive content, you’ll need to define a schema for the types of claims you expect GitBook to receive when a user visits your site.
20
+
21
+
The adaptive content schema should reflect how these claims are structured when sent to GitBook.
22
+
23
+
For example, if you expect a visitor to potentially be a beta user in your product, you would set an adaptive schema similar to:
24
+
25
+
```json
26
+
{
27
+
"type": "object",
28
+
"properties": {
29
+
"isBetaUser": {
30
+
"type": "boolean",
31
+
"description": "Whether the visitor is a Beta user.”
32
+
},
33
+
},
34
+
"additionalProperties": false
35
+
}
36
+
```
37
+
38
+
This will also help you use autocomplete when configuring your claims in the [condition editor](adapting-your-content.md#working-with-the-condition-editor).
39
+
17
40
Next, you’ll need to decide how you want to pass your visitor data to GitBook.
18
41
19
42
### Ways to pass visitors's data to GitBook
@@ -23,13 +46,9 @@ GitBook provides different ways to pass visitor data to adapt your site's conten
23
46
*[**Cookie method**](enabling-adaptive-content.md#cookie-method)**:** When you don't require full authentication for your docs but still want to use your user’s data to adapt your public site's content based on their information.
24
47
*[**Visitor authentication method**](enabling-adaptive-content.md#visitor-authentication-method)**:** When you need your site to be behind [authentication](../visitor-authentication/) and want to customize the site's content based on your authenticated user’s information.
25
48
49
+
#### Methods
26
50
27
-
28
-
### Methods
29
-
30
-
<table data-full-width="true"><thead><tr><th width="323.2421875">Method</th><th width="266.6015625">Use-cases</th><th width="206.58984375">Ease of setup</th><th width="202">Security</th><th>Format</th><th>Transport</th></tr></thead><tbody><tr><td>Signed cookie <code>gitbook-visitor-token</code></td><td>API test credentials, customer identification, etc</td><td>Require signing and a custom domain</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> Properties can only be defined by the backend</td><td>JWT</td><td>Cookies</td></tr><tr><td>Public cookie <code>gitbook-visitor</code></td><td>Feature flags</td><td>Easy to use</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span> Visitor can override the properties</td><td>JSON</td><td>Cookies</td></tr><tr><td>Signed query parameter <code>token</code></td><td></td><td>Require signing and a custom domain</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> Properties can only be defined by the backend</td><td>JWT</td><td>URL</td></tr><tr><td>Query parameters <code>gitbook_<prop>=</code></td><td></td><td>Easy to use</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span> Visitor can override the properties</td><td>JSON</td><td>URL</td></tr></tbody></table>
31
-
32
-
51
+
<table data-full-width="false"><thead><tr><th width="323.2421875">Method</th><th width="266.6015625">Use-cases</th><th width="206.58984375">Ease of setup</th><th width="202">Security</th><th>Format</th><th>Transport</th></tr></thead><tbody><tr><td>Signed cookie <code>gitbook-visitor-token</code></td><td>API test credentials, customer identification, etc</td><td>Require signing and a custom domain</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> Properties can only be defined by the backend</td><td>JWT</td><td>Cookies</td></tr><tr><td>Public cookie <code>gitbook-visitor</code></td><td>Feature flags</td><td>Easy to use</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span> Visitor can override the properties</td><td>JSON</td><td>Cookies</td></tr><tr><td>Signed query parameter <code>token</code></td><td></td><td>Require signing and a custom domain</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> Properties can only be defined by the backend</td><td>JWT</td><td>URL</td></tr><tr><td>Query parameters <code>gitbook_<prop>=</code></td><td></td><td>Easy to use</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span> Visitor can override the properties</td><td>JSON</td><td>URL</td></tr></tbody></table>
0 commit comments