mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-24 07:30:12 +01:00
Added documentation for custom cookie state
This commit is contained in:
parent
db5eee54aa
commit
b83983354c
@ -256,7 +256,18 @@ integrated by using the `cookies` field:
|
|||||||
analytics: Custom name # (1)!
|
analytics: Custom name # (1)!
|
||||||
```
|
```
|
||||||
|
|
||||||
1. The default name of the `analytics` cookie is `Google Analytics`.
|
1. The default name of the `analytics` cookie is `Google Analytics`.
|
||||||
|
|
||||||
|
=== "Custom initial state"
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
extra:
|
||||||
|
consent:
|
||||||
|
cookies:
|
||||||
|
analytics:
|
||||||
|
name: Google Analytics
|
||||||
|
checked: false
|
||||||
|
```
|
||||||
|
|
||||||
=== "Custom cookie"
|
=== "Custom cookie"
|
||||||
|
|
||||||
@ -268,8 +279,8 @@ integrated by using the `cookies` field:
|
|||||||
custom: Custom cookie
|
custom: Custom cookie
|
||||||
```
|
```
|
||||||
|
|
||||||
1. If you add a custom cookie to the `cookies` field, the `analytics` cookie
|
1. If you add a custom cookie to the `cookies` field, the `analytics`
|
||||||
must be added back explicitly, or analytics won't be triggered.
|
cookie must be added back explicitly, or analytics won't be triggered.
|
||||||
|
|
||||||
When a user first visits your site, a cookie consent form is rendered:
|
When a user first visits your site, a cookie consent form is rendered:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user