You just signed up for Google Analytics. AWESOME!!! Let’s set up a new account for your website.
Set Up An Account For Your Site
- In the top right corner of the orange bar, click on the Admin link.
- On the next page, right underneath the Accounts tab, click on the New Account button.
- Next, select Universal Analytics, and scroll down the page to where you enter your name for your website.
- Enter a name for your website, then enter the URL or web address for your website.
- Next, enter a name for the account. (You can pretty much make this the same name as your web site.)
- The last two options for Date Sharing Settings, you can keep both of those clicked on.
- Click on the Get Tracking ID button and accept the Terms of Agreement.
- If everything works out, on the next page you go to, you’ll see the tracking code you’ll need to apply to your site.
Apply The Code to Your WordPress Site
Ok, now this is an assumption that you have WordPress running your site. If you do not, this may not be much help to you. If you do, here are a the steps to help you apply the code to all of the pages on your site. Also, if you’re using WordPress, there are a few plugins that can help you apply the code with your site. But sometimes, even the simplest plugins have issues. So, it may be best to do this step manually. Also, make sure are using the template you want to use to run your site. If you have not selected your final template, you may want to wait until you have the look and feel you want to use for your site.
In Google Analytics, select the tracking code and copy the code from this page.
- Log into your WordPress site.
- After you log in, go to the left column and go to Appearance > Editor.
- On the editor page, in the left hand column, you’ll see a link for Header (header.php). Click on that link. (The header file is the file at the top of all of your site’s pages. Therefore, whatever pages you have on your site will read the code because the header controls all the pages in your site)
- In the code window, you need to look through the code for something that says </head>. This is the closing tag for the head code of your website. (Quick note, the head code controls all of your web page’s behind the scenes code functionality. It holds very important code for interactivity and links to your site’s visual information)
- You want to paste your google analytics code above the closing head tag in your code. In the end it should look something 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-11111111-1’, ‘sitename.com’);
ga(‘send’, ‘pageview’);</script>
</head> - Hit the Update File button below the code window, and that should do it. If you go back to Google Analytics, you can test to see if your analytics account is connected in the account window.
Leave a Reply