Skip to main content
Version: Javascript tag

Custom Collector URL (AdBlocker Bypass)

AdBlockers frequently block Screeb's default endpoints (t.screeb.app, rpc.screeb.app, etc.). Enterprise customers can work around this by routing Screeb traffic through their own domain using a reverse proxy.

How it worksโ€‹

  1. Set up a reverse proxy on your domain (e.g. analytics.acme.com) that forwards traffic to Screeb's endpoints.
  2. Add your domain to the allowed list in Screeb Admin โ†’ Settings โ†’ Custom Domains.
  3. Override the SDK endpoints in your snippet initialization.

Prerequisitesโ€‹

  • Enterprise plan with the Custom Domains feature enabled.
  • A reverse proxy configured on your infrastructure (see Reverse Proxy Templates).

SDK Configurationโ€‹

Pass an endpoints object to $screeb('init', ...) to override the default Screeb URLs:

<script>
// Load the SDK bundle from YOUR domain
(function(s,c,r,e,b){s['ScreebObject']=r;s[r]=s[r]||function(){var d=arguments;return new Promise(function(a,b){(s[r].q=s[r].q||[]).push({v:1,args:d,ok:a,ko:b})})};b=c.createElement('script');b.async=!0;b.src=e;b.id=r;var t=c.getElementsByTagName('script')[0];t.parentNode.insertBefore(b,t)})(window,document,'$screeb','https://analytics.acme.com/sdk/tag.js');
</script>

<script>
$screeb('init', 'YOUR_CHANNEL_ID', {
endpoints: {
rpc: 'https://analytics.acme.com/rpc',
static: 'https://analytics.acme.com/static',
report: 'https://analytics.acme.com/report',
hostedPage: 'https://analytics.acme.com/hosted-page',
centipede: 'wss://analytics.acme.com/centipede',
}
});
</script>

Endpoint referenceโ€‹

KeyDefaultDescription
rpchttps://rpc.screeb.app/rpcREST API (surveys, tracking)
statichttps://static.screeb.appStatic assets (images, fonts)
reporthttps://r.screeb.app/rpcResponse reporting
hostedPagehttps://survey.screeb.appHosted survey page
centipedewss://centipede.screeb.appWebSocket (real-time targeting)
note

You only need to override endpoints you are proxying. Any omitted keys fall back to Screeb's default URLs.

Admin Configurationโ€‹

  1. Go to Settings โ†’ Custom Domains in Screeb Admin.
  2. Click Add domain and enter your proxy hostname (e.g. analytics.acme.com) or a wildcard (e.g. *.acme.com).
  3. Click Save.

The SDK validates configured endpoints against this list on initialization and logs a warning in the browser console if a mismatch is detected.

Security Notesโ€‹

  • All custom endpoints must use HTTPS (or wss:// for WebSocket). HTTP endpoints will be blocked by browsers on HTTPS pages due to mixed-content policy.
  • The server validates the Origin header against your allowed domains list on every API request. Requests from unrecognised origins are rejected with 403 Forbidden.
  • Wildcard domains (*.acme.com) cover all subdomains at any depth but not the apex (acme.com) itself.