Ad blockers

Ad blockers commonly block requests to revscope.co. This is the same trade-off every hosted analytics product faces: a recognizable third-party endpoint is easy to install, but also easy for a filter list to block.

The default installation will miss some traffic. For a more complete picture, serve both the tracker script and ingest requests through your own domain using either a CNAME or a reverse proxy.

Changing only one side is not enough. If the script still loads from in.revscope.co, a blocker can stop it before it runs. If ingest still goes there, the script can run but its events can be blocked. The browser-facing URLs for both need to look first-party.

How RevScope avoids fixed signatures

RevScope uses your project name instead of one fixed branded identifier. For a project named acme:

That leaves no single RevScope-specific path or cookie name for a blocker to target across every customer. The command function defaults to the generic name dispatch, which is not a tracker signature. Some analytics products keep predictable branded names even behind a first-party proxy, which makes the proxy much easier to identify and filter. Your project name is not a secret, and this design reduces easy generic blocking rather than guaranteeing that every request will pass.

Option 1: CNAME a subdomain

Create a subdomain such as assets.example.com and point it to eu1.revscope.co:

Keep the record DNS-only (not proxied through a CDN). Then add the same hostname in project settings under Custom domain. RevScope only issues a TLS certificate for names saved there; without that setting, HTTPS for the alias will fail.

After DNS has propagated and the custom domain is saved, replace acme, assets.example.com, and the script URL in your installation:

<script>(function(w,n,u,c){
    if(u&&typeof u==="object"){c=u;u=null}c=c||{};u=u||"https://in.revscope.co/";c.url=u;u+=n+".js";c.project=n;n=typeof c.name==="string"&&c.name||"dispatch";if(typeof w[n]==="function")return;var q=[];function f(){q.push([].slice.call(arguments));}f.q=f.a=q;f.c=c;w[n]=f;var s=document.createElement("script");s.src=u;s.defer=true;document.head.appendChild(s);
  })(window, "acme", "https://assets.example.com/");
</script>

The stub's third argument is the ingest base URL, not the final event URL. RevScope appends the project name for ingest and .js / .gif suffixes as needed. A trailing slash is recommended and is added automatically if omitted.

Option 2: reverse proxy a path

A path proxy keeps requests on your site's own origin. In this example the public base is https://www.example.com/site-assets/. Configure your proxy to preserve the HTTP method, body, query string, and response, while forwarding only these project paths:

Match those paths exactly instead of creating an unrestricted open proxy. Then install the tracker with the public proxy base in the stub:

<script>(function(w,n,u,c){
    if(u&&typeof u==="object"){c=u;u=null}c=c||{};u=u||"https://in.revscope.co/";c.url=u;u+=n+".js";c.project=n;n=typeof c.name==="string"&&c.name||"dispatch";if(typeof w[n]==="function")return;var q=[];function f(){q.push([].slice.call(arguments));}f.q=f.a=q;f.c=c;w[n]=f;var s=document.createElement("script");s.src=u;s.defer=true;document.head.appendChild(s);
  })(window, "acme", "https://www.example.com/site-assets/");
</script>

Cloudflare Rules

Cloudflare can implement the path proxy without a Worker by combining a URL Rewrite Rule with an Origin Rule. Your site's DNS record must be proxied through Cloudflare, and your plan must expose dynamic URL rewrites and origin overrides.

  1. In DNS, create revscope-origin.example.com as a DNS-only CNAME to in.revscope.co. Cloudflare requires a DNS override to reference a hostname in your account.
  2. Go to Rules > Overview > Create rule > URL Rewrite Rule. Use this custom filter, replacing the paths and project name:
    (raw.http.request.uri.path eq "/site-assets/acme" or
     raw.http.request.uri.path eq "/site-assets/acme.gif" or
     raw.http.request.uri.path eq "/site-assets/acme.js")
  3. Set Path > Rewrite to > Dynamic to:
    regex_replace(raw.http.request.uri.path, "^/site-assets/", "/")
    Leave the query string unchanged, then deploy the rule.
  4. Create an Origin Rule using the same filter. Set Host Header to in.revscope.co and DNS Record to revscope-origin.example.com, then deploy it.
  5. Open https://www.example.com/site-assets/acme.js. It should return JavaScript. Then load your site and confirm a request to /site-assets/acme succeeds.

See Cloudflare's path and origin rewrite tutorial. If either rule type is unavailable on your plan, use a Worker.

Cloudflare Worker

This Worker proxies only the three expected paths and leaves every other request on your normal origin. Replace the project name and prefix before deploying:

const PROJECT_NAME = "acme";
const PREFIX = "/site-assets/";

export default {
  async fetch(request) {
    const incoming = new URL(request.url);
    const projectPath = PREFIX + PROJECT_NAME;

    if (
      incoming.pathname !== projectPath &&
      incoming.pathname !== projectPath + ".gif" &&
      incoming.pathname !== projectPath + ".js"
    ) {
      return fetch(request);
    }

    const suffix = incoming.pathname.slice(projectPath.length);
    incoming.protocol = "http:";
    incoming.hostname = "in.revscope.co";
    incoming.port = "";
    incoming.pathname = "/" + PROJECT_NAME + suffix;

    return fetch(new Request(incoming.toString(), request));
  },
};
  1. In Cloudflare, go to Workers & Pages, create a Worker, replace the starter code, and deploy it.
  2. Under the Worker's Settings > Domains & Routes, add the route www.example.com/site-assets/* in your zone.
  3. Use the path-proxy installation above, with the same project name and prefix configured in the Worker.
  4. Test the .js URL and an ingest request in your browser's network panel.

Limits and privacy

First-party routing makes broad filter-list blocking less reliable, but it is not a promise that every blocker will allow every request. DNS-aware blockers may detect CNAME aliases, and users can create site-specific rules. A same-origin path proxy is generally the least distinguishable network setup.

This changes request routing only. It does not change RevScope's consent, opt-out, or privacy behavior. A visitor's set_consent("disabled") choice is still honored.

Next: review the consent and opt-out controls.