Changeset 691761
- Timestamp:
- 04/04/2013 06:31:33 PM (13 years ago)
- Location:
- track-everything
- Files:
-
- 5 edited
- 9 copied
-
tags/1.1.1 (copied) (copied from track-everything/trunk)
-
tags/1.1.1/css (copied) (copied from track-everything/trunk/css)
-
tags/1.1.1/css/admin.css (copied) (copied from track-everything/trunk/css/admin.css)
-
tags/1.1.1/images (copied) (copied from track-everything/trunk/images)
-
tags/1.1.1/inc (copied) (copied from track-everything/trunk/inc)
-
tags/1.1.1/inc/screens/settings.php (modified) (3 diffs)
-
tags/1.1.1/index.php (copied) (copied from track-everything/trunk/index.php) (3 diffs)
-
tags/1.1.1/js (copied) (copied from track-everything/trunk/js)
-
tags/1.1.1/js/script.js (copied) (copied from track-everything/trunk/js/script.js) (2 diffs)
-
tags/1.1.1/readme.txt (copied) (copied from track-everything/trunk/readme.txt) (3 diffs)
-
trunk/inc/screens/settings.php (modified) (3 diffs)
-
trunk/index.php (modified) (3 diffs)
-
trunk/js/script.js (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
track-everything/tags/1.1.1/inc/screens/settings.php
r639533 r691761 22 22 update_option("ethoseo_te_tracksearchforms", $_POST['tracksearchforms']); 23 23 update_option("ethoseo_te_trackemail", $_POST['trackemail']); 24 update_option("ethoseo_te_trackgooglerank", $_POST['trackgooglerank']); 24 25 26 update_option("ethoseo_te_universal", $_POST['universal']); 25 27 update_option("ethoseo_te_infooter", $_POST['infooter']); 26 28 update_option("ethoseo_te_debug", $_POST['debug']); … … 62 64 </td> 63 65 </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> 64 73 </table> 65 74 <h3>Advanced</h3> … … 70 79 <input name="infooter" type="checkbox" id="infooter" aria-labelledby="infooterlabel" value="true" <?php echo get_option("ethoseo_te_infooter") ? 'checked="checked"' : ""; ?>/> 71 80 <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> 72 88 </td> 73 89 </tr> -
track-everything/tags/1.1.1/index.php
r639533 r691761 5 5 Description: A plugin capable of adding Google Analytics Event Tracking to <em>everything</em> on a website. 6 6 Author: Ethoseo Internet Marketing 7 Version: 1.1. 07 Version: 1.1.1 8 8 Author URI: http://www.ethoseo.com/ 9 9 License: MIT License … … 67 67 "search" => (bool)get_option("ethoseo_te_tracksearchforms"), 68 68 "email" => (bool)get_option("ethoseo_te_trackemail"), 69 "googlerank" => (bool)get_option("ethoseo_te_trackgooglerank"), 70 "universal" => (bool)get_option("ethoseo_te_universal"), 69 71 "debug" => (bool)get_option("ethoseo_te_debug"), 70 72 ) … … 89 91 update_option("ethoseo_te_tracksearchforms", false); 90 92 update_option("ethoseo_te_trackemail", true); 93 update_option("ethoseo_te_trackgooglerank", false); 94 update_option("ethoseo_te_universal", false); 91 95 update_option("ethoseo_te_infooter", false); 92 96 update_option("ethoseo_te_debug", false); -
track-everything/tags/1.1.1/js/script.js
r639533 r691761 13 13 function ethoseotePushEvent ( eventInfo ) { 14 14 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 } 16 34 } 17 35 jQuery(function ($){ … … 81 99 }); 82 100 }; 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 } 83 120 }); -
track-everything/tags/1.1.1/readme.txt
r639533 r691761 3 3 Tags: analytics, google analytics, tracking, event tracking, link tracking, email tracking, form submissions 4 4 Requires at least: 3.0.1 5 Tested up to: 3. 4.26 Stable tag: 1.1. 05 Tested up to: 3.5.1 6 Stable tag: 1.1.1 7 7 License: MIT 8 8 License URI: http://opensource.org/licenses/MIT … … 47 47 == Changelog == 48 48 49 = 1.1.1 = 50 * Introduced the ability to track Google Rank 51 49 52 = 1.1.0 = 50 53 * Focus on UX improvements … … 64 67 == Upgrade Notice == 65 68 69 = 1.1.1 = 70 Track Everything can now track Google Rank! 71 66 72 = 1.1.0 = 67 73 Version 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 22 22 update_option("ethoseo_te_tracksearchforms", $_POST['tracksearchforms']); 23 23 update_option("ethoseo_te_trackemail", $_POST['trackemail']); 24 update_option("ethoseo_te_trackgooglerank", $_POST['trackgooglerank']); 24 25 26 update_option("ethoseo_te_universal", $_POST['universal']); 25 27 update_option("ethoseo_te_infooter", $_POST['infooter']); 26 28 update_option("ethoseo_te_debug", $_POST['debug']); … … 62 64 </td> 63 65 </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> 64 73 </table> 65 74 <h3>Advanced</h3> … … 70 79 <input name="infooter" type="checkbox" id="infooter" aria-labelledby="infooterlabel" value="true" <?php echo get_option("ethoseo_te_infooter") ? 'checked="checked"' : ""; ?>/> 71 80 <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> 72 88 </td> 73 89 </tr> -
track-everything/trunk/index.php
r639533 r691761 5 5 Description: A plugin capable of adding Google Analytics Event Tracking to <em>everything</em> on a website. 6 6 Author: Ethoseo Internet Marketing 7 Version: 1.1. 07 Version: 1.1.1 8 8 Author URI: http://www.ethoseo.com/ 9 9 License: MIT License … … 67 67 "search" => (bool)get_option("ethoseo_te_tracksearchforms"), 68 68 "email" => (bool)get_option("ethoseo_te_trackemail"), 69 "googlerank" => (bool)get_option("ethoseo_te_trackgooglerank"), 70 "universal" => (bool)get_option("ethoseo_te_universal"), 69 71 "debug" => (bool)get_option("ethoseo_te_debug"), 70 72 ) … … 89 91 update_option("ethoseo_te_tracksearchforms", false); 90 92 update_option("ethoseo_te_trackemail", true); 93 update_option("ethoseo_te_trackgooglerank", false); 94 update_option("ethoseo_te_universal", false); 91 95 update_option("ethoseo_te_infooter", false); 92 96 update_option("ethoseo_te_debug", false); -
track-everything/trunk/js/script.js
r639533 r691761 13 13 function ethoseotePushEvent ( eventInfo ) { 14 14 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 } 16 34 } 17 35 jQuery(function ($){ … … 81 99 }); 82 100 }; 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 } 83 120 }); -
track-everything/trunk/readme.txt
r639533 r691761 3 3 Tags: analytics, google analytics, tracking, event tracking, link tracking, email tracking, form submissions 4 4 Requires at least: 3.0.1 5 Tested up to: 3. 4.26 Stable tag: 1.1. 05 Tested up to: 3.5.1 6 Stable tag: 1.1.1 7 7 License: MIT 8 8 License URI: http://opensource.org/licenses/MIT … … 47 47 == Changelog == 48 48 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 49 54 = 1.1.0 = 50 55 * Focus on UX improvements … … 64 69 == Upgrade Notice == 65 70 71 = 1.1.1 = 72 Track Everything can now track Google Rank! It also allows for using Analytics.js if you're a really early adopter. 73 66 74 = 1.1.0 = 67 75 Version 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.