Dealing with ad blockers

Ad blockers may prevent device fingerprinting and tracking scripts from running on your application, reducing accuracy in device identification. To mitigate this, set up a custom subdomain to route Dodgeball requests.

1. Register Your Custom Subdomain

Subdomain Guidelines

  • The subdomain should be used only for routing requests to Composer.
  • The subdomain's root domain should match the domain hosting your application (e.g., safety.mydomain.com where mydomain.com is your app's domain).
  • Avoid obvious names like composer.mydomain.com. Use something generic or random like safety.mydomain.com or a1xt.mydomain.com — the more random, the harder it is for blockers to detect.

Adding DNS Records

Add a CNAME record pointing your custom subdomain to Dodgeball servers. For the standard production environment, this is api.dodgeballhq.com.

Using a Sandbox or Single Tenant Environment

If using a Sandbox or Single Tenant environment, point the CNAME to the appropriate domain found in the Developer Center under API Keys. Omit the https:// protocol when entering the CNAME value.

Example for a sandbox environment:

TypeNameContent
CNAMEsafety.mysandboxdomain.comapi.sandbox.dodgeballhq.com

2. Update Your Composer Client SDK

After registering your subdomain, pass the apiUrl option when initializing the Client SDK:

import { Composer } from '@spreedly/composer-sdk-client';

const composer = new Composer('public-api-key...', {
  apiUrl: 'https://safety.mydomain.com'
});

Did this page help you?