Google Tag Manager

Retreat Guru can integrate with Google Tag Manager.

What is Google Tag Manager & why would I use it?

Google Tag Manager (GTM) is a tool that can help you manage all of your tags, tracking pixels, and code snippets in one place. If you're wanting to add Hotjar, Google Analytics, or a Facebook tracking pixel on your registration form, GTM is the way to go. See also, Google support article on GTM.

This article assumes readers have experience setting up Google Analytics and/or Google Tag Manager. If you're totally new to Google tag manager and analytics on your retreat center's website we suggest reading this article on Analytics 101.

Support for your implementation and use of GTM is not provided by Retreat Guru.   

How does Google Tag Manager work?

Google Tag Manager will help you manage HTML and JavaScript tags used for tracking and analytics on your website.

With GTM, you will have the ability to add tracking in your Retreat Guru software for Google Analytics and other 3rd party products like the Facebook tracking pixel and Hotjar. GTM also makes cross-site tracking easy to set up and manage. For example, if you host your program pages on your own website, and link the register now button on your website page o an online registration form in Retreat Guru.

How to setup Google Tag Manager on your own website

Please refer to Google's documentation to enable GTM on your own hosted website.

How to setup Google Tag Manager in Retreat Booking Guru

Once you have GTM running on your own website, you may also wish to track user behavior on the registration process.  To add GTM to Retreat Guru, do the following:

Step 1: Go to tagmanager.google.com

Step 2: Assuming that you have already set up an account, copy the Container ID.

Step 3: Navigate to Retreat Guru > Settings > General.
Step 4: Scroll down to Google Tag Manager section.
Step 5: Paste the Container ID from step 2 into this field.

Step 6: Click Save Changes.

GTM is now enabled on your site. You can now add tags into GTM and they will appear on all of our pages in the Retreat Guru platform.

New Settings UI - the Google Tag Manager information can be found at Settings UI > Website > Google Tag Manager.

How do I add Google Analytics to Google Tag Manager?

Please read Google’s documentation.

How do I know if GTM and Google Analytics are working?

As soon as someone visits a page in your Retreat Guru software, for example, the online registration form, you will see a real-time pageview in Google Analytic’s Real-Time report. If you do not see this, please refer to the documentation above and ensure that all of the stems have been followed.

When troubleshooting: 

  • Make sure you have entered the correct tracking ID in GTM.
  • Make sure you have entered the correct tracking ID in Retreat Guru.
  • Make sure your GTM setup is published and using the appropriate version.
  • Make sure you haven’t added or modified other settings, options, or plug-ins that prevent Google Analytics from triggering.

How do I enable cross-domain tracking?

Because the online registration forms are hosted on secure.retreat.guru (not your domain) it is important that you enable cross-domain tracking. Enabling cross-domain tracking ensures that traffic data from your site is linked to the Retreat Guru online registration form as well.

To enable cross-domain tracking, please read Google's documentation.

How do I track e-commerce transactions?

To setup Ecommerce Tracking in GTM, you will need to do the following:

  1. Add a tag of type Universal Analytics; track type of Transaction.
  2. Configure the tag so that includes the required fields like Tracking ID.
  3. Assign a new trigger to the tag. You will need to fire this trigger only on the successful completion of a registration. There are two ways to do this. The first option is to create a trigger that captures when the URL contains complete=1 or when creating a new trigger, select the Custom Event trigger type (this is the preferred method).
  4. To create a custom event trigger, create a new trigger.
  5. Select Custom Event.
  6. Set the Event name field to confirmation and click Save.
  7. Save and publish your new container changes. Once completed, you will see new transactions appear in Google Analytics.

What other information do you track (for advanced setup)?

See Google's tag-manager/devguide. Retreat Guru passes a wide range of information in a data layer object.

Whenever your guest is on the Retreat Guru (RG) platform, for example, the online registration form, or the guest statement page, Retreat Guru passes a pageCategory to indicate which page the viewer is on. The pageCategory will have one of these possible values:

  • confirmation - guest is on RG registration thank you page.
  • waiting-list - guest is on the RG waiting list form.
  • waiting-list-confirmation - guest is on the RG waiting list thank you page.
  • registration - guest is on the RG online registration form.
  • guest-edit - guest is on the RG guest edit page.
  • guest-edit-confirmation - guest completes RG guest edit page.
  • program - guest is on RG program page.
  • guest-statement - guest is on RG guest statement page.
  • program-listing - guest is on RG program listing page.
  • teacher-listing - guest is on RG teacher listing page.
  • teacher - guest is on RG teacher details page.

For transactions, Retreat Guru passes the following into the data layer object:

  • checkInDate - guest’s check-in date.
  • checkOutDate - guest’s check-out date.
  • transactionId - registration’s transaction ID.
  • transactionTotal - the amount paid on the registration.
  • transactionProducts - an object that contains the name, price, quantity, and SKU), for example:
    • transactionProducts.0.sku - the program ID.
    • transactionProducts.0.name - program name.
    • transactionProducts.0.price - amount paid on the registration.
    • transactionProducts.0.quantity - we always pass 1.

How do I pass data (like program name, SKU, or totals) into other types of tags like a Custom HTML snippet?

These are advanced settings indented for use by a professional developer or an analytics expert. The use of these features may require customization or code modification by the third-party analytics/tracking service.

In some cases, you may want to pass data of the registration into other types of tags. For example, you may be using a Custom HTML snippet tag to embed a Facebook tracking pixel and wanting to pass in additional information like SKU, program name, and totals.

To facilitate this, Retreat Guru created a container file that you can import into Google Tag Manager that contains all of the supported variables that Retreat Guru passes to GTM from the Retreat Guru software. For example, program name, SKU, and total. Once imported, you can access these variables in your tags.

These new variables are only triggered when a registration is complete and the user is on the thank you page. You can trigger this by looking for complete=1 in the URL or trigger when the Data Layer property pageCategory has the value confirmation. The pageCategory Data Layer property is available on all registration pages.

To import the Retreat Guru container:

  1. Click here to download our container import file. 
  2. Go to your Workspace in GTM and click on the Admin tab.
  3. Click Import Container.
  4. Click Choose Container File and select the file you downloaded in step 1.
  5. Where it says Choose a workspace, you’ll most likely want to select Existing, assuming you have already created one.
  6. Select the Merge option.
  7. Click Confirm.

Now that all of the Retreat Guru variables have been imported into your workspace, they can be accessed in your tags.

Here’s an example on how you may want to use these variables in a custom HTML snippet tag:

<script>



fbq('track', 'ViewContent', {

    content_type: 'product', 

    content_ids: [‘’], 

    value: ,    

    currency: 'USD' //REQUIRED if you a pass value

});



</script>


Universal Analytics transition to Google Analytics 4:


rg-favicon-32 We'd love to hear from you. Did you find this article helpful? Are you aware of any additional information we should add? Would you like to suggest a topic for another article? If so, please contact your friendly support guru.