Skip to content

Commit b839833

Browse files
committed
Added documentation for custom cookie state
1 parent db5eee5 commit b839833

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

docs/setup/setting-up-site-analytics.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,18 @@ integrated by using the `cookies` field:
256256
analytics: Custom name # (1)!
257257
```
258258

259-
1. The default name of the `analytics` cookie is `Google Analytics`.
259+
1. The default name of the `analytics` cookie is `Google Analytics`.
260+
261+
=== "Custom initial state"
262+
263+
``` yaml
264+
extra:
265+
consent:
266+
cookies:
267+
analytics:
268+
name: Google Analytics
269+
checked: false
270+
```
260271

261272
=== "Custom cookie"
262273

@@ -268,8 +279,8 @@ integrated by using the `cookies` field:
268279
custom: Custom cookie
269280
```
270281

271-
1. If you add a custom cookie to the `cookies` field, the `analytics` cookie
272-
must be added back explicitly, or analytics won't be triggered.
282+
1. If you add a custom cookie to the `cookies` field, the `analytics`
283+
cookie must be added back explicitly, or analytics won't be triggered.
273284

274285
When a user first visits your site, a cookie consent form is rendered:
275286

0 commit comments

Comments
 (0)