PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 3.2.0
ShareThis Dashboard for Google Analytics v3.2.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 / ga-code.php
googleanalytics / view Last commit date
templates 3 years ago ga-accounts-selector.php 4 years ago ga-auth-button.php 3 years ago ga-code.php 4 years ago ga-dashboard-widget.php 4 years ago ga-debug-modal.php 2 years ago ga-ga4-settings.php 3 years ago ga-googleanalytics-loader.php 4 years ago ga-notice.php 3 years ago ga-oauth-notice.php 4 years ago ga-wp-notice.php 4 years ago old-page.php 3 years ago page.php 3 years ago statistics.php 3 years ago stats.php 2 years ago trending.php 4 years ago
ga-code.php
38 lines
1 <?php
2 /**
3 * Code view.
4 *
5 * @package GoogleAnalytics
6 */
7
8 $debug_mode_on = isset( $debug_mode_on ) ? $debug_mode_on : false;
9
10 $script = ( true === $debug_mode_on ) ?
11 'https://google-analytics.com/analytics_debug.js' :
12 'https://google-analytics.com/analytics.js';
13 ?>
14 <script>
15 (function() {
16 (function (i, s, o, g, r, a, m) {
17 i['GoogleAnalyticsObject'] = r;
18 i[r] = i[r] || function () {
19 (i[r].q = i[r].q || []).push(arguments)
20 }, i[r].l = 1 * new Date();
21 a = s.createElement(o),
22 m = s.getElementsByTagName(o)[0];
23 a.async = 1;
24 a.src = g;
25 m.parentNode.insertBefore(a, m)
26 })(window, document, 'script', '<?php echo esc_url( $script ); ?>', 'ga');
27
28 ga('create', '<?php echo esc_attr( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_OPTION_NAME ] ); ?>', 'auto');
29 <?php if ( 'on' === $data['anonymization'] ) : ?>
30 ga('set', 'anonymizeIp', true);
31 <?php endif; ?>
32 <?php if ( ! empty( $data['optimize'] ) ) : ?>
33 ga('require', '<?php echo esc_html( $data['optimize'] ); ?>' );
34 <?php endif; ?>
35 ga('send', 'pageview');
36 })();
37 </script>
38