Starting from July 1st, 2023, Google is sunsetting Universal Analytics (UA) and replacing it with Google Analytics 4 (GA4). For you as, an Avinode member, to continue getting valuable analytics data from your Avinode Web App into your Google Analytics account, you will need to ensure that you have the correct Google Analytics 4 ID inserted in the settings of your Avinode Web App.
Introduction
The purpose of this guide is to help you ensure that your Avinode Web App is correctly set up, enabling the sending of analytics data to your Google Analytics account from the Web App. If you need assistance with the initial setup of your Avinode Web App, please review Setting Up Web Apps
Step 1: Create a Google Analytics account for your website/Web App
If you already have a Google Analytics account with Universal Analytics but need to create a Google Analytics 4 property, you can skip to step 2.
To have analytics tracking in your Avinode Web App, you will need to have a Google Analytics account set up. You can start by setting up a Google Analytics account for your website or app by following the guidance provided in the following Google support documentation: [GA4] Set up Analytics for a website and/or app - Analytics Help
Step 2: Add a Google Analytics 4 (GA4) property to your website
To obtain your Google Analytics 4 (GA4) ID, you will need to add a GA4 property to your website: [GA4] Add a Google Analytics 4 property (to a site that already has Analytics) - Analytics Help
Step 3: Insert the GA4 ID into your Avinode Web App settings
Once you’ve set up your GA4 property in Google Analytics, you will have obtained your Google Analytics 4 ID (GA4 ID), which is in the format G-XXXXXXXXXX. If you aren’t able to find your GA4 ID, please review: [GA4] Find your Google tag ID - Analytics Help
Copy your GA4 ID and paste it into your Avinode Web App settings under Company → Apps → “Name of your Web App” → Embed → “Google Analytics 4 ID” and click “Save”.
Event tracking
By providing your Google Analytics 4 ID under the “Embed” tab, as described above, you will be able to track the following events from inside the web app:
-
Show category description – Clicking on a category description. (We can not send the category type since they are not final. These can be whatever.)
-
Change currency to: <currency_code> – Changing currency
-
Sending inquiry – Clicking the “Send inquiry” button to send an inquiry
-
Change language to: <language_code> – Changing language
-
Change <date field> – Changing date fields, where the date field is the date depending on the search. (fromDate, endDate, date)
-
Change <time field> – Changing time fields, where the date field is the time depending on the search. (fromTime, endTime, time)
-
Decrement pax or “Increment pax” – Changing PAX
-
Change trip type to: <trip_type> – Changing trip type
-
Open inquiry form – Clicking the "Inquire" button in the search result
-
Close inquiry form – Clicking cancel or X in the inquiry form
-
Search, <search_type> – Searching
-
Change startAirport – Changing start airport
-
Change endAirport – Changing end airport
No further configuration is needed. See the example below on what it should look like in your Google Analytics account once a few different events are being tracked.
The Avinode Web App events are found under the name “action” → ”eventAction” in the “Events” menu under “Engagement”.
For information about how Google Analytics 4 data is displayed differently from Universal Analytics in the Google Analytics interface, please see [GA4] Why does Google Analytics look different? - Analytics Help
Conversion tracking
The web app solution supports a referrer variable to be sent to Google Analytics. This is configured by adding the query parameter "analyticsReferrer" to your Avinode Web App bootstrap script, with a referrer (URL to your referral site). See the example below of how code is generated after entering an URL in the textbox and clicking "Save".
With “analyticsReferrer” we will send the referrer to Google Analytics and one can create reports based on different referrer values.
When not adding a referrer to the Avinode Web App bootstrap script, traffic will appear to be coming from an Avinode page (https://apps.avinode.com/webapp/) instead, and you won't be able to track your traffic correctly in Google Analytics.
Advanced analytics tracking
When implementing advanced analytics tracking, you will be able to map certain events, referral traffic, and track conversions within your Google Analytics account.
Please note that the successful implementation of this may require you to employ the assistance of a third party that is specialized in Analytics tracking since the events sent from the Avinode Web App would need to be correctly captured and attributed within Google Analytics.
The Avinode Web App sends out events whenever an action (typing, selection, button clicks, etc) is performed on the Web App. These events can be captured by the addition of an event listener, which can be synced with any tracking tool, such as Google Analytics.
Listening for "avinode-tracking" events enables you to react to all events that the web app is currently tracking. Simply define an event handler and implement your own logic, and do note that not all keys have arguments, see below for the full documentation.
A simple event listener would look something like the code sample found below. Please note: A certain amount of tweaking and customization to the event listener code may be necessary for it to work seamlessly with your website and Google Analytics. This is where you will need to consult your web development company and/or Analytics consultancy company, as we are unable to support individual development and/or customization of non-Avinode services.
window.addEventListener ("avinode-tracking", function (msg) {
// Will output the key string, i.e. 'change airport' console.
log ("tracking-key", msg.detail.key);
// Will output the args string array, i.e. 'startAirport'
console. log ("tracking-args", msg.detail.args);
}, {passive: true});
Below is the list of keys and their associated arguments.
Key |
Arguments |
---|---|
show_category_description |
|
change_airport |
'startAirport' or 'endAirport' |
change_currency |
The selected currency |
send_lead |
|
send_inquiry |
|
change_language |
The selected language |
change_date |
'date' or 'returnDate' |
change_time |
'time' or 'returnTime' |
increment_pax |
|
decrement_pax |
|
change_trip_type |
The selected trip type |
open_inquiry_form |
|
close_inquiry_form |
|
search_one_way |
|
search_round_trip |
|
search multi city |
|
search_empty_leg |
|
Additional resources
For more information about Google Analytics, please refer to the links below: