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
Default: _none_ – This property allows to add custom cookies or change the
60
+
initial `checked` state and name of the `analytics` cookie. Each cookie must
61
+
receive a unique identifier which is used as a key in the `cookies` map, and
62
+
can be either set to a string, or to a map defining `name` and `checked`
63
+
state:
64
+
65
+
=== "Custom cookie name"
66
+
67
+
``` yaml
68
+
extra:
69
+
consent:
70
+
cookies:
71
+
analytics: Custom name
72
+
```
73
+
74
+
=== "Custom initial state"
75
+
76
+
``` yaml
77
+
extra:
78
+
consent:
79
+
cookies:
80
+
analytics:
81
+
name: Google Analytics
82
+
checked: false
83
+
```
84
+
85
+
=== "Custom cookie"
68
86
69
-
=== "Custom cookie"
87
+
``` yaml
88
+
extra:
89
+
consent:
90
+
cookies:
91
+
analytics: Google Analytics # (1)!
92
+
custom: Custom cookie
93
+
```
94
+
95
+
1. If you define a custom cookie as part of the `cookies` property,
96
+
the `analytics` cookie must be added back explicitly, or analytics
97
+
won't be triggered.
98
+
99
+
100
+
If Google Analytics was configured via `mkdocs.yml`, the cookie consent will automatically include a setting for the user to disable it. [Custom cookies]
0 commit comments