Designing a new approach to cookies and analytics with the Government Digital Service (GDS)

Our objective was to understand the barriers to setting up tracking that works effectively and is compliant
Over time, the number of ways to configure analytics and cookie consent for campaign sites had grown unmanageable. dxw helped us tame the explosion of configuration options, and design a solution which makes simple configuration simple, and complex configuration possible.
– Richard Towers, Lead Developer, GDS
Help for Households, Student Finance England and Homes for Ukraine are all examples of high profile public campaign websites on GOV.UK that have had over 200,000 online visitors a month between them. They are just 3 of many campaign sites hosted on a platform built by dxw back in 2016.
This platform is estimated to have helped government departments avoid millions of pounds in duplicated design and build costs over its lifetime, as well as helping to make campaign sites more accessible for everyone.
Over time, little changes here and there meant the part of the platform that helps teams to set up cookies and analytics became more flexible but less intuitive. We agreed it was time to consider a more holistic rethink and redesign of how the page worked.
We wanted a solution that would:
- reduce reliance and expenditure on external consultancies
- increase the confidence of campaigns teams
- mitigate the risk of non-compliance with relevant legislation
User research and design
We researched with campaign teams from the Department for Science, Innovation and Technology (DSIT), the Ministry of Justice (MoJ), the Department for Environment, Food & Rural Affairs (DEFRA) and the Department for Work and Pensions (DWP).
Our objective was to understand the barriers to setting up tracking that works effectively and is compliant.
There were notable variations in teams’ confidence when it came to cookies and analytics. A few felt they understood the space and had the right internal capabilities, but the majority didn’t have access to technical resources to be confident in setting up tracking properly. Regardless, everyone needed something that helped them to set up tracking that worked and was compliant with the General Data Protection Regulations (GDPR) and Privacy and Electronic Communications Regulations (PECR).
We also summarised the needs of GDS (as the product owners) and the Government Communication Service (GCS) (as a major contributor). They needed something that would:
- build out product functionality to replace manual tasks
- put in place guardrails that help users make good compliance decisions
- offer more flexibility to users that need additional functionality
- draw clear lines of responsibility and communicate them effectively
In a playback to the project’s stakeholders, we recommended giving teams 2 ways of setting up cookies and analytics – a Recommended option and an Advanced option.
The Recommended option addresses the needs of less experienced teams who want basic tracking but don’t have a lot of technical resources in their team. With this option they get more support in setting up their privacy policy and cookie notice pages, cookie consent banner and cookie setting page.
The Advanced option gives more flexibility to those doing more detailed monitoring and tracking of user behaviour. Through the platform they can add a Google tag manager container and in turn take on more responsibility for compliance. They are wholly responsible for their privacy policy and cookie notice pages, cookie consent banner and cookie setting page with high-level guidance given by GDS and GCS.
These options looked like this…

Build and test
A sprinting team started with a goal of having something for users to test within 4 weeks. Some of the work was a reconfiguration of the current parts of the page and other bits were adding new functionality. The new functionality included:
- ‘I agree’ checkboxes presented to those choosing the Advanced option as a way of confirming they understand their compliance responsibilities
- populated cookie notice and privacy policy pages for those choosing the Recommended option
- information gathering fields that would be used to populate the privacy policy pages for those choosing the Recommended option
- dynamic fields in the cookie notice page which sourced information from the tracking pixels added to the page
We addressed several technical challenges to improve the user experience:
- There was a technical spike into how translations would work. Translation was a factor in some campaign teams choosing to set up their cookie banners and pages through third party tools. If we could better facilitate translations it would reduce the need for teams to use these tools and set up tracking via Google tag manager. It was important we understood how the new content would work and that users seeing the site in other languages were handled the same.
- We also discussed how we would handle Google’s introduction of Consent Mode V2. While we had control over disabling Google Consent Mode V2 for teams choosing Recommended, we needed to make it clear to those choosing Advanced that it was something to consider within their departments.
- The privacy policy and cookie notice pages we are offering to those choosing the Recommended method would likely require some updates over time. We had to look at how this would be handled and weigh up options of either hardcoding or making an interface which would allow GDS to edit the templates. After consulting GDS and GCS about how often changes to the original boilerplates were made, we decided on the simpler solution of hardcoding the templates with the option to build this into an interface in the future.
Since its release, campaigns teams have welcomed the changes with a regular campaign platform user at DEFRA saying:
We’ve really valued being involved in GDS and dxw research into the new cookies and analytics option. Our feedback has been taken into account, and the new options will help us to implement more ambitious tracking whilst ensuring we remain compliant.
Read more about the campaigns platform and the team behind it or email us on contact@dxw.com.