This integration allows hotels to connect their Google Analytics 4 (GA4) Measurement ID to the Web Widget, enabling them to track how users interact with the chatbot throughout their journey on the website. This provides valuable insights into user engagement, helps optimize the guest experience, and allows hotels to measure the impact of Concierge across the entire customer journey, from initial interaction through to booking.
What is Tracked:
Event name | What it records |
chat_avatar_click | Avatar Clicks: Track when users open the Booking Agent by clicking the avatar icon on the website. |
chat_started | Chat Engagement: Capture when a user begins a conversation by sending a message or asking a question. |
chat_menu_[menu-name] | Menu Clicks: Measure interactions with menu options and quick actions within the Booking Agent. |
These insights help hotel better understand how visitors engage with Myma's AI Solutions, identify opportunities to improve the user experience, and measure the overall effectiveness.
Prerequisite: Hotel must be using Google Analytics.
Where to View Data in GA4
Hotel can access these events in Google Analytics Dashboard:
Reports → Engagement → Events
Realtime Dashboard (for live interactions)
Look for events starting with chat_ such as:
chat_avatar_click (avatar clicks)
Chat_menu_events (menu item clicked)
chat_started (user sends a message)
Tracking the Full User Journey (Website & Booking Engine)
With GA4 integration it enables hotel to track the complete user journey from Concierge interaction through to website activity and booking. When users engage with the Booking Agent, their actions (e.g. chat opens, menu clicks) are captured within the same session as their website and booking behavior.
This allows hotel to analyze how Concierge interactions influence navigation, identify drop-offs, and measure assisted conversions. For best results, ensure GA4 is implemented across both your website and booking engine, with consistent tracking parameters and conversion events configured.
Configuration
1. Log into the Dashboard
2. Go to Settings → Channels → Connected Channels
3. Locate and open the Property or Group Web Widget that you want to track
4. Locate the Google Analytics (GA4) section
5. Toggle Google Analytics Tracking to enable
6. Enter your GA4 Measurement ID (e.g. G-XXXXXXXXXX)
7. Toggle the events you want to track and change event names if you prefer
8. Save your settings
Please note that the Myma.ai team is happy to set this up for you. Simply provide us with your GA4 Measurement ID, and we'll take care of the rest.
GA4 & Google Tag Manager (GTM) Setup
Why is this important?
The Web Widget is displayed on your website, but its interface is loaded separately. Depending on how analytics is configured, events sent from that separate interface may be recorded in a different context from the visitor’s website activity. This can make reporting and attribution harder to interpret.
The recommended approach is to send Web Widget interaction events through the website’s existing analytics setup. This helps keep events associated with the website page where the visitor is using the widget.
Which setup should I use?
First, use the website’s existing GA4 event function if it is available. If it is not available, the Web Widget can send events to the website’s existing Google Tag Manager data layer instead. This fallback requires a small configuration change in Google Tag Manager.
Option 1 — Use your existing GA4 setup
This is the preferred option when the website already exposes the GA4 gtag function. The Web Widget can send events such as chat_avatar_click and chat_started through the existing setup. You should not need to create a separate GA4 property just for these events.
Your web or analytics team can check availability by opening your website, opening the browser developer console, and entering the following command:
typeof window.gtag
If the result is "function", the existing GA4 event function is available. Your implementation team can then test that events arrive in the intended GA4 property.
Option 2 — Google Tag Manager fallback
Use this option if the website does not expose the GA4 event function but uses Google Tag Manager with a data layer. The Web Widget sends a named event to the data layer, and Google Tag Manager forwards it to the website’s existing GA4 property.
Important: sending an event to the data layer does not automatically send it to GA4. A matching trigger and GA4 Event tag must be configured in Google Tag Manager.
Step-by-step: configure the fallback with Google Tag Manager
1. Open the correct Google Tag Manager container
Sign in to Google Tag Manager and select the container already installed on your website. Reuse your existing Google tag and GA4 measurement ID where possible.
Do not create a separate GA4 property just for Web Widget events.
2. Create a Custom Event trigger
Open Triggers and select New.
Give the trigger a clear name, such as “Web Widget – Chat Avatar Click”.
Choose Custom Event as the trigger type.
Enter the event name exactly as follows: chat_avatar_click.
Choose All Custom Events, unless your analytics team requires a more specific condition.
Save the trigger.
3. Create a GA4 Event tag
Open Tags and select New.
Name the tag “GA4 – Web Widget – Chat Avatar Click”.
Choose the GA4 Event tag type in the current Google Tag Manager interface.
Select the existing Google tag or GA4 measurement ID used by your website.
Set the event name to chat_avatar_click, matching the trigger exactly.
Under Triggering, select the Custom Event trigger created in Step 2.
Save the tag.
4. Repeat for other events
To track chat_started, create a corresponding Custom Event trigger with the event name chat_started and a GA4 Event tag with the same event name. Repeat for any other Web Widget events you have agreed to track.
5. Test before publishing
In Google Tag Manager, select Preview and connect Tag Assistant to your website.
Open the Web Widget and perform the interaction being tested.
Find the corresponding event, such as chat_avatar_click, in Tag Assistant’s event timeline.
Confirm that the matching GA4 Event tag fires.
Check GA4 DebugView or Realtime to confirm the event arrives.
fter successful testing, submit and publish the Google Tag Manager changes.
6. Final verification checklist
The event appears in Google Tag Manager Preview when the visitor performs the interaction.
The expected GA4 Event tag fires once for that interaction.
The event arrives in the intended GA4 property with the expected event name.
The event is associated with the customer website page, not a separate widget page context.
The Google Tag Manager container changes have been published.
If something does not work
The event appears in Tag Assistant but not in GA4: Check that the GA4 Event tag uses the correct existing Google tag or measurement ID and that the container is published.
The trigger does not fire: Check that the Custom Event name matches exactly, including underscores and letter case.
The event appears twice: Ask your web team to check for duplicate tags or multiple event-sending paths. Each interaction should be sent through one path only.
The widget event shows a separate widget page context: Ask your implementation team to verify that the event is being sent through the website’s existing analytics setup and is not also being sent separately from the widget interface.
If you need assistance, share the website URL, the GA4 event name, and a screenshot of the relevant Tag Assistant event and tag status with your web analytics team.
Once enabled, events will start flowing into your GA4 property!


