Iklan Penerbangan - Peristiwa

Iklan Penerbangan menggunakan empat peristiwa. Setiap peristiwa memiliki set parameter, lihat detail parameter peristiwa. Gunakan Facebook Pixel di situs web Anda, dan peristiwa aplikasi seluler di aplikasi Android dan aplikasi iOS.

PeristiwaKapan MengaktifkannyaContoh Kode

Search

Di halaman hasil pencarian penerbangan

Pixel, Android, iOS

ViewContent

Saat pengguna telah memilih penerbangan

Pixel, Android, iOS

InitiateCheckout

Saat pengguna memasuki layar pembayaran

Pixel, Android, iOS

Purchase

Di halaman pemesanan dikonfirmasi

Pixel, Android, iOS

Piksel Facebook (untuk Situs web)

Panduan ini menganggap Anda sudah memasang Piksel Facebook. Jika belum, lihat Menggunakan API Marketing dengan Piksel.

Pastikan kode dasar piksel sudah dimuat saat Anda mengaktifkan peristiwa. Jika Anda menggunakan pengelola tag, pastikan Anda menyertakan tag yang berisi kode piksel di setiap halaman. Tag seharusnya muncul sebelum tag yang berisi kode peristiwa piksel. Gunakan Pixel Helper Facebook untuk memvalidasi penerapan piksel Anda.

Peristiwa Pixel Search

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

Peristiwa Pixel ViewContent

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

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

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

Peristiwa Aplikasi Seluler untuk Android

Panduan ini menganggap Anda sudah menerapkan SDK Facebook di aplikasi seluler Android Anda. Jika belum, lihat SDK Android. Jika Anda menggunakan mitra pengukuran, pastikan mitra tersebut meneruskan peristiwa yang diharuskan ke Facebook.

Peristiwa Android Search

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

Peristiwa Android ViewContent

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

Peristiwa Android InitiateCheckout

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

Peristiwa Android Purchase

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

Peristiwa Aplikasi Seluler untuk iOS

Panduan ini menganggap Anda sudah menerapkan SDK Facebook di aplikasi seluler iOS Anda. Jika belum, lihat SDK iOS. Jika Anda menggunakan mitra pengukuran, pastikan mitra tersebut meneruskan peristiwa yang diharuskan ke Facebook.

Peristiwa iOS Search

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

Peristiwa iOS ViewContent

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

Peristiwa iOS InitiateCheckout

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

Peristiwa iOS Purchase

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

Detail Parameter Peristiwa

Di perangkat seluler, nama parameter berbeda dari nama Facebook Pixel. Sering diawali dengan fb_, dengan pengecualian, misalnya value versus _valueToSum.

Nama dan Jenis ParameterDeskripsi

content_type untuk Facebook pixel

fb_content_type untuk Peristiwa Aplikasi

jenis: string atau string[]

Disarankan.

Harus berupa flight. Jika digabungkan dengan produk iklan perjalanan lain, seperti hotel, gunakan '["flight", "hotel"]'.

departing_departure_date, untuk Facebook pixel

fb_departing_departure_date, untuk Peristiwa Aplikasi

jenis: string

Sangat direkomendasikan.

Tanggal dan waktu dimulainya perjalanan ke luar. Kami menerima tanggal dalam format YYYYMMDD, YYYY-MM-DD, YYYY-MM-DDThh:mmTZD, dan YYYY-MM-DDThh:mm:ssTZD. Saat disediakan, Anda dapat menggunakan ini dalam iklan menggunakan tanda template dan menargetkan orang berdasarkan tanggal perjalanan mereka menggunakan termin pemesanan dalam pemirsa Anda.

Contoh:

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

returning_departure_date, Facebook Pixel

fb_returning_departure_date, Peristiwa Aplikasi

jenis: string

Sangat direkomendasikan untuk perjalanan pulang pergi.

Tanggal dan waktu dimulainya perjalanan pulang. Kami menerima format tanggal yang sama seperti tercantum untuk departing_departure_date. Saat disediakan, Anda dapat menggunakan ini dalam iklan menggunakan tanda template dan menargetkan orang berdasarkan tanggal perjalanan mereka menggunakan termin pemesanan dalam pemirsa Anda.

currency, Facebook pixel

fb_currency, Peristiwa Aplikasi

jenis: string

Wajib untuk purchase.

Mata uang untuk value. Ditentukan menggunakan format mata uang ISO 4217.

Contoh: USD

value, Facebook pixel

_valueToSum, Peristiwa Aplikasi

jenis: float

Wajib untuk purchase.

Harga total pemesanan. Angka ini mengukur nilai peristiwa ini bagi pengiklan.

Contoh: 155

departing_arrival_date, Facebook pixel

fb_departing_arrival_date, Peristiwa Aplikasi

jenis: string

Tanggal dan waktu kedatangan di destinasi perjalanan ke luar. Gunakan format tanggal yang sama seperti yang tercantum untuk departing_departure_date.

returning_arrival_date, Facebook pixel

fb_returning_arrival_date, Peristiwa Aplikasi

jenis: string

Tanggal dan waktu saat perjalanan pulang selesai. Gunakan format tanggal yang sama seperti yang tercantum untuk departing_departure_date.

destination_ids, Facebook pixel fb_destination_ids, Peristiwa Aplikasi

jenis: string atau string[]

Jika Anda memiliki katalog destinasi, Anda dapat mengaitkan satu atau beberapa destinasi dalam katalog ini dengan peristiwa penerbangan tertentu. Misalnya, tautkan rute tertentu ke museum terdekat dan pantai terdekat, yang keduanya merupakan destinasi dalam katalog.

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

num_adults, Facebook Pixel fb_num_adults, Peristiwa Aplikasi

jenis: string

Jumlah orang dewasa yang terbang. Saat disediakan, Anda dapat menampilkan ini dalam iklan menggunakan tanda template.

Contoh: 2.

num_children, Facebook Pixel

fb_num_children, Peristiwa Aplikasi

jenis: int

Jumlah anak-anak terbang. Saat disediakan, Anda dapat menampilkan ini dalam iklan menggunakan tanda template.

Contoh: 2.

num_infants, Facebook Pixel

fb_num_infants, Peristiwa Aplikasi

jenis: int

Jumlah bayi yang terbang. Saat disediakan, Anda dapat menampilkan ini dalam iklan menggunakan tanda template.

Contoh: 2.

price, Facebook Pixel

fb_price, Peristiwa Aplikasi

jenis: float

Harga terendah dari hasil pencarian untuk rute dan tanggal yang dipilih. Hanya untuk peristiwa Search.

Contoh: 95

travel_class, Facebook Pixel

fb_travel_class, Peristiwa Aplikasi

jenis: string

Harus berupa economy, premium, business, atau first

Contoh: economy.

user_score, Facebook Pixel

fb_user_score, Peristiwa Aplikasi

jenis: float

Mewakili nilai relatif calon pelanggan ini bagi pengiklan.

Contoh: 50

preferred_num_stops, Facebook Pixel fb_preferred_num_stops, Peristiwa Aplikasi

jenis: int

Indikasikan jumlah pilihan pemberhentian yang dicari pengguna. 0 untuk penerbangan langsung.

Contoh: 0