plausible.js strict
mode that only sends requests if the hostname is the same as the data-domain
attribute
#512
vincentdoerig
started this conversation in
Anything Else
Replies: 1 comment 1 reply
-
Thanks. This sort of option makes sense, although I would implement it as an addon similar to I think this might be a duplicate of #183 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be great to have a
data-strict
(or similar) attribute which only sends analytics when the hostname is the same as thedata-domain
attribute. I have recently noticed an increase in pageviews because of third-party sites coping my site including the plausible snippet. Hence, I also receive the analytics from their site which skew the correct statistics. In order to avoid a breaking change, I suggest adding following syntax on the snippet to "activate" this strict mode:<script async defer data-domain="[domain]" data-strict src="https://plausible.io/js/plausible.js"></script>
And an implementation in
plausible.js
similar to this:Beta Was this translation helpful? Give feedback.
All reactions