Details about cookies on GOV.UK

GOV.UK puts small files (known as ‘cookies’) onto your computer to collect information about how you browse the site. Find out more about the cookies we use, what they’re for and when they expire.

Cookies that measure website use

We use Google Analytics software (Universal Analytics) and LUX Real User Monitoring (RUM) software from SpeedCurve to collect anonymised information about how you use GOV.UK.

We do this to help make sure the site is meeting the needs of its users and to help us make improvements to the site and to government digital services.

We do not allow Google or SpeedCurve to use or share the data about how you use GOV.UK.

Google Analytics stores information about:

  • how you got to the site
  • the pages you visit on GOV.UK and how long you spend on them
  • what you click on while you’re visiting the site

Google Analytics sets the following cookies:

Name Purpose Expires
_ga These help us count how many people visit GOV.UK by tracking if you’ve visited before 2 years
_gid These help us count how many people visit GOV.UK by tracking if you’ve visited before 24 hours

We also set our own cookie to understand how people move through the site:

Name Purpose Expires
analytics_next_page_call This lets us know the next page you visit on GOV.UK, so we can make journeys better When you close your browser

LUX stores information about:

  • the pages you visit on GOV.UK
  • how well the pages performed on your device
  • performance bottlenecks your device experienced

LUX sets the following cookie:

Name Purpose Expires
lux_uid This lets us understand the web performance you experience while on GOV.UK 1 day or 30 minutes of inactivity

Comparing different versions of a webpage

We sometimes use analytics to try out different versions of pages to see which work better for users (‘multivariate testing’). We’ll save a cookie so that you consistently see the same version when browsing GOV.UK.

The cookie name will change but will be in the form ‘ABTest-[Test name]’ where the ‘Test name’ describes which part of GOV.UK is being tested.

This type of cookie will usually expire after between 1 and 4 weeks, but this may be longer for more in-depth tests.

If you have not opted in to this type of cookie, you’ll see the standard version of the page being tested.

JavaScript detection

We measure how many people visiting GOV.UK are using JavaScript, so that the site works for as many users as possible.

Name Purpose Expires
JS-Detection This tells us if you are browsing GOV.UK while running JavaScript 1 year

Cookies that help with our communications and marketing

Some GOV.UK pages may contain content from other sites, like YouTube or Flickr, which may set their own cookies. These sites are sometimes called ‘third party’ services. This tells us how many people are seeing the content and whether it’s useful.

In addition, if you share a link to a GOV.UK page, the service you share it on (for example, Facebook) may set a cookie. We have no control over cookies set on other websites - you can turn them off, but not through us.

YouTube videos

We use YouTube to show videos on some GOV.UK pages. YouTube sets cookies when you visit one of these pages.

Name Purpose Expires
_use_hitbox This is a randomly generated number that identifies your browser When you close your browser
VISITOR_INFO1_LIVE Lets YouTube count the views of embedded YouTube videos 9 months

Cookies that remember your settings

These cookies do things like remember your preferences and the choices you make, to personalise your experience of using GOV.UK.

Messages across GOV.UK

We might display a message on all GOV.UK pages to tell you about an important event or situation. We’ll save a cookie that will let us know how many times you’ve seen it, or if you’ve dismissed it.

Name Purpose Expires
global_bar_seen Remembers the number of times you’ve seen the message, or if you’ve dismissed it 12 weeks

Surveys

We will sometimes select users to take part in a survey, for example our performance survey. If you take part, or dismiss the survey, we’ll save a cookie that lets us know you’ve seen the message so that we do not show it to you again.

Name Purpose Expires
govuk_taken[NameOfSurvey] Saves a message to remember if you’ve taken the survey or dismissed it 4 months
govuk_surveySeen[NameOfSurvey] Saves a message to remember how many times you’ve seen the survey 2 years

We use SmartSurvey to collect responses to the survey. If you take part, SmartSurvey will save extra cookies to track your progress on their website.

Browser upgrade prompt

We set a cookie the first time you visit GOV.UK to let us know you’ve visited once.

If you’re using an out-of-date browser the next time you visit, we’ll show you a message suggesting you upgrade.

We’ll also save a cookie that lets us know you do not want to see the prompt if you dismiss it.

Name Purpose Expires
govuk_not_first_visit Stops us prompting you to upgrade an out-of-date browser until after your first visit 28 days
govuk_browser_upgrade_dismissed Saves a message to let us know you’ve seen and dismissed the browser upgrade prompt 28 days

GOV.UK accounts

GOV.UK is trialling accounts to try to improve online public services. To sign in to your GOV.UK account you need to enter your username and password, as well as a security code which is sent to your mobile phone.

You can choose to skip the security code step when you sign in. This will save a cookie to your device, so you will not be asked to enter a security code when you sign in on that device for the next 30 days.

Name Purpose Expires
govuk_account_manager_prototype_remember_me Remembers that you chose to skip the security code step when you sign in on a specific device 30 days

Your location

We may give you the option of saving your home nation on pages where guidance is different if you’re in England, Northern Ireland, Scotland or Wales (for example, the UK bank holidays page).

If you save your location, we’ll save a cookie to your device so we can show you the most relevant information next time you visit that page.

Name Purpose Expires
user_nation Remembers if you saved your location on pages that can be adjusted based on your home nation 365 days

Strictly necessary cookies

Your progress when applying for a licence

When you use the ‘apply for a licence’ service, we’ll set a cookie to remember your progress through the forms. These cookies do not store your personal data and are deleted once you’ve completed the transaction.

Name Purpose Expires
licensing_session Set to remember information you’ve entered into a form when applying for a licence When you close your browser

Your answers when using the ‘Find Coronavirus Support’ service

When you use the ‘Find Coronavirus Support’ service, we’ll set a cookie to remember the answers you give to the questions. This is so we can give you relevant information based on your answers. The cookie stores the answers and is deleted after 4 hours.

Name Purpose Expires
smart_answer_session Set to remember the answers you give to questions After 4 hours

Contacting GOV.UK

Name Purpose Expires
govuk_contact_referrer This lets us know the last page you visited before using the contact GOV.UK form 1 day

GOV.UK email subscriptions

If you sign up to receive email notifications from GOV.UK, we will save a cookie if you change your subscriptions. This cookie is deleted when you close your browser.

Name Purpose Expires
email-alert-frontend_session This remembers you as you change your email subscriptions When you close your browser

Cookies message

You may see a banner when you visit GOV.UK inviting you to accept cookies or review your settings. We’ll set cookies so that your computer knows you’ve seen it and not to show it again, and also to store your settings.

Name Purpose Expires
cookies_policy Saves your cookie consent settings 1 year
cookies_preferences_set Lets us know that you’ve saved your cookie consent settings 1 year

GOV.UK accounts

GOV.UK is trialling accounts to try to improve online public services. If you create a GOV.UK account, we’ll use cookies to remember your session when you’re signed in and when you use GOV.UK.

Name Purpose Expires
_govuk_account_manager_prototype_session Remembers that you’ve signed in to your GOV.UK account while you use your account 30 minutes after you visited your account
_host-govuk_account_session Remembers that you’ve signed in to your GOV.UK account while you use GOV.UK When you close your web browser

Change your settings

You can change which cookies you’re happy for us to use.

Last updated 16 June 2021