Files
sailing-analytics/wiki/ganalytics.md
T

2.4 KiB

Introducing Google Analytics (Bug 2043)

GAnalytics Homepage: http://www.google.com/intl/en/analytics/
GAnalytics Account: gmsponsorship@gmail.com
GAnalytics PW: sailing123

GAnalytics Tracking ID: UA-52789785-1 (to make tracking possible for the webpage the tracking code has to be embeedded in the html code)

track events (clicks on links):

    1. for event tracking please embed the following javascript-code in the html code of the web page to create the object _gaq
      When calling method _gaq.push(['_setAccount', 'UA-XXXXX-X']) please use the specific ganalytics tracking code as param
      Coding:
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); </script>
    1. to embed tracking for hyperlinks use the onClick() method for each link
      Syntax: <a href="#" onClick="_gaq.push(['_trackEvent', category, action, label])

definition of params:
• category (required)
The name you supply for the group of objects you want to track.
• action (required)
A string that is uniquely paired with each category, and commonly used to define the type of user interaction for the web object.
• label (optional)
An optional string to provide additional dimensions to the event data.
• value (optional)
An integer that you can use to provide numerical data about the user event.
• non-interaction (optional)
A boolean that when set to true, indicates that the event hit will not be used in bounce-rate calculation.

see also: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide

It might take a day, until the results are available on the dashboard (it will appear under "Behavior/Verhalten")

track page load time:
see: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#gat.GA_Tracker._trackPageview

useful information for web page tracking with ganalytics:
https://developers.google.com/analytics/devguides/collection/gajs/