Open batteredhedgehog opened 4 months ago
Hi @batteredhedgehog,
You can use the SetConsent
function to set the consent state. You may have to do some preliminary steps to set up consent mode for your app (depending on your platform). You may refer to this example in our quickstart to see how it's being used.
That said, I'll be closing this for now. Let me know if an issue arises so this ticket could be reopened.
I think @batteredhedgehog wants some kind of conversion function from TCFStrings (which are created after UMP popup choices were made) to Firebase flags for SetConsent function.
I am interested in this too, my current guess is to rely on Tag Behaviour docs. It is possible to take selected purposes string from shared preferences (Android) or NSUserDefaults (iOS) by _IABTCFPurposeConsents key and go on from there.
But I am not sure if that is the right way to get values for SetConsent call, wonder if there are any other opinions.
@paulinon - thanks for the info. I do understand how the SetConsent function is intended to work. As @Remstam says, I'm looking for the correct way to extract consent information from TCF strings.
Any assistance would be very helpful. Answers to the above questions would greatly help me to move forward.
Bump
Any updates?
up
For anyone interested - I did the following:
<meta-data android:name="google_analytics_default_allow_analytics_storage" android:value="false" />
<meta-data android:name="google_analytics_default_allow_ad_storage" android:value="false" />
<meta-data android:name="google_analytics_default_allow_ad_user_data" android:value="false" />
<meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="false" />
<meta-data android:name="firebase_crashlytics_collection_enabled" android:value="false" />
Crashlytics.IsCrashlyticsCollectionEnabled = true
if either consent wasn't required (as determined by UMP) or if the consents in the previous step were given.FirebaseAnalytics.SetConsent(...)
if either consent wasn't required - or using the rules described here based on the determined purpose consent status.I dont really know if this is 100% correct - but its a start .
Any guidance from google would be greatly appreciated.
And here is some c# code snippets I wrote to help extract consent from the TCF string.
private const string IABTCF_PurposeConsents = "IABTCF_PurposeConsents";
private const string IABTCF_PurposeLegitimateInterests = "IABTCF_PurposeLegitimateInterests";
private const string IABTCF_VendorConsents = "IABTCF_VendorConsents";
private const string IABTCF_VendorLegitimateInterests = "IABTCF_VendorLegitimateInterests";
private const string IABTCF_PublisherConsent = "IABTCF_PublisherConsent";
private const string IABTCF_PublisherLegitimateInterests = "IABTCF_PublisherLegitimateInterests";
public const int IABTCF_GOOGLE_VENDOR_ID = 755;
private static bool IsBitSet(int nonZeroBasedBitIndex, string bitString)
{
return nonZeroBasedBitIndex > 0 && bitString != null && bitString.Length >= nonZeroBasedBitIndex && bitString[nonZeroBasedBitIndex - 1] == '1';
}
public static bool HasConsent(string purposeString, string vendorString, int purposeId, int? vendorId = null)
{
return IsBitSet(purposeId, ApplicationPreferences.GetString(purposeString)) && ((!vendorId.HasValue) || IsBitSet(vendorId.Value, ApplicationPreferences.GetString(vendorString)));
}
public static bool HasPurposeConsent(int purposeId, int? vendorId = null)
{
return HasConsent(IABTCF_PurposeConsents, IABTCF_VendorConsents, purposeId, vendorId);
}
public static bool HasLegitimateInterest(int purposeId, int? vendorId = null)
{
return HasConsent(IABTCF_PurposeLegitimateInterests, IABTCF_VendorLegitimateInterests, purposeId, vendorId);
}
public static bool HasPublisherConsent(int purposeId)
{
return HasConsent(IABTCF_PublisherConsent, null, purposeId);
}
public static bool HasPublisherLegitimateInterest(int purposeId)
{
return HasConsent(IABTCF_PublisherLegitimateInterests, null, purposeId);
}
Hi,
It seems that since Firebase Android SDK 32.8.0 and Firebase iOS SDK 10.23.0, Firebase Analytics gets a new feature:
Any ETA on when this will be available in the Unity SDK ? Or maybe is it possible to just update the dependencies ?
Ok, 11.9.0 release gets updates to Android 32.8.1 and iOS 10.24.0 respectively. Does this mean it is no more necessary to manually call SetConsent as Analytics will now itself automatically get the values from TCF string internally?
Bump
Hi,
With the 11.9.0 update is it still necessary to modify the AndroidManifest.xml to add:
<meta-data android:name="google_analytics_default_allow_analytics_storage" android:value="false" />
<meta-data android:name="google_analytics_default_allow_ad_storage" android:value="false" />
<meta-data android:name="google_analytics_default_allow_ad_user_data" android:value="false" />
<meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="false" />
<meta-data android:name="firebase_crashlytics_collection_enabled" android:value="false" />
Or all this is done automatically based on the TCF values ?
How does this work for non UE users ? Will it reactivate it automatically or I need to do it manually ?
What about the values changes, if I show the GoogleUserMessagingPlatform form to the user, is there something to call on FirebaseAnalytics to update the values when the form is closed ?
Any updates?
up
Hi folks, could you kindly add a thumbs up emoji to the author's original post. This will help us keep track of issues under our radar. That said, I'll bring this up to our engineer sync to get some feedback. Thanks!
up
Bump
Bump. Can we please get some guidance on this.
Bump. Firebase shows a message, which reads "Ads personalization consent signals not detected".
This page describes how to enable consent mode with TCF and says it is automatically enabled: https://developers.google.com/tag-platform/security/guides/implement-TCF-strings#apps
Do we still need to manually set everything else to false in AndroidManifest.xml though?
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the question here:
I am unable to find documentation on how to configure Firebase to update consent with data coming from google's UMP. Please can you explain how to link the two, or point me to some documentation.