Google Analyticator - Version 1.52

Version Description

Download this release

Release Info

Developer cavemonkey50
Plugin Icon 128x128 Google Analyticator
Version 1.52
Comparing to
See all releases

Code changes from version 1.51 to 1.52

google-analyticator/ga_external-links.js CHANGED
@@ -3,25 +3,22 @@ Docs: http://www.terenzani.it/54/urchintrack-utility-tracciare-link-esterni-e-do
3
Author: Francesco Terenzani http://www.terenzani.it/ ******/
4
5
function urchin(){
6
- this.trackDownload = '';
7
- this.trackLinks = function(){
8
- var a = document.getElementsByTagName('a');
9
- var domain = /^(http|https):\/\/([a-z-.0-9]+)[\/]{0,1}/i.exec(window.location);
10
- var internalLink = new RegExp("^(http|https):\/\/"+domain[2], "i");
11
- var isDownload = new RegExp("("+this.trackDownload+")quot;, "i");
12
- for(var i = 0; i < a.length; i++){
13
- if(internalLink.test(a[i].href)){
14
- if(this.trackDownload && isDownload.test(a[i].href))
15
- a[i].onclick = function(){
16
- urchinTracker('/download/'+this.href.replace(/^(http|https):\/\/([a-z-.0-9]+)\//i, '').split('/').join('--'));
17
- };
18
- }
19
- else
20
- a[i].onclick = function(){
21
- urchinTracker('/outgoing/'+this.href.replace(/^http:\/\/|https:\/\//i, '').split('/').join('--'));
22
- };
23
- };
24
- };
25
};
26
27
function onContent(f){//(C)webreflection.blogspot.com
@@ -33,4 +30,20 @@ if(d[e])d[e]("DOMContentLoaded",w[c],false);
33
if(/WebKit|Khtml/i.test(b)||(w[o]&&parseInt(w[o].version())<9))
34
(function(){/loaded|complete/.test(d[r])?w[c]():setTimeout(arguments.callee,1)})();
35
else if(/MSIE/i.test(b))d.write(s);
36
- };
3
Author: Francesco Terenzani http://www.terenzani.it/ ******/
4
5
function urchin(){
6
+ this.trackDownload = '';
7
+ this.trackLinks = function(){
8
+ var a = document.getElementsByTagName('a');
9
+ var domain = /^(http|https):\/\/([a-z-.0-9]+)[\/]{0,1}/i.exec(window.location);
10
+ var internalLink = new RegExp("^(http|https):\/\/"+domain[2], "i");
11
+ var isDownload = new RegExp("("+this.trackDownload+")quot;, "i");
12
+ for(var i = 0; i < a.length; i++){
13
+ if(internalLink.test(a[i].href)){
14
+ if(this.trackDownload && isDownload.test(a[i].href))
15
+ addHandler(a[i], 'click', function(){ urchinTracker('/download/'+this.href.replace(/^(http|https):\/\/([a-z-.0-9]+)\//i, '').split('/').join('--')); }, false);
16
+ }
17
+ else {
18
+ addHandler(a[i], 'click', function() { urchinTracker('/outgoing/'+this.href.replace(/^http:\/\/|https:\/\//i, '').split('/').join('--')); }, false);
19
+ }
20
+ };
21
+ };
22
};
23
24
function onContent(f){//(C)webreflection.blogspot.com
30
if(/WebKit|Khtml/i.test(b)||(w[o]&&parseInt(w[o].version())<9))
31
(function(){/loaded|complete/.test(d[r])?w[c]():setTimeout(arguments.callee,1)})();
32
else if(/MSIE/i.test(b))d.write(s);
33
+ };
34
+
35
+ function addHandler(obj, evt, newhandler, captures)
36
+ {
37
+ if (obj.attachEvent)
38
+ obj.attachEvent('on' + evt, newhandler);
39
+ else if (obj.addEventListener)
40
+ obj.addEventListener(evt, newhandler, captures);
41
+ else
42
+ {
43
+ var oldhandler;
44
+ if (oldhandler = obj['on' + evt])
45
+ obj['on' + evt] = function() { oldhandler(); newhandler(); }
46
+ else obj['on' + evt] = newhandler;
47
+ }
48
+ }
49
+
google-analyticator/google-analyticator.php CHANGED
@@ -1,7 +1,7 @@
1
<?php
2
/*
3
* Plugin Name: Google Analyticator
4
- * Version: 1.51
5
* Plugin URI: http://cavemonkey50.com/code/google-analyticator/
6
* Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin visit <a href="options-general.php?page=google-analyticator.php">the options page</a> and enter your Google Analytics' UID and enable logging.
7
* Author: Ronald Heft, Jr.
1
<?php
2
/*
3
* Plugin Name: Google Analyticator
4
+ * Version: 1.52
5
* Plugin URI: http://cavemonkey50.com/code/google-analyticator/
6
* Description: Adds the necessary JavaScript code to enable <a href="http://www.google.com/analytics/">Google's Analytics</a>. After enabling this plugin visit <a href="options-general.php?page=google-analyticator.php">the options page</a> and enter your Google Analytics' UID and enable logging.
7
* Author: Ronald Heft, Jr.
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: cavemonkey50
3
Donate link: http://cavemonkey50.com/code/
4
Tags: stats, google, analytics, tracking
5
Requires at least: 1.5
6
- Tested up to: 2.1
7
- Stable tag: 1.51
8
9
Adds the necessary JavaScript code to enable Google Analytics.
10
3
Donate link: http://cavemonkey50.com/code/
4
Tags: stats, google, analytics, tracking
5
Requires at least: 1.5
6
+ Tested up to: 2.2
7
+ Stable tag: 1.52
8
9
Adds the necessary JavaScript code to enable Google Analytics.
10