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