Changeset 2616639
- Timestamp:
- 10/19/2021 03:00:20 PM (4 years ago)
- Location:
- gatorleads
- Files:
-
- 13 added
- 5 edited
-
tags/1.0.4 (added)
-
tags/1.0.4/admin.php (added)
-
tags/1.0.4/gatorleads.php (added)
-
tags/1.0.4/includes (added)
-
tags/1.0.4/includes/admin.inc.php (added)
-
tags/1.0.4/includes/ajax_functions.php (added)
-
tags/1.0.4/includes/restclient.php (added)
-
tags/1.0.4/includes/trackingcode.php (added)
-
tags/1.0.4/install.php (added)
-
tags/1.0.4/js (added)
-
tags/1.0.4/js/gatorleads_admin.js (added)
-
tags/1.0.4/readme.txt (added)
-
tags/1.0.4/uninstall.php (added)
-
trunk/gatorleads.php (modified) (1 diff)
-
trunk/includes/admin.inc.php (modified) (3 diffs)
-
trunk/includes/trackingcode.php (modified) (5 diffs)
-
trunk/install.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gatorleads/trunk/gatorleads.php
r2302675 r2616639 21 21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 22 */ 23 define('GATORLEADS_VERSION', '1.0. 3');23 define('GATORLEADS_VERSION', '1.0.4'); 24 24 25 25 require_once(dirname(__FILE__).'/includes/trackingcode.php'); -
gatorleads/trunk/includes/admin.inc.php
r2302675 r2616639 51 51 ); 52 52 53 add_settings_field( 54 'gatorleads_cookiebotconsent_bool', 55 'Abide by CookieBot Consent', 56 'gatorleads_setting_cookiebot', 57 'gatorleads', 58 'gatorleads_main' 59 ); 60 61 53 62 register_setting( 54 63 'gatorleads_options', … … 109 118 } 110 119 120 function gatorleads_setting_cookiebot() { 121 // get option 'text_clientid' value from the database 122 $options = get_option('gatorleads_options'); 123 124 $cookiebot_consent_bool = false; 125 126 if(!empty($options['cookiebot_consent_bool'])) { 127 $cookiebot_consent_bool = $options['cookiebot_consent_bool']; 128 } 129 130 printf('<input id="cookiebot_consent_bool" type="checkbox" name="gatorleads_options[cookiebot_consent_bool]" %s />', 131 isset($cookiebot_consent_bool) ? checked( 1, $cookiebot_consent_bool, false ) : '' 132 ); 133 } 134 135 111 136 function gatorleads_validate_options($input){ 112 137 $valid = array(); … … 115 140 $valid['track_downloads_bool'] = array_key_exists('track_downloads_bool', $input); 116 141 $valid['popup_bool'] = array_key_exists('popup_bool', $input); 142 $valid['cookiebot_consent_bool'] = array_key_exists('cookiebot_consent_bool', $input); 117 143 $valid['clientid_text'] = $input['clientid_text']; 118 144 -
gatorleads/trunk/includes/trackingcode.php
r2302675 r2616639 44 44 $trackdownloads_bool = $options['track_downloads_bool']; 45 45 $popup_bool = $options['popup_bool']; 46 47 $cookiebot_consent = false; 48 49 if(!empty($options['cookiebot_consent_bool'])) { 50 $cookiebot_consent = $options['cookiebot_consent_bool']; 51 } 52 46 53 $gatorleadsVersion = constant( 'GATORLEADS_VERSION' ); 47 54 … … 49 56 <!-- GatorLeads Async for Wordpress Tracking Code Start --> 50 57 <!-- GatorLeads Plugin Version <?php echo $gatorleadsVersion; ?> --> 51 <script data-cfasync='false' type='text/javascript'> 58 <?php 59 if($cookiebot_consent){?> 60 <script data-cfasync='false' type='text/javascript' data-cookieconsent='ignore'> 61 <?php } else { 62 echo "<script data-cfasync='false' type='text/javascript'>"; 63 } 64 ?> 65 52 66 var _wow = _wow || []; 53 67 (function () { … … 55 69 _wow.push(['setClientId', '<?php echo $clientid_text; ?>']); 56 70 <?php 71 57 72 if(!$trackuser_bool){?> 58 73 _wow.push(['disableUserTracking']); … … 68 83 69 84 ?> 85 <?php 86 if(!$cookiebot_consent){?> 70 87 _wow.push(['trackPageView']); 88 <?php } 89 ?> 90 91 <?php 92 if($cookiebot_consent && !$trackuser_bool){?> 93 _wow.push(['trackPageView']); 94 <?php } 95 ?> 71 96 72 97 var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; … … 74 99 g.src = '//t.gatorleads.co.uk/Scripts/tracker.js'; 75 100 s.parentNode.insertBefore(g, s); 76 }catch(err){}})(); 101 102 }catch(err){}})(); 103 104 <?php 105 if($cookiebot_consent && $trackuser_bool){?> 106 window.addEventListener('CookiebotOnLoad', function (e) { 107 if(typeof Cookiebot !== 'undefined') { 108 if (Cookiebot.consent.marketing) 109 { 110 _wow.push(['disableUserTracking', false]); 111 } 112 } 113 _wow.push(['trackPageView']); 114 }, false); 115 <?php } 116 ?> 117 77 118 </script> 78 119 <!-- WOW Async Tracking Code End --> -
gatorleads/trunk/install.php
r2302675 r2616639 53 53 'track_download_extensions' => '', 54 54 'version' => $gatorleadsVersion, 55 'popup_bool' => false 55 'popup_bool' => false, 56 'cookiebot_consent_bool' => false 56 57 ); 57 58 -
gatorleads/trunk/readme.txt
r2302675 r2616639 3 3 Tags: leads, tracking 4 4 Requires at least: 4.0 5 Tested up to: 5. 4.16 Stable tag: 1.0. 35 Tested up to: 5.8.1 6 Stable tag: 1.0.4 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 = 1.0.4 = 51 Tested on WordPress 5.8.1. Added CookieBot consent option. 52 50 53 = 1.0.3 = 51 54 Tested on WordPress 5.4.1. Romoved logged in user tracking. That feature is now obsolete.
Note: See TracChangeset
for help on using the changeset viewer.