Changeset 1298418
- Timestamp:
- 12/01/2015 02:32:36 PM (10 years ago)
- Location:
- wow-analytics
- Files:
-
- 13 added
- 5 edited
-
tags/2.1.0 (added)
-
tags/2.1.0/admin.php (added)
-
tags/2.1.0/includes (added)
-
tags/2.1.0/includes/admin.inc.php (added)
-
tags/2.1.0/includes/ajax_functions.php (added)
-
tags/2.1.0/includes/restclient.php (added)
-
tags/2.1.0/includes/trackingcode.php (added)
-
tags/2.1.0/install.php (added)
-
tags/2.1.0/js (added)
-
tags/2.1.0/js/wow_analytics_admin.js (added)
-
tags/2.1.0/readme.txt (added)
-
tags/2.1.0/uninstall.php (added)
-
tags/2.1.0/wow-analytics.php (added)
-
trunk/includes/admin.inc.php (modified) (3 diffs)
-
trunk/includes/trackingcode.php (modified) (3 diffs)
-
trunk/install.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wow-analytics.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wow-analytics/trunk/includes/admin.inc.php
r1288803 r1298418 39 39 'Track downloads?', 40 40 'wow_wowanalytics_setting_trackdownloads', 41 'wow_wowanalytics', 42 'wow_wowanalytics_main' 43 ); 44 45 add_settings_field( 46 'wow_wowanalytics_tracklogedinUser_bool', 47 'Track Logged In Users?', 48 'wow_wowanalytics_setting_tracklogedinUser', 41 49 'wow_wowanalytics', 42 50 'wow_wowanalytics_main' … … 91 99 } 92 100 101 function wow_wowanalytics_setting_tracklogedinUser() { 102 // get option 'text_clientid' value from the database 103 $options = get_option('wow_wowanalytics_options'); 104 $tracklogedinUser_bool = $options['tracklogedinUser_bool']; 105 106 printf('<input id="tracklogedinUser_bool" type="checkbox" name="wow_wowanalytics_options[tracklogedinUser_bool]" %s />', 107 isset($tracklogedinUser_bool) ? checked( 1, $tracklogedinUser_bool, false ) : '' 108 ); 109 } 110 93 111 function wow_wowanalytics_validate_options($input){ 94 112 $valid = array(); … … 96 114 $valid['trackuser_bool'] = array_key_exists('trackuser_bool', $input); 97 115 $valid['track_downloads_bool'] = array_key_exists('track_downloads_bool', $input); 116 $valid['tracklogedinUser_bool'] = array_key_exists('tracklogedinUser_bool', $input); 98 117 $valid['clientid_text'] = $input['clientid_text']; 99 118 -
wow-analytics/trunk/includes/trackingcode.php
r1077478 r1298418 29 29 } 30 30 function wow_wowanalytics_output_trackingcode_noclient(){ 31 31 32 $wowVersion = constant( 'WOWANALYTICS_VERSION' ); 32 33 ?> … … 41 42 $clientid_text = trim($options['clientid_text']); 42 43 $trackuser_bool = $options['trackuser_bool']; 44 $tracklogedinUser_bool = $options['tracklogedinUser_bool']; 43 45 $trackdownloads_bool = $options['track_downloads_bool']; 44 46 $wowVersion = constant( 'WOWANALYTICS_VERSION' ); 47 45 48 ?> 46 49 <!-- WOW Async for Wordpress Tracking Code Start --> 47 50 <!-- WOW Plugin Version <?php echo $wowVersion; ?> --> 51 <!-- tracked loged in user <?php echo $tracklogedinUser_bool; ?> --> 48 52 <script data-cfasync='false' type='text/javascript'> 49 53 var _wow = _wow || []; … … 58 62 if($trackdownloads_bool){?> 59 63 _wow.push(['enableDownloadTracking']); 64 <?php } 65 66 if($tracklogedinUser_bool){ 67 global $current_user; 68 get_currentuserinfo(); 69 ?> 70 var _wowEmail = '<?php echo $current_user->user_email; ?>' 71 if(_wowEmail === ''){ 72 _wow.push(['trackPageView']); 73 }else{ 74 var _wowUrl = document.location.href; 75 var targetPattern = new RegExp('#.*'); 76 _wowUrl = _wowUrl.replace(targetPattern, ''); 77 78 79 var _wowTitle = document.title; 80 81 if(_wowUrl.indexOf('?') > 0) 82 { 83 _wowUrl += '&_em=' + _wowEmail; 84 } else { 85 _wowUrl += '?_em=' + _wowEmail; 86 } 87 88 _wow.push(['trackPageView', _wowTitle, _wowUrl]); 89 } 90 <?php } 91 else { ?> 92 _wow.push(['trackPageView']); 93 60 94 <?php } ?> 61 _wow.push(['trackPageView']);62 95 var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; 63 96 g.type = 'text/javascript'; g.defer = true; g.async = true; -
wow-analytics/trunk/install.php
r1288803 r1298418 37 37 'track_downloads_bool' => true, 38 38 'track_download_extensions' => '', 39 'version' => $wowVersion 39 'version' => $wowVersion, 40 'tracklogedinUser_bool' => false 40 41 ); 41 42 … … 60 61 switch($prev_version) 61 62 { 63 case '2.0.6': 64 case '2.0.5': 65 case '2.0.4': 66 case '2.0.3': 67 case '2.0.2': 68 case '2.0.1': 69 case '2.0.0': 70 $wowOptions['tracklogedinUser'] = false; 71 $wowOptions['version'] = $wowVersion; 72 update_option( 'wow_wowanalytics_options', $wowOptions ) ; 73 74 break; 62 75 case '1.1.0': 63 76 $wowOptions2 = array( … … 66 79 'track_downloads_bool' => $wowOptions['track_downloads_bool'], 67 80 'track_download_extensions' => $wowOptions['track_download_extensions'], 68 'version' => $wowVersion 81 'version' => $wowVersion, 82 'tracklogedinUser_bool' => false 69 83 ); 70 84 update_option( 'wow_wowanalytics_options', $wowOptions2 ); -
wow-analytics/trunk/readme.txt
r1288803 r1298418 4 4 Requires at least: 4.0 5 5 Tested up to: 4.3.1 6 Stable tag: 2. 0.66 Stable tag: 2.1.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 48 48 == Changelog == 49 49 50 = 2.1.0 = 51 * Added ability to track logged in users 52 50 53 = 2.0.6 = 51 54 * Just warn if we can't detect the wp_head method. -
wow-analytics/trunk/wow-analytics.php
r1288803 r1298418 4 4 Plugin URI: http://wordpress.org/extend/plugins/wow-analytics/ 5 5 Description: Inserts the WOW Analytics tracker into the footer of Wordpress pages 6 Version: 2. 0.66 Version: 2.1.0 7 7 Author: WOW Analytics 8 8 Author URI: http://www.wowanalytics.co.uk … … 21 21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 22 */ 23 define('WOWANALYTICS_VERSION', '2. 0.6');23 define('WOWANALYTICS_VERSION', '2.1.0'); 24 24 25 25 require_once(dirname(__FILE__).'/includes/trackingcode.php');
Note: See TracChangeset
for help on using the changeset viewer.