概要:ホテル予約アプリで推奨されるアプリ内イベントを記録して、ユーザージャーニー全体を通じてユーザーの質を計測しましょう。
ホテル予約
ホテル予約アプリを使用すると、簡単にホテルを予約できるだけでなく、最も優れた割引価格を選ぶことができます。計測をお勧めする一般的なイベントは、検索、購入、旅行の予約、ウィッシュリストへ追加などです。
これらのイベントを計測することで、次のような判断に役立ちます。
- どのキャンペーンやメディアソースが実際に旅行を予約するユーザーをもたらしているか
- どのキャンペーンやメディアソースが最も多く予約し、収益性の高いユーザーをもたらしているか
ホテルの評価、季節、国、子供の数などの設定を、特定のメディアソースから訪れるユーザーに紐づけることができます。そして、それらのユーザー設定をターゲティングすることでキャンペーンを最適化できます。
アプリ内イベント計測の詳細については、リッチアプリ内イベントガイドを参照してください。
規定イベントで推奨される構造
次のセクションでは、ホテル予約アプリで一般的なイベント構造のリストを示しています。各構造には、既定のイベント名と推奨されるイベントパラメーターが含まれています。アプリ内イベントには、ビジネスニーズを満たす任意のイベントパラメーターを含めることができます。
登録完了 (af_complete_registration)
目的
アプリをインストールしてサインアッププロセスを完了したユーザー数、ユーザーが好むサインアップ方法、実際にサインアップするユーザーを引き付けるメディアソースについて理解しましょう。
トリガー
ユーザーがサインアップ手順を完了したとき
イベントパラメータ
カラム名 | 説明 | 値の例: |
---|---|---|
af_registration_method | サインアップ方法のタイプ | Email、Facebook |
コードの例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REGSITRATION_METHOD, "Facebook");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), AFInAppEventType.COMPLETE_REGISTRATION, eventValue);
[[AppsFlyerLib shared] logEvent:AFEventCompleteRegistration
withValues: @{
AFEventParamRegistrationMethod: @"Facebook"
}];
AppsFlyerLib.shared().logEvent(AFEventCompleteRegistration,
withValues: [
AFEventParamRegistrationMethod: "Facebook"
]);
Dictionary<string, string> CompletedRegistrationEvent = new Dictionary<string, string>();
CompletedRegistrationEvent.Add("af_registration_method", "Facebook");
AppsFlyer.sendEvent ("af_complete_registration", CompletedRegistrationEvent);
ログイン (af_login)
目的
登録ユーザーのリテンションを理解しましょう
トリガー
ユーザーが正常にログインしたとき
イベントパラメータ
パラメーターなしで送信できます
コードの例
AppsFlyerLib.getInstance().logEvent(getApplicationContext(),
AFInAppEventType.LOGIN, null);
[[AppsFlyerLib shared] logEvent:AFEventLogin
withValues: nil
];
AppsFlyerLib.shared().logEvent(AFEventLogin, withValues: nil);
AppsFlyer.sendEvent ("af_login", null);
検索 (af_search)
目的
ユーザーが探しているものを知り、どの検索結果が最も関連性が高く購入に繋がったかを理解しましょう。さらに、特定の地域のユーザーが何を検索しているかを確認し、これに応じて、さまざまなメディアソースでターゲットを定めることができます。
トリガー
ユーザーが検索を実行したとき
イベントパラメータ
名称 | 説明 | 値の例: |
---|---|---|
af_date_a | チェックイン日 | 2018/07/26 |
af_date_b | チェックアウト日 | 2018/08/01 |
af_destination_a | ユーザーロケーション | London |
af_destination_b | ホテルの場所 | Madrid |
af_num_adults | 宿泊者数 | 2 |
af_num_children | 子供の数 | 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().logEvent(getApplicationContext(), AFInAppEventType.SEARCH, eventValue);
[[AppsFlyerLib shared] logEvent:AFEventSearch
withValues: @{
AFEventParamDateA: @"2018/07/26",
AFEventParamDateB: @"2018/08/01",
AFEventParamDestinationA: @"London",
AFEventParamDestinationB: @"Madrid",
AFEventParamNumAdults: @2,
AFEventParamNumChildren: @0
}];
AppsFlyerLib.shared().logEvent(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.sendEvent("af_add_to_wish_list", Search);
コンテンツ表示 (af_content_view)
目的
このイベントは、次のような判断に役立ちます。
- 検索結果が検索キーワードと関連性があるかを把握します。
- ユーザーが探しているプロパティの種類
- 季節的なトレンド
- 人気のある場所
- 広告やプロモーションでユーザーを引き寄せ、そのユーザーをリターゲティングするメディアソースはどれか
トリガー
ユーザーが物件を閲覧しているとき
イベントパラメータ
名称 | 説明 | 値の例: |
---|---|---|
af_price | ホテルの定価 | 674 |
af_content_id | ホテルID | ODIRNH |
af_date_a | チェックイン日 | 2018/07/26 |
af_date_b | チェックアウト日 | 2018/08/01 |
af_destination_a | ユーザーロケーション | London |
af_destination_b | ホテルの場所 | Madrid |
af_class | 客室タイプ | デラックス |
af_num_adults | 宿泊者数 | 2 |
af_num_children | 子供の数 | 0 |
af_hotel_score | ホテルのレビュー評価 | 9.6 |
af_preferred_star_ratings | 希望するホテルの星評価 | 5 |
af_preferred_neighborhoods | ホテルが位置するエリア | 中心部 |
コードの例
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().logEvent(getApplicationContext(), AFInAppEventType.CONTENT_VIEW, eventValue);
[[AppsFlyerLib shared] logEvent: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"
}];
AppsFlyerLib.shared().logEvent(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.sendEvent("af_content_view", ContentView);
ウィッシュリストに追加 (af_add_to_wishlist)
目的
ユーザーが予約に関心のあるホテルと目的地を記録します。例えば、ユーザーが探しているホテル、地域、評価が分かれば、このデータを使用してユーザーをリターゲティングできます。
トリガー
ユーザーがウィッシュリストにリストを追加したとき
イベントパラメータ
名称 | 説明 | 値の例: |
---|---|---|
af_price | ホテルの定価 | 674 |
af_content_id | ホテルID | ODIRNH |
af_date_a | チェックイン日 | 2018/07/26 |
af_date_b | チェックアウト日 | 2018/08/01 |
af_destination_a | ユーザーロケーション | London |
af_destination_b | ホテルの場所 | Madrid |
af_class | 客室タイプ | デラックス |
af_num_adults | 宿泊者数 | 2 |
af_num_children | 子供の数 | 0 |
af_hotel_score | ホテルのレビュー評価 | 9.6 |
af_preferred_star_ratings | 希望するホテルの星評価 | 5 |
af_preferred_neighborhoods | ホテルが位置するエリア | 中心部 |
purchase_method | 購入方法 | クレジットカード |
af_coupon_code | プロモーションコードまたはロイヤルティー報酬ポイント | SUM2018 |
property_type | 物件タイプ | ホテル |
コードの例
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().logEvent(getApplicationContext(), AFInAppEventType.ADD_TO_WISH_LIST, eventValue);
[[AppsFlyerLib shared] logEvent: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"
}];
AppsFlyerLib.shared().logEvent(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.sendEvent("af_add_to_wish_list", AddToWishList);
チェックアウト開始 (af_initiated_checkout)
目的
購入者がチェックアウトを開始する際の行動を理解しましょう。このイベントは、次のような判断に役立ちます。
- クレジットカードやeウォレットなど、どのような購入方法が使用されたか
- ユーザーがチェックアウトを完了したかどうか
トリガー
ユーザーがクレジットカード情報を追加、またはeウォレットを接続したとき
イベントパラメータ
名称 | 説明 | 値の例: |
---|---|---|
af_price | ホテルの定価 | 674 |
af_content_id | ホテルID | ODIRNH |
af_date_a | チェックイン日 | 2018/07/26 |
af_date_b | チェックアウト日 | 2018/08/01 |
af_destination_a | ユーザーロケーション | London |
af_destination_b | ホテルの場所 | Madrid |
af_class | 客室タイプ | デラックス |
af_num_adults | 宿泊者数 | 2 |
af_num_children | 子供の数 | 0 |
af_hotel_score | ホテルのレビュー評価 | 9.6 |
af_preferred_star_ratings | 希望するホテルの星評価 | 5 |
af_preferred_neighborhoods | ホテルが位置するエリア | 中心部 |
purchase_method | 購入方法 | クレジットカード |
af_coupon_code | プロモーションコードまたはロイヤルティー報酬ポイント | SUM2018 |
property_type | 物件タイプ | ホテル |
コードの例
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().logEvent(getApplicationContext(), AFInAppEventType.INITIATED_CHECKOUT, eventValue);
[[AppsFlyerLib shared] logEvent: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"
}];
AppsFlyerLib.shared().logEvent(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.sendEvent("af_initiated_chekcout", InitiatedCheckout);
購入 (af_purchase)
目的
ホテル予約アプリの購入トレンドを理解しましょう。このイベントを計測すると、次のことに役立ちます。
- アドネットワークと広告代理店間のユーザーのLTV(顧客生涯価値)とキャンペーンのROIを判断します。
- どのようなオファーがユーザーに最も人気があるのかを特定します。
- キャンペーンのターゲティングを最適化するために、購入されたアイテムとキャンペーンを相互参照します。
トリガー
購入が正常に完了しユーザーに「ありがとうございました」が表示されたとき
イベントパラメータ
名称 | 説明 | 値の例: |
---|---|---|
af_revenue | 購入による収益の予測 | 1205.99 |
af_price | 全体の購入金額の合計 | 4000 |
af_content_id | 商品ID | 121 |
af_content_type | 商品カテゴリ | hotel |
af_currency | Currency code | AUD |
af_quantity | カート内の商品の数 | 1 |
af_order_id | 購入後に生成されるオーダーID | X123ABC |
af_receipt_id | CRITEOとGoogle AdWordsのリターゲティング連携に必要なオーダーID | X123ABC |
コードの例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 4000);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "121");
// for multiple product categories, set the param value as: // new String {"121", "262"}
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "hotel");
// for multiple product categories,, set the param value as: new String {"hotel", "meals"}
eventValue.put(AFInAppEventParameterName.CURRENCY, "AUD");
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().logEvent(getApplicationContext(), AFInAppEventType.PURCHASE, eventValue);
[[AppsFlyerLib shared] logEvent:AFEventPurchase
withValues: @{
AFEventParamRevenue: @1205.99,
AFEventParamPrice: @4000,
AFEventParamContentId: @"121",
// for multiple product categories, set the param value as:
// @[@"121", @"124"]
AFEventParamContentType: @"hotel",
// for multiple product categories, set the param value as:
// @[@"hotel", @"meals"]
AFEventParamCurrency: @"AUD",
AFEventParamQuantity: @2,
// for multiple product categories, set the param value as:
// @[@2, @5]
AFEventParamOrderId: @"X123ABC",
AFEventParamReceiptId: @"X123ABC"
}];
AppsFlyerLib.shared().logEvent(AFEventPurchase, withValues: [
AFEventParamRevenue: 1205.99,
AFEventParamPrice: 4000,
AFEventParamContentId: "121",
// for multiple product categories, set the param value as: ["221", "124"],
AFEventParamContentType: "hotel",
// for multiple product categories, set the param value as: ["hotel", "meals"]
AFEventParamCurrency: "AUD",
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", "1205.99");
PurchaseEvent.Add("af_price", "4000");
PurchaseEvent.Add("af_content_id", "121");
// for multiple product categories, set the param value as: ["121", "124"]
PurchaseEvent.Add("af_content_type", "hotel");
// for multiple product categories, set the param value as: ["hotel", "meals"]
PurchaseEvent.Add("af_currency", "AUD");
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.sendEvent ("af_purchase", PurchaseEvent);
旅行の予約 (af_travel_booking)
目的
アプリの全体的な予約率を決定します。このイベントを計測すると、次のことに役立ちます。
- 予約から発生した収益を記録
- 子供と一緒にホテルを予約するユーザー数を把握
- 季節的なトレンドを理解
- 人気のあるホテルを決定
トリガー
ユーザーがホテルを予約した後で予約完了ページが表示されたとき
イベントパラメータ
名称 | 説明 | 値の例: |
---|---|---|
af_revenue | 予約による収益 | 647.95 |
af_currency | Currency code | GBP |
af_price | ホテルの定価 | 674 |
af_content_id | ホテルID | ODIRNH |
af_date_a | 2018/07/26 | チェックイン日 |
af_date_b | チェックアウト日 | 2018/08/01 |
af_destination_a | ユーザーロケーション | London |
af_destination_b | ホテルの場所 | Madrid |
af_class | 客室タイプ | デラックス |
af_num_adults | 宿泊者数 | 2 |
af_num_children | 子供の数 | 0 |
af_hotel_score | ホテルのレビュー評価 | 9.6 |
af_preferred_star_ratings | 希望するホテルの星評価 | 5 |
af_preferred_neighborhoods | ホテルが位置するエリア | 中心部 |
purchase_method | 購入方法 | クレジットカード |
af_coupon_code | プロモーションコードまたはロイヤルティー報酬ポイント | SUM2018 |
property_type | 物件タイプ | ホテル |
new_booking | ユーザーの初回予約 | true |
コードの例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.REVENUE, 647.95);
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().logEvent(getApplicationContext(), AFInAppEventType.TRAVEL_BOOKING, eventValue);
[[AppsFlyerLib shared] logEvent:AFEventTravelBooking
withValues: @{
AFEventParamRevenue: @647.95,
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
}];
AppsFlyerLib.shared().logEvent(AFEventTravelBooking, withValues: [
AFEventParamRevenue: 647.95,
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.95");
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.sendEvent("af_travel_booking", TravelBookingEvent);
カスタムイベントで推奨される構造
次のセクションでは、カスタムビエント名と推奨されるイベントパラメーターのイベント構造リストを示しています。アプリ内イベントには、ビジネスニーズを満たすどんなイベントパラメーターを含めることができます。
初回購入 (first_purchase)
目的
購入イベントと同じです。さらに、このイベントは次のことを判断するのに役立ちます。
- 新規購入者が購入するまでにどれくらいの時間がかかるのか
- どの商品が初回購入時に購入されやすいか
- 初回購入の平均的な価格と収益
トリガー
ユーザーが最初の購入を完了したとき
イベントパラメータ
名称 | 説明 | 値の例: |
---|---|---|
af_revenue | 購入からの収益 | 1205.95 |
af_price | 全体の購入金額の合計 | 4000 |
af_content_id | 商品ID | 121, 262 |
af_content_type | 商品カテゴリ | hotel |
af_currency | 通貨 | AUD |
af_quantity | カート内の商品の数 | 1 |
af_order_id | 購入後に生成されるオーダーID | X123ABC |
af_receipt_id |
CRITEOとGoogle AdWordsのリターゲティング連携に必要なオーダーID |
X123ABC |
コードの例
Map<String, Object> eventValue = new HashMap<String, Object>();
eventValue.put(AFInAppEventParameterName.PRICE, 4000);
eventValue.put(AFInAppEventParameterName.CONTENT_ID, "221");
// for multiple product categories, set the param value as: new String {"221", "124"}
eventValue.put(AFInAppEventParameterName.CONTENT_TYPE, "hotel");
// for multiple product categories set the param value as: new String {"hotel", "meals"}
eventValue.put(AFInAppEventParameteName.CURRENCY, "USD");
eventValue.put(AFInAppEventParameterName.QUANTITY, 2);
// for multiple product categories, set the param value as: new int {1}
eventValue.put(AFInAppEventParameterName.RECEIPT_ID, "X123ABC");
eventValue.put("af_order_id", "X123ABC");
AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "first_purchase", eventValue);
[[AppsFlyerLib shared] logEvent:("first_purchase")
withValues: @{
AFEventParamRevenue: @1205.95,
AFEventParamPrice: @4000,
AFEventParamContentId: @"221",
// for multiple product categories, set the param value as: @[@"221", @"124"]
AFEventParamContentType: @"hotel",
// for multiple product categories, set the param value as: @[@"hotel", @"meals"]
AFEventParamCurrency: @"USD",
AFEventParamQuantity: @2,
// for multiple product categories, set the param value as: @[@1]
AFEventParamOrderId: @"X123ABC",
AFEventParamReceiptId: @"X123ABC"
}];
AppsFlyerLib.shared().logEvent("first_purchase", withValues: [
AFEventParamRevenue: 1205.95,
AFEventParamPrice: 4000,
AFEventParamContentId: "221",
// for multiple product categories, set the param value as: ["221", "124"]
AFEventParamContentType: "hotel",
// for multiple product categories, set the param value as: ["hotel", "meals"]
AFEventParamCurrency: "USD",
AFEventParamQuantity: 2,
// for multiple product categories, set the param value as: // [1]
AFEventParamOrderId: "X123ABC",
AFEventParamReceiptId: "X123ABC"
]);
Dictionary<string, string> FirstPurchaseEvent = new Dictionary<string, string>();
FirstPurchaseEvent.Add("af_revenue", "1205.95");
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", "hotel");
// for multiple product categories, set the param value as: ["hotel", "meals"]
FirstPurchaseEvent.Add("af_currency", "USD");
FirstPurchaseEvent.Add("af_quantity", "2");
// for multiple product categories, set the param value as: [1]
FirstPurchaseEvent.Add("af_order_id", "X123ABC");
FirstPurchaseEvent.Add("af_receipt_id", "X123ABC");
AppsFlyer.sendEvent ("first_purchase", FirstPurchaseEvent);