1 -------------------------------------------------------------------------------
3 -------------------------------------------------------------------------------
5 Release date: 12/17/2007
6 -------------------------------------------------------------------------------
8 -------------------------------------------------------------------------------
11 -------------------------------------------------------------------------------
13 analytics and client monitoring system. Including the base analytics
14 system and any number of plugins enables logging of different system data
15 back to the server. Plugins included at this time:
17 dojo - reports dojo startup collected information
18 window - reports available window information to the server
19 mouseOver - allows periodic sampling of mouseOver
20 mouseClick - reports any mouse clicks to the server
21 idle - reports idle/activity
22 consoleMessages - reports console.* messages to the server
25 -------------------------------------------------------------------------------
28 Dojo Core (package loader).
29 -------------------------------------------------------------------------------
34 The primary intended usage will be to create a custom build layer that includes
35 the particular plugins you need for your project. However in practice you
36 can use the system as such:
38 <script type="text/javascript" src="../../../dojo/dojo.js"
39 djConfig="parseOnLoad: true, isDebug: false, usePlainJson: true, sendMethod: 'script', sendInterval: 5000"></script>
41 <script language="JavaScript" type="text/javascript">
42 // include the analytics system
43 dojo.require("dojox.analytics");
45 //tracks mouse clicks on the page
46 dojo.require("dojox.analytics.plugins.mouseClick");
48 // this plugin returns the informatin dojo collects when it launches
49 dojo.require("dojox.analytics.plugins.dojo");
51 // this plugin return the information the window has when it launches
52 // and it also ties to a few events such as window.option
53 dojo.require("dojox.analytics.plugins.window");
55 // this plugin tracks console. message, It logs console.error, warn, and
56 // info messages to the tracker. It also defines console.rlog() which
57 // can be used to log only to the server. Note that if isDebug() is disabled
58 // you will still see the console messages on the sever, but not in the actual
60 dojo.require("dojox.analytics.plugins.consoleMessages");
62 // tracks where a mouse is on a page an what it is over, periodically sampling
63 // and storing this data
64 dojo.require("dojox.analytics.plugins.mouseOver");
66 //tracks when the user has gone idle
67 dojo.require("dojox.analytics.plugins.idle");
71 When done using a build, none of the dojo.require() statement will be requires
72 would already be in the build.
74 Most of the plugins and the base itself have a number of configurable params
75 that are passed in via the djConfig variable set. This approach is taken so that
76 the parameters can be easily provided in the case of a build or for a custom
77 dojo.js build with analytics built in. Examples for different build profiles
78 are in the profiles directory.
80 Available Configuration Parameters:
83 sendInterval - Normal send interval. Default 5000
84 sendMethod - "script" || "xhrPost"
85 inTransitRetry - Delay before retrying an a send if it was in transit
86 or if there is still data to be sent after a post.
88 analyticsUrl - url to send logging data to. defaults to the test php
90 maxRequestSize - Maximum size of GET style requests. Capped at 2000 for
91 IE, and 4000 otherwise
93 consoleMessages Config:
95 consoleLogFuncs - functions from the console object that you will log to
96 the server. If the console object doesn't exist
97 or a particuarl method doesn't exist it will be
98 created as a remote logging only method. This provides
99 a quick and convient way to automatically define
100 a remote logging funciton that includes the functions
101 name in the log. The 'rlog' in the default paramerters
102 is an example of this. Defaults to ["error", "warn", "info", "rlog"]
106 idleTime - Number of ms to be idle before being reported to the server as idle
109 targetProps - the properties whose values will be reported for each target from
110 a mouse over sample. defaults to ["id","className","localName","href", "spellcheck", "lang", "textContent", "value" ]
112 sampleDelay - the delay in ms between mouseover samples. Defaults to 2500
115 windowConnects - methods on the window objec that will be attached to
116 have its data passed to the server when called.
119 Note that the basic usage of this system simply serializes json with toJson() when passed
120 to the analytics addData() method. If data is passed that has circular references
121 it will die. Take care not to do that or be surprised when it doens't work
125 -------------------------------------------------------------------------------
126 Installation instructions
128 Grab the following from the Dojo SVN Repository:
129 http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/analytics
131 Install into the following directory structure:
134 ...which should be at the same level as your Dojo checkout.