Google tag (gtag.js): Events and Data Sent by the Booking Widget
When you turn on Enable host page Google tag (gtag.js) tracking in the booking widget settings, Buzzshot will call the gtag() function on the page that embeds the widget with GA4 e-commerce events. This is the right option if you have GA4 (or Google Ads) installed via the standard Google tag snippet, without using Google Tag Manager.
This article is a reference for the events and data we send. For a higher-level overview of all the tracking options, see Tracking and Analytics for the Booking Widget.
Should I Use gtag or GTM?
Use gtag tracking when you have the Google tag installed directly on your site, like this:
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
If your site has Google Tag Manager installed instead — or as well as gtag — see the GTM tracking article. GTM is more flexible: the same events can fan out to multiple destinations (GA4, Google Ads, TikTok Pixel, etc.) with filtering and conditions.
It's fine to turn on both gtag and GTM tracking at the same time if you have a reason to (for example, using GTM for Google Ads and gtag for GA4). Just be careful not to send the same events to the same destination via both paths — that will double-count.
Enabling
- In Buzzshot, go to Settings > Booking Widget
- Open the widget you want to configure
- Click the Tracking tab
- Turn on Enable host page Google tag (gtag.js) tracking
- Click Save
The Google tag must already be installed on the website where you embed the widget. The widget calls your website's gtag() function — it doesn't install one of its own.
Format
Each event is sent as a single gtag() event call with all the parameters flat in the second argument:
gtag("event", "add_to_cart", {
currency: "USD",
value: 60.00,
items: [
{
item_id: "ROOM-1",
item_name: "The Heist",
price: 30.00,
quantity: 2,
item_variant: "Adult Ticket"
}
]
});
Because you've already configured your GA4 (or Google Ads) measurement ID in your gtag('config', ...) call, these events will automatically be sent to that property — there's nothing extra to set up.
Events
The widget sends these events:
| Event | When it fires |
|---|---|
page_view |
Every time the customer navigates to a new page in the widget. Includes a page_path parameter. |
view_item |
The customer opens a room (or other bookable) details page. |
add_to_cart |
The customer adds a slot or product to their cart. |
remove_from_cart |
The customer removes something from their cart. |
view_cart |
The customer views the cart. |
begin_checkout |
The customer starts checkout. |
purchase |
The customer completes a booking and payment. Includes a transaction_id. |
These are the standard GA4 e-commerce event names, so they'll appear in GA4's built-in e-commerce reports without any extra configuration.
E-commerce Data
For all e-commerce events (everything except page_view), the params contain:
| Field | Description |
|---|---|
currency |
The currency code, e.g. "USD", "GBP", "EUR" |
value |
Total price as a number, e.g. 60.00 |
items |
Array of items — see below |
For purchase events the params also contain:
| Field | Description |
|---|---|
transaction_id |
Buzzshot's order reference (also shown to the customer on the confirmation page) |
Items
Each entry in items describes one product line in the cart:
| Field | Description |
|---|---|
item_id |
The product's SKU if you've set one, otherwise its internal ID |
item_name |
The name of the room (or other bookable) |
price |
Per-unit price as a number |
quantity |
Number of units (e.g. number of tickets) |
item_variant |
The specific product name (e.g. "Adult Ticket", "Child Ticket") |
For add_to_cart and remove_from_cart the items array contains just the items being added or removed. For view_cart, begin_checkout, and purchase it contains everything currently in the cart.
view_item does not currently include the currency, value, or items fields — it just announces that the customer has opened a room's details page.
Google Ads Conversion Tracking
To use the purchase event as a Google Ads conversion you'll need to mark it as a key event in GA4 and import it into Google Ads (or set up a separate Google Ads conversion event). The transaction_id field is suitable for deduplication. See Google's documentation on importing GA4 conversions into Google Ads for the steps.
Testing
- Embed the widget on your website (testing on the Direct URL won't work — there's no host page with gtag)
- Install the Google Analytics Debugger browser extension and turn it on
- Open your browser's developer tools console
- Walk through a booking
- You should see each
gtagcall logged to the console with the event name and parameters - In GA4, open the Realtime report (or DebugView) to confirm events are arriving
If the events don't appear:
- Check that the Google tag is actually installed on the page (you should see a
gtagfunction defined in the browser console) - Confirm Enable host page Google tag (gtag.js) tracking is turned on for the widget you're testing
- If you're also using GTM, check that you're not sending the same events to GA4 through both paths — that will double-count
