How To: Implement Google Analytics page view tracking for your online Campspot booking page

Adding Google Analytics allows you to understand the demographics and behavior of the guests who visit your booking page.

Google Analytics gives you additional tools that help you to understand who is visiting your website and Campspot booking page, with insights like their time spent on the site, actions taken, age categories, location, devices used, pages visited, and much, much more.


Things to know:

  1. This page will specifically outline how to best set up Google Analytics via our Google Tag Manager integration. While Campspot offers a standard Google Analytics tracking field, this is best implemented via the Google Tag Manager integration for the reasons below:
    1. Campspot's online booking page is built as a Single-page application. This means that when a visitor reaches your Campspot booking page, all of the content is loaded at once and dynamically changes based on their search parameters, amenity and pricing filters used, and more. This contrasts with other websites that load a separate page for every step of the booking process or every new search performed. This creates a vastly improved user experience but requires more complex tracking. Where Google Analytics alone is unable to track changes on a single-page application, Google Tag Manager is able to do so.
    2. As your Campspot booking page is implemented as a third-party site, it's important to add cross-domain tracking to your analytics setup. This is a feature within Google Analytics and Tag Manager that allows a user's visit to be counted as one across separate domains (your website and your Campspot booking page) instead of counting separately. This ensures that the tracking is accurate, that you have visibility in one easy-to-view dashboard, and that your conversions (reservations) can correctly report on where they originally came from.
  2. For the best results, Google Analytics needs to be added to your website via the same Google Tag Manager account that is added in Campspot.
  3. At this time, Campspot works with Google Universal Analytics. Google Analytics 4 functionality will come with future development.


What you'll need prior to setup:

  1. Google Tag Manager account
  2. Google Analytics account


How to set up page view tracking for your online booking page:

  1. In Campspot, go to Menu > Consumer Site Admin > Analytics, insert your Google Tag Manager container ID to the 'Google Tag Manager' field, and click 'Save Changes'
    1. This will be found near the top of the window in Google Tag Manager, formatted as "GTM-XXXXXX"
  2. In Tag Manager, start a new Google Analytics: Univeral Analytics tag. From the home screen select New Tag and then Tag Configuration and then Google Analytics: Universal Analytics
  3. Keep the Track Type as Page View
  4. In the Google Analytics Settings field, select an existing Google Analytics variable or create a new variable. To create a new variable:
    1. In the dropdown menu, select New Variable
    2. Sign in to your Google Analytics account to gather your Google Analytics ID that you will use to complete the variable setup:
      1. In your Google Analytics account, select the Admin menu in the bottom left corner.
      2. Under the Property column, select Tracking Info
      3. Select Tracking Code
      4. Copy the Tracking ID
    3. In Tag Manager, add the Tracking ID into the applicable field
    4. (Recommended) Add cross-domain tracking to the variable
      1. Select More Settings
      2. Select Fields to Set
      3. Select Add Field
        1. Field Name = allowLinker
        2. Value = true
      4. Select Cross Domain Tracking
        1. Auto Link Domains = [YOURPARKURL].com,
    5. Name and save the variable
  5. In Tag Manager, add a trigger in the Triggering section to specify when the tag should fire
    1. Select Choose a trigger to make this tag fire...
    2. Select All Pages. If this option does not appear:
      1. Select the '+' button in the upper right corner
      2. Select Choose a trigger type to begin setup...
      3. Select Page View
      4. Keep the settings as This trigger fires on - All page views
      5. Name and save this trigger
  6. Add a second firing trigger using the '+' button
    1. Select the '+' button from the Choose a trigger page
    2. Select Choose a trigger type to begin setup...
    3. Select Custom Event
      1. In the Event name field, add consumer-page-view
      2. In the This trigger fires on section, switch the selection to Some Custom Events
      3. In the Fire this trigger when an Event occurs and all of these conditions are true section, change the fields to Event > equals > consumer-page-view
    4. Name and save this trigger
  7. Name and save the tag
  8. Publish the changes when ready