Understanding user behavior on your website is becoming more important than ever before. Google Analytics is a great free tool to add to start tracking the necessary data to uncover if your site is performing well and if your users understand what to do next. Luckily, it’s really simple to add Google Analytics to your website.
What You Need to Add Google Analytics
Your very first step should be to have or know someone who has access to your website’s code. If you don’t know if you have access, ask your web developer or IT staff.
If you run a WordPress website, you can download Google Analytics Dashboard Plugin for WordPress by MonsterInsights. It’s a great plugin and makes it very easy to get your web analytics up and running.
You will need a Google account to activate your Google Analytics account. This does not need to be a Gmail account. Your business email can be used, but keep in mind once you create a Google account you will need to decide if you want a Google+ profile for that email.
Installing Google Analytics
Installing the MonsterInsights plugin takes care of 99% of the work for you. But if you don’t have the plugin and need to access your website’s code, here are the steps you can take to add Google Analytics:
- Log into your Google Analytics account
- In the top menu, click Admin
- Under Property, click on Tracking Info
- Click on Tracking Code
- You will be presented with code like this:
<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXXXXX-1', 'auto'); ga('send', 'pageview'); </script>
Copy and paste this code into the head of your HTML as the following example shows:
<head> ... ... <!-- Paste your Universal Analytics code here --> </head>
I like, when possible, to put the code last in the head portion to ensure everything fires before Google Analytics.
What to do Next
When you first implement your new code, you will need to give it 1-2 hours before you start seeing data tracked. Check your Google Analytics account in 24 hours to confirm you are successful.
Don’t expect to have all the answers to your problems right away. Understanding the analytics of your site can take some time. It may take 30, 60, or 90 days before you really start discovering any user trends.