Closed joelpierre closed 2 years ago
@joelpierre Thanks for opening this issue. Are you setting the load
field in @segment/snippet
to false to disable automatically loading analytics.js?
The consent manager needs to be the one to call load
so that it can tell analytics which destinations to enable/disable, but that's why there's a setting on snippet to exclude the load()
call from the snippet itself.
We feature flag our services but yes we only load if the consent manager isn't enabled, satisfying the consent managers requirement to be the thing that manages this process.
I do have it working now but it would be great if these options were a bit more intuitive for people working with both packages. e.g the plugin handling this under the hood if you are using the consent manager.
"@segment/consent-manager" + "@segment/snippet"
Current Stack
Node env: 16.15.1 NextJS ver: 12.2.2 Consent Manager: 5.6.0
Trying to use this package in a nextJS app with one of your other packages "@segment/snippet" and they are simply fighting each other. Considering for the most part the "internet" requires consent of some form these days why doesn't Segment/snippet allow for an opt in for the consent manager so you don't have two configs for the two apps.
I would prefer this package JUST handle the consent manager UI and nothing to do with loading
window.analytics
as right now I get theSegment snippet included twice.
Which IMO shouldn't be an error. If segment is loaded just use that one.