segmentio / consent-manager

Drop-in consent management plugin for analytics.js
https://segmentio.github.io/consent-manager/
MIT License
341 stars 142 forks source link

Add option to skip/disable analytics.load #262

Closed davidbbe closed 1 year ago

davidbbe commented 2 years ago

Previous to using the consent-manager I was able to optionally bypass analytics.load with a conditional in the Segment snippet. This is useful when testing development environments and when running end to end tests. The consent-manager took over when analytics.load is used and now my only option to disable the analytics.load is to use shouldRequireConsent=true for all dev and testing environments. If there was an options to not run analytics.load in development environments then that would give us better options for testing.

busticated commented 2 years ago

2nd'ing this request. it'd be helpful to be able to prevent loading the analytics.js script even if the user has granted consent under certain circumstances (testing, local development, etc). it's worth noting that the segment/snippet package exposes the control (docs | code) though i realize that's a build-time option atm.

edsonjab commented 2 years ago

Hi @davidbbe and @busticated we start looking into your suggestion