templates
5 years ago
ga_accounts_selector.php
9 years ago
ga_auth_button.php
9 years ago
ga_code.php
5 years ago
ga_dashboard_widget.php
9 years ago
ga_debug_modal.php
5 years ago
ga_googleanalytics_loader.php
5 years ago
ga_notice.php
5 years ago
ga_oauth_notice.php
9 years ago
ga_wp_notice.php
9 years ago
page.php
5 years ago
statistics.php
5 years ago
stats.php
5 years ago
trending.php
8 years ago
ga_code.php
25 lines
| 1 | <script> |
| 2 | (function() { |
| 3 | (function (i, s, o, g, r, a, m) { |
| 4 | i['GoogleAnalyticsObject'] = r; |
| 5 | i[r] = i[r] || function () { |
| 6 | (i[r].q = i[r].q || []).push(arguments) |
| 7 | }, i[r].l = 1 * new Date(); |
| 8 | a = s.createElement(o), |
| 9 | m = s.getElementsByTagName(o)[0]; |
| 10 | a.async = 1; |
| 11 | a.src = g; |
| 12 | m.parentNode.insertBefore(a, m) |
| 13 | })(window, document, 'script', 'https://google-analytics.com/analytics.js', 'ga'); |
| 14 | |
| 15 | ga('create', '<?php echo esc_attr( $data[ Ga_Admin::GA_WEB_PROPERTY_ID_OPTION_NAME ] ); ?>', 'auto'); |
| 16 | <?php if ( 'on' === $data['anonymization'] ) : ?> |
| 17 | ga('set', 'anonymizeIp', true); |
| 18 | <?php endif; ?> |
| 19 | <?php if ( ! empty( $data['optimize'] ) ) : ?> |
| 20 | ga('require', '<?php echo esc_html( $data['optimize'] ); ?>' ); |
| 21 | <?php endif; ?> |
| 22 | ga('send', 'pageview'); |
| 23 | })(); |
| 24 | </script> |
| 25 |