MenuManaged proxy

Proxy guides

Managed proxy

Serve the ProductLense script and send events from a subdomain of your own domain with one CNAME record, without running a proxy server.

The managed proxy serves the script and receives events on a subdomain of your own site, for example a.yourdomain.com. Ad blockers that block analytics hosts let first-party requests through, so fewer visits go missing. You add one DNS record; there is no server to run.

Set it up

  1. In ProductLense, open your site's Settings → Proxy, type a new subdomain of your site (for example a.yourdomain.com) and click Add hostname. It must be a subdomain you do not already serve pages on.
  2. At your DNS provider, add the CNAME record the tab shows: your subdomain pointing to proxy.productlense.app. If you use Cloudflare for your own DNS, set the record to DNS only (grey cloud).
  3. Wait for the status to turn Active. ProductLense checks every few seconds while the tab is open; the certificate is issued automatically, usually within a few minutes. If it stays on waiting, add the TXT record the tab shows as well.
  4. Replace your ProductLense script tag with the one the tab shows once active:
index.html
<script defer data-site="SITE_ID" src="https://a.yourdomain.com/a.js"></script>

The script sends events to the host it loads from, so nothing else changes. Keep the old tag until the new hostname is active.

What the subdomain serves

Only the script (/a.js), event collection (/api/e, and /api/e/app for the mobile SDKs) and the visitor id endpoint (/api/vid). Everything else, including the dashboard and webhooks, stays on api.productlense.app.

Remove it

Switch your script tag back to https://api.productlense.app/a.js first, then click Remove in Settings → Proxy and delete the DNS record. Events sent to a removed hostname are lost.

Limits

  • One hostname per site.
  • Visitor counts, countries and devices are unchanged: ProductLense sees the visitor's address the same way as on api.productlense.app.
  • Prefer to proxy through your own server instead? See the proxy overview and the platform guides.

Check it works

Open https://a.yourdomain.com/a.js in a browser: it should load the script with a valid certificate. Then visit your site with the new tag and open the Events page: your pageview appears within a few seconds.

    ↑ ↓ to move, Enter to open