{"id":16851032,"url":"https://github.com/parkr/ping","last_synced_at":"2025-04-06T01:08:07.913Z","repository":{"id":25339967,"uuid":"28767325","full_name":"parkr/ping","owner":"parkr","description":":bar_chart: Your very own Google Analytics replacement, without all of the Google. Simple as pie.","archived":false,"fork":false,"pushed_at":"2025-03-05T17:31:38.000Z","size":291,"stargazers_count":100,"open_issues_count":1,"forks_count":13,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-30T00:07:03.301Z","etag":null,"topics":["analytics","go","google-analytics","pie","privacy"],"latest_commit_sha":null,"homepage":"http://parkermoore.de/ping/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parkr.png","metadata":{"files":{"readme":"README.md","changelog":"History.markdown","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-04T07:16:28.000Z","updated_at":"2025-03-07T12:02:27.000Z","dependencies_parsed_at":"2024-02-08T00:31:27.159Z","dependency_job_id":"78c5b492-8b93-4025-8b67-1e48abd43ebd","html_url":"https://github.com/parkr/ping","commit_stats":{"total_commits":100,"total_committers":6,"mean_commits":"16.666666666666668","dds":0.4,"last_synced_commit":"a60c473a83c40f1abf94406a4203743a4a2e377d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parkr%2Fping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parkr%2Fping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parkr%2Fping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parkr%2Fping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parkr","download_url":"https://codeload.github.com/parkr/ping/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419860,"owners_count":20936012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","go","google-analytics","pie","privacy"],"created_at":"2024-10-13T13:26:29.825Z","updated_at":"2025-04-06T01:08:07.894Z","avatar_url":"https://github.com/parkr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ping\n\nYour very own Google Analytics replacement, without all of the Google.\nSimple as pie.\n\n## Motivation\n\nGoogle Analytics is creepy. It knows where you are, what computer you're\nusing, what browser you're using, what page you visited, and so on. It has\nhorizontal data for IP addresses, so Google knows what sites you've visited\nacross the Internet, for how long, and what your path was. I'm\nuncomfortable giving Google all this data. In fact, I even wrote [a blog\npost about how to block the various tracking services.](http://blog.parkermoore.de/2014/07/16/dont-like-being-tracked/)\n\n**But**, I wanted to know what my \"greatest\" hits are. I wanted to see what\npeople liked and didn't like. Using Google Anayltics isn't an option, but\nwhat about using something much simpler? Enter: ping.\n\n## Ping: What It Is\n\nPing is a tiny little server that logs three things:\n\n- IP address of visitor\n- URL they visited\n- When the visit happened\n\nA single tiny JavaScript file that the user requests sends down these three\nthings and that's all there is to it. As unintrusive as possible, while\nstill providing insight into the site's strenghts.\n\nIt also respects the [Do Not Track header](http://donottrack.us/), which\nmany browsers now allow users to set for all requests. Complying with this\nheader is not mandatory, but aligns nicely with our motivation for\nrespecting users' privacy when they ask for it.\n\n## Installation\n\nWant to run ping? No problem.\n\n```bash\n$ go get github.com/parkr/ping\n$ PING_DB=./ping_production.sqlite3 ping -http=:8972\n```\n\nSpecify a port (defaults to `8000`) and a database URL and you're off to\nthe races. Enjoy!\n\nRunning behind a proxy? No problem. Specify `PING_PROXIED=true` when\ninvoking `ping` and you're good to go.\n\nPrefer Docker? We got that too!\n\n```bash\n$ mkdir data\n$ docker run --rm \\\n  -e PING_DB=/srv/data/ping_production.sqlite3 \\\n  -v $(pwd)/data:/srv/data:rw \\\n  parkr/ping \\\n  ping -http=:8972\n```\n\nThis will save all data to the specified sqlite3 database,\nmounted to the container and written back to the host.\n\nThen, load the script on your pages in the HTML:\n\n```html\n\u003cscript src=\"https://domain.for.ping.server/ping.js\" type=\"text/javascript\"\u003e\u003c/script\u003e\n```\n\nEvery page will load this `/ping.js` path from the `ping` server and will\nlog the result to your sqlite3 database in the `visits` table.\n\nIf you set the `-hosts` flag for the `ping` executable, you can limit which\nhostnames will be logged. This is a security feature to ensure your sqlite3\ndatabase doesn't bloat with unwanted data from sites you don't want to\ntrack. For example, adding the flag `-hosts=example.com,my-site.com,mysite.rocks`\nwill only log visits to your database for visits to `example.com`,\n`my-site.com`, and `mysite.rocks`. Of course, these sites have to load the\njavascript path as specified above, so this will only work for sites you\ncontrol.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparkr%2Fping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparkr%2Fping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparkr%2Fping/lists"}