Last week I had interesting discussions with some Chiffre users about the Origin filter feature. It's something I had put in place early on, to prevent "spam analytics" coming from other domains than your production website. This could happen for many reasons:
My initial assumption was that a project was tied to a particular deployment, and you'd use additional projects if you really wanted to measure a staging environment. But that assumption did not take account limits into consideration at the time, so it does not work anymore. (ICYMI: we discussed limits in week 4 of this newsletter).
We can't allow every single domain to push stats to your analytics dashboard unchecked, as website hijacking is unfortunately a thing.
The other issue is that new users of Chiffre have usually tried it on a staging domain, and wondered why their analytics were not counted.
There are several options here:
*.mydomain.now.shfor Vercel deployments)
We could go a step further and store the origin along with the message, and let the webapp choose whether to analyse it or not.
This could look a bit like Stripe's Test / Live switch: you have your test analytics for local development, preview deployments and staging environments, and live analytics for production.
This would make a lot of sense when integrating with Chiffre's custom events function, to test goal tracking.
One issue with this approach is that the Origin header is not always present, some browsers simply don't send it. We could instead rely on the tracker script to capture the value of
location.hostname and send it along with the message.
There was some discussion on Hacker News about the relevance of honouring DNT, which I have listed as a feature on the landing page.
What happens when a visitor's browser emits a "Do Not Track" signal is the following:
This is obviously very limiting, as it does not bring much information. At the very least, I could add the page the visitor landed on, to count in page views.
Same-site tracking (following a visitor across their movements on the website) can be desirable, so this might be something I could allow as an opt-in behaviour for the site owner, with an opt-out for the visitor.
Last week I started working on a small library to graph values over time, locally and with a simple API. I'm planning on using it to graph and measure my progress on the Web Workers performance improvements.
Amusingly, it's borrowing some concepts from Chiffre itself: an IndexedDB time series database, aggregated graphs and dynamic recalculation when the underlying data is updated:
I will keep polishing the API and post it as an open source TypeScript library on my company's organisation on GitHub, 47ng, where I keep a lot of other things that I have open-sourced after needing them on more than one project (building Chiffre led me to open-source 25 projects in a year 🎉).
Things are a bit quieter this week:
See you soon, and take care.
Founder | Chiffre.io