Google Tag Manager & Analytics

Track conversions and marketing attribution

Set up Google Tag Manager (GTM) or Google Analytics 4 (GA4) to track your entire booking funnel. The system auto-detects your tracking ID format and loads the appropriate scripts. All personal data is automatically filtered out for GDPR/CCPA compliance - you'll see behavioral data like step completions, not customer names or emails.

Requirements

  • Google Tag Manager container (GTM-XXXXXXX) OR Google Analytics 4 property (G-XXXXXXXXXX)
  • Admin access to your PestBooker organization
  • About 5 minutes to complete setup
1

Get Your Tracking ID

  • Option A - Google Tag Manager: Go to tagmanager.google.com, create/open a container, copy your Container ID (GTM-XXXXXXX)
  • Option B - Google Analytics 4: Go to analytics.google.com, create/open a property, copy your Measurement ID (G-XXXXXXXXXX)
  • GTM is recommended for production - it allows adding Facebook Pixel, LinkedIn tags, etc. without code changes
  • GA4 direct is simpler and good for basic tracking or testing
2

Add Tracking ID to PestBooker

  • Go to Dashboard → Settings → Integration
  • Scroll to 'Google Analytics / GTM ID' field
  • Paste your tracking ID (either GTM-XXXXXXX or G-XXXXXXXXXX)
  • Click 'Save Changes'
  • The system auto-detects the format and loads the correct scripts
3

Understand the Events Fired Automatically

  • registration_started - User loads the booking page
  • registration_step_completed - Fires after each booking step (includes step_name and step_number)
  • Step names: address_selection, customer_creation, appointment_scheduling, billing_setup
  • registration_completed - Booking complete (includes planType, frequency, value)
  • magic_link_accessed - User clicks a magic link from email
  • magic_link_success - Data loaded, redirecting to booking
  • magic_link_expired - Link expired (30 day TTL)
  • magic_link_error - Error loading magic link data
  • abandoned_cart_resumed - User continues booking after magic link
4

Set Up GTM Triggers (If Using GTM)

  • In GTM, create Custom Event triggers for: registration_started, registration_step_completed, registration_completed
  • Create a GA4 Event tag for each trigger to send data to Google Analytics
  • Use the Preview mode to test events before publishing
  • Publish your GTM container when ready
5

Create Conversion Goals in GA4

  • In GA4, go to Configure → Events → Mark as conversion
  • Mark 'registration_completed' as a conversion - this is your sale event
  • Optionally mark step events to track funnel drop-off
  • Use the Funnel Exploration report to visualize the booking journey
  • Set up audiences based on step completion for remarketing
6

Verify Your Setup

  • Open your booking page in a browser
  • Open DevTools (F12) → Console tab
  • Look for '[Analytics] GTM initialized' or '[Analytics] GA4 initialized' message
  • Complete a test booking and watch for '[Analytics] Event pushed:' messages at each step
  • In GTM, use Preview mode to see events in real-time
  • In GA4, use DebugView (Configure → DebugView) to see events as they fire

Pro Tips

  • Personal data is automatically filtered - names, emails, addresses, phone numbers are NEVER sent to analytics
  • UTM parameters from your marketing campaigns are automatically tracked for attribution
  • The 'value' field in registration_completed can be used for revenue tracking in GA4
  • If you configure both GTM and GA4 IDs, GTM takes priority
  • Use step_number in your funnel reports to see exactly where customers drop off
  • Track magic link recovery funnel: magic_link_accessed → magic_link_success → abandoned_cart_resumed → registration_completed

Need Help with Setup?

Schedule a call and we'll walk you through any integration or setup process.

Schedule Setup Help