Skip to content

Data Integrity & Anti-Spoofing

How Fusionaly protects your analytics from fake events, bot traffic, and backend spoofing attempts

Fusionaly includes multiple layers of protection to ensure your analytics data reflects real user behavior. Unlike cloud analytics platforms that rely on opaque filtering, Fusionaly’s defenses are transparent and run entirely on your server.

The most critical protection is browser-only validation — a defense-in-depth approach that blocks requests not originating from real web browsers.

Every event sent to Fusionaly’s ingestion API must pass three validation checks:

  1. Sec-Fetch-Site Header — Modern browsers automatically include this header on every fetch/XHR request. It indicates the relationship between the request origin and target (same-origin, same-site, cross-site, or none). Requests without this header are rejected.

  2. Valid Header Values — The Sec-Fetch-Site value must be one of the four valid browser values. Invalid or fabricated values (like backend or server) are rejected.

  3. Origin or Referer Header — Browsers always include at least one of these headers for cross-origin POST requests. Requests missing both are rejected.

Request TypeBlocked?Reason
curl/wget✅ YesMissing Sec-Fetch-Site header
Postman/Insomnia✅ YesMissing Sec-Fetch-Site header
Backend HTTP clients✅ YesMissing browser headers
Forged headers with invalid values✅ YesInvalid Sec-Fetch-Site value
Real browser (Chrome, Firefox, Safari)❌ NoPasses all checks
Browser extensions❌ NoUses browser’s fetch API

Without browser validation, anyone could send fake events to your analytics:

Terminal window
# This would be rejected
curl -X POST https://your-site.com/x/api/v1/events \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/fake-page", ...}'

Even if an attacker adds fake headers:

Terminal window
# This would also be rejected - missing Origin/Referer
curl -X POST https://your-site.com/x/api/v1/events \
-H "Sec-Fetch-Site: cross-site" \
-d '{"url": "https://example.com/fake-page", ...}'

The combination of multiple header checks makes spoofing significantly harder than checking a single header.

The Sec-Fetch-* headers are forbidden headers in browsers — JavaScript cannot set or modify them. Only the browser itself can include these headers, which is what makes them reliable for validation:

  • fetch() and XMLHttpRequest cannot override Sec-Fetch-Site
  • The browser always sends the truthful value based on the actual request origin
  • Backend HTTP clients don’t send these headers by default

Public ingestion endpoints are rate-limited per IP address (default: 100 requests/minute). This prevents:

  • Denial of service attempts
  • Automated scraping or probing
  • Runaway loops in client code

User-Agent analysis filters out known bots and crawlers before events are processed. Common patterns like Googlebot, bingbot, and headless browsers are excluded from analytics.

For stronger bot protection, consider placing Cloudflare in front of your Fusionaly instance. Cloudflare’s Bot Management uses machine learning, behavioral analysis, and fingerprinting to block sophisticated bots that can evade User-Agent detection.

You can configure IP addresses to exclude from tracking (useful for filtering your own team’s traffic or known VPN exits).

These protections work together as layers:

Request → Rate Limit → Browser Validation → Bot Filter → IP Check → Store
↓ ↓ ↓ ↓
503 error 403 error Ignored Ignored

Each layer catches different attack vectors:

  • Rate limiting stops volume-based attacks
  • Browser validation stops programmatic spoofing
  • Bot filtering removes non-human traffic
  • IP exclusion removes known false positives

Unlike cloud analytics that filter data with proprietary algorithms, Fusionaly’s protections are:

  • Open source — you can audit exactly what gets filtered
  • Configurable — adjust thresholds and rules to your needs
  • Local — all filtering happens on your server, no external services

Your analytics data is only as trustworthy as the ingestion pipeline. Fusionaly ensures that pipeline accepts only genuine browser events.