For the complete documentation index, see llms.txt. This page is also available as Markdown.

Serve Didomi assets from your domain (mobile)

By default, Didomi relies on the privacy-center.org domain when serving assets- whether that is to load a consent notice, a preference center, or a privacy request widget, Didomi's SDKs and integrations, including their assets (JavaScript files, images, etc.) and API requests.

In this article, we will cover how to configure your integration so that these assets are served from your organization's own domain instead when utilizing Didomi mobile SDKs.


Configure custom domain

Didomi offers two options when configuring the custom domain that will be used to serve Didomi assets.

Option
Description

The SDK will load Didomi assets via your domain but all the infrastructure will be handled by Didomi.

The SDK will load assets from your domain and infrastructure. This ensures that requests are processed and cached on your own servers while allowing you to use the latest version of the SDK and its consent notice configuration.

Configure the SDK

Once your organization's custom domain is set up, pass sdkPath and apiPath to DidomiInitializeParameters when initializing the SDK:

  • sdkPath: overrides the base URL for all static file requests (consent notice config, GVL, IAB vendor list). Defaults to the Didomi CDN.

  • apiPath: overrides the base URL for all API requests (Consents API, cross-device sync, API events). Defaults to the Didomi API.

Both values must use HTTPS. Non-HTTPS or malformed URLs are ignored and an error is logged.

let parameters = DidomiInitializeParameters(
  apiKey: "your-api-key",
  noticeID: "your-notice-id",
  sdkPath: "https://sdk.example.com",
  apiPath: "https://api.example.com"
)
Didomi.shared.initialize(parameters)

Last updated