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

Add a GTM usage with nonce example #32

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add a GTM usage with nonce example #32

wants to merge 3 commits into from

Conversation

DefV
Copy link
Member

@DefV DefV commented Aug 28, 2024

  • Add vite in development so we can use the library in development
  • Test a use case with GTM

// Push a custom event to test
dataLayer.pushEvent('test_event', { message: 'Hello, GTM!' })

console.log('GTM initialized with nonce:', nonce)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dat is een beetje liegen, want je haalt de nonce niet terug uit de datalayer, maar tis een example en ik weet niet of we ooit een use case hebben waar we die nonce wel uit de datalayer moeten halen.

Een ander ding wat ik niet meteen het nut van zag was waarom je die config zit op te halen.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Je steekt de nonce niet in de data layer, je laadt het datalayer script gewoon met de nonce actief
  • Ik doe het zo omdat dit de "default manier" is om GTM & Privacy gate te laden

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

Successfully merging this pull request may close these issues.

4 participants