-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
252 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
[ | ||
"install", | ||
"go" | ||
"go", | ||
"event_system", | ||
"event_custom" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { normalizeImagePath } from 'rspress/runtime'; | ||
|
||
# 📌 自定义事件 | ||
|
||
|
||
:::tip{title="💡 小提示"} | ||
|
||
- 参考示例在`flutter_adspark/example` 下,可以先跑一下示例,看看需要哪些事件 | ||
- 自定义事件,插件内也内置了一些常用的可使用,参数自己决定 | ||
- Pro 版客户,如有问题随时联系我,提供技术支持 | ||
|
||
::: | ||
|
||
## 自定义事件 | ||
|
||
事件名称可以使用内置的也可以自己定义,参数是 `Map` 类型根据业务定义即可 | ||
|
||
### 使用内置名称 | ||
|
||
``` dart | ||
/// [eventName] 事件名称 | ||
/// [params] 参数信息 | ||
FlutterAdspark.addEvent(GrownEventType.order, params: { | ||
"orderId": "54323454323", | ||
"amount": 2000, | ||
"count": 1, | ||
}); | ||
``` | ||
|
||
### 自定义名称 | ||
|
||
``` dart | ||
/// [eventName] 事件名称 | ||
/// [params] 参数信息 | ||
FlutterAdspark.addEvent("flutterads_adspark_click", params: { | ||
"name": "178083838", | ||
"amount": 200 | ||
}); | ||
``` | ||
|
||
## 内置事件清单 | ||
|
||
| 事件 | 调用 | 事件名称 | | ||
|-------------|---------------------------------------|--------------------------------------| | ||
| 注册 | GrownEventType.register | grown_attribution_event_register | | ||
| 付费 | GrownEventType.purchase | grown_attribution_event_purchase | | ||
| 关键行为 | GrownEventType.key_behavior | grown_attribution_event_key_behavior | | ||
| 下单 | GrownEventType.order | grown_attribution_event_order | | ||
| 下载 | GrownEventType.download | grown_attribution_event_download | | ||
| 应用内拉起 | GrownEventType.deeplink | grown_attribution_event_deelink | | ||
| 授权 | GrownEventType.authorization | grown_attribution_event_authorization| | ||
| 广告变现 | GrownEventType.ad_purchase | grown_attribution_event_ad_purchase | | ||
| 次留 | GrownEventType.retention_2d | grown_attribution_event_retention_2d | | ||
| 添加购物车 | GrownEventType.add_to_cart | grown_attribution_event_add_to_cart | | ||
| 表单提交 | GrownEventType.form_submit | grown_attribution_event_form_submit | | ||
| 拉活 | GrownEventType.app_re_active_wake_up | grown_attribution_event_app_re_active_wake_up | | ||
| 自定义激活 | GrownEventType.custom_activition | grown_attribution_event_custom_activition | | ||
| 自定义注册 | GrownEventType.custom_register | grown_attribution_event_custom_register | | ||
|
||
|
||
## 官方文档 | ||
|
||
- [穿山甲~Android](https://bytedance.larkoffice.com/wiki/Yh8qwfiiIivBaKkYFYAcZedTnJf) | ||
- [穿山甲~iOS](https://bytedance.larkoffice.com/wiki/YcpCwVKdFi0VUxk4EAjc6TuJnre) | ||
- [巨量广告~文档](https://event-manager.oceanengine.com/docs/8650/195169) | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
import { normalizeImagePath } from 'rspress/runtime'; | ||
|
||
# 🎯 系统事件 | ||
|
||
|
||
:::tip{title="💡 小提示"} | ||
|
||
- 参考示例在`flutter_adspark/example` 下,可以先跑一下示例,看看需要哪些事件 | ||
- 系统内置事件,也是根据业务需要去调用,参数必须按要求传 | ||
- Pro 版客户,如有问题随时联系我,提供技术支持 | ||
|
||
::: | ||
|
||
## 👱🏻♂️ 账户信息 | ||
|
||
|
||
### 注册事件 | ||
|
||
``` dart | ||
/// [method] 注册方式 | ||
/// [isSuccess] 是否成功 | ||
FlutterAdspark.registerEvent("wechat", true); | ||
``` | ||
|
||
### 登录事件 | ||
|
||
``` dart | ||
/// [method] 登录方式 | ||
/// [isSuccess] 是否成功 | ||
FlutterAdspark.loginEvent("wechat", true); | ||
``` | ||
|
||
### 设置用户标识 | ||
|
||
``` dart | ||
/// [userUniqueId] 设置您自己的账号体系ID或设备ID, 并保证其唯一性 | ||
FlutterAdspark.setUserUniqueID("userId_001"); | ||
``` | ||
|
||
### 清除用户标识 | ||
|
||
``` dart | ||
FlutterAdspark.setUserUniqueID(null); | ||
``` | ||
|
||
### 绑定社交账号 | ||
|
||
``` dart | ||
/// [accountType] 账户类型 | ||
/// [isSuccess] 是否成功 | ||
FlutterAdspark.accessAccountEvent("wechat", true); | ||
``` | ||
|
||
## 🛒 购物支付 | ||
|
||
### 添加到购物车事件 | ||
|
||
``` dart | ||
/// 添加到购物车事件 | ||
/// [contentType] 商品类型 | ||
/// [contentName] 商品名称 | ||
/// [contentId] 商品ID | ||
/// [contentNum] 商品数量 | ||
/// [isSuccess] 是否成功 | ||
FlutterAdspark.addCartEvent("gift", "flower", "008", 2, true); | ||
``` | ||
|
||
### 购买事件 | ||
|
||
``` dart | ||
/// [contentType] 商品类型 | ||
/// [contentName] 商品名称 | ||
/// [contentId] 商品ID | ||
/// [contentNum] 商品数量 | ||
/// [paymentChannel] 支付渠道 | ||
/// [currency] 货币 | ||
/// [isSuccess] 是否成功 | ||
/// [currencyAmount] 货币数量 | ||
FlutterAdspark.purchaseEvent("gift", "flower", "008", 2, "wechat", "¥", true, 99); | ||
``` | ||
|
||
### 添加支付渠道 | ||
|
||
``` dart | ||
/// [paymentChannel] 支付渠道 | ||
/// [isSuccess] 是否成功 | ||
FlutterAdspark.accessPaymentChannelEvent("wechat", true); | ||
``` | ||
|
||
### 结账购买事件 | ||
|
||
``` dart | ||
/// [contentType] 商品类型 | ||
/// [contentName] 商品名称 | ||
/// [contentId] 商品ID | ||
/// [contentNum] 商品数量 | ||
/// [isVirtualCurrency] 是否虚拟货币 | ||
/// [virtualCurrency] 虚拟货币 | ||
/// [currency] 货币 | ||
/// [isSuccess] 是否成功 | ||
/// [currencyAmount] 货币数量 | ||
FlutterAdspark.checkOutEvent("gift", "flower", "008", 2, false, "%%", "¥", true, 99); | ||
``` | ||
|
||
### 添加到收藏事件 | ||
|
||
``` dart | ||
/// [contentType] 商品类型 | ||
/// [contentName] 商品名称 | ||
/// [contentId] 商品ID | ||
/// [contentNum] 商品数量 | ||
/// [isSuccess] 是否成功 | ||
FlutterAdspark.addToFavoriteEvent("gift", "flower", "008", 2, true); | ||
``` | ||
|
||
### 查看商品事件 | ||
|
||
``` dart | ||
/// [contentType] 商品类型 | ||
/// [contentName] 商品名称 | ||
/// [contentId] 商品ID | ||
FlutterAdspark.viewContentEvent("gift", "flower", "008"); | ||
``` | ||
|
||
|
||
## 🎮 游戏关卡 | ||
|
||
### 完成任务/副本/关卡事件 | ||
|
||
``` dart | ||
/// [questId] 任务ID | ||
/// [questType] 任务类型 | ||
/// [questName] 任务名称 | ||
/// [questNo] 任务编号 | ||
/// [isSuccess] 是否成功 | ||
/// [description] 描述 | ||
FlutterAdspark.questEvent("0001", "新手任务", "新手村砍野猪", 3, true, "其他描述"); | ||
``` | ||
|
||
### 创建游戏角色事件 | ||
|
||
``` dart | ||
/// [gameRoleId] 游戏角色ID | ||
FlutterAdspark.createGameRoleEvent("11001"); | ||
``` | ||
|
||
### 更新等级事件 | ||
|
||
``` dart | ||
/// [level] 等级 | ||
FlutterAdspark.updateLevelEvent(3); | ||
``` | ||
|
||
### 更新等级事件 | ||
|
||
``` dart | ||
/// [level] 等级 | ||
FlutterAdspark.updateLevelEvent(3); | ||
``` | ||
|
||
|
||
## 官方文档 | ||
|
||
- [穿山甲~Android](https://bytedance.larkoffice.com/wiki/Yh8qwfiiIivBaKkYFYAcZedTnJf) | ||
- [穿山甲~iOS](https://bytedance.larkoffice.com/wiki/YcpCwVKdFi0VUxk4EAjc6TuJnre) | ||
- [巨量广告~文档](https://event-manager.oceanengine.com/docs/8650/195169) | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters