update: GuruConsent:
【Unity】-【变现】非 EEA地区国家,Adjust 默认打开ad_user_data/ad_personalization 【Unity】-【变现】Adjust DMA不传 ad_user_datadeeplink
parent
ffd2b7da21
commit
b28a039bd0
|
|
@ -54,6 +54,12 @@ namespace Guru
|
|||
{
|
||||
// No EEA countries skip reporting the data
|
||||
Debug.Log($"{Tag} --- GoogleDMAHelper:: User is not at EEA countries, purposes: {value}");
|
||||
if (string.IsNullOrEmpty(DmaResult) || DmaResult != "not_eea" )
|
||||
{
|
||||
DmaResult = "not_eea";
|
||||
ReportAdjustDMAValue(false);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -87,17 +93,42 @@ namespace Guru
|
|||
FirebaseAnalytics.SetConsent(consentData);
|
||||
|
||||
//---------- Adjust report --------------
|
||||
AdjustThirdPartySharing adjustThirdPartySharing = new AdjustThirdPartySharing(null);
|
||||
adjustThirdPartySharing.addGranularOption("google_dma", "eea", "1");
|
||||
adjustThirdPartySharing.addGranularOption("google_dma", "ad_personalization", $"{result[2]}");
|
||||
adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", $"{result[3]}"); // From Haoyi's advice we don't give the value so Adjust will still receive the data as a trick.
|
||||
Adjust.trackThirdPartySharing(adjustThirdPartySharing);
|
||||
// AdjustThirdPartySharing adjustThirdPartySharing = new AdjustThirdPartySharing(null);
|
||||
// adjustThirdPartySharing.addGranularOption("google_dma", "eea", "1");
|
||||
// adjustThirdPartySharing.addGranularOption("google_dma", "ad_personalization", $"{result[2]}");
|
||||
// // adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", $"{result[3]}"); // From Haoyi's advice we don't give the value so Adjust will still receive the data as a trick.
|
||||
// Adjust.trackThirdPartySharing(adjustThirdPartySharing);
|
||||
|
||||
ReportAdjustDMAValue(true, result[2].ToString(), result[3].ToString());
|
||||
|
||||
//----------- Guru DMA report ---------------
|
||||
ReportResult(purposeStr, result);
|
||||
}
|
||||
|
||||
|
||||
private static void ReportAdjustDMAValue(bool isEEAUser, string personalization = "1", string userData = "1")
|
||||
{
|
||||
AdjustThirdPartySharing adjustThirdPartySharing = new AdjustThirdPartySharing(null);
|
||||
|
||||
if (isEEAUser)
|
||||
{
|
||||
// From Haoyi's advice we don't give the value so Adjust will still receive the data as a trick.
|
||||
adjustThirdPartySharing.addGranularOption("google_dma", "eea", "1");
|
||||
adjustThirdPartySharing.addGranularOption("google_dma", "ad_personalization", personalization);
|
||||
// adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", userData);
|
||||
}
|
||||
else
|
||||
{
|
||||
// No eea user, all set to granted
|
||||
adjustThirdPartySharing.addGranularOption("google_dma", "eea", "0");
|
||||
adjustThirdPartySharing.addGranularOption("google_dma", "ad_personalization", "1");
|
||||
adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", $"1");
|
||||
}
|
||||
|
||||
Adjust.trackThirdPartySharing(adjustThirdPartySharing);
|
||||
}
|
||||
|
||||
|
||||
private static void ReportResult(string purposeStr, string result)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(DmaResult) && DmaResult == result)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Guru
|
|||
public class GuruConsent
|
||||
{
|
||||
// Guru Consent Version
|
||||
public static string Version = "1.0.6";
|
||||
public static string Version = "1.0.7";
|
||||
public static string Tag = "[GuruConsent]";
|
||||
|
||||
#region 公用接口
|
||||
|
|
|
|||
Loading…
Reference in New Issue