Skip to content
Start free trial
BlogPrivacy-first analytics

Analytics data retention: how long to keep what

A client asks how long you keep their visitors’ analytics data, and you realise nobody ever decided. Here’s why retention matters, how to choose a period for each kind of data, and what FunnelSights keeps.

Picture a small agency that runs analytics for a dozen client sites. One client’s lawyer emails a simple question: “How long do you keep our visitors’ analytics data?”

The account manager opens the analytics settings and realises nobody ever decided. Everything since the first install is still there.

An analytics data retention period is how long a tool keeps what it collects before deleting it. It sounds like a setting you pick once, but it’s one of the bigger privacy decisions in your setup, because the older and more detailed the data, the more it can say about individual people.

By the end of this post you’ll be able to answer that lawyer. You’ll know why retention matters, how to choose a period for each kind of data, and what FunnelSights keeps by default.

Key takeaways

  • Retention is a legal requirement as well as housekeeping: the GDPR says personal data must be kept no longer than necessary.
  • Analytics holds several kinds of data with very different risks, so each deserves its own period, with the shortest for anything that identifies.
  • Choose periods from the decisions the data supports. Year-on-year comparison needs long-lived totals, while raw events can go much sooner.
  • FunnelSights deletes hash salts after 48 hours, purges raw events after 180 days by default, and keeps daily totals, which carry no visitor ID, for up to five years.
  • Retention only works if deletion is automatic, and your privacy notice must state the periods or how they’re set.

Why does analytics data retention matter?

Under the GDPR, personal data must be kept in a form that identifies people for no longer than its purpose needs. This principle is called storage limitation, and it applies to analytics like everything else.

A tool that keeps every raw event forever is hard to square with that, however handy a five-year-old clickstream might be once in a while. There are practical reasons too:

  • Exposure. Data that no longer exists can’t leak or be misused by someone with the wrong access.
  • Requests. When someone asks what you hold about them, a short retention period means a short answer.
  • Re-identification. One day of pseudonymous events says little about anyone, but years of them linked together can say a lot.
  • Cost and speed. Raw event tables are the biggest thing an analytics system stores, and the slowest to query.

What kinds of analytics data are there?

The most common mistake in retention policies is choosing one period for everything. Analytics holds several kinds of data, and they carry very different risks.

  • Keys and identifiers, such as salts, cookie IDs and client IDs. These link activity to a person or a browser, so they deserve the shortest life you can manage.
  • Raw events and sessions: every pageview, click and conversion, with a timestamp and usually a pseudonymous ID. They’re the most detailed part of the store, and the most sensitive.
  • Aggregates: counts per page, source, device or day with no identifier attached. They answer almost every reporting question and carry little risk.

Separating these lets you keep history without keeping people. The report you open in two years can come from aggregates, which are safe to keep, while the detailed events behind it are deleted much sooner.

How to choose an analytics retention period

Start from the decisions the data supports, then work through these five steps for each kind of data.

Step 1: Decide how far back your comparisons go

A year-on-year comparison needs at least 13 months of history. That history can come from aggregates.

Step 2: Decide how long you need raw events

Raw events are mostly for investigating something recent, like a drop in conversions, a broken page or a new campaign. A few months usually covers it.

Step 3: Keep identifiers as short as possible

For counting visits, an ID only needs to last about as long as a visit. If yours lasts longer, you should be able to name the purpose.

Step 4: Check what you’ve already promised

If your privacy notice or client contracts commit to a period, the tool has to meet it, and not the other way round.

Step 5: Make deletion automatic

A retention period that relies on someone remembering to run a clean-up is a hope rather than a period.

Write the result down for each kind of data, with the reason. The GDPR asks you to tell people how long you keep their data, or how you decide, so this list ends up in your privacy notice anyway.

How long does FunnelSights keep analytics data?

FunnelSights follows the approach above: the more identifying the data, the shorter its life.

What FunnelSights keeps, and for how long
What it holdsKept for
IP address and user agentInputs to the visitor hashNot stored. Used during the request only
Hash saltsThe secret keys behind each day’s visitor hashes48 hours, then deleted
Raw events and sessionsEach pageview and event, with the daily visitor hash180 days by default, then purged
Daily aggregatesCounts per page, source, device, country and event, with no visitor IDUp to five years, then purged

Default periods, set for the service as a whole.

How one pageview ages in FunnelSights
  1. At ingestThe IP address and user agent are used to compute the day’s visitor hash, then dropped with the request.
  2. 48 hoursThe salt behind that hash is deleted. From now on, nobody can recompute the hash from an IP and user agent.
  3. 180 daysThe raw event and its session are purged, and the visitor hash goes with them.
  4. Five yearsThe daily totals the pageview contributed to are purged. They never held a visitor ID.

The 48-hour salt deletion is the period that matters most for privacy. Once a day’s salt is gone, the hashes it produced can’t be recomputed from an IP address and user agent by anyone, including us.

The raw events that carry those hashes go after 180 days. The daily totals your reports read carry no visitor ID, so keeping them for years keeps your history without keeping a trace of any individual visitor.

Each deletion runs by itself. Expired salts are removed whenever ingest refreshes them, raw events and sessions are purged during the rollup that runs every 15 minutes, and expired totals are removed by a daily job.

What the 180-day limit means in your reports

Unfiltered reports read the daily totals, so they reach back as far as the totals do. A filtered view, say visits from one campaign on mobile only, has to be worked out from raw events, so it reaches back 180 days.

Ask for a filtered year and the dashboard answers for the part of the range it still holds, and tells you where it was cut off.

Separately from these periods, you can ask for your data to be deleted at any time. Write to us and it’s done within 30 days, covering the account, the workspaces you own and the analytics data for the sites in them.

How does GA4 handle data retention?

If you’re coming from Google Analytics 4, its retention setting is easy to misread. It applies to user-level and event-level data used in Explorations, and the standard reports aren’t affected by it.

Standard GA4 properties offer two months or 14 months, and the default is two. If your team builds explorations over longer periods, check what your property is set to before you assume the history is there.

The design difference comes down to identifiers. GA4’s setting limits detailed data tied to a lasting identifier, while a cookieless design has no lasting identifier to limit. The cookieless analytics guide explains the rest of that model.

How to put retention in your privacy notice

Article 13 of the GDPR asks you to tell people how long their personal data will be stored, or, if that isn’t possible, the criteria used to decide. For analytics, a clear notice covers:

  • Each kind of analytics data you keep, in plain words.
  • How long each is kept, or the rule that decides it.
  • Whether deletion is automatic.
  • Where the data is processed. For FunnelSights that’s the United States, which makes EU and UK traffic an international transfer.

Back to the agency. With a period and a reason for each kind of data, their reply to the lawyer becomes a short table instead of an awkward silence.

Retention is one part of a wider question about what your analytics holds. Is analytics data personal data? covers which of these categories count as personal data, and analytics without storing IP addresses covers the one field best kept for no time at all. Analytics and consent sets out what FunnelSights does and doesn’t claim.

Frequently asked questions

How long should analytics data be kept?

There’s no single right number, and one number for everything is usually wrong. Keep identifiers as briefly as possible, raw events for as long as you investigate recent changes (often a few months), and aggregates for as long as your comparisons reach, such as 13 months or more for year-on-year.

What is GA4’s default data retention?

Two months. Standard GA4 properties can be set to two or 14 months. The setting applies to user-level and event-level data used in Explorations, and the standard aggregated reports aren’t affected by it.

Does deleting raw events delete my reports?

Not in FunnelSights. Reports read daily totals, which are kept for up to five years and carry no visitor ID. What you lose after 180 days is the ability to apply new filters to that older period, because filtered views are worked out from raw events.

Do I have to state retention periods in my privacy notice?

Under the GDPR, yes. Article 13 asks you to state how long personal data is kept, or the criteria used to decide. For analytics, list each kind of data and its period.

Can I ask FunnelSights to delete my data early?

Yes. Write to us and your data is deleted within 30 days, covering the account, the workspaces you own and the analytics data for the sites in them. That runs separately from the automatic retention periods.

More in this series

This post is part of Cookieless analytics: how it works, what it costs, and how to choose, our guide to privacy-first analytics.