Display the Analytics consent banner
The following DMA regulations are mandatory in the EU and EEA as of March 6, 2024:
Gatekeepers such as Alphabet, Amazon, Apple, ByteDance, Meta, and Microsoft must obtain explicit consent from users when collecting personal information for personalized advertising
Therefore, if you are sending data to Google via Firebase or a marketing attribution tool in the EU and EEA, you must obtain consent from users in those regions to provide information.y.
Hive SDK provides a consent banner display feature that allows you to check whether you consent to the collection of personal information.
Basic operation flow¶
If you apply the personal information collection agreement to the user app, it will start operating from step 3 of the SDK operation flow below.
- Terms and conditions agreement displayed during SDK initialization and login
- CMP consent pop-up exposure such as ADIZ
- Conditionally expose personal information collection consent UI by calling
Analytics.showConsentModeIfRequire()
- If the user has already given consent, the consent banner U is not displayed and is only displayed when the deadline has expired or additional consent is required - By calling
Analytics.showConsentMode()
, the UI for personal information collection consent is always exposed
- If there has been previous consent, the UI is exposed with the consent status set according to the value - When the[ConsentMode]
object parameter is set to null, Hive SDK Automatically generates a consent list depending on whether a third-party marketing tracking tool is added - Settings button can be configured within the app so that the user can re-consent at any time and check the consent statusthird-partyHive SDK
Exposing consent banner UI¶
Hive SDK provides consent banner UI exposure feature through Analytics' ContentMode class object.
Consent banner UI settings are largely divided into ‘default consent banner UI’ and ‘custom consent banner UI’ depending on the function parameter settings of the ContentMode object.
- Default consent banner UI: Includes UI and text provided by default in the SDK
- Custom consent banner UI: Includes UI and text that can be modified to suit the personality of the user app
Default consent banner UI settings¶
If you enter the [ConsentMode] object parameter as null, the 'basic consent list' below is automatically created depending on whether or not a third-party marketing tracking tool used in the Hive SDK is added.
When you complete consent to collect personal information in the app, the Hive SDK can determine that you have consented through a callback for the value of each item below.
- [ConsentMode.ConsentForm.providerName]:
"main"
: Commonly agreed items"google", "adjust", "appsflyer", "singular" "airbridge
: Provider items included in the default consent banner
Custom consent banner UI settings¶
Unlike the basic consent banner UI provided by the Hive SDK, it includes UI and text that matches the personality of the user's app. Enter the modification text that maps to each parameter provided by the [ContentMode]
object as shown below.
- ConsentMode.title: This is the text displayed at the top of the consent banner.
- ConsentMode.companyName: When exposed as basic information, the company name is set in dataUsageDescription of mainForm along with the required title.
- ConsentMode.privacyPolicy: This is the URL that runs when you click the ‘Privacy Policy’ button at the bottom of the consent banner.
- ConsentMode.mainForm: Specified as the default consent item. If you do not agree to mainForm, you cannot consent to other items.
- ConsentMode.formList: Consent items for each company to share personal information.
- ConsentForm.providerName: Provider name corresponding to the consent subject. If set to
"main"
, the setting will be the same as the ConsentMode.mainForm setting. - ConsentForm.dataUsageTitle: Title text about sharing device information with
providerName
. - ConsentForm.dataUsageDescription: Details of
dataUsageTitle
. - ConsentForm.personalizationTitle: Title phrase agreeing to provide personalized advertising information.
- ConsentForm.personalizationDescription: Details of
personalizationTitle
. - ConsentStatus.providerName: Provider name corresponding to the consent subject. If not set separately, one of
"main", * "google", "adjust", "appsflyer", "singular" "airbridge"
will be set. - ConsentStatus.consentForDataUsage: Whether to share device information with
[providerName]
. Depending on the user's consent, the[Analytics.CONSENT_GRANTED]
or[Analytics.CONSENT_DENIED]
value is set. If nothing is set for the first time, it will be"not-set"
or empty string. - ConsentStatus.consentForPersonalization: Whether to share personalized advertising information with
[providerName]
. Depending on the user's consent, the[Analytics.CONSENT_GRANTED]
or[Analytics.CONSENT_DENIED]
value is set. If nothing is set for the first time, it will be"not-set"
or empty string.
Integrate with a third-party consent management platform (CMP)¶
By using a file that complies with the TCF standard that is created when displaying a consent banner pop-up, you can set it so that the consent banner UI is not exposed in duplicate with a third-party consent management platform (CMP).
When calling Analytics.showConsentModeIfRequire()
, if the checkCmp
parameter is true, if there is a file saved in accordance with the TCF standard, the file is read and the company in the file agrees to the settings. It will be considered as such. The default value of the checkCmp
parameter is true.
For example, if you use Adiz, you can access the Google AdMob console, create a GDPR message, and then try resetting Adiz.
To avoid displaying consent banners repeatedly in CMP, proceed with partner settings in the following order. Set up a company that requires consent before setting it up as a partner. For details on settings, see HIVE ADIZ > Creating GDPR messages.
-
Click Privacy & Messages in the left menu.- - In the European Regulations menu, click on ‘GDPR’ Settings. Afterwards, enter your message and go to the page where you can set up a partner company.
-
Click the Edit button underReview Advertising Partners > Custom Advertising Partners. Afterwards, you can view the list of advertising partners and edit it to select the ones you need.
-
Check the name of the company that requires consent. (The partner list does not provide a search function, so it is convenient to search with Ctrl+F.)
-
AppsFlyer consent required → Check Appsflyer
-
Adjust consent required → Check Adjust GmbH
-
Singular consent required → Check Singular Labs Inc. * ※ Google is automatically selected. * ※ Airbridge is not currently listed as a partner.
-
After saving, you can see that the selected partner company is exposed in the list.
Setting up Hive SDK analytics consent banner exposure¶
Describes how to set up Analytics consent banner exposure in the Hive SDK development environment.
Hive SDK Unity¶
- Bring up the Hive Dependencies window from Hive > Hive Dependencies in the top menu of the Unity project.
- Enable the Analytics Consent-Mode option by checking and saving it as shown below.
Hive SDK Android native¶
Declare the 'Analytics Consent-Mode' library in build.gradle
at the app level.
implementation "com.com2us.android.hive:hive-analytics-consent-mode:${HIVE_SDK_VERSION}" // Enter SDK version if not using BoM
Hive SDK iOS native¶
Declare the 'Analytics Consent-Mode' framework in your Podfile.