analytics.js
analytics.js copied to clipboard
Why is the write key public?
This is more of a question than an issue, but doesn't making the write key public when installing analytics.js allow for anyone to setup analytics.js on their site and send data to somebody elses databases?
Am I missing something here? Can someone explain this to me?
Thank you!
There is no such thing as a secret value in a JavaScript bundle delivered via the public internet. No matter how much obfuscation you apply, at the end of the day your bundle will include the exact string that is the write key.
+1 on the above answer.