Added documentation for custom cookie state

This commit is contained in:
squidfunk 2021-12-27 18:44:28 +01:00
parent db5eee54aa
commit b83983354c

View File

@ -258,6 +258,17 @@ integrated by using the `cookies` field:
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"
``` yaml
@ -268,8 +279,8 @@ integrated by using the `cookies` field:
custom: Custom cookie
```
1. If you add a custom cookie to the `cookies` field, the `analytics` cookie
must be added back explicitly, or analytics won't be triggered.
1. If you add a custom cookie to the `cookies` field, the `analytics`
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: