Pro feature: This feature is available on the Pro plan. You can find more information here: How to update and manage your WeTravel subscription?
WeTravel’s Advanced Conversion Tracking with the Meta Pixel allows you to seamlessly track and attribute bookings on your trip page to your Facebook and Instagram advertising campaigns.
By integrating your Meta Pixel with WeTravel, you can capture these key events:
Page View – when a visitor lands on your website (tracked globally via your Pixel snippet)
Book Now Button Click – when a visitor clicks a WeTravel “Book Now” button embedded on your site
Booking Confirmed (Purchase) – when a traveler completes a booking and payment through your embedded WeTravel checkout
These events help you:
Reach the right people – Retarget visitors who landed on your site, clicked “Book Now,” or completed a booking. Create lookalike audiences based on high-intent actions.
Drive more bookings – Use Meta’s automatic bidding to show ads to people most likely to take meaningful actions like making a purchase.
Measure what matters – Understand the full impact of your ads, from the first page view to the final booking, and optimize for return on ad spend.
Note: This is an advanced feature. We highly recommend hiring a professional to set up this feature on your website if you lack the experience to do it yourself.
Before You Begin
This guide assumes you have:
A Meta Business Manager account with an existing Pixel ID created in Events Manager. Find instructions on how to set-up here: Set up and install the Meta Pixel
Access to your website’s HTML code—specifically the <head> and <body> sections—so you can add tracking scripts.
You are using WeTravel's embedded checkout process with "Book Now" buttons on your website. (How to embed a 'Book Now' button into your website)
Implementation:
You will need to add two separate code snippets to your website's HTML: one in the <head> section and one in the <body> section.
🚨Important: In both snippets, you must replace the placeholder XXXXXXXXXXXXXXX with your Meta Pixel ID.
Step 1. Insert the Tracking Code into Your Website’s Header
To initialize Meta Pixel and track Page View, Book Now Click, and Booking Confirmation (Purchase) events from WeTravel’s embedded widget, insert the full script below into the <head> section of your website’s HTML.
Note: The tracking script must be placed in the header of your own website to capture events from the embedded “Book Now” buttons. It will not be added to the WeTravel platform.
Code for the <head> Section
Don’t forget: Replace XXXXXXXXXXXXXXX with your actual Meta Pixel ID.
<script>
// ######### START initializing Facebook Pixel Code + Page View event #########
// (ignore if you already have this part)
!(function (f, b, e, v, n, t, s) {
if (f.fbq) return;
n = f.fbq = function () {
n.callMethod
? n.callMethod.apply(n, arguments)
: n.queue.push(arguments);
};
if (!f._fbq) f._fbq = n;
n.push = n;
n.loaded = !0;
n.version = '2.0';
n.queue = [];
t = b.createElement(e);
t.async = !0;
t.src = v;
s = b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t, s);
})(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'XXXXXXXXXXXXXXX'); // Update PIXEL ID
fbq('track', 'PageView');
// ######### END initializing Facebook Pixel Code + Page View event #########
// ######### START initializing Listener for events #########
const eventMethod = window.addEventListener ? 'addEventListener' : 'attachEvent';
const eventer = window[eventMethod];
const messageEvent = eventMethod === 'attachEvent' ? 'onmessage' : 'message';
// ######### END initializing Listener for events #########
eventer(messageEvent, (e) => {
const data = e.data;
// ######### START Tracking Booking Confirmation event #########
if (data.type === 'bookingConfirmed') {
fbq('track', 'Purchase', {
content_ids: [data.trip_uuid],
content_name: data.trip_title,
value: data.total_amount,
currency: data.currency,
});
}
// ######### END Tracking Booking Confirmation event #########
// ######### START Tracking Book Now Click event #########
if (data.type === 'bookNowClicked') {
fbq('trackCustom', 'Book Now Button Click', {
source: data.source,
content_name: data.trip_title
});
}
// ######### END Tracking Book Now Click event #########
});
</script>
Note: Since 'Book Now Button Click' is a custom event, you might see a warning in the Pixel dashboard asking you to accept this event for it to be included in your dashboard.
Step 2. Insert the Tracking Code into the <body> Section of your website
To ensure Page View events are tracked consistently, add the following <noscript> tag at the top of your website’s <body> section.
Code for the <body> Section
Don’t forget: Replace XXXXXXXXXXXXXXX with your actual Meta Pixel ID.
// ###### for <body> tag #########
<!-- START tracking Facebook Pixel no-script Page View event (ignore if you already have this part) -->
<noscript>
<img
height="1"
width="1"
style="display:none"
alt="Facebook Pixel"
/>
</noscript>
Best Practices:
Build Custom Audiences: Use the event data to create powerful retargeting campaigns.
High-Intent Visitors: Create an audience of everyone who triggered the Book Now Button Click event but did not Purchase. Target them with ads reminding them to complete their booking.
Past Bookers: Create an audience of everyone who triggered the Purchase event to exclude them from current campaigns or to target them with ads for new trips in the future.
Create Lookalike Audiences: Use your Purchase event data as a source to create a Lookalike Audience. Meta will find new users who share characteristics with your existing customers, helping you expand your reach to a highly relevant audience.
Optimize Ad Campaigns for Conversions: When setting up your ad campaigns in Meta Ads Manager, choose "Sales" as your objective and select the Purchase event as your conversion event. This allows Meta's algorithm to optimize ad delivery to people most likely to book a trip.
Frequently Asked Questions
Where do I find my Meta Pixel ID?
Go to Meta Events Manager.
Select your Business Account.
Click Data Sources → Pixels, then choose your Pixel.
Your Pixel ID (a 15-digit number) will appear at the top of the Overview tab.
How do I test if it’s working?
Use the Meta Pixel Helper Chrome extension to validate your setup:
Install the Meta Pixel Helper Chrome extension.
Visit your site → Confirm the PageView event appears.
Click an embedded Book Now button → Confirm the custom event triggers
(Optional) Make a test booking → Confirm the Purchase event shows the amount and currency.
Troubleshooting Common Issues
Tracking isn't working for some events: Double-check that you are using the embedded "Book Now" buttons on your website. If you are using direct links to your WeTravel trip page or registering a participant on your trip manually, the script on your website will not track these events.
Events aren’t firing: Make sure the Meta Pixel script includes your correct Pixel ID, and that the correct script is placed in the <head> section and the <noscript> fallback is placed at the top of the <body> section of your website’s HTML.
Incorrect ID used: Make sure you're using your Meta Pixel ID—not your Dataset ID or Ad Account ID. The Pixel ID is a 15-digit number and must be inserted into the script for tracking to work correctly. Using the wrong ID will prevent events from firing.
Data & Privacy Notice
This setup may involve tracking users across domains and sending user interaction data to Meta.
⚠️ Ensure your use of Meta Pixel complies with data privacy regulations applicable to your region (e.g., GDPR, CCPA):
Implement a cookie consent banner that allows users to opt in before tracking begins.
Update your Privacy Policy to disclose the use of Meta Pixel and any data sharing with third parties.
For EU/UK: You may also need to use Consent Mode or integrate with a Consent Management Platform (CMP).