Skip to content

Load script on demand #330

Answered by Shinigami92
urbanambroz asked this question in Q&A
Discussion options

You must be logged in to vote

From the README:

enabled: true, // defaults to true. Plugin can be disabled by setting this to false for Ex: enabled: !!GDPR_Cookie (optional)

This is exactly your use-case

So later when reading the cookie and it is accepted, then you can call gtm.enable() and you have exactly what you request

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@urbanambroz
Comment options

Answer selected by urbanambroz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants