StatCounter – Free Real Time Visitor Stats - Version 2.0.3

Version Description

Async Javascript support

Download this release

Release Info

Developer StatCounter
Plugin Icon StatCounter – Free Real Time Visitor Stats
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2 to 2.0.3

Files changed (2) hide show
  1. StatCounter-Wordpress-Plugin.php +24 -2
  2. readme.txt +4 -0
StatCounter-Wordpress-Plugin.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Plugin Name: Official StatCounter Plugin
4
- * Version: 2.0.2
5
  * Plugin URI: http://statcounter.com/
6
  * Description: Adds the StatCounter tracking code to your blog. <br>To get setup: 1) Activate this plugin 2) Enter your StatCounter Project ID and Security Code in the <a href="options-general.php?page=StatCounter-Wordpress-Plugin.php"><strong>options page</strong></a>.
7
  * Author: Aodhan Cullen
@@ -240,8 +240,29 @@ $protocol = defined('HTTPS') ? "https:" : "http:";
240
  var scJsHost = (("https:" == document.location.protocol) ?
241
  "https://secure." : "http://www.");
242
  //-->
243
- document.write("<sc"+"ript src='" +scJsHost +"statcounter.com/counter/counter.js'></"+"script>");
 
 
 
 
 
 
244
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  <noscript><div class="statcounter"><a title="web analytics" href="<?php echo $protocol; ?>//statcounter.com/"><img class="statcounter" src="<?php echo $protocol; ?>//c.statcounter.com/<?php echo $sc_project; ?>/0/<?php echo $sc_security; ?>/<?php echo $sc_invisible; ?>/" alt="web analytics" /></a></div></noscript>
246
  <!-- End of StatCounter Code -->
247
  <?php
@@ -263,3 +284,4 @@ function addToTags($pid){
263
  }
264
  }
265
  ?>
 
1
  <?php
2
  /*
3
  * Plugin Name: Official StatCounter Plugin
4
+ * Version: 2.0.3
5
  * Plugin URI: http://statcounter.com/
6
  * Description: Adds the StatCounter tracking code to your blog. <br>To get setup: 1) Activate this plugin 2) Enter your StatCounter Project ID and Security Code in the <a href="options-general.php?page=StatCounter-Wordpress-Plugin.php"><strong>options page</strong></a>.
7
  * Author: Aodhan Cullen
240
  var scJsHost = (("https:" == document.location.protocol) ?
241
  "https://secure." : "http://www.");
242
  //-->
243
+
244
+ <?php
245
+ if($sc_invisible!=1) {
246
+ echo "\ndocument.write(\"<sc\"+\"ript src='\" +scJsHost +\"statcounter.com/counter/counter.js'></\"+\"script>\");";
247
+ }
248
+ ?>
249
+
250
  </script>
251
+
252
+ <?php
253
+ if($sc_invisible==1) {
254
+
255
+ if($protocol == "http:") {
256
+ echo "\n<script type=\"text/javascript\"
257
+ src=\"http://www.statcounter.com/counter/counter.js\"
258
+ async></script>";
259
+ } else if ($protocol == "https:"){
260
+ echo "\n<script type=\"text/javascript\"
261
+ src=\"https://secure.statcounter.com/counter/counter.js\"
262
+ async></script>";
263
+ }
264
+ }?>
265
+
266
  <noscript><div class="statcounter"><a title="web analytics" href="<?php echo $protocol; ?>//statcounter.com/"><img class="statcounter" src="<?php echo $protocol; ?>//c.statcounter.com/<?php echo $sc_project; ?>/0/<?php echo $sc_security; ?>/<?php echo $sc_invisible; ?>/" alt="web analytics" /></a></div></noscript>
267
  <!-- End of StatCounter Code -->
268
  <?php
284
  }
285
  }
286
  ?>
287
+
readme.txt CHANGED
@@ -69,6 +69,9 @@ To activate the StatCounter service for your WordPress site:
69
  2. Using the magnify tool, you can "zoom in" on individual visitors and get a detailed report on where they are from, their system settings, and most importantly, what link reffered them to your site and their navigation path through your site.
70
 
71
  == Changelog ==
 
 
 
72
  = 2.0.2 =
73
  Compatibility enhancements
74
 
@@ -155,3 +158,4 @@ Bug fix to prevent user entry of whitespace characters for Project ID and Securi
155
 
156
  = 1.6.2 =
157
  Upgrade to allow for fully functioning PayPal upgrade options.
 
69
  2. Using the magnify tool, you can "zoom in" on individual visitors and get a detailed report on where they are from, their system settings, and most importantly, what link reffered them to your site and their navigation path through your site.
70
 
71
  == Changelog ==
72
+ = 2.0.3 =
73
+ Async Javascript support
74
+
75
  = 2.0.2 =
76
  Compatibility enhancements
77
 
158
 
159
  = 1.6.2 =
160
  Upgrade to allow for fully functioning PayPal upgrade options.
161
+