PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 2.1
ShareThis Dashboard for Google Analytics v2.1
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
ga_accounts_selector.php 9 years ago ga_code.php 9 years ago ga_dashboard_widget.php 9 years ago ga_googleanalytics_loader.php 9 years ago ga_notice.php 9 years ago ga_oauth_notice.php 9 years ago ga_wp_notice.php 9 years ago page.php 9 years ago statistics.php 9 years ago stats.php 9 years ago trending.php 9 years ago
page.php
181 lines
1 <div id="ga_access_code_modal" class="ga-modal" tabindex="-1">
2 <div class="ga-modal-dialog">
3 <div class="ga-modal-content">
4 <div class="ga-modal-header">
5 <span id="ga_close" class="ga-close">&times;</span>
6 <h4 class="ga-modal-title"><?php _e( 'Please paste the access code obtained from Google below:' ) ?></h4>
7 </div>
8 <div class="ga-modal-body">
9 <label for="ga_access_code"><strong><?php _e( 'Access Code' ); ?></strong>:</label>
10 &nbsp;<input id="ga_access_code_tmp" type="text"
11 placeholder="<?php _e( 'Paste your access code here' ) ?>"/>
12 <div class="ga-loader-wrapper">
13 <div class="ga-loader"></div>
14 </div>
15 </div>
16 <div class="ga-modal-footer">
17 <button id="ga_btn_close" type="button" class="button">Close</button>
18 <button type="button" class="button-primary"
19 id="ga_save_access_code"
20 onclick="ga_popup.saveAccessCode( event )"><?php _e( 'Save Changes' ); ?></button>
21 </div>
22 </div><!-- /.modal-content -->
23 </div><!-- /.modal-dialog -->
24 </div><!-- /.modal -->
25
26 <div class="wrap ga-wrap">
27 <h2>Google Analytics - <?php _e( 'Settings' ); ?></h2>
28 <div class="ga_container">
29 <?php if ( ! empty( $data['error_message'] ) ) : ?>
30 <?php echo $data['error_message']; ?>
31 <?php endif; ?>
32 <form id="ga_form" method="post" action="options.php">
33 <?php settings_fields( 'googleanalytics' ); ?>
34 <input id="ga_access_code" type="hidden"
35 name="<?php echo esc_attr( Ga_Admin::GA_OAUTH_AUTH_CODE_OPTION_NAME ); ?>" value=""/>
36 <table class="form-table">
37 <tr valign="top">
38 <?php if ( ! empty( $data['popup_url'] ) ): ?>
39 <th scope="row">
40 <label <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'class="label-grey ga-tooltip"' : '' ?>><?php echo _e( 'Google Profile' ) ?>
41 :
42 <span class="ga-tooltiptext ga-tt-abs"><?php _e( $tooltip ); ?></span>
43 </label>
44 </th>
45 <td <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'class="ga-tooltip"' : ''; ?>>
46 <button id="ga_authorize_with_google_button" class="button-primary"
47 <?php if ( Ga_Helper::are_features_enabled() ) : ?>
48 onclick="ga_popup.authorize( event, '<?php echo esc_attr( $data['popup_url'] ); ?>' )"
49 <?php endif; ?>
50 <?php echo( ( esc_attr( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_OPTION_NAME ] ) || ! Ga_Helper::are_features_enabled() ) ? 'disabled="disabled"' : '' ); ?>
51 ><?php _e( 'Authenticate
52 with Google' ) ?>
53 </button>
54 <span class="ga-tooltiptext"><?php _e( $tooltip ); ?></span>
55 <?php if ( ! empty( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_OPTION_NAME ] ) ): ?>
56 <div class="ga_warning">
57 <strong><?php _e( 'Notice' ) ?></strong>:&nbsp;<?php _e( 'Please uncheck the "Manually enter Tracking ID" option to authenticate and view statistics.' ); ?>
58 </div>
59 <?php endif; ?>
60 </td>
61 <?php endif; ?>
62
63 <?php if ( ! empty( $data['ga_accounts_selector'] ) ): ?>
64 <th scope="row"><?php echo _e( 'Google Analytics Account' ) ?>:</th>
65 <td><?php echo $data['ga_accounts_selector']; ?></td>
66 <?php endif; ?>
67
68 </tr>
69
70 <tr valign="top">
71
72 <th scope="row">
73 <div class="checkbox">
74 <label class="ga_checkbox_label <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'label-grey ga-tooltip' : '' ?>"
75 for="ga_enter_code_manually"> <input
76 <?php if ( Ga_Helper::are_features_enabled() ) : ?>
77 onclick="ga_events.click( this, ga_events.codeManuallyCallback( <?php echo Ga_Helper::are_features_enabled() ? 1 : 0; ?> ) )"
78 <?php endif; ?>
79 type="checkbox"
80 <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'disabled="disabled"' : ''; ?>
81 name="<?php echo esc_attr( Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_OPTION_NAME ); ?>"
82 id="ga_enter_code_manually"
83 value="1"
84 <?php echo( ( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_OPTION_NAME ] || ! Ga_Helper::are_terms_accepted() ) ? 'checked="checked"' : '' ); ?>/>&nbsp;
85 <?php _e( 'Manually enter Tracking ID' ) ?>
86 <span class="ga-tooltiptext ga-tt-abs"><?php _e( $tooltip ); ?></span>
87 </label>
88 <?php if ( ! Ga_Helper::are_features_enabled() ) : ?>
89 <input id="ga_enter_code_manually_hidden" type="hidden"
90 name="<?php echo esc_attr( Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_OPTION_NAME ); ?>"
91 value="1"/>
92 <?php endif; ?>
93 </div>
94 </th>
95 <td></td>
96 </tr>
97 <tr valign="top"
98 id="ga_manually_wrapper" <?php echo( ( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_OPTION_NAME ] || ! Ga_Helper::are_features_enabled() ) ? '' : 'style="display: none"' ); ?> >
99
100 <th scope="row"><?php _e( 'Tracking ID' ) ?>:</th>
101 <td>
102 <input type="text"
103 name="<?php echo esc_attr( Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_VALUE_OPTION_NAME ); ?>"
104 value="<?php echo esc_attr( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_VALUE_OPTION_NAME ] ); ?>"
105 id="ga_manually_input"/>&nbsp;
106 <div class="ga_warning">
107 <strong><?php _e( 'Warning' ); ?></strong>:&nbsp;<?php _e( 'If you enter your Tracking ID manually, Analytics statistics will not be shown.' ); ?>
108 <br>
109 <?php _e( 'We strongly recommend to authenticate with Google using the button above.' ); ?>
110 </div>
111 </td>
112
113 </tr>
114
115 <tr valign="top" id="ga_roles_wrapper">
116 <th scope="row">
117 <label <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'class="label-grey ga-tooltip"' : '' ?>><?php _e( 'Exclude Tracking for Roles' ) ?>
118 :
119 <span class="ga-tooltiptext ga-tt-abs"><?php _e( $tooltip ); ?></span>
120 </label>
121 </th>
122 <td>
123
124
125 <?php
126 if ( ! empty( $data['roles'] ) ) {
127 $roles = $data['roles'];
128 foreach ( $roles as $role ) {
129 ?>
130 <div class="checkbox">
131 <label class="ga_checkbox_label <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'label-grey ga-tooltip' : ''; ?>"
132 for="checkbox_<?php echo $role['id']; ?>">
133 <input id="checkbox_<?php echo $role['id']; ?>" type="checkbox"
134 <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'disabled="disabled"' : ''; ?>
135 name="<?php echo esc_attr( Ga_Admin::GA_EXCLUDE_ROLES_OPTION_NAME . "[" . $role['id'] . "]" ); ?>"
136 id="<?php echo esc_attr( $role['id'] ); ?>"
137 <?php echo esc_attr( ( $role['checked'] ? 'checked="checked"' : '' ) ); ?> />&nbsp;
138 <?php echo esc_html( $role['name'] ); ?>
139 <span class="ga-tooltiptext"><?php _e( $tooltip ); ?></span>
140 </label>
141 </div>
142 <?php
143 }
144 }
145 ?>
146
147 </td>
148 </tr>
149 <tr valign="top">
150 <th scope="row"><?php _e( 'Disable all features' ) ?>:</th>
151 <td>
152 <label class="ga-switch">
153 <input id="ga-disable" name="<?php echo Ga_Admin::GA_DISABLE_ALL_FEATURES; ?>"
154 type="checkbox">
155 <div id="ga-slider" class="ga-slider round"></div>
156 </label
157 </td>
158 </tr>
159 </table>
160
161 <p class="submit">
162 <input type="submit" class="button-primary"
163 value="<?php _e( 'Save Changes' ) ?>"/>
164 </p>
165 </form>
166 </div>
167 <p class="ga-love-text"><?php _e( 'Experiencing a problem or have feedback for us?' ); ?> <a
168 href="https://googleanalytics.zendesk.com/hc/en-us"><?php _e( 'We\'d love to hear from you!' ); ?> </a>
169 </p>
170 <p class="ga-love-text"><?php _e( 'Love this plugin?' ); ?> <a
171 href="https://wordpress.org/support/plugin/googleanalytics/reviews/#new-post"><?php _e( ' Please help spread the word by leaving a 5-star review!' ); ?> </a>
172 </p>
173 </div>
174 <script type="text/javascript">
175 const GA_DISABLE_FEATURE_URL = '<?php echo Ga_Helper::create_url(admin_url(Ga_Helper::GA_SETTINGS_PAGE_URL), array(Ga_Controller_Core::ACTION_PARAM_NAME => 'ga_action_disable_all_features')); ?>';
176 const GA_ENABLE_FEATURE_URL = '<?php echo Ga_Helper::create_url(admin_url(Ga_Helper::GA_SETTINGS_PAGE_URL), array(Ga_Controller_Core::ACTION_PARAM_NAME => 'ga_action_enable_all_features')); ?>';
177 jQuery(document).ready(function () {
178 ga_switcher.init('<?php echo $data[ Ga_Admin::GA_DISABLE_ALL_FEATURES ]; ?>');
179 });
180 </script>
181