В рекламе авиарейсов используются четыре типа событий. У каждого события есть набор параметров (все они подробно описаны здесь). Используйте пиксель Facebook на своем сайте и события в мобильном приложении для Android или iOS.
Событие | Когда срабатывает | Пример кода |
---|---|---|
| На странице результатов поиска авиарейсов | |
| Когда пользователь выбрал рейс (-ы) | |
| Когда пользователь открывает экран оплаты | |
| На странице подтверждения бронирования |
В этом руководстве подразумевается, что у вас уже установлен Пиксель Facebook. Если это не так, прочитайте эту статью.
Убедитесь, что базовый код пикселя уже загружен при срабатывании события. Если вы используете менеджер тегов, убедитесь, что вы добавили тег с кодом пикселя на каждую страницу. Тег должен отображаться перед тегом, содержащим код события пикселя. Используйте Помощник по пикселям 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 });
В этом руководстве подразумевается, что в вашем мобильном приложении уже внедрен Facebook SDK. Если это не так, обратитесь к статье SDK для Android. Если вы сотрудничаете с партнером по измерениям, убедитесь, что нужные события передаются в 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. Если это не так, обратитесь к статье SDK для iOS. Если вы сотрудничаете с партнером по измерениям, убедитесь, что нужные события передаются в 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
.
Имя и тип параметра | Описание |
---|---|
Тип: строка или массив строк | Рекомендуется. Должен иметь значение |
Тип: строка | Настоятельно рекомендуется. Дата и время вылета для первого рейса. Допустимые форматы: Примеры:
|
Тип: строка | Настоятельно рекомендуется для рейсов туда и обратно. Дата и время вылета для обратного рейса. Принимаются те же форматы даты, что и для |
Тип: строка | Обязательный параметр для Валюта, в которой указано значение Пример: |
Тип: число с плавающей запятой | Обязательный параметр для Общая цена бронирования. Это число представляет собой ценность данного события для рекламодателя. Пример: |
Тип: строка | Дата и время прибытия в место назначения для первого рейса. Принимаются те же форматы даты, что и для |
Тип: строка | Дата и время завершения обратного рейса. Принимаются те же форматы даты, что и для |
Тип: строка или массив строк | Если у вас есть каталог мест назначения, можно связать одно или несколько мест с конкретным событием авиарейса. Например, определенный маршрут можно связать с музеем или пляжем поблизости, которые являются элементами каталога мест назначения. Пример: |
Тип: строка | Количество взрослых пассажиров. Если эти данные известны, их можно подставлять в объявление через теги шаблонов. Пример: |
Тип: целое число | Количество пассажиров-детей. Если эти данные известны, их можно подставлять в объявление через теги шаблонов. Пример: |
Тип: целое число | Количество пассажиров-младенцев. Если эти данные известны, их можно подставлять в объявление через теги шаблонов. Пример: |
Тип: число с плавающей запятой | Минимальная цена среди результатов поиска для выбранного маршрута и дат. Только для события Пример: |
Тип: строка | Возможные значения: Пример: |
Тип: число с плавающей запятой | Представляет собой относительную ценность потенциального клиента для рекламодателя. Пример: |
Тип: целое число | Предпочтительное количество пересадок ( Пример: |