Question
What is the impact of exposing the source's write keys when using Segment Analytics.js or other client-side tracking libraries?
Product
Segment
Environment
Segment Console
Answer
Exposing the source's write key is required for client-side tracking with Segment Analytics.js and similar libraries. The write key allows data to be sent to the associated Source but does not provide access to read data or modify configurations. This approach is standard among analytics tools. If unusual activity is detected, a new write key should be generated. To avoid exposing the write key, use Segment’s HTTP Tracking API or a server-side library.