Plugin Directory

Changeset 691761


Ignore:
Timestamp:
04/04/2013 06:31:33 PM (13 years ago)
Author:
ethoseo
Message:

Version 1.1.1

Location:
track-everything
Files:
5 edited
9 copied

Legend:

Unmodified
Added
Removed
  • track-everything/tags/1.1.1/inc/screens/settings.php

    r639533 r691761  
    2222            update_option("ethoseo_te_tracksearchforms", $_POST['tracksearchforms']);
    2323            update_option("ethoseo_te_trackemail", $_POST['trackemail']);
     24            update_option("ethoseo_te_trackgooglerank", $_POST['trackgooglerank']);
    2425
     26            update_option("ethoseo_te_universal", $_POST['universal']);
    2527            update_option("ethoseo_te_infooter", $_POST['infooter']);
    2628            update_option("ethoseo_te_debug", $_POST['debug']);
     
    6264                </td>
    6365            </tr>
     66            <tr valign="top">
     67                <th scope="row"><label for="trackgooglerank" id="trackgoogleranklabel">Track Google Rank</label></th>
     68                <td>
     69                    <input name="trackgooglerank" type="checkbox" id="trackgooglerank" aria-labelledby="trackgoogleranklabel" value="true" <?php echo get_option("ethoseo_te_trackgooglerank") ? 'checked="checked"' : ""; ?>/>
     70                    <label for="trackgooglerank" class="description">This will trigger an Event any time a visitor comes from a Google Search, recording the keyword and rank. <em>(These will be counted as non-interactions)</em></label>
     71                </td>
     72            </tr>
    6473        </table>
    6574        <h3>Advanced</h3>
     
    7079                    <input name="infooter" type="checkbox" id="infooter" aria-labelledby="infooterlabel" value="true" <?php echo get_option("ethoseo_te_infooter") ? 'checked="checked"' : ""; ?>/>
    7180                    <label for="infooter" class="description">If things are going wrong with your site try enabling this.</label>
     81                </td>
     82            </tr>
     83            <tr valign="top">
     84                <th scope="row"><label for="universal" id="universallabel">Use GA Universal</label></th>
     85                <td>
     86                    <input name="universal" type="checkbox" id="universal" aria-labelledby="universallabel" value="true" <?php echo get_option("ethoseo_te_universal") ? 'checked="checked"' : ""; ?>/>
     87                    <label for="universal" class="description">Only select this if you're using Google's new <code>Analytics.js</code> on your site.</label>
    7288                </td>
    7389            </tr>
  • track-everything/tags/1.1.1/index.php

    r639533 r691761  
    55Description: A plugin capable of adding Google Analytics Event Tracking to <em>everything</em> on a website.
    66Author: Ethoseo Internet Marketing
    7 Version: 1.1.0
     7Version: 1.1.1
    88Author URI: http://www.ethoseo.com/
    99License: MIT License
     
    6767            "search" => (bool)get_option("ethoseo_te_tracksearchforms"),
    6868            "email" => (bool)get_option("ethoseo_te_trackemail"),
     69            "googlerank" => (bool)get_option("ethoseo_te_trackgooglerank"),
     70            "universal" => (bool)get_option("ethoseo_te_universal"),
    6971            "debug" => (bool)get_option("ethoseo_te_debug"),
    7072        )
     
    8991        update_option("ethoseo_te_tracksearchforms", false);
    9092        update_option("ethoseo_te_trackemail", true);
     93        update_option("ethoseo_te_trackgooglerank", false);
     94        update_option("ethoseo_te_universal", false);
    9195        update_option("ethoseo_te_infooter", false);
    9296        update_option("ethoseo_te_debug", false);
  • track-everything/tags/1.1.1/js/script.js

    r639533 r691761  
    1313function ethoseotePushEvent ( eventInfo ) {
    1414    if(window.trackeverything.settings.debug){ console.log(eventInfo); }
    15     _gaq.push(eventInfo);
     15    if(window.trackeverything.settings.universal){
     16        var gauEventInfo = {
     17            'hitType': 'event',
     18            'eventCategory': eventInfo[1],
     19            'eventAction': eventInfo[2]
     20        };
     21        if(eventInfo[3]){
     22            gauEventInfo['eventLabel'] = eventInfo[3];
     23        }
     24        if(eventInfo[4]){
     25            gauEventInfo['eventValue'] = eventInfo[4];
     26        }
     27        if(eventInfo[5]){
     28            gauEventInfo['nonInteraction'] = Number(eventInfo[4]);
     29        }
     30        ga('send', gauEvent);
     31    }else{
     32        _gaq.push(eventInfo);
     33    }
    1634}
    1735jQuery(function ($){
     
    8199        });
    82100    };
     101    if(window.trackeverything.settings.googlerank){
     102
     103        if (document.referrer.match(/google\.com/gi) && document.referrer.match(/cd/gi)) {
     104            var referrerInfo = document.referrer;
     105            var r = referrerInfo.match(/cd=(.*?)&/);
     106            var rank = parseInt(r[1]);
     107            var kw = referrerInfo.match(/q=(.*?)&/);
     108           
     109            if (kw[1].length > 0) {
     110                var keyword = decodeURI(kw[1]);
     111            } else {
     112                keyword = "(not provided)";
     113            }
     114
     115            var path = document.location.pathname;
     116            _gaq.push(['_trackEvent', 'Google Search', keyword, path, rank, true]);
     117        }
     118
     119    }
    83120});
  • track-everything/tags/1.1.1/readme.txt

    r639533 r691761  
    33Tags: analytics, google analytics, tracking, event tracking, link tracking, email tracking, form submissions
    44Requires at least: 3.0.1
    5 Tested up to: 3.4.2
    6 Stable tag: 1.1.0
     5Tested up to: 3.5.1
     6Stable tag: 1.1.1
    77License: MIT
    88License URI: http://opensource.org/licenses/MIT
     
    4747== Changelog ==
    4848
     49= 1.1.1 =
     50* Introduced the ability to track Google Rank
     51
    4952= 1.1.0 =
    5053* Focus on UX improvements
     
    6467== Upgrade Notice ==
    6568
     69= 1.1.1 =
     70Track Everything can now track Google Rank!
     71
    6672= 1.1.0 =
    6773Version 1.1.0 provides users with a better experience. Better explanations galore, better code, and bug fixes are all included.
  • track-everything/trunk/inc/screens/settings.php

    r639533 r691761  
    2222            update_option("ethoseo_te_tracksearchforms", $_POST['tracksearchforms']);
    2323            update_option("ethoseo_te_trackemail", $_POST['trackemail']);
     24            update_option("ethoseo_te_trackgooglerank", $_POST['trackgooglerank']);
    2425
     26            update_option("ethoseo_te_universal", $_POST['universal']);
    2527            update_option("ethoseo_te_infooter", $_POST['infooter']);
    2628            update_option("ethoseo_te_debug", $_POST['debug']);
     
    6264                </td>
    6365            </tr>
     66            <tr valign="top">
     67                <th scope="row"><label for="trackgooglerank" id="trackgoogleranklabel">Track Google Rank</label></th>
     68                <td>
     69                    <input name="trackgooglerank" type="checkbox" id="trackgooglerank" aria-labelledby="trackgoogleranklabel" value="true" <?php echo get_option("ethoseo_te_trackgooglerank") ? 'checked="checked"' : ""; ?>/>
     70                    <label for="trackgooglerank" class="description">This will trigger an Event any time a visitor comes from a Google Search, recording the keyword and rank. <em>(These will be counted as non-interactions)</em></label>
     71                </td>
     72            </tr>
    6473        </table>
    6574        <h3>Advanced</h3>
     
    7079                    <input name="infooter" type="checkbox" id="infooter" aria-labelledby="infooterlabel" value="true" <?php echo get_option("ethoseo_te_infooter") ? 'checked="checked"' : ""; ?>/>
    7180                    <label for="infooter" class="description">If things are going wrong with your site try enabling this.</label>
     81                </td>
     82            </tr>
     83            <tr valign="top">
     84                <th scope="row"><label for="universal" id="universallabel">Use GA Universal</label></th>
     85                <td>
     86                    <input name="universal" type="checkbox" id="universal" aria-labelledby="universallabel" value="true" <?php echo get_option("ethoseo_te_universal") ? 'checked="checked"' : ""; ?>/>
     87                    <label for="universal" class="description">Only select this if you're using Google's new <code>Analytics.js</code> on your site.</label>
    7288                </td>
    7389            </tr>
  • track-everything/trunk/index.php

    r639533 r691761  
    55Description: A plugin capable of adding Google Analytics Event Tracking to <em>everything</em> on a website.
    66Author: Ethoseo Internet Marketing
    7 Version: 1.1.0
     7Version: 1.1.1
    88Author URI: http://www.ethoseo.com/
    99License: MIT License
     
    6767            "search" => (bool)get_option("ethoseo_te_tracksearchforms"),
    6868            "email" => (bool)get_option("ethoseo_te_trackemail"),
     69            "googlerank" => (bool)get_option("ethoseo_te_trackgooglerank"),
     70            "universal" => (bool)get_option("ethoseo_te_universal"),
    6971            "debug" => (bool)get_option("ethoseo_te_debug"),
    7072        )
     
    8991        update_option("ethoseo_te_tracksearchforms", false);
    9092        update_option("ethoseo_te_trackemail", true);
     93        update_option("ethoseo_te_trackgooglerank", false);
     94        update_option("ethoseo_te_universal", false);
    9195        update_option("ethoseo_te_infooter", false);
    9296        update_option("ethoseo_te_debug", false);
  • track-everything/trunk/js/script.js

    r639533 r691761  
    1313function ethoseotePushEvent ( eventInfo ) {
    1414    if(window.trackeverything.settings.debug){ console.log(eventInfo); }
    15     _gaq.push(eventInfo);
     15    if(window.trackeverything.settings.universal){
     16        var gauEventInfo = {
     17            'hitType': 'event',
     18            'eventCategory': eventInfo[1],
     19            'eventAction': eventInfo[2]
     20        };
     21        if(eventInfo[3]){
     22            gauEventInfo['eventLabel'] = eventInfo[3];
     23        }
     24        if(eventInfo[4]){
     25            gauEventInfo['eventValue'] = eventInfo[4];
     26        }
     27        if(eventInfo[5]){
     28            gauEventInfo['nonInteraction'] = Number(eventInfo[4]);
     29        }
     30        ga('send', gauEvent);
     31    }else{
     32        _gaq.push(eventInfo);
     33    }
    1634}
    1735jQuery(function ($){
     
    8199        });
    82100    };
     101    if(window.trackeverything.settings.googlerank){
     102
     103        if (document.referrer.match(/google\.com/gi) && document.referrer.match(/cd/gi)) {
     104            var referrerInfo = document.referrer;
     105            var r = referrerInfo.match(/cd=(.*?)&/);
     106            var rank = parseInt(r[1]);
     107            var kw = referrerInfo.match(/q=(.*?)&/);
     108           
     109            if (kw[1].length > 0) {
     110                var keyword = decodeURI(kw[1]);
     111            } else {
     112                keyword = "(not provided)";
     113            }
     114
     115            var path = document.location.pathname;
     116            _gaq.push(['_trackEvent', 'Google Search', keyword, path, rank, true]);
     117        }
     118
     119    }
    83120});
  • track-everything/trunk/readme.txt

    r639533 r691761  
    33Tags: analytics, google analytics, tracking, event tracking, link tracking, email tracking, form submissions
    44Requires at least: 3.0.1
    5 Tested up to: 3.4.2
    6 Stable tag: 1.1.0
     5Tested up to: 3.5.1
     6Stable tag: 1.1.1
    77License: MIT
    88License URI: http://opensource.org/licenses/MIT
     
    4747== Changelog ==
    4848
     49= 1.1.1 =
     50* Introduced the ability to track Google Rank
     51* Added the ability to use Analytics.js rather than ga.js
     52* Misc Bug Fixes
     53
    4954= 1.1.0 =
    5055* Focus on UX improvements
     
    6469== Upgrade Notice ==
    6570
     71= 1.1.1 =
     72Track Everything can now track Google Rank! It also allows for using Analytics.js if you're a really early adopter.
     73
    6674= 1.1.0 =
    6775Version 1.1.0 provides users with a better experience. Better explanations galore, better code, and bug fixes are all included.
Note: See TracChangeset for help on using the changeset viewer.