setting_enabled['toggle-google-analytics']) ? $siteseo->setting_enabled['toggle-google-analytics'] : ''; $nonce = wp_create_nonce('siteseo_toggle_nonce'); $current_tab = isset($_GET['tab']) ? sanitize_key($_GET['tab']) : 'tab_google_analytics'; // Default tab $analytics_sub_tags = [ 'tab_google_analytics' => esc_html__('Google Analytics', 'siteseo'), 'tab_matomo' => esc_html__('Matomo', 'siteseo'), 'tab_clarity' => esc_html__('Clarity', 'siteseo'), 'tab_advanced' => esc_html__('Advanced', 'siteseo'), 'tab_cookie' => esc_html('Cookie','siteseo'), 'tab_custom_tracking' => esc_html('Custom Tracking'), ]; echo'
'; wp_nonce_field('sitseo_title_settingss'); Dashbord::render_toggle('Analytics - SiteSEO', 'analytics_toggle', $analytics_toggle, $nonce); echo'
'; self::google_anlytics(); echo'
'; self::matomo(); echo'
'; self::clarity(); echo'
'; self::advanced(); echo'
'; self::custom_tracking(); echo'
'; siteseo_submit_button(__('Save changes', 'siteseo')); echo''; } static function custom_tracking(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } echo'

Custom Tracking

'.esc_html('Add your own scripts like GTM or Facebook Pixel by copy and paste the provided code to the HEAD/BODY or FOOTER.','siteseo').'

[HEAD] Add an additional tracking code (like Facebook Pixel, Hotjar...)

This code will be added in the head section of your page.

[BODY] Add an additional tracking code (like Google Tag Manager...)
BODY (FOOTER)] Add an additional tracking code (like Google Tag Manager...)
'; } static function cookies(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } echo'

Cookies

Manage user consent for GDPR and customize your cookie bar easily.

Works with Google Analytics and Matomo.

Where to load the cookie bar?
Analytics tracking opt-in
Allow user to change its choice
Consent message for user tracking
Accept button for user tracking
Close button
Edit cookies button
User consent cookie expiration date
Cookie bar position
Text alignment
'; } static function matomo(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } $matomo_subtabs = [ 'tracking' => 'Tracking', ]; echo'
'; $is_first = true; foreach($matomo_subtabs as $post_key => $post_val){ $active_class = $is_first ? 'active' : ''; echo ''.$post_val.''; $is_first = false; } echo'

Matomo

Use Matomo to track your users with privacy in mind. We support both On Premise and Cloud installations.

Tracking

'; } static function advanced(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } $adavnced_subtabs =[ 'custom-dimensions' => 'Custom Dimensions', 'Misc' => 'Misc', ]; echo'
'; $is_first = true; foreach($adavnced_subtabs as $post_key => $post_val){ $active_class = $is_first ? 'active' : ''; echo ''.$post_val.''; $is_first = false; } echo'
'; } static function clarity(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } echo'

Microsoft Clarity

Use Microsoft Clarity to capture session recordings, get instant heatmaps and powerful Insights for Free. Know how people interact with your site to improve user experience and conversions.

'. printf(wp_kses_post(__('Create your first Microsoft Clarity project here.', 'siteseo')), esc_url('https://clarity.microsoft.com/')) .'

Enable Microsoft Clarity
Enter your Clarity project ID
'; } static function google_anlytics(){ global $siteseo; if(!empty($_POST['submit'])){ self::save_settings(); } echo'

Google Anlytics

Link your Google Analytics to your website. The tracking code will be automatically added to your site.

'; } static function save_settings(){ } }