{% extends 'base.html' %} {% block extra_head %} {% include "includes/social.html" %} {% endblock %} {% block extra_css %} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block main %}
All events are sent as JSON to a single POST /collect/
endpoint. The site tag pushes page_view, click, scroll, and page_leave
automatically — everything else is a one-liner on
collectorQueue, or a raw HTTP call from any language.
Attach a handler to any interactive element. The event name is whatever you want to measure later.
Use this for SPA route changes, funnel checkpoints ("invoice paid"), or any meaningful page-level moment. Push once per visit:
Every event is stored as JSON in an extra
column. Add whatever keys you need, no migration required,
query with SQLite JSON1
json_extract(extra, '$.user_segment') later.
The collector endpoint is plain JSON — any HTTP client
will do. Include a valid collector_id,
event, and optional data.
Any backend, any library, any runtime. Here's a Python
example using requests: