Google Business Profile offers a booking call-to-action called an Appointment Redirect URL. This lets you set up a booking page link via your Listing Management solution, so customers can be redirected to your booking page from Google Search or Maps. Google adds a special tracking token (rwg_token) to this link, which must be returned to Google when a booking is completed. This ensures that Google can track conversions from the booking link.
This is not the same as simply linking your booking page to your business profile. The Appointment Redirect URL is a special Google-supported integration for bookings.
Overview
To get started:
Check with your Listing Management solution to confirm they support Appointment Redirect URLs. If they do, ask them for their Reserve with Google Partner ID.
Ask your Booxi representative to enable Reserve with Google for your Booxi Account.
Acknowledge the following:
If you use the Booxi Booking Widget, token management is handled automatically.
If you use Booxi APIs for a custom booking flow, Booxi provides simple tools for managing tokens.
Diagram
Using Booxi's Booking Widget
Follow the standard Booking Widget implementation. Booxi automatically handles the rwg_token for you, so no extra setup is needed.
Recommendations:
Make sure your landing page opens for a selected store matching the Google Business Profile store, using a store parameter (ex.: merchant key) in your Appointment Redirect URL, or creating a page per store.
It is preferable to automatically open the Booking Widget when landing on your store page via the Appointment Redirect URL. You can manage this by adding a parameter like book=now that opens the widget.
There should not be any user login required before booking.
References:
Code Generator Tool (use the URL Parameter CTA option)
Ensure that Reserve with Google is enabled on your Booxi Account (if not, contact your Booxi representative)
Using Booxi APIs with a Custom Booking Flow
If you’re building a custom flow with Booxi APIs, you need to include Google’s tracking information with each booking request. This requires two steps:
Use Booxi’s JavaScript function to retrieve the rwg_token and rwg_merchant_id (Google’s tracking values).
Include both values in your Booxi API call (POST /booking) when creating a booking.
Booxi automatically retrieves the rwg_token from the URL when present, stores it, and reports the booking conversion back to Google when the booking is created.
Token management and storing is done in accordance with Google recommendations; for more info, see here.
References:
Implementation
If the booking page is opened with a token provided by Google Business Profile, you must store the merchant ID linked to that token. Booxi provides JavaScript functions to store and retrieve both the merchant ID and the token. Steps:
Step 1
Update the merchant ID for which the booking landing page was called. Use the following code:
// Booxi will store the merchant id when the page URL has a rwg_token
const merchantId = "12345"; // Your actual Booxi merchant ID
if (typeof window !== 'undefined' && window.RWGManager) {
window.RWGManager.getInstance().setRwgMerchantId(merchantId);
}
Step 2
Once you gather from the user all information required to book the appointment (store, services, date, time, client identification, etc.), retrieve the RWG token and stored merchant ID to be used in the following step.
// Call this after setting the merchant ID to get both RWG values
if (typeof window !== 'undefined' && window.RWGManager) {
const rwgData = window.RWGManager.getInstance().getRwgData();
if (rwgData) {
// Add the rwg_token and rwg_merchant_id to your POST booking body
console.log('RWG Token:', rwgData.rwg_token);
console.log('Merchant ID:', rwgData.rwg_merchant_id);
}
}
Step 3
Send the token and merchant ID along with the booking data to create the booking. See an example below (POST /booking):
{
"merchantId": 1002,
"bookingMethod": "Appointment",
"startsOn": "2021-02-20T16:00:00Z",
"status": "Approved",
"staffId": 582,
"items": [
{
"serviceId": 1000
}
],
"client": {
"firstName": "Emilie",
"lastName": "Authier",
"email": "emilie.authier@booxi.com"
},
"rwgToken": "YOUR_URL_RWG_TOKEN",
"rwgMerchantId": "YOUR_RWG_MERCHANT_ID"
}
The POST /booking endpoint does not yet support RWG values and its eventual implementation may vary.