简介
AppsFlyer 详细应用内事件让广告主能追踪任何安装后事件并将其归入原始媒体渠道。
如果您的用户进行注册、学完教程、将商品添加至购物车或进行购买,应用内事件数据可显示相关详情。
详细应用内事件对确定用户价值以及不同媒体渠道所带来的流量质量至关重要。因此,尽管并非强制要求,但 AppsFlyer 强烈建议您实施详细应用内事件。
使用应用内事件的另一项重要益处是可以借助先进广告网络映射 AppsFlyer 的应用内事件。这让广告平台能高效优化网络流量,有时还能建立针对性较强的受众。
TrackEvent API
应用内事件由事件名称和事件参数组成。
您可以使用任何您选择的事件名称字符串。但 AppsFlyer 的 SDK 通过枚举和定义也提供推荐的事件名称 (有关建议的事件和参数名称列表, 请参阅事件类型选项卡)。
事件名称区分大小写, 例如, 发送 af_purchase 和 af_PURCHASE 两个事件名称将创建两个单独的事件。
语法:
public static void trackEvent(Context context, String eventName, Map eventValues)
-
Context - 使用
getApplicationContext()
- eventName
- 用于定义事件名称的任何字符串。
- eventValues
- 组成详细事件的时间参数映射。
- (void) trackEvent:(NSString *)eventName withValues:(NSDictionary*)values
-
eventName - 用于定义事件名称的任何字符串。
- 值
- 组成详细事件的事件参数字典。
适用于混合应用的应用内事件
如果你的应用是混合应用, 请参阅我们关于混合应用的应用内事件指南。
警告
不同广告平台对事件名称中允许的字符有自己的限制。为了避免任何可能存在的问题,AppsFlyer 建议仅将小写字母数字字符(a-z 和 0-9)用于您的应用内事件名称。
应用内事件类型
以下部分介绍了每个事件类型的推荐结构, 以及指向 Facebook、Twitter、Criteo、Google Ads 和 Snapchat 的参数映射。
注意
以下参数作为详细应用内事件值的一部分仅在原始数据报告中可用。确保您的帐户能访问原始数据报告,从而充分享受详细应用内事件的益处。
建议的应用内事件结构
以下应用内事件被定义为 AFInAppEventType 接口的一部分, 建议这样做:
达到级别
事件名称:af_level_achieved
说明:用于追踪游戏等级事件
事件参数 (Android):AFInAppEventType.LEVEL_ACHIEVED
事件参数 (iOS):AFEventLevelAchieved
Facebook映射事件:fb_mobile_level_achieved
Twitter映射事件: LEVEL_ACHIEVED
Criteo 映射事件:userLevel
Google Ads: level_up
Snapchat: LEVEL_COMPLETE
推荐属性: af_level, af_score
属性映射:
AppsFlyer | Criteo | Google Ads | Snapchat | ||
---|---|---|---|---|---|
af_level | fb_level | level | ui_level | level_up | level |
af_score | - | - | - | score | - |
添加付款信息
事件名称: af_add_payment_info
描述:用于追踪付款信息配置状态
事件参数(Android):AFInAppEventType.ADD_PAYMENT_INFO
事件参数 (iOS):AFEventAddPaymentInfo
Facebook映射事件:fb_mobile_add_payment_info
Twitter映射事件: ADDED_PAYMENT_INFO
Criteo映射事件:无
Google Ads: add_payment_info
Snapchat: ADD_BILLING
推荐属性: af_success
属性映射:
AppsFlyer | Criteo | Google Ads | Snapchat | ||
---|---|---|---|---|---|
af_success | fb_success | user_payment_info | - | add_payment_info | success |
添加到购物车
事件名称: af_add_to_cart
说明: 用于追踪特定项目被加到购物车的事件
事件参数 (Android): AFInAppEventType.ADD_TO_CART
事件参数 (iOS): AFEventAddToCart
Facebook映射事件: fb_mobile_add_to_cart
Twitter 映射事件: ADD_TO_CART
Criteo映射事件: viewBasket
Google Ads: add_to_cart
Snapchat: ADD_CART
推荐属性: af_price, af_content_type, af_content_id, af_content, af_currency, af_quantity
属性映射:
AppsFlyer | Criteo | Google Ads | Snap | ||
---|---|---|---|---|---|
af_price | _valueToSum | price_micro* | price** | price | price |
af_content_type | fb_content_type | content_type | - | item_category | item_category |
af_content_id | fb_content_id | content_id | id | item_id | item_ids |
af_content | fb_content | - | - | - | - |
af_currency | fb_currency | price_currency | currency | currency_code | currency |
af_quantity | - | number_items | quantity | quantity | number_items |
*要报告包含多个项目的事件,请点击 此处。
添加到愿望清单
事件名称: af_add_to_wishlist
描述:用于追踪特定商品的“添加到愿望清单”事件。
事件参数Android): AFInAppEventType.ADD_TO_WISH_LIST
事件参数 (iOS): AFEventAddToWishlist
Facebook映射事件: fb_mobile_add_to_wishlist
Twitter映射事件: ADD_TO_WISHLIST
Criteo映射事件:无
Google Ads: add_to_wishlist
推荐属性: af_price, af_content_type, af_content_id, af_content, af_currency, af_quantity
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_price | _valueToSum | price_micro* | - | 价格 |
af_content_type | fb_content_type | content_type | - | 商品类别 |
af_content_id | fb_content_id | content_id | - | item_id |
af_content | fb_content | - | - | - |
af_currency | fb_currency | price_currency | - | currency_code |
af_quantity | - | number_items | - | quantity |
*要报告包含多个项目的事件,请点击 此处。
完成注册
事件名称:af_complete_registration
描述:用于追踪用户注册方式
事件参数 (Android): AFInAppEventType.COMPLETE_REGISTRATION
事件参数 (iOS): AFEventCompleteRegistration
Facebook映射事件: fb_mobile_complete_registration
Twitter映射事件: SIGN_UP
Criteo映射事件:无
Google Ads: sign_up
Snapchat: SIGN_UP
推荐参数: af_registration_method
属性映射:
AppsFlyer | Criteo | Google Ads | Snapchat | ||
---|---|---|---|---|---|
af_registration_ method |
fb_registration_ method |
registration_method | - | registration_method | sign_up_method |
教程完成
事件名称:af_tutorial_completion
描述:用于追踪教程完成情况
事件参数 (Android): AFInAppEventType.TUTORIAL_COMPLETION
事件参数 (iOS): AFEventTutorial_completion
Facebook映射事件: fb_mobile_tutorial_completion
Twitter映射事件: TUTORIAL_COMPLETE
Criteo映射事件:无
Google Ads: tutorial_complete
推荐属性: af_success, af_content_id, af_content
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_success | fb_success | - | - | success |
af_content_id | fb_content_id | content_id | - | item_id |
af_content | fb_content | - | - | - |
*要报告包含多个项目的事件,请点击 此处。
发起的结账
事件名称:af_initiated_checkout
描述:用于追踪结账事件
事件属性 (Android): AFInAppEventType.INITIATED_CHECKOUT
事件参数 (iOS):AFEventInitiatedCheckout
Facebook 映射 事件: fb_mobile_initiated_checkout
Twitter映射事件: CHECKOUT_INITIATED
Criteo映射事件: viewBasket
Google Ads: begin_checkout
Snapchat: START_CHECKOUT
推荐 属性: af_price, af_content_type, af_content_id, af_content, af_quantity, af_payment_info_available, af_currency
属性映射:
AppsFlyer | Criteo | Google Ads | Snapchat | ||
---|---|---|---|---|---|
af_price | _valueToSum | price_micro* | price | price | price |
af_content_type | fb_content_type | content_type | - | item_category | item_category |
af_content_id | fb_content_id | content_id | id | item_id | item_ids |
af_content | fb_content | - | - | - | |
af_currency | fb_currency | price_currency | currency | currency_code | currency |
af_quantity | fb_num_items | number_items | quantity | quantity | number_items |
af_payment_info_ |
fb_payment_info_ available |
user_payment_ info |
- | payment_info_ available |
payment_info_available |
af_content_list | fb_content_id | - | - | item_id | - |
af_date_a- | fb_checkin_date | - | din | start_date | - |
af_date_b | fb_checkout_date | - | dout | end_date | - |
af_departing_ departure_date |
fb_departing_ departure_date |
- | - | - | - |
af_returning_ departure_date |
fb_returning_ departure_date |
- | - | - | - |
af_destination_a | fb_origin_airport | - | - | origin | - |
af_destination_b | fb_destination_airport | - | - | destination | - |
af_destination_list | fb_destination_ids | - | - | - | - |
af_city | fb_city | - | - | - | - |
af_region | fb_region | - | - | - | - |
af_country | fb_country | - | - | - | - |
af_departing_ arrival_date |
fb_departing_arrival_ date |
- | - | - | - |
af_returning_- arrival_date |
fb_returning_arrival_ date |
- | - | - | - |
af_suggested_ destinations |
fb_suggested_ destinations |
- | - | - | - |
af_travel_start | fb_travel_start | - | - | - | - |
af_travel_end | fb_travel_end | - | - | - | - |
af_num_adults | fb_num_adults | - | - | - | - |
af_num_childr-en | fb_num_children | - | - | - | - |
af_num_infant-s | fb_num_infants | - | - | - | - |
af_class | fb_travel_class | - | - | travel_class | - |
af_suggested_hotels | fb_suggested_hotels | - | - | - | - |
af_user_score | fb_user_score | - | - | - | - |
af_hotel_score | fb_hotel_score | - | - | - | - |
af_price | fb_purchase_value | - | - | price | - |
af_purchase_currency | fb_purchase_currency | - | - | - | - |
af_preferred_star_ ratings |
fb_preferred_star_ ratings |
- | - | - | - |
af_preferred_price_ range |
fb_preferred_price_ range |
- | - | - | - |
af_preferred_ neighborhoods |
fb_preferred_ neighborhoods |
- | - | - | - |
af_preferred_-num_ stops |
fb_preferred_num_ stops |
- | - | - | - |
*要报告包含多个项目的事件,请点击 此处。
购买
事件名称: af_purchase
描述:用于追踪购买事件(及相关收入)
事件参数 (Android): AFInAppEventType.PURCHASE
事件参数 (iOS): AFEventPurchase
Facebook映射事件: fb_mobile_purchase
Twitter映射事件: PURCHASE
Criteo 映射事件: transactionConfirmation
Google Ads: in_app_purchase
Snapchat: PURCHASE
推荐参数: af_revenue, af_content_type, af_content_id, af_content, af_price, af_quantity, af_currency, af_order_id
属性映射:
AppsFlyer | Criteo | Google Ads | Snapchat | Partnerize | ||
---|---|---|---|---|---|---|
af_revenue* |
_valueToSum |
price_micro** |
ui_revenue |
value |
price |
- |
af_content_type |
fb_content_type |
content_type |
- |
item_category |
item_category |
类别 |
af_content_id |
fb_content_id |
content_id |
id |
item_id |
item_ids |
- |
af_content |
fb_content |
- |
- |
- |
- |
Custom conversion meta |
af_currency |
fb_currency |
price_currency |
currency |
currency_code |
currency |
currency |
af_quantity |
fb_num_items |
number_items |
quantity |
quantity |
number_items |
quantity |
af_validated |
- |
- |
- |
已验证 |
success |
Voucher |
af_receipt_id |
- |
- |
transaction_id |
transaction_id |
- |
Conversion Reference |
af_order_id |
fb_order_id |
- |
- |
order_id |
transaction_id |
Clickref |
af_content_list |
fb_content_id |
- |
- |
item_id |
- |
Custom item meta |
af_date_a |
fb_checkin_date |
- | din | start_date | - | - |
af_date_b |
fb_checkout_date |
- | dout | end_date | - | - |
af_departing_ departure_date |
fb_departing_ |
- | - | - | - | - |
af_returning_ departure_date |
fb_returning_ |
- | - | - | - | - |
af_destination_a |
fb_origin_airport |
- | - | origin | - | - |
af_destination_b |
fb_destination_ |
- | - | destination | - | - |
af_destination_list |
fb_destination_ids |
- | - | - | - | - |
af_city |
fb_city |
- | - | - | - | - |
af_region |
fb_region |
-- | -- | -- | -- | - |
af_country |
fb_country |
- | - | - | - | - |
af_departing_arrival_ date |
fb_departing_arrival_ |
- | - | - | - | - |
af_returning_arrival_ date |
fb_returning_arrival_ |
- | - | - | - | - |
af_suggested_ destinations |
fb_suggested_ |
- | - | - | - | - |
af_travel_start |
fb_travel_start |
- | - | - | - | - |
af_travel_end |
fb_travel_end |
- | - | - | - | - |
af_num_adults |
fb_num_adults |
- | - | - | - | - |
af_num_children |
fb_num_children |
- | - | - | - | - |
af_num_infants |
fb_num_infants |
- | - | - | - | - |
af_class |
fb_travel_class |
- | - | travel_class | - | - |
af_suggested_ hotels |
fb_suggested_ |
- | - | - | - | - |
af_user_score |
fb_user_score |
- | - | - | - | - |
af_hotel_score |
fb_hotel_score |
- | - | - | - | - |
af_price |
fb_purchase_value |
- | price** | price | - | value |
af_purchase_ currency |
fb_purchase_ |
- | - | - | - | - |
af_preferred_star_ ratings |
fb_preferred_star_ |
- | - | - | - | - |
af_preferred_price_ range |
fb_preferred_price_ |
- | - | - | - | - |
af_preferred_ neighborhoods |
fb_preferred_ |
- | - | - | - | - |
af_preferred_num_ stops |
fb_preferred_num_ |
- | - | - | - | - |
* af_revenue 用于计算 AppsFlyer 平台中的收入。
**af_price - 您可使用 af_price 作为不计算收入的货币参数(例如“添加到购物车”事件)。 该参数意指单个商品价格。 所有购买的总金额用 af_revenue 参数表示。
如需了解 AppsFlyer 支持的货币符号列表,请点击此处。
*要报告包含多个项目的事件,请点击 此处。
订阅
事件名称: af_subscribe
说明: 用于追踪付费订阅购买
事件参数 (Android): AFInAppEventType.SUBSCRIBE
事件参数 (iOS): AFEventSubscribe
Facebook映射事件: Subscribe
Twitter映射事件: 无
Criteo映射事件:无
Google Ads: 无
推荐属性: af_revenue af, af_currency
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_revenue |
_valueToSum |
- |
- |
- |
af_currency |
fb_currency |
- |
- |
- |
开始试用
事件名称: af_start_trial
说明: 用于追踪产品的免费试用的开始
事件参数 (Android): AFInAppEventType.START_TRIAL
事件参数 (iOS): AFEventStartTrial
Facebook映射事件: StartTrial
Twitter映射事件: 无
Criteo映射事件:无
Google Ads: 无
推荐属性: af_price, af_currency
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_price |
_valueToSum |
- |
- |
- |
af_currency |
fb_currency |
- |
- |
- |
评级
事件名称:af_rate
描述:用于追踪应用/商品评级事件。
事件参数 (Android): AFInAppEventType.RATE
事件参数 (iOS): AFEventRate
Facebook映射事件: fb_mobile_rate
Twitter映射事件: RATED
Criteo映射事件:无
Google Ads: submit_rating
推荐属性: af_rating_value, af_content_type, af_content_id, af_content, af_max_rating_value
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_rating_value |
_valueToSum |
price_micro |
value |
|
af_content_type |
fb_content_type |
content_type |
- |
content_type |
af_content_id |
fb_content_id |
content_id |
- |
content_id |
af_content |
fb_content |
- |
- |
- |
af_max_rating_value |
fb_max_rating_value |
max_rated_value |
- |
max_rating |
*要报告包含多个项目的事件,请点击 此处。
搜索
事件名称: af_search
描述:用于追踪搜索事件
事件参数 (Android): AFInAppEventType.SEARCH
事件参数 (iOS): AFEventSearch
Facebook映射事件: fb_mobile_search
Twitter映射事件: SEARCH
Criteo映射事件: viewSearch
Google Ads: view_search_results
Google Ads: SEARCH
推荐属性: af_content_type, af_search_string, af_success
属性映射:
AppsFlyer | Criteo | Google Ads | Snapchat | ||
---|---|---|---|---|---|
af_content_type |
fb_content_type |
content_type |
- |
item_category |
item_category |
af_search_string |
fb_search_string |
search_string |
- |
search_term |
search_string |
af_date_a |
fb_checkin_date |
- |
din |
start_date |
- |
af_date_b |
fb_checkout_date |
- |
dout |
end_date |
- |
af_destination_a |
fb_origin_airport |
- |
- |
origin |
- |
af_destination_b |
fb_destination_airport |
- |
- |
destination |
- |
af_success |
fb_success |
- |
- |
success |
success |
af_content_list |
fb_content_id |
- |
- |
item_id |
- |
af_departing_ departure_date |
fb_departing_ |
- | - | - | - |
af_returning_ departure_date |
fb_returning_ |
- | - | - | - |
af_destination_list |
fb_destination_ids |
- | - | - | - |
af_city |
fb_city |
- | - | - | - |
af_region |
fb_region |
- | - | - | - |
af_country |
fb_country |
- | - | - | - |
af_departing_arrival_ date |
fb_departing_arrival_ |
- | - | - | - |
af_returning_arrival_ date |
fb_returning_arrival_ |
- | - | - | - |
af_suggested_ destinations |
fb_suggested_ |
- | - | - | - |
af_travel_start |
fb_travel_start |
- | - | - | - |
af_travel_end- |
fb_travel_end |
- | - | - | - |
af_num_adults |
fb_num_adults |
- | - | - | - |
af_num_children |
fb_num_children |
- | - | - | - |
af_num_infants |
fb_num_infants |
- | - | - | - |
af_class |
fb_travel_class |
- | - | travel_class | - |
af_suggested_hotels |
fb_suggested_hotels |
- | - | - | - |
af_user_score |
fb_user_score |
- | - | - | - |
af_hotel_score |
fb_hotel_score |
- | - | - | - |
af_price |
fb_purchase_value |
- | - | price | - |
af_purchase_currency |
fb_purchase_currency |
- | - | - | - |
af_preferred_star_ ratings |
fb_preferred_star_ |
- | - | - | - |
af_preferred_price_ range |
fb_preferred_price_ |
- | - | - | - |
af_preferred_ neighborhoods |
fb_preferred_ |
- | - | - | - |
af_preferred_num_ stops |
fb_preferred_num_ |
- | - | - | - |
花掉的积分
事件名称: af_spent_credits
描述:用于追踪积分花费事件
事件参数 (Android): AFInAppEventType.SPENT_CREDIT
事件参数 (iOS): AFEventSpentCredits
Facebook映射事件: fb_mobile_spent_credits
Twitter映射事件: SPENT_CREDITS
Criteo 映射事件: transactionConfirmation
Google Ads: spend_virtual_currency
推荐属性: af_price, af_content_type, af_content_id, af_content
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_price |
_valueToSum |
price_micro* |
price** |
price |
af_content_type |
fb_content_type |
content_type |
- |
item_category |
af_content_id |
fb_content_id |
content_id |
item_id |
item_id |
af_content |
fb_content |
- |
- |
|
*要报告包含多个项目的事件,请点击 此处。
解锁的成就
事件名称: af_achievement_unlocked
描述:用于追踪成就解锁事件
事件参数 (Android): AFInAppEventType.ACHIEVEMENT_UNLOCKED
事件参数 (iOS): AFEventAchievementUnlocked
Facebook映射事件: fb_mobile_achievement_unlocked
Twitter映射事件: ACHIEVEMENT_UNLOCKED
Criteo映射事件: achievement
Google Ads: unlock_achievement
推荐属性: af_description
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_description |
fb_description |
description |
ui_achievement |
description |
内容视图
事件名称: af_content_view
描述:用于追踪内容视图事件
事件参数 (Android): AFInAppEventType.CONTENT_VIEW
事件参数 (iOS): AFEventContentView
Facebook映射事件: fb_mobile_content_view
Twitter映射事件: CONTENT_VIEW
Criteo映射事件: viewProduct
Google Ads: view_item
Snapchat: VIEW_CONTENT
推荐属性:af_price、af_content_type、af_content_id、af_content、af_currency
属性映射:
AppsFlyer | Criteo | Google Ads | Snap | ||
---|---|---|---|---|---|
af_price |
_valueToSum |
price_micro* |
price |
price |
price |
af_content_type |
fb_content_type |
content_type |
- |
item_category |
item_category |
af_content_id |
fb_content_id |
content_id |
id |
item_id |
item_ids |
af_content |
fb_content |
- |
- |
- |
- |
af_currency |
fb_currency |
price_currency |
currency |
currency_code |
currency |
af_content_list |
fb_content_id |
- |
- |
item_id | - |
af_date_a |
fb_checkin_date |
- | din | start_date | - |
af_date_b |
fb_checkout_date |
- | dout | end_date | - |
af_departing_ departure_date |
fb_departing_ |
- | - | - | |
af_returning_ departure_date |
fb_returning_ |
- | - | - | - |
af_destination_a |
fb_origin_airport |
- | - | origin | - |
af_destination_b |
fb_destination_ |
- | - | destination | - |
af_destination_list |
fb_destination_ids |
- | - | - | - |
af_city |
fb_city |
- | - | - | - |
af_region |
fb_region |
- | - | - | - |
af_country |
fb_country |
- | - | - | - |
af_departing_arrival_ date |
fb_departing_arrival_ |
- | - | - | - |
af_returning_arrival_ date |
fb_returning_arrival_ |
- | - | - | - |
af_suggested_ destinations |
fb_suggested_ |
- | - | - | - |
af_travel_start |
fb_travel_start |
- | - | - | - |
af_travel_end |
fb_travel_end |
- | - | - | - |
af_num_adults |
fb_num_adults |
- | - | - | - |
af_num_children |
fb_num_children |
- | - | - | - |
af_num_infants |
fb_num_infants |
- | - | - | - |
af_class |
fb_travel_class |
- | - | travel_class | - |
af_suggested_hotels |
fb_suggested_hotels |
- | - | - | - |
af_user_score |
fb_user_score |
- | - | - | - |
af_hotel_score |
fb_hotel_score |
- | - | - | - |
af_price |
fb_purchase_value |
- | - | price | - |
af_purchase_currency |
fb_purchase_currency |
- | - | - | - |
af_preferred_star_ ratings |
fb_preferred_star_ |
- | - | - | - |
af_preferred_price_ range |
fb_preferred_price_ |
- | - | - | - |
af_preferred_ neighborhoods |
fb_preferred_ |
- | - | - | - |
af_preferred_num_ stops |
fb_preferred_num_ |
- | - | - | - |
列表视图
事件名称: af_list_view
描述:用于追踪列表视图事件
事件参数 (Android): use the string "af_list_view" instead:
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "af_list_view", eventValue);
事件参数 (iOS): AFEventListView
Facebook 映射事件:
Twitter 映射事件:
Criteo映射事件: viewListing
Google Ads: view_item_list
推荐属性: af_content_type, af_content_list
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_content_type |
- |
- |
- |
item_Category |
af_content_list |
- |
- |
- |
item_id |
广告点击
事件名称: af_ad_click
说明: 用于追踪应用中展示广告的点击次数
事件参数 (Android): AFInAppEventType.AD_CLICK
事件参数 (iOS): AFEventAdClick
Facebook 映射时间: AdClick
Twitter映射事件: 无
Criteo映射事件:无
Google Ads: 无
推荐属性: af_adrev_ad_type
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_adrev_ad_type |
ad_type |
- |
- |
- |
af_currency |
fb_currency |
- |
- |
- |
Ad View
事件名称: af_ad_view
说明: 用于追踪应用中展示广告的展示次数
事件参数 (Android): AFInAppEventType.AD_VIEW
事件参数 (iOS): AFEventAdView
Facebook 映射事件: AdView
Twitter映射事件: 无
Criteo映射事件:无
Google Ads: 无
推荐属性: af_adrev_ad_type
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_adrev_ad_type |
ad_type |
- |
- |
- |
af_currency |
fb_currency |
- |
- |
- |
旅行预订
事件名称:af_travel_booking
描述:用于追踪旅行预订事件(及相关收入)
事件参数 (Android): AFInAppEventType.TRAVEL_BOOKING
事件参数 (iOS): AFEventTravelBooking
Facebook映射事件: fb_mobile_purchase
Twitter映射事件: PURCHASE
Criteo 映射事件: transactionConfirmation
Google Ads: ecommerce_purchase
推荐属性: af_revenue, af_destination_a, af_destination_b, af_class, af_description, af_customer_user_id, af_content_type, af_content_id, af_date_a, af_date_b
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_revenue* |
_valueToSum |
price_micro** |
price*** |
value |
af_customer_user_id |
- |
- |
cid |
customer_user_ |
af_content_type |
fb_content_type |
content_type |
- |
item_category |
af_content_id |
fb_content_id |
content_id |
- |
item_id |
af_class |
- |
- |
- |
travel_class |
af_date_a |
- |
- |
din |
start_date |
af_date_b |
- |
- |
dout |
end_date |
af_destination_a |
- |
- |
- |
origin |
af_destination_b |
- |
- |
- |
destination |
af_success |
fb_success |
- |
- |
success |
af_content_list |
fb_content_ids |
- |
- |
item_id |
af_date_a |
fb_checkin_date |
- | - | start_date |
af_date_b |
fb_checkout_date |
- | - | end_date |
af_departing_ departure_date |
fb_departing_ |
- | - | |
af_returning_ departure_date |
fb_returning_ |
- | - | |
af_destination_a |
fb_origin_airport |
- | - | origin |
af_destination_b |
fb_destination_airport |
- | - | destination |
af_destination_list |
fb_destination_ids |
- | - | |
af_city |
fb_city |
- | - | - |
af_region |
fb_region |
- | - | - |
af_country |
fb_country |
- | - | - |
af_departing_arrival_ date |
fb_departing_arrival_ |
- | - | - |
af_returning_arrival_ date |
fb_returning_arrival_ |
- | - | - |
af_suggested_ destinations |
fb_suggested_ |
- | - | - |
af_travel_start |
fb_travel_start |
- | - | - |
af_travel_end |
fb_travel_end |
- | - | - |
af_num_adults |
fb_num_adults |
- | - | - |
af_num_children |
fb_num_children |
- | - | - |
af_num_infants |
fb_num_infants |
- | - | - |
af_class |
fb_travel_class |
- | - | travel_class |
af_suggested_hotels |
fb_suggested_hotels |
- | - | - |
af_user_score |
fb_user_score |
- | - | - |
af_hotel_score |
fb_hotel_score |
- | - | - |
af_price |
fb_purchase_value |
- | - | price |
af_purchase_currency- |
fb_purchase_currency |
- | - | - |
af_preferred_star_ ratings- |
fb_preferred_star_ |
- | - | - |
af_preferred_price_ range |
fb_preferred_star_ |
- | - | - |
af_preferred_ neighborhoods |
fb_preferred_ |
- | - | - |
af_preferred_num_ stops- |
fb_preferred_num_ |
- | - | - |
af_order_id |
fb_order_id |
- | - | order_id |
分享
事件名称: af_share
描述:用于追踪分享事件
事件参数 (Android): AFInAppEventType.SHARE
事件参数 (iOS): AFEventShare
Facebook 映射 事件: 无
Twitter 映射事件: SHARE
Criteo映射事件:无
Google Ads: share
推荐 属性: af_description
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_description |
- |
description |
- |
description |
邀请
事件名称: af_invite
描述:用于追踪邀请(社交)事件
事件参数 (Android): AFInAppEventType.INVITE
事件参数 (iOS): AFEventInvite
Facebook 映射事件: None
Twitter 映射事件: INVITE
Criteo映射事件:无
Google Ads: invite
推荐属性: 无
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_description |
- |
description |
- |
description |
登录
事件名称:af_login
描述:用于追踪用户登录事件
事件参数 (Android): AFInAppEventType.LOGIN
事件参数 (iOS): AFEventLogin
Facebook 映射事件: None
Twitter 映射事件: LOGIN
Criteo映射事件:无
Google Ads: login
推荐属性: 无
用户唤醒
事件名称: af_re_engage
描述: 用于追踪用户的重参与事件
事件参数 (Android): AFInAppEventType.RE_ENGAGE
事件参数 (iOS): AFEventReEngage
Facebook 映射 事件: 无
Twitter 映射事件: RE_ENGAGE
Criteo映射事件:无
Google Ads: custom_event
推荐 属性: 无
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_description |
- |
description |
- |
description |
从推送通知打开
事件名称: af_opened_from_push_notification
描述:用于追踪从推送通知打开应用的事件
事件参数 (Android): AFInAppEventType.OPENED_FROM_PUSH_NOTIFICATION
事件参数 (iOS): AFEventOpenedFromPushNotification
Facebook 映射事件: None
Twitter映射事件: 无
Criteo映射事件:无
Google Ads: notification_open
推荐 属性: 无
更新
事件名称:af_update
描述:用于追踪更新事件
事件参数 (Android): AFInAppEventType.UPDATE
事件参数 (iOS): AFEventUpdate
Facebook 映射事件: None
Twitter 映射事件: UPDATE
Criteo映射事件:无
Google Ads: app_update
推荐属性: af_content_id
属性映射:
AppsFlyer | Criteo | Google Ads | ||
---|---|---|---|---|
af_content_id |
- |
content_id |
- |
item_id |
*要报告包含多个项目的事件,请点击 此处。
可选参数
除了推荐的伴随事件发送的参数以外,定义在 AFInAppEventParameterName
界面中的参数也能作为事件查询值的一部分一起发送。
参数字符串常量 | 参数字符串名称 | 推荐值类型 |
---|---|---|
收入(详情) |
af_revenue |
浮动 |
PRICE (details) |
af_price |
浮动 |
级别 |
af_level |
Int |
成功 |
af_success |
布尔 |
CONTENT_TYPE |
af_content_type |
字符串 |
CONTENT_LIST |
af_content_list |
字符串数组 |
CONTENT_ID |
af_content_id |
字符串 |
货币 |
af_currency |
字符串 |
REGISTRATION_METHOD |
af_registration_method |
字符串 |
数量 |
af_quantity |
Int |
PAYMENT_INFO_AVAILABLE |
af_payment_info_available |
布尔 |
RATING_VALUE |
af_rating_value |
浮动 |
MAX_RATING_VALUE |
af_max_rating_value |
浮动 |
SEARCH_STRING |
af_search_string |
字符串 |
描述 |
af_description |
字符串 |
得分 |
af_score |
Int |
DESTINATION_A |
af_destination_a |
字符串 |
DESTINATION_B |
af_destination_b |
字符串 |
类 |
af_class |
字符串 |
DATE_A |
af_date_a |
字符串 |
DATE_B |
af_date_b |
字符串 |
EVENT_START |
af_event_start |
Unixtime |
EVENT_END |
af_event_end |
Unixtime |
纬度 |
af_lat |
Int |
经度 |
af_long |
Int |
CUSTOMER_USER_ID |
af_customer_user_id |
字符串 |
CUSTOMER_SEGMENT |
af_customer_segment |
字符串 |
已验证 |
af_validated |
字符串 |
RECEIPT_ID |
af_receipt_id |
字符串 |
ORDER_ID |
af_order_id |
字符串 |
TUTORIAL_ID |
af_tutorial_id |
字符串 |
ACHIEVEMENT_ID |
af_achievement_id |
字符串 |
VIRTUAL_CURRENCY_NAME |
af_virtual_currency_name |
字符串 |
DEEP_LINK |
af_deep_link |
字符串 |
OLD_VERSION |
af_old_version |
字符串 |
NEW_VERSION |
af_new_version |
字符串 |
REVIEW_TEXT |
af_review_text |
字符串 |
COUPON_CODE |
af_coupon_code |
字符串 |
DEPARTING_DEPARTURE_DATE |
af_departing_departure_date |
字符串 |
RETURNING_DEPARTURE_DATE |
af_returning_departure_date |
字符串 |
DESTINATION_LIST |
af_destination_list |
String[] |
城市 |
af_city |
字符串 |
地区 |
af_region |
字符串 |
国家/地区 |
af_county |
字符串 |
DEPARTING_ARRIVAL_DATE |
af_departing_arrival_date |
字符串 |
RETURNING_ARRIVAL_DATE |
af_returning_arrival_date |
字符串 |
SUGGESTED_DESTINATIONS |
af_suggested_destinations |
String[] |
TRAVEL_START |
af_travel_start |
字符串 |
TRAVEL_END |
af_travel_end |
字符串 |
NUM_ADULTS |
af_num_adults |
Int |
NUM_CHILDREN |
af_num_children |
Int |
NUM_INFANTS |
af_num_infants |
Int |
SUGGESTED_HOTELS |
af_suggested_hotels |
String[] |
USER_SCORE |
af_user_score |
浮动 |
HOTEL_SCORE |
af_hotel_score |
浮动 |
PURCHASE_CURRENCY |
af_purchase_currency |
字符串 |
PREFERRED_STAR_RATINGS |
af_preferred_star_ratings |
Int[2] |
PREFERRED_PRICE_RANGE |
af_preferred_price_range |
Int[2] |
PREFERRED_NEIGHBORHOODS |
af_preferred_neighborhoods |
String[] |
PREFERRED_NUM_STOPS |
af_preferred_num_stops |
Int |
内容 |
af_content |
字符串 |
PARAM_1 |
af_param_1 |
字符串 |
PARAM_2 |
af_param_2 |
字符串 |
PARAM_3 |
af_param_3 |
字符串 |
PARAM_4 |
af_param_4 |
字符串 |
PARAM_5 |
af_param_5 |
字符串 |
PARAM_6 |
af_param_6 |
字符串 |
PARAM_7 |
af_param_7 |
字符串 |
PARAM_8 |
af_param_8 |
字符串 |
PARAM_9 |
af_param_9 |
字符串 |
PARAM_10 |
af_param_10 |
字符串 |
收入参数
您可以使用任何参数名称和事件发送收入值。但是, 要在 AppsFlyer 的原始和聚合数据中注册收入, 必须使用af_revenue参数。始终选择使用能够真实代表业务逻辑中创造收入的应用内事件。
有关 af_revenue 参数的更多详细信息, 请访问收入归因指南。
多个商品
您可以在单笔交易中添加多个商品。您可以用逗号隔开多个商品来描述某交易,而无需把每个事件参数对应一个值。
示例
在同一笔交易中,A. Flyer 先生从某家美国线上商店购买了两件完全一样的衬衫,一双鞋和一顶帽子。列明各商品的序列必须与各参数完全一致。
af_content_id: ["123","988","399"]
af_quantity: [2,1,1]
af_price: [25,50,10]
af_revenue: [110]
af_currency: USD
对于多个商品,代码显示如下:
Map<String,Object> eventData = new HashMap<>();
eventData.put(AFInAppEventParameterName.CONTENT_ID, new String[] {"123","988","399"});
eventData.put(AFInAppEventParameterName.QUANTITY, new int[] {2, 1, 1});
eventData.put(AFInAppEventParameterName.PRICE,new int[] {25, 50, 10});
eventData.put(AFInAppEventParameterName.CURRENCY,"USD");
eventData.put(AFInAppEventParameterName.REVENUE,110);
AppsFlyerLib.getInstance().trackEvent(AppsFlyerTestActivity.this, AFInAppEventType.PURCHASE,eventData);
多个商品会以数组形式在回传中发送。目前,Facebook和Twitter无法正确解析数组。为了帮助它们获取AppsFlyer商品数量 (af_quantity),这里就不是以数组形式发送 (例如,上面的例子中的Facebook就会收到 af_quantity=4)。
注意
多商品描述可以在以下应用内事件中使用:
af_add_to_cart, af_add_to_wishlist, af_tutorial_completion, af_initiated_checkout, af_purchase, af_rate, af_spent_credits, af_content_view, af_travel_booking, af_update
复杂应用内事件
复杂应用内事件可以允许在一个API调用中发送多个事件。
能有效分组查看若干密切关联的用户操作,例如单个会话中将若干产品添加到购物篮。
示例:
{
"af_revenue":"50.87",
"af_currency":"USD",
"af_receipt_id":"57601333",
"product":[
{
"af_content_id":"1164_8186",
"af_price":"8.97",
"af_quantity":"1"
},
{
"af_content_id":"1164_8186",
"af_price":"8.97",
"af_quantity":"1"
},
{
"af_content_id":"1164_8186",
"af_price":"8.97",
"af_quantity":"1"
},
{
"af_content_id":"1177_8185",
"af_price":"8.97",
"af_quantity":"1"
},
{
"af_content_id":"0153_9077",
"af_price":"14.99",
"af_quantity":"1"
}
]
}
警告
复杂应用内事件会引发 Facebook 和 Criteo 出现回传问题。如果您需要事件与 Facebook 和 Criteo 完全映射,您应按各用户操作发送单独的事件,例如按各添加的商品发送”添加到购物车“事件。使用应用内事件原始数据,将这些事件分为一组。
离线追踪事件
- SDK 将事件发送到 AppsFlyer 的服务器并等待响应。
- 如果 SDK 没有收到响应200, 则该事件将存储在缓存中。
- 收到下一个响应200后, 存储的事件将重新发送到服务器。
- 如果缓存中有多个事件, 它们将被立即按序发送到服务器。
注意
SDK 的缓存最多可以存储40个事件, 这意味着只保存脱机发生的前40个事件。所有之后的事件都会被丢弃,直到下一个相应200。
事件去重
AppsFlyer 有一套应用内事件去重的机制。它会检查所有应用内事件,以查看同一个 appsflyer_id 是否10秒内有同一个应用内事件。如果找到此类事件, 该机制将删除重复项。
如果两个事件中的以下字段相同, 则两个事件被视为相同:
- eventName
- Event value
- App ID
- AppsFlyer ID
注意
去重工作仅适用于从 SDK 发送的应用内事件。
服务器对服务器的应用内事件不会去重。
简介
在本节中, 我们列出了针对多个垂直行业的全面应用内事件集。本节中的每个垂直行业都涵盖了我们精心选择并推荐追踪的应用内事件。
要开始跟踪应用内事件, 请执行以下操作:
- 选择您的产品行业类型。
- 选择要追踪的应用内事件。我们建议您追踪您所在的产品行业中列出的所有事件。
- 复制每个应用内事件的代码段, 并在适用的情况下在应用中执行。
Gaming
游戏类应用包括街机类、策略类、教育类游戏甚至赌博等。我们建议在游戏应用中追踪的事件有:应用内购买、社交媒体上分享和邀请朋友。其他事件可以是在游戏中升级并完成游戏中的教程。以下是追踪这些事件将如何使您受益的一些示例:
- 追踪应用内购买可以让您了解用户买的最多的内容。
- 追踪用户游戏内升级情况可帮助您了解用户的参与程度。
- 追踪分享和邀请好友事件可帮助您了解有多少用户分享和邀请了其他玩家, 以及他们是通过哪些社交媒体平台分享和邀请的。
提示
这里讨论的事件也适用于在以下平台上运行的游戏应用:
- 安卓智能电视
- 苹果电视 (tvOS)
- amazon fire tv
- Xbox
登录
事件名称:af_login
目的
此事件可以帮助您追踪注册用户的留存情况。
触发逻辑
每当用户登录时触发此事件。
推荐的属性
此事件可以不带有任何其他属性进行发送。
代码示例
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.LOGIN, null);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventLogin withValues: nil];
AppsFlyerTracker.shared().trackEvent(AFEventLogin, withValues: nil);
AppsFlyer.trackRichEvent ("af_login", null);
完成注册
事件名称:af_complete_registration
目的
您可以追踪用户注册情况并将其与其他数据进行比较, 用来更深入地了解您的用户。通过追踪用户注册事件, 您可以:
- 了解有多少用户安装了该应用, 但从未注册。
- 了解用户喜欢的注册方式。
触发逻辑
追踪此事件的最佳方法是在用户完成注册过程时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_registration_method | 字符串 | email, facebook | 注册方式类型 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REGSITRATION_METHOD, "Facebook");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.COMPLETE_REGISTRATION, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventCompleteRegistration
withValues: @{
AFEventParamRegistrationMethod: @"Facebook"
}];
AppsFlyerTracker.shared().trackEvent(AFEventCompleteRegistration,
withValues: [
AFEventParamRegistrationMethod: "Facebook"
]);
Dictionary<string, string> CompletedRegistrationEvent = new Dictionary<string, string>();
CompletedRegistrationEvent.Add("af_registration_method", "Facebook");
AppsFlyer.trackRichEvent ("af_complete_registration", CompletedRegistrationEvent);
购买
事件名称: af_purchase
目的
许多游戏类应用允许用户购买物品, 例如硬币、宝石或武器等。购买 事件可帮助您追踪用户进行的应用内购买行为。通过追踪购买行为, 您可以:
- 确定您用户的 LTV 以及您通过不同渠道和代理投放的广告的 ROI。
- 确定哪些优惠最受用户欢迎。
- 横向对比带有后续消费内容的推广活动,有便于优化投放目标受众。
触发逻辑
若要正确追踪该事件,您应该当用户成功完成购买并进入感谢页面时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_revenue | float | 2000 | 预计购买收入 |
af_currency | 字符串 | THB / USD | 币种代码 |
af_quantity | int | 2 | 购买的物品数量 |
af_content_id | 字符串 | 001, 092 | 物品ID |
order_id | 字符串 | 9277 | 订单ID |
af_receipt_id | 字符串 | 9277 | 收据ID |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REVENUE, 200);
eventValue.put(AFInAppEventParameterName.CURRENCY, "USD");
eventValue.put(AFInAppEventParameterName.QUANTITY, 2);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "092");
eventValue.put("order_id", "9277");
eventValue.put(AFInAppEventParameterName.RECEIPT_ID, "9277");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(),AFInAppEventType.PURCHASE, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventPurchase
withValues: @{
AFEventParamRevenue: @200,
AFEventParamCurrency: @"USD",
AFEventParamQuantity: @2,
AFEventParamContentId: @"092",
@"order_id": @"9277",
AFEventParamReceiptId: @"9277"
}];
AppsFlyerTracker.shared().trackEvent(AFEventPurchase,
withValues: [
AFEventParamRevenue: 200,
AFEventParamCurrency: "THB",
AFEventParamQuantity: 2,
AFEventParamContentId: "092",
"order_id": "9277",
AFEventParamReceiptId: "9277"
]);
Dictionary<string, string> purchaseEvent = new Dictionary<string, string>();
purchaseEvent.Add("af_revenue", "200");
purchaseEvent.Add("af_currency", "USD");
purchaseEvent.Add("af_quantity", "2");
purchaseEvent.Add("af_content_id", "001");
purchaseEvent.Add("order_id", "9277");
purchaseEvent.Add("af_receipt_id", "9277");
AppsFlyer.trackRichEvent ("af_purchase", purchaseEvent);
达到级别
事件名称:af_level_achieved
目的
用户的主要目标之一是在游戏中提升等级。升级通常会在游戏中解锁新的功能和阶段, 鼓励用户继续玩。达到的等级 事件可帮助您追踪用户与游戏应用的互动情况。通过追踪用户达到的等级, 您可以:
- 确定哪些活动最能获取活跃用户。
- 了解哪些类型用户是最活跃、参与度最高的。
- 将整个用户活动与收入等维度相关联。
触发逻辑
若要正确追踪此事件, 您应在用户到达级别完成页面时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_level | int | 3 | 用户达到的等级 |
af_score | int | 500 | 用户成就分数 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.LEVEL, 10);
eventValue.put(AFInAppEventParameterName.SCORE, 500);
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.LEVEL_ACHIEVED, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventLevelAchieved
withValues: @{
AFEventParamLevel: @10,
AFEventParamScore: @500
}];
AppsFlyerTracker.shared().trackEvent(AFEventLevelAchieved,
withValues: [
AFEventParamLevel: 3,
AFEventParamScore: 500
]);
Dictionary<string, string> LevelAchievedEvent = new Dictionary<string, string>();
LevelAchievedEvent.Add("af_level", "10");
LevelAchievedEvent.Add("af_score", "500");
AppsFlyer.trackRichEvent ("af_level_achieved", LevelAchievedEvent);
教程完成
事件名称:af_tutorial_completion
目的
教程可帮助用户了解如何更好地使用您的应用。通过追踪教程完成事件, 您可以:
- 了解用户可能遇到的问题。
- 了解哪些教程效果不佳, 并对其进行改进。
触发逻辑
在以下两种情况下应触发此事件:
- 当用户完成教程时,一个包含着教程完成成功属性的事件将会被发送。
- 当用户开启了该教程但在未完成的情况下退出。当用户退出时, 将发送一个带有属性的事件, 该属性表示用户并未完成本教程。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_success | 布尔 | 真 | 用户是否完成了该教程 |
af_tutorial_id | 字符串 | 3 | 教程ID |
af_content | 字符串 | Getting Started | 该教程名称 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.SUCCESS, true);
eventValue.put(AFInAppEventParameterName.TUTORIAL_ID, "3");
eventValue.put(AFInAppEventParameterName.CONTENT, "Getting Started");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.TUTORIAL_COMPLETION, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventTutorial_completion
withValues: @{
AFEventParamSuccess: @TRUE,
AFEventParamTutorialId: @"3",
AFEventParamContent: @"Getting Started"
}];
AppsFlyerTracker.shared().trackEvent(AFEventTutorial_completion,
withValues: [
AFEventParamSuccess: true,
AFEventParamTutorialId: "3",
AFEventParamContent: "Getting started"
]);
Dictionary<string, string> TutorialCompletiondEvent = new Dictionary<string, string>();
TutorialCompletiondEvent.Add("af_success", "true");
TutorialCompletiondEvent.Add("af_tutorial_id", "3");
TutorialCompletiondEvent.Add("af_tutorial_content", "Getting started");
AppsFlyer.trackRichEvent ("af_tutorial_completion", TutorialCompletiondEvent);
分享
事件名称: af_share
目的
用户喜欢在社交媒体上分享自己在游戏中的成就。分享能够增强品牌效应,也会促使更多用户下载并安装您的 App。通过追踪 分享 事件,您可以了解用户什么时候最喜欢和他们的朋友分享这个 App。
提示
AppsFlyer SDK 有专门的方法来追踪分享和邀请。
触发逻辑
若要正确跟踪此事件, 您应在用户成功在社交媒体上发布分享时触发该事件:
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_description | 字符串 | 新的高分/升级/游戏胜利 | 在社交媒体上分享的原因。可能是一个新的高分, 升级等。 |
平台 | 字符串 | Facebook, Whatsapp, Email | 用户分享的平台 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.DESCRIPTION, "New High Score");
eventValue.put("platform", "Facebook");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.SHARE, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventShare
withValues: @{
AFEventParamDescription: @"New High Score",
@"platform": @"Facebook"
}];
AppsFlyerTracker.shared().trackEvent(AFEventShare,
withValues: [
AFEventParamDescription: "New High Score",
"platform": "Facebook"
]);
Dictionary<string, string> ShareEvent = new Dictionary<string, string>();
ShareEvent.Add("af_description", "New High Score");
ShareEvent.Add("platform", "Facebook");
AppsFlyer.trackRichEvent ("af_share", ShareEvent);
邀请
事件名称: af_invite
目的
用户经常会邀请他们的朋友下载和安装一个 App。有时用户单纯想要分享这个 App,也有时他们会因邀请其他人而获取奖励。您可以通过邀请 事件,来追踪邀请的情况。通过跟踪此事件, 您可以:
- 了解用户通常通过什么社交媒体网站来向朋友发送邀请。
- 了解有多少用户邀请了他们的朋友下载并安装该应用。
触发逻辑
若要正确追踪此事件, 您应在用户成功邀请朋友下载并安装应用时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_description | 字符串 | Try this app | 邀请的内容 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.DESCRIPTION, "Try this app");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.INVITE, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventInvite
withValues: @{
AFEventParamDescription: @"Try this app"
}];
AppsFlyerTracker.shared().trackEvent(AFEventInvite,withValues: [
AFEventParamDescription: "Try this app"
]);
Dictionary<string, string> InviteEvent = new Dictionary<string, string>();
InviteEvent.Add("af_description", "Try this app");
AppsFlyer.trackRichEvent ("af_invite", InviteEvent);
奖赏领取
事件名称: bonus_claimed
目的
通过追踪 奖赏领取 事件您可以:
- 查看有多少用户领取了提供的奖赏。
- 将奖赏领取与用户行为和参与度相关联。
触发逻辑
若要正确追踪此事件,您应在用户领取了奖赏并更新在他们账户中时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
bonus_type | 字符串 | coins | 用户领取的奖赏类型 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put("bouns_type", "coins");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "bonus_claimed", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"bonus_claimed"
withValues: @{
@"bonus_type": @"coins"
}];
AppsFlyerTracker.shared().trackEvent("bonus_claimed",withValues: [
"bouns_type": "coins"
]);
Dictionary<string, string> BonusClaimedEvent = new Dictionary<string, string>();
BonusClaimedEvent.Add("bouns_type", "coins");
AppsFlyer.trackRichEvent ("bonus_type", BonusClaimedEvent);
eCommerce
电商类应用允许购买者在网上轻松的搜索并购买商品。电商类应用最核心的功能之一是它们能让购买者比价并达成最合适的交易。我们建议您在电商类应用中进行事件追踪。追踪事件能够帮您获取很有价值的信息,知道人们找什么、买什么。
我们建议追踪的事件有搜索、付费、加入购物车和加入愿望清单。通过追踪此事件,您可以:
- 突出显示最受欢迎的类别。
- 看看买家在寻找什么。
- 追踪有多少买家完成了结账。
- 了解有多少买家是回头客, 有多少人只是一次性买家。
完成注册
事件名称:af_complete_registration
目的
完成注册事件的目的是让您追踪有多少用户在完成下载和安装应用之后完成了注册。您可以追踪注册方式,即Facebook, 邮件等。
触发逻辑
在用户成功注册后触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_registration_method | 字符串 | Facebook, Google, email | 用户选择注册的方式 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REGSITRATION_METHOD,"Facebook");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(),AFInAppEventType.COMPLETE_REGISTRATION, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventCompleteRegistration
withValues: @{
AFEventParamRegistrationMethod: @"Facebook"
}];
AppsFlyerTracker.shared().trackEvent(AFEventCompleteRegistration,
withValues: [
AFEventParamRegistrationMethod: "Facebook"
]);
Dictionary<string, string> CompleteRegistrationEvent = new Dictionary<string, string>();
CompleteRegistrationEvent.Add("af_registration_method", "Facebook");
AppsFlyer.trackRichEvent("af_complete_registration", CompleteRegistrationEvent);
登录
事件名称:af_login
目的
登陆事件可以让您追踪有多少用户登陆了他们的账户。通过登录事件, 您可以追踪:
- 有多少用户处于活动状态。
- 什么时间用户最为活跃。
触发逻辑
当用户成功登录时触发此事件。
推荐的属性
该事件发送时可以不带有任何其它属性。
代码示例
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.LOGIN, null);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventLogin withValues: nil];
AppsFlyerTracker.shared().trackEvent(AFEventLogin, withValues: nil);
AppsFlyer.trackRichEvent("af_login", null);
搜索
事件名称: af_search
目的
通过追踪搜索事件您可以了解用户在查找的内容。您还可以了解哪些搜索结果与他们最相关。此外, 您还可以追踪哪些搜索结果会最终导致购买。
触发逻辑
您应该在以下两种情况之一中触发该事件:
- 当用户点击搜索按钮时。
- 当用户进入搜索结果页面时。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_search_string | 字符串 | red dress, running shoes | 搜索词 |
af_content_list | 字符串数组 | 001, 092 | 内容 ID 的列表 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.SEARCH_STRING, "red shoes");
eventValue.put(AFInAppEventParameterName.CONTENT_LIST, new String[] {"001", "092"});
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.SEARCH, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventSearch
withValues: @{
AFEventParamSearchString: @"red shoes",
AFEventParamContentList: @[@"001", @"092"]
}];
AppsFlyerTracker.shared().trackEvent(AFEventSearch, withValues: [
AFEventParamSearchString: "red shoes",
AFEventParamContentList: ["001", "092"]
]);
Dictionary<string, string> SearchEvent = new Dictionary<string, string>();
SearchEvent.Add("af_search_string", "red shoes");
SearchEvent.Add("af_content_list", "['001', '092']");
AppsFlyer.trackRichEvent("af_search", SearchEvent);
内容视图
事件名称: af_content_view
目的
内容浏览 事件能够帮助您追踪特定产品的浏览率。追踪此事件可以帮助您:
- 将产品浏览量与产品销售量相关联。
- 根据产品浏览量了解哪些类别最受欢迎。
- 查看买家币种与他们查看的产品之间的相关性。
触发逻辑
当用户查看特定的产品详细信息页面时, 应触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_price | float | 2000 | 产品价格 |
af_content_id | 字符串 | 102 | 产品ID |
af_content_type | 字符串 | shoes | 产品类别 |
af_currency | 字符串 | THB, USD | 产品详细信息页面中的币种 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 2000);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "102";
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "shoes");
eventValue.put(AFInAppEventParameterName.CURRENCY, "USD");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.CONTENT_VIEW, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventContentView
withValues: @{
AFEventParamPrice: @2000,
AFEventParamContentId: @"102",
AFEventParamContentType: @"shoes",
AFEventParamCurrency: @"USD"
}];
AppsFlyerTracker.shared().trackEvent(AFEventContentView,
withValues: [
AFEventParamPrice: 2000,
AFEventParamContentId: "102",
AFEventParamContentType: "shoes",
AFEventParamCurrency: "USD"
]);
Dictionary<string, string> ContentViewEvent = new Dictionary<string, string>();
ContentViewEvent.Add("af_price", "2000");
ContentViewEvent.Add("af_content_type", "shoes");
ContentViewEvent.Add("af_currency", "USD");
AppsFlyer.trackRichEvent("af_content_view", ContentViewEvent);
列表视图
事件名称: af_list_view
目的
电子商务平台通常会用按类别显示产品列表, 如新添加的产品、相关产品、推荐产品等。列表浏览 事件能够帮您追踪买家查看次数最多的列表。
触发逻辑
每当买家查看某列表时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_content_type | 字符串 | related, recommended, new arrivals | 列表类型 |
af_content_list | 字符串数组 | 001, 092 | 类别中的内容ID列表 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "related products");
eventValue.put(AFInAppEventParameterName.CONTENT_LIST, new String[] {"001", "092"});
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "af_list_view", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventListView
withValues: @{
AFEventParamContentType: @"related products",
AFEventParamContentList: @[@"001", @"092"]
}];
AppsFlyerTracker.shared().trackEvent(AFEventListView,
>withValues: [
AFEventParamContentType: "related products",
AFEventParamContentList: ["001", "092"]
]);
Dictionary<string, string> ListViewEvent = new Dictionary<string, string>();
ListViewEvent.Add("af_content_type", "related products");
ListViewEvent.Add("af_content_list", "['001', '092']");
AppsFlyer.trackRichEvent("af_list_view", ListViewEvent);
添加到愿望清单
事件名称: af_add_to_wishlist
目的
通过追踪 加入愿望清单 事件, 您可以追踪买家添加了哪些产品和类别到他们的愿望清单。当你知道哪些产品经常被添加到愿望清单中时, 你可以在促销或折扣中提供这些产品, 并鼓励买家购买。您还可以根据这些用户添加到他们的愿望列表中的产品向他们进行重定向营销。
触发逻辑
当买家将商品添加到他们的愿望清单时, 触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_price | float | 600 | 产品价格 |
af_content_id | 字符串 | 300 | 产品ID |
af_content_type | 字符串 | shoes, electronics | 产品类别 |
af_currency | 字符串 | GBP | 产品详细信息页中显示的币种 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 600);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "300");
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "electronics");
eventValue.put(AFInAppEventParameterName.CURRENCY, "GBP");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.ADD_TO_WISH_LIST, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventAddToWishlist
withValues: @{
AFEventParamPrice: @600,
AFEventParamContentId: @"300",
AFEventParamContentType: @"electronics",
AFEventParamCurrency: @"GBP"
}];
AppsFlyerTracker.shared().trackEvent(AFEventAddToWishlist,
withValues: [
AFEventParamPrice: 600,
AFEventParamContentId: "300",
AFEventParamContentType: "electronics",
AFEventParamCurrency: "GBP"
]);
Dictionary<string, string> AddToWishListEvent =
new Dictionary<string, string>();
AddToWishListEvent.Add("af_price", "600");
AddToWishListEvent.Add("af_content_id", "300");
AddToWishListEvent.Add("af_content_type", "electronics");
AddToWishListEvent.Add("af_currency", "GBP");
AppsFlyer.trackRichEvent("af_add_to_wishlist", AddToWishListEvent);
添加到购物车
事件名称: af_add_to_cart
目的
加入购物车 事件的目的是用来追踪将产品加入购物车的行为。通过跟踪此事件, 您可以:
- 查看买家平均每次购买会加入多少产品到购物车。
- 查看两个不同产品被加入购物车的时间间隔。
- 查看有多少买家最终放弃了他们的购物车。
触发逻辑
当买家将产品添加到购物车时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_price | float | 350, 1000 | 产品价格 |
af_content_id | 字符串 | 001, 092 | 产品ID |
af_content_type | 字符串 | shirt, shoes | 产品类型 |
af_currency | 字符串 | THB, USD | 产品币种 |
af_quantity | float | 2, 5 | 同一产品的多少个商品被添加到购物车 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 350);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "001");
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "shirt");
eventValue.put(AFInAppEventParameterName.CURRENCY, "USD");
eventValue.put(AFInAppEventParameterName.QUANTITY, 2);
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.ADD_TO_CART, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventAddToCart
withValues: @{
AFEventParamPrice: @350,
AFEventParamContentId: @"001",
AFEventParamContentType: @"shirt",
AFEventParamCurrency: @"USD",
AFEventParamQuantity: @2
}];
AppsFlyerTracker.shared().trackEvent(AFEventAddToCart, withValues: [
AFEventParamPrice: 350,
AFEventParamContentId: "001",
AFEventParamContentType: "shirt",
AFEventParamCurrency: "USD",
AFEventParamQuantity: 2
]);
Dictionary<string, string> AddToCartEvent = new Dictionary<string, string>();
AddToCartEvent.Add("af_price", "350");
AddToCartEvent.Add("af_content_id", "001");
AddToCartEvent.Add("af_content_type", "shirt");
AddToCartEvent.Add("af_currency", "USD");
AddToCartEvent.Add("af_quantity", "2");
AppsFlyer.trackRichEvent("af_add_to_cart", AddToCartEvent);
发起的结账
事件名称:af_initiated_checkout
目的
追踪 准备结账 事件能够帮您了解买家在结账过程中的行为。例如, 您可以:
- 查看买家结账时的平均价格, 并将其与购买事件中的平均价格进行比较。
- 查看用户在继续结账后是否添加或删除产品。
触发逻辑
当买家准备结账但并没有最终完成付款时触发此事件。
推荐的属性
提示
如果有多个来自不同类别的产品, 请使用数组发送数据。
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_price | float | 4000 | 购物车中的总价 |
af_content_id | 字符串或字符串数组 | 221, 124 | 购物车中产品的 ID |
af_content_type | 字符串或字符串数组 | shirt, pants | 产品类别列表 |
af_currency | 字符串 | THB | 结帐时的货币 |
af_quantity | 数字或数组 | 2, 5 | 购物车商品总数 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 350);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "221");
// for multiple product categories, set the param value as: new String {"221", "124"}
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "shirt");
// for multiple product categories,, set the param value as: new String {"shirt", "pants"}
eventValue.put(AFInAppEventParameterName.CURRENCY, "USD");
eventValue.put(AFInAppEventParameterName.QUANTITY, 2);
// for multiple product categories,, set the param value as: new int {2, 5}
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.INITIATED_CHECKOUT, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventInitiatedCheckout
withValues: @{
AFEventParamPrice: @350,
AFEventParamContentId: @"221",
// for multiple product categories, set the param value as: @[@"221", @"124"]
AFEventParamContentType: @"shirt",
// for multiple product categories, set the param value as: @[@"shirt", @"pants"]
AFEventParamCurrency: @"USD",
AFEventParamQuantity: @2
// for multiple product categories, set the param value as: @[@2, @5]
}];
AppsFlyerTracker.shared().trackEvent(AFEventInitiatedCheckout,
withValues: [AFEventParamPrice: 350,
AFEventParamContentId: "221",
// for multiple product categories, set the param value as: ["221", "124"]*/
AFEventParamContentType: "shirt",
// for multiple product categories, set the param value as: ["shirt", "pants"] AFEventParamCurrency: "USD",
AFEventParamQuantity: 2
//for multiple product categories, set the param value as: [2, 5]
]);
Dictionary<string, string> InitiatedCheckoutEvent = new Dictionary<string, string>();
InitiatedCheckoutEvent.Add("af_price", "350");
InitiatedCheckoutEvent.Add("af_content_id", "001");
InitiatedCheckoutEvent.Add("af_content_type", "shirt");
InitiatedCheckoutEvent.Add("af_currency", "USD");
InitiatedCheckoutEvent.Add("af_quantity", "2");
AppsFlyer.trackRichEvent ("af_initiated_checkout", InitiatedCheckoutEvent);
购买
事件名称: af_purchase
目的
购买 事件是电商类中最重要的事件之一。追踪 购买 事件可以让您了解在您电商App中的购买趋势。通过追踪 购买 事件,您可以:
- 查看总体上有多少用户是实际买家。
- 跟踪最活跃的买家, 并根据他们的购买历史进行重定向营销。
- 了解哪些产品和类别在整体消费方面表现良好。
- 追踪跨产品和跨类别的总消费额。
- 追踪跨营销活动和跨渠道的总消费额。
触发逻辑
当买家完成购买但还不一定付款时, 触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_revenue | float | 1200 | 购买收入 |
af_price | float | 4000 | 总购买额 |
af_content_id | 字符串 | 121, 262 | Item ID |
af_content_type | 字符串 | shoes, pants | 商品类别 |
af_currency | 字符串 | AUD | currency |
af_quantity | int | 2, 5 | 购物车中的商品数量 |
af_order_id | 字符串 | X123ABC | 购买后生成的订单 ID。 |
af_receipt_id | 字符串 | X123ABC | 订单ID,但需要 CRITEO 和 Google AdWords 的重定向营销对接。 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 350);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "221");
// for multiple product categories, set the param value as: // new String {"221", "124"}
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "shirt");
// for multiple product categories,, set the param value as: new String {"shoes", "pants"}
eventValue.put(AFInAppEventParameterName.CURRENCY, "USD");
eventValue.put(AFInAppEventParameterName.QUANTITY, 2);
// for multiple product categories, set the param value as: new int {2, 5}
eventValue.put(AFInAppEventParameterName.RECEIPT_ID, "X123ABC");
eventValue.put("af_order_id", "X123ABC");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.PURCHASE, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventPurchase
withValues: @{
AFEventParamRevenue: @1200,
AFEventParamPrice: @4000,
AFEventParamContentId: @"221",
// for multiple product categories, set the param value as:
// @[@"221", @"124"]
AFEventParamContentType: @"shirt",
// for multiple product categories, set the param value as:
// @[@"shoes", @"pants"]
AFEventParamCurrency: @"USD",
AFEventParamQuantity: @2,
// for multiple product categories, set the param value as:
// @[@2, @5]
AFEventParamOrderId: @"X123ABC",
AFEventParamReceiptId: @"X123ABC"
}];
AppsFlyerTracker.shared().trackEvent(AFEventPurchase, withValues: [
AFEventParamRevenue: 1200,
AFEventParamPrice: 4000,
AFEventParamContentId: "221",
// for multiple product categories, set the param value as: ["221", "124"],
AFEventParamContentType: "shirt",
// for multiple product categories, set the param value as: ["shoes", "pants"]
AFEventParamCurrency: "USD",
AFEventParamQuantity: 2,
// for multiple product categories, set the param value as: [2, 5]
AFEventParamOrderId: "X123ABC",
AFEventParamReceiptId: "X123ABC"
]);
Dictionary<string, string> PurchaseEvent = new Dictionary<string, string>();
PurchaseEvent.Add("af_revenue", "1200");
PurchaseEvent.Add("af_price", "4000");
PurchaseEvent.Add("af_content_id", "121");
// for multiple product categories, set the param value as: ["221", "124"]
PurchaseEvent.Add("af_content_type", "shoes");
// for multiple product categories, set the param value as: ["shirt", "pants"]
PurchaseEvent.Add("af_currency", "USD");
PurchaseEvent.Add("af_quantity", "2");
// for multiple product categories, set the param value as: [2, 5]
PurchaseEvent.Add("af_order_id", "X123ABC");
PurchaseEvent.Add("af_receipt_id", "X123ABC");
AppsFlyer.trackRichEvent ("af_purchase", PurchaseEvent);
已完成购买
事件名称: completed_purchase
目的
追踪 已完成购买 事件能够帮您分析有多少购买是全额付款。
触发逻辑
当一个用户为消费付费时,该事件可以通过S2S传送,因为此事件是在后台发生的。
重要信息!
如果在线下付款, 即银行转账或货到付款, 则应发送此事件。如果发送此事件, 请确保购买事件 (af_purchase
) 不包含 af_revenue
参数。如果两个事件的发送都使用了 af_revenue
参数, 则收入将增加一倍。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_revenue | float | 4000 | 购买产生的收入 |
af_order_id | 字符串 | X123ABC | 购买生成的订单ID |
af_receipt_id | 字符串 | X123ABC | 买家生成的收据ID |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REVENUE, 4000);
eventValue.put(AFInAppEventParameterName.RECEIPT_ID, "X123ABC");
eventValue.put("af_order_id" "X123ABC");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "completed_purchase", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"completed_purchase"
withValues: @{
AFEventParamRevenue: @4000,
AFEventParamOrderId: @"X123ABC",
AFEventParamReceiptId: @"X123ABC"
}];
AppsFlyerTracker.shared().trackEvent("completed_purchase", withValues: [
AFEventParamRevenue: 4000,
AFEventParamOrderId: "X123ABC",
AFEventParamReceiptId: "X123ABC"
]);
Dictionary<string, string> CompletedPurchaseEvent = new Dictionary<string, string>();
CompletedPurchaseEvent.Add("af_revenue", "1200");
CompletedPurchaseEvent.Add("af_order_id", "X123ABC");
CompletedPurchaseEvent.Add("af_receipt_id", "X123ABC");
AppsFlyer.trackRichEvent ("completed_purchase", CompletedPurchaseEvent);
从购物车移除
事件名称: remove_from_cart
目的
通过追踪 从购物车移除 ,您可以:
- 查看买家从购物车中删除的物品。
- 查看买家从购物车中删除的商品的产品类别。
- 比较从添加到购物车事件获取的数据,以深入了解那些没有最终被结账的产品。
触发逻辑
当买家从购物车中删除项目时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_content_id | 字符串 | 521 | 商品或产品 ID |
af_content_type | 字符串 | shoes | 商品或产品类别 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "521");
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "shoes");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "remove_from_cart", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"remove_from_cart"
withValues: @{
AFEventParamContentId: @"521",
AFEventParamContentType: @"shoes",
}];
AppsFlyerTracker.shared().trackEvent("remove_from_cart", withValues: [
AFEventParamContentId: "521",
AFEventParamContentType: "shoes",
]);
Dictionary<string, string> RemoveFromCartEvent = new Dictionary<string, string>();
RemoveFromCartEvent.Add("af_content_id", "521");
RemoveFromCartEvent.Add("af_content_type", "shoes");
AppsFlyer.trackRichEvent ("remove_from_cart", RemoveFromCartEvent);
首次购买
事件名称: first_purchase
目的
该事件和 购买 事件相同。但是,和 购买 事件不同的是, 首次购买 事件可用于:
- 了解新买家需要多长时间完成购买。
- 了解新买家喜欢购买什么商品。
- 了解新买家首次购买的平均价格和收入。
触发逻辑
当用户完成首次购买时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_revenue | float | 1200 | 购买收入 |
af_price | float | 4000 | 总购买额 |
af_content_id | 字符串 | 121, 262 | Item ID |
af_content_type | 字符串 | shoes, pants | 商品类别 |
af_currency | 字符串 | AUD | currency |
af_quantity | int | 2, 5 | 购物车中的商品数量 |
af_order_id | 字符串 | X123ABC | 购买后生成的订单 ID。 |
af_receipt_id | 字符串 | X123ABC | 订单ID,但需要 CRITEO 和 Google AdWords 的重定向营销对接。 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 350);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "221");
// for multiple product categories, set the param value as: new String {"221", "124"}
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "shirt");
// for multiple product categories set the param value as: new String {"shoes", "pants"}
eventValue.put(AFInAppEventParameteName.CURRENCY, "USD");
eventValue.put(AFInAppEventParameterName.QUANTITY, 2);
// for multiple product categories, set the param value as: new int {2, 5}
eventValue.put(AFInAppEventParameterName.RECEIPT_ID, "X123ABC");
eventValue.put("af_order_id", "X123ABC");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "first_purchase", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:("first_purchase")
withValues: @{
AFEventParamRevenue: @1200,
AFEventParamPrice: @4000,
AFEventParamContentId: @"221",
// for multiple product categories, set the param value as: @[@"221", @"124"]
AFEventParamContentType: @"shirt",
// for multiple product categories, set the param value as: @[@"shoes", @"pants"]
AFEventParamCurrency: @"USD",
AFEventParamQuantity: @2,
// for multiple product categories, set the param value as: @[@2, @5]
AFEventParamOrderId: @"X123ABC",
AFEventParamReceiptId: @"X123ABC"
}];
AppsFlyerTracker.shared().trackEvent("first_purchase", withValues: [
AFEventParamRevenue: 1200,
AFEventParamPrice: 4000,
AFEventParamContentId: "221",
// for multiple product categories, set the param value as: ["221", "124"]
AFEventParamContentType: "shirt",
// for multiple product categories, set the param value as: ["shoes", "pants"]
AFEventParamCurrency: "USD",
AFEventParamQuantity: 2,
// for multiple product categories, set the param value as: // [2, 5]
AFEventParamOrderId: "X123ABC",
AFEventParamReceiptId: "X123ABC"
]);
Dictionary<string, string> FirstPurchaseEvent = new Dictionary<string, string>();
FirstPurchaseEvent.Add("af_revenue", "1200");
FirstPurchaseEvent.Add("af_price", "4000");
FirstPurchaseEvent.Add("af_content_id", "121");
// for multiple product categories, set the param value as: ["221", "124"]
FirstPurchaseEvent.Add("af_content_type", "shoes");
// for multiple product categories, set the param value as: ["shirt", "pants"]
FirstPurchaseEvent.Add("af_currency", "USD");
FirstPurchaseEvent.Add("af_quantity", "2");
// for multiple product categories, set the param value as: [2, 5]
FirstPurchaseEvent.Add("af_order_id", "X123ABC");
FirstPurchaseEvent.Add("af_receipt_id", "X123ABC");
AppsFlyer.trackRichEvent ("first_purchase", FirstPurchaseEvent);
娱乐类 - 流媒体
随着用户对点播内容的需求不断增长, 流媒体应用市场的竞争变得异常激烈。如果您管理和运营一个以点播内容为主的流媒体 App,建议您在您的 App 内做事件的追踪。
提示
此处讨论的事件也与在智能电视上运行的流媒体应用相关, 例如:
- 安卓智能电视
- 苹果电视 (tvOS)
- amazon fire tv
通过追踪流媒体应用中的事件, 您可以:
- 查看用户消费的内容。
- 根据内容需求分析和优化营销活动。
- 测量用户参与度和使用情况。
事件名称:af_complete_registration
目的
完成注册事件的目的是让您追踪有多少用户在完成下载和安装应用之后完成了注册。您可以追踪注册方式,即Facebook, email 等,来了解用户倾向的注册方式。
触发逻辑
在用户成功注册后触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_registration_method | 字符串 | Facebook, Google, email | 用户选择注册的方式 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REGSITRATION_METHOD, "Facebook");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.COMPLETE_REGISTRATION, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventCompleteRegistration
withValues: @{
AFEventParamRegistrationMethod: @"Facebook"
}];
AppsFlyerTracker.shared().trackEvent(AFEventCompleteRegistration,
withValues: [
AFEventParamRegistrationMethod: "Facebook"
]);
Dictionary<string, string> CompleteRegistrationEvent = new Dictionary<string, string>();
CompleteRegistrationEvent.Add("af_registration_method", "Facebook");
AppsFlyer.trackRichEvent("af_complete_registration", CompleteRegistrationEvent);
事件名称:af_login
目的
登陆事件可以让您追踪有多少用户登陆了他们的账户。通过登录事件, 您可以追踪:
- 有多少用户处于活动状态。
- 什么时间用户最为活跃。
触发逻辑
当用户成功登录时触发此事件。
推荐的属性
该事件发送时可以不带有任何其它属性。
代码示例
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.LOGIN, null);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventLogin withValues: nil];
AppsFlyerTracker.shared().trackEvent(AFEventLogin, withValues: nil);
AppsFlyer.trackRichEvent("af_login", null);
事件名称: af_start_trial
目的
许多流媒体服务为用户提供了一个探索高级功能的试用期。通过追踪 开始试用 事件,您可以:
- 查看有多少用户选择试用。
- 如果试用是促销活动或与合作伙伴协议的一部分, 则可以追踪是什么促销活动致使用户激活试用期。
触发逻辑
当用户选择并激活试用期时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
trial_method | 字符串 | free with new phone, free with carrier, promotion, coupon code | 激活试用的方式 |
trial_method_identifier | 字符串 |
name of carrier i.e.Vodafone, 合作伙伴名称,如 Facebook, 优惠码如TRA123 |
试用方式的标识符 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put("trial_method", "coupon code");
eventValue.put("trial_method_identifier", "TRA123");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.START_TRIAL, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventStartTrial
withValues: @{
@"trial_method": @"coupon code",
@"trial_method_identifier": @"TRA123"
}]
AppsFlyerTracker.shared().trackEvent(AFEventStartTrial,
withValues: [
"trial_method": "coupon code",
"trial_method_identifier": "TRA123"
]);
Dictionary<string, string> SubscriptionTrial = new Dictionary<string, string>();
SubscriptionTrial.Add("trial_method ", "coupon code");
SubscriptionTrial.Add("trial_method_identifier", "TRA123");
AppsFlyer.trackRichEvent("af_start_trial", SubscriptionTrial);
事件名称: af_subscribe
目的
订阅是流媒体服务的核心。通过追踪用户订阅事件, 您可以:
- 查看哪些活动带来了订阅用户。
- 将试用中的用户数与订阅的用户进行比较。
- 追踪从订阅产生的收入并将其归因到营销活动和媒体渠道。
触发逻辑
在以下两种情况之一触发此事件:
- 当用户成功订阅时。
- 续订订阅时。
提示
请参阅我们的 订阅追踪指南 来了解更多信息。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
new_subscription | 布尔 | 真/假 | 订阅是新定还是续订 |
af_coupon_code | 字符串 | 3MonthsSubscription | 订阅使用的优惠券代码 |
coupon_code_value | 字符串 | 10% | 优惠券的优惠差额 |
af_revenue | float | 5 | 与订阅相关联的收入 |
af_currency | 字符串 | USD | 订阅付款的币种 |
subscription_method | 字符串 | credit card, e-wallet, PayPal | 订阅中使用的付款方式 |
expiration_date | 字符串 | 2018/07/18 | 预计购买收入 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put("new_subscription", true);
eventValue.put(AFInAppEventParameterName.COUPON_CODE, "3MonthsSubscription");
eventValue.put("coupon_code_value", "10%");
eventValue.put(AFInAppEventParameterName.REVENUE, 5);
eventValue.put(AFInAppEventParameterName.CURRENCY, "USD");
eventValue.put("subscription_method", "");
eventValue.put("expiration_date", "2018/07/18");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.SUBSCRIBE, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventSubscribe
withValues: @{
@"new_subscription": @TRUE,
AFEventParamCouponCode: @"3MonthsSubscription",
@"coupon_code_value": @"10%",
AFEventParamRevenue: @5,
AFEventParamCurrency: @"USD",
@"subscription_method": @"",
@"expiration_date": @"2018/07/18"
}];
AppsFlyerTracker.shared().trackEvent(AFEventSubscribe,
withValues: [
"new_subscription": true,
AFEventParamCouponCode: "3MonthsSubscription",
"coupon_code_value": "10%",
AFEventParamRevenue: 5,
AFEventParamCurrency: "USD",
"subscription_method": "",
"expiration_date": "2018/07/18"
]);
Dictionary<string, string> Subscription = new Dictionary<string, string>();
Subscription.Add("new_subscription", "true");
Subscription.Add("af_coupon_code", "3MonthsSubscription");
Subscription.Add("coupon_code_value", "10%");
Subscription.Add("af_revenue", "5");
Subscription.Add("af_currency", "USD");
Subscription.Add("subscription_method", "");
Subscription.Add("expiration_date", "2018/07/18");
AppsFlyer.trackRichEvent("af_subscribe", Subscription);
事件名称: media_play
目的
追踪 媒体播放 事件用来追踪用户播放您提供的媒体的事件。这样的媒体可以是视频、音乐、电视节目、广播节目等。如果提供多种类型的媒体, 则可以跟踪不同媒体和内容类型之间的播放比率。例如, 您可以查看用户播放的音乐是否多于播放视频。您还可以查看用户观看的电视节目是否多于观看电影的节目。此外, 通过跟踪媒体播放事件, 您可以:
- 按类型和内容追踪媒体消费。
- 查看最流行的流媒体内容的语言。
- 查看流媒体内容的最小、最大和平均持续时间。
触发逻辑
在流媒体内容的预定义数 (即 2分钟) 后触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_content_type | 字符串 | tv show, music | 流媒体内容的类型 |
af_content_id | 字符串 | 092, E34 | 流媒体内容的ID |
af_content | 字符串 | Title of content | 内容的标题, 即歌曲名称或电视节目的标题和集目 |
media_duration | float | 5 | 运行时间 |
language | 字符串 | en-us, fr, es | 内容的语言 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "tv show");
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "E34");
eventValue.put(AFInAppEventParameterName.CONTENT, "My Show");
eventValue.put("media_duration", 5);
eventValue.put("language", "en-us");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "media_play", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"media_play"
withValues: @{
AFEventParamContentType: @"tv show",
AFEventParamContentId: @"E34",
AFEventParamContent: @"My Show",
@"duration": @5,
@"langague": @"en-us"
}];
AppsFlyerTracker.shared().trackEvent("media_play",
withValues: [
AFEventParamContentType: "tv show",
AFEventParamContentId: "E34",
AFEventParamContent: "My Show",
"media_duration": 5,
"language": "en-us"
]);
Dictionary<string, string> MediaPlay = new Dictionary<string, string>();
MediaPlay.Add("af_content_type", "tv show");
MediaPlay.Add("af_content_id", "E34");
MediaPlay.Add("af_content", "My show");
MediaPlay.Add("media_duration", "5");
MediaPlay.Add("language", "en-us");
AppsFlyer.trackRichEvent("media_play", MediaPlay);
事件名称: minutes_consumed
目的
已消费分钟数指的是用户消费指定内容的分钟数。这是仅次于收入指标,在流媒体行业内最重要的一个指标了。该指标十分重要,主要是因为它让您衡量了用户使用该服务的总量。它还能让您了解该服务的整体使用率和哪些内容是最受欢迎的。通过追踪 已消费分钟数 事件分钟,您可以:
- 查看哪些是您服务的重度用户,而哪些不是。
- 了解哪些媒体类型和内容类型很受欢迎。
触发逻辑
在以下两种情况之一触发此事件:
- 当用户完成一个流媒体项目时。
- 当用户退出一个流媒体项目时。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
minutes_consumed | float | 3 | 预计购买收入 |
af_content_type | 字符串 | tv show, music | 流媒体内容的类型 |
af_content_id | 字符串 | 092, E34 | 流媒体内容的ID |
af_content | 字符串 | Title of content | 内容的标题, 即歌曲名称或电视节目的标题和集目 |
media_duration | float | 5 | 运行时间 |
language | 字符串 | en-us, fr, es | 内容的语言 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "tv show");
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "E34");
eventValue.put(AFInAppEventParameterName.CONTENT, "My Show");
eventValue.put("media_duration", 5);
eventValue.put("language", "en-us");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(),"media_minutes", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"media_minutes"
withValues: @{
@"minutes_consumed": @3,
AFEventParamContentType: @"tv show",
AFEventParamContentId: @"E34",
AFEventParamContent: @"My Show",
@"duration": @5,
@"langague": @"en-us"
}];
AppsFlyerTracker.shared().trackEvent("media_minutes", withValues: [
"minutes_consumed": 3,
AFEventParamContentType: "tv show",
AFEventParamContentId: "E34",
AFEventParamContent: "My Show",
"media_duration": 5,
"language": "en-us"
]);
Dictionary<string, string> MediaMinutes =
new Dictionary<string, string>();
MediaMinutes.Add("minutes_consumed", "3");
MediaMinutes.Add("af_content_type", "tv show");
MediaMinutes.Add("af_content_id", "E34");
MediaMinutes.Add("af_content", "My show");
MediaMinutes.Add("media_duration", "5");
MediaMinutes.Add("language", "en-us");
AppsFlyer.trackRichEvent("media_minutes", MediaMinutes);
事件名称: media_downloaded
目的
追踪已下载媒体可以帮助您凸显用户的喜好。您可以追踪媒体播放和媒体下载,并对比这两者。您可以查看哪些媒体内容用户喜欢在线流式播放而哪些媒体内容用户更倾向下载。
触发逻辑
当用户开始下载媒体时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_content_type | 字符串 | tv show, music | 内容类型 |
af_content_id | 字符串 | 092, E34 | 内容ID |
af_content | 字符串 | Title of content | 内容的标题, 即歌曲名称或电视节目的标题和集目 |
media_duration | float | 5 | 运行时间 |
language | 字符串 | en-us, fr, es | 内容的语言 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "tv show");
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "E34");
eventValue.put(AFInAppEventParameterName.CONTENT, "My Show");
eventValue.put("media_duration", 5);
eventValue.put("language", "en-us");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "media_downloaded", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"media_downloaded"
withValues: @{
@"minutes_consumed": @3,
AFEventParamContentType: @"tv show",
AFEventParamContentId: @"E34",
AFEventParamContent: @"My Show",
@"duration": @5,
@"langague": @"en-us"
}];
AppsFlyerTracker.shared().trackEvent("media_downloaded",
withValues: [
"minutes_consumed": 3,
AFEventParamContentType: "tv show",
AFEventParamContentId: "E34",
AFEventParamContent: "My Show",
"media_duration": 5,
"language": "en-us"
]);
Dictionary<string, string> MediaDownloaded = new Dictionary<string, string>();
MediaDownloaded.Add("minutes_consumed", "3");
MediaDownloaded.Add("af_content_type", "tv show");
MediaDownloaded.Add("af_content_id", "E34");
MediaDownloaded.Add("af_content", "My show");
MediaDownloaded.Add("media_duration", "5");
MediaDownloaded.Add("language", "en-us");
AppsFlyer.trackRichEvent("media_downloaded", MediaDownloaded);
事件名称: media_saved
目的
追踪保存的媒体能够帮助您凸显用户喜好。
触发逻辑
当媒体被保存在用户设备上时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_content_type | 字符串 | tv show, music | 内容类型 |
af_content_id | 字符串 | 092, E34 | 内容ID |
af_content | 字符串 | Title of content | 内容的标题, 即歌曲名称或电视节目的标题和集目 |
media_duration | float | 5 | 运行时间 |
language | 字符串 | en-us, fr, es | 内容的语言 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "tv show");
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "E34");
eventValue.put(AFInAppEventParameterName.CONTENT, "My Show");
eventValue.put("media_duration", 5);
eventValue.put("language", "en-us");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "media_saved", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"media_saved"
withValues: @{
@"minutes_consumed": @3,
AFEventParamContentType: @"tv show",
AFEventParamContentId: @"E34",
AFEventParamContent: @"My Show",
@"duration": @5,
@"langague": @"en-us"
}];
AppsFlyerTracker.shared().trackEvent("media_saved",
withValues: [
"minutes_consumed": 3,
AFEventParamContentType: "tv show",
AFEventParamContentId: "E34",
AFEventParamContent: "My Show",
"media_duration": 5,
"language": "en-us"]);
Dictionary<string, string> MediaSaved = new Dictionary<string, string>();
MediaSaved.Add("minutes_consumed", "3");
MediaSaved.Add("af_content_type", "tv show");
MediaSaved.Add("af_content_id", "E34");
MediaSaved.Add("af_content", "My show");
MediaSaved.Add("media_duration", "5");
MediaSaed.Add("language", "en-us");
AppsFlyer.trackRichEvent("media_saved", MediaSaved);
Fintech - P2P Lending
P2P (点对点) 贷款是个人和企业相互借贷的一种新方式。
建议您在 P2P 贷款应用中追踪事件:
- 您可以追踪个人贷款人和借款人的活动情况。
- 您可以了解人们提供哪种类型的贷款, 而与之相对的还有借款人更感兴趣哪些贷款。
- 您可以收集贷款的平均、最低和最大金额这些指标。
- 您可以追踪贷款接受率和拒绝率。
通过从事件跟踪中收集到此类数据, 您可以筛选出值得信赖的借款人, 并为他们提供更好的利率。同样, 你可以看到谁是最活跃的贷款者, 并向他们提供更低的费用。此外, 一旦您知道哪些类型的贷款最受用户欢迎, 您就可以发起针对此类受众群体的营销活动。
事件名称: registration_submitted
目的
由于 P2P 贷款容易被滥用, 用户必须首先验证其身份。他们通过提交注册申请来做到这一点。追踪 提交注册 事件,您可以:
- 追踪有多少用户注册了, 但从未验证其帐户。
- 查看注册渠道(邮件、Facebook、Google)和账户验证率的关联程度。
触发逻辑
在用户提交注册到 P2P 服务的请求后触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_registration_method | 字符串 | email, Facebook, Google | 用户选择的哪种注册渠道或者社交注册类型 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REGSITRATION_METHOD, "Facebook");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "registration_submitted", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"registration_submitted"
withValues: @{
AFEventParamRegistrationMethod: @"Facebook",
}];
AppsFlyerTracker.shared().trackEvent("registration_submitted",
withValues: [
AFEventParamRegistrationMethod: "Facebook"
]);
Dictionary<string, string> RegistrationSubmitted = new Dictionary<string, string>();
RegistrationSubmitted.Add("af_registration_method", "Facebook");
AppsFlyer.trackRichEvent("registration_submitted", RegistrationSubmitted);
事件名称:af_complete_registration
目的
追踪 完成注册 事件能够帮您查看有多少用户注册后实际完成了身份验证。您可以将这些用户归因到营销活动中, 并查看哪些活动生成了活跃用户。
触发逻辑
在用户注册被批准时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_registration_method | 字符串 | 用户选择的哪种注册渠道或者社交注册类型 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REGSITRATION_METHOD, "Facebook");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.COMPLETE_REGISTRATION, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventCompleteRegistration
withValues: @{
AFEventParamRegistrationMethod: @"Facebook"
}];
AppsFlyerTracker.shared().trackEvent(AFEventCompleteRegistration,
withValues: [
AFEventParamRegistrationMethod: "Facebook"
]);
Dictionary<string, string> CompleteRegistration = new Dictionary<string, string>();
CompleteRegistration.Add("af_registration_method", "Facebook");
AppsFlyer.trackRichEvent("af_complete_registration", CompleteRegistration);
事件名称: fill_loan_form_<FORM_NAME>
目的
借款人需要填写几份表格才能申请贷款。您可以追踪由潜在借款人填写的表格, 以查看放弃率。除了放弃率, 你还可以向这些最终差一个表格就完成他们贷款申请的借款人进行重定向营销。当您发送该事件时,请在事件名称中包含表哥名称。
触发逻辑
每当借款人提交表格时触发此事件。
推荐的属性
您可以发送此事件, 而无需其他属性。
注意
强烈建议您将贷款与贷款人联系起来。为此, 请确保设置客户的用户 id。设置客户的用户id可以将贷款人和您 AppsFlyer 中显示的 app 用户相匹配。通过设置客户的用户 id, 您可以确保任何事件都将伴随客户的用户 id 一起发送。
代码示例
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "fill_loan_form_FORM_NAME", null);
[[AppsFlyerTracker sharedTracker] trackEvent:@"fill_loan_formFORM_NAME"
withValues: nil];
AppsFlyerTracker.shared().trackEvent("fill_loan_form_FORM_NAME",
withValues: nil);
AppsFlyer.trackRichEvent("fill_loan_form_FORM_NAME",null);
事件名称: submit_loan_application
目的
此事件的目的是帮助您追踪贷款申请。通过追踪提交贷款申请事件您可以:
- 追踪应用内的贷款申请总数。
- 了解贷款申请中的最高、最低和平均金额。
- 查看人们申请的贷款类型。
触发逻辑
当用户成功提交贷款申请时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
loan_id | 字符串 | 1735102 | 贷款的ID |
loan_amount | float | 1000 | 所要求金额 |
loan_type | 字符串 | 3 months | 贷款期 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put("loan_id", "1735102");
eventValue.put("loam_amount", 1000);
eventValue.put("loan_type", "3 months");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(),"submit_loan_application", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"submit_loan_application"
withValues: @{
@"loan_id": @"1735102",
@"loan_amount": @1000,
@"loan_type": @"3 months"
}];
AppsFlyerTracker.shared().trackEvent("submit_loan_applications",
withValues: [
"loan_id": "1735102",
"loan_amount": 1000,
"loan_type": "3 months"
]);
Dictionary<string, string> SubmitLoanApplication = new Dictionary<string, string>();
SubmitLoanApplication.Add("loan_id", "1735102");
SubmitLoanApplication.Add("loan_amount", "1000");
SubmitLoanApplication.Add("loan_type", "3 months");
AppsFlyer.trackRichEvent("submit_loan_application", SubmitLoanApplication);
事件名称: loan_accepted
目的
通过追踪 接受贷款 事件,您可以了解贷款趋势和其它指标:
- 您可以查看那种贷款类型被接受了。
- 您可以查看被接受贷款的所要求金额。
- 您可以查看贷款人接受最多的贷款,是什么类型、什么金额。
触发逻辑
当贷款被接受时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
loan_id | 字符串 | 1735102 | 贷款的ID |
loan_amount | float | 1000 | 所要求金额 |
loan_type | 字符串 | 3 months | 贷款期 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put("loan_id", "1735102");
eventValue.put("loam_amount", 1000);
eventValue.put("loan_type", "3 months");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(),"loan_accepted" , eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"loan_accepted"
withValues: @{
@"loan_id": @"1735102",
@"loan_amount": @1000,
@"loan_type": @"3 months"
}];
AppsFlyerTracker.shared().trackEvent("loan_accepted",
withValues: [
"loan_id": "1735102",
"loan_amount": 1000,
"loan_type": "3 months"
]);
Dictionary<string, string> LoanAccepted = new Dictionary<string, string>();
LoanAccepted.Add("loan_id", "1735102");
LoanAccepted.Add("loan_amount", "1000");
LoanAccepted.Add("loan_type", "3 months");
AppsFlyer.trackRichEvent("loan_accepted", LoanAccepted);
事件名称: loan_rejected
目的
追踪拒绝贷款事件可以帮助您了解贷款拒绝的原因。您可以查看贷款的金额跟周期与拒贷率的相关性。您还可以对这些贷款被拒的用户进行重定向营销,向他们推荐额度更小的贷款项目。
触发逻辑
当贷款人拒绝放款时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
load_id | 字符串 | 1735102 | 贷款的ID |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put("loan_id", "1735102");
eventValue.put("loam_amount", 1000);
eventValue.put("loan_type", "3 months");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(),loan_rejected" , eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"loan_rejected"
withValues: @{
@"loan_id": @"1735102",
@"loan_amount": @1000,
@"loan_type": @"3 months"
}];
AppsFlyerTracker.shared().trackEvent("loan_rejected", withValues: [
"loan_id": "1735102",
"loan_amount": 1000,
"loan_type": "3 months"
]);
Dictionary<string, string> LoanRejected = new Dictionary<string, string>();
LoanRejected.Add("loan_id", "1735102");
LoanRejected.Add("loan_amount", "1000");
LoanRejected.Add("loan_type", "3 months");
AppsFlyer.trackRichEvent("loan_rejected", LoanRejected);
事件名称: payment
目的
追踪付款事件可以帮助您标记出值得信赖的借款人。值得信赖的借款人是那些履行其贷款义务的借款人。您可以将借款人归因到渠道推广活动, 以便了解哪些渠道活带来了值得信赖的借款人。追踪该事件能够帮您收集有关付款的最低、最大和平均金额的数据。
触发逻辑
每当用户为其贷款付款时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
loan_id | 字符串 | 1735102 | 贷款的ID |
payment_amount | float | 100 | 支付的金额 |
payment_id | 字符串 | AE12SF | 付款的 id |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put("loan_id", "1735102");
eventValue.put("payment_amount", 100);
eventValue.put("payment_id", "AE12SF");
AppsFlyerLib.getInstance().trackEvent(
getApplicationContext(),
"payment" , eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"payment"
withValues: @{
@"loan_id": @"1735102",
@"payment_amount": @100,
@"payment_id": @"AE12SF"
}];
AppsFlyerTracker.shared().trackEvent("payment",
withValues: [
"loan_id": "1735102",
"payment_amount": 100,
"payment_id": "AE12SF"
]);
Dictionary<string, string> Payment = new Dictionary<string, string>();
Payment.Add("loan_id", "1735102");
Payment.Add("payment_amount", "100");
Payment.Add("payment_id", "AE12SF");
AppsFlyer.trackRichEvent("payment", Payment);
事件名称: payment_completed
目的
追踪完成付款事件能帮您标注出那些履行贷款义务的借款人。您可以对此类借款人进行重定向营销,并为他们提供更低的利息费和其它促销优惠。
触发逻辑
当贷款全部偿还时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
loan_id | 字符串 | 1735102 | 贷款的ID |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put("loan_id", "1735102");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(),"payment_completed" , eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"payment_completed"
withValues: @{
@"loan_id": @"1735102"
}];
AppsFlyerTracker.shared().trackEvent("payment_completed",
withValues: [
"loan_id": "1735102"
]);
Dictionary<string, string> PaymentCompleted = new Dictionary<string, string>();
PaymentCompleted.Add("loan_id", "1735102");
AppsFlyer.trackRichEvent("payment_completed", PaymentCompleted);
交通导航类 - 共享出行 App
共享出行最近变得非常流行, 尤其是在大多居民没有汽车的城市地区。通过追踪和分析应用内事件, 您可以了解到有关以下方面的很多信息:
- 乘客和司机如何互动。
- 更多使用您共享出行服务的国家。
- 关于价格、行程和行程距离的指标。
完成注册
事件名称:af_complete_registration
目的
追踪 完成注册 事件能够让您更了解您的用户。通过追踪 完成注册 事件,您可以追踪:
- 了解您的用户倾向哪些注册方式 (Google、Facebook、邮件)。
- 了解多少用户下载并安装应用后实际进行了注册。
- 查看不同国家的注册趋势,用来确定哪些国家的用户更有可能使用您的应用。
触发逻辑
当用户成功注册时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_registration_method | 字符串 | 用户注册的平台或方式 | |
country_code | 字符串 | 66 | 国家代码 (电话代码) |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REGSITRATION_METHOD, "shoes");
eventValue.put("country_code", "66");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.COMPLETE_REGISTRATION, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventCompleteRegistration
withValues: @{
AFEventParamRegistrationMethod: @"Facebook",
@"country_code": @"66",
}];
AppsFlyerTracker.shared().trackEvent(AFEventCompleteRegistration,
withValues: [
AFEventParamRegistrationMethod: "Facebook",
"country_code": "66"
]);
Dictionary<string, string> CompleteRegistrationEvent = new Dictionary<string, string>();
CompleteRegistrationEvent.Add("af_registration_method", "Facebook");
CompleteRegistrationEvent.Add("country_code", "66");
AppsFlyer.trackRichEvent("af_complete_registration", CompleteRegistrationEvent);
添加付款信息
事件名称: af_add_payment_info
目的
追踪 添加付款信息 事件可以帮您对用户进行分类。您可以:
- 了解用户需要多久时间才能完成添加付款信息。
- 哪些付款方式最受欢迎 (信用卡、电子钱包)。
- 与最常用的支付供应商设置推广和合作活动。
触发逻辑
当用户成功地在其帐户中添加付款信息时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_success | 布尔 | 真 | 是否成功添加付款信息 |
credit_card_type | 字符串 | Visa, Mastercard | 信用卡类型 (可选) |
payment_method_type | 字符串 | credit card, e-wallet | 付款方式的类型 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.SUCCESS, true);
eventValue.put("credit_card_type", "Visa");
eventValue.put("payment_method_type", true);
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.ADD_PAYMENT_INFO, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventAddPaymentInfo
withValues: @{
AFEventParamSuccess: @TRUE,
@"credit_card_type": @"Visa",
@"payment_method_type": @"credit card"
}];
AppsFlyerTracker.shared().trackEvent(AFEventAddPaymentInfo, withValues: [
AFEventParamSuccess: true,
"credit_card_type": "Visa",
"payment_method_type": "credit card"
]);
Dictionary<string, string> AddPaymentInfoEvent = new Dictionary<string, string>();
AddPaymentInfoEvent.Add("af_success", "true");
AddPaymentInfoEvent.Add("credit_card_type", "Visa");
AddPaymentInfoEvent.Add("payment_method_type", "credit card");
AppsFlyer.trackRichEvent("af_add_payment_info", AddPaymentInfoEvent);
提交乘车预定
事件名称: ride_booking_requested
目的
提交乘车预定 事件是四个与乘坐预定相关的事件之一。下文将讨论这些问题。通过跟踪此事件, 您可以:
- 了解热门目的地。
- 了解趋势, 人们从哪里乘坐到哪里。
- 查看行程的平均距离。
- 了解大多用户来自哪些城市、地区和国家。
此外, 跟踪此事件与其他三个预订相关事件可以帮助您跟踪成功的交易。您可以追踪成功交易的记录并将其与不成功的交易进行对比。例如, 您可以查看请求行程预订的数量, 以及有多少行程最终完成或被取消。
触发逻辑
当乘客创建乘车预订请求时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_price | float | 22.4 | 行程的价格 |
af_currency | 字符串 | SGD | currency |
af_destination_a | 字符串 | Plaza Singapura | 出发点 |
af_destination_b | 字符串 | Marina Bay Sands | 到达点 |
distance | float | 5.2 | 两个目的地之间的距离 |
af_content_type | 字符串 | Taxi | 交通方式类型 |
payment_method_type | 字符串 | credit card, e-wallet | 付款方式的类型 |
af_city | 字符串 | Singapore | 预定乘车的城市 |
af_region | 字符串 | SFA | 预定乘车的地区 |
af_country | 字符串 | Singapore | 预定乘车的国家 |
order_id | 字符串 | 135790 | Order ID |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 22.4);
eventValue.put(AFInAppEventParameterName.CURRENCY, "SGD");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "Plaza Singapura");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "Marina Bay Sands");
eventValue.put("distance", 5.2);
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "Taxi");
eventValue.put("payment_method_type", "credit card");
eventValue.put("notes", "Taxi stand");
eventValue.put(AFInAppEventParameterName.CITY, "Singapore");
eventValue.put(AFInAppEventParameterName.REGION, "SFA");
eventValue.put(AFInAppEventParameterName.COUNTRY, "Singapore");
eventValue.put("af_order_id", "135790");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "ride_booking_requested", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"ride_booking_requested"
withValues: @{
AFEventParamPrice: @22.4,
AFEventParamCurrency: @"SGD",
AFEventParamDestinationA: @"Plaza Singapura",
AFEventParamDestinationB: @"Marina Bay Sands",
@"distance": @5.2,
AFEventParamContentType: @"Taxi",
@"payment_method_type": @"credit card",
@"notes": @"Taxi stand",
AFEventParamCity: @"Singapore",
AFEventParamRegion: @"SFA",
AFEventParamCountry: @"Singapore",
AFEventParamOrderId: @"135790"
}];
AppsFlyerTracker.shared().trackEvent("ride_booking_requested",
withValues: [
AFEventParamPrice: 22.4,
AFEventParamCurrency: "SGD",
AFEventParamDestinationA: "Plaza Singapura",
AFEventParamDestinationB: "Marina Bay Sands",
"distance": 5.2,
AFEventParamContentType: "Taxi",
"payment_method_type": "credit card",
"notes": "Taxi stand",
AFEventParamCity: "Singapore",
AFEventParamRegion: "SFA",
AFEventParamCountry: "Singapore",
AFEventParamOrderId: "135790"
]);
Dictionary<string, string> RideBookingRequestedEvent = new Dictionary<string, string>();
RideBookingRequestedEvent.Add("af_price", "22.4");
RideBookingRequestedEvent.Add("af_currency", "SGD");
RideBookingRequestedEvent.Add("af_destination_a", "Plaza Singapura");
RideBookingRequestedEvent.Add("af_destination_b", "Marina Bay Sands");
RideBookingRequestedEvent.Add("distance", "5.2");
RideBookingRequestedEvent.Add("af_content_type", "Taxi");
RideBookingRequestedEvent.Add("payment_method_type", "credit card");
RideBookingRequestedEvent.Add("notes", "Taxi stand");
RideBookingRequestedEvent.Add("af_city", "Singapore");
RideBookingRequestedEvent.Add("af_region", "SFA");
RideBookingRequestedEvent.Add("af_country", "Singapore");
RideBookingRequestedEvent.Add("af_order_id", "135790");
AppsFlyer.trackRichEvent("ride_booking_requested", RideBookingRequestedEvent);
乘坐预车确认
事件名称: ride_booking_confirmed
目的
行程预定确认事件是与行程预定相关的四个事件之一。通过跟踪此事件, 您可以:
- 了解谁是最活跃的司机。
- 查看司机最常去的目的地。
- 查看每名司机的行程均价和总价。
此外, 追踪此事件与其他三个预订相关事件可以帮助您更好地了解司机的行动。您可以看到哪些司机确认的行程预订请求最多, 哪些司机选择短途或长途行程等。
触发逻辑
当司机接受预订时, 触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_price | float | 22.4 | 行程的价格 |
af_currency | 字符串 | SGD | currency |
af_destination_a | 字符串 | Plaza Singapura | 出发点 |
af_destination_b | 字符串 | Marina Bay Sands | 到达点 |
distance | float | 5.2 | 两个目的地之间的距离 |
af_content_type | 字符串 | Taxi | 交通方式类型 |
driver_id | 字符串 | 1706 | 确认接单司机的ID |
payment_method_type | 字符串 | credit card, e-wallet | 付款方式的类型 |
af_city | 字符串 | Singapore | 预定乘车的城市 |
af_region | 字符串 | SFA | 预定乘车的地区 |
af_country | 字符串 | Singapore | 预定乘车的国家 |
af_order_id | 字符串 | 135790 | Order ID |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 22.4);
eventValue.put(AFInAppEventParameterName.CURRENCY, "SGD");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "Plaza Singapura");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "Marina Bay Sands");
eventValue.put("distance", 5.2);
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "Taxi");
eventValue.put("driver_id", "1706");
eventValue.put("payment_method_type", "credit card");
eventValue.put("notes", "Taxi stand");
eventValue.put(AFInAppEventParameterName.CITY, "Singapore");
eventValue.put(AFInAppEventParameterName.REGION, "SFA");
eventValue.put(AFInAppEventParameterName.COUNTRY, "Singapore");
eventValue.put("af_order_id", "135790");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "ride_booking_confirmed", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"ride_booking_confirmed"
withValues: @{
AFEventParamPrice: @22.4,
AFEventParamCurrency: @"SGD",
AFEventParamDestinationA: @"Plaza Singapura",
AFEventParamDestinationB: @"Marina Bay Sands",
@"distance": @5.2,
AFEventParamContentType: @"Taxi",
@"driver_id": @"1706",
@"payment_method_type": @"credit card",
@"notes": @"Taxi stand",
AFEventParamCity: @"Singapore",
AFEventParamRegion: @"SFA",
AFEventParamCountry: @"Singapore",
AFEventParamOrderId: @"135790"
}];
AppsFlyerTracker.shared().trackEvent("ride_booking_confirmed",
withValues: [
AFEventParamPrice: 22.4,
AFEventParamCurrency: "SGD",
AFEventParamDestinationA: "Plaza Singapura",
AFEventParamDestinationB: "Marina Bay Sands",
"distance": 5.2,
AFEventParamContentType: "Taxi",
"driver_id": "1706",
"payment_method_type": "credit card",
"notes": "Taxi stand",
AFEventParamCity: "Singapore",
AFEventParamRegion: "SFA",
AFEventParamCountry: "Singapore",
AFEventParamOrderId: "135790"
]);
Dictionary<string, string> RideBookingConfirmedEvent = new Dictionary<string, string>();
RideBookingConfirmedEvent.Add("af_price", "22.4");
RideBookingConfirmedEvent.Add("af_currency", "SGD");
RideBookingConfirmedEvent.Add("af_destination_a", "Plaza Singapura");
RideBookingConfirmedEvent.Add("af_destination_b", "Marina Bay Sands");
RideBookingConfirmedEvent.Add("distance", "5.2");
RideBookingConfirmedEvent.Add("af_content_type", "Taxi");
RideBookingConfirmedEvent.Add("driver_id", "1706");
RideBookingConfirmedEvent.Add("payment_method_type", "credit card");
RideBookingConfirmedEvent.Add("notes", "Taxi stand");
RideBookingConfirmedEvent.Add("af_city", "Singapore");
RideBookingConfirmedEvent.Add("af_region", "SFA");
RideBookingConfirmedEvent.Add("af_country", "Singapore");
RideBookingConfirmedEvent.Add("af_order_id", "135790");
AppsFlyer.trackRichEvent("ride_booking_confirmed", RideBookingConfirmedEvent);
乘车预定取消
事件名称: ride_booking_cancelled
目的
行程预定取消事件是与行程预定相关的四个事件之一。通过跟踪此事件, 您可以:
- 追踪哪些乘客和司机经常取消行程。
- 了解有多少行程被取消。
- 将取消率和其他属性相关联,如价格、目的地、距离、城市等。
- 了解取消行程的原因。
触发逻辑
当预定被取消时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_price | float | 22.4 | 行程的价格 |
af_currency | 字符串 | SGD | currency |
af_destination_a | 字符串 | Plaza Singapura | 出发点 |
af_destination_b | 字符串 | Marina Bay Sands | 到达点 |
distance | float | 5.2 | 两个目的地之间的距离 |
af_content_type | 字符串 | Taxi | 交通方式类型 |
driver_id | 字符串 | 1706 | 确认接单司机的ID |
cancelation_reason | 字符串 | price is too high, driver didn't show up, passenger didn't show up | 行程取消的原因 |
payment_method_type | 字符串 | credit card, e-wallet | 付款方式的类型 |
af_city | 字符串 | Singapore | 预定乘车的城市 |
af_region | 字符串 | SFA | 预定乘车的地区 |
af_country | 字符串 | Singapore | 预定乘车的国家 |
order_id | 字符串 | 135790 | Order ID |
canceled_by | 字符串 | Passenger | 行程是被乘客还是司机取消的 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 22.4);
eventValue.put(AFInAppEventParameterName.CURRENCY, "SGD");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "Plaza Singapura");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "Marina Bay Sands");
eventValue.put("distance", 5.2);
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "Taxi");
eventValue.put("driver_id", "1706");
eventValue.put("cancellation_reason", "driver didn't show up");
eventValue.put("payment_method_type", "credit card");
eventValue.put("notes", "Taxi stand");
eventValue.put(AFInAppEventParameterName.CITY, "Singapore");
eventValue.put(AFInAppEventParameterName.REGION, "SFA");
eventValue.put(AFInAppEventParameterName.COUNTRY, "Singapore");
eventValue.put("af_order_id", "135790");
eventValue.put("canceled_by", "passenger");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "ride_booking_canceled", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"ride_booking_canceled"
withValues: @{
AFEventParamPrice: @22.4,
AFEventParamCurrency: @"SGD",
AFEventParamDestinationA: @"Plaza Singapura",
AFEventParamDestinationB: @"Marina Bay Sands",
@"distance": @5.2,
AFEventParamContentType: @"Taxi",
@"driver_id": @"1706",
@"cancelation_reason": @"driver didn't show up",
@"payment_method_type": @"credit card",
@"notes": @"Taxi stand",
AFEventParamCity: @"Singapore",
AFEventParamRegion: @"SFA",
AFEventParamCountry: @"Singapore",
AFEventParamOrderId: @"135790",
@"canceled_by": @"passenger"
}];
AppsFlyerTracker.shared().trackEvent("ride_booking_canceled",
withValues: [
AFEventParamPrice: 22.4,
AFEventParamCurrency: "SGD",
AFEventParamDestinationA: "Plaza Singapura",
AFEventParamDestinationB: "Marina Bay Sands",
"distance": 5.2,
AFEventParamContentType: "Taxi",
"driver_id": "1706",
"cancelation_reason": "driver didn't show up",
"payment_method_type": "credit card",
"notes": "Taxi stand",
AFEventParamCity: "Singapore",
AFEventParamRegion: "SFA",
AFEventParamCountry: "Singapore",
AFEventParamOrderId: "135790",
"canceled_by": "passenger"
]);
Dictionary<string, string> RideBookingCanceledEvent = new Dictionary<string, string>();
RideBookingCanceledEvent.Add("af_price", "22.4");
RideBookingCanceledEvent.Add("af_currency", "SGD");
RideBookingCanceledEvent.Add("af_destination_a", "Plaza Singapura");
RideBookingCanceledEvent.Add("af_destination_b", "Marina Bay Sands");
RideBookingCanceledEvent.Add("distance", "5.2");
RideBookingCanceledEvent.Add("af_content_type", "Taxi");
RideBookingCanceledEvent.Add("driver_id", "1706");
RideBookingCanceledEvent.Add("cancelation_reason", "driver didn't show up");
RideBookingCanceledEvent.Add("payment_method_type", "credit card");
RideBookingCanceledEvent.Add("notes", "Taxi stand");
RideBookingCanceledEvent.Add("af_city", "Singapore");
RideBookingCanceledEvent.Add("af_region", "SFA");
RideBookingCanceledEvent.Add("af_country", "Singapore");
RideBookingCanceledEvent.Add("af_order_id", "135790");
RideBookingCanceledEvent.Add("canceled_by", "passenger");
AppsFlyer.trackRichEvent("ride_booking_cancelled", RideBookingCanceledEvent);
乘车预定完成
事件名称: ride_booking_completed
目的
行程预定完成事件是与行程预定相关的四个事件之一。通过跟踪此事件, 您可以:
- 了解乘客消费和司机收入。
- 将完成的行程与其它属性相关联,如目的地、距离、付款类型、司机ID等。
- 查看司机和乘客的平均行驶距离和总距离。
- 对比已完成订单和被取消订单。
- 记录并追踪司机的分数。
触发逻辑
当行程完成时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_price | float | 22.4 | 行程的价格 |
af_currency | 字符串 | SGD | currency |
af_destination_a | 字符串 | Plaza Singapura | 出发点 |
af_destination_b | 字符串 | Marina Bay Sands | 到达点 |
distance | float | 5.2 | 两个目的地之间的距离 |
af_content_type | 字符串 | Taxi | 交通方式类型 |
driver_id | 字符串 | 1706 | 确认接单司机的ID |
payment_method_type | 字符串 | credit card, e-wallet | 付款方式的类型 |
af_city | 字符串 | Singapore | 预定乘车的城市 |
af_region | 字符串 | SFA | 预定乘车的地区 |
af_country | 字符串 | Singapore | 预定乘车的国家 |
order_id | 字符串 | 135790 | Order ID |
credits_earned | int | 248 | 完成该行程乘客所获的积分 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 22.4);
eventValue.put(AFInAppEventParameterName.CURRENCY, "SGD");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "Plaza Singapura");
eventValue.put(AFInAppEventParameterName.DESTINATION_B,"Marina Bay Sands");
eventValue.put("distance", 5.2);
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "Taxi");
eventValue.put("driver_id", "1706");
eventValue.put("payment_method_type", "credit card");
eventValue.put("notes", "Taxi stand");
eventValue.put(AFInAppEventParameterName.CITY, "Singapore");
eventValue.put(AFInAppEventParameterName.REGION, "SFA");
eventValue.put(AFInAppEventParameterName.COUNTRY, "Singapore");
eventValue.put("af_order_id", "135790");
eventValue.put("credits_earned", 248);
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "ride_booking_completed" , eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"ride_booking_completed"
withValues: @{
AFEventParamPrice: @22.4,
AFEventParamCurrency: @"SGD",
AFEventParamDestinationA: @"Plaza Singapura",
AFEventParamDestinationB: @"Marina Bay Sands",
@"distance": @5.2,
AFEventParamContentType: @"Taxi",
@"driver_id": @"1706",
@"payment_method_type": @"credit card",
@"notes": @"Taxi stand",
AFEventParamCity: @"Singapore",
AFEventParamRegion: @"SFA",
AFEventParamCountry: @"Singapore",
AFEventParamOrderId: @"135790",
@"credits_earned": @248
}];
AppsFlyerTracker.shared().trackEvent("ride_booking_completed",
withValues: [
AFEventParamPrice: 22.4,
AFEventParamCurrency: "SGD",
AFEventParamDestinationA: "Plaza Singapura",
AFEventParamDestinationB: "Marina Bay Sands",
distance": 5.2,
AFEventParamContentType: "Taxi",
"driver_id": "1706",
"payment_method_type": "credit card",
"notes": "Taxi stand",
AFEventParamCity: "Singapore",
AFEventParamRegion: "SFA",
AFEventParamCountry: "Singapore",
AFEventParamOrderId: "135790",
"credits_earned": 248
]);
Dictionary<string, string> RideBookingCompletedEvent = new Dictionary<string, string>();
RideBookingCompletedEvent.Add("af_price", "22.4");
RideBookingCompletedEvent.Add("af_currency", "SGD");
RideBookingCompletedEvent.Add("af_destination_a", "Plaza Singapura");
RideBookingCompletedEvent.Add("af_destination_b", "Marina Bay Sands");
RideBookingCompletedEvent.Add("distance", "5.2");
RideBookingCompletedEvent.Add("af_content_type", "Taxi");
RideBookingCompletedEvent.Add("driver_id", "1706");
RideBookingCompletedEvent.Add("payment_method_type", "credit card");
RideBookingCompletedEvent.Add("notes", "Taxi stand");
RideBookingCompletedEvent.Add("af_city", "Singapore");
RideBookingCompletedEvent.Add("af_region", "SFA");
RideBookingCompletedEvent.Add("af_country", "Singapore");
RideBookingCompletedEvent.Add("af_order_id", "135790");
AppsFlyer.trackRichEvent("ride_booking_completed", RideBookingCompletedEvent);
花掉的积分
事件名称: spent_credits
目的
上面讨论的行程预定完成事件有一个属性是 credits_earned。该属性记录乘客每个行程所获取的积分。乘客可以随即用这些积分换取代金券和折扣。通过追踪此事件,您可以:
- 了解有多少乘客将积分兑换成优惠券。
- 了解乘客更喜欢哪类优惠券和折扣
触发逻辑
当一名乘客消费积分时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_content | 字符串 | Single Movie Ticket | 优惠券或折扣的类型 |
credits_used | int | 1000 | 使用多少积分 |
credits_remaining | int | 2090 | 账户剩余积分 |
invoice_id | 字符串 | KO215123SD | 消费积分的收据ID |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.CONTENT, "Single movie ticket");
eventValue.put("credits_used", 1000);
eventValue.put("invoice_id", "");
eventValue.put("credits_remaining", "KO215123SD");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "spent_credits" , eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"spent_credits"
withValues: @{
AFEventParamContent: @"Single movie ticket",
@"credits_used": @1000,
@"credits_remaining": @2090,
@"invoice_id": @"KO215123SD"
}];
AppsFlyerTracker.shared().trackEvent("spent_credits",
withValues: [
AFEventParamContent: "Single movie ticket",
"credits_used": 1000,
"credits_remaining": 2090,
"invoice_id": "KO215123SD"
]);
Dictionary<string, string> CreditsSpent = new Dictionary<string, string>();
CreditsSpent.Add("af_content", "Single movie ticket");
CreditsSpent.Add("credits_used", "1000");
CreditsSpent.Add("credits_remaining", "2090");
CreditsSpent.Add("invoice_id", "KO215123SD");
AppsFlyer.trackRichEvent("af_content_view", CreditsSpent);
旅行类 - 航班预订
航班预订 App 允许旅客轻松预订航班, 同时从最优价格中进行选择。我们建议追踪的事件包括航班预订、航班搜索和查看优惠。追踪这些事件可以帮助分析用户喜好和消费习惯。例如, 通过分析来自事件的数据, 您可以:
- 了解热门目的地。
- 分析季节性趋势。
- 了解用户倾向使用的热门航空公司。
旅行预订
事件名称:af_travel_booking
目的
预定航班是此 App 内最核心的一项功能。追踪此事件的所有属性,您可以获悉:
- 热门目的地。
- 热门航空公司。
- 季节性趋势。
触发逻辑
当用户成功预定了航班并进入感谢界面时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_revenue | float | 647 | 航班预订的金额 |
af_currency | 字符串 | SGD | 币种代码 |
af_price | float | 674 | 价格 |
af_content_id | 字符串 | ODIRNH | 航班促销代码ID |
af_departing_departure_date | 字符串 | 2018-06-21 | 出发日期 |
af_returning_departure_date | 字符串 | 2018-06-26 | 返程日期 |
af_destination_a | 字符串 | BKK | 第一个目的地 |
af_destination_b | 字符串 | SYD | 第二个目的地(如适用) |
airline_code | 字符串 | KLM | 航空公司代码 |
af_class | 字符串 | economy | 预定航班的舱位 |
purchase_method | 字符串 | credit card | 信用卡,支付宝等。 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REVENUE, 647);
eventValue.put(AFInAppEventParameterName.CURRENCY, "SGD");
eventValue.put(AFInAppEventParameterName.PRICE, 674);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "ODIRNH");
eventValue.put(AFInAppEventParameterName.DEPARTING_DEPARTURE_DATE, "2018-06-21");
eventValue.put(AFInAppEventParameterName.RETURNING_DEPARTURE_DATE, "2018-06-26");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "BKK");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "SYD");
eventValue.put("airline_code", "KLM");
eventValue.put(AFInAppEventParameterName.CLASS, "economy");
eventValue.put("purchase_method", "credit card");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.TRAVEL_BOOKING, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventTravelBooking
withValues: @{
AFEventParamRevenue: @647,
AFEventParamCurrency: @"SGD",
AFEventParamPrice: @674,
AFEventParamContentId: @"ODIRNH",
AFEventParamDepartingDepartureDate: @"2018-21-06",
AFEventParamReturningDepartureDate: @"2018-26-06",
AFEventParamDestinationA: @"BKK",
AFEventParamDestinationB: @"SYD",
@"airline_code": @"KLM",
AFEventParamClass: @"economy",
@"purchase_method": @"credit card"
}];
AppsFlyerTracker.shared().trackEvent(AFEventTravelBooking,
withValues: [
AFEventParamRevenue: 647,
AFEventParamCurrency: "SGD",
AFEventParamPrice: 674,
AFEventParamContentId: "ODIRNH",
AFEventParamDepartingDepartureDate: "2018-21-06",
AFEventParamReturningDepartureDate: "2018-26-06",
AFEventParamDestinationA: "BKK",
AFEventParamDestinationB: "SYD",
"airline_code": "KLM",
AFEventParamClass: "economy",
"purchase_method": "credit card"
]);
Dictionary<string, string> TravelBookingEvent = new Dictionary<string, string>();
TravelBookingEvent.Add("af_revenue", "647");
TravelBookingEvent.Add("af_currency", "SGD");
TravelBookingEvent.Add("af_price", "974");
TravelBookingEvent.Add("af_content_id", "ODIRNH");
TravelBookingEvent.Add("af_departing_departure_date", "2018-06-21");
TravelBookingEvent.Add("af_returning_departure_date", "2018-06-26");
TravelBookingEvent.Add("af_destination_a", "BKK");
TravelBookingEvent.Add("af_destination_b", "SYD");
TravelBookingEvent.Add("airline_code", "KLM");
TravelBookingEvent.Add("af_class", "economy");
TravelBookingEvent.Add("purchase_method", "credit card");
AppsFlyer.trackRichEvent ("af_travel_booking", TravelBookingEvent);
内容视图
事件名称: af_content_view
目的
执行搜索后, 用户单击他们认为相关的搜索结果。追踪用户在搜索结果中查看的内容可以帮助您:
- 了解用户觉得最吸引人的航班。
- 了解搜索结果是否与搜索查询相关。
触发逻辑
当用户单击搜索结果时是触发该事件的最佳时机。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_departing_departure_date | 字符串 | 2018-06-21 | 出发日期 |
af_returning_departure_date | 字符串 | 2018-06-26 | 返程日期 |
af_destination_a | 字符串 | BKK | 第一个目的地 |
af_destination_b | 字符串 | SYD | 第二个目的地 (如适用) |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.DEPARTING_DEPARTURE_DATE, "2018-06-21");
eventValue.put(AFInAppEventParameterName.RETURNING_DEPARTURE_DATE, "2018-06-26");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "BKK");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "SYD");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.CONTENT_VIEW, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventContentView
withValues: @{
AFEventParamDepartingDepartureDate: @"2018-21-06",
AFEventParamReturningDepartureDate: @"2018-26-06",
AFEventParamDestinationA: @"BKK",
AFEventParamDestinationB: @"SYD"
}];
AppsFlyerTracker.shared().trackEvent(AFEventContentView, withValues: [
AFEventParamDepartingDepartureDate: "2018-21-06",
AFEventParamReturningDepartureDate: "2018-26-06",
AFEventParamDestinationA: "BKK",
AFEventParamDestinationA: "SYD"
]);
Dictionary<string, string> ContentViewEvent = new Dictionary<string, string>();
ContentViewEvent.Add("af_departing_departure_date", "2018-06-21");
ContentViewEvent.Add("af_returning_departure_date", "2018-06-26");
ContentViewEvent.Add("af_destination_a", "BKK");
ContentViewEvent.Add("af_destination_b", "SYD");
AppsFlyer.trackRichEvent ("af_content_view", ContentViewEvent);
搜索
事件名称: af_search
目的
航班预订应用程序允许用户搜索航班及优惠信息。洞悉用户喜好的一种方法就是追踪搜索参数。通过追踪搜索事件及其属性,您可以:
- 了解用户在寻找什么。
- 了解哪些目的地最受欢迎。
- 查看有多少用户带着孩子旅行。
- 查看用户喜欢或计划一年中的什么时间旅行。
触发逻辑
在用户填写搜索表单并单击搜索按钮时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_num_children | int | 0 | 旅行的未成年人有多少 |
af_destination_a | 字符串 | BKK | 第一个目的地 |
af_destination_b | 字符串 | SYD | 第二个目的地 (如相关) |
af_departing_departure_date | 字符串 | 2018-06-21 | 出发日期 |
af_returning_departure_date | 字符串 | 2018-06-26 | 返程日期 |
af_num_infants | int | 0 | 旅行的婴儿有多少 |
af_num_adults | int | 1 | 旅行的承认有多少 |
代码示例
Map<String, Object> eventValue = new HashMap<String,
eventValue.put(AFInAppEventParameterName.NUM_CHILDREN, 0);
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "BKK");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "SYD");
eventValue.put(AFInAppEventParameterName.DEPARTING_DEPARTURE_DATE, "2018-06-21");
eventValue.put(AFInAppEventParameterName.RETURNING_DEPARTURE_DATE, "2018-06-26");
eventValue.put(AFInAppEventParameterName.NUM_INFANTS, 0);
eventValue.put(AFInAppEventParameterName.NUM_ADULTS, 1);
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.SEARCH, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventSearch
withValues: @{
AFEventParamNumChildren: @0,
AFEventParamDestinationA: @"BKK",
AFEventParamDestinationB: @"SYD",
AFEventParamDepartingDepartureDate: @"2018-21-06",
AFEventParamReturningDepartureDate: @"2018-26-06",
AFEventParamNumInfants: @0,
AFEventParamNumAdults: @1
}];
AppsFlyerTracker.shared().trackEvent(AFEventSearch, withValues: [
AFEventParamNumChildren: 0,
AFEventParamDestinationA: "BKK",
AFEventParamDestinationB: "SYD",
AFEventParamDepartingDepartureDate: "2018-21-06",
AFEventParamReturningDepartureDate: "2018-26-06",
AFEventParamNumInfants: 0,
AFEventParamNumAdults: 1
]);
Dictionary<string, string> SearchEvent = new Dictionary<string, string>();
SearchEvent.Add("af_num_children", "0");
SearchEvent.Add("af_destination_a", "BKK");
SearchEvent.Add("af_destination_b", "SYD");
SearchEvent.Add("af_departing_departure_date", "2018-06-21");
SearchEvent.Add("af_returning_departure_date", "2018-06-26");
SearchEvent.Add("af_num_infants", "0");
SearchEvent.Add("af_num_adults", "0");
AppsFlyer.trackRichEvent ("af_search", SearchEvent);
添加付款信息
事件名称: af_add_payment_info
目的
该事件能够帮您追踪用户在预定航班界面添加付款信息时的成功和不成功次数。
触发逻辑
当用户点击预定航班按钮时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_success | 布尔 | 真 | 是否成功添加付款信息 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.SUCCESS, true);
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.ADD_PAYMENT_INFO, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventAddPaymentInfo
withValues: @{
AFEventParamSuccess: @TRUE
}];
AppsFlyerTracker.shared().trackEvent(AFEventAddPaymentInfo,
withValues: [
AFEventParamSuccess: true
]);
Dictionary<string, string> AddPaymentInfoEvent = new Dictionary<string, string>();
AddPaymentInfoEvent.Add("af_success", "true");
AppsFlyer.trackRichEvent ("af_add_payment_info", AddPaymentInfoEvent);
旅行类 - 酒店预订
通过追踪您酒店预订 App 的应用内事件,您可以查看哪些推广活动和媒体渠道可以带来实际预定假期行程的用户。除此之外,您可以查看哪些推广活动和媒体渠道带来的用户预定得最多、消费得最多。您可以将酒店分数、季节、国家和随行未成年人等偏好数据归因到特定的媒体渠道。通过将用户偏好数据归因到媒体渠道,您可以更有针对性地优化媒体渠道端的推广活动。
事件名称:af_complete_registration
目的
您可以追踪用户注册情况并将其与其他数据进行比较, 用来更深入地了解您的用户。通过追踪用户注册事件, 您可以:
- 了解有多少用户安装了该应用, 但从未注册。
- 了解用户喜欢的注册方式。
- 查看哪些渠道带来真实注册的用户。
触发逻辑
追踪此事件的最佳方法是在用户完成注册过程时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_registration_method | 字符串 | email, facebook | 注册方式类型 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REGSITRATION_METHOD, "Facebook");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.COMPLETE_REGISTRATION, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventCompleteRegistration
withValues: @{
AFEventParamRegistrationMethod: @"Facebook"
}];
AppsFlyerTracker.shared().trackEvent(AFEventCompleteRegistration,
withValues: [
AFEventParamRegistrationMethod: "Facebook"
]);
Dictionary<string, string> CompletedRegistrationEvent = new Dictionary<string, string>();
CompletedRegistrationEvent.Add("af_registration_method", "Facebook");
AppsFlyer.trackRichEvent ("af_complete_registration", CompletedRegistrationEvent);
事件名称:af_login
目的
此事件可以帮助您追踪注册用户的留存情况。
触发逻辑
当用户登陆或者打开 App 时触发该事件。
推荐的属性
此事件可以不带有任何其他属性进行发送。
代码示例
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(),
AFInAppEventType.LOGIN, null);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventLogin
withValues: nil
];
AppsFlyerTracker.shared().trackEvent(AFEventLogin, withValues: nil);
AppsFlyer.trackRichEvent ("af_login", null);
事件名称: af_search
目的
该事件的目的是让您了解用户在搜索什么。当您知道您的用户在搜索什么时,您可以提供更适合的优惠和促销活动。除此之外,您还可以查看特定地理地点用户的搜索内容,并进行跨渠道的定向营销。
触发逻辑
当用户执行搜索时触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_date_a | 字符串 | 2018/07/26 | 入住日期 |
af_date_b | 字符串 | 2018/08/01 | 退房日期 |
af_destination_a | 字符串 | 伦敦 | 用户地点 |
af_destination_b | 字符串 | Madrid | 酒店地点 |
af_num_adults | float | 2 | 入住人数 |
af_num_children | float | 0 | 儿童人数 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.DATE_A, "2018/07/26");
eventValue.put(AFInAppEventParameterName.DATE_B, "2018/08/01");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "London");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "Madrid");
eventValue.put(AFInAppEventParameterName.NUM_ADULTS, 2);
eventValue.put(AFInAppEventParameterName.NUM_CHILDREN, 0);
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.SEARCH, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventSearch
withValues: @{
AFEventParamDateA: @"2018/07/26",
AFEventParamDateB: @"2018/08/01",
AFEventParamDestinationA: @"London",
AFEventParamDestinationB: @"Madrid",
AFEventParamNumAdults: @2,
AFEventParamNumChildren: @0
}];
AppsFlyerTracker.shared().trackEvent(AFEventSearch, withValues: [
AFEventParamDateA: "2018/07/26",
AFEventParamDateB: "2018/08/01",
AFEventParamDestinationA: "London",
AFEventParamDestinationB: "Madrid",
AFEventParamNumAdults: 2,
AFEventParamNumChildren: 0
]);
Dictionary<string, string> Search =
new Dictionary<string, string>();
Search.Add("af_date_a", "2018/07/26");
Search.Add("af_date_b", "2018/08/01");
Search.Add("af_destination_a", "London");
Search.Add("af_destination_b", "Madrid");
Search.Add("af_num_adults", "2");
Search.Add("af_num_children", "0");
AppsFlyer.trackRichEvent("af_add_to_wish_list", Search);
事件名称: af_content_view
目的
该事件的目的是让您了解用户正在浏览哪些酒店。您可以了解用户正在寻找哪类酒店,以及他们对季节和地点的偏好。您可以对这些用户通过广告和促销进行重定向推广。此外, 您还可以查看哪些用户浏览之后预定了酒店和哪些没有最终预定。对于那些最终预定了酒店的用户,您可以查看是哪些渠道带来的。对于那些仅浏览的用户,您可以进行重定向营销。
触发逻辑
当用户正在浏览一个住房时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_price | float | 674 | 酒店的标价 |
af_content_id | 字符串 | ODIRNH | 酒店ID |
af_date_a | 字符串 | 2018/07/26 | 入住日期 |
af_date_b | 字符串 | 2018/08/01 | 退房日期 |
af_destination_a | 字符串 | 伦敦 | 用户地点 |
af_destination_b | 字符串 | Madrid | 酒店地点 |
af_class | 字符串 | Deluxe | 房型 |
af_num_adults | float | 2 | 入住人数 |
af_num_children | float | 0 | 儿童人数 |
af_hotel_score | float | 9.6 | 酒店评价的评分 |
af_preferred_star_ratings | float | 5 | 首选酒店星级 |
af_preferred_neighborhoods | 字符串 | Centro | 酒店所在的地区 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.CURRENCY, "GBP");
eventValue.put(AFInAppEventParameterName.PRICE, 674);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "ODIRNH");
eventValue.put(AFInAppEventParameterName.DATE_A, "2018/07/26");
eventValue.put(AFInAppEventParameterName.DATE_B, "2018/08/01");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "London");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "Madrid");
eventValue.put(AFInAppEventParameterName.CLASS, "Deluxe");
eventValue.put(AFInAppEventParameterName.NUM_ADULTS, 2);
eventValue.put(AFInAppEventParameterName.NUM_CHILDREN, 0);
eventValue.put(AFInAppEventParameterName.HOTEL_SCORE, 9.6);
eventValue.put(AFInAppEventParameterName.PREFERRED_STAR_RATINGS, 5);
eventValue.put(AFInAppEventParameterName.PREFERRED_NEIGHBORHOODS, "Centro");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.CONTENT_VIEW, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventContentView
withValues: @{
AFEventParamCurrency: @"GBP",
AFEventParamPrice: @674,
AFEventParamContentId: @"ODIRNH",
AFEventParamDateA: @"2018/07/26",
AFEventParamDateB: @"2018/08/01",
AFEventParamDestinationA: @"London",
AFEventParamDestinationB: @"Madrid",
AFEventParamClass: @"Deluxe",
AFEventParamNumAdults: @2,
AFEventParamNumChildren: @0,
AFEventParamHotelScore: @9.6,
AFEventParamPreferredStarRatings: @5,
AFEventParamPreferredNeighborhoods: @"Centro"
}];
AppsFlyerTracker.shared().trackEvent(AFEventContentView, withValues: [
AFEventParamCurrency: "GBP",
AFEventParamPrice: 674,
AFEventParamContentId: "ODIRNH",
AFEventParamDateA: "2018/07/26",
AFEventParamDateB: "2018/08/01",
AFEventParamDestinationA: "London",
AFEventParamDestinationB: "Madrid",
AFEventParamClass: "Deluxe",
AFEventParamNumAdults: 2,
AFEventParamNumChildren: 0,
AFEventParamHotelScore: 9.6,
AFEventParamPreferredStarRatings: 5,
AFEventParamPreferredNeighborhoods: "Centro"
]);
Dictionary<string, string> ContentView =
new Dictionary<string, string>();
ContentView.Add("af_currency", "GBP");
ContentView.Add("af_price", "674");
ContentView.Add("af_content_id", "ODIRNH");
ContentView.Add("af_date_a", "2018/07/26");
ContentView.Add("af_date_b", "2018/08/01");
ContentView.Add("af_destination_a", "London");
ContentView.Add("af_destination_b", "Madrid");
ContentView.Add("af_class", "Deluxe");
ContentView.Add("af_num_adults", "2");
ContentView.Add("af_num_children", "0");
ContentView.Add("af_hotel_score", "9.6");
ContentView.Add("af_preferred_star_ratings", "5");
ContentView.Add("af_preferred_neighborhoods", "Centro");
AppsFlyer.trackRichEvent("af_content_view", ContentView);
事件名称: af_add_to_wishlist
目的
加入愿望清单事件表示了用户想要预定的酒店和目的地。通过跟踪此事件, 您可以深入了解用户的需求。如果您知道有些用户正在寻找在特定地区、有特定评价分数的某些特定酒店,您可以对这些用户进行定向和重定向营销。
触发逻辑
当用户把商目添加到愿望清单时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_price | float | 674 | 酒店的标价 |
af_content_id | 字符串 | ODIRNH | 酒店ID |
af_date_a | 字符串 | 2018/07/26 | 入住日期 |
af_date_b | 字符串 | 2018/08/01 | 退房日期 |
af_destination_a | 字符串 | 伦敦 | 用户地点 |
af_destination_b | 字符串 | Madrid | 酒店地点 |
af_class | 字符串 | Deluxe | 房型 |
af_num_adults | float | 2 | 入住人数 |
af_num_children | float | 0 | 儿童人数 |
af_hotel_score | float | 9.6 | 酒店评价的评分 |
af_preferred_star_ratings | float | 5 | 首选酒店星级 |
af_preferred_neighborhoods | 字符串 | Centro | 酒店所在的地区 |
purchase_method | 字符串 | Credit card | 购买方式 |
af_coupon_code | 字符串 | SUM2018 | 促销代码或会员积分 |
property_type | 字符串 | Hotel | 住房类型 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.CURRENCY, "GBP");
eventValue.put(AFInAppEventParameterName.PRICE, 674);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "ODIRNH");
eventValue.put(AFInAppEventParameterName.DATE_A, "2018/07/26");
eventValue.put(AFInAppEventParameterName.DATE_B, "2018/08/01");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "London");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "Madrid");
eventValue.put(AFInAppEventParameterName.CLASS, "Deluxe");
eventValue.put(AFInAppEventParameterName.NUM_ADULTS, 2);
eventValue.put(AFInAppEventParameterName.NUM_CHILDREN, 0);
eventValue.put(AFInAppEventParameterName.HOTEL_SCORE, 9.6);
eventValue.put(AFInAppEventParameterName.PREFERRED_STAR_RATINGS, 5);
eventValue.put(AFInAppEventParameterName.PREFERRED_NEIGHBORHOODS, "Centro");
eventValue.put("purchase_method", "credit card");
eventValue.put(AFInAppEventParameterName.COUPON_CODE, "SUM2018");
eventValue.put("property_type", "hotel");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.ADD_TO_WISH_LIST, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventAddToWishlist
withValues: @{
AFEventParamCurrency: @"GBP",
AFEventParamPrice: @674,
AFEventParamContentId: @"ODIRNH",
AFEventParamDateA: @"2018/07/26",
AFEventParamDateB: @"2018/08/01",
AFEventParamDestinationA: @"London",
AFEventParamDestinationB: @"Madrid",
AFEventParamClass: @"Deluxe",
AFEventParamNumAdults: @2,
AFEventParamNumChildren: @0,
AFEventParamHotelScore: @9.6,
AFEventParamPreferredStarRatings: @5,
AFEventParamPreferredNeighborhoods: @"Centro",
@"purchase_method": @"credit card",
AFEventParamCouponCode: @"SUM2018",
@"property_type": @"hotel"
}];
AppsFlyerTracker.shared().trackEvent(AFEventAddToWishlist, withValues: [
AFEventParamCurrency: "GBP",
AFEventParamPrice: 674,
AFEventParamContentId: "ODIRNH",
AFEventParamDateA: "2018/07/26",
AFEventParamDateB: "2018/08/01",
AFEventParamDestinationA: "London",
AFEventParamDestinationB: "Madrid",
AFEventParamClass: "Deluxe",
AFEventParamNumAdults: 2,
AFEventParamNumChildren: 0,
AFEventParamHotelScore: 9.6,
AFEventParamPreferredStarRatings: 5,
AFEventParamPreferredNeighborhoods: "Centro",
"purchase_method": "credit card",
AFEventParamCouponCode: "SUM2018",
"property_type": "hotel"
]);
Dictionary<string, string> AddToWishList =
new Dictionary<string, string>();
AddToWishList.Add("af_currency", "GBP");
AddToWishList.Add("af_price", "674");
AddToWishList.Add("af_content_id", "ODIRNH");
AddToWishList.Add("af_date_a", "2018/07/26");
AddToWishList.Add("af_date_b", "2018/08/01");
AddToWishList.Add("af_destination_a", "London");
AddToWishList.Add("af_destination_b", "Madrid");
AddToWishList.Add("af_class", "Deluxe");
AddToWishList.Add("af_num_adults", "2");
AddToWishList.Add("af_num_children", "0");
AddToWishList.Add("af_hotel_score", "9.6");
AddToWishList.Add("af_preferred_star_ratings", "5");
AddToWishList.Add("af_preferred_neighborhoods", "Centro");
AddToWishList.Add("purchase_method", "credit card");
AddToWishList.Add("af_coupon_code", "SUM2018");
AddToWishList.Add("af_property_type", "hotel");
AppsFlyer.trackRichEvent("af_add_to_wish_list", AddToWishList);
事件名称:af_initiated_checkout
目的
该事件的目的是让您追踪有多少用户进行了结账。此外,您还可以了解他们用哪些方式进行结账(信用卡、电子钱包),而进行定向营销。您还可以查看哪些用户没有完成结账流程,而对他们进行重定向营销。
触发逻辑
当用户添加信用卡信息或者授权电子钱包时触发该事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_price | float | 674 | 酒店的标价 |
af_content_id | 字符串 | ODIRNH | 酒店ID |
af_date_a | 字符串 | 2018/07/26 | 入住日期 |
af_date_b | 字符串 | 2018/08/01 | 退房日期 |
af_destination_a | 字符串 | 伦敦 | 用户地点 |
af_destination_b | 字符串 | Madrid | 酒店地点 |
af_class | 字符串 | Deluxe | 房型 |
af_num_adults | float | 2 | 入住人数 |
af_num_children | float | 0 | 儿童人数 |
af_hotel_score | float | 9.6 | 酒店评价的评分 |
af_preferred_star_ratings | float | 5 | 首选酒店星级 |
af_preferred_neighborhoods | 字符串 | Centro | 酒店所在的地区 |
purchase_method | 字符串 | Credit card | 购买方式 |
af_coupon_code | 字符串 | SUM2018 | 促销代码或会员积分 |
property_type | 字符串 | Hotel | 住房类型 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.CURRENCY, "GBP");
eventValue.put(AFInAppEventParameterName.PRICE, 674);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "ODIRNH");
eventValue.put(AFInAppEventParameterName.DATE_A, "2018/07/26");
eventValue.put(AFInAppEventParameterName.DATE_B, "2018/08/01");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "London");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "Madrid");
eventValue.put(AFInAppEventParameterName.CLASS, "Deluxe");
eventValue.put(AFInAppEventParameterName.NUM_ADULTS, 2);
eventValue.put(AFInAppEventParameterName.NUM_CHILDREN, 0);
eventValue.put(AFInAppEventParameterName.HOTEL_SCORE, 9.6);
eventValue.put(AFInAppEventParameterName.PREFERRED_STAR_RATINGS, 5);
eventValue.put(AFInAppEventParameterName.PREFERRED_NEIGHBORHOODS, "Centro");
eventValue.put("purchase_method", "credit card");
eventValue.put(AFInAppEventParameterName.COUPON_CODE, "SUM2018");
eventValue.put("property_type", "hotel");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), AFInAppEventType.INITIATED_CHECKOUT, eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:AFEventInitiatedCheckout
withValues: @{
AFEventParamCurrency: @"GBP",
AFEventParamPrice: @674,
AFEventParamContentId: @"ODIRNH",
AFEventParamDateA: @"2018/07/26",
AFEventParamDateB: @"2018/08/01",
AFEventParamDestinationA: @"London",
AFEventParamDestinationB: @"Madrid",
AFEventParamClass: @"Deluxe",
AFEventParamNumAdults: @2,
AFEventParamNumChildren: @0,
AFEventParamHotelScore: @9.6,
AFEventParamPreferredStarRatings: @5,
AFEventParamPreferredNeighborhoods: @"Centro",
@"purchase_method": @"credit card",
AFEventParamCouponCode: @"SUM2018",
@"property_type": @"hotel"
}];
AppsFlyerTracker.shared().trackEvent(AFEventInitiatedCheckout, withValues: [
AFEventParamCurrency: "GBP",
AFEventParamPrice: 674,
AFEventParamContentId: "ODIRNH",
AFEventParamDateA: "2018/07/26",
AFEventParamDateB: "2018/08/01",
AFEventParamDestinationA: "London",
AFEventParamDestinationB: "Madrid",
AFEventParamClass: "Deluxe",
AFEventParamNumAdults: 2,
AFEventParamNumChildren: 0,
AFEventParamHotelScore: 9.6,
AFEventParamPreferredStarRatings: 5,
AFEventParamPreferredNeighborhoods: "Centro",
"purchase_method": "credit card",
AFEventParamCouponCode: "SUM2018",
"property_type": "hotel"
]);
Dictionary<string, string> InitiatedCheckout =
new Dictionary<string, string>();
InitiatedCheckout.Add("af_currency", "GBP");
InitiatedCheckout.Add("af_price", "674");
InitiatedCheckout.Add("af_content_id", "ODIRNH");
InitiatedCheckout.Add("af_date_a", "2018/07/26");
InitiatedCheckout.Add("af_date_b", "2018/08/01");
InitiatedCheckout.Add("af_destination_a", "London");
InitiatedCheckout.Add("af_destination_b", "Madrid");
InitiatedCheckout.Add("af_class", "Deluxe");
InitiatedCheckout.Add("af_num_adults", "2");
InitiatedCheckout.Add("af_num_children", "0");
InitiatedCheckout.Add("af_hotel_score", "9.6");
InitiatedCheckout.Add("af_preferred_star_ratings", "5");
InitiatedCheckout.Add("af_preferred_neighborhoods", "Centro");
InitiatedCheckout.Add("purchase_method", "credit card");
InitiatedCheckout.Add("af_coupon_code", "SUM2018");
InitiatedCheckout.Add("af_property_type", "hotel");
AppsFlyer.trackRichEvent("af_initiated_chekcout", InitiatedCheckout);
事件名称: travel_booking
目的
预定行程 事件可以让您了解您 App 内的整体预订率。除此之外,追踪该事件还可以让您:
- 追踪预定产生的收入。
- 查看有多少用户将带孩子入住酒店。
- 了解季节性趋势。
- 查看什么酒店在用户中最受欢迎。
触发逻辑
当用户在预订酒店后到达感谢页面时, 触发此事件。
推荐的属性
参数名称 | 类型 | 示例值 | description |
---|---|---|---|
af_revenue | float | 647 | 预定产生的收入 |
af_currency | 字符串 | GBP | 货币代码 |
af_price | float | 674 | 酒店的标价 |
af_content_id | 字符串 | ODIRNH | 酒店ID |
af_date_a | 字符串 | 2018/07/26 | 入住日期 |
af_date_b | 字符串 | 2018/08/01 | 退房日期 |
af_destination_a | 字符串 | 伦敦 | 用户地点 |
af_destination_b | 字符串 | Madrid | 酒店地点 |
af_class | 字符串 | Deluxe | 房型 |
af_num_adults | float | 2 | 入住人数 |
af_num_children | float | 0 | 儿童人数 |
af_hotel_score | float | 9.6 | 酒店评价的评分 |
af_preferred_star_ratings | float | 5 | 首选酒店星级 |
af_preferred_neighborhoods | 字符串 | Centro | 酒店所在的地区 |
purchase_method | 字符串 | Credit card | 购买方式 |
af_coupon_code | 字符串 | SUM2018 | 促销代码或会员积分 |
property_type | 字符串 | Hotel | 住房类型 |
new_booking | 布尔 | 真 | 用户的首次预定 |
代码示例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REVENUE, 647);
eventValue.put(AFInAppEventParameterName.CURRENCY, "GBP");
eventValue.put(AFInAppEventParameterName.PRICE, 674);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "ODIRNH");
eventValue.put(AFInAppEventParameterName.DATE_A, "2018/07/26");
eventValue.put(AFInAppEventParameterName.DATE_B, "2018/08/01");
eventValue.put(AFInAppEventParameterName.DESTINATION_A, "London");
eventValue.put(AFInAppEventParameterName.DESTINATION_B, "Madrid");
eventValue.put(AFInAppEventParameterName.CLASS, "Deluxe");
eventValue.put(AFInAppEventParameterName.NUM_ADULTS, 2);
eventValue.put(AFInAppEventParameterName.NUM_CHILDREN, 0);
eventValue.put(AFInAppEventParameterName.HOTEL_SCORE, 9.6);
eventValue.put(AFInAppEventParameterName.PREFERRED_STAR_RATINGS, 5);
eventValue.put(AFInAppEventParameterName.PREFERRED_NEIGHBORHOODS, "Centro");
eventValue.put("purchase_method", "credit card");
eventValue.put(AFInAppEventParameterName.COUPON_CODE, "SUM2018");
eventValue.put("property_type", "hotel");
eventValue.put("new_booking", true);
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "travel_booking", eventValue);
[[AppsFlyerTracker sharedTracker] trackEvent:@"travel_booking"
withValues: @{
AFEventParamRevenue: @647,
AFEventParamCurrency: @"GBP",
AFEventParamPrice: @674,
AFEventParamContentId: @"ODIRNH",
AFEventParamDateA: @"2018/07/26",
AFEventParamDateB: @"2018/08/01",
AFEventParamDestinationA: @"London",
AFEventParamDestinationB: @"Madrid",
AFEventParamClass: @"Deluxe",
AFEventParamNumAdults: @2,
AFEventParamNumChildren: @0,
AFEventParamHotelScore: @9.6,
AFEventParamPreferredStarRatings: @5,
AFEventParamPreferredNeighborhoods: @"Centro",
@"purchase_method": @"credit card",
AFEventParamCouponCode: @"SUM2018",
@"property_type": @"hotel",
@"new_booking": @TRUE
}];
AppsFlyerTracker.shared().trackEvent("travel_booking", withValues: [
AFEventParamRevenue: 647,
AFEventParamCurrency: "GBP",
AFEventParamPrice: 674,
AFEventParamContentId: "ODIRNH",
AFEventParamDateA: "2018/07/26",
AFEventParamDateB: "2018/08/01",
AFEventParamDestinationA: "London",
AFEventParamDestinationB: "Madrid",
AFEventParamClass: "Deluxe",
AFEventParamNumAdults: 2,
AFEventParamNumChildren: 0,
AFEventParamHotelScore: 9.6,
AFEventParamPreferredStarRatings: 5,
AFEventParamPreferredNeighborhoods: "Centro",
"purchase_method": "credit card",
AFEventParamCouponCode: "SUM2018",
"property_type": "hotel",
"new_booking": true
]);
Dictionary<string, string> TravelBooking =
new Dictionary<string, string>();
TravelBooking.Add("af_revenue", "647");
TravelBooking.Add("af_currency", "GBP");
TravelBooking.Add("af_price", "674");
TravelBooking.Add("af_content_id", "ODIRNH");
TravelBooking.Add("af_date_a", "2018/07/26");
TravelBooking.Add("af_date_b", "2018/08/01");
TravelBooking.Add("af_destination_a", "London");
TravelBooking.Add("af_destination_b", "Madrid");
TravelBooking.Add("af_class", "Deluxe");
TravelBooking.Add("af_num_adults", "2");
TravelBooking.Add("af_num_children", "0");
TravelBooking.Add("af_hotel_score", "9.6");
TravelBooking.Add("af_preferred_star_ratings", "5");
TravelBooking.Add("af_preferred_neighborhoods", "Centro");
TravelBooking.Add("purchase_method", "credit card");
TravelBooking.Add("af_coupon_code", "SUM2018");
TravelBooking.Add("af_property_type", "hotel");
TravelBooking.Add("af_new_booking", "true");
AppsFlyer.trackRichEvent("travel_booking", TravelBooking);