If you’re using SpotHopper (SpotApps) for restaurant reservations and want to track form submissions in Google Analytics, Facebook Ads, or other marketing platforms, here’s how to set it up with Google Tag Manager.
What This Does
This event listener catches when someone successfully submits a reservation through your SpotHopper form and pushes that data to GTM’s dataLayer so you can track it as a conversion.
The SpotApps Event Listener Code
javascript
<script>
window.addEventListener('message', function(e) {
if (e.origin !== 'https://tmt.spotapps.co') return;
if (!e.data) return;
if (e.data.submitStatus === true) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'reservations_submit_openserver',
reservation_status: 'submitted'
});
}
});
</script>JavaScriptThis tracks the reservations_submit_openserver event when a reservation is successfully submitted.
How to Set It Up
Step 1: Create a Custom HTML Tag in GTM

- Log into Google Tag Manager
- Go to Tags → Click New
- Click Tag Configuration
- Select Custom HTML
- Paste the code above
- Name it “SpotApps – Reservation Listener”
Step 2: Set Trigger to All Pages

- Click on Triggering
- Select All Pages (or create a trigger for pages where SpotHopper forms appear)
- Click Save
Step 3: Create a Custom Event Trigger

- Go to Triggers → Click New
- Choose Custom Event as trigger type
- Enter
reservations_submit_openserveras the event name - Name it “SpotApps – Reservation Submit”
- Save the trigger
Step 4: Fire Your Conversion Tags
Now use this trigger on your marketing tags:
- Google Analytics 4: Create a GA4 Event tag with event name “reservation_submit” and use the trigger
- Facebook Pixel: Add the trigger to your Lead event tag
- Google Ads: Add the trigger to your conversion tracking tag
Testing Your Setup
- Enable GTM Preview Mode
- Submit a test reservation on your website
- Check that the
reservations_submit_openserverevent appears in the dataLayer - Verify your conversion tags fire correctly
- Publish your GTM container once confirmed



0 Comments