File: mobyle_ga.js

package info (click to toggle)
mobyle 1.5.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,272 kB
  • ctags: 2,745
  • sloc: python: 22,649; sh: 57; makefile: 31; xml: 6; ansic: 5
file content (16 lines) | stat: -rw-r--r-- 522 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
* Google Analytics statistics
*
*/
var _gaq = _gaq || [];

Event.observe(window, 'load', function() {
_gaq.push(['_setAccount', $('ga_code').value]);
_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';
  (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
})();
});