Skip to content
City-BureauPublic

About

Minimal tool for counting page hits on embedded content

Topics

Resources

Code of conduct

Stars

2 stars

Watchers

3 watching

Forks

Latest commit

 

History

46 Commits

Folders and files

Repository files navigation

Hitpoints

Build status

Minimal tool for counting page hits on embedded content. Inspired by pixel-ping. It's designed to be fast and simple by running a Go app on a single 500MB RAM server and writing all output to static file storage.

Setup

Install dependencies and run a development server at http://localhost:8080 with:

make install
make start

Deployment

Deployment setups for AWS and Azure using Terraform are available in the deploy/ directory. You'll need to build the executable with make build before deploying.

Terraform will create static file storage, create and provision a server and configure network security rules. It will output the public IP address of the server when it's finished, and you'll need to update your DNS with an A record pointing to that IP.

Usage

Include snippet on target page with JavaScript:

<script type="text/javascript" src="https://{DOMAIN}/hitpoints.js" async="true"></script>

or with an image tag (hitpoints.gif isn't required, all endpoints other than hitpoints.js will return the pixel GIF):

<img src="https://{DOMAIN}/hitpoints.gif" width="1" height="1" alt="" />

About

Minimal tool for counting page hits on embedded content

Topics

Resources

Code of conduct

Stars

2 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages