diff --git a/kontrol-service/api/analytics.go b/kontrol-service/api/analytics.go index 28ff9f3..b600eb2 100644 --- a/kontrol-service/api/analytics.go +++ b/kontrol-service/api/analytics.go @@ -20,7 +20,7 @@ const ( // NewAnalyticsWrapper creates a new AnalyticsWrapper func NewAnalyticsWrapper(isDevMode bool, writeKey string) *AnalyticsWrapper { - if !isDevMode { + if !isDevMode && writeKey != "" { // This is the Segment write key for the "kontrol-service" project. It is not // a sensitive value, but it could be extracted to an env var in the future // to separate dev and prod traffic if desired.