Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initiating segment on disabled change #26

Open
MarineLB opened this issue Jul 22, 2021 · 1 comment
Open

Initiating segment on disabled change #26

MarineLB opened this issue Jul 22, 2021 · 1 comment

Comments

@MarineLB
Copy link

Hi ! To comply with GDPR measures, I need to set segment disabled to true initially but then init it when the user clicks accepts in the cookie banner.
Is there a way to load the script in this way?
setting this.$segment.disabled = false like this does not seem to work.

Thanks!

@attac-t
Copy link

attac-t commented Jul 23, 2021

I think that the best way is to retrieve the destinations by using https://cdn.segment.com/v1/projects/${segment_key}/integrations and display them to the user. When the user has allowed these destinations, send them through segment's window.analytics.load function. Window.analytics will be automatically available via the nuxt-segment plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants