Setting
up Google Analytics on Your Web Server
The Google Analytics
tracking code collects data for your web property, and returns that data to
Analytics where you can see it in reports. When you add a new web property to
your Analytics account, Analytics generates the tracking code snippet that you
need to add to the pages whose data you want to collect. You can use this
tracking code snippet as is, or customize it to collect additional data. The
tracking code snippet contains a unique ID for the web property that lets you
identify that property's data in your reports.
If you want to find
out if you have installed your tracking code properly, you can use the “View
Source” function of your web browser. The tracking code or “snippet” will have
been installed at the bottom of the code on the page. You will need to install
snippets on each page you wish to track them in Google Analytics.
If you are not
familiar with the code view of your website, usually the web host provider will
give you a hand setting this up. Keep your eyes open though because it’s not
something they’re going to do twice for you, unless your site is managed by a
communications firm or a consultant, in which case they will probably charge
you a fee for setting it up for you. However, if you’re going to be dealing
with data from Google Analytics, it would be wise to get familiar with the back
end of your site, if only for the monetary savings you’ll realize by not
needing to contact your go to person every time you want to take a look. To get
to the view page source option, right click on the mouse on a piece of open
page and the menu will appear. Once you have the menu, click on “view page
source”.
This is what the view page source will look like in most cases
Once you release the
mouse you will see the code view. As you can tell with this snippet, the Google
Analytics code IS NOT installed. But don’t worry. It’s a simple cut and paste
job to do so, at the bottom of The HTML at the bottom of your page. Remember,
this exercise isn’t about changing or moving code about on the page. You simply
have to look at the code, find the tail and cut and paste the code that Google
Analytics has generated for you.
Find the tracking code snippet for
your property:
The snippet of code would be placed here. The snippet of code will look like this:
Sign in to your Google Analytics account, and select the Admin tab. From the ACCOUNT and PROPERTY columns,
select the property you’re working with. Click Tracking
Info > Tracking Code.
This is what the
tracking code for www.screammedia.ca, looks like :
<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-59151106-1', 'auto');
ga('send', 'pageview');
</script>
-Wait for Part 2-
No comments:
Post a Comment