Production
Enable cookies without a page refresh
Cookies should be enabled without a page refresh after a user has accepted them. Enabling Google Analytics and Google Tag Manager cookies with a page refresh will mean referral traffic will be converted to direct traffic.
Remove existing cookies if consent changes
If the user accepts cookies but then updates their settings to reject them, any cookies already placed on the user’s device must be removed.
Cookie banner and JavaScript
The GOV.UK Cookie banner component explains what to do if JavaScript is not available. Most DWP services should follow the guidance in Option 3: If you set non-essential cookies, but only on the client.
Could we improve this page?
Send questions, comments or suggestions to the DWP Design System team.
Last updated: