Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-domain confusion #736

Open
LordPraslea opened this issue May 2, 2024 · 3 comments
Open

Multi-domain confusion #736

LordPraslea opened this issue May 2, 2024 · 3 comments

Comments

@LordPraslea
Copy link

LordPraslea commented May 2, 2024

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
Copy link
Owner

arp242 commented May 2, 2024

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
Copy link

hugopeek commented Jun 30, 2024

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
Copy link
Owner

arp242 commented Aug 18, 2024

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants