Anúncios de voo usam quatro eventos. Cada evento tem um conjunto de parâmetros, confira os detalhes dos parâmetros de eventos. Use o Pixel do Facebook no seu site e os Eventos do Aplicativo para celular no seu aplicativo para Android e aplicativo para iOS.
Evento | Quando disparar | Exemplo de código |
---|---|---|
| Na página de resultados da pesquisa de voos | |
| Quando o usuário selecionou o(s) voo(s) | |
| Quando o usuário acessa a tela de pagamento | |
| Na página de confirmação da reserva |
Este guia presume que você já tenha um pixel do Facebook instalado. Caso contrário, veja Como usar a API de Marketing com o pixel
Ao disparar um evento, certifique-se de que o código básico do pixel já esteja carregado. Se você usar um gerenciador de tags, inclua a tags que contém o código do pixel em cada página. A tag deve aparecer antes da tag que contém o código de evento do pixel. Use o Auxiliar de Pixel do Facebook para validar a implementação do pixel.
// 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 });
Este guia presume que você tenha implementado o SDK do Facebook no seu aplicativo móvel para Android. Caso você não tenha feito isso, consulte o SDK do Android. Se você utiliza um parceiro de mensuração, verifique se ele transmite os eventos necessários para o 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 );
Este guia presume que você já tenha implementado o SDK do Facebook no seu aplicativo móvel para iOS. Caso não tenho feito isso, consulte o SDK do iOS. Se você utiliza um parceiro de mensuração, verifique se ele transmite os eventos necessários para o 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" } ];
Em ambiente móvel, os nomes de parâmetros são diferentes dos exibidos no Pixel do Facebook. Geralmente, são precedidos por fb_
, com algumas exceções, como value
em vez de _valueToSum
.
Nome e tipo do parâmetro | Descrição |
---|---|
Tipo: string ou string[] | Recomendado. Deve ser |
tipo: string | Altamente recomendado. A data e hora de início da viagem de ida. Aceitamos datas nos formatos Exemplos:
|
tipo: string | Altamente recomendado para viagens de ida e volta. Data e hora de início da viagem de volta. Aceitamos os mesmos formatos de data listados para |
tipo: string | Obrigatório para A moeda de Exemplo: |
tipo: float | Obrigatório para Um preço total da reserva. Esse número quantifica o valor deste evento para o anunciante. Exemplo: |
tipo: string | A data e hora de chegada ao destino da viagem de ida. Use os mesmos formatos de data listados para |
tipo: string | A data e a hora em que a viagem de retorno é concluída. Use os mesmos formatos de data listados para |
Tipo: string ou string[] | Se você tiver um catálogo de destinos, poderá associar um ou mais destinos neste catálogo a um evento de voo específico. Por exemplo, vincule uma rota específica a um museu e a uma praia próximos, ambos destinos no catálogo. Exemplo: |
tipo: string | Número de adultos no voo. Quando fornecido, isso pode ser exibido no anúncio usando tags de modelo. Exemplo: |
tipo: número inteiro | Número de crianças no voo. Quando fornecido, isso pode ser exibido no anúncio usando tags de modelo. Exemplo: |
tipo: número inteiro | Número de bebês no voo. Quando fornecido, isso pode ser exibido no anúncio usando tags de modelo. Exemplo: |
tipo: float | O menor preço dos resultados da pesquisa para a rota e as datas selecionadas. Somente para o evento Exemplo: |
tipo: string | Deve ser Exemplo: |
tipo: float | Representa o valor relativo desse cliente potencial para o anunciante. Exemplo: |
tipo: número inteiro | Indica o número preferido de paradas que o usuário está procurando. Exemplo: |