1. Home

Using Google Analytics with your Intranet, Portal or Website

22 Oct 2021

return to the Elcom blog return to the previous page
  1. Content Type

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

Google Analytics - Settings up an account

2. Create a property

Google Analytics - Settings up a property

3. Enter your business details

Google Analytics - Providing Info about your business

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).
Google Analytics - Set up data stream

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.

Google Analytics - Property ID

5. After creating your account, you will be shown this page where you can get the Google Analytics tag/script:

Google Analytics - Tracking code

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':

Google Analytics - Copy Tracking Code

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.

Google Analytics - How to find your measurement ID

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'

Elcom Site - Code Insertion

4. Paste in code and click 'Save'.  

Elcom Site - Insert Code

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'

Google Tag Manager - New Tag

2. Click the Tag Configuration pencil icon.

Google Tag Manager - Add a Tag

3. Select 'Google Analytics: GA4 Configuration'.

Google Tag Manager - Select GA4

4. Enter your measurement ID from the Google Analytics property you created.

Google Tag Manager - Add a GA4 Tag

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).

Google Analytics - Measurement ID

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.

GTM - Page Views

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:

In order for Analytics to generate reports for your site usage, your corporate network must be able to reach the Analytics JavaScript file (analytics.js). Try loading the file in your browser using one of the following links:

If you can reach one of these URLs from your internal network, you can use Analytics to collect data from your intranet or portal. Your site must also be accessible through a fully qualified domain name such as http://intranet.example.com. The Analytics JavaScript won't work if your site can only be accessed using a domain name that isn't fully qualified, such as http://intranet.

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:

Google Analytics - Real Time Reporting 

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.

Other recommended articles

15 Enterprise Portal Features and Capabilities You Need to Consider

No two portals are the same. However, the most successful portals share several features and capabilities that make them valuable for stakeholders. Find out what they are.

Employee Retention & Intranets: The Key to Keeping Turnover Low

Why and how can intranet CMS software help to retain employees? As we examine, the key is in improving communication, employee engagement and company culture.

8 Website Design Trends That Have Taken Off In 2022

Give your audience a remarkable web experience. Discover the 8 key website design trends of 2022.

Choosing the Best Web Hosting Service for Your Business

Some web hosting services will offer a low price, others will try to charm you with lots of bells and whistles. Get insights on choosing the best one for your needs.

Scroll to top