Facebook Pixel Setup

Selfbook SDK will automatically inherit your existing FB Pixel Account ID from your website, and sync the following events to your account:

  • ViewContent
  • Add to cart
  • Purchase

Step 1: ViewContent

This event is triggered when Selfbook is opened (from book button), it includes:

  • Room and rate info
  • Availability request info
window.fbq('track', 'ViewContent', {
        start: 'booking start date',
        end: 'booking end date',
        guests: 'number of guests',
        currencyCode: 'currency code',
        roomId: 'room id',
        ratePlanCode: 'rate plan code',
        promoCode: 'promo code',
        groupCode: 'group code',

Step 2: Add to Cart

This event is triggered when the user selected a payment method

  1. From Rooms page:
window.fbq('track', 'AddToCart', { page: 'Rooms' });
  1. From Wallet page:
window.fbq('track', 'AddToCart', { page: 'Wallet' });

Step 3: Purchase

This event is triggered when the user makes a reservation. it includes:

  • reservation info
  • reservation id
  • price
window.fbq('track', 'Purchase', {
        reservationId: 'reservation id',
        currency: 'purchase currency',
        price: 'purchase price',
        reservation: 'reservation object',