Setting up Google Analytics on Your Website

Google Analytics is a powerful (and FREE!) tool offered by Google that allows you to understand your website’s traffic and how your content and marketing efforts are performing. This is definitely one of my all time favorite web related things.
With this tool integrated to your website you can track the amount of traffic coming into your website, where visitors are arriving from (organic search results, social media, etc), and so much more.
Knowing where your traffic is coming from is so important for how you create content and where you invest time and money into. For example, if you see that your “How to” blog post is bringing large amounts of traffic to your website — then that would be the place to focus your efforts on. Or if people are finding you via Instagram — then putting your effort into social media content might be the way to go.
To get started with Google Analytics you just have to create an account (or use your current Google account). Then you will connect your new Google Analytics account to your website. Below I show you how to create your Google Analytics account and how to integrate your Google Analytics account to your WordPress or Squarespace website.
Watch the video or read the steps below.
Creating Your Google Analytics Account
First we’ll need to create our account with Google Analytics. To do this go to analytics.google.com and log into your Google account.
Follow the steps and fill out each field.
1. Account Setup
Enter your account name and what information you would like to share with Google.
2. Property Setup
Here you will enter the Property Name. This is just in case your account has different tracking codes for various platforms.
Select your Time Zone and Currency.
3. Business Information
Fill out this section.
You will then accepts the Terms of Service provided by Google.
Select what platform we are connecting this account to. If you are setting this up for a website select Web.
Next step is to enter the full domain. Select whether you are using HTTP or HTTPS.
Select Create Stream. Go to Add New On-Page Tag and select Global Site Tag. Copy this code as we will need it to connect our new Google Analytics account to our website.
Installing Google Analytics on Your Website
Next we need to install the Google Analytics tracking code to your website. In this tutorial we’ll go over how to install the tracking code on a WordPress or Squarespace website. Click on the method you want to use to read the step-by-step guide.
1. Add Google Analytics to WordPress with MonsterInsights
2. Add Google Analytics to WordPress with “Insert Header and Footer” Plugin
3. Add Google Analytics to WordPress without a Plugin
4. Add Google Analytics to Squarespace
Using Google Analytics in WordPress
There are a few ways that you can connect Google Analytics to your WordPress website. In this tutorial we’ll cover three different methods. First two options are using either the MonsterInsights plugin or the Insert Header and Footer plugin. The last method is directly installing the tracking code into your theme files.
Let’s get started!
Add Google Analytics to WordPress with MonsterInsights
With this method we will need to install the MonsterInsights plugin then connect our Google Analytics tracking code. With this plugin we will also be able to view all of our website stats directly on our WordPress dashboard.
1. Install MonsterInsights
On your WordPress dashboard go to Plugins >> Add New >> in the search box type MonsterInsights >> when the plugin comes up click on Install Now >> then Activate.
2. Connect MonsterInsights with your Google Analytics account
Next we’ll integrate the plugin with your Google Analytics account. To do this click on the Insights tab on the left hand side of your WordPress dashboard.
Select Launch Setup Wizard. Follow the prompt that appears.
You will then have to connect your Google account select Connect MonsterInsights. Sign into your Google account (if you aren’t already signed in). You will then select Allow to give permission to MonsterInsights.
Next you’ll select the Google Analytics profile you want to connect to in the drop down menu >> select Complete Connection.
Review the Recommended Settings page. The default settings should work well for most websites. Scroll down and click on Save and Continue.
Next you’ll see some additional add-ons that you can upgrade to. You can just skip this by clicking on Save and Continue. The next section will recommend downloading WPForms which you can skip by clicking on Skip this Step.
3. Reports on WordPress:
With this feature you will be able to see your website’s analytics directly from your WordPress dashboard. Just go to Insights >> Reports to view the stats. Keep in mind that when you first install Google Analytics it can take up to 48 hours to start reporting any data.
Add Google Analytics to WordPress with “Insert Header and Footer” Plugin
With this method we will need to install the Insert Header and Footer plugin then connect our Google Analytics tracking code. This option doesn’t provide all the additional reporting that MonsterInsights does — but you will still have full access to your reports directly via Google Analytics.
1. Install Insert Header and Footer
On your WordPress dashboard go to Plugins >> Add New >> in the search box type Insert Header and Footer >> when the plugin comes up click on Install Now >> then Activate.
2. Add tracking code to the header section
Next we’ll add your Google Analytics tracking code. To do this click on the Settings tab >> Insert Header and Footer.
In the Scripts in Header section paste your Google Analytics tracking code. Select Save.
And you’re all done!
Add Google Analytics to WordPress without a Plugin
Plugins are a great tool for any WordPress website — but sometimes we don’t need all the features that it includes or prefer to manually input certain things.
Integrating Google Analytics to your WordPress website can be done without installing an extra plugin to your website. With this method we will install the tracking code directly to your Theme’s Header file.
Side Note: Some themes such as the Genesis Framework or Divi themes will have a section where you can add the tracking code to the header without having to make changes to the core theme files. Check the documentation for your theme to see if this option is available or search for it in your theme settings. Usually you can find this available within the theme tab on your WordPress dashboard.
1. Go to your theme files
To access your theme files go to Appearance >> Theme Editor. Here you will search for your theme’s header.php file.
2. Add tracking code to your header.php file
Within that file search for the the “<body>” tag >> right underneath it you will paste the tracking code.
Save your changes.
Add Google Analytics to Squarespace
On your Squarespace dashboard go to Settings >> Advanced >> Code Injection. Here you will paste the tracking code.
Save your changes and you are all done.
Found our “Setting up Google Analytics on Your Website” tutorial helpful? We would love it if you shared it. Click on the icon below to share our Google Analytics tutorial.
Make sure to follow along over on Instagram or subscribe to the JDS newsletter for more WordPress tips and tutorials.
Studio Break
A monthly note from Jelly Design Studio with design tips, thoughtful updates, and creative support for small business owners who want their websites to do more – and feel like them. When you sign up, you’ll receive:
- The Ultimate Homepage Checklist
- Studio Break: The Monthly Newsletter


