PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / trunk
ShareThis Dashboard for Google Analytics vtrunk
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 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
ga-code.php
40 lines
1 <?php
2 /**
3 * Code view.
4 *
5 * @package GoogleAnalytics
6 */
7
8 if (!defined('ABSPATH')) exit;
9
10 $debug_mode_on = isset( $debug_mode_on ) ? $debug_mode_on : false;
11
12 $script = ( true === $debug_mode_on ) ?
13 'https://google-analytics.com/analytics_debug.js' :
14 'https://google-analytics.com/analytics.js';
15 ?>
16 <script>
17 (function() {
18 (function (i, s, o, g, r, a, m) {
19 i['GoogleAnalyticsObject'] = r;
20 i[r] = i[r] || function () {
21 (i[r].q = i[r].q || []).push(arguments)
22 }, i[r].l = 1 * new Date();
23 a = s.createElement(o),
24 m = s.getElementsByTagName(o)[0];
25 a.async = 1;
26 a.src = g;
27 m.parentNode.insertBefore(a, m)
28 })(window, document, 'script', '<?php echo esc_url( $script ); ?>', 'ga');
29
30 ga('create', '<?php echo esc_attr( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_OPTION_NAME ] ); ?>', 'auto');
31 <?php if ( 'on' === $data['anonymization'] ) : ?>
32 ga('set', 'anonymizeIp', true);
33 <?php endif; ?>
34 <?php if ( ! empty( $data['optimize'] ) ) : ?>
35 ga('require', '<?php echo esc_html( $data['optimize'] ); ?>' );
36 <?php endif; ?>
37 ga('send', 'pageview');
38 })();
39 </script>
40