Skip to main content

Firebase and attribution partners

OptSens passes each consent decision to Google Consent Mode in Firebase and to the attribution partners in your app. You do not write any forwarding code. The SDK finds each partner SDK at runtime. An app without a given SDK is not affected. Only the consent decision is passed on; the partner SDKs and their accounts are your own.

SDKAndroidiOS / tvOS
Firebase AnalyticsAutomaticAutomatic
AppsFlyerAutomaticAutomatic
AdjustAutomaticAutomatic
BranchAutomaticAutomatic
KochavaAutomaticAutomatic

Kochava applies the consent only when Intelligent Consent Manager is turned on in your Kochava dashboard. On iOS this needs Kochava SDK 8 or later.

The SDK sends consent when it starts (the visitor's stored choice, or the defaults of their region when there is none yet) and every time the consent changes: a choice in the banner, a US privacy choice, and clearUserData.

The attribution partners receive consent whether Consent Mode is on or off. Firebase follows the Consent Mode type set in the dashboard, see Google Consent Mode v2.

Setup​

Nothing to add. Add the partner SDKs you use as usual. For Firebase, add com.google.firebase:firebase-analytics and the google-services plugin.

The SDK adds four Firebase entries to your app manifest. With them, Firebase starts with every consent type denied before the first event.

If you use AppsFlyer, start it after configure has finished. Its first session then carries the consent. AppsFlyer does not keep consent between sessions, and the SDK sends it again at every start.

Google Mobile Ads (AdMob and Ad Manager)​

Google Mobile Ads reads the IAB TCF keys that OptSens writes on the device. There is nothing to add to your app.

  • With IAB TCF on, Google Mobile Ads receives the visitor's TC string and Google's additional consent string with every ad request.
  • With IAB TCF off, there is no TC string to read, and Google Mobile Ads does not receive the visitor's choice.

If your app shows Google ads to users in the EEA, the UK or Switzerland, Google asks you to use a Google-certified CMP with IAB TCF. See Google's EU user consent policy. Turn IAB TCF on under Frameworks.

Another SDK​

To pass consent to an SDK that is not in the table:

Read the visitor's choice with OptSens.hasConsent("advertising") (or another category) at start and when the banner closes, and call your SDK's consent method.

note

On iOS, Firebase Analytics must be loaded in your app, not only linked. An app that calls Analytics anywhere meets this.

After a reject, Google Consent Mode still sends cookieless pings by design (analytics_storage = denied means no identifiers, not silence). To send nothing to Google before consent, choose the basic Consent Mode type.