HomeCase studiesThis site's analytics

Something I built · Analytics

This site's analytics

Analytics that load only after consent, track a short list of actions, and arrive in my dashboard every morning.

Build2026
The giovanniperri.com homepage with the cookie banner open, showing Accept and Reject as equal buttons.

The cookie banner: nothing loads until you choose.

The company

I wanted to know which pages bring people to a call, without tracking anyone who has not agreed to it. The site follows the Italian data protection authority's cookie rules, so the banner offers Reject as clearly as Accept.

The brief

  • Nothing tracked before the cookie banner is answered.
  • Track only the actions that matter.
  • See the numbers every morning without opening an analytics tool.

Worked in

PostHogCloudflare WorkersCloudflare D1

What I did

Consent first

The analytics script is not on the page until a visitor accepts. Before that, no request goes to PostHog. Reject is the same size and weight as Accept.

A short list of events

Automatic capture is switched off. The site records page views and a few actions: clicks on a call to action, clicks through to book a call, newsletter sign-ups and case study views. That makes every number easy to explain.

The numbers come to me

Every morning at 7:00 my HQ dashboard asks PostHog for visitors, sessions, page views, the top pages and the booking clicks, and groups the traffic into channels such as search, social, email and AI assistants. It keeps 90 days of snapshots.

What came of it

Results.

No tracking before consent, checked in the browser on the live site
A short, fixed list of events, the same list the privacy policy describes
A daily snapshot in HQ at 7:00, with traffic grouped by channel

Figures belong to this engagement and this client. Nothing here is an average or a benchmark, and no number appears without the work behind it described above.

What I took from it

Fewer events, all of them meaningful, beat a tool that records everything and explains nothing.

Something similar, at your company?

If I am not the right fit, I will say so on the call and tell you who is.