counterscale icon indicating copy to clipboard operation
counterscale copied to clipboard

Rename tracker to "reporter" (or similar)

Open benvinegar opened this issue 1 year ago • 3 comments

I borrowed this terminology from Fathom (tracker.js is a fork of that project's script), but I don't think it's good name:

  1. "tracker" sounds anti-privacy
  2. The script doesn't actually track you – I deleted all the cookie-related code from the script

I think reporter.js would be more accurate.

If we did this, we should continue publishing tracker.js for backwards compatibility (e.g. users could upgrade to the latest version of Counterscale and not need to update their script references).

benvinegar avatar Dec 27 '24 17:12 benvinegar

Reporter.js sounds too generic. counter.js based on project name sounds nice, but might be limited in scope.

lrh11099 avatar Dec 28 '24 10:12 lrh11099

Yeah counter.js is a good idea. Fits the name, could even work as a branding element (e.g. people see counter.js in the network tab, more obvious what it is).

Re: limited in scope – that's also fair. But I don't think the name has to limit what it does. For example, there could be a future where it collects basic latency/web vitals, and yeah that's not "counting" but IMO it's still fair game.

Will sit on this for a bit.

benvinegar avatar Dec 28 '24 15:12 benvinegar

Yeah counter.js is a good idea. Fits the name, could even work as a branding element (e.g. people see counter.js in the network tab, more obvious what it is).

I agree. I also thought about count.js, insights.js, metrics.js cs.js (CounterScale) etc. But keeping a part of the brand name like counter.js seems better.

lrh11099 avatar Dec 28 '24 15:12 lrh11099

I would also vote for counter.js

joshdales avatar Jul 06 '25 16:07 joshdales

In umami, you have an env var which define the name of the script. Also it's a good practice to have the deployment in your subdomain like stats.example.com

bgervan avatar Oct 10 '25 06:10 bgervan

what about the name stats.js?

Norfeldt avatar Oct 23 '25 22:10 Norfeldt

I've thought about this for a bit and I think choosing a different static name is the kind of thing that we could bike shed into oblivion. Instead, I'd propose the solution @bgervan highlighted where the name of the script can be configured via a Cloudflare secret/env variable, similarly to how auth is enabled currently. This would allow backwards compat (default would remain tracker.js), but users can set a different name to use for the script during install with the CLI.

Curious what others think about this approach

stordahl avatar Oct 24 '25 18:10 stordahl

Sounds very reasonable to me

joshdales avatar Oct 24 '25 20:10 joshdales