Simple Google Analytics - Version 2.0.2

Version Description

Download this release

Release Info

Developer JeromeMeyer62
Plugin Icon 128x128 Simple Google Analytics
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

class/Output.class.php CHANGED
@@ -111,17 +111,21 @@
111
  // Ecriture des options
112
  $ret = "\n" ;
113
  $ret .= '<!-- Simple Google Analytics Begin -->' . "\n" ;
114
- $ret .= '<script>' ;
115
  $ret .= 'var _gaq = [' ;
116
  foreach ($options as $key => $value) {
117
- $ret .= is_null($value) ? '[' . $key . ']' : '[' . $key . ',' . $value . ']' ;
118
  $ret .= ',' ;
119
  }
120
  $ret = rtrim($ret, ',') ;
121
  $ret .= '];' ;
122
 
123
- // Code Google optimisé
124
- $ret .= '(function(d, t) {var g = d.createElement(t),s = d.getElementsByTagName(t)[0];g.src = \'//www.google-analytics.com/ga.js\';s.parentNode.insertBefore(g, s);}(document, \'script\'));' ;
 
 
 
 
125
  $ret .= '</script>' ;
126
  $ret .= "\n" . '<!-- Simple Google Analytics End -->' ;
127
  $ret .= "\n" ;
111
  // Ecriture des options
112
  $ret = "\n" ;
113
  $ret .= '<!-- Simple Google Analytics Begin -->' . "\n" ;
114
+ $ret .= '<script type="text/javascript">' . "\n" ;
115
  $ret .= 'var _gaq = [' ;
116
  foreach ($options as $key => $value) {
117
+ $ret .= is_null($value) ? '[\'' . $key . '\']' : '[\'' . $key . '\',\'' . $value . '\']' ;
118
  $ret .= ',' ;
119
  }
120
  $ret = rtrim($ret, ',') ;
121
  $ret .= '];' ;
122
 
123
+ // Code Google
124
+ $ret .= '(function() {' . "\n" ;
125
+ $ret .= 'var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;' . "\n" ;
126
+ $ret .= 'ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';' . "\n" ;
127
+ $ret .= 'var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);' . "\n" ;
128
+ $ret .= '})();' . "\n" ;
129
  $ret .= '</script>' ;
130
  $ret .= "\n" . '<!-- Simple Google Analytics End -->' ;
131
  $ret .= "\n" ;
readme.txt CHANGED
@@ -5,8 +5,8 @@ Tags: google analytics, wordpress statistics, tracking
5
  Plugin link: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
6
  Requires at least: 2.6
7
  Tested up to: 3.2.1
8
- Version: 2.0.1
9
- Stable tag: 2.0.1
10
 
11
  == Description ==
12
  Simple Google Analytics allows you to easilly add your Google Analytics code on all your pages.
@@ -49,6 +49,8 @@ It should work from 2.6 upwards.. Has been tested on all current versions and is
49
  1. Screenshot Simple Google Analytics Admin Page
50
 
51
  == Changelog ==
 
 
52
  = version 2.0 =
53
  * Code has been fully rewritten.
54
  * Google Analytics code has been rewritten to load faster.
5
  Plugin link: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
6
  Requires at least: 2.6
7
  Tested up to: 3.2.1
8
+ Version: 2.0.2
9
+ Stable tag: 2.0.2
10
 
11
  == Description ==
12
  Simple Google Analytics allows you to easilly add your Google Analytics code on all your pages.
49
  1. Screenshot Simple Google Analytics Admin Page
50
 
51
  == Changelog ==
52
+ = version 2.0.2 =
53
+ * Google Code has returned to the original. The optimized code have issues with some users having no stats. All should be fine now.
54
  = version 2.0 =
55
  * Code has been fully rewritten.
56
  * Google Analytics code has been rewritten to load faster.
simple_google_analytics.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Simple Google Analytics
4
  Plugin URI: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
5
  Description: A simple Plugin to add Analytics code on your pages. You simply enter your ID, you choose if you are on a sub-domain and add your domain name.
6
- Version: 2.0.1
7
  Author: Jerome Meyer
8
  Author URI: http://www.arobase62.fr
9
  */
3
  Plugin Name: Simple Google Analytics
4
  Plugin URI: http://www.arobase62.fr/2011/03/23/simple-google-analytics/
5
  Description: A simple Plugin to add Analytics code on your pages. You simply enter your ID, you choose if you are on a sub-domain and add your domain name.
6
+ Version: 2.0.2
7
  Author: Jerome Meyer
8
  Author URI: http://www.arobase62.fr
9
  */