這份指南會假設您已安裝 Facebook 像素。如尚未安裝,請參閱針對像素使用行銷 API。
請在觸發事件時,確定已載入像素基底程式碼。如果使用標籤管理員,請務必將內含像素程式碼的標籤包括在每個網頁中。這個標籤應該顯示在內含像素事件程式碼的標籤之前。請利用 Facebook 像素協助工具驗證您的像素實作方式。
// This sample assumes the Facebook pixel base code is already loaded fbq('track', 'Search', { // Fire the 'Search' event on the search results page // IF YOU DO NOT TO USE A RECOMMENDED PARAM, THEN REMOVE, DON'T LEAVE EMPTY // RECOMMENDED: set to 'flight' content_type: 'flight', // HIGHLY RECOMMENDED: departure date // Allows you to target people based on their travel dates, using a booking window // Improves the landing experience with travel dates filled in using template tags // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD departing_departure_date: '2018-12-12', // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD returning_departure_date: '2018-12-19', // REQUIRED: use official IATA code of departure airport origin_airport: 'SFO', // REQUIRED: use official IATA code of destination airport destination_airport: 'JFK', // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD departing_arrival_date: '2018-12-12', // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD returning_arrival_date: '2018-12-20', // RECOMMENDED: number of adults on flight num_adults: 1, // RECOMMENDED: number of children on flight num_children: 0, // RECOMMENDED: number of infants num_infants: 0, // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' travel_class : 'economy', // RECOMMENDED: price for the flight // Use lowest price if you show multiple options on this page // Should not include cost of extras, such as seat selection, extra luggage price : 100, // RECOMMENDED: currency of the flight price // Must match currency of catalog currency: 'USD' });
// This sample assumes the FB Pixel base code is already loaded fbq('track', 'ViewContent', { // Fire the 'ViewContent' event when the user has selected the flight(s) // IF YOU DO NOT TO USE A RECOMMENDED PARAM, REMOVE IT, DON'T LEAVE EMPTY // RECOMMENDED: set to 'flight' content_type: 'flight', // HIGHLY RECOMMENDED: departure date // Allows you to target people based on their travel dates, using a booking window // Improves the landing experience with travel dates filled in, using template tags // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD departing_departure_date: '2018-12-12', // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD returning_departure_date: '2018-12-19', // REQUIRED: use official IATA code of departure airport origin_airport: 'SFO', // REQUIRED: use official IATA code of destination airport destination_airport: 'JFK', // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD departing_arrival_date: '2018-12-12', // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD returning_arrival_date: '2018-12-20', // RECOMMENDED: number of adults on flight num_adults: 1, // RECOMMENDED: number of children on flight num_children: 0, // RECOMMENDED: number of infants num_infants: 0, // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' travel_class : 'economy' });
// Assumes FB Pixel base code already loaded fbq('track', 'InitiateCheckout', { // Fire the 'InitiateCheckout' event when the user enters the payment screen // IF YOU DO NOT TO USE A RECOMMENDED PARAM, THEN REMOVE, DON'T LEAVE IT EMPTY // RECOMMENDED: set to 'flight' content_type: 'flight', // HIGHLY RECOMMENDED: departure date // Allows you to target people based on their travel dates, using a booking window // Improves the landing experience with travel dates filled in, using template tags // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD departing_departure_date: '2018-12-12', // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD returning_departure_date: '2018-12-19', // REQUIRED: use official IATA code of departure airport origin_airport: 'SFO', // REQUIRED: use official IATA code of destination airport destination_airport: 'JFK', // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD departing_arrival_date: '2018-12-12', // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD returning_arrival_date: '2018-12-20', // RECOMMENDED: number of adults on flight num_adults: 1, // RECOMMENDED: number of children on flight num_children: 0, // RECOMMENDED: number of infants num_infants: 0, // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' travel_class : 'economy' });
// Assumes FB Pixel base code already loaded fbq('track', 'Purchase', { // Fire the 'Purchase' event on the booking confirmed page // IF YOU DO NOT TO USE A RECOMMENDED PARAM, REMOVE IT, DON'T LEAVE EMPTY // RECOMMENDED: set to 'flight' content_type: 'flight', // HIGHLY RECOMMENDED: departure date // Allows you to target people based on their travel dates, using a booking window // Improves the landing experience with travel dates filled in, using template tags // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD departing_departure_date: '2018-12-12', // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD returning_departure_date: '2018-12-19', // REQUIRED: use official IATA code of departure airport origin_airport: 'SFO', // REQUIRED: use official IATA code of destination airport destination_airport: 'JFK', // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD departing_arrival_date: '2018-12-12', // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD returning_arrival_date: '2018-12-20', // RECOMMENDED: number of adults on flight num_adults: 1, // RECOMMENDED: number of children on flight num_children: 0, // RECOMMENDED: number of infants num_infants: 0, // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' travel_class : 'economy', // REQUIRED: Currency of payment // Must match currency of catalog currency: 'USD', // Total payment amount: flight price + extras + payment charges etc value: 150 });
這份指南會假設您已在 Android 行動應用程式實作 Facebook SDK。如尚未實作,請參閱 Android SDK。如使用衡量合作夥伴,請確定合作夥伴是否將必要事件傳遞給 Facebook。
Bundle parameters = new Bundle(); // IF YOU DO NOT USE A RECOMMENDED PARAM, REMOVE IT, DON'T LEAVE IT EMPTY // RECOMMENDED: set to 'flight' parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "flight"); // HIGHLY RECOMMENDED: departure date // Allows you to target people based on their travel dates, using a booking window // Improves the landing experience with travel dates filled in, using template tags // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_departing_departure_date", "2018-12-12"); // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_returning_departure_date", "2018-12-19"); // REQUIRED: use official IATA code of departure airport parameters.putString("fb_origin_airport", "SFO"); // REQUIRED: use official IATA code of destination airport parameters.putString("fb_destination_airport", "JFK"); // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_departing_arrival_date", "2018-12-12"); // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_returning_arrival_date", "2018-12-20"); // RECOMMENDED: number of adults on flight parameters.putInt("fb_num_adults", 1); // RECOMMENDED: number of children on flight parameters.putInt("fb_num_children", 0); // RECOMMENDED: number of infants parameters.putInt("fb_num_infants", 0); // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' parameters.putString("fb_travel_class", "economy"); // RECOMMENDED: price for the flight // Use lowest price if you show multiple options on this page // Should not include cost of extras (seat selection, extra luggage etc) parameters.putFloat("fb_price", 100.00); // RECOMMENDED: currency of the flight price // Must match currency of catalog parameters.putString("fb_currency", "USD"); // Fire the 'Search' event on the search results page logger.logEvent( AppEventsConstants.EVENT_NAME_SEARCHED, parameters );
Bundle parameters = new Bundle(); // IF YOU DO NOT USE A RECOMMENDED PARAM, REMOVE IT, DON'T LEAVE EMPTY // RECOMMENDED: set to 'flight' parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "flight"); // HIGHLY RECOMMENDED: departure date // Allows you to target people based on their travel dates, using a booking window // Improves the landing experience with travel dates filled in, using template tags // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_departing_departure_date", "2018-12-12"); // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_returning_departure_date", "2018-12-19"); // REQUIRED: use official IATA code of departure airport parameters.putString("fb_origin_airport", "SFO"); // REQUIRED: use official IATA code of destination airport parameters.putString("fb_destination_airport", "JFK"); // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_departing_arrival_date", "2018-12-12"); // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_returning_arrival_date", "2018-12-20"); // RECOMMENDED: number of adults on flight parameters.putInt("fb_num_adults", 1); // RECOMMENDED: number of children on flight parameters.putInt("fb_num_children", 0); // RECOMMENDED: number of infants parameters.putInt("fb_num_infants", 0); // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' parameters.putString("fb_travel_class", "economy"); // Fire the 'ViewContent' event when the user has selected the flight logger.logEvent( AppEventsConstants.EVENT_NAME_VIEWED_CONTENT, parameters );
Bundle parameters = new Bundle(); // IF YOU DO NOT USE A RECOMMENDED PARAM, REMOVE IT, DON'T LEAVE EMPTY // RECOMMENDED: set to 'flight' parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "flight"); // HIGHLY RECOMMENDED: departure date // Allows you to target people based on their travel dates, using a booking window // Improves the landing experience with travel dates filled in (using template tags) // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_departing_departure_date", "2018-12-12"); // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_returning_departure_date", "2018-12-19"); // REQUIRED: use official IATA code of departure airport parameters.putString("fb_origin_airport", "SFO"); // REQUIRED: use official IATA code of destination airport parameters.putString("fb_destination_airport", "JFK"); // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_departing_arrival_date", "2018-12-12"); // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_returning_arrival_date", "2018-12-20"); // RECOMMENDED: number of adults on flight parameters.putInt("fb_num_adults", 1); // RECOMMENDED: number of children on flight parameters.putInt("fb_num_children", 0); // RECOMMENDED: number of infants parameters.putInt("fb_num_infants", 0); // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' parameters.putString("fb_travel_class", "economy"); // Fire the 'InitiateCheckout' event when the user enters the payment screen logger.logEvent( AppEventsConstants.EVENT_NAME_INITIATED_CHECKOUT, parameters );
// REQUIRED: total value of booking BigDecimal purchaseAmount = BigDecimal.valueOf(1200); // REQUIRED: currency of booking Currency currency = Currency.getInstance("USD"); Bundle parameters = new Bundle(); // IF YOU DO NOT USE A RECOMMENDED PARAM, REMOVE IT, DON'T LEAVE IT EMPTY // RECOMMENDED: set to 'flight' parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, "flight"); // HIGHLY RECOMMENDED: departure date // Allows you to target people based on their travel dates, using a booking window // Improves the landing experience with travel dates filled in, using template tags // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_departing_departure_date", "2018-12-12"); // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_returning_departure_date", "2018-12-19"); // REQUIRED: use official IATA code of departure airport parameters.putString("fb_origin_airport", "SFO"); // REQUIRED: use official IATA code of destination airport parameters.putString("fb_destination_airport", "JFK"); // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_departing_arrival_date", "2018-12-12"); // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD parameters.putString("fb_returning_arrival_date", "2018-12-20"); // RECOMMENDED: number of adults on flight parameters.putInt("fb_num_adults", 1); // RECOMMENDED: number of children on flight parameters.putInt("fb_num_children", 0); // RECOMMENDED: number of infants parameters.putInt("fb_num_infants", 0); // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' parameters.putString("fb_travel_class", "economy"); // Use the built-in SDK method when the booking is confirmed logger.logPurchase( purchaseAmount, currency, parameters );
這份指南會假設您已在 iOS 行動應用程式實作 Facebook SDK。如尚未實作,請參閱 iOS SDK。如使用衡量合作夥伴,請確定合作夥伴是否將必要事件傳遞給 Facebook。
// Fire the 'Search' event on the search results page [[FBSDKAppEvents shared] logEvent:FBSDKAppEventNameSearched // IF YOU DO NOT USE A RECOMMENDED PARAM, REMOVE IT, DON'T LEAVE EMPTY parameters:@{ // REQUIRED: DO NOT change this, must be set to 'flight' FBSDKAppEventParameterNameContentType : @"flight", // HIGHLY RECOMMENDED: departure date // Allows you to target people based on their travel dates, using a booking window // Improves the landing experience with travel dates filled in, using template tags // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_departing_departure_date" : @"2018-12-12", // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_returning_departure_date" : @"2018-12-19", // REQUIRED: use official IATA code of departure airport @"fb_origin_airport" : @"SFO", // REQUIRED: use official IATA code of destination airport @"fb_destination_airport" : @"JFK", // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_departing_arrival_date" : @"2018-12-12", // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_returning_arrival_date" : @"2018-12-20", // RECOMMENDED: number of adults on flight @"fb_num_adults" : @1, // RECOMMENDED: number of children on flight @"fb_num_children" : @0, // RECOMMENDED: number of infants @"fb_num_infants" : @0, // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' @"fb_travel_class" : @"economy", // RECOMMENDED: price for the flight // Use lowest price if you show multiple options on this page // Should not include cost of extras: seat selection, extra luggage etc @"fb_price" : @100.00, // RECOMMENDED: currency of the flight price // Must match currency of catalog @"fb_currency" : @"USD" } ];
// Fire 'ViewContent' event when the user selects the flight [[FBSDKAppEvents shared] logEvent:FBSDKAppEventNameViewedContent // IF YOU DO NOT USE A RECOMMENDED PARAM, REMOVE IT, DON'T LEAVE EMPTY parameters:@{ // DO NOT change this, must be set to 'flight' FBSDKAppEventParameterNameContentType : @"flight", // HIGHLY RECOMMENDED: departure date // Allows you to target people based on their travel dates (using a booking window) // Improves the landing experience with travel dates filled in, using template tags // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_departing_departure_date" : @"2018-12-12", // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_returning_departure_date" : @"2018-12-19", // REQUIRED: use official IATA code of departure airport @"fb_origin_airport" : @"SFO", // REQUIRED: use official IATA code of destination airport @"fb_destination_airport" : @"JFK", // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_departing_arrival_date" : @"2018-12-12", // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_returning_arrival_date" : @"2018-12-20", // RECOMMENDED: number of adults on flight @"fb_num_adults" : @1, // RECOMMENDED: number of children on flight @"fb_num_children" : @0, // RECOMMENDED: number of infants @"fb_num_infants" : @0, // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' @"fb_travel_class" : @"economy" } ];
// Fire 'InitiateCheckout' event when user reaches payment screen [[FBSDKAppEvents shared] logEvent:FBSDKAppEventNameInitiatedCheckout // IF YOU DO NOT USE A RECOMMENDED PARAM, REMOVE IT, DON'T LEAVE EMPTY parameters:@{ // REQUIRED: DO NOT change this, must be set to 'flight' FBSDKAppEventParameterNameContentType : @"flight", // HIGHLY RECOMMENDED: departure date // Allows you to target people based on their travel dates, using a booking window // Improves the landing experience with travel dates filled in, using template tags // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_departing_departure_date" : @"2018-12-12", // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_returning_departure_date" : @"2018-12-19", // REQUIRED: use official IATA code of departure airport @"fb_origin_airport" : @"SFO", // REQUIRED: use official IATA code of destination airport @"fb_destination_airport" : @"JFK", // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_departing_arrival_date" : @"2018-12-12", // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_returning_arrival_date" : @"2018-12-20", // RECOMMENDED: number of adults on flight @"fb_num_adults" : @1, // RECOMMENDED: number of children on flight @"fb_num_children" : @0, // RECOMMENDED: number of infants @"fb_num_infants" : @0, // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' @"fb_travel_class" : @"economy" } ];
// Fire 'Purchase' event when the booking confirmed // REQUIRED: total value of booking [[FBSDKAppEvents shared] logPurchase:150 // REQUIRED: currency of booking currency:@"USD" // IF YOU DO NOT USE A RECOMMENDED PARAM, REMOVE IT, DON'T LEAVE EMPTY parameters:@{ // REQUIRED: DO NOT change this, must be set to 'flight' FBSDKAppEventParameterNameContentType : @"flight", // HIGHLY RECOMMENDED: departure date // Target people based on their travel dates, using a booking window // Improves the landing experience with travel dates filled in, using template tags // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_departing_departure_date" : @"2018-12-12", // HIGHLY RECOMMENDED: return date, in case of round trip, remove otherwise // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_returning_departure_date" : @"2018-12-19", // REQUIRED: use official IATA code of departure airport @"fb_origin_airport" : @"SFO", // REQUIRED: use official IATA code of destination airport @"fb_destination_airport" : @"JFK", // RECOMMENDED: arrival date of departure flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_departing_arrival_date" : @"2018-12-12", // RECOMMENDED: arrival date of return flight // use YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD or YYYY-MM-DDThh:mm:ssTZD @"fb_returning_arrival_date" : @"2018-12-20", // RECOMMENDED: number of adults on flight @"fb_num_adults" : @1, // RECOMMENDED: number of children on flight @"fb_num_children" : @0, // RECOMMENDED: number of infants @"fb_num_infants" : @0, // RECOMMENDED: travel class // must be 'economy', 'premium', 'business' or 'first' @"fb_travel_class" : @"economy" } ];
行動裝置上的參數名稱會和 Facebook 像素的參數名稱不同,前者通常前面會加上 fb_
,但有少數例外,例如 value
相對於 _valueToSum
。
參數名稱和類型 | 說明 |
---|---|
類型:字串或字串[] | 建議使用。 必須為 |
類型:字串 | 強烈建議使用。 去程的開始日期和時間,可接受的日期格式為 範例:
|
類型:字串 | 強力建議來回行程使用。 回程的開始日期和時間,可接受的日期格式與 |
類型:字串 | 若為
範例: |
類型:浮點數 | 若為 預訂總價。這個數字可量化此事件對廣告商的價值。 範例: |
類型:字串 | 去程抵達目的地的日期和時間,使用的日期格式應與 |
類型:字串 | 回程的結束日期和時間,使用的日期格式應與 |
類型:字串或字串[] | 如果有目的地目錄,您可將目的地目錄中的一或多個目的地連結至特定航班事件。例如,可將特定航線連結至附近的博物館和沙灘,且這兩個都是目錄中的目的地。 範例: |
類型:字串 | 成人搭機人數。提供此參數時,您可透過範本標籤,使其顯示在廣告中。 範例: |
類型:整數 | 兒童搭機人數。提供此參數時,您可透過範本標籤,使其顯示在廣告中。 範例: |
類型:整數 | 嬰兒搭機人數。提供此參數時,您可透過範本標籤,使其顯示在廣告中。 範例: |
類型:浮點數 | 根據所選航線和日期,搜尋結果中顯示的最低價格。僅適用於 範例: |
類型:字串 | 必須為 範例: |
類型:浮點數 | 代表這位潛在顧客對於廣告商的相對價值。 範例: |
類型:整數 | 指出用戶搜尋時偏好的轉機次數; 範例: |