Anuncios de vuelos: eventos

Los anuncios de vuelos usan cuatro eventos. Cada evento tiene un conjunto de parámetros (consulta los detalles de los parámetros de eventos). Usa el píxel de Facebook en tu sitio web y los eventos de la aplicación para celulares en tu aplicación para Android o iOS.

EventoCuándo se activaCódigo de ejemplo

Search

En la página de resultados de búsqueda del vuelo

Píxel, Android, iOS

ViewContent

Cuando el usuario ya seleccionó los vuelos

Píxel, Android, iOS

InitiateCheckout

Cuando el usuario ingresa en la pantalla de pago

Píxel, Android, iOS

Purchase

En la página de confirmación de la reserva

Píxel, Android, iOS

Píxel de Facebook (para sitios web)

En esta guía, se asume que ya tienes instalado el píxel de Facebook. Si no es así, consulta Usar la API de marketing con el píxel.

Asegúrate de que el código base del píxel ya esté cargado cuando actives un evento. Si usas un administrador de etiquetas, asegúrate de incluir la etiqueta que contiene el código del píxel en cada página. Esta etiqueta debe aparecer antes de la que contiene el código de evento del píxel. Usa el asistente para píxeles de Facebook a fin de validar la implementación del píxel.

Evento "Search" del píxel

// 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'
});

Evento "ViewContent" del píxel

// 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'
});

Evento "InitiateCheckout"

// 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'
});

Evento "Purchase"

// 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
});

Eventos de la aplicación para celulares para Android

En esta guía, se asume que tienes el SDK de Facebook implementado en tu aplicación para celulares para Android. De lo contrario, consulta SDK para Android. Si usas un socio de medición, asegúrate de que este pase los eventos necesarios a Facebook.

Evento "Search" de Android

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
);

Evento "ViewContent" de Android

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
);

Evento "InitiateCheckout" de Android

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
);

Evento "Purchase" de Android

// 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
);

Eventos de la aplicación para celulares para iOS

En esta guía, se asume que ya tienes el SDK de Facebook implementado en tu aplicación para celulares para iOS. De lo contrario, consulta SDK para iOS. Si usas un socio de medición, asegúrate de que este pase los eventos necesarios a Facebook.

Evento "Search" de iOS

// 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"
  }
];

Evento "ViewContent" de iOS

// 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"
  }
];

Evento "InitiateCheckout" de iOS

// 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"
  }
];

Evento "Purchase" de iOS

// 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"
  }
];

Detalles de los parámetros de eventos

En el celular, los nombres de los parámetros son diferentes con respecto al píxel de Facebook. A menudo, tienen fb_ antepuesto, pero hay varias excepciones, como value que corresponde a _valueToSum.

Nombre y tipo de parámetroDescripción

content_type para píxel de FB

fb_content_type para eventos de la app

Tipo: cadena o cadena[]

Recomendado.

Debe ser flight. Si se combina con otros productos de anuncios de viajes, como hoteles, usa '["flight", "hotel"]'.

departing_departure_date, para píxel de FB

fb_departing_departure_date, para eventos de la app

Tipo: cadena

Muy recomendado.

Fecha y hora del inicio del trayecto de salida. Aceptamos fechas en YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, así como también YYYY-MM-DDThh:mm:ssTZD. Cuando se proporcione, puedes usarlo en el anuncio mediante etiquetas de plantillas y dirigirte a las personas con base en sus fechas de viaje por medio del uso de intervalos de reserva en tus públicos.

Ejemplos:

  • 20180623
  • 2018-06-23
  • 2017-06-23T15:30GMT
  • 2017-06-23T15:30:00GMT

returning_departure_date, píxel de Facebook

fb_returning_departure_date, eventos de la app

Tipo: cadena

Muy recomendado los para viajes de ida y vuelta.

Fecha y hora del inicio del trayecto de regreso. Aceptamos los mismos formatos de fecha que para departing_departure_date. Cuando se proporcione, puedes usarlo en el anuncio mediante etiquetas de plantillas y dirigirte a las personas con base en sus fechas de viaje por medio del uso de intervalos de reserva en tus públicos.

currency, píxel de Facebook

fb_currency, eventos de la app

Tipo: cadena

Obligatorio para purchase.

Divisa para value. Se especifica usando el formato de divisa ISO 4217.

Ejemplo: USD

value píxel de Facebook

_valueToSum, eventos de la app

Tipo: flotante

Obligatorio para purchase.

Precio total de la reserva. Este número cuantifica el valor de este evento para el anunciante.

Ejemplo: 155

departing_arrival_date, píxel de Facebook

fb_departing_arrival_date, eventos de la app

Tipo: cadena

Fecha y hora de la llegada al destino del trayecto de salida. Usa los mismos formatos de fecha que para departing_departure_date.

returning_arrival_date, píxel de Facebook

fb_returning_arrival_date, eventos de la app

Tipo: cadena

Fecha y hora en que se completa el trayecto de regreso. Usa los mismos formatos de fecha que para departing_departure_date.

destination_ids, píxel de Facebook fb_destination_ids, eventos de la app de Facebook

Tipo: cadena o cadena[]

Si tienes un catálogo de destinos, puedes asociar uno o más con un evento de vuelo concreto. Por ejemplo, puedes vincular una ruta concreta a un museo y una playa cercanos, ambos destinos incluidos en tu catálogo.

Ejemplo: '["dest2", "dest5", "dest8"]'

num_adults, píxel de Facebookfb_num_adults, eventos de la app

Tipo: cadena

Número de adultos que volarán. Cuando se proporciona, puedes mostrarlo en el anuncio mediante etiquetas de plantillas.

Ejemplo: 2

num_children, píxel de Facebook

fb_num_children, eventos de la app

Tipo: entero

Número de niños que volarán. Cuando se proporciona, puedes mostrarlo en el anuncio mediante etiquetas de plantillas.

Ejemplo: 2

num_infants, píxel de Facebook

fb_num_infants, eventos de la app

Tipo: entero

Número de infantes que volarán. Cuando se proporciona, puedes mostrarlo en el anuncio mediante etiquetas de plantillas.

Ejemplo: 2

price, píxel de Facebook

fb_price, eventos de la app

Tipo: flotante

Precio más bajo entre los resultados de búsqueda para la ruta y las fechas seleccionadas. Solo para el evento Search.

Ejemplo: 95

travel_class, píxel de Facebook

fb_travel_class, eventos de la app

Tipo: cadena

Debe ser economy, premium, business o first.

Ejemplo: economy

user_score, píxel de Facebook

fb_user_score, eventos de la app

Tipo: flotante

Representa el valor relativo de este cliente potencial para el anunciante.

Ejemplo: 50

preferred_num_stops, píxel de Facebook fb_preferred_num_stops, eventos de la app

Tipo: entero

Indica el número preferido de escalas que el usuario busca. 0 para vuelos directos.

Ejemplo: 0