Skip to content

Presenting the Banner

In order to collect user's consent, it' very important that you do so in a transparent and user-friendly way. To accomplish this, we have created an easy to integrate, out of the box banner solution, that owns all the complexity of compliance, while at the same time giving you endless customization options.

Available starting v2.2.0

Customizable API is not released for Unity yet

Please be aware that we are constantly working to improve our SDK for Unity, so for now we are only delivering the API to show the Banner configured via Admin Interface.

The main goal of Banner API v2 is to provide a highly customizable First Layer, that is friendly to end-users and promotes transparency, while having all compliance complexity delegated to a Second Layer. Keep in touch, we'll be updating very soon!

LeanBanner

The First Layer offers 3 different layout options:

LeanBanner

LeanBanner

LeanBanner

These layouts can be customized via our Admin Interface for a straightforward brand integration:

LeanBanner

You are free to decide when to collect consent. What is important, is that you do NOT enable any third party services or tracking technologies before the user has provided consent.

Once you are ready to collect consent, you may call Initialize to make sure the SDK has fully initialized and use the UsercentricsReadyStatus object to know if you should show the banner or not.

Usercentrics.Instance.Initialize(
    (usercentricsReadyStatus) =>
    {
        ShowBanner();
    },
    (errorMessage) =>
    {
        // Failure: Returns non-localized error
    }
);

Let's define what ShowBanner() should do...

Showing the Banner

You can decide to present the First Layer or Second Layer as you deem necessary for your user experience. However, we recommend to:

  • Use the First Layer when collecting consent for the first time. Remember that user's will be able to navigate from the First Layer to the Second Layer.
  • Use the Second Layer for when customers want to review their choices. e.g. In your app's settings.

Presenting the First Layer

Usercentrics.Instance.ShowFirstLayer(<UsercentricsLayout> /* Full, Sheet, PopupBottom, PopupCenter */, (usercentricsConsentUserResponse) =>
{
    // Handle userResponse
});

Presenting the Second Layer

Usercentrics.Instance.ShowSecondLayer(<showCloseButton> /* true/false */, (usercentricsConsentUserResponse) =>
{
    // Handle userResponse
});

Handling User Response

After a user provides their consent choices, you will receive a UsercentricsConsentUserResponse object in the banner presentation callback. This object will provide you with all the information you need in order to apply consent, make decisions based on the user's interaction or store the user's ControllerID if you wish to support Cross-Device Consent Sharing.