Skip to content

Stratkit Didomi Plugin

This package provides a simple integration of the Didomi Consent Management Platform (CMP) for Unity. It allows you to manage user consent in compliance with GDPR, CCPA, and other privacy regulations.

Prerequisites

  • An active Didomi account
  • Didomi APIKey (company shared) and your project's unique NoticeID

Setup

  1. Customize consent notices and preferences using the Didomi dashboard.
  2. Create and configure a DidomiModule ScriptableObject with your API key and Notice ID.

Make sure that consent is obtained before triggering tracking frameworks (e.g., AppsFlyer, Adjust, IronSource, etc). And once it is done you can initialize other services with the consent data, as the following example:

```c# using EntityQuery query = World.EntityManager.CreateEntityQuery(typeof(DidomiContainer)); DidomiService didomiService = query.GetSingleton().Value; didomiService.GetConsentStatus(userStatus => { ISet? enabledPurposeIds = userStatus.GetPurposes().GetConsent().GetEnabled(); ISet? enabledVendors = userStatus.GetVendors().GetConsent().GetEnabled();

    bool isAppsFlyerConsentEnabled = enabledVendors.Any(vendorId => vendorId.ToLower().Contains(didomiService.Config.AppsFlyerVendorId));
    bool isPersonalizedAdsConsentEnabled = enabledPurposeIds.Contains(didomiService.Config.PersonalizedAdsPurposeId);
    AppsFlyerConsent consent = AppsFlyerConsent.ForGDPRUser(isAppsFlyerConsentEnabled, isPersonalizedAdsConsentEnabled);
    // Send consent to apssflyer
});