Changeset 1293479
- Timestamp:
- 11/24/2015 02:15:01 PM (10 years ago)
- Location:
- google-analytics-plugin
- Files:
-
- 4 edited
- 1 copied
-
tags/1.1 (copied) (copied from google-analytics-plugin/trunk)
-
tags/1.1/google-analytics-plugin.php (modified) (4 diffs)
-
tags/1.1/readme.txt (modified) (3 diffs)
-
trunk/google-analytics-plugin.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
google-analytics-plugin/tags/1.1/google-analytics-plugin.php
r315658 r1293479 1 1 <?php 2 2 3 /* 3 4 Plugin Name: Google Analytics Plugin 4 Version: 1. 05 Version: 1.1 5 6 Plugin URI: http://improveseo.info/ 6 7 Description: Optimized Google Analytics Plugin for Wordpress … … 9 10 */ 10 11 12 13 11 14 function google_analytics_footer_code() { 15 16 $google_analytics_options = get_option('google_analytics_options'); 17 18 echo " 19 <script> 20 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 21 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 22 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 23 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 24 25 ga('create', '$google_analytics_options[ua_id]', 'auto'); 26 ga('send', 'pageview'); 27 </script>"; 28 29 } 30 31 32 function google_analytics_admin_section() { 12 33 13 34 $google_analytics_options = get_option('google_analytics_options'); 14 35 15 echo '<script type="text/javascript">16 var _gaq = _gaq || [];17 _gaq.push([\'_setAccount\', \'' . $google_analytics_options['ua_id'] . '\']);18 _gaq.push([\'_trackPageview\']);19 20 (function() {21 var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;22 ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';23 var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);24 })();25 </script>';26 }27 28 function google_analytics_admin_section() {29 30 $google_analytics_options = get_option('google_analytics_options');31 32 36 if (isset($_POST['update_options_submit'])) { 33 37 $google_analytics_options['ua_id'] = $_POST['ua_id']; … … 36 40 37 41 ?> 42 43 38 44 39 45 <div class=wrap> … … 52 58 </table> 53 59 </fieldset> 60 54 61 55 62 <div class="submit"> 56 63 <input type="submit" name="update_options_submit" value="<?php _e('Update options', 'google-analytics') ?>" /> 57 64 </div> 65 58 66 </form> 59 67 </div> 60 68 61 <? 69 70 71 <?php 62 72 } 63 73 -
google-analytics-plugin/tags/1.1/readme.txt
r315658 r1293479 4 4 Tags: Google, Google Analytics, Tracking 5 5 Requires at least: 2.3.1 6 Tested up to: 3.0.1 7 Stable tag: 1.0 6 Tested up to: 4.3.1 7 Stable tag: 1.1 8 9 8 10 9 11 Google analytics plugin adds the google tracking code to the blog pages. … … 38 40 = 1.0 = 39 41 * google-analytics-plugin.php(created) - actions added: wp_footer 42 = 1.1 = 43 * updated with the new google analytics async code 44 40 45 41 46 == Upgrade Notice == … … 43 48 = 1.0 = 44 49 This is the first plugin version. No Upgrade Notice yet. 50 = 1.1 = 51 Async javascript code has less impact on page speed. -
google-analytics-plugin/trunk/google-analytics-plugin.php
r315658 r1293479 1 1 <?php 2 2 3 /* 3 4 Plugin Name: Google Analytics Plugin 4 Version: 1. 05 Version: 1.1 5 6 Plugin URI: http://improveseo.info/ 6 7 Description: Optimized Google Analytics Plugin for Wordpress … … 9 10 */ 10 11 12 13 11 14 function google_analytics_footer_code() { 15 16 $google_analytics_options = get_option('google_analytics_options'); 17 18 echo " 19 <script> 20 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 21 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 22 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 23 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 24 25 ga('create', '$google_analytics_options[ua_id]', 'auto'); 26 ga('send', 'pageview'); 27 </script>"; 28 29 } 30 31 32 function google_analytics_admin_section() { 12 33 13 34 $google_analytics_options = get_option('google_analytics_options'); 14 35 15 echo '<script type="text/javascript">16 var _gaq = _gaq || [];17 _gaq.push([\'_setAccount\', \'' . $google_analytics_options['ua_id'] . '\']);18 _gaq.push([\'_trackPageview\']);19 20 (function() {21 var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;22 ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';23 var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);24 })();25 </script>';26 }27 28 function google_analytics_admin_section() {29 30 $google_analytics_options = get_option('google_analytics_options');31 32 36 if (isset($_POST['update_options_submit'])) { 33 37 $google_analytics_options['ua_id'] = $_POST['ua_id']; … … 36 40 37 41 ?> 42 43 38 44 39 45 <div class=wrap> … … 52 58 </table> 53 59 </fieldset> 60 54 61 55 62 <div class="submit"> 56 63 <input type="submit" name="update_options_submit" value="<?php _e('Update options', 'google-analytics') ?>" /> 57 64 </div> 65 58 66 </form> 59 67 </div> 60 68 61 <? 69 70 71 <?php 62 72 } 63 73 -
google-analytics-plugin/trunk/readme.txt
r315658 r1293479 4 4 Tags: Google, Google Analytics, Tracking 5 5 Requires at least: 2.3.1 6 Tested up to: 3.0.1 7 Stable tag: 1.0 6 Tested up to: 4.3.1 7 Stable tag: 1.1 8 9 8 10 9 11 Google analytics plugin adds the google tracking code to the blog pages. … … 38 40 = 1.0 = 39 41 * google-analytics-plugin.php(created) - actions added: wp_footer 42 = 1.1 = 43 * updated with the new google analytics async code 44 40 45 41 46 == Upgrade Notice == … … 43 48 = 1.0 = 44 49 This is the first plugin version. No Upgrade Notice yet. 50 = 1.1 = 51 Async javascript code has less impact on page speed.
Note: See TracChangeset
for help on using the changeset viewer.