Setting Up Web Analytics

In the first article, we introduced web analytics and its importance in understanding and optimizing website performance. Now, let’s dive into the practical aspects of setting up web analytics, ensuring we can start tracking and analysing data effectively.

Choosing the Right Web Analytics Tool

Before we can start collecting data, we need to choose a web analytics tool. There are several tools available, but the most popular and widely used one is Google Analytics. It’s free, powerful, and offers a range of features that can help you understand your website’s performance. Other notable tools include:

Adobe Analytics: A robust tool used by many large enterprises, offering advanced features and integration with other Adobe products.

Matomo: An open-source analytics platform that gives you full control over your data.

Mixpanel: focuses on user interactions and is great for tracking specific events on your site.

For this article, we will focus on setting Google Analytics 4.

Setting up Google Analytics 4

Setting up web analytics with Google Analytics 4 involves creating a property, adding a data stream, installing the tracking code, and defining key events (conversions). By doing this, you can start collecting valuable data about your visitors’ behaviour.

Create a Google Analytics account:

  1. Visit the Google Analytics website.
  2. Sign in with your Google account.
  3. Click on “Start measuring” to create a new account.

Set up a Property:

  1. Enter an account name (this can be your business or website name)
  2. Click next and enter the property details. A property represents your website or app, and you can have multiple properties within one account.
  3. Enter your website name, URL, industry category, business size, business objectives and reporting time zone.

Add a Data Stream:

  1. After setting up your property, you have to choose a platform to start collecting your data. So, choose “Web”.
  2. Enter your website URL and stream name, then click “Create stream”.

Install the Tracking Code:

  1. After creating a data stream, Google Analytics will provide a measurement ID and piece of JavaScript code (view tag instructions and click on install manually).
  2. Copy the global site tag (gtag.js) code.
  3. Now paste this code immediately after the <head> element on each page of your website.

Verify Tracking:

  1. Once the tracking code is installed, you can verify that Google Analytics is collecting data.
  2. Go back to Google Analytics and if you have multiple properties, ensure you select the GA4 property you want to check.
  3. On the left-hand menu, you should see a section called “Reports.” Click on it.
  4. Under “Reports,” click on “Realtime.” This section provides real-time data on your site’s current activity.
  5. In the Realtime report, you should see data for active users on your website.
  6. Visit your website in a new browser tab or window. Navigate through a few pages to generate some data.
  7. Return to the Realtime report in Google Analytics. You should see your activity reflected in real-time, such as page views and events.

Setting Up Key Events (conversions)

Define and Mark key events:

  1. Go to Admin and click on “Events” under the “Data Display” section.
  2. GA4 automatically tracks some events and you can add custom events.
  3. To mark an event as a key event, find the event you want to track and click on it.
  4. Toggle the switch to mark it as a key event. This action will track this event as a conversion.

Create Custom events if needed:

  1. If the event you want to mark as a key event is not listed, you can create a custom event.
  2. In the “Events” section, click on “Create event”.
  3. Click “Create” and fill in the details to define your custom event, such as the event name and conditions.

Mark Custom Event as Key Event:

  1. After creating your custom event, return to the “Events” section.
  2. Find your custom event in the list and toggle the switch to mark it as a key event.

In the next article, we’ll explore how to understand and analyse web traffic, helping you gain deeper insights into where your visitors come from and how they interact with your site. Stay tuned!

Adblock test (Why?)