Step 2—Connect Google Analytics to your website

Sign up for Google Analytics

You can sign up for a free Google Analytics account at analytics.google.com. To make your life easier, ensure that you use the same Google login for both your Ad Grant and your Analytics account.

As of July 2023 every user has had to migrate to Google Analytics 4 (GA4), which works significantly differently to the old (UA) version. You may only be familiar with the old version, or with GA4. Be aware when referring to Google's support pages, that there are different sets of instructions for GA4 and UA. This tutorial will only describe how to set up conversion tracking in GA4.

You'll be asked a few questions about how you plan to use Analytics, and what category of user you wish to choose. Then you'll be asked what website to connect to.

How to create a Data stream

The first task is to create a Data stream, a flow of data from a website to Google Analytics. This gives you a Measurement ID that you'll need to connect your site.

Click the blue admin cog icon in bottom right of the screen. Then navigate to Property settings > Data collection and modification > Data streams.

You should see a page that lists data streams. The example in the screenshot shows one data stream, which connects Analytics to a nonprofit's website.

If you see a data stream already listed, great. Check it's for your website. Check that traffic is being received before progressing.

If you do not see a relevant data stream listed, click the blue button to add stream then select the option for web. You should see the screen below.

Enter your website's address and give your stream a name (just the name of your nonprofit is ok).

You will see a section of options for Enhanced measurement. This is an essential step if you want to set up conversion tracking. Click the cog icon on the right side of the box to see the screen below, which lists types of events that Google Analytics can track happening on your website.

Page views is always automatically ticked. For now, make sure that all options are selected. In a subsequent step we will discuss what these events actually mean and why you might or might not want to track them.

Make a note of your measurement id

Your Measurement id is a unique code that ensures data is sent to the correct Google Analytics property. Click on the data stream to open this screen where you can see the id. There is an icon beside the id to copy it for pasting elsewhere. Make a note of it, as this may be needed to connect your website to Analytics.

How to connect your website to Google Analytics

Depending on how your website has been built and what technology you use, there may be more than one way to connect it to your Google Analytics account.

If you have a WordPress website

If you have a website built with WordPress, I recommend you only use Google's official plugin for WordPress, called SiteKit, to connect the site to GA4. See sitekit.withgoogle.com. Once the plugin is installed, it's quick and simple to connect it to Analytics and you will be able to see basic visitor stats in your WordPress dashboard.

Using your website's Content Management System (CMS)

Here is a list of website building tools and CMS with instructions for how to connect each to GA4: support.google.com/analytics/answer/10447272. If your CMS is not listed, visit their support website and follow the instructions in their own documentation.

Connect using Google Tag Manager

If you don't use a CMS that enables Analytics code, you'll have to insert code into your website manually. There is more than one way to do that.

A common way to add Analytics code to a website, is to use a free tool called Google Tag Manager (GTM). That makes sense if you already use GTM to add other code to your site, but not if all you want to add is a short snippet of code for one purpose. If you already use GTM, follow these instructions: support.google.com/tagmanager/answer/9442095

Add code directly to your website's HTML

If you do not use GTM, you can add code directly to your website. BUT please be careful as one small error could crash your website.

You'll need access to the HTML for your web pages. Ask your web developer to perform these steps if you're unable to complete the steps yourself.

  1. Click on the Data stream for your website.
  2. Under Google tag, click View tag instructions.
  3. On the Installation instructions page, select Install manually:
  4. On the screen, you’ll see the JavaScript snippet for your account's Google tag. Your Google tag is the entire section of code that appears, beginning with

    <!-- Google tag (gtag.js) -->
    and ending with
    </script>

  5. Copy and paste your Google tag immediately after the <head> on each page of your website.

It can take up to 30 minutes for data to start flowing, after which you should be able to use the Real-time report in Google Analytics to confirm that you're receiving data. Click around your website and see if your visit is tracked by the report (see below).

Complete and Continue  
Discussion

0 comments