DEV Community

Cover image for my analytics deletes your data every night. on purpose
Om Yaduvanshi
Om Yaduvanshi

Posted on

my analytics deletes your data every night. on purpose

my analytics keeps your data for about 13 months. then it deletes it. every night, on a schedule, whether i remember to or not.

the pageview is small on purpose. page, referrer, screen size, time. four things, nothing else. no cookies, no ip addresses, no user agents, no fingerprints. but small data still piles up. four fields times a million pageviews is a database full of other people's browsing history, and "we only stored a little" stops being a defense when you store it forever.

so cloudline deletes it. about 13 months of history, then the nightly job takes the oldest day out. 13 months is long enough for year-over-year comparisons and short enough that i'm not holding data from a version of your site that doesn't exist anymore.

deleting a site is even simpler. delete the site, the data goes with it. immediately. not queued, not anonymized later. gone.

i'm om yaduvanshi, 18, an applied ai developer building cloudline, a cookieless analytics tool. day 25 of 90, building in public.

the problem i kept avoiding

retention was the setting i never wanted to build. every analytics tool i looked at defaults to keeping everything until you tell it to stop, and most people never tell it to stop. so the default became the product: keep everything, forever.

that default is a liability. old data is the stuff that gets breached. it's also the stuff that ends up in a feature you didn't plan. the privacy conversation is always about what you collect. nobody asks how long you keep it.

cloudline live visitors dashboard

what deleting taught me

a delete button you have to press is a delete button you'll forget. so the nightly job presses it for me. boring infrastructure, doing the thing nobody claps for.

there's a side effect i didn't expect. knowing the data expires made me more careful about what i store in the first place. when every field has an expiration date, adding a new one feels like a commitment. i've written before about refusing to build things. the four-field pageview survived that test.

the honest caveat

13 months isn't right for everyone. if your business runs on five-year trend lines, this isn't your tool. i'm not going to pretend one number fits every site. it's the privacy-preserving default for the sites i build for: indie projects, blogs, small products, where last year is the furthest back that matters.

cloudline visitors-over-time chart

and if you want out entirely, deleting one line of code removes the tracker. the data follows.

the question i don't have an answer to

do you know your analytics retention setting? not the default. the number you actually chose.

most of us inherited it. i'd bet most of us never looked.

day 25 of 90. still building.

cloudline is free while in early access. no card.

https://trycloudline.space

— om

Top comments (0)