feat: Twitter Button Cookie Integration#1026
Merged
JuanPabloDiaz merged 1 commit intotech-conferences:mainfrom Jul 9, 2025
Merged
feat: Twitter Button Cookie Integration#1026JuanPabloDiaz merged 1 commit intotech-conferences:mainfrom
JuanPabloDiaz merged 1 commit intotech-conferences:mainfrom
Conversation
- Check cookie consent before loading Twitter widgets - Display simple follow link if consent is not given - Add data-cookieconsent='ignore' attribute for cookie banner compatibility - Prevent automatic Twitter widget loading when user declines cookies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Twitter Button Cookie Integration
This PR ensures the Twitter follow button respects user cookie preferences.
Breaking down #1021
This pull request updates the
TwitterFollowButtoncomponent to respect user cookie consent preferences and improve privacy compliance. The changes introduce a mechanism to check for cookie consent before loading Twitter widgets and provide an alternative follow link when consent is not given.Privacy compliance and cookie consent:
src/components/TwitterFollowButton/TwitterFollowButton.tsx: Added auseStatehook to manage cookie consent (hasConsent) and updated theuseEffecthook to checklocalStoragefor user consent before loading Twitter widgets. If consent is not given, a simple follow link is displayed instead of the embedded widget. [1] [2]Enhancements to Twitter widget attributes:
src/components/TwitterFollowButton/TwitterFollowButton.tsx: Addeddata-cookieconsent='ignore'to the Twitter widget script tag to ensure it doesn't interfere with cookie consent mechanisms.src/components/TwitterFollowButton/TwitterFollowButton.tsx: Addeddata-dnt='true'to the Twitter follow button to enable Do Not Track functionality for enhanced privacy.