Plugin Directory

Changeset 1293479


Ignore:
Timestamp:
11/24/2015 02:15:01 PM (10 years ago)
Author:
adiian
Message:

version 1.1

Location:
google-analytics-plugin
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • google-analytics-plugin/tags/1.1/google-analytics-plugin.php

    r315658 r1293479  
    11<?php
     2
    23/*
    34Plugin Name: Google Analytics Plugin
    4 Version: 1.0
     5Version: 1.1
    56Plugin URI: http://improveseo.info/
    67Description: Optimized Google Analytics Plugin for Wordpress
     
    910*/
    1011
     12
     13
    1114function 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
     32function google_analytics_admin_section() {
    1233
    1334    $google_analytics_options = get_option('google_analytics_options');
    1435
    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    
    3236    if (isset($_POST['update_options_submit'])) {
    3337        $google_analytics_options['ua_id'] = $_POST['ua_id'];
     
    3640
    3741?>
     42
     43
    3844
    3945<div class=wrap>
     
    5258      </table>
    5359    </fieldset>
     60
    5461   
    5562    <div class="submit">
    5663      <input type="submit" name="update_options_submit" value="<?php _e('Update options', 'google-analytics') ?>" />
    5764    </div>
     65
    5866  </form>
    5967</div>
    6068
    61 <?
     69
     70
     71<?php
    6272}
    6373
  • google-analytics-plugin/tags/1.1/readme.txt

    r315658 r1293479  
    44Tags: Google, Google Analytics, Tracking
    55Requires at least: 2.3.1
    6 Tested up to: 3.0.1
    7 Stable tag: 1.0
     6Tested up to: 4.3.1
     7Stable tag: 1.1
     8
     9
    810
    911Google analytics plugin adds the google tracking code to the blog pages.
     
    3840= 1.0 =
    3941    * google-analytics-plugin.php(created) - actions added: wp_footer
     42= 1.1 =
     43    * updated with the new google analytics async code
     44   
    4045
    4146== Upgrade Notice ==
     
    4348= 1.0 =
    4449This is the first plugin version. No Upgrade Notice yet.
     50= 1.1 =
     51Async javascript code has less impact on page speed.
  • google-analytics-plugin/trunk/google-analytics-plugin.php

    r315658 r1293479  
    11<?php
     2
    23/*
    34Plugin Name: Google Analytics Plugin
    4 Version: 1.0
     5Version: 1.1
    56Plugin URI: http://improveseo.info/
    67Description: Optimized Google Analytics Plugin for Wordpress
     
    910*/
    1011
     12
     13
    1114function 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
     32function google_analytics_admin_section() {
    1233
    1334    $google_analytics_options = get_option('google_analytics_options');
    1435
    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    
    3236    if (isset($_POST['update_options_submit'])) {
    3337        $google_analytics_options['ua_id'] = $_POST['ua_id'];
     
    3640
    3741?>
     42
     43
    3844
    3945<div class=wrap>
     
    5258      </table>
    5359    </fieldset>
     60
    5461   
    5562    <div class="submit">
    5663      <input type="submit" name="update_options_submit" value="<?php _e('Update options', 'google-analytics') ?>" />
    5764    </div>
     65
    5866  </form>
    5967</div>
    6068
    61 <?
     69
     70
     71<?php
    6272}
    6373
  • google-analytics-plugin/trunk/readme.txt

    r315658 r1293479  
    44Tags: Google, Google Analytics, Tracking
    55Requires at least: 2.3.1
    6 Tested up to: 3.0.1
    7 Stable tag: 1.0
     6Tested up to: 4.3.1
     7Stable tag: 1.1
     8
     9
    810
    911Google analytics plugin adds the google tracking code to the blog pages.
     
    3840= 1.0 =
    3941    * google-analytics-plugin.php(created) - actions added: wp_footer
     42= 1.1 =
     43    * updated with the new google analytics async code
     44   
    4045
    4146== Upgrade Notice ==
     
    4348= 1.0 =
    4449This is the first plugin version. No Upgrade Notice yet.
     50= 1.1 =
     51Async javascript code has less impact on page speed.
Note: See TracChangeset for help on using the changeset viewer.