Commit 37967f0
authored
Fix "setDoNotTrack" handling (#46)
The `setDoNotTrack` configuration value has to be pushed to the `_paq`s
_before_ the `trackPageView` setting. `trackPageView` seems to trigger
the actual logging request when it is being processed.
With the old state of the code, `setDoNotTrack` was set too late and
never became effective. A request to the Matomo server would be sent in
any case, relying on the server-side "do not track" privacy feature to
be enabled.
This change adds a new `enable_do_not_track` configuration setting which
defaults to `true`.
When you set it to `false`, the `setDoNotTrack` command will not be
used. You can push it to the `_paq` array yourself, possibly depending
on client-side logic. But remember: It has to be in the `_paq` array
_before_ the `trackPageView` entry.1 parent 64218d9 commit 37967f0
File tree
4 files changed
+8
-3
lines changed- DependencyInjection
- Resources/config
- Twig
4 files changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
84 | | - | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
0 commit comments