analytics.js icon indicating copy to clipboard operation
analytics.js copied to clipboard

Why is the write key public?

Open guppy57 opened this issue 7 years ago • 2 comments

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!

guppy57 avatar Aug 27 '19 16:08 guppy57

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.

corytheboyd avatar Feb 11 '20 02:02 corytheboyd

+1 on the above answer.

pooyaj avatar Jun 05 '20 20:06 pooyaj