[Beta] Fair Choice

As of November 13, 2023, Ogury Choice Manager is deprecated, meaning it will no longer be supported or updated.

Consequently, no new consent notices will be delivered through Ogury Choice Manager's APIs. Therefore, it is strongly advised against using Ogury Choice Manager in new versions of applications. In case you have migrated to a new Consent Management Platform (CMP), ensure that Ogury and its partners are included as vendors.

For earlier versions of applications still using Ogury Choice Manager, the API will maintain its functionality, continuing to return consent for users who have previously responded to a consent notice. This will remain in effect until their consent expires.

Ogury Choice Manager allows users to choose if their data can be collected and used by you and by your vendors. Fair Choice is an optional feature that provides an alternative choice to your users, letting them pay with money for a marketing free and data collection free experience. You can learn more about Fair choice in this article.

Fair Choice is currently in Beta phase. If you are interested, please contact consent@ogury.co with an email registered on the platform.

You need to adapt your standard integration to activate Fair Choice:

  • For Android, you must add the Billing Client library as dependency of your project. Create a FairChoiceDependencies.xml file in Assets/Editor folder with the following content:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<dependencies>
    <androidPackages>
        <androidPackage spec="com.android.billingclient:billing:2.+" />
    </androidPackages>
</dependencies>
  • You do not need to change your implementation of Ask and Edit methods to display the consent notice. The consent notice will be adapted once you activate the feature in the Ogury Dashboard, in the Consent settings of the Asset.

  • However, you must check if the user has paid for the ad-free experience before starting Ogury SDK and other vendors' SDKs by calling the following property:

OguryChoiceManager.HasPaid;

Make sure that the OnAskComplete/OnEditComplete event has been triggered before using this property to get an updated value. Otherwise, you may display ads to a paying user.

Integration example

Find below an example of user consent handling for several vendors adapted for Fair Choice:

using OgurySdk;

public class MyScene : MonoBehaviour {

    void Start() {
        Ogury.Start("ANDROID_ASSET_KEY", "IOS_ASSET_KEY");
        
        // implement choice manager events
        OguryChoiceManager.OnAskComplete += OnCMComplete;
        OguryChoiceManager.OnAskError += OnCMError;
        
        // get user consent
        OguryChoiceManager.Ask();
    }
    
    private void OnDestroy() {
        OguryChoiceManager.OnAskComplete -= OnCMComplete;
        OguryChoiceManager.OnAskError -= OnCMError;
    }
    
    private void OnCMComplete(OguryChoiceManager.Answer answer) {
        // pass user consent to vendors' SDKs
        PassConsentToOtherSdks();
        // initialize vendors' SDKs
        StartSdk();
        // load ad formats
        LoadAdFormats();
    }

    private void OnCMError(OguryError error) {
        // pass user consent to vendors' SDKs
        PassConsentToOtherSdks();
        // initialize vendors' SDKs
        StartSdk();
        // load ad formats
        LoadAdFormats();
    }
    
    private void PassConsentToOtherSdks() {
        // check if user has paid
        if (OguryChoiceManager.HasPaid) return;
    
        // pass consent through IAB string 
        var iabString = OguryChoiceManager.TcfV2.IabString;
        _vendorSdk.SetConsentFromIABString(iabString);
        
        // check if a vendor is accepted
        var vendorAccepted = OguryChoiceManager.TcfV2.IsAccepted(AnotherVendorId);
        _anotherVendorSdk.SetConsent(vendorAccepted);
        
        // check consent for yourself
        var meAccepted = OguryChoiceManager.TcfV2.IsAccepted(0);
        // check consent your analytics solution and its purposes
        boolean isAnalyticsVendorAndItsPurposesAccepted = OguryChoiceManager.TcfV2.isVendorAndItsPurposesAccepted(analyticsVendorId);
        _analyticsSdk.SetConsent(meAccepted && analyticsVendorAccepted);
    }

    private void StartSdk() {
        // check if user has paid
        if (OguryChoiceManager.HasPaid) return;
    
        // start vendors' SDKs
        _vendorSdk.Start();
        _anotherVendorSdk.Start();
        _analyticsSdk.Start();
    }
    
    private void LoadAdFormats() {
        // check if user has paid
        if (OguryChoiceManager.HasPaid) return;
        
        // load ad formats
    }
}

Last updated