Cloudflare
What Is Cloudflare Integration?
It creates a Cloudflare Worker in your account to serve the fingerprinting agent and relay identification requests through your own domain paths.
Key Benefits
-
Higher accuracy & longer cookies: Runs in first-party context to boost identification in Safari/Firefox and extend cookie lifetimes beyond typical third-party limits.
-
Bypass ad-blockers & leverage Cloudflare: Serves all requests as same-site, so ad-blockers won't block your scripts. Also the script is cached which means lower latency.
How It Works
Cloudflare Proxy Integration means you're running the logic through your own infrastructure, specifically your Cloudflare zone, via a Worker that you own. Here’s what that actually means in practical terms:
Cloudflare Workers: Quick Overview
- A Worker is a lightweight script that runs at Cloudflare’s edge (globally distributed data centers).
- It intercepts HTTP requests before they hit your origin server, based on path matching.
- Workers are deployed per Cloudflare zone (a domain managed in your Cloudflare account).
- Workers can define routes like /base/*, so requests to yourdomain.com/base/... hit the Worker.
- They can respond directly or proxy (fetch) upstream data.
What Happens in the Integration
Once you activate the integration:
1. A Cloudflare Worker is deployed in your account
- It’s tied to a specific domain (zone) you own.
- The worker is installed with a base path like /fingerprint/*.
- All matching requests are routed to this Worker.
2. The Worker is pre-configured with environment variables
- WORKER_BASE: the root path
- SCRIPT_PATH: the relative path to serve the script
- FINGERPRINT_PATH: the relative path to send fingerprint data (POST)
- PROXY_SECRET: secret used to authenticate calls
3. Your frontend loads script
<script src="https://yourdomain.com/${WORKER_BASE}/${SCRIPT_PATH}"></script>
4. Invoke the API by calling:
opjs({ API_KEY: 'my-api-key', ENDPOINT: 'https://yourdomain.com/${WORKER_BASE}/${FINGERPRINT_PATH}' }).then(fp => {
console.log(fp);
});
Activating the Integration
In dashboard, go to Integrations and click Connect. Enter your Cloudflare Account ID and an API Token. Select your domain and confirm; the worker deploys in a few minutes.
TL;DR: Click Connect, follow the modal, done deal.