Lead Activity & Attribution with Facebook Pixel


If you are using Facebook/Meta/Instagram paid ads, you will be tracking their success with Meta's Pixel. Pixel, is the code that is inserted onto your website that allows Meta to continue to track people's activity after they arrive to your website via Facebook or Instagram. You can install Pixel by following the directions on Meta Business Suite.


After your Pixel is installed and collecting data, you can insert additional code to track Schedule Engine specific activities. By adding this code, you'll be able to see, for example, if someone clicks on a Facebook ad and then books an appointment via Schedule Engine. This will allow Facebook to optimize your advertisements to find/market towards those most likely to book via the scheduler in the future.


If you want to get more details on Schedule Engine specific activities taken by people after they arrive at your website, below is the script to track the whole booking process. You only need to include the events you want to track.


 document.addEventListener('DOMContentLoaded', function() {

        ScheduleEngine.addEventListener("BookingStarted", function(){  

            if (typeof(fbq) == 'function'){

                fbq('trackCustom', "BookingStarted");

            }

        });

        ScheduleEngine.addEventListener("BookingIssueStarted", function(){

            if (typeof(fbq) == 'function'){

                fbq('trackCustom', "BookingIssueStarted");

            }

        });

        ScheduleEngine.addEventListener("BookingIssueCompleted", function(){

            if (typeof(fbq) == 'function'){

                fbq('trackCustom', "BookingIssueCompleted");

            }

        });

        ScheduleEngine.addEventListener("BookingDetailsMedia", function(){

            if (typeof(fbq) == 'function'){

                fbq('trackCustom', "BookingDetailsMedia");

            }

        });

        ScheduleEngine.addEventListener("BookingDetailsMore", function(){

            if (typeof(fbq) == 'function'){

                fbq('trackCustom', "BookingDetailsMore");

            }

        });

        ScheduleEngine.addEventListener("BookingCustomerQuestion", function(){

            if (typeof(fbq) == 'function'){

                fbq('trackCustom', "BookingCustomerQuestion");

            }

        });

        ScheduleEngine.addEventListener("BookingCustomer", function(){

            if (typeof(fbq) == 'function'){

                fbq('trackCustom', "BookingCustomer");

            }

        });

        ScheduleEngine.addEventListener("BookingSchedule", function(){

            if (typeof(fbq) == 'function'){

                fbq('trackCustom', "BookingSchedule");

            }

        });

        ScheduleEngine.addEventListener("BookingBooked", function(){

            if (typeof(fbq) == 'function'){

                fbq('trackCustom', "BookingBooked");

            }

        });

    });