PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 3.3.0
ShareThis Dashboard for Google Analytics v3.3.0
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / view / page.php
googleanalytics / view Last commit date
templates 2 months ago ga-accounts-selector.php 2 months ago ga-auth-button.php 2 months ago ga-code.php 2 months ago ga-dashboard-widget.php 2 months ago ga-debug-modal.php 2 months ago ga-ga4-settings.php 2 months ago ga-googleanalytics-loader.php 2 months ago ga-notice.php 2 months ago ga-oauth-notice.php 2 months ago ga-wp-notice.php 2 months ago old-page.php 2 months ago page.php 2 months ago statistics.php 2 months ago stats.php 2 months ago trending.php 2 months ago
page.php
76 lines
1 <?php
2 /**
3 * Page view.
4 *
5 * @package GoogleAnalytics
6 */
7
8 if (!defined('ABSPATH')) exit;
9
10 $optimize_code = get_option( 'googleanalytics_optimize_code' );
11 $universal = get_option( 'googleanalytics_enable_universal_analytics', true );
12 $anonymization = get_option( 'googleanalytics_ip_anonymization', true );
13 $debug_mode = get_option( 'googleanalytics_enable_debug_mode', 'off' );
14 $gdpr_config = get_option( 'googleanalytics_gdpr_config' );
15 $sharethis_property = get_option( 'googleanalytics_sharethis_terms' );
16 $plugin_dir = plugin_dir_path( __FILE__ );
17 $plugin_uri = trailingslashit( get_home_url() ) . 'wp-content/plugins/googleanalytics/';
18 $has_code = filter_input(INPUT_GET, 'ga_connected');
19 $has_code = isset($has_code);
20 $is_ua = filter_input( INPUT_GET, 'ua' );
21 $is_ua = true === isset( $is_ua ) ? 't' === $is_ua : false;
22 $has_property = get_option('googleanalytics-ga4-property');
23 $has_property = isset($has_property) ? $has_property : false;
24 $ga4_optimize = get_option('googleanalytics-ga4-optimize');
25 $ga4_optimize = isset($ga4_optimize) ? $ga4_optimize : false;
26 $ga4_exclude_roles = get_option('googleanalytics-ga4-exclude-roles');
27 $ga4_exclude_roles = isset($ga4_exclude_roles) ? $ga4_exclude_roles : false;
28 $ga4_demo = get_option('googleanalytics-ga4-demo');
29 $ga4_demo = true === isset( $ga4_demo ) ? $ga4_demo : false;
30 $ga4_ip = get_option('googleanalytics-ga4-ip-anon');
31 $ga4_ip = isset($ga4_ip) ? $ga4_ip : false;
32 $ga4_gdpr = get_option('googleanalytics-ga4-gdpr');
33 $ga4_gdpr = isset($ga4_gdpr) ? $ga4_gdpr : false;
34 $ga_nonce = wp_create_nonce('ga4-setup');
35 $setup_done = false !== $has_property &&
36 (
37 false !== $ga4_gdpr ||
38 false !== $ga4_demo ||
39 false !== $ga4_exclude_roles ||
40 false !== $ga4_optimize ||
41 false !== $ga4_ip
42 );
43 ?>
44 <?php echo wp_kses_post( $data['debug_modal'] ); ?>
45 <div class="wrap ga-wrap do-flex">
46 <div class="ga4-settings-wrap setting-tab-content st-notice-there engage
47 <?php echo true === $setup_done ? ' normal-settings' : '';
48 echo false !== $has_code && false === $is_ua ? ' engage' : '';
49 ?>">
50 <?php include 'ga-ga4-settings.php'; ?>
51 </div>
52 <?php
53 // If GDPR isn't enabled show ad otherwise show demo ad.
54 if ( true === empty( $gdpr_config ) ) {
55 include $plugin_dir . 'templates/sidebar/gdpr-ad.php';
56 } else {
57 // If Demo is not enabled show ad.
58 if ( true === empty( get_option( 'googleanalytics_demographic' ) ) ) {
59 include $plugin_dir . 'templates/sidebar/demo-ad.php';
60 }
61 }
62 ?>
63 <p class="ga-love-text"><?php esc_html_e( 'Love this plugin?', 'googleanalytics' ); ?> <a
64 href="https://wordpress.org/support/plugin/googleanalytics/reviews/#new-post"><?php esc_html_e( ' Please help spread the word by leaving a 5-star review!', 'googleanalytics'); ?> </a>
65 </p>
66 </div>
67 <script type="text/javascript">
68 const GA_DISABLE_FEATURE_URL = '<?php echo esc_url( Ga_Helper::create_url( admin_url( Ga_Helper::GA_SETTINGS_PAGE_URL ), array( Ga_Controller_Core::ACTION_PARAM_NAME => 'ga_action_disable_all_features' ) ) ); ?>';
69 const GA_ENABLE_FEATURE_URL = '<?php echo esc_url( Ga_Helper::create_url( admin_url( Ga_Helper::GA_SETTINGS_PAGE_URL ), array( Ga_Controller_Core::ACTION_PARAM_NAME => 'ga_action_enable_all_features' ) ) ); ?>';
70 jQuery( document ).ready( function() {
71 ga_switcher.init( '<?php echo esc_js( $data[ Ga_Admin::GA_DISABLE_ALL_FEATURES ] ); ?>' );
72 } );
73 </script>
74 <?php
75 require 'templates/demo-popup.php';
76