Tour Master Facebook Conversions API releases
This plugin integrates **Tour Master** with the **Official Facebook Pixel** plugin to send Server-Side Events (Conversions API) reliably. It captures standard booking and engagement actions and processes them asynchronously via WordPress Cron to ensure high performance and reliability.
by DevKit SIO · github.com/devkit-sio/facebook-tourmaster-conversions-api
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/devkit-sio/facebook-tourmaster-conversions-api/archive/refs/heads/main.zipReadme
Tour Master Facebook Conversions API
This plugin integrates Tour Master with the Official Facebook Pixel plugin to send Server-Side Events (Conversions API) reliably. It captures standard booking and engagement actions and processes them asynchronously via WordPress Cron to ensure high performance and reliability.
Features
Event Tracking
- Purchase Tracking: Fires a
Purchaseevent when a booking payment status is changed toonline-paid,approved, ordeposit-paidin the database. - Lead Tracking: Fires a
Leadevent when a customer submits an enquiry form. - CompleteRegistration: Fires a
CompleteRegistrationevent when a new user registers an account. - InitiateCheckout: Fires an
InitiateCheckoutevent when a customer lands on the payment/checkout page, computing price and quantity directly from the booking cookie.
Queue & Reliability
- Asynchronous Processing: Prevents checkout slowdowns by storing events in a database queue and dispatching them in the background via WordPress Cron (every 5 hours).
- Smart Retries: Failed events are automatically retried up to 5 times using an incremental back-off strategy (1 h → 2 h → 3 h → 4 h → 5 h). After 5 failed attempts, the event is permanently marked as
failedand not retried again. - Event Statuses: Every event moves through a clear lifecycle —
new→sending→successorfailed.
Admin Dashboard
- Facebook Events Page: A dedicated Facebook Events submenu under the TourMaster admin menu gives you full visibility into the event queue.
- Statistics Cards: At-a-glance counters for Total, Pending, Sent, and Failed events, plus the next scheduled cron run time.
- Status Filters: Quickly filter the table by
All,New,Sending,Success, orFailed. - Sortable Columns: Click any column header (ID, Event, Status, Created, Updated) to sort ascending or descending — the current sort direction is indicated by ▲ / ▼.
- Payload Inspector: Expand any row to view the full JSON payload that was (or will be) sent to Facebook's Conversions API.
- Manual Fire: For any event with status
neworfailed, use the Send button to dispatch it to Facebook immediately, without waiting for the next cron run. - Single Delete: Remove any event permanently from the queue with the trash icon.
- Multi-Select & Bulk Delete: Use the checkboxes to select one or more events (or use the header/footer select-all checkbox) and apply the Delete bulk action to remove them all at once.
- Dependency Notices: If TourMaster or the Official Facebook Pixel plugin is not active, a clear admin notice is shown with direct installation links.
Requirements
To use this plugin, you must have the following installed and activated:
- WordPress 5.0+
- Tour Master (Booking System)
- Official Facebook Pixel (by Facebook)
Installation
- Download or clone this repository into your WordPress
wp-content/plugins/directory. - The folder name should be
facebook-tourmaster-conversions-api. - Go to your WordPress Admin Dashboard → Plugins.
- Find Tour Master Facebook Conversions API in the list and click Activate.
Note: Upon activation, the plugin automatically creates the necessary database table (
wp_tourmaster_fb_events) and schedules the cron job.
Configuration
No manual configuration is required in this plugin!
Just ensure your Official Facebook Pixel plugin is fully set up, connected to your Meta Business Manager, and has a valid Access Token configured for Server-Side tracking. This plugin uses the Facebook Pixel SDK built into the official plugin to route the events.
How It Works
-
Event Capture: When a customer performs an action (e.g., submits an enquiry or completes a payment), the plugin intercepts the data using Tour Master's native hooks:
goodlayers_set_payment_complete/tourmaster_facebook_plugin_order_paid→Purchasewp_ajax_tourmaster_send_enquiry_form→Leadtourmaster_user_register→CompleteRegistrationinclude_goodlayers_payment_script→InitiateCheckout
-
Database Queue: Instead of pausing the user's page load to talk to Facebook's servers, the event payload is serialized and inserted into the custom table
wp_tourmaster_fb_eventswith a status ofnew. -
Cron Processing: A WordPress Cron job runs every 5 hours. It fetches batches of up to 50
newandfailed(due for retry) events and dispatches them to the Facebook Conversions API via the Official Facebook Pixel SDK. -
Resiliency: If Facebook's API rejects an event, the
attemptscounter is incremented and anext_attempttimestamp is calculated using an increasing delay. After 5 failures, the event is saved as permanentlyfailed. -
Manual Dispatch: At any time, an administrator can visit TourMaster → Facebook Events and click Send on any pending or failed event to fire it immediately without waiting for the next cron cycle.
Admin Panel Walkthrough
Navigate to WP Admin → TourMaster → Facebook Events.
| Feature | Description |
|---|---|
| Stats cards | Live counts of Total / Pending / Sent / Failed events and next cron time |
| Filter tabs | Filter the table by event status |
| Sortable columns | Click ID, Event, Status, Created or Updated to sort ▲ / ▼ |
| Details button | Expand a row to inspect the full JSON payload |
| Send button | Immediately dispatch a new or failed event to Facebook |
| Trash icon | Delete a single event permanently |
| Checkboxes + Bulk Delete | Select multiple events and delete them all at once |
Testing
To test the integration:
- Ensure your Facebook Pixel extension is active in your browser.
- Trigger an event on your site (e.g., load the checkout page to trigger
InitiateCheckout, or submit an enquiry forLead). - Check the queue: go to TourMaster → Facebook Events — the event should appear with status
new. - Click Send on the event row to dispatch it immediately.
- Check your Facebook Events Manager under the Test Events tab to confirm the server-side payload was received.
- Alternatively, use a tool like WP Crontrol to manually trigger the
tourmaster_fb_send_events_cronhook to process the entire queue.
Security
If you discover a security issue with this integration, please report it privately rather than opening a public issue.
Support This Project
If this plugin saved you time, consider supporting its development:
Every bit helps keep this integration maintained and up to date with TourMaster and Facebook Conversions API changes.
License
This plugin is open-sourced software licensed under the MIT license.
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.