tracera
Trackers

Web tracker SDK

The Tracera web tracker is a single tiny script with one job: collect what's happening on your site without leaking anything about who's doing it.

Install

<script defer
  src="https://tracera.eu/t.js"
  data-pk="pk_a3f09c2e71bd">
</script>

Place it once, anywhere in the HTML document. defer guarantees it runs after parsing and never blocks rendering.

Configuration attributes

AttributeDefaultPurpose
data-pkRequired. Your property's public ingest key.
data-endpointhttps://tracera.euOverride for self-hosted or first-party-proxy setups.

The global function

After the tracker loads, a global tracera() function is available:

tracera('event', 'signup_completed', { plan: 'pro', value: 49 });
tracera('pageview');                    // manual pageview (rare)
tracera('pageview', '/virtual/onboard-step-2'); // virtual path

Call it from anywhere once the script has loaded.

Self-hosting

For ad-blocker resistance and zero third-party hits, serve the tracker from your own domain:

  1. Download t.js and host it at a path of your choice, e.g. https://yourapp.com/_t/t.js.
  2. Proxy the ingest endpoint from your origin. Any reverse proxy works:
    # Caddy
    yourapp.com {
      reverse_proxy /_t/i* https://tracera.eu {
        header_up Host tracera.eu
      }
    }
  3. Point the tracker at your proxy:
    <script defer src="/_t/t.js" data-pk="pk_..." data-endpoint="/_t/i"></script>

What gets sent

Per pageview the tracker emits one POST to the ingest endpoint with a body like:

{
  "p":  "pk_a3f09c2e71bd",
  "t":  "pageview",
  "u":  "https://app.example.com/dashboard?id=42",
  "r":  "https://app.example.com/",
  "w":  1920,
  "h":  1080,
  "ts": 1730000000
}

Note what is not there: no cookie, no device ID, no IP (the server sees your IP via the TCP connection but never writes it), no fingerprint hash, no list of installed fonts.

Privacy in detail

Troubleshooting

SymptomLikely causeFix
No events at allBad public key, or domain not in property's allowed listRe-check data-pk and the property's "Allowed origins"
SPA only logs first pageviewRoute change isn't using pushStateCall tracera('pageview') manually on route change
Events show in dev but not prodContent-Security-Policy is blocking the beaconAdd tracera.eu to your connect-src directive (or self-host the endpoint)
Ad-blocker drops some eventsCommonSelf-host the tracker and proxy ingest from your own (sub)domain