arp242 / goatcounter

Easy web analytics. No tracking of personal data.
https://www.goatcounter.com
Other
4.55k stars 190 forks source link

Multi-domain confusion #736

Open LordPraslea opened 7 months ago

LordPraslea commented 7 months ago

Hi

Great job for goatcounter. I've installed it on a VPS I own. However I'm greatly confused. I've looked into the docs, searched the net and looked into all issues to try to figure this out.

I have a goatcounter on a certain subdomain stats.mydomain.tld, I've setup the script tag on mydomain.tld.

I'm confused as to how to add multiple domains and see the switch on goatcounter. Each time I click mydomain.tld i'm reddirected to that website. For multiple domains/websites it's the same.

I'm confused by the /help/domains page which states as a first option

  1. Create a new site for every domain; this is a completely separate site which has the same user, login, etc. You will need to use a different site for every (sub)domain.

What does that mean, do I have to RUN a new goatcounter binary instance on a NEW subdomain (stats.anotherdomain.tld?) for each domain/subdomain I want to track? An example might be better suited as I'm 100% sure many other people get confused by that page.

OR can I run a command in the linux CLI to create a new site using the same instance(subdomain)?

On stats.mydomain.tld I do see the results and I've played around with option 2 but would like to somehow have the sites separate

BTW. There's a big issue with the stats./count? getting blocked by ublock origin by default, have any idea how to go around this in a feasible way?:) Maybe /count should be replaced as /info or something similar

Have a nice day!

arp242 commented 6 months ago

You can add multiple sites in "Settings → Sites":

cap-2024-05-02T22:56:10_border

I think it may just be as simple as that? After you've added the site you can choose between them in the top menu on the left.

BTW. There's a big issue with the stats./count? getting blocked by ublock origin by default, have any idea how to go around this in a feasible way?:) Maybe /count should be replaced as /info or something similar

In a quick test this doesn't seem to be an issue, at least not with uBlock Origin and a clean profile.

hugopeek commented 5 months ago

Hi @arp242, I'm struggling a little with this too. I found the Sites section, added a second site there, and it is collecting data separately from the main site... But is there any way to limit access to this second site, so it can't read data from the main site? Because now you can still switch between the 2 from the header.

I created a separate read-only user already, but it seems you can log in on any site with any user, just with different access permissions..

Is it possible to restrict users to a specific site somehow?

arp242 commented 3 months ago

Is it possible to restrict users to a specific site somehow?

Not really; users are always on the entire account (that is: all sites). You can of course create multiple accounts, and those are entirely separate.

Technically, it does support per-site access controls, but there is no UI to set it, and there's probably a few bugs there as well. I just did it like that so I could relatively easily add it later on. But I never did as no one really asked for it, and "just use multiple accounts" has thus far been "good enough".