Telenet Cloud Online Help

How do I use Google Analytics for my Linux/IIS8 web hosting account?

To use Google Analytics, you must do two things:
1.    Create a Google Analytics account
2.    Set up the web tracking code

1.    Creating a Google Analytics account

•    Go to the Google Analytics website. On the homepage, click the ’Create an account’ button and follow the instructions on the screen.
•    Please refer to the Google Analytics help pages if you have questions about the settings. Go to ’Manage Accounts, Users and Data’.
•    To set Google Analytics for tracking an app, you can consult the ’Best Practices for Mobile App Analytics set up’.

2.    Setting up the web tracking code

To set up the tracking of data you must have access to the source code of your website. If you currently keep track of the data for your website using an older code snippet, remove this snippet from each page first, before you add the new one.
If you plan to make changes to your pages after you have added the new snippet, you can use a text or HTML editor to open and save a copy of each file.

The following procedure takes you through the process of adding the tracking code snippet to your site. First make sure you have already taken care of the following two things:
•    You have an Analytics account and use it for this site.
•    You have added your site as web property to the account you are using.

1.    First seek the tracking code snippet for your property.

a)    Click the ’Manage’ link on any Analytics page.
b)    Select the property you want to track.
c)    Verify that URL shown above matches the URL of your website.
If the settings show the wrong web property, click the link in the breadcrumb trail for your account and select the desired web property from the list.
d)    Click the ’Tracking info’ tab:
You will see code similar to the snippet below, where XXXXX-Y is the property ID.

(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

ga(’create’, ’UA-XXXXX-Y’, ’auto’);
ga(’send’, ’pageview’);

// ]]>

          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

     ga(’create’, ’UA-XXXXX-Y’, ’auto’);
     ga(’send’, ’pageview’);

2.    Select the desired tracking options and then click ’Save’.

3.    Copy and paste the code snippet:
When you find the code snippet, copy and paste it into your web page, just before the closing tag *. If your website uses templates to generate pages, add the snippet just before the closing tag in the file that contains the section. (Most websites use a single file for common content. If yours does, it is probably not necessary to place the code snippet on every page of your website.)
For optimal performance in all browsers we recommend that you place other scripts on your site in one of the following locations:
•    before the tracking code snippet in the section of your HTML code
•    after both the tracking code snippet and all the page content (e.g. below the HTML text).

4.    Check and correct:
Make sure your tracking code contains the correct web property ID for your profile (this should be the case if you copied the web property from the ’Profile settings’ screen). Recheck whether the tracking code placed on your website matches that in your profile. For more information about checking your settings, please visit the Google Analytics ’Checking your settings’ pages.

5.    Make any changes again using the asynchronous syntax. The Usage Guide and Migration Examples in Google Code contain many examples of changes to the asynchronous tracking code.

1.24 (17)
Article Rating (17 Votes)
Rate this article
There are no attachments for this article.
Related Articles
How to choose for a Shared Web Hosting solution?
Viewed 16101 times since Tue, Nov 18, 2008
Which Java Hosting solutions are provided by Telenet?
Viewed 4017 times since Wed, Aug 19, 2009
I only see a list of files and not my website’s homepage. What do I do?
Viewed 95816 times since Thu, Nov 27, 2008
How do I create a "404 - page not found" page for my hosting?
Viewed 8272 times since Mon, Nov 21, 2011
How can I secure my website statistics (awstats) with a login and password?
Viewed 10621 times since Tue, Sep 1, 2009
Some tips for a secure site...
Viewed 19743 times since Wed, May 15, 2013
What is data traffic?
Viewed 4336 times since Thu, Nov 27, 2008
How to link a mail or web hosting package to your domain
Viewed 102020 times since Fri, Dec 7, 2012
What is shared web hosting?
Viewed 14322 times since Thu, Nov 27, 2008
What technologies are supported by my IIS7 web hosting?
Viewed 6451 times since Wed, Sep 23, 2009