PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 2.1.2
ShareThis Dashboard for Google Analytics v2.1.2
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_auth_button.php 9 years ago ga_code.php 9 years ago ga_dashboard_widget.php 9 years ago ga_debug_modal.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
180 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 <?php echo $data[ 'debug_modal' ] ?>
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 <?php echo $data[ 'auth_button' ] ?>
47 <span class="ga-tooltiptext"><?php _e( $tooltip ); ?></span>
48 <?php if ( ! empty( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_OPTION_NAME ] ) ): ?>
49 <div class="ga_warning">
50 <strong><?php _e( 'Notice' ) ?></strong>:&nbsp;<?php _e( 'Please uncheck the "Manually enter Tracking ID" option to authenticate and view statistics.' ); ?>
51 </div>
52 <?php endif; ?>
53 </td>
54 <?php endif; ?>
55
56 <?php if ( ! empty( $data['ga_accounts_selector'] ) ): ?>
57 <th scope="row"><?php echo _e( 'Google Analytics Account' ) ?>:</th>
58 <td><?php echo $data['ga_accounts_selector']; ?>
59 <div class="wrap"><?php echo $data[ 'auth_button' ] ?></div>
60 </td>
61 <?php endif; ?>
62
63 </tr>
64
65 <tr valign="top">
66
67 <th scope="row">
68 <div class="checkbox">
69 <label class="ga_checkbox_label <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'label-grey ga-tooltip' : '' ?>"
70 for="ga_enter_code_manually"> <input
71 <?php if ( Ga_Helper::are_features_enabled() ) : ?>
72 onclick="ga_events.click( this, ga_events.codeManuallyCallback( <?php echo Ga_Helper::are_features_enabled() ? 1 : 0; ?> ) )"
73 <?php endif; ?>
74 type="checkbox"
75 <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'disabled="disabled"' : ''; ?>
76 name="<?php echo esc_attr( Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_OPTION_NAME ); ?>"
77 id="ga_enter_code_manually"
78 value="1"
79 <?php echo( ( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_OPTION_NAME ] || ! Ga_Helper::are_terms_accepted() ) ? 'checked="checked"' : '' ); ?>/>&nbsp;
80 <?php _e( 'Manually enter Tracking ID' ) ?>
81 <span class="ga-tooltiptext ga-tt-abs"><?php _e( $tooltip ); ?></span>
82 </label>
83 <?php if ( ! Ga_Helper::are_features_enabled() ) : ?>
84 <input id="ga_enter_code_manually_hidden" type="hidden"
85 name="<?php echo esc_attr( Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_OPTION_NAME ); ?>"
86 value="1"/>
87 <?php endif; ?>
88 </div>
89 </th>
90 <td></td>
91 </tr>
92 <tr valign="top"
93 id="ga_manually_wrapper" <?php echo( ( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_OPTION_NAME ] || ! Ga_Helper::are_features_enabled() ) ? '' : 'style="display: none"' ); ?> >
94
95 <th scope="row"><?php _e( 'Tracking ID' ) ?>:</th>
96 <td>
97 <input type="text"
98 name="<?php echo esc_attr( Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_VALUE_OPTION_NAME ); ?>"
99 value="<?php echo esc_attr( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_MANUALLY_VALUE_OPTION_NAME ] ); ?>"
100 id="ga_manually_input"/>&nbsp;
101 <div class="ga_warning">
102 <strong><?php _e( 'Warning' ); ?></strong>:&nbsp;<?php _e( 'If you enter your Tracking ID manually, Analytics statistics will not be shown.' ); ?>
103 <br>
104 <?php _e( 'We strongly recommend to authenticate with Google using the button above.' ); ?>
105 </div>
106 </td>
107
108 </tr>
109
110 <tr valign="top" id="ga_roles_wrapper">
111 <th scope="row">
112 <label <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'class="label-grey ga-tooltip"' : '' ?>><?php _e( 'Exclude Tracking for Roles' ) ?>
113 :
114 <span class="ga-tooltiptext ga-tt-abs"><?php _e( $tooltip ); ?></span>
115 </label>
116 </th>
117 <td>
118
119
120 <?php
121 if ( ! empty( $data['roles'] ) ) {
122 $roles = $data['roles'];
123 foreach ( $roles as $role ) {
124 ?>
125 <div class="checkbox">
126 <label class="ga_checkbox_label <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'label-grey ga-tooltip' : ''; ?>"
127 for="checkbox_<?php echo $role['id']; ?>">
128 <input id="checkbox_<?php echo $role['id']; ?>" type="checkbox"
129 <?php echo ( ! Ga_Helper::are_features_enabled() ) ? 'disabled="disabled"' : ''; ?>
130 name="<?php echo esc_attr( Ga_Admin::GA_EXCLUDE_ROLES_OPTION_NAME . "[" . $role['id'] . "]" ); ?>"
131 id="<?php echo esc_attr( $role['id'] ); ?>"
132 <?php echo esc_attr( ( $role['checked'] ? 'checked="checked"' : '' ) ); ?> />&nbsp;
133 <?php echo esc_html( $role['name'] ); ?>
134 <span class="ga-tooltiptext"><?php _e( $tooltip ); ?></span>
135 </label>
136 </div>
137 <?php
138 }
139 }
140 ?>
141
142 </td>
143 </tr>
144 <tr valign="top">
145 <td colspan="2">
146 <p>If you experience an issue with this plugin, we are here to help! You can visit our <a href="https://googleanalytics.zendesk.com/hc/en-us">support portal</a> to find answers to the most frequently asked questions and to submit a support request. We aim to respond to everyone within one business day.</p>
147 <p>If your issue is difficult to debug, click the button below to automatically send us your error logs and debugging info.</p>
148 <p><button id="ga_debug_button" class="button button-secondary" onclick="ga_debug.open_modal( event )" >Send Debugging Info</button></p>
149 </td>
150 </tr>
151 <tr valign="top">
152 <th scope="row"><?php _e( 'Disable all features' ) ?>:</th>
153 <td>
154 <label class="ga-switch">
155 <input id="ga-disable" name="<?php echo Ga_Admin::GA_DISABLE_ALL_FEATURES; ?>"
156 type="checkbox">
157 <div id="ga-slider" class="ga-slider round"></div>
158 </label
159 </td>
160 </tr>
161 </table>
162
163 <p class="submit">
164 <input type="submit" class="button-primary"
165 value="<?php _e( 'Save Changes' ) ?>"/>
166 </p>
167 </form>
168 </div>
169 <p class="ga-love-text"><?php _e( 'Love this plugin?' ); ?> <a
170 href="https://wordpress.org/support/plugin/googleanalytics/reviews/#new-post"><?php _e( ' Please help spread the word by leaving a 5-star review!' ); ?> </a>
171 </p>
172 </div>
173 <script type="text/javascript">
174 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')); ?>';
175 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')); ?>';
176 jQuery(document).ready(function () {
177 ga_switcher.init('<?php echo $data[ Ga_Admin::GA_DISABLE_ALL_FEATURES ]; ?>');
178 });
179 </script>
180