Skip to content

Commit

Permalink
fix(analytics): check do not track (#4329) (#4330)
Browse files Browse the repository at this point in the history
Our do not track check was wrong and always returning true.
This is why we were getting nothing.

(cherry picked from commit e04d0f6)

Co-authored-by: Julien Robert <[email protected]>
Co-authored-by: Danilo Pantani <[email protected]>
  • Loading branch information
3 people authored Aug 29, 2024
1 parent cb7b4a0 commit 7e5253c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ignite/internal/analytics/analytics.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ func SendMetric(wg *sync.WaitGroup, cmd *cobra.Command) {
// checkDNT check if the user allow to track data or if the DO_NOT_TRACK
// env var is set https://consoledonottrack.com/
func checkDNT() (anonIdentity, error) {
if dnt, err := strconv.ParseBool(os.Getenv(envDoNotTrack)); err != nil || dnt {
return anonIdentity{DoNotTrack: true}, nil
if dnt := os.Getenv(envDoNotTrack); dnt != "" {
if dnt, err := strconv.ParseBool(dnt); err != nil || dnt {
return anonIdentity{DoNotTrack: true}, nil
}
}

globalPath, err := config.DirPath()
Expand Down

0 comments on commit 7e5253c

Please sign in to comment.