| @@ -146,8 +146,22 @@ | ||
| 146 | 146 | </div> |
| 147 | 147 | </div> |
| 148 | 148 | |
| 149 | 149 | <div class="cookieadmin-setting"> |
| 150 | + <label class="cookieadmin-title" for="cookieadmin_google_advance_consent_mode">'.esc_html__('Load Google tags before consent', 'cookieadmin').' | |
| 151 | + <span class="dashicons dashicons-info cookieadmin-tooltip-box" data-tip="'.esc_html__('Google tags will fire immediately on the page load before consent.', 'cookieadmin').'"></span> | |
| 152 | + </label> | |
| 153 | + <div class="cookieadmin-setting-contents"> | |
| 154 | + <label class="cookieadmin-toggle-wrap"> | |
| 155 | + <input name="cookieadmin_google_advance_consent_mode" type="checkbox" id="cookieadmin_google_advance_consent_mode" '.(!empty($cookieadmin_settings['cookieadmin_google_advance_consent_mode']) && cookieadmin_is_pro() ? 'checked' : '').'> | |
| 156 | + <div class="cookieadmin-toggle-track"> | |
| 157 | + <div class="cookieadmin-toggle-thumb"></div> | |
| 158 | + </div> | |
| 159 | + </label> | |
| 160 | + </div> | |
| 161 | + </div> | |
| 162 | + | |
| 163 | + <div class="cookieadmin-setting"> | |
| 150 | 164 | <label class="cookieadmin-title" for="cookieadmin_clarity_consent">'.esc_html__('Clarity Consent Mode V2', 'cookieadmin').' |
| 151 | 165 | <span class="dashicons dashicons-info cookieadmin-tooltip-box" data-tip="'.esc_html__('Enable Microsoft Clarity consent mode v2.', 'cookieadmin').'"></span> |
| 152 | 166 | </label> |
| 153 | 167 | <div class="cookieadmin-setting-contents"> |
| @@ -324,8 +338,11 @@ | ||
| 324 | 338 | if(!empty($_REQUEST['cookieadmin_content_blocking_services'])){ |
| 325 | 339 | $cookieadmin_settings['content_blocking_services'] = array_map('sanitize_text_field', wp_unslash($_REQUEST['cookieadmin_content_blocking_services'])); |
| 326 | 340 | } |
| 327 | 341 | |
| 342 | + // Google's advance consent mode (Google tags will be loaded on page load is enabled) | |
| 343 | + $cookieadmin_settings['cookieadmin_google_advance_consent_mode'] = (isset( $_REQUEST['cookieadmin_google_advance_consent_mode'] ) ? 1 : 0); | |
| 344 | + | |
| 328 | 345 | if(empty($cookieadmin_error)){ |
| 329 | 346 | update_option('cookieadmin_settings', $cookieadmin_settings); |
| 330 | 347 | } |
| 331 | 348 | |