fix: 启动默认上报用户的 is_iap_user 属性
parent
93935f87c4
commit
faa8692667
|
|
@ -266,6 +266,10 @@ namespace Guru
|
||||||
SetUserProperty(Analytics.PropertyGrade, $"{grade}");
|
SetUserProperty(Analytics.PropertyGrade, $"{grade}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void SetUserIsIAP(bool isIapUser)
|
||||||
|
{
|
||||||
|
SetUserProperty(Analytics.PropertyIsIAPUser, isIapUser? "true" : "false");
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -227,10 +227,13 @@ namespace Guru
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitAllServices()
|
private void InitAllServices()
|
||||||
{
|
{
|
||||||
|
SetUserIsIAP(Model.IsIAPUser); // 预先设置用户的 IAP User 属性
|
||||||
|
|
||||||
bool useKeywords = false;
|
bool useKeywords = false;
|
||||||
bool useIAP = _initConfig.IAPEnabled;
|
bool useIAP = _initConfig.IAPEnabled;
|
||||||
bool appleReview = false;
|
bool appleReview = false;
|
||||||
|
|
||||||
|
//----------- Set GuruServices ----------------
|
||||||
var services = GetRemoteServicesConfig();
|
var services = GetRemoteServicesConfig();
|
||||||
if (services != null)
|
if (services != null)
|
||||||
{
|
{
|
||||||
|
|
@ -301,7 +304,7 @@ namespace Guru
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//----------- Set IAP ----------------
|
||||||
if (useIAP)
|
if (useIAP)
|
||||||
{
|
{
|
||||||
// InitIAP(_initConfig.GoogleKeys, _initConfig.AppleRootCerts); // 初始化IAP
|
// InitIAP(_initConfig.GoogleKeys, _initConfig.AppleRootCerts); // 初始化IAP
|
||||||
|
|
@ -313,9 +316,8 @@ namespace Guru
|
||||||
{
|
{
|
||||||
Debug.LogError($"--- ERROR on useIAP: {ex.Message}");
|
Debug.LogError($"--- ERROR on useIAP: {ex.Message}");
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//----------- Set Keywords ----------------
|
||||||
if (useKeywords)
|
if (useKeywords)
|
||||||
{
|
{
|
||||||
// KeywordsManager.Install(Model.IsIAPUser, Model.SuccessLevelId); // 启动Keyword管理器
|
// KeywordsManager.Install(Model.IsIAPUser, Model.SuccessLevelId); // 启动Keyword管理器
|
||||||
|
|
@ -344,6 +346,7 @@ namespace Guru
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
//----------- Set Consent ----------------
|
||||||
if (!InitConfig.UseCustomConsent && !appleReview)
|
if (!InitConfig.UseCustomConsent && !appleReview)
|
||||||
{
|
{
|
||||||
// LogI($"--- #3 Start Consent Flow ---");
|
// LogI($"--- #3 Start Consent Flow ---");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue