Skip to the content
Start free

Data retention

Data retention is how long a business keeps the information it collects. In Google Analytics 4 it is a setting; under UK data protection law it is a duty not to keep personal data longer than you need it. Every analytics tool, log and inbox you run has a retention period, whether you chose it or not.

What is data retention? #

It is the time between collecting a piece of data and deleting or anonymising it. A website collects a lot: page views, server logs, contact form emails, orders, recordings of sessions. Each one should have a period and a reason. Writing them down in one table is called a retention schedule. Retention is one half of the job; the other half is collecting less in the first place.

What does UK law say? #

Article 5(1)(e) of the UK GDPR says personal data must be “kept in a form which permits identification of data subjects” “for no longer than is necessary for the purposes for which the personal data are processed”. Article 5(2) adds accountability: you must be “able to demonstrate compliance”. See UK GDPR. For cookies and similar storage on a device, PECR applies as well.

What does the ICO expect? #

The ICO’s storage limitation guidance is plain: “You must not keep personal data for longer than you need it.” You should be able to justify the period you choose. You need “a policy setting standard retention periods wherever possible”. You should review what you hold, and “erase or anonymise it when you no longer need it”. Anonymised data falls outside the principle. Pseudonymised data, such as key-coded data, “will usually still permit identification”, so it is still covered.

What does a website usually hold? #

More than most owners think. Analytics keeps each session and pageview, often with the referrer and UTM parameters. Conversion tracking links visits to orders. Server-side tracking and logs add the user agent and address of every request. Each of these needs a period. Shorter raw data also means less to protect if something goes wrong.

Your history is how you judge change. A fall after a Google core update only makes sense against last year. Google’s Analytics help says “Search Console keeps data for the last 16 months“. After that, the rows in Google Search Console are gone unless you saved them yourself. So retention cuts both ways: keep personal data short, and keep the anonymous totals you need for SEO reporting for as long as they help.

Why does it matter for AI answers? #

Most of what you learn about an AI crawler comes from logs: which bot came, when, and which pages it read. Bots are not people, but logs also hold people’s IP addresses. A short raw log with long-lived anonymous totals lets you see how AI bots change month by month without keeping a trail on any person. See log file analysis, bot visit and verified bots.

How does it work in Google Analytics 4? #

Google’s data retention help page says the setting controls when user-level and event-level data is deleted. For standard properties, user-level data and event data can each be kept for 2 months or 14 months. 26, 38 and 50 months are for 360 properties only. Age, gender and interest data is always kept for 2 months. The setting “does not affect standard aggregated reports”. It does affect explorations and funnel reports, so a short setting limits how far back you can dig. See Google Analytics 4.

What happens when you change it? #

The same page says Analytics waits 24 hours before applying a change, and you can undo it in that window. Shortening the period deletes older data at the next monthly deletion run. Lengthening it applies only to data not yet deleted. A “Reset on new activity” option restarts the clock for a user each time they return. Large and XL properties are limited to 2 months.

How long do other tools keep data? #

Tool or record Kept for Source
GA4 user-level and event data (standard property) 2 or 14 months, your choice Google Analytics Help
GA4 age, gender and interest data 2 months Google Analytics Help
Search Console performance data The last 16 months Google Analytics Help
Microsoft Clarity playback data 30 days Microsoft Learn
Microsoft Clarity click and heatmap data; labelled or favourite sessions 9 months Microsoft Learn
A limited company’s accounting records 6 years from the end of the last financial year they relate to GOV.UK

Microsoft’s Clarity retention page adds that data “is deleted after the retention period and cannot be recovered”, backups included.

A worked example #

A bike shop run as a limited company writes a one-page retention schedule. Some periods are set by law, some are its own choice, and it records the reason for each:

Data Kept for Why
Orders, invoices and other accounting records 6 years from the end of the financial year they relate to GOV.UK says a limited company must keep records this long, or longer in some cases
GA4 user-level and event data 14 months enough to compare this season with last; the shop’s choice
Contact form emails that did not lead to an order 12 months to answer follow-up questions; the shop’s choice
Server logs 90 days to look into errors and bad bots; the shop’s choice

GOV.UK lists cases that need longer: a transaction that spans more than one accounting period, equipment expected to last more than 6 years, a Company Tax Return filed late, and a compliance check HMRC has started. It also says not keeping records can mean a £3,000 fine and disqualification as a director.

Common mistakes #

  • Leaving GA4 on 2 months because nobody changed it, then finding last year’s explorations empty.
  • Keeping raw server logs, full of IP addresses, for years “just in case”.
  • Forgetting copies: exports, spreadsheets, backups and old inboxes have retention periods too.
  • A privacy notice that promises one period while the tool is set to another.
  • Thinking a hashed IP address is anonymous. If it can still be linked back to a person, it is pseudonymised, and the ICO says such data “will usually still permit identification”.
  • No way to act on a request for erasure. The ICO checklist asks for processes for “the right to be forgotten”.

How to check it #

  1. In Google Analytics, go to Admin, then Data Settings, then Data Retention in the property column. You need the Editor role. Note both settings, then write the period and the reason in your records.
  2. List every tool that collects data on your pages. The Tracking Checker shows every tracker and pixel a page loads, and the tech stack checker shows the analytics and shop software behind it. Each one needs a line in your schedule.
  3. See what a page stores before consent with the Cookie Checker. See cookie banner, first-party cookies and Consent Mode v2.
  4. Check the legal basics on a shop with the UK Shop Compliance Checker or the wider Online Shop Checker. See what a UK business website must show by law.
  5. Look at your logs before you delete them. Drop a log into the AI Crawler Log Analyser; it runs in your browser, so the file stays on your computer. Check any bot that matters with Verify an AI Bot. Turn log times into dates with the Unix Timestamp Converter.
  6. Photos carry data too. View it with the Image Metadata Viewer and strip location and camera details with the EXIF Remover before you upload.
  7. Protect what you keep. Run the Security Headers Checker, the SSL Certificate Checker and, on WordPress, the WordPress Security Checker, which looks for open user lists and APIs.
  8. Check what a page tells bots about storing copies with the HTTP Header Checker, which shows cache and X-Robots-Tag headers.
  9. Save the totals you need before they go. Search Console forever keeps history past Google’s 16 months, cookie-free analytics counts visits without cookies, and the sealed evidence ledger keeps a tamper-evident daily record of AI traffic. All three are in URSY Pro, opening in stages.

What URSY.com counts, and how long we keep it #

We count people, search engines, AI crawlers, AI agents and other machines. Raw rows are kept for 30 days, hourly totals for 90 days, and daily totals for good. A person is a daily visitor code that changes every UTC day and cannot be turned back. We never keep full IP addresses, fingerprints, what people type, counter cookies or query strings. The rules are on our methodology page, with more on privacy and our data processing agreement.

Questions #

How long should I keep Google Analytics data? #

Long enough for your purpose, and no longer. 14 months is the longest a standard property allows, and it lets you compare a season with last year. Write down why.

Does the GA4 retention setting delete my reports? #

No. Google says it “does not affect standard aggregated reports”. It limits explorations and funnel reports.

Is anonymised data covered by the storage limitation rule? #

No. The ICO says truly anonymised data falls outside it. Pseudonymised data, such as key-coded data, usually still counts as personal data.

How long must a company keep its accounts? #

GOV.UK says 6 years from the end of the last financial year they relate to, and longer in some cases.

Can I keep data forever for statistics? #

The UK GDPR allows longer storage solely for archiving in the public interest, research or statistics, with safeguards. The ICO says you cannot then use it for decisions about individuals.

Sources #

Updated 24 November 2026 by URSY.com.

Cite this page: Data retention. URSY. Updated 26 November 2026. https://ursy.com/wiki/data-retention/ · Section links

Tools for this

All 871 wiki entries, A to Z →