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

Set default consent as granted if cookies accepted #156

Merged
merged 1 commit into from
May 14, 2024

Conversation

chrisrhymes
Copy link
Owner

Update Google Analytics script to set default consent as granted if cookies are already accepted.

@chrisrhymes chrisrhymes added the bug Something isn't working label May 14, 2024
@@ -1,8 +1,4 @@
<div class="">
<script
Copy link
Owner Author

@chrisrhymes chrisrhymes May 14, 2024

Choose a reason for hiding this comment

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

Move this script to the head.html so Cookies can be used in multiple files if needed.

ad_personalization: 'denied',
analytics_storage: 'denied',
});
// Set default consent to 'denied' as a placeholder unless already accepted
Copy link
Owner Author

Choose a reason for hiding this comment

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

Check if cookies are accepted and set consent to granted by default.

@chrisrhymes chrisrhymes merged commit a764aec into master May 14, 2024
@chrisrhymes chrisrhymes deleted the fix/google-analytics-default-consent branch May 14, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant