Website Tracking

Google Analytics - (GA4 Properties) Gtag

What is Gtag?

Google site tag is a tracking code that helps you send event data to Google Analytics, Google Ads, Campaign Manager, etc.

We suggest that you use this tag to track your widget data from an external website. It will track the booking process of the widget from the calendar section to the thank you page that it shows to the customer whenever a booking has been made.


Here's an overview on what this article covers:


1. Property Setup

First of all you’ll need to create an Analytics account on Google on which you can do here -

Once you’ve created your Analytics account, you’ll have to create a property that you’ll use to track data. 

Enable options as you see fit for your business.


Next, create the property for your website and then make sure to hit the “Show Advanced options” button

By default, the “Create Universal Analytics property” should be disabled but it wouldn’t hurt to check if it is enabled. If you’ve mistakenly created a Property that has a UA tag associated with it, it’ll cause some errors when tracking data with our Widget. We’d suggest that you create a new property again.

Continue adding more information about your business on the next section of the property creation.

Once you’ve hit Create, it will then show the Terms and Conditions for using Google Analytics.

2. Setting up the Data Stream for your website.

You will now be able to create the Data stream for your business. As for our test, we will be using the Platform “Web” as we’re only going to track our Booking Widget on an External website like wordpress.


Once you’ve selected your desired Platform, enter the websites URL along with the Stream name of your choice. Once all done, hit Create stream.


You will be then redirected to the Data stream settings that you’ve created. From there you’ll see the tagging instructions that you can use to track data on your website like gtag or GTM. In this scenario, we are only interested in using the gtag for our tracking purposes.

3. Implementing the gtag code on your website.

Copy over the gtag code that was shown on your Data stream settings.

Insert code at the  <head> part of your html 

Once you’ve pasted this code into the <head> part of your html, it should start tracking your integrated widgets activity - like how the booking process went on the customers end.

How to see Widget event parameters triggered by customer

From your Analytics Dashboard, go to Realtime


From there you should be able to see the “Event Count by Event Name” Report, and from there the Widget page events will be displayed


Here are the widget pages that each parameters represent:

  1. /*language*/widget/scheduleType - this event parameter gets generated after the customer has chosen the date for their booking. These are the schedule options that you have created for your activity.
  2. /*language*/widget/Calendar - this event parameter gets generated if the customer has viewed the calendar part of the widget. 
  3. /*language*/widget/tickets - this event parameter gets generated when the customer is viewing the pricing options that you have created for the activity schedule.
  4. /*language*/widget/addons - this event parameter when the customer views the addons that you have created/allocated for your activity
  5. /*language*/widget/checkout - On this event parameter here the customer will enter the buying user details, discount code application, the confirmation of the Terms of service and Privacy Policy.
  6. /*language*/widget/guests - On this event parameter the customer will enter the guest information for the participants of the booking.
  7. /*language*/widget/book - this event parameter gets generated once the customer has landed on the TrekkPay payment page.
  8. /*language*/widget/thankyou - this event parameter gets generated once the booking has been completed and has redirected the customer to the thank you page of the booking process.

How to track Conversions using the Event parameters.

Since we have now configured that the widget pages immediately get reflected on the Event parameters of Google Analytics. Converting these Events will be much easier for users if they wish to do so.

On the Right side panel of your Google Analytics dashboard, simply go to Events


From there, you can enable/disable the conversion every time the customer lands on a specific page of the Booking Widget.


  1. Here is an implementation guide that is from google if you have more than 1 code that's being used track data on your website (GTM, UA, etc) -
  2. Events will only be displayed a day after the widget activity. Meaning if a customer books for an activity of yours using the New Widget, all the Event log will only be displayed the following day.
  3. At the moment, integrating more than 2 widgets causes an error with the tracking or with the booking process. This is currently being fixed.
  4. First part of the widget where it shows the Activity details doesn’t seem to be getting tracked. Also being worked on.
  5. Once again, a property that has a UA tag generated with it will cause errors when using gtag to track Widget events.