DavidWells / DavidWells/analytics

Global Analytics.enabled flag

Open
#174 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
2.7k
Forks
267
PR merge metrics
No merged PRs in 30d

Description

Wanted to throw out the suggestion for a global on/off switch. It would be nice to be able to globally cripple Analytics.

Use case would be for development vs production:

const analytics = Analytics({
  app: 'my-app-name',
  enabled: process.env.ANALYTICS_ENABLED,
  plugins: [
    ...
  ]
})

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Analytics(...) initialization entry point shown in the issue and trace how configuration is passed to tracking behavior. Confirm how a globally disabled instance should behave across the existing analytics flow, then verify that enabled and disabled configurations produce the expected result in the test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
analytics
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.