Web analytics for public authorities: what federal, cantonal and municipal bodies need to know

Public bodies need a legal basis for processing data, including the statistics of their website. Here is what the FDPIC says about federal bodies, how the Canton of Zurich sees it and how to set up web analytics on a public sector website properly.

In short

Federal bodies may only process personal data with a legal basis (Art. 34 FADP). For cookies that lead to profiling, the FDPIC requires them to obtain express consent. Cantons and communes follow cantonal law. The Data Protection Officer of the Canton of Zurich states that analytics on public bodies' websites is only permitted anonymously. The federal administration itself uses Matomo by default for its web analytics, and according to admin.ch that data stays in Switzerland.

Federal bodies: a legal basis comes first

For private website operators, according to the FDPIC neither the Swiss Data Protection Act (FADP) nor Art. 45c of the Telecommunications Act require consent for non-essential cookies, but a clearly visible way to object is mandatory. For federal bodies the starting point is different. Under Art. 34 FADP they may only process personal data if there is a legal basis for it. Sensitive personal data and profiling even require a formal statute.

The FDPIC guideline on cookies and similar technologies, version 1.1 of 6 October 2025, is specific about this:

  • Legal basis and public interest: federal bodies may only use cookies beyond what is technically necessary if they serve a public interest and rest on a sufficiently specific legal basis (section 3.5).
  • Express consent for profiling: unlike private controllers, federal bodies must obtain express consent for cookies that lead to «normal» profiling (section 3.11.2, based on Art. 6(7)(c) FADP).
  • Public or private law: federal bodies can act under public law and under private law. Advertising cookies will mostly fall under private law, in which case the rules for private controllers apply.

What the federal administration uses

On admin.ch the federal administration states that it uses the Matomo software by default for web analytics that is not related to individuals. It is run by the FOITT, the Federal Office of Information Technology, Systems and Telecommunication, plus a Federal Chancellery Matomo server at Metanet (Schweiz) AG. According to admin.ch all data stays in Switzerland. Some offices also use Silktide, with processing elsewhere in Europe.

Cantons and communes: cantonal law

Cantonal and municipal bodies are not covered by the federal FADP but by the data protection act of their canton. The basic idea is similar. In the Canton of Zurich a public body may only process personal data insofar as this is suitable and necessary to fulfil its legally defined tasks (§ 8(1) IDG). Special categories of personal data, which include information about health, require a sufficiently specific rule in a formal statute (§ 8(2) and § 3(4) IDG). If a body outsources processing to a service provider, it remains responsible (§ 6(2) IDG).

The Data Protection Officer of the Canton of Zurich is clear in her article on privacy statements on public bodies' websites: using tracking and analytics tools is «not necessary» (nicht erforderlich) to run a public body's website. Anyone who analyses usage anyway must do so anonymously, and banners, pop-ups and similar mechanisms should be avoided. Her slides for the «Arbeitsgruppe Analytics» of March 2025 put it briefly: analytics (statistics, tracking) is only permitted anonymously, with Matomo as an example.

Other cantons have their own laws and supervisory authorities. Check with your canton's data protection office before you introduce a tool.

Principles for every public sector website

A few principles follow from these rules and help at every level:

  • Statistics, not profiles: what matters to an administration is which pages people find, where visitors drop off and which forms cause problems. Aggregated numbers are enough for that. Profiles of individuals are not needed.
  • No personal data in URLs: an analytics script usually sends the full page address including all parameters. That applies to Logiwolf too. If names, case numbers or search terms appear in the URL, they end up in the statistics. Forms should therefore send their data via POST.
  • No recordings of forms with personal data: session recordings and heatmaps help with usability. On pages with applications, registrations or contact forms they are sensitive. Leave the pixel off those pages or do without recordings.
  • Settle data processing: an external provider may only process data the way you yourself could (Art. 9 FADP; for cantonal bodies cantonal law, in the Canton of Zurich § 6 IDG), and you remain responsible. A data processing agreement is part of it.
  • Know where the data is stored: if data is stored abroad, federal bodies need a basis for the disclosure under Art. 16 and 17 FADP, cantonal bodies under cantonal law. For the USA, adequate protection only applies to organisations certified under the Swiss-US Data Privacy Framework (Annex 1 of the Data Protection Ordinance).
  • Inform transparently: the privacy statement names the tool, purpose, recipients and storage location.

Checklist for web analytics on a public sector website

  1. 1

    Clarify the legal basis

    Check with your data protection office or legal service which basis your web analytics rests on, and record the result in writing.

  2. 2

    Define the purpose

    Write down which questions the statistics should answer, for example which content people find or where forms are abandoned. Measure only what you need for that.

  3. 3

    Check the provider

    Where is the data stored, who processes it, and does the provider also use it for its own purposes? According to the FDPIC, an external analytics tool only meets the justification for statistics under Art. 31(2)(e) FADP if the provider processes the data solely on the operator's behalf. That applies to private operators and is a good yardstick for public bodies. Federal bodies follow Art. 39 FADP, cantons and communes cantonal law.

  4. 4

    Sign an agreement

    Conclude a data processing agreement that includes the technical and organisational measures.

  5. 5

    Exclude sensitive pages

    No recordings on forms, login areas and pages with personal data. Check URLs for names, numbers and search terms.

  6. 6

    Inform visitors

    Update the privacy statement. Under Art. 45c of the Telecommunications Act, visitors must be informed about the processing on their device and its purpose, and they must be able to refuse it.

What Logiwolf brings to the table

Whether Logiwolf suits your body is for your data protection office to assess. These points help with that:

  • Logiwolf sets no cookies.
  • All data is stored in data centres in Zurich and Geneva.
  • A data processing agreement under Art. 9 revFADP and Art. 28 GDPR is available, including the technical and organisational measures.
  • You switch heatmaps and session recordings on per website. The heatmap code only loads on websites where you have enabled heatmaps. The page Heatmaps without cookies shows how it works.
  • Passwords and form fields are masked automatically in recordings. You mask further areas with a CSS selector in the website settings.
  • Billing is in CHF, with invoice payment from an annual subscription.

The FADP rules for websites are explained in detail in the guide Swiss FADP and website analytics, and the guide to privacy-friendly analytics gives the overview for Switzerland, the EU and the UK. Public hospitals and other healthcare providers face additional rules, see Web analytics in healthcare.

This overview is not legal advice.

Sources: Swiss Data Protection Act (FADP), Data Protection Ordinance, status 1 December 2025, FDPIC guideline on cookies and similar technologies, version 1.1, admin.ch, legal information, Zurich Act on Information and Data Protection (IDG), Data Protection Officer of the Canton of Zurich, privacy statements on public bodies' websites, Zurich data protection officer, slides on web analytics (German), March 2025. As of October 2026.

Frequently asked questions

Web analytics for public authorities: FAQ

Do public authorities need consent for web analytics?
It depends on the level and the type of processing. For federal bodies, the FDPIC requires express consent if cookies lead to profiling. A federal body may also only use cookies beyond what is technically necessary with a sufficiently specific legal basis. Cantons and communes follow cantonal law. In the Canton of Zurich, according to the Data Protection Officer, analytics is only permitted anonymously.
Which analytics tool does the federal administration use?
According to admin.ch, Matomo by default, run by the FOITT and on a Federal Chancellery server at Metanet (Schweiz) AG. The data stays in Switzerland. Some offices also use Silktide, with processing elsewhere in Europe.
May a commune use session recordings?
That is for cantonal law and the competent data protection office to decide. Because recordings show individual visits, they are more sensitive than aggregated statistics. Do not use them on pages with forms and personal data.
Does an authority remain responsible if an external provider runs the statistics?
Yes. In the Canton of Zurich, § 6(2) IDG states that the public body remains responsible when it outsources. Under Art. 9 FADP a processor may only process data the way the controller itself could.
What belongs in the privacy statement of a public sector website?
Under Art. 19 FADP at least the identity and contact details of the controller, the purpose of processing and the recipients, and for disclosures abroad also the country and the safeguard. Cantonal bodies follow the requirements of their cantonal law.
Free up to 2,000 pageviews · no credit card

Web analytics with data in Switzerland.

No cookies, with a data processing agreement and billing in CHF.