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

Load consent mode with script #174

Merged
merged 3 commits into from Apr 9, 2024
Merged

Load consent mode with script #174

merged 3 commits into from Apr 9, 2024

Conversation

samhotep
Copy link
Member

@samhotep samhotep commented Apr 8, 2024

Done

  • Consent mode will now load as soon as the script is loaded, and not wait for the entire DOM to load
  • Objects are passed to the gtag method raw

QA

  • Clone the repo
  • Build and run the demo
$ yarn build
$ yarn serve
  • Before accepting any preferences, output the value of window.dataLayer in the console
  • It should contain {"consent", "default", ...}
  • After accepting any preferences, output the value of window.dataLayer in the console
  • It should contain {"consent", "update", ...}

@carkod
Copy link
Contributor

carkod commented Apr 8, 2024

Where is the demo?

@akbarkz
Copy link

akbarkz commented Apr 9, 2024

@carkod I guess for cookie-policy there is no automatic demo since it's a module we use in other websites. Right, @samhotep?

@samhotep
Copy link
Member Author

samhotep commented Apr 9, 2024

@akbarkz That's right

@samhotep samhotep merged commit 2b32e1f into main Apr 9, 2024
4 checks passed
@carkod
Copy link
Contributor

carkod commented Apr 9, 2024

What I usually do is create a PR with the module update to make sure it works on our sites. But if you have an example, I guess it's fine.

@carkod carkod deleted the pass-raw-objects branch April 9, 2024 09:35
@samhotep
Copy link
Member Author

samhotep commented Apr 9, 2024

In fact that's what ended up happening while doing QA, though the demo is now closed

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

Successfully merging this pull request may close these issues.

None yet

3 participants