view
dan@move37.co.uk
How to Add Google Analytics to Your Website background

How to Add Google Analytics to Your Website

by The Team

Why You Need Google Analytics

Google Analytics provides valuable insights into how visitors interact with your website. By adding this powerful tool, you can:

Setting Up Google Analytics 4

Step 1: Create a Google Analytics Account

  1. Go to analytics.google.com
  2. Click "Start measuring"
  3. Enter your account name
  4. Configure your data sharing settings
  5. Click "Next"

Step 2: Set Up Your Property

  1. Enter your property name (usually your website name)
  2. Select your time zone and currency
  3. Click "Create"

Step 3: Set Up Your Data Stream

  1. Select "Web" as your platform
  2. Enter your website URL
  3. Give your stream a name
  4. Click "Create stream"

Step 4: Install the Tracking Code

Once your stream is created, you'll receive a Measurement ID (looks like G-XXXXXXXX). Now you need to add the tracking code to your website:

<!-- Google Analytics tracking code -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-XXXXXXXX');
</script>

Replace G-XXXXXXXX with your actual Measurement ID. Add this code to the <head> section of every page on your website, or:

Step 5: Verify Installation

  1. Wait 24-48 hours for data to appear
  2. Check your real-time reports to confirm tracking is working
  3. Visit your own site and see if your visit appears in the real-time data

Advanced Configuration

Setting Up Goals

Goals help you track specific actions on your site:

  1. Go to Admin → Goals
  2. Click "New Goal"
  3. Choose a template or custom goal
  4. Define your goal details (e.g., destination page, event)

Excluding Internal Traffic

To prevent your own visits from skewing data:

  1. Go to Admin → Data Streams → your web stream
  2. Click "Configure tag settings"
  3. Under "Define internal traffic," add your IP address

Next Steps

Once Google Analytics is up and running, explore these features:

By regularly reviewing your analytics data, you'll gain valuable insights to improve your website's performance and user experience.

Stay tuned for more tech tips and tutorials!

Blog

Loading posts...

Let's talk
about you, your company, your product and your goals.

With us, it happens.
We'd love to hear from you.