Analytics Getting started How it works Docs GitLab Hub

Getting started

You start two processes on your machine. rat is the collector. The panel reads that store and serves infer plus your pages. Install the binary, or run the published images. You do not clone this product to do that.

Install rat

rat is the collector. It reports on users. It also starts the local panel and can write a pages repo from the template.

curl -fsSL https://rat.slopkit.dev/install.sh | bash

Init pages

This copies the template into a new panel repo in the current directory. Add reports here later. The collector is not in this repo.

rat init

Run rat

rat is the collector. Apps POST events and metrics here. It is the only writer of the store.

rat
collector listening on http://127.0.0.1:7410

Start the panel

The panel is a second process. It does not write collector rows. It reads the store, runs named SQL, and serves the site from the repo rat init wrote.

rat panel
panel listening on http://127.0.0.1:7411

Post a track

curl -sS -X POST http://127.0.0.1:7410/v1/track \
  -H 'content-type: application/json' \
  -d '{"type":"track","event":"Signed Up","userId":"u1","properties":{"plan":"pro"}}'
{"success":true}

Open infer

Open http://127.0.0.1:7411/infer. The events table lists Signed Up.

Or run:

curl -sS http://127.0.0.1:7411/api/infer
"event":"Signed Up"

Docker instead

Skip rat if you want containers. Run the published collector and panel images. The panel still needs a pages repo. Run rat init once, or point the volume at a repo you already have.

docker run --rm -p 7410:80 \
  -v "$PWD/data:/data" \
  registry.techtailors.net/slopkit/analytics/collector:latest
docker run --rm -p 7411:80 \
  -v "$PWD:/data/panel" \
  registry.techtailors.net/slopkit/analytics/panel:latest

Read the collector HTTP

Open Docs for path, status, and env lookup. How it works covers instances, relay, and page repos.