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 Dodgeball.
- The subdomain's root domain should match the domain hosting your application (e.g.,
safety.mydomain.comwheremydomain.comis your app's domain). - Avoid obvious names like
dodgeball.mydomain.com. Use something generic or random likesafety.mydomain.comora1xt.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:
| Type | Name | Content |
|---|---|---|
| CNAME | safety.mysandboxdomain.com | api.sandbox.dodgeballhq.com |
2. Update Your Dodgeball Client SDK
After registering your subdomain, pass the apiUrl option when initializing the Client SDK:
import { Spreedly } from "@spreedly/trust-sdk-client";
const dodgeball = new Dodgeball('public-api-key...', {
apiUrl: 'https://safety.mydomain.com'
});Updated about 2 hours ago
