com.guru.unity.sdk.core/Runtime/Keywords/README.md

61 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2023-12-26 04:22:19 +00:00
# Guru Keywords 管理器
Version 0.4.0
## 简介
配合 `AppLovin MAX` 接口, 通过上报特定的 `Keywords` 来获取预置好的广告瀑布流的模块
主要统计维度: `用户留存天数``是否付费`
## 接入说明
1. 在游戏启动类内调用如下代码:
```c#
// 启动类逻辑
private void Start()
{
...
// 启动时更新一下用户的付费状态
bool isIapUser = UserData.Instance.hasUserPaied;
// 启动模块
Guru.KeywordsManager.Install(isIapUser);
...
}
```
2. 在支付成功时, 或者判定用户未付费用户时调用如下代码:
```c#
// IAP管理器内逻辑
// 支付成功回调
private void OnPurcahseSuccess(Product product)
{
...
UserData.Instance.hasUserPaied = true;
// 更新用户状态
Guru.KeywordsManager.IsIapUser = true;
...
}
```
3. 此功能由Firebase云控控制开关, 请按需设置参数值和条件
```javascript
// remote-config key:
keywords_config
// remote-config value:
{ "enable": true }
// 项目内默认值:
enable = false
```