Repository navigation
plausible.js strict mode that only sends requests if the hostname is the same as the data-domain attribute
#512
Closed
vincentdoerig
started this conversation in
Anything Else
Replies: 2 comments 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 |
1 reply
|
You can now choose which hostnames can send data to your site, so copies of your snippet on other sites are no longer counted: https://plausible.io/docs/excluding#exclude-visits-by-hostname |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
It would be great to have a
data-strict(or similar) attribute which only sends analytics when the hostname is the same as thedata-domainattribute. 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.jssimilar to this:All reactions