Script Integration
The VisitorFilters collector is a lightweight JavaScript snippet that captures visitor events and sends them to our processing pipeline for real-time analysis.
Installation
Add the following script to your website's <head> section, replacing YOUR_PUBLIC_SITE_KEY with your actual public site key:
<script
src="https://cdn.visitorfilters.com/vf.min.js"
data-key="YOUR_PUBLIC_SITE_KEY"
defer>
</script>
How the Collector Works
- Loads asynchronously — zero impact on your page load time.
- Collects visitor fingerprint data (IP, user agent, screen, timezone, referrer).
- Sends a signed event payload to our collector endpoint via HTTPS.
- Our backend evaluates the event against your rules in real-time.
Verification
After installation, visit your website and check the VisitorFilters dashboard. You should see events appearing within seconds under Dashboard → Live Events.
Advanced Options
Custom Data Attributes
| Attribute | Default | Description |
|---|---|---|
data-key | Required | Your public site key |
data-endpoint | Auto | Custom collector endpoint URL |
data-spa | false | Enable SPA mode (track route changes) |
Content Security Policy (CSP)
If your site uses a strict CSP, add the following directives:
script-src https://cdn.visitorfilters.com;
connect-src https://visitorfilters.com;
Subresource Integrity
For maximum security, you can pin the script hash. Contact support for the current SRI hash of the collector script.