Hits

Fast | Self Hosted | Page Hits Service


About

Hits is a simple self hostable service for registering page views.

It's fast, tiny and built for a most simplest of use cases.

Usage

The service only has 2 API's

→ Register Hits

curl https://yourdomain.name/hit?url=https://another.domainname.com
      

← Get Back Hits

curl https://yourdomain.name/hits?url=https://another.domainname.com
      

Replace yourdomain.name with the url/host of wherever you're hosting this service.

and url?=https://another.domainname.com with the link that needs to be registered for hits

Snippet

Place the below lines into each page's script tag to register hits

fetch(`https://yourdomain.name/hit?url=${window.location.href}`)
      .then(r=>r.text())
      

Counter

0

Source

barelyhuman/hits