All Collections
Book Now Widget
Track Booxi Online Booking Usage with Google Analytics 4
Track Booxi Online Booking Usage with Google Analytics 4

Use Google Analytics 4 to Track Online Booking Usage

Updated over a week ago

With the help of Google Analytics 4, you can easily track your customers' actions while booking online using the Booxi booking widget, and see how often they completed or abandoned the booking and at which steps.


Before using Google Analytics, you will need the following:

  • A valid Google account

  • Sign up to Google Analytics

  • Your Google Tag ID (aka measurement ID)

If you haven’t created a google account yet, please consult the following page for more details on how to do so. Once your account has been created, follow these instructions to sign up to Google Analytics, create a Google Analytics 4 property and create a data stream. Finally, follow these instructions to locate your Google Tag ID “G-XXXXXXX”. Make sure to copy your Google Tag ID at the end of the setup process as it will be needed to configure the booking widget.

Configuring Google Analytics 4 with Booxi

First, make sure the following script has been included in the <head> tag of your webpage. Make sure to add the Google Tag ID "G-XXXXXXXX" at the end of the yellow line.

When including “booknow.js”, please be reminded to select the right URL based on your hosting region.

North America


Then, you will need to add the code below, google tag ID "G-XXXXXXXX" to the booking widget code. Do not forget to add your API key.



window.dataLayer = window.dataLayer || [];

function gtag() { window.dataLayer.push(arguments); }

gtag('js', new Date());

gtag('config', "G-XXXXXXXX");

var bnHandler = null;

window.bxApiInit = function () {

bnHandler = booxiController.configure({


googleTag: gtag





At this point, the booking widget is configured and ready to send events to Google Analytics using the GA4 standard.

What Will Booxi Send to Google Analytics

Booxi will automatically log the user’s actions as events. Please, take note that Booxi doesn’t send any personal data during that process, user’s confidentiality is preserved at all times.

Data is sent to Google Analytics using the following Google Analytics 4 data model:

  • Event Name :

    • Parameter 1 : value

    • Parameter 2 : value

Therefore, users’ actions will have 2 parameters associated with it:

  • Event generated by the user :

    • book_now_event_label - containing the value of the selection made by the user.

    • booxi_app : “Book Now” - this value won’t change, and can be used for filtering.

Each value returned by book_now_event_label will be prefixed with the country of the merchant, for instance “CA” for Canada. This can be useful for merchants being located in several countries.

Here’s an example of how selecting a category will be reported in Google Analytics:

  • book_now_select_service

    • book_now_event_label : “CA Massage”

    • booxi_app : “Book Now”

Here's a list of all events the booking widget will log along with their associated event label value.


Description and value returned in “book_now_label_event”


Name of the application having opened.

  • “Book Now Widget”


Name of the category selected.


Name of the service selected.


Name of the staff selected, if the service configuration requires a staff selection.


Date of the requested booking

  • “Open booking” (ie client availability)

  • “Calendar date” (ie specific date selected)


A time slot has been selected requested booking

  • “Time interval” (ie 8:00 - 9:00)


Indicates the user provided its contact information during booking.

  • “User Info Submit” (ie first name, last name…)


Indicates a booking requiring assignment requested.

  • “New appointment” (ie staff needs to approve)


Indicates an approved booking was submitted.

  • “New appointment”


Indicates the submission of a new rental request.

  • “New Rental event”


Name of the requested resource, applicable only for rentals.


An error occurred during the booking process.


An error occurred while validating a user’s data.

  • “User Info Submit” (ie invalid address, phone number…).


The booking widget has been closed

  • “Booking Canceled” when “X” got selected

  • “Booking Complete” after completing a booking.

How to Access the Data Reported to Google Analytics

Using the Google Analytics account you created previously, you can go to Reports > Realtime to see the events being logged as bookings are being made. See this Google reference on how to use Real time reports.

Be reminded that the events reported by the booking widget are custom events, therefore you will need to create a custom dimension to report on these events, and build more advanced reports. Please look at this Google article to learn how to create custom dimensions and build reports.

Did this answer your question?