Commit 2dc926a
committed
Only track usage with GTM when consent given
We now record user cookie preferences in a cookie set by a cookie banner
when a Google Tag Manager tracking ID is set in the config. This ensures
we aren't tracking usage data without user consent when using Google Tag
Manager
Doing the same when using gtag.js (the other approach to tracking data
for Google Analytics 4) would be a breaking change, but it would be
good to start asking consent in both cases eventually1 parent b2f8a34 commit 2dc926a
1 file changed
+14
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
8 | 17 | | |
9 | 18 | | |
0 commit comments