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

Blocked by browser ad plugins and correctly identify user's geographic location #758

Open
aaro-n opened this issue Aug 9, 2024 · 0 comments

Comments

@aaro-n
Copy link

aaro-n commented Aug 9, 2024

Introduction

Version:   v2.5.0
Go:        go1.21.5 linux/amd64 (race=false cgo=true)
Database:  PostgreSQL 15.6
Uptime:    9h21m19s

I built my own Docker image, and the repository address is: docker-goatcounter. I found some problems during the trial.

When the secondary domain name is different, goatcounter will be intercepted by the ad filtering plugin

Browser version: Chrome, 127.0.6533.100
Ad blocking plugin version: uBlock Origin 1.59.0

Problem description

The access domain name of goatcounter is: stats.22.xyz, and the website that references goatcounter is file.33.info. When I visit file.33.info, I see the uBlock Origin interception information. The log is as follows:

06:45:59
	
*$ping,3p
	
--
	
file.itansuo.info
	
3
	
post
	
ping
	
https://stats.22.xyz/count?p=file.33.info%2F&t=%E6%96%87%E4%BB%B6%E5%BA%93&s=1440%2C900%2C2&b=0&rnd=kjhl7
Filter rule *$ping,3p
Rule list EasyPrivacy
 
Context file.33.info
First/third party (3) 33.info ⇒ 22.xyz
Type ping
URL https://stats.22.xyz/count?p=file.33.info%2F&t=%E6%96%87%E4%BB%B6%E5%BA%93&s=1440%2C900%2C2&b=0&rnd=kjhl7

Without any changes, the same secondary domain name can normally use goatcounter to count visitor information. For example, the domain name of goatcounter is stats.22.xyz, book.22.xyz can use file.33.info but file.33.info cannot be used. I also searched the Internet for some websites that use goatcounter and found that the vast majority of those that were not intercepted used the same secondary domain name. In addition to creating an access goatcounter for each secondary domain name, such as stats.22.xyz, stats.44.com, stats.899.info, is there a solution that only uses stats.22.xyz?

Goatcounter after nginx can correctly identify visitor geographic location

I use nginx to proxy goatcounter. When goatcounter counts, the visitor's address will be recognized as the nginx address. I did not find any relevant content in goatcounter.

nginx configuration

     location / {
         proxy_pass https://2334.899.dev;
         proxy_redirect off;
         proxy_set_header Host $http_host;
         proxy_set_header X-Forwarded-For $remote_addr;
         proxy_set_header X-Forwarded-Proto $scheme;
         proxy_set_header Connection "";
         proxy_http_version 1.1;

         proxy_ssl_name $host;
         proxy_ssl_server_name on;

     }

How to let goatcounter display the access information of a single website instead of displaying all access information

Goatcounter will display all the information counted by goatcounter on the homepage. I have multiple websites to use goatcounter statistics. In addition to establishing multiple goatcounters or adding multiple domain names, is there any other configuration that can make goatcounter display a single website?

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

1 participant