Press enter to see results or esc to cancel.

How To Setup Google Analytics on Your Website

How To Setup Google Analytics on Your Website

This is a visual step-by-step guide to add Google Analytics to your website.

Google Analytics – analytics service that tracks website traffic and conversion.

The most basic use of Analytics is to track your website traffic. It’ll give you raw, unfiltered (or even fake) data but it’s easy to start and you can at least get a general idea about visitors to your website.

There are more advanced steps to get much more accurate data and to track conversion or sales. They won’t be covered on this page but I’ll provide resources if you want to go more in depth at the end of this step-by-step.

Below are the steps to setup Analytics and add tracking code to your website.

 

 

Step 1: Login To Your Google Profile

Login to your existing Google/Gmail account or create a new one. You will need it for other services like adding your website to Google Search Console or adding your business to Google My Business directory for it to show up in Google Maps.

 

Google Account Login

 

 

Step 2: Go To Google Analytics

To to Google Analytics website and click “Sign Up:”

 

Start with Google Analytics

 

 

Step 3: Add New Analytics Account

Next, you need to input the following:

  • Account Name (use “Business Name” format) – this is an Analytics account for your whole brand and can track your website(s), app, YouTube channel and other properties.
  • Website Name (use “Business Name Website” format).
  • Website URL – choose your website protocol (http or https) and paste your website URL.
  • Can also add your business category.

 

Create Analytics Account and Add Website

 

And choose email notifications you’d like to receive (I usually opt out from all) and click “Get Tracking ID:”

 

Data Sharing Settings

 

Accept terms of service:

 

Accept Google Analytics Terms

 

Analytics account was successfully created.

 

 

Step 4: Add Tracking Code To Your Website

You will come to Property Settings page:

 

Property Settings and Tracking Code

 

This is your Tracking ID for your website. Copy tracking code below:

 

Copy Analytics Tracking Code

 

Now you need to add it to your website.

If you’re using platform other than WordPress – paste this code to to the body of your website (before </body> tag) or copy/paste your Tracking ID if they have a specific field to add it.

 

If you’re using WordPress, go to Appearance -> Editor:

 

WordPress Appearance Editor

 

It is better if you use Child Theme but if you’re not sure how to create one and your WordPress theme documentation didn’t include a step-by-step to create a Child Theme – it’s OK. Just don’t update your website theme.

Find “footer.php” file:

 

WordPress Website Footer File

 

Open it and scroll down and find </body> and </html> code:

 

Footer php code

 

Make some space before </body> tag and paste your tracking code:

 

Paste Analytics Tracking Code to Footer

 

That’s it.

Google Analytics will now start getting data if you did everything correctly.

 

 

Step 5: Analytics Account Structure

Back to Google Analytics and click “Admin:”

 

Google Analytics Admin and Settings

 

Google Analytics has 3 levels of organization:

  1. Account
  2. Property
  3. View

Account (top level) can be used to track multiple properties (2nd level) of the same brand – website, app, YouTube, etc.

Each property has unique views of data.

Standard procedure is to create at least 3 views for each property:

  • unfiltered view (all data without any filters)
  • master view (useful filtered data)
  • testing view (test impact of changes)

You can learn more at Google Analytics Academy.

Don’t experiment changing settings in Analytics unless you know what you’re doing.

 

 

Step 6: Modify Unfiltered View Settings

If you only want to do the minimum today – just change the name of 1 view you currently have.

Click “View Settings” under your “All Web Site Data” view:

 

Change View Settings

 

Under basic settings, change View Name to your business URL and add “(unfiltered)” after it:

 

Basic View Settings Unfiltered

 

Save changes:

 

Save View Name Change

 

Click “Home” and understand how it is all structured. You see all 3 levels here:

 

Analytics Home

 

 

Step 7: Test That Analytics Works

To test if you added your tracking code properly – open your website in a new tab (and leave it open).

Go to Analytics and click “Reporting” at the top.

Then “Real-Time” -> Overview:

 

Google Analytics Reporting

 

Make sure you have your website opened in a new tab and (if you added tracking code correctly) you should see 1 active use on site:

 

Real Time Reporting Active User

 

Done!

 

 

Next Steps

Options are unlimited here. Analytics is an advanced area of study.

Here are some things you can do to improve your Analytics data:

 

 

Your Turn!

Any simple steps you know of to make your Analytics data better?

Any questions or feedback?

 

What Say You

0 Comments
Comments

Leave a Comment