actuallymentor / unidentified-analytics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unidentified Analytics

The most basic tracking you have ever seen:

  • tracks amount of times a namespace was called and displays hits per ip address
  • no cookies, no sessions, no user tracking
  • no account creation, no login, no password

[GET] the endpoint /touch/?namespace=ANYTHING, and then see how many times and from how many ips that namespace was [GET] called.

Useful for low-stakes analytics in hobby projects, from README.md files to command lines to webapps.

Click here to open Unidentified Analytics.

Example usage:

Shell script:

# Choose a random namespace for your app
app_namespace="make-something-up-anything-works"

# Call the endpoint
curl "https://unidentifiedanalytics.web.app/touch/?namespace=$app_namespace"

# OR call the endpoint silently and in the background
nohup curl "https://unidentifiedanalytics.web.app/touch/?namespace=$app_namespace" > /dev/null 2>&1

# Stats at: https://unidentifiedanalytics.web.app/stats/make-something-up-anything-works

Markdown:

// Load the tracking url as an image on any markdown document
![Privacy friendly user statistics pixel](https://unidentifiedanalytics.web.app/touch/?make-something-up-anything-works)

// Load the tracking url as an image on any page
<img style="display: none;" src="https://unidentifiedanalytics.web.app/touch/?make-something-up-anything-works" />

// Stats at: https://unidentifiedanalytics.web.app/stats/make-something-up-anything-works

Javascript:

// Choose a random namespace for your app
const app_namespace="make-something-up-anything-works"

// Call the endpoint
await fetch( `https://unidentifiedanalytics.web.app/touch/?namespace=${ app_namespace }` )

// Stats at: https://unidentifiedanalytics.web.app/stats/make-something-up-anything-works

React:

import { useEffect } from 'react'

useEffect( () => {
    const namespace = 'make-something-up-anything-works'
    fetch( `https://unidentifiedanalytics.web.app/touch/?namespace=${namespace}`, { mode: 'no-cors' } )
}, [] )
``

About

License:MIT License


Languages

Language:JavaScript 96.1%Language:Shell 2.2%Language:HTML 1.0%Language:CSS 0.7%