Google Analytics is a useful tool for gaining insights into what content your intranet, portal or website users are engaging with.
In this article we're going to cover how to setup, implement and enable Google Analytics on your Elcom Platform.
Setting up a Google Analytics account
The first step is to setup your Google Analytics account by signing up here: https://www.google.com.au/analytics/
Follow the prompts to create your account and your first property.
A property is a website, mobile application, or device (e.g., a kiosk or point-of-sale device.) An account can contain one or more properties. For example, my account is called ‘Elcom’ and in my Elcom account, I can have separate properties for our public website, our intranet and our reference site. This means the data is separated in Google Analytics.
If you already have an account, skip step one below and click on 'Add Property'.
1. Create an account
2. Create a property
3. Enter your business details
4. Now it’s time to set up a data steam. Select 'Web'. Then enter your site URL and a stream name (to help you differentiate between different streams you might add).
Note: This will finish the process of creating a new property in your account. Each property has a unique property ID (the numbers you see next to the property name) and unique tracking code. This tracking code contains the property ID and must be added to your website in order to track data.
5. After creating your account, you will be shown this page where you can get the Google Analytics tag/script:
There are two ways to add the tracking code to your website so you can begin seeing data in your property:
1. Add the tag directly to your website
2. Add the tags to your Google Tag Manager (GTM) account. GTM lets you manage all your site tags without editing code every time you add a new tag (and want to send data to or collect data from another platform e.g. Google tools, heat mapping tools and social media platforms).
Option 1: Adding Google Analytics directly into your site
Once you've got your tracking script code it's time to add it into your Elcom site. This will link your site to the Google analytics account you just created, so you will be able to start pulling in site data to your account.
Continuing from the process above, click into the tracking code area and copy the 'Global site tag':
Note: If you previously created your property and need to get to your tracking code again, go to 'Admin' > Select the account > Select the property > Select 'Data Streams' > Click on the data stream.
Once you have the tag, you'll need to log into your Elcom site and have permissions to access the Admin sections.
There are two main ways to insert the script:
1. The easiest way is to add it in the header section in you admin area under 'Global Site Settings', please note this only covers the base Elcom platform
2. Alternatively you can insert the script into your main Master Page template. This is preferable since it gives you full control over where it is placed and also covers Elcom Modules. If you know how to use Master Pages, copy the global site tag into the <head> section of your HTML. Otherwise, you can reach out to the Elcom Heskdesk.
Using Elcom's Global Site Settings to add the code
1. Click on 'Admin'
2. Click on 'Site Settings'
3. Click on 'Code Insertion'
4. Paste in code and click 'Save'.
Option 2: Adding Google Analytics via Google Tag Manager
Note: The GA4 Configuration tag should be fired on every page where you want to collect data for a Google Analytics 4 property, and should be triggered to fire as soon as possible, before any other Google Analytics 4 event tags.
To create a Google Analytics 4 Configuration tag:
1. Click 'Add a new tag'
2. Click the Tag Configuration pencil icon.
3. Select 'Google Analytics: GA4 Configuration'.
4. Enter your measurement ID from the Google Analytics property you created.
Note: If you need to find your measurement ID, it is in your data stream details and starts with a G-xxxxxxxxxx (Go to 'Admin' > Select the Account > Select the Property > Select 'Data Streams' > Click on the data stream).
5. Optional (do not action unless you are comfortable with using GTM):
- Add any parameters you'd like to configure in Fields to Set. Use the recommended event parameter names for best results.
- Add any custom user properties that you'd like to configure in User Properties. Note: Analytics automatically logs some user properties. You can set up to 25 additional user properties per Google Analytics 4 property
- Use Advanced Settings to set a Tag Firing Priority or use Tag Sequencing to help ensure that the Configuration tag fires before any other event tags that require it.
6. Click 'Triggering' and select appropriate events that would cause the tag to fire. We recommend that you fire the tag based off 'Page View' and to fire on all pages.
If you have a GTM account set up, you should already have this trigger set up. It will look like this.
7. Save the tag configuration and publish your container.
Allowing Google Analytics through your Company Firewall
This is an important step if you are setting up Google Analytics on your intranet or internal portal.
In order for Google Analytics to be able to record intranet or internal portal usage, it needs to be allowed access through to your corporate network.
Google has a support article covering what is required:
Check in Google Analytics
Once you've setup and implemented Google Analytics the first thing to check is the Real Time report.
In your analytics reports look for the Real-Time reports section in the left hand sidebar and expand:
If you have inserted the script correctly, the tracking should start showing immediately in the real-time report. Visit your home page in your browser, and navigate through a few pages. Then check the real time report to confirm that your activity is being tracked.
If you are seeing activity in the real-time report it means everything is working!
There are many things you can track using Google Analytics for your site such as: most visited pages, most downloaded documents, most frequent entry point etc. This information can assist you to adjust where you place important content and if it needs improving.
If you're using this guide to measure your intranet, you might also be interested in our free intranet measurement guide.
You'll discover actionable insights to help you measure and improve your company's intranet, and facilitate high performance workplace.