Version Description
Download this release
Release Info
Developer | chriscct7 |
Plugin | Google Analytics Dashboard for WP (GADWP) |
Version | 6.0.0 |
Comparing to | |
See all releases |
Code changes from version 5.3.9 to 6.0.0
- admin/ajax-actions.php +0 -143
- admin/class-am-notification.php +0 -472
- admin/css/admin-widgets.css +0 -1
- admin/css/gadwp.css +0 -221
- admin/css/item-reports.css +0 -1
- admin/images/clicky.png +0 -0
- admin/images/gadwp-icon.png +0 -0
- admin/images/google-analytics-dashboard.png +0 -0
- admin/images/help.png +0 -0
- admin/images/mcdn.png +0 -0
- admin/images/optinmonster.png +0 -0
- admin/images/ssl.png +0 -0
- admin/images/star.png +0 -0
- admin/images/wp.png +0 -0
- admin/images/wpforms.png +0 -0
- admin/item-reports.php +0 -56
- admin/js/settings.js +0 -1
- admin/js/ui.js +0 -1
- admin/js/wp-color-picker-script.js +0 -1
- admin/settings.php +0 -2005
- admin/setup.php +0 -368
- admin/tracking.php +0 -283
- admin/views/access-code.php +0 -36
- admin/widgets.php +0 -65
- assets/css/admin-common.css +48 -0
- assets/css/admin-common.min.css +1 -0
- assets/css/images/index.php +4 -0
- assets/css/images/logo.png +0 -0
- assets/css/images/logo@2x.png +0 -0
- assets/css/images/mascot.png +0 -0
- assets/css/images/mascot@2x.png +0 -0
- assets/css/index.php +4 -0
- assets/fonts/README.md +17 -0
- assets/fonts/glyphicons-halflings-regular.eot +0 -0
- assets/fonts/glyphicons-halflings-regular.svg +288 -0
- assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- assets/fonts/glyphicons-halflings-regular.woff +0 -0
- assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
- assets/fonts/icons.eot +0 -0
- assets/fonts/icons.otf +0 -0
- assets/fonts/icons.ttf +0 -0
- assets/fonts/icons.woff +0 -0
- assets/fonts/icons.woff2 +0 -0
- assets/fonts/index.php +4 -0
- assets/fonts/monsterinsights.eot +0 -0
- assets/fonts/monsterinsights.svg +1 -0
- assets/fonts/monsterinsights.ttf +0 -0
- assets/fonts/monsterinsights.woff +0 -0
- assets/images/down-green.png +0 -0
- assets/images/down-green@2x.png +0 -0
- assets/images/down.png +0 -0
- assets/images/down@2x.png +0 -0
- assets/images/em-mascot.png +0 -0
- assets/images/index.php +4 -0
- assets/images/plugin-om.png +0 -0
- assets/images/plugin-smtp.png +0 -0
- assets/images/plugin-wpforms.png +0 -0
- assets/images/question-mark.png +0 -0
- assets/images/rafflepress.png +0 -0
- assets/images/seedprod.png +0 -0
- assets/images/trustpulse.png +0 -0
- assets/images/up-red.png +0 -0
- assets/images/up-red@2x.png +0 -0
- assets/images/up.png +0 -0
- assets/images/up@2x.png +0 -0
- assets/images/upsell/chart.png +0 -0
- assets/images/upsell/chart.svg +54 -0
- assets/images/upsell/woo-edd-upsell.png +0 -0
- assets/images/upsell/woo-edd-upsell.svg +38 -0
- assets/index.php +4 -0
- assets/js/admin-common.js +25 -0
- assets/js/admin-common.min.js +1 -0
- assets/js/frontend.js +643 -0
- assets/js/frontend.min.js +46 -0
- assets/js/index.php +4 -0
- assets/lib/index.php +4 -0
- assets/lib/pandora/class-am-deactivation-survey.php +358 -0
- common/ajax-actions.php +0 -42
- common/js/reports5.js +0 -1
- common/nprogress/nprogress.css +0 -1
- common/nprogress/nprogress.js +0 -1
- common/realtime/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- common/realtime/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- common/realtime/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- common/realtime/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- common/realtime/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- common/realtime/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- common/realtime/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- common/realtime/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- common/realtime/images/ui-icons_222222_256x240.png +0 -0
- common/realtime/images/ui-icons_2e83ff_256x240.png +0 -0
- common/realtime/images/ui-icons_454545_256x240.png +0 -0
- common/realtime/images/ui-icons_888888_256x240.png +0 -0
- common/realtime/images/ui-icons_cd0a0a_256x240.png +0 -0
- common/realtime/jquery.ui.tooltip.html.css +0 -3
- common/realtime/jquery.ui.tooltip.html.js +0 -1
- config.php +0 -466
- front/ajax-actions.php +0 -157
- front/css/item-reports.css +0 -1
- front/css/widgets.css +0 -1
- front/item-reports.php +0 -38
- front/js/tracking-analytics-events.js +0 -1
- front/js/tracking-scrolldepth.js +0 -1
- front/js/widgets.js +0 -1
- front/setup.php +0 -133
- front/tracking-analytics.php +0 -775
- front/tracking-tagmanager.php +0 -185
- front/tracking.php +0 -79
- front/views/analytics-amp-clientidapi.php +0 -11
- front/views/analytics-amp-code.php +0 -14
- front/views/analytics-code.php +0 -40
- front/views/analytics-optout-code.php +0 -28
- front/views/optimize-code.php +0 -21
- front/views/tagmanager-amp-code.php +0 -14
- front/views/tagmanager-code.php +0 -24
- front/widgets.php +0 -195
- gadwp.php +669 -228
- includes/admin/admin.php +522 -0
- includes/admin/ajax.php +209 -0
- includes/admin/api-auth.php +583 -0
- includes/admin/common.php +1094 -0
- includes/admin/index.php +4 -0
- includes/admin/licensing/autoupdate.php +94 -0
- includes/admin/licensing/skin.php +116 -0
- includes/admin/notice.php +236 -0
- includes/admin/pages/addons.php +183 -0
- includes/admin/pages/reports.php +65 -0
- includes/admin/pages/settings.php +129 -0
- includes/admin/pages/tools.php +44 -0
- includes/admin/reporting.php +68 -0
- includes/admin/reports/abstract-report.php +456 -0
- includes/admin/reports/index.php +4 -0
- includes/admin/reports/overview.php +80 -0
- includes/admin/review.php +192 -0
- includes/admin/routes.php +746 -0
- includes/admin/tracking.php +247 -0
- includes/api-request.php +443 -0
- includes/auth.php +250 -0
- includes/capabilities.php +89 -0
- includes/deprecated.php +238 -0
- includes/em-install.php +453 -0
- includes/frontend/class-tracking-abstract.php +79 -0
- includes/frontend/events/class-analytics-events.php +116 -0
- includes/frontend/events/index.php +4 -0
- includes/frontend/frontend.php +396 -0
- includes/frontend/index.php +4 -0
- includes/frontend/seedprod.php +45 -0
- includes/frontend/tracking/class-tracking-analytics.php +346 -0
- includes/frontend/tracking/class-tracking-preview.php +81 -0
- includes/frontend/tracking/index.php +4 -0
- includes/helpers.php +1297 -0
- includes/index.php +4 -0
- includes/measurement-protocol.php +142 -0
- includes/options.php +419 -0
- index.php +4 -0
- install/install.php +0 -199
- install/uninstall.php +0 -42
- languages/google-analytics-dashboard-for-wp.pot +3849 -0
admin/ajax-actions.php
DELETED
@@ -1,143 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Backend_Ajax' ) ) {
|
15 |
-
|
16 |
-
final class GADWP_Backend_Ajax {
|
17 |
-
|
18 |
-
private $gadwp;
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
$this->gadwp = GADWP();
|
22 |
-
|
23 |
-
if ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_back'] ) && ( ( 1 == $this->gadwp->config->options['backend_item_reports'] ) || ( 1 == $this->gadwp->config->options['dashboard_widget'] ) ) ) {
|
24 |
-
// Items action
|
25 |
-
add_action( 'wp_ajax_gadwp_backend_item_reports', array( $this, 'ajax_item_reports' ) );
|
26 |
-
}
|
27 |
-
if ( current_user_can( 'manage_options' ) ) {
|
28 |
-
// Admin Widget action
|
29 |
-
add_action( 'wp_ajax_gadwp_dismiss_notices', array( $this, 'ajax_dismiss_notices' ) );
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Ajax handler for Item Reports
|
35 |
-
*
|
36 |
-
* @return json|int
|
37 |
-
*/
|
38 |
-
public function ajax_item_reports() {
|
39 |
-
if ( ! isset( $_POST['gadwp_security_backend_item_reports'] ) || ! wp_verify_nonce( $_POST['gadwp_security_backend_item_reports'], 'gadwp_backend_item_reports' ) ) {
|
40 |
-
wp_die( - 30 );
|
41 |
-
}
|
42 |
-
if ( isset( $_POST['projectId'] ) && $this->gadwp->config->options['switch_profile'] && 'false' !== $_POST['projectId'] ) {
|
43 |
-
$projectId = $_POST['projectId'];
|
44 |
-
} else {
|
45 |
-
$projectId = false;
|
46 |
-
}
|
47 |
-
$from = $_POST['from'];
|
48 |
-
$to = $_POST['to'];
|
49 |
-
$query = $_POST['query'];
|
50 |
-
if ( isset( $_POST['filter'] ) ) {
|
51 |
-
$filter_id = $_POST['filter'];
|
52 |
-
} else {
|
53 |
-
$filter_id = false;
|
54 |
-
}
|
55 |
-
if ( isset( $_POST['metric'] ) ) {
|
56 |
-
$metric = $_POST['metric'];
|
57 |
-
} else {
|
58 |
-
$metric = 'sessions';
|
59 |
-
}
|
60 |
-
|
61 |
-
if ( $filter_id && $metric == 'sessions' ) { // Sessions metric is not available for item reports
|
62 |
-
$metric = 'pageviews';
|
63 |
-
}
|
64 |
-
|
65 |
-
if ( ob_get_length() ) {
|
66 |
-
ob_clean();
|
67 |
-
}
|
68 |
-
|
69 |
-
if ( ! ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_back'] ) && ( ( 1 == $this->gadwp->config->options['backend_item_reports'] ) || ( 1 == $this->gadwp->config->options['dashboard_widget'] ) ) ) ) {
|
70 |
-
wp_die( - 31 );
|
71 |
-
}
|
72 |
-
if ( $this->gadwp->config->options['token'] && $this->gadwp->config->options['tableid_jail'] && $from && $to ) {
|
73 |
-
if ( null === $this->gadwp->gapi_controller ) {
|
74 |
-
$this->gadwp->gapi_controller = new GADWP_GAPI_Controller();
|
75 |
-
}
|
76 |
-
} else {
|
77 |
-
wp_die( - 24 );
|
78 |
-
}
|
79 |
-
if ( false == $projectId ) {
|
80 |
-
$projectId = $this->gadwp->config->options['tableid_jail'];
|
81 |
-
}
|
82 |
-
$profile_info = GADWP_Tools::get_selected_profile( $this->gadwp->config->options['ga_profiles_list'], $projectId );
|
83 |
-
if ( isset( $profile_info[4] ) ) {
|
84 |
-
$this->gadwp->gapi_controller->timeshift = $profile_info[4];
|
85 |
-
} else {
|
86 |
-
$this->gadwp->gapi_controller->timeshift = (int) current_time( 'timestamp' ) - time();
|
87 |
-
}
|
88 |
-
|
89 |
-
if ( $filter_id ) {
|
90 |
-
$uri_parts = explode( '/', get_permalink( $filter_id ), 4 );
|
91 |
-
|
92 |
-
if ( isset( $uri_parts[3] ) ) {
|
93 |
-
$uri = '/' . $uri_parts[3];
|
94 |
-
} else {
|
95 |
-
wp_die( - 25 );
|
96 |
-
}
|
97 |
-
|
98 |
-
// allow URL correction before sending an API request
|
99 |
-
$filter = apply_filters( 'gadwp_backenditem_uri', $uri, $filter_id );
|
100 |
-
|
101 |
-
$lastchar = substr( $filter, - 1 );
|
102 |
-
|
103 |
-
if ( isset( $profile_info[6] ) && $profile_info[6] && '/' == $lastchar ) {
|
104 |
-
$filter = $filter . $profile_info[6];
|
105 |
-
}
|
106 |
-
|
107 |
-
// Encode URL
|
108 |
-
$filter = rawurlencode( rawurldecode( $filter ) );
|
109 |
-
} else {
|
110 |
-
$filter = false;
|
111 |
-
}
|
112 |
-
|
113 |
-
$queries = explode( ',', $query );
|
114 |
-
|
115 |
-
$results = array();
|
116 |
-
|
117 |
-
foreach ( $queries as $value ) {
|
118 |
-
$results[] = $this->gadwp->gapi_controller->get( $projectId, $value, $from, $to, $filter, $metric );
|
119 |
-
}
|
120 |
-
|
121 |
-
wp_send_json( $results );
|
122 |
-
}
|
123 |
-
|
124 |
-
/**
|
125 |
-
* Ajax handler for dismissing Admin notices
|
126 |
-
*
|
127 |
-
* @return json|int
|
128 |
-
*/
|
129 |
-
public function ajax_dismiss_notices() {
|
130 |
-
if ( ! isset( $_POST['gadwp_security_dismiss_notices'] ) || ! wp_verify_nonce( $_POST['gadwp_security_dismiss_notices'], 'gadwp_dismiss_notices' ) ) {
|
131 |
-
wp_die( - 30 );
|
132 |
-
}
|
133 |
-
|
134 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
135 |
-
wp_die( - 31 );
|
136 |
-
}
|
137 |
-
|
138 |
-
delete_option( 'gadwp_got_updated' );
|
139 |
-
|
140 |
-
wp_die();
|
141 |
-
}
|
142 |
-
}
|
143 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/class-am-notification.php
DELETED
@@ -1,472 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! class_exists( 'AM_Notification', false ) ) {
|
4 |
-
/**
|
5 |
-
* Awesome Motive Notifications
|
6 |
-
*
|
7 |
-
* This creates a custom post type (if it doesn't exist) and calls the API to
|
8 |
-
* retrieve notifications for this product.
|
9 |
-
*
|
10 |
-
* @package AwesomeMotive
|
11 |
-
* @author AwesomeMotive Team
|
12 |
-
* @license GPL-2.0+
|
13 |
-
* @copyright Copyright (c) 2018, Awesome Motive LLC
|
14 |
-
* @version 1.0.7
|
15 |
-
*/
|
16 |
-
class AM_Notification {
|
17 |
-
|
18 |
-
/**
|
19 |
-
* The api url we are calling.
|
20 |
-
*
|
21 |
-
* @since 1.0.0
|
22 |
-
*
|
23 |
-
* @var string
|
24 |
-
*/
|
25 |
-
public $api_url = 'https://api.awesomemotive.com/v1/notification/';
|
26 |
-
|
27 |
-
/**
|
28 |
-
* A unique slug for this plugin.
|
29 |
-
* (Not the WordPress plugin slug)
|
30 |
-
*
|
31 |
-
* @since 1.0.0
|
32 |
-
*
|
33 |
-
* @var string
|
34 |
-
*/
|
35 |
-
public $plugin;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* The current plugin version.
|
39 |
-
*
|
40 |
-
* @since 1.0.0
|
41 |
-
*
|
42 |
-
* @var string
|
43 |
-
*/
|
44 |
-
public $plugin_version;
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Flag if a notice has been registered.
|
48 |
-
*
|
49 |
-
* @since 1.0.0
|
50 |
-
*
|
51 |
-
* @var bool
|
52 |
-
*/
|
53 |
-
public static $registered = false;
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Construct.
|
57 |
-
*
|
58 |
-
* @since 1.0.0
|
59 |
-
*
|
60 |
-
* @param string $plugin The plugin slug.
|
61 |
-
* @param mixed $version The version of the plugin.
|
62 |
-
*/
|
63 |
-
public function __construct( $plugin = '', $version = 0 ) {
|
64 |
-
$this->plugin = $plugin;
|
65 |
-
$this->plugin_version = $version;
|
66 |
-
|
67 |
-
add_action( 'init', array( $this, 'custom_post_type' ) );
|
68 |
-
add_action( 'admin_init', array( $this, 'get_remote_notifications' ), 100 );
|
69 |
-
add_action( 'admin_notices', array( $this, 'display_notifications' ) );
|
70 |
-
add_action( 'wp_ajax_am_notification_dismiss', array( $this, 'dismiss_notification' ) );
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Registers a custom post type.
|
75 |
-
*
|
76 |
-
* @since 1.0.0
|
77 |
-
*/
|
78 |
-
public function custom_post_type() {
|
79 |
-
register_post_type( 'amn_' . $this->plugin, array(
|
80 |
-
'label' => $this->plugin . ' Announcements',
|
81 |
-
'can_export' => false,
|
82 |
-
'supports' => false,
|
83 |
-
'capability_type' => 'manage_options',
|
84 |
-
) );
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Retrieve the remote notifications if the time has expired.
|
89 |
-
*
|
90 |
-
* @since 1.0.0
|
91 |
-
*/
|
92 |
-
public function get_remote_notifications() {
|
93 |
-
if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
|
94 |
-
return;
|
95 |
-
}
|
96 |
-
|
97 |
-
$to_check = get_option( '_amn_' . $this->plugin . '_to_check', false );
|
98 |
-
|
99 |
-
if ( $to_check == false ) {
|
100 |
-
// Non load balanced. Start checking in in 7 days + 2-4 days.
|
101 |
-
$checktime = array();
|
102 |
-
$checktime['day'] = rand( 0, 6 );
|
103 |
-
$checktime['hour'] = rand( 0, 23 );
|
104 |
-
$checktime['minute'] = rand( 0, 59 );
|
105 |
-
$checktime['second'] = rand( 0, 59 );
|
106 |
-
$checktime['offset'] = ( $checktime['day'] * DAY_IN_SECONDS ) +
|
107 |
-
( $checktime['hour'] * HOUR_IN_SECONDS ) +
|
108 |
-
( $checktime['minute'] * MINUTE_IN_SECONDS ) +
|
109 |
-
$checktime['second'];
|
110 |
-
$to_check = strtotime("next sunday") + $checktime['offset'];
|
111 |
-
update_option( '_amn_' . $this->plugin . '_to_check', $to_check );
|
112 |
-
}
|
113 |
-
|
114 |
-
if ( $to_check < time() ) {
|
115 |
-
$plugin_notifications = $this->get_plugin_notifications( 1 );
|
116 |
-
$notification_id = null;
|
117 |
-
|
118 |
-
if ( ! empty( $plugin_notifications ) ) {
|
119 |
-
// Unset it from the array.
|
120 |
-
$notification = $plugin_notifications[0];
|
121 |
-
$notification_id = get_post_meta( $notification->ID, 'notification_id', true );
|
122 |
-
}
|
123 |
-
|
124 |
-
$response = wp_remote_retrieve_body( wp_remote_post( $this->api_url, array(
|
125 |
-
'body' => array(
|
126 |
-
'slug' => $this->plugin,
|
127 |
-
'version' => $this->plugin_version,
|
128 |
-
'last_notification' => $notification_id,
|
129 |
-
),
|
130 |
-
) ) );
|
131 |
-
|
132 |
-
$data = json_decode( $response );
|
133 |
-
|
134 |
-
if ( ! empty( $data->id ) ) {
|
135 |
-
$notifications = array();
|
136 |
-
|
137 |
-
foreach ( (array) $data->slugs as $slug ) {
|
138 |
-
$notifications = array_merge(
|
139 |
-
$notifications,
|
140 |
-
(array) get_posts(
|
141 |
-
array(
|
142 |
-
'post_type' => 'amn_' . $slug,
|
143 |
-
'post_status' => 'all',
|
144 |
-
'meta_key' => 'notification_id',
|
145 |
-
'meta_value' => $data->id,
|
146 |
-
)
|
147 |
-
)
|
148 |
-
);
|
149 |
-
}
|
150 |
-
|
151 |
-
if ( empty( $notifications ) ) {
|
152 |
-
$new_notification_id = wp_insert_post(
|
153 |
-
array(
|
154 |
-
'post_content' => wp_kses_post( $data->content ),
|
155 |
-
'post_type' => 'amn_' . $this->plugin,
|
156 |
-
)
|
157 |
-
);
|
158 |
-
|
159 |
-
update_post_meta( $new_notification_id, 'notification_id', absint( $data->id ) );
|
160 |
-
update_post_meta( $new_notification_id, 'type', sanitize_text_field( trim( $data->type ) ) );
|
161 |
-
update_post_meta( $new_notification_id, 'dismissable', (bool) $data->dismissible ? 1 : 0 );
|
162 |
-
update_post_meta( $new_notification_id, 'location', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->location ) : json_encode( $data->location ) );
|
163 |
-
update_post_meta( $new_notification_id, 'version', sanitize_text_field( trim( $data->version ) ) );
|
164 |
-
update_post_meta( $new_notification_id, 'viewed', 0 );
|
165 |
-
update_post_meta( $new_notification_id, 'expiration', $data->expiration ? absint( $data->expiration ) : false );
|
166 |
-
update_post_meta( $new_notification_id, 'plans', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->plans ) : json_encode( $data->plans ) );
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
// Possibly revoke notifications.
|
171 |
-
if ( ! empty( $data->revoked ) ) {
|
172 |
-
$this->revoke_notifications( $data->revoked );
|
173 |
-
}
|
174 |
-
|
175 |
-
// Set the option now so we can't run this again until after 24 hours.
|
176 |
-
update_option( '_amn_' . $this->plugin . '_to_check', time() + 3 * DAY_IN_SECONDS );
|
177 |
-
}
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Get local plugin notifications that have already been set.
|
182 |
-
*
|
183 |
-
* @since 1.0.0
|
184 |
-
*
|
185 |
-
* @param integer $limit Set the limit for how many posts to retrieve.
|
186 |
-
* @param array $args Any top-level arguments to add to the array.
|
187 |
-
*
|
188 |
-
* @return WP_Post[] WP_Post that match the query.
|
189 |
-
*/
|
190 |
-
public function get_plugin_notifications( $limit = - 1, $args = array() ) {
|
191 |
-
return get_posts(
|
192 |
-
array(
|
193 |
-
'posts_per_page' => $limit,
|
194 |
-
'post_type' => 'amn_' . $this->plugin,
|
195 |
-
) + $args
|
196 |
-
);
|
197 |
-
}
|
198 |
-
|
199 |
-
/**
|
200 |
-
* Display any notifications that should be displayed.
|
201 |
-
*
|
202 |
-
* @since 1.0.0
|
203 |
-
*/
|
204 |
-
public function display_notifications() {
|
205 |
-
if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
|
206 |
-
return;
|
207 |
-
}
|
208 |
-
|
209 |
-
$plugin_notifications = $this->get_plugin_notifications( - 1, array(
|
210 |
-
'post_status' => 'all',
|
211 |
-
'meta_key' => 'viewed',
|
212 |
-
'meta_value' => '0',
|
213 |
-
) );
|
214 |
-
|
215 |
-
$plugin_notifications = $this->validate_notifications( $plugin_notifications );
|
216 |
-
|
217 |
-
if ( ! empty( $plugin_notifications ) && ! self::$registered ) {
|
218 |
-
foreach ( $plugin_notifications as $notification ) {
|
219 |
-
$dismissable = get_post_meta( $notification->ID, 'dismissable', true );
|
220 |
-
$type = get_post_meta( $notification->ID, 'type', true );
|
221 |
-
?>
|
222 |
-
<div class="am-notification am-notification-<?php echo absint( $notification->ID ); ?> notice notice-<?php echo esc_attr( $type ); ?><?php echo $dismissable ? ' is-dismissible' : ''; ?>">
|
223 |
-
<?php echo wp_kses_post( $notification->post_content ); ?>
|
224 |
-
</div>
|
225 |
-
<script type="text/javascript">
|
226 |
-
jQuery( document ).ready( function ( $ ) {
|
227 |
-
$( document ).on( 'click', '.am-notification-<?php echo absint( $notification->ID ); ?> button.notice-dismiss', function ( event ) {
|
228 |
-
$.post( ajaxurl, {
|
229 |
-
action: 'am_notification_dismiss',
|
230 |
-
notification_id: '<?php echo absint( $notification->ID ); ?>'
|
231 |
-
} );
|
232 |
-
} );
|
233 |
-
} );
|
234 |
-
</script>
|
235 |
-
<?php
|
236 |
-
}
|
237 |
-
|
238 |
-
self::$registered = true;
|
239 |
-
}
|
240 |
-
}
|
241 |
-
|
242 |
-
/**
|
243 |
-
* Validate the notifications before displaying them.
|
244 |
-
*
|
245 |
-
* @since 1.0.0
|
246 |
-
*
|
247 |
-
* @param array $plugin_notifications An array of plugin notifications.
|
248 |
-
*
|
249 |
-
* @return array A filtered array of plugin notifications.
|
250 |
-
*/
|
251 |
-
public function validate_notifications( $plugin_notifications ) {
|
252 |
-
global $pagenow;
|
253 |
-
|
254 |
-
foreach ( $plugin_notifications as $key => $notification ) {
|
255 |
-
// Location validation.
|
256 |
-
$location = (array) json_decode( get_post_meta( $notification->ID, 'location', true ) );
|
257 |
-
$continue = false;
|
258 |
-
if ( ! in_array( 'everywhere', $location, true ) ) {
|
259 |
-
if ( in_array( 'index.php', $location, true ) && 'index.php' === $pagenow ) {
|
260 |
-
$continue = true;
|
261 |
-
}
|
262 |
-
|
263 |
-
if ( in_array( 'plugins.php', $location, true ) && 'plugins.php' === $pagenow ) {
|
264 |
-
$continue = true;
|
265 |
-
}
|
266 |
-
|
267 |
-
if ( ! $continue ) {
|
268 |
-
unset( $plugin_notifications[ $key ] );
|
269 |
-
}
|
270 |
-
}
|
271 |
-
|
272 |
-
// Plugin validation (OR conditional).
|
273 |
-
$plugins = (array) json_decode( get_post_meta( $notification->ID, 'plugins', true ) );
|
274 |
-
$continue = false;
|
275 |
-
if ( ! empty( $plugins ) ) {
|
276 |
-
foreach ( $plugins as $plugin ) {
|
277 |
-
if ( is_plugin_active( $plugin ) ) {
|
278 |
-
$continue = true;
|
279 |
-
}
|
280 |
-
}
|
281 |
-
|
282 |
-
if ( ! $continue ) {
|
283 |
-
unset( $plugin_notifications[ $key ] );
|
284 |
-
}
|
285 |
-
}
|
286 |
-
|
287 |
-
// Theme validation.
|
288 |
-
$theme = get_post_meta( $notification->ID, 'theme', true );
|
289 |
-
$continue = (string) wp_get_theme() === $theme;
|
290 |
-
|
291 |
-
if ( ! empty( $theme ) && ! $continue ) {
|
292 |
-
unset( $plugin_notifications[ $key ] );
|
293 |
-
}
|
294 |
-
|
295 |
-
// Version validation.
|
296 |
-
$version = get_post_meta( $notification->ID, 'version', true );
|
297 |
-
$continue = false;
|
298 |
-
if ( ! empty( $version ) ) {
|
299 |
-
if ( version_compare( $this->plugin_version, $version, '<=' ) ) {
|
300 |
-
$continue = true;
|
301 |
-
}
|
302 |
-
|
303 |
-
if ( ! $continue ) {
|
304 |
-
unset( $plugin_notifications[ $key ] );
|
305 |
-
}
|
306 |
-
}
|
307 |
-
|
308 |
-
// Expiration validation.
|
309 |
-
$expiration = get_post_meta( $notification->ID, 'expiration', true );
|
310 |
-
$continue = false;
|
311 |
-
if ( ! empty( $expiration ) ) {
|
312 |
-
if ( $expiration > time() ) {
|
313 |
-
$continue = true;
|
314 |
-
}
|
315 |
-
|
316 |
-
if ( ! $continue ) {
|
317 |
-
unset( $plugin_notifications[ $key ] );
|
318 |
-
}
|
319 |
-
}
|
320 |
-
|
321 |
-
// Plan validation.
|
322 |
-
$plans = (array) json_decode( get_post_meta( $notification->ID, 'plans', true ) );
|
323 |
-
$continue = false;
|
324 |
-
if ( ! empty( $plans ) ) {
|
325 |
-
$level = $this->get_plan_level();
|
326 |
-
if ( in_array( $level, $plans, true ) ) {
|
327 |
-
$continue = true;
|
328 |
-
}
|
329 |
-
|
330 |
-
if ( ! $continue ) {
|
331 |
-
unset( $plugin_notifications[ $key ] );
|
332 |
-
}
|
333 |
-
}
|
334 |
-
}
|
335 |
-
|
336 |
-
return $plugin_notifications;
|
337 |
-
}
|
338 |
-
|
339 |
-
/**
|
340 |
-
* Grab the current plan level.
|
341 |
-
*
|
342 |
-
* @since 1.0.0
|
343 |
-
*
|
344 |
-
* @return string The current plan level.
|
345 |
-
*/
|
346 |
-
public function get_plan_level() {
|
347 |
-
// Prepare variables.
|
348 |
-
$key = '';
|
349 |
-
$level = '';
|
350 |
-
|
351 |
-
switch ( $this->plugin ) {
|
352 |
-
case 'wpforms':
|
353 |
-
$option = get_option( 'wpforms_license' );
|
354 |
-
$key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
|
355 |
-
$level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
|
356 |
-
|
357 |
-
// Possibly check for a constant.
|
358 |
-
if ( empty( $key ) && defined( 'WPFORMS_LICENSE_KEY' ) ) {
|
359 |
-
$key = WPFORMS_LICENSE_KEY;
|
360 |
-
}
|
361 |
-
break;
|
362 |
-
case 'mi-lite':
|
363 |
-
case 'mi':
|
364 |
-
if ( version_compare( MONSTERINSIGHTS_VERSION, '6.9.0', '>=' ) ) {
|
365 |
-
if ( MonsterInsights()->license->get_site_license_type() ) {
|
366 |
-
$key = MonsterInsights()->license->get_site_license_key();
|
367 |
-
$type = MonsterInsights()->license->get_site_license_type();
|
368 |
-
} else if ( MonsterInsights()->license->get_network_license_type() ) {
|
369 |
-
$key = MonsterInsights()->license->get_network_license_key();
|
370 |
-
$type = MonsterInsights()->license->get_network_license_type();
|
371 |
-
}
|
372 |
-
|
373 |
-
// Check key fallbacks.
|
374 |
-
if ( empty( $key ) ) {
|
375 |
-
$key = MonsterInsights()->license->get_license_key();
|
376 |
-
}
|
377 |
-
} else {
|
378 |
-
$option = get_option( 'monsterinsights_license' );
|
379 |
-
$key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
|
380 |
-
$level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
|
381 |
-
|
382 |
-
// Possibly check for a constant.
|
383 |
-
if ( empty( $key ) && defined( 'MONSTERINSIGHTS_LICENSE_KEY' ) && is_string( MONSTERINSIGHTS_LICENSE_KEY ) && strlen( MONSTERINSIGHTS_LICENSE_KEY ) > 10 ) {
|
384 |
-
$key = MONSTERINSIGHTS_LICENSE_KEY;
|
385 |
-
}
|
386 |
-
}
|
387 |
-
break;
|
388 |
-
case 'om':
|
389 |
-
$option = get_option( 'optin_monster_api' );
|
390 |
-
$key = is_array( $option ) && isset( $option['api']['apikey'] ) ? $option['api']['apikey'] : '';
|
391 |
-
|
392 |
-
// Possibly check for a constant.
|
393 |
-
if ( empty( $key ) && defined( 'OPTINMONSTER_REST_API_LICENSE_KEY' ) ) {
|
394 |
-
$key = OPTINMONSTER_REST_API_LICENSE_KEY;
|
395 |
-
}
|
396 |
-
|
397 |
-
// If the key is still empty, check for the old legacy key.
|
398 |
-
if ( empty( $key ) ) {
|
399 |
-
$key = is_array( $option ) && isset( $option['api']['key'] ) ? $option['api']['key'] : '';
|
400 |
-
}
|
401 |
-
break;
|
402 |
-
}
|
403 |
-
|
404 |
-
// Possibly set the level to 'none' if the key is empty and no level has been set.
|
405 |
-
if ( empty( $key ) && empty( $level ) ) {
|
406 |
-
$level = 'none';
|
407 |
-
}
|
408 |
-
|
409 |
-
// Possibly set the level to 'unknown' if a key is entered, but no level can be determined (such as manually entered key)
|
410 |
-
if ( ! empty( $key ) && empty( $level ) ) {
|
411 |
-
$level = 'unknown';
|
412 |
-
}
|
413 |
-
|
414 |
-
// Normalize the level.
|
415 |
-
switch ( $level ) {
|
416 |
-
case 'bronze':
|
417 |
-
case 'personal':
|
418 |
-
$level = 'basic';
|
419 |
-
break;
|
420 |
-
case 'silver':
|
421 |
-
case 'multi':
|
422 |
-
$level = 'plus';
|
423 |
-
break;
|
424 |
-
case 'gold':
|
425 |
-
case 'developer':
|
426 |
-
$level = 'pro';
|
427 |
-
break;
|
428 |
-
case 'platinum':
|
429 |
-
case 'master':
|
430 |
-
$level = 'ultimate';
|
431 |
-
break;
|
432 |
-
}
|
433 |
-
|
434 |
-
// Return the plan level.
|
435 |
-
return $level;
|
436 |
-
}
|
437 |
-
|
438 |
-
/**
|
439 |
-
* Dismiss the notification via AJAX.
|
440 |
-
*
|
441 |
-
* @since 1.0.0
|
442 |
-
*/
|
443 |
-
public function dismiss_notification() {
|
444 |
-
if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
|
445 |
-
die;
|
446 |
-
}
|
447 |
-
|
448 |
-
$notification_id = intval( $_POST['notification_id'] );
|
449 |
-
update_post_meta( $notification_id, 'viewed', 1 );
|
450 |
-
die;
|
451 |
-
}
|
452 |
-
|
453 |
-
/**
|
454 |
-
* Revokes notifications.
|
455 |
-
*
|
456 |
-
* @since 1.0.0
|
457 |
-
*
|
458 |
-
* @param array $ids An array of notification IDs to revoke.
|
459 |
-
*/
|
460 |
-
public function revoke_notifications( $ids ) {
|
461 |
-
// Loop through each of the IDs and find the post that has it as meta.
|
462 |
-
foreach ( (array) $ids as $id ) {
|
463 |
-
$notifications = $this->get_plugin_notifications( - 1, array( 'post_status' => 'all', 'meta_key' => 'notification_id', 'meta_value' => $id ) );
|
464 |
-
if ( $notifications ) {
|
465 |
-
foreach ( $notifications as $notification ) {
|
466 |
-
update_post_meta( $notification->ID, 'viewed', 1 );
|
467 |
-
}
|
468 |
-
}
|
469 |
-
}
|
470 |
-
}
|
471 |
-
}
|
472 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/css/admin-widgets.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.gadwp-pline{width:100%;margin:0;padding:5px 0 5px 0;background:#fff;-moz-box-shadow:0 0 3px 0 #BBB;-webkit-box-shadow:0 0 3px 0 #BBB;box-shadow:0 0 3px 0 #BBB;display:table;overflow:hidden}.gadwp-pleft{width:90%;float:left;padding-left:5px}.gadwp-pright{width:5%;float:right;padding-right:5px}[id^=gadwp-realtime-]{margin:10px 0 0 0;width:100%}.gadwp-rt-box{width:100%;margin:0;background:#fff;text-align:center;-moz-box-shadow:0 0 5px 0 #BBB;-webkit-box-shadow:0 0 5px 0 #BBB;box-shadow:0 0 5px 0 #BBB;display:table}.gadwp-tdo-left{width:60%;padding:33px 0;float:left;text-align:center}.gadwp-tdo-right{width:35%;margin:0 10px 0 0;text-align:left;font-weight:bold;vertical-align:middle;float:right;display:table}.gadwp-online{font-size:100px;font-weight:normal;line-height:1em;margin:0 auto;width:80%}.gadwp-bigtext{font-size:14px;width:100%;margin:0;padding:5px 5px 5px 5px;background:#fff;-moz-box-shadow:0 0 3px 0 #BBB;-webkit-box-shadow:0 0 3px 0 #BBB;box-shadow:0 0 3px 0 #BBB;display:table;overflow:hidden}.gadwp-bleft{float:left;width:80%}.gadwp-bright{float:right;width:20%}.gadwp-pgdetailsr{padding-left:20px;text-align:right}.gadwp-pgdetailsl{min-width:250px}[id^=gadwp-areachart-]{width:98%;height:100%;margin:10px auto 10px 0;height:250px}.gadwp-floatwraper{display:table;width:100%;height:100%}[id^=gadwp-piechart-].halfsize{width:47%;margin:10px 0 0 0;height:200px;float:left}[id^=gadwp-piechart-].floatleft{float:left}[id^=gadwp-piechart-].floatright{float:right}[id^=gadwp-tablechart-],[id^=gadwp-tablechart-]{width:98%;height:100%;margin:10px auto 10px 0}#dashboard-widgets-wrap .postbox{margin-right:10px}[id^=gadwp-progressbar-]{width:100%;height:3px;margin:5px 0 0 0}[id^=gadwp-bottomstats-]{width:100%}[id^=gadwp-bottomstats-] .inside{display:table;margin:0 auto;padding:0}#gadwp-widget .inside .small-box{width:30%;float:left;margin:0 5px 10px 5px;background:#fff;text-align:center;-moz-box-shadow:0 0 7px 0 #BBB;-webkit-box-shadow:0 0 7px 0 #BBB;box-shadow:0 0 7px 0 #BBB}#gadwp-widget .inside .small-box h3{font-size:1em;color:#777;padding:0 5px 0 5px;margin:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}#gadwp-widget .inside .small-box p{font-size:1.2em;margin:0 0 2px 0}@media screen and (max-width:410px){[id^=gadwp-bottomstats-] .inside .small-box{width:45%}}
|
|
admin/css/gadwp.css
DELETED
@@ -1,221 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Author: Alin Marcu
|
3 |
-
* Author URI: https://deconf.com
|
4 |
-
* Copyright 2013 Alin Marcu
|
5 |
-
* License: GPLv2 or later
|
6 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
-
*/
|
8 |
-
|
9 |
-
/* Tab navigation */
|
10 |
-
#gadwp-events, #gadwp-custom, #gadwp-advanced, #gadwp-exclude, #gadwp-config, #gadwp-tmdatalayervars, #gadwp-tmintegration, #gadwp-integration, #gadwp-tmadvanced {
|
11 |
-
display: none;
|
12 |
-
}
|
13 |
-
|
14 |
-
/* Options pages */
|
15 |
-
table.gadwp-settings-options {
|
16 |
-
padding-left: 10px;
|
17 |
-
width: 100%;
|
18 |
-
}
|
19 |
-
|
20 |
-
.gadwp-settings-options td {
|
21 |
-
padding: 0px 5px 5px 5px;
|
22 |
-
}
|
23 |
-
|
24 |
-
td.gadwp-settings-title, td.info {
|
25 |
-
width: 140px;
|
26 |
-
padding-left: 20px;
|
27 |
-
}
|
28 |
-
|
29 |
-
td.gadwp-settings-title-s {
|
30 |
-
width: 300px;
|
31 |
-
}
|
32 |
-
|
33 |
-
.gadwp-help {
|
34 |
-
padding-left: 15px;
|
35 |
-
}
|
36 |
-
|
37 |
-
td.gadwp-settings-info {
|
38 |
-
padding-bottom: 15px;
|
39 |
-
}
|
40 |
-
|
41 |
-
td.gadwp-settings-title label {
|
42 |
-
font-size: 1.1em;
|
43 |
-
}
|
44 |
-
|
45 |
-
.gadwp-title {
|
46 |
-
float: left;
|
47 |
-
margin-right: 10px;
|
48 |
-
margin-top: 2px;
|
49 |
-
clear: left;
|
50 |
-
}
|
51 |
-
|
52 |
-
.gadwp-desc {
|
53 |
-
font-size: 1em;
|
54 |
-
}
|
55 |
-
|
56 |
-
.gadwp-top {
|
57 |
-
vertical-align: top;
|
58 |
-
}
|
59 |
-
|
60 |
-
pre.gadwp-settings-logdata {
|
61 |
-
white-space: pre-wrap; /* Since CSS 2.1 */
|
62 |
-
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
63 |
-
white-space: -pre-wrap; /* Opera 4-6 */
|
64 |
-
white-space: -o-pre-wrap; /* Opera 7 */
|
65 |
-
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
66 |
-
}
|
67 |
-
|
68 |
-
pre.gadwp-settings-logdata span{
|
69 |
-
color: #b30000;
|
70 |
-
font-weight: 800;
|
71 |
-
}
|
72 |
-
|
73 |
-
table.gadwp-settings-logdata {
|
74 |
-
table-layout:fixed;
|
75 |
-
width: 100%;
|
76 |
-
}
|
77 |
-
|
78 |
-
|
79 |
-
td.gadwp-settings-roles {
|
80 |
-
padding-bottom: 15px;
|
81 |
-
}
|
82 |
-
|
83 |
-
#ga_speed_samplerate, #ga_user_samplerate, #ga_realtime_pages {
|
84 |
-
width: 50px;
|
85 |
-
}
|
86 |
-
|
87 |
-
#gapi-access-code {
|
88 |
-
color: red !important;
|
89 |
-
}
|
90 |
-
|
91 |
-
#poststuff.gadwp h2 {
|
92 |
-
padding-bottom: 0;
|
93 |
-
font-size: 19.5px;
|
94 |
-
font-weight: normal;
|
95 |
-
padding: 0;
|
96 |
-
margin: 20px 0 15px 0;
|
97 |
-
}
|
98 |
-
|
99 |
-
#poststuff.gadwp h2.nav-tab-wrapper {
|
100 |
-
border-bottom: 1px solid #ccc;
|
101 |
-
padding-bottom: 0;
|
102 |
-
}
|
103 |
-
|
104 |
-
/* Options pages ON/OFF Switch */
|
105 |
-
.button-primary.gadwp-settings-switchoo {
|
106 |
-
position: relative;
|
107 |
-
width: 50px;
|
108 |
-
float: left;
|
109 |
-
border: none;
|
110 |
-
padding: 0;
|
111 |
-
height: 22px;
|
112 |
-
-moz-box-shadow: none;
|
113 |
-
-webkit-box-shadow: none;
|
114 |
-
-o-box-shadow: none;
|
115 |
-
box-shadow: none;
|
116 |
-
-webkit-user-select: none;
|
117 |
-
-moz-user-select: none;
|
118 |
-
-ms-user-select: none;
|
119 |
-
}
|
120 |
-
|
121 |
-
input.gadwp-settings-switchoo-checkbox {
|
122 |
-
display: none;
|
123 |
-
}
|
124 |
-
|
125 |
-
.gadwp-settings-switchoo-label {
|
126 |
-
display: block;
|
127 |
-
overflow: hidden;
|
128 |
-
cursor: pointer;
|
129 |
-
background: transparent;
|
130 |
-
border: 1px solid #ddd;
|
131 |
-
border-radius: 2px;
|
132 |
-
text-shadow: none;
|
133 |
-
}
|
134 |
-
|
135 |
-
.gadwp-settings-switchoo-inner {
|
136 |
-
width: 200%;
|
137 |
-
margin-left: -100%;
|
138 |
-
border-radius: 2px;
|
139 |
-
-moz-transition: margin 0.2s ease-in 0s;
|
140 |
-
-webkit-transition: margin 0.2s ease-in 0s;
|
141 |
-
-o-transition: margin 0.2s ease-in 0s;
|
142 |
-
transition: margin 0.2s ease-in 0s;
|
143 |
-
}
|
144 |
-
|
145 |
-
.gadwp-settings-switchoo-inner:before, .gadwp-settings-switchoo-inner:after {
|
146 |
-
float: left;
|
147 |
-
width: 50%;
|
148 |
-
font-weight: normal;
|
149 |
-
-moz-box-sizing: border-box;
|
150 |
-
-webkit-box-sizing: border-box;
|
151 |
-
-o-box-sizing: border-box;
|
152 |
-
box-sizing: border-box;
|
153 |
-
height: 22px;
|
154 |
-
line-height: 22px;
|
155 |
-
font-size: 12px;
|
156 |
-
text-shadow: none;
|
157 |
-
}
|
158 |
-
|
159 |
-
.gadwp-settings-switchoo-inner:before {
|
160 |
-
content: "On";
|
161 |
-
padding-left: 5px;
|
162 |
-
border-bottom: none;
|
163 |
-
/* background-color: #00a0d2;
|
164 |
-
color: #fff; /* inherit from button props */
|
165 |
-
}
|
166 |
-
|
167 |
-
.gadwp-settings-switchoo-inner:after {
|
168 |
-
content: "Off";
|
169 |
-
padding-right: 5px;
|
170 |
-
background-color: #ddd;
|
171 |
-
text-align: right;
|
172 |
-
}
|
173 |
-
|
174 |
-
.gadwp-settings-switchoo-switch {
|
175 |
-
width: 22px;
|
176 |
-
height: 22px;
|
177 |
-
background: #fff;
|
178 |
-
color: #ddd;
|
179 |
-
border: 1px solid #ddd;
|
180 |
-
border-radius: 2px;
|
181 |
-
position: absolute;
|
182 |
-
top: 0;
|
183 |
-
bottom: 0;
|
184 |
-
right: 27px;
|
185 |
-
-moz-transition: all 0.2s ease-in 0s;
|
186 |
-
-webkit-transition: all 0.2s ease-in 0s;
|
187 |
-
-o-transition: all 0.2s ease-in 0s;
|
188 |
-
transition: all 0.2s ease-in 0s;
|
189 |
-
}
|
190 |
-
|
191 |
-
.gadwp-settings-switchoo-switch:hover {
|
192 |
-
color: #aaa;
|
193 |
-
border-color: #aaa;
|
194 |
-
}
|
195 |
-
|
196 |
-
.gadwp-settings-switchoo-switch:after {
|
197 |
-
margin: 0;
|
198 |
-
outline: 0;
|
199 |
-
display: inline-block;
|
200 |
-
font: 400 16px/16px dashicons;
|
201 |
-
content: "\f228";
|
202 |
-
padding: 3px 0 0 3px;
|
203 |
-
text-align: left;
|
204 |
-
text-decoration: none;
|
205 |
-
-webkit-font-smoothing: antialiased;
|
206 |
-
-moz-osx-font-smoothing: grayscale;
|
207 |
-
}
|
208 |
-
|
209 |
-
.gadwp-settings-switchoo-checkbox:checked+.gadwp-settings-switchoo-label .gadwp-settings-switchoo-inner {
|
210 |
-
margin-left: 0;
|
211 |
-
}
|
212 |
-
|
213 |
-
.gadwp-settings-switchoo-checkbox:checked+.gadwp-settings-switchoo-label .gadwp-settings-switchoo-switch {
|
214 |
-
right: 0px;
|
215 |
-
}
|
216 |
-
|
217 |
-
.switch-desc {
|
218 |
-
float: left;
|
219 |
-
margin-left: 10px;
|
220 |
-
line-height: 20px;
|
221 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/css/item-reports.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.column-gadwp_stats{width:70px}.gadwp-icon{color:#555}.gadwp-icon:hover{color:#2ea2cc}.gadwp-icon-oldwp{padding-top:5px}[id^=gadwp-container-]{width:480px}[id^=gadwp-areachart-]{height:280px}[id^=gadwp-progressbar-]{width:100%;height:3px;margin:5px 0 0 0}[id^=gadwp-bottomstats-]{width:100%}[id^=gadwp-bottomstats-] .inside{display:table;margin:0 auto;padding:0}[id^=gadwp-bottomstats-] .inside .small-box{width:31.2%;float:left;margin:10px 5px 10px 5px;background:#fff;text-align:center;-moz-box-shadow:0 0 7px 0 #BBB;-webkit-box-shadow:0 0 7px 0 #BBB;box-shadow:0 0 7px 0 #BBB}[id^=gadwp-bottomstats-] .inside .small-box h3{font-size:1em;font-weight:normal;color:#777;padding:0 5px 0 5px;margin:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}[id^=gadwp-bottomstats-] .inside .small-box p{font-size:1.2em;margin:0 0 2px 0;color:black}.gadwp-floatwraper{display:table;width:100%;height:100%}[id^=gadwp-piechart-].halfsize{width:47%;margin:10px 0 0 0;height:200px;float:left}[id^=gadwp-piechart-].floatleft{float:left}[id^=gadwp-piechart-].floatright{float:right}[id^=gadwp-tablechart-],[id^=gadwp-tablechart-]{margin:10px 0 0 0}.gadwp .ui-dialog-titlebar{font-size:1.1em;text-overflow:ellipsis;overflow:hidden}@media screen and (max-width:500px){[id^=gadwp-container-]{width:410px}[id^=gadwp-bottomstats-] .inside .small-box{width:30.8%}}@media screen and (max-width:410px){[id^=gadwp-container-]{width:260px}[id^=gadwp-bottomstats-] .inside .small-box{width:46%}}
|
|
admin/images/clicky.png
DELETED
Binary file
|
admin/images/gadwp-icon.png
DELETED
Binary file
|
admin/images/google-analytics-dashboard.png
DELETED
Binary file
|
admin/images/help.png
DELETED
Binary file
|
admin/images/mcdn.png
DELETED
Binary file
|
admin/images/optinmonster.png
DELETED
Binary file
|
admin/images/ssl.png
DELETED
Binary file
|
admin/images/star.png
DELETED
Binary file
|
admin/images/wp.png
DELETED
Binary file
|
admin/images/wpforms.png
DELETED
Binary file
|
admin/item-reports.php
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Backend_Item_Reports' ) ) {
|
15 |
-
|
16 |
-
final class GADWP_Backend_Item_Reports {
|
17 |
-
|
18 |
-
private $gadwp;
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
$this->gadwp = GADWP();
|
22 |
-
|
23 |
-
if ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_back'] ) && 1 == $this->gadwp->config->options['backend_item_reports'] ) {
|
24 |
-
// Add custom column in Posts List
|
25 |
-
add_filter( 'manage_posts_columns', array( $this, 'add_columns' ) );
|
26 |
-
|
27 |
-
// Populate custom column in Posts List
|
28 |
-
add_action( 'manage_posts_custom_column', array( $this, 'add_icons' ), 10, 2 );
|
29 |
-
|
30 |
-
// Add custom column in Pages List
|
31 |
-
add_filter( 'manage_pages_columns', array( $this, 'add_columns' ) );
|
32 |
-
|
33 |
-
// Populate custom column in Pages List
|
34 |
-
add_action( 'manage_pages_custom_column', array( $this, 'add_icons' ), 10, 2 );
|
35 |
-
}
|
36 |
-
}
|
37 |
-
|
38 |
-
public function add_icons( $column, $id ) {
|
39 |
-
global $wp_version;
|
40 |
-
|
41 |
-
if ( 'gadwp_stats' != $column ) {
|
42 |
-
return;
|
43 |
-
}
|
44 |
-
|
45 |
-
if ( version_compare( $wp_version, '3.8.0', '>=' ) ) {
|
46 |
-
echo '<a id="gadwp-' . $id . '" title="' . get_the_title( $id ) . '" href="#' . $id . '" class="gadwp-icon dashicons-before dashicons-chart-area"> </a>';
|
47 |
-
} else {
|
48 |
-
echo '<a id="gadwp-' . $id . '" title="' . get_the_title( $id ) . '" href="#' . $id . '"><img class="gadwp-icon-oldwp" src="' . GADWP_URL . 'admin/images/gadwp-icon.png"</a>';
|
49 |
-
}
|
50 |
-
}
|
51 |
-
|
52 |
-
public function add_columns( $columns ) {
|
53 |
-
return array_merge( $columns, array( 'gadwp_stats' => __( 'Analytics', 'google-analytics-dashboard-for-wp' ) ) );
|
54 |
-
}
|
55 |
-
}
|
56 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/js/settings.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(){if(window.location.href.indexOf("page=gadwp_")!=-1){var a="basic";if(window.location.hash){a=window.location.hash.split("#")[2].split("-")[1]}else{if(window.location.href.indexOf("page=gadwp_errors_debugging")!=-1){a="errors"}}jQuery(".nav-tab-wrapper a").each(function(b){jQuery(this).removeClass("nav-tab-active");jQuery("#"+this.hash.split("#")[2]).hide()});jQuery("#tab-"+a).addClass("nav-tab-active");jQuery("#gadwp-"+a).show()}jQuery('a[href^="#"]').click(function(b){if(window.location.href.indexOf("page=gadwp_")!=-1){jQuery(".nav-tab-wrapper a").each(function(c){jQuery(this).removeClass("nav-tab-active");jQuery("#"+this.hash.split("#")[2]).hide()});jQuery(this).addClass("nav-tab-active");jQuery("#"+this.hash.split("#")[2]).show()}})});
|
|
admin/js/ui.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
"use strict";jQuery(document).ready(function(){var a={action:"gadwp_dismiss_notices",gadwp_security_dismiss_notices:gadwp_ui_data.security};jQuery("#gadwp-notice .notice-dismiss").click(function(){jQuery.post(gadwp_ui_data.ajaxurl,a)});if(gadwp_ui_data.ed_bubble!=""){jQuery('#toplevel_page_gadwp_settings li > a[href*="page=gadwp_errors_debugging"]').append(' <span class="awaiting-mod count-1"><span class="pending-count" style="padding:0 7px;">'+gadwp_ui_data.ed_bubble+"</span></span>")}});
|
|
admin/js/wp-color-picker-script.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(){jQuery(".theme_color").wpColorPicker()});
|
|
admin/settings.php
DELETED
@@ -1,2005 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
-
exit();
|
13 |
-
}
|
14 |
-
|
15 |
-
final class GADWP_Settings {
|
16 |
-
|
17 |
-
private static function update_options( $who ) {
|
18 |
-
$gadwp = GADWP();
|
19 |
-
$network_settings = false;
|
20 |
-
$options = $gadwp->config->options; // Get current options
|
21 |
-
if ( isset( $_POST['options']['gadwp_hidden'] ) && isset( $_POST['options'] ) && ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) && 'Reset' != $who ) {
|
22 |
-
$new_options = $_POST['options'];
|
23 |
-
if ( 'tracking' == $who ) {
|
24 |
-
$options['ga_anonymize_ip'] = 0;
|
25 |
-
$options['ga_optout'] = 0;
|
26 |
-
$options['ga_dnt_optout'] = 0;
|
27 |
-
$options['ga_event_tracking'] = 0;
|
28 |
-
$options['ga_enhanced_links'] = 0;
|
29 |
-
$options['ga_event_precision'] = 0;
|
30 |
-
$options['ga_remarketing'] = 0;
|
31 |
-
$options['ga_event_bouncerate'] = 0;
|
32 |
-
$options['ga_crossdomain_tracking'] = 0;
|
33 |
-
$options['ga_aff_tracking'] = 0;
|
34 |
-
$options['ga_hash_tracking'] = 0;
|
35 |
-
$options['ga_formsubmit_tracking'] = 0;
|
36 |
-
$options['ga_force_ssl'] = 0;
|
37 |
-
$options['ga_pagescrolldepth_tracking'] = 0;
|
38 |
-
$options['tm_pagescrolldepth_tracking'] = 0;
|
39 |
-
$options['tm_optout'] = 0;
|
40 |
-
$options['tm_dnt_optout'] = 0;
|
41 |
-
$options['amp_tracking_analytics'] = 0;
|
42 |
-
$options['amp_tracking_clientidapi'] = 0;
|
43 |
-
$options['amp_tracking_tagmanager'] = 0;
|
44 |
-
$options['optimize_pagehiding'] = 0;
|
45 |
-
$options['optimize_tracking'] = 0;
|
46 |
-
$options['trackingcode_infooter'] = 0;
|
47 |
-
$options['trackingevents_infooter'] = 0;
|
48 |
-
$options['ga_with_gtag'] = 0;
|
49 |
-
if ( isset( $_POST['options']['ga_tracking_code'] ) ) {
|
50 |
-
$new_options['ga_tracking_code'] = trim( $new_options['ga_tracking_code'], "\t" );
|
51 |
-
}
|
52 |
-
if ( empty( $new_options['track_exclude'] ) ) {
|
53 |
-
$new_options['track_exclude'] = array();
|
54 |
-
}
|
55 |
-
} elseif ( 'backend' == $who ) {
|
56 |
-
$options['switch_profile'] = 0;
|
57 |
-
$options['backend_item_reports'] = 0;
|
58 |
-
$options['dashboard_widget'] = 0;
|
59 |
-
$options['backend_realtime_report'] = 0;
|
60 |
-
if ( empty( $new_options['access_back'] ) ) {
|
61 |
-
$new_options['access_back'][] = 'administrator';
|
62 |
-
}
|
63 |
-
if ( ! is_multisite() ) {
|
64 |
-
$options['hide_am_notices'] = 0;
|
65 |
-
}
|
66 |
-
} elseif ( 'frontend' == $who ) {
|
67 |
-
$options['frontend_item_reports'] = 0;
|
68 |
-
if ( empty( $new_options['access_front'] ) ) {
|
69 |
-
$new_options['access_front'][] = 'administrator';
|
70 |
-
}
|
71 |
-
} elseif ( 'general' == $who ) {
|
72 |
-
$options['user_api'] = 0;
|
73 |
-
$options['usage_tracking'] = 0;
|
74 |
-
if ( ! is_multisite() ) {
|
75 |
-
$options['automatic_updates_minorversion'] = 0;
|
76 |
-
}
|
77 |
-
} elseif ( 'network' == $who ) {
|
78 |
-
$options['user_api'] = 0;
|
79 |
-
$options['network_mode'] = 0;
|
80 |
-
$options['superadmin_tracking'] = 0;
|
81 |
-
$options['automatic_updates_minorversion'] = 0;
|
82 |
-
$network_settings = true;
|
83 |
-
$options['network_hide_am_notices'] = 0;
|
84 |
-
}
|
85 |
-
if ( ! $network_settings && 'general' == $who ) {
|
86 |
-
$usage_tracking = isset( $_POST['usage_tracking'] ) ? (int) $_POST['usage_tracking'] : 0;
|
87 |
-
do_action( 'exactmetrics_settings_usage_tracking', $usage_tracking );
|
88 |
-
}
|
89 |
-
|
90 |
-
$options = array_merge( $options, $new_options );
|
91 |
-
$gadwp->config->options = $options;
|
92 |
-
$gadwp->config->set_plugin_options( $network_settings );
|
93 |
-
}
|
94 |
-
return $options;
|
95 |
-
}
|
96 |
-
|
97 |
-
private static function navigation_tabs( $tabs ) {
|
98 |
-
echo '<h2 class="nav-tab-wrapper">';
|
99 |
-
foreach ( $tabs as $tab => $name ) {
|
100 |
-
echo "<a class='nav-tab' id='tab-$tab' href='#top#gadwp-$tab'>$name</a>";
|
101 |
-
}
|
102 |
-
echo '</h2>';
|
103 |
-
}
|
104 |
-
|
105 |
-
public static function frontend_settings() {
|
106 |
-
$gadwp = GADWP();
|
107 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
108 |
-
return;
|
109 |
-
}
|
110 |
-
$options = self::update_options( 'frontend' );
|
111 |
-
if ( isset( $_POST['options']['gadwp_hidden'] ) ) {
|
112 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Settings saved.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
113 |
-
if ( ! ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) ) {
|
114 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
115 |
-
}
|
116 |
-
}
|
117 |
-
if ( ! $gadwp->config->options['tableid_jail'] || ! $gadwp->config->options['token'] ) {
|
118 |
-
$message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
|
119 |
-
}
|
120 |
-
?>
|
121 |
-
<form name="gadwp_form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
|
122 |
-
<div class="wrap">
|
123 |
-
<?php echo "<h2>" . __( "Google Analytics Frontend Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?><hr>
|
124 |
-
</div>
|
125 |
-
<div id="poststuff" class="gadwp">
|
126 |
-
<div id="post-body" class="metabox-holder columns-2">
|
127 |
-
<div id="post-body-content">
|
128 |
-
<div class="settings-wrapper">
|
129 |
-
<div class="inside">
|
130 |
-
<?php if (isset($message)) echo $message; ?>
|
131 |
-
<table class="gadwp-settings-options">
|
132 |
-
<tr>
|
133 |
-
<td colspan="2"><?php echo "<h2>" . __( "Permissions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
134 |
-
</tr>
|
135 |
-
<tr>
|
136 |
-
<td class="roles gadwp-settings-title">
|
137 |
-
<label for="access_front"><?php _e("Show stats to:", 'google-analytics-dashboard-for-wp' ); ?>
|
138 |
-
</label>
|
139 |
-
</td>
|
140 |
-
<td class="gadwp-settings-roles">
|
141 |
-
<table>
|
142 |
-
<tr>
|
143 |
-
<?php if ( ! isset( $wp_roles ) ) : ?>
|
144 |
-
<?php $wp_roles = new WP_Roles(); ?>
|
145 |
-
<?php endif; ?>
|
146 |
-
<?php $i = 0; ?>
|
147 |
-
<?php foreach ( $wp_roles->role_names as $role => $name ) : ?>
|
148 |
-
<?php if ( 'subscriber' != $role ) : ?>
|
149 |
-
<?php $i++; ?>
|
150 |
-
<td>
|
151 |
-
<label>
|
152 |
-
<input type="checkbox" name="options[access_front][]" value="<?php echo $role; ?>" <?php if ( in_array($role,$options['access_front']) || 'administrator' == $role ) echo 'checked="checked"'; if ( 'administrator' == $role ) echo 'disabled="disabled"';?> /><?php echo $name; ?>
|
153 |
-
</label>
|
154 |
-
</td>
|
155 |
-
<?php endif; ?>
|
156 |
-
<?php if ( 0 == $i % 4 ) : ?>
|
157 |
-
</tr>
|
158 |
-
<tr>
|
159 |
-
<?php endif; ?>
|
160 |
-
<?php endforeach; ?>
|
161 |
-
</table>
|
162 |
-
</td>
|
163 |
-
</tr>
|
164 |
-
<tr>
|
165 |
-
<td colspan="2" class="gadwp-settings-title">
|
166 |
-
<div class="button-primary gadwp-settings-switchoo">
|
167 |
-
<input type="checkbox" name="options[frontend_item_reports]" value="1" class="gadwp-settings-switchoo-checkbox" id="frontend_item_reports" <?php checked( $options['frontend_item_reports'], 1 ); ?>>
|
168 |
-
<label class="gadwp-settings-switchoo-label" for="frontend_item_reports">
|
169 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
170 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
171 |
-
</label>
|
172 |
-
</div>
|
173 |
-
<div class="switch-desc"><?php echo " ".__("enable web page reports on frontend", 'google-analytics-dashboard-for-wp' );?></div>
|
174 |
-
</td>
|
175 |
-
</tr>
|
176 |
-
<tr>
|
177 |
-
<td colspan="2">
|
178 |
-
<hr>
|
179 |
-
</td>
|
180 |
-
</tr>
|
181 |
-
<tr>
|
182 |
-
<td colspan="2" class="submit">
|
183 |
-
<input type="submit" name="Submit" class="button button-primary" value="<?php _e('Save Changes', 'google-analytics-dashboard-for-wp' ) ?>" />
|
184 |
-
</td>
|
185 |
-
</tr>
|
186 |
-
</table>
|
187 |
-
<input type="hidden" name="options[gadwp_hidden]" value="Y">
|
188 |
-
<?php wp_nonce_field('gadwp_form','gadwp_security');?>
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
</form>
|
196 |
-
<?php
|
197 |
-
self::output_sidebar();
|
198 |
-
}
|
199 |
-
|
200 |
-
public static function backend_settings() {
|
201 |
-
$gadwp = GADWP();
|
202 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
203 |
-
return;
|
204 |
-
}
|
205 |
-
$options = self::update_options( 'backend' );
|
206 |
-
if ( isset( $_POST['options']['gadwp_hidden'] ) ) {
|
207 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Settings saved.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
208 |
-
if ( ! ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) ) {
|
209 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
210 |
-
}
|
211 |
-
}
|
212 |
-
if ( ! $gadwp->config->options['tableid_jail'] || ! $gadwp->config->options['token'] ) {
|
213 |
-
$message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
|
214 |
-
}
|
215 |
-
?>
|
216 |
-
<form name="gadwp_form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
|
217 |
-
<div class="wrap">
|
218 |
-
<?php echo "<h2>" . __( "Google Analytics Backend Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?><hr>
|
219 |
-
</div>
|
220 |
-
<div id="poststuff" class="gadwp">
|
221 |
-
<div id="post-body" class="metabox-holder columns-2">
|
222 |
-
<div id="post-body-content">
|
223 |
-
<div class="settings-wrapper">
|
224 |
-
<div class="inside">
|
225 |
-
<?php if (isset($message)) echo $message; ?>
|
226 |
-
<table class="gadwp-settings-options">
|
227 |
-
<tr>
|
228 |
-
<td colspan="2"><?php echo "<h2>" . __( "Permissions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
229 |
-
</tr>
|
230 |
-
<tr>
|
231 |
-
<td class="roles gadwp-settings-title">
|
232 |
-
<label for="access_back"><?php _e("Show stats to:", 'google-analytics-dashboard-for-wp' ); ?>
|
233 |
-
</label>
|
234 |
-
</td>
|
235 |
-
<td class="gadwp-settings-roles">
|
236 |
-
<table>
|
237 |
-
<tr>
|
238 |
-
<?php if ( ! isset( $wp_roles ) ) : ?>
|
239 |
-
<?php $wp_roles = new WP_Roles(); ?>
|
240 |
-
<?php endif; ?>
|
241 |
-
<?php $i = 0; ?>
|
242 |
-
<?php foreach ( $wp_roles->role_names as $role => $name ) : ?>
|
243 |
-
<?php if ( 'subscriber' != $role ) : ?>
|
244 |
-
<?php $i++; ?>
|
245 |
-
<td>
|
246 |
-
<label>
|
247 |
-
<input type="checkbox" name="options[access_back][]" value="<?php echo $role; ?>" <?php if ( in_array($role,$options['access_back']) || 'administrator' == $role ) echo 'checked="checked"'; if ( 'administrator' == $role ) echo 'disabled="disabled"';?> /> <?php echo $name; ?>
|
248 |
-
</label>
|
249 |
-
</td>
|
250 |
-
<?php endif; ?>
|
251 |
-
<?php if ( 0 == $i % 4 ) : ?>
|
252 |
-
</tr>
|
253 |
-
<tr>
|
254 |
-
<?php endif; ?>
|
255 |
-
<?php endforeach; ?>
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
</table>
|
263 |
-
</td>
|
264 |
-
</tr>
|
265 |
-
<tr>
|
266 |
-
<td colspan="2" class="gadwp-settings-title">
|
267 |
-
<div class="button-primary gadwp-settings-switchoo">
|
268 |
-
<input type="checkbox" name="options[switch_profile]" value="1" class="gadwp-settings-switchoo-checkbox" id="switch_profile" <?php checked( $options['switch_profile'], 1 ); ?>>
|
269 |
-
<label class="gadwp-settings-switchoo-label" for="switch_profile">
|
270 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
271 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
272 |
-
</label>
|
273 |
-
</div>
|
274 |
-
<div class="switch-desc"><?php _e ( "enable Switch View functionality", 'google-analytics-dashboard-for-wp' );?></div>
|
275 |
-
</td>
|
276 |
-
</tr>
|
277 |
-
<tr>
|
278 |
-
<td colspan="2" class="gadwp-settings-title">
|
279 |
-
<div class="button-primary gadwp-settings-switchoo">
|
280 |
-
<input type="checkbox" name="options[backend_item_reports]" value="1" class="gadwp-settings-switchoo-checkbox" id="backend_item_reports" <?php checked( $options['backend_item_reports'], 1 ); ?>>
|
281 |
-
<label class="gadwp-settings-switchoo-label" for="backend_item_reports">
|
282 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
283 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
284 |
-
</label>
|
285 |
-
</div>
|
286 |
-
<div class="switch-desc"><?php _e ( "enable reports on Posts List and Pages List", 'google-analytics-dashboard-for-wp' );?></div>
|
287 |
-
</td>
|
288 |
-
</tr>
|
289 |
-
<tr>
|
290 |
-
<td colspan="2" class="gadwp-settings-title">
|
291 |
-
<div class="button-primary gadwp-settings-switchoo">
|
292 |
-
<input type="checkbox" name="options[dashboard_widget]" value="1" class="gadwp-settings-switchoo-checkbox" id="dashboard_widget" <?php checked( $options['dashboard_widget'], 1 ); ?>>
|
293 |
-
<label class="gadwp-settings-switchoo-label" for="dashboard_widget">
|
294 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
295 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
296 |
-
</label>
|
297 |
-
</div>
|
298 |
-
<div class="switch-desc"><?php _e ( "enable the main Dashboard Widget", 'google-analytics-dashboard-for-wp' );?></div>
|
299 |
-
</td>
|
300 |
-
</tr>
|
301 |
-
<tr>
|
302 |
-
<td colspan="2">
|
303 |
-
<hr><?php echo "<h2>" . __( "Real-Time Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
304 |
-
</tr>
|
305 |
-
<?php if ( $options['user_api'] ) : ?>
|
306 |
-
<tr>
|
307 |
-
<td colspan="2" class="gadwp-settings-title">
|
308 |
-
<div class="button-primary gadwp-settings-switchoo">
|
309 |
-
<input type="checkbox" name="options[backend_realtime_report]" value="1" class="gadwp-settings-switchoo-checkbox" id="backend_realtime_report" <?php checked( $options['backend_realtime_report'], 1 ); ?>>
|
310 |
-
<label class="gadwp-settings-switchoo-label" for="backend_realtime_report">
|
311 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
312 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
313 |
-
</label>
|
314 |
-
</div>
|
315 |
-
<div class="switch-desc"><?php _e ( "enable Real-Time report (requires access to Real-Time Reporting API)", 'google-analytics-dashboard-for-wp' );?></div>
|
316 |
-
</td>
|
317 |
-
</tr>
|
318 |
-
<?php endif; ?>
|
319 |
-
<tr>
|
320 |
-
<td colspan="2" class="gadwp-settings-title"> <?php _e("Maximum number of pages to display on real-time tab:", 'google-analytics-dashboard-for-wp'); ?>
|
321 |
-
<input type="number" name="options[ga_realtime_pages]" id="ga_realtime_pages" value="<?php echo (int)$options['ga_realtime_pages']; ?>" size="3">
|
322 |
-
</td>
|
323 |
-
</tr>
|
324 |
-
<tr>
|
325 |
-
<td colspan="2">
|
326 |
-
<hr><?php echo "<h2>" . __( "Location Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
327 |
-
</tr>
|
328 |
-
<tr>
|
329 |
-
<td colspan="2" class="gadwp-settings-title">
|
330 |
-
<?php echo __("Target Geo Map to country:", 'google-analytics-dashboard-for-wp'); ?>
|
331 |
-
<input type="text" style="text-align: center;" name="options[ga_target_geomap]" value="<?php echo esc_attr($options['ga_target_geomap']); ?>" size="3">
|
332 |
-
</td>
|
333 |
-
</tr>
|
334 |
-
<tr>
|
335 |
-
<td colspan="2" class="gadwp-settings-title">
|
336 |
-
<?php echo __("Maps API Key:", 'google-analytics-dashboard-for-wp'); ?>
|
337 |
-
<input type="text" style="text-align: center;" name="options[maps_api_key]" value="<?php echo esc_attr($options['maps_api_key']); ?>" size="50">
|
338 |
-
</td>
|
339 |
-
</tr>
|
340 |
-
<tr>
|
341 |
-
<td colspan="2">
|
342 |
-
<hr><?php echo "<h2>" . __( "404 Errors Report", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
343 |
-
</tr>
|
344 |
-
<tr>
|
345 |
-
<td colspan="2" class="gadwp-settings-title">
|
346 |
-
<?php echo __("404 Page Title contains:", 'google-analytics-dashboard-for-wp'); ?>
|
347 |
-
<input type="text" style="text-align: center;" name="options[pagetitle_404]" value="<?php echo esc_attr($options['pagetitle_404']); ?>" size="20">
|
348 |
-
</td>
|
349 |
-
</tr>
|
350 |
-
<tr>
|
351 |
-
<td colspan="2">
|
352 |
-
<hr>
|
353 |
-
</td>
|
354 |
-
</tr>
|
355 |
-
<?php if ( ! is_multisite()) :?>
|
356 |
-
<tr>
|
357 |
-
<td colspan="2"><?php echo "<h2>" . __( "Hide Announcements", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
358 |
-
</tr>
|
359 |
-
<tr>
|
360 |
-
<td colspan="2" class="gadwp-settings-title">
|
361 |
-
<div class="button-primary gadwp-settings-switchoo">
|
362 |
-
<input type="checkbox" name="options[hide_am_notices]" value="1" class="gadwp-settings-switchoo-checkbox" id="hide_am_notices" <?php checked( $options['hide_am_notices'], 1 ); ?>>
|
363 |
-
<label class="gadwp-settings-switchoo-label" for="hide_am_notices">
|
364 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
365 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
366 |
-
</label>
|
367 |
-
</div>
|
368 |
-
<div class="switch-desc"><?php echo esc_html__( 'Hides plugin announcements and update details. This includes critical notices we use to inform about deprecations and important required configuration changes.' ); ?></div>
|
369 |
-
</td>
|
370 |
-
</tr>
|
371 |
-
<tr>
|
372 |
-
<td colspan="2">
|
373 |
-
<hr>
|
374 |
-
</td>
|
375 |
-
</tr>
|
376 |
-
<?php endif; ?>
|
377 |
-
<tr>
|
378 |
-
<td colspan="2" class="submit">
|
379 |
-
<input type="submit" name="Submit" class="button button-primary" value="<?php _e('Save Changes', 'google-analytics-dashboard-for-wp' ) ?>" />
|
380 |
-
</td>
|
381 |
-
</tr>
|
382 |
-
</table>
|
383 |
-
<input type="hidden" name="options[gadwp_hidden]" value="Y">
|
384 |
-
<?php wp_nonce_field('gadwp_form','gadwp_security'); ?>
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
</form>
|
392 |
-
<?php
|
393 |
-
self::output_sidebar();
|
394 |
-
}
|
395 |
-
|
396 |
-
public static function tracking_settings() {
|
397 |
-
$gadwp = GADWP();
|
398 |
-
|
399 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
400 |
-
return;
|
401 |
-
}
|
402 |
-
$options = self::update_options( 'tracking' );
|
403 |
-
if ( isset( $_POST['options']['gadwp_hidden'] ) ) {
|
404 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Settings saved.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
405 |
-
if ( ! ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) ) {
|
406 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
407 |
-
}
|
408 |
-
}
|
409 |
-
if ( ! $gadwp->config->options['tableid_jail'] ) {
|
410 |
-
$message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
|
411 |
-
}
|
412 |
-
?>
|
413 |
-
<form name="gadwp_form" method="post" action="<?php esc_url($_SERVER['REQUEST_URI']); ?>">
|
414 |
-
<div class="wrap">
|
415 |
-
<?php echo "<h2>" . __( "Google Analytics Tracking Code", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
|
416 |
-
</div>
|
417 |
-
<div id="poststuff" class="gadwp">
|
418 |
-
<div id="post-body" class="metabox-holder columns-2">
|
419 |
-
<div id="post-body-content">
|
420 |
-
<div class="settings-wrapper">
|
421 |
-
<div class="inside">
|
422 |
-
<?php if ( 'universal' == $options['tracking_type'] ) :?>
|
423 |
-
<?php $tabs = array( 'basic' => __( "Basic Settings", 'google-analytics-dashboard-for-wp' ), 'events' => __( "Events Tracking", 'google-analytics-dashboard-for-wp' ), 'custom' => __( "Custom Definitions", 'google-analytics-dashboard-for-wp' ), 'exclude' => __( "Exclude Tracking", 'google-analytics-dashboard-for-wp' ), 'advanced' => __( "Advanced Settings", 'google-analytics-dashboard-for-wp' ), 'integration' => __( "Integration", 'google-analytics-dashboard-for-wp' ) );?>
|
424 |
-
<?php elseif ( 'tagmanager' == $options['tracking_type'] ) :?>
|
425 |
-
<?php $tabs = array( 'basic' => __( "Basic Settings", 'google-analytics-dashboard-for-wp' ), 'tmdatalayervars' => __( "DataLayer Variables", 'google-analytics-dashboard-for-wp' ), 'exclude' => __( "Exclude Tracking", 'google-analytics-dashboard-for-wp' ), 'tmadvanced' => __( "Advanced Settings", 'google-analytics-dashboard-for-wp' ), 'tmintegration' => __( "Integration", 'google-analytics-dashboard-for-wp' ) );?>
|
426 |
-
<?php else :?>
|
427 |
-
<?php $tabs = array( 'basic' => __( "Basic Settings", 'google-analytics-dashboard-for-wp' ) );?>
|
428 |
-
<?php endif; ?>
|
429 |
-
<?php self::navigation_tabs( $tabs ); ?>
|
430 |
-
<?php if ( isset( $message ) ) : ?>
|
431 |
-
<?php echo $message; ?>
|
432 |
-
<?php endif; ?>
|
433 |
-
<div id="gadwp-basic">
|
434 |
-
<table class="gadwp-settings-options">
|
435 |
-
<tr>
|
436 |
-
<td colspan="2"><?php echo "<h2>" . __( "Tracking Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
437 |
-
</tr>
|
438 |
-
<tr>
|
439 |
-
<td class="gadwp-settings-title">
|
440 |
-
<label for="tracking_type"><?php _e("Tracking Type:", 'google-analytics-dashboard-for-wp' ); ?>
|
441 |
-
</label>
|
442 |
-
</td>
|
443 |
-
<td>
|
444 |
-
<select id="tracking_type" name="options[tracking_type]" onchange="this.form.submit()">
|
445 |
-
<option value="universal" <?php selected( $options['tracking_type'], 'universal' ); ?>><?php _e("Analytics", 'google-analytics-dashboard-for-wp');?></option>
|
446 |
-
<option value="tagmanager" <?php selected( $options['tracking_type'], 'tagmanager' ); ?>><?php _e("Tag Manager", 'google-analytics-dashboard-for-wp');?></option>
|
447 |
-
<option value="disabled" <?php selected( $options['tracking_type'], 'disabled' ); ?>><?php _e("Disabled", 'google-analytics-dashboard-for-wp');?></option>
|
448 |
-
</select>
|
449 |
-
</td>
|
450 |
-
</tr>
|
451 |
-
<?php if ( 'universal' == $options['tracking_type'] ) : ?>
|
452 |
-
<tr>
|
453 |
-
<td class="gadwp-settings-title"></td>
|
454 |
-
<td>
|
455 |
-
<?php $profile_info = GADWP_Tools::get_selected_profile($gadwp->config->options['ga_profiles_list'], $gadwp->config->options['tableid_jail']); ?>
|
456 |
-
<?php echo '<pre>' . __("View Name:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[0]) . "<br />" . __("Tracking ID:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[2]) . "<br />" . __("Default URL:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[3]) . "<br />" . __("Time Zone:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[5]) . '</pre>';?>
|
457 |
-
</td>
|
458 |
-
</tr>
|
459 |
-
<tr>
|
460 |
-
<td colspan="2" class="gadwp-settings-title">
|
461 |
-
<div class="button-primary gadwp-settings-switchoo">
|
462 |
-
<input type="checkbox" name="options[ga_with_gtag]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_with_gtag" <?php checked( $options['ga_with_gtag'], 1 ); ?>>
|
463 |
-
<label class="gadwp-settings-switchoo-label" for="ga_with_gtag">
|
464 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
465 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
466 |
-
</label>
|
467 |
-
</div>
|
468 |
-
<div class="switch-desc"><?php echo " ".__("use global site tag gtag.js (not recommended)", 'google-analytics-dashboard-for-wp' );?></div>
|
469 |
-
</td>
|
470 |
-
</tr>
|
471 |
-
<?php elseif ( 'tagmanager' == $options['tracking_type'] ) : ?>
|
472 |
-
<tr>
|
473 |
-
<td class="gadwp-settings-title">
|
474 |
-
<label for="tracking_type"><?php _e("Web Container ID:", 'google-analytics-dashboard-for-wp' ); ?>
|
475 |
-
</label>
|
476 |
-
</td>
|
477 |
-
<td>
|
478 |
-
<input type="text" name="options[web_containerid]" value="<?php echo esc_attr($options['web_containerid']); ?>" size="15">
|
479 |
-
</td>
|
480 |
-
</tr>
|
481 |
-
<?php endif; ?>
|
482 |
-
<tr>
|
483 |
-
<td class="gadwp-settings-title">
|
484 |
-
<label for="trackingcode_infooter"><?php _e("Code Placement:", 'google-analytics-dashboard-for-wp' ); ?>
|
485 |
-
</label>
|
486 |
-
</td>
|
487 |
-
<td>
|
488 |
-
<select id="trackingcode_infooter" name="options[trackingcode_infooter]">
|
489 |
-
<option value="0" <?php selected( $options['trackingcode_infooter'], 0 ); ?>><?php _e("HTML Head", 'google-analytics-dashboard-for-wp');?></option>
|
490 |
-
<option value="1" <?php selected( $options['trackingcode_infooter'], 1 ); ?>><?php _e("HTML Body", 'google-analytics-dashboard-for-wp');?></option>
|
491 |
-
</select>
|
492 |
-
</td>
|
493 |
-
</tr>
|
494 |
-
</table>
|
495 |
-
</div>
|
496 |
-
<div id="gadwp-events">
|
497 |
-
<table class="gadwp-settings-options">
|
498 |
-
<tr>
|
499 |
-
<td colspan="2"><?php echo "<h2>" . __( "Events Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
500 |
-
</tr>
|
501 |
-
<tr>
|
502 |
-
<td colspan="2" class="gadwp-settings-title">
|
503 |
-
<div class="button-primary gadwp-settings-switchoo">
|
504 |
-
<input type="checkbox" name="options[ga_event_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_event_tracking" <?php checked( $options['ga_event_tracking'], 1 ); ?>>
|
505 |
-
<label class="gadwp-settings-switchoo-label" for="ga_event_tracking">
|
506 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
507 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
508 |
-
</label>
|
509 |
-
</div>
|
510 |
-
<div class="switch-desc"><?php echo " ".__("track downloads, mailto, telephone and outbound links", 'google-analytics-dashboard-for-wp' ); ?></div>
|
511 |
-
</td>
|
512 |
-
</tr>
|
513 |
-
<tr>
|
514 |
-
<td colspan="2" class="gadwp-settings-title">
|
515 |
-
<div class="button-primary gadwp-settings-switchoo">
|
516 |
-
<input type="checkbox" name="options[ga_aff_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_aff_tracking" <?php checked( $options['ga_aff_tracking'], 1 ); ?>>
|
517 |
-
<label class="gadwp-settings-switchoo-label" for="ga_aff_tracking">
|
518 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
519 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
520 |
-
</label>
|
521 |
-
</div>
|
522 |
-
<div class="switch-desc"><?php echo " ".__("track affiliate links", 'google-analytics-dashboard-for-wp' ); ?></div>
|
523 |
-
</td>
|
524 |
-
</tr>
|
525 |
-
<tr>
|
526 |
-
<td colspan="2" class="gadwp-settings-title">
|
527 |
-
<div class="button-primary gadwp-settings-switchoo">
|
528 |
-
<input type="checkbox" name="options[ga_hash_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_hash_tracking" <?php checked( $options['ga_hash_tracking'], 1 ); ?>>
|
529 |
-
<label class="gadwp-settings-switchoo-label" for="ga_hash_tracking">
|
530 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
531 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
532 |
-
</label>
|
533 |
-
</div>
|
534 |
-
<div class="switch-desc"><?php echo " ".__("track fragment identifiers, hashmarks (#) in URI links", 'google-analytics-dashboard-for-wp' ); ?></div>
|
535 |
-
</td>
|
536 |
-
</tr>
|
537 |
-
<tr>
|
538 |
-
<td colspan="2" class="gadwp-settings-title">
|
539 |
-
<div class="button-primary gadwp-settings-switchoo">
|
540 |
-
<input type="checkbox" name="options[ga_formsubmit_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_formsubmit_tracking" <?php checked( $options['ga_formsubmit_tracking'], 1 ); ?>>
|
541 |
-
<label class="gadwp-settings-switchoo-label" for="ga_formsubmit_tracking">
|
542 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
543 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
544 |
-
</label>
|
545 |
-
</div>
|
546 |
-
<div class="switch-desc"><?php echo " ".__("track form submit actions", 'google-analytics-dashboard-for-wp' ); ?></div>
|
547 |
-
</td>
|
548 |
-
</tr>
|
549 |
-
<tr>
|
550 |
-
<td colspan="2" class="gadwp-settings-title">
|
551 |
-
<div class="button-primary gadwp-settings-switchoo">
|
552 |
-
<input type="checkbox" name="options[ga_pagescrolldepth_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_pagescrolldepth_tracking" <?php checked( $options['ga_pagescrolldepth_tracking'], 1 ); ?>>
|
553 |
-
<label class="gadwp-settings-switchoo-label" for="ga_pagescrolldepth_tracking">
|
554 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
555 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
556 |
-
</label>
|
557 |
-
</div>
|
558 |
-
<div class="switch-desc"><?php echo " ".__("track page scrolling depth", 'google-analytics-dashboard-for-wp' ); ?></div>
|
559 |
-
</td>
|
560 |
-
</tr>
|
561 |
-
<tr>
|
562 |
-
<td class="gadwp-settings-title">
|
563 |
-
<label for="ga_event_downloads"><?php _e("Downloads Regex:", 'google-analytics-dashboard-for-wp'); ?>
|
564 |
-
</label>
|
565 |
-
</td>
|
566 |
-
<td>
|
567 |
-
<input type="text" id="ga_event_downloads" name="options[ga_event_downloads]" value="<?php echo esc_attr($options['ga_event_downloads']); ?>" size="50">
|
568 |
-
</td>
|
569 |
-
</tr>
|
570 |
-
<tr>
|
571 |
-
<td class="gadwp-settings-title">
|
572 |
-
<label for="ga_event_affiliates"><?php _e("Affiliates Regex:", 'google-analytics-dashboard-for-wp'); ?>
|
573 |
-
</label>
|
574 |
-
</td>
|
575 |
-
<td>
|
576 |
-
<input type="text" id="ga_event_affiliates" name="options[ga_event_affiliates]" value="<?php echo esc_attr($options['ga_event_affiliates']); ?>" size="50">
|
577 |
-
</td>
|
578 |
-
</tr>
|
579 |
-
<tr>
|
580 |
-
<td class="gadwp-settings-title">
|
581 |
-
<label for="trackingevents_infooter"><?php _e("Code Placement:", 'google-analytics-dashboard-for-wp' ); ?>
|
582 |
-
</label>
|
583 |
-
</td>
|
584 |
-
<td>
|
585 |
-
<select id="trackingevents_infooter" name="options[trackingevents_infooter]">
|
586 |
-
<option value="0" <?php selected( $options['trackingevents_infooter'], 0 ); ?>><?php _e("HTML Head", 'google-analytics-dashboard-for-wp');?></option>
|
587 |
-
<option value="1" <?php selected( $options['trackingevents_infooter'], 1 ); ?>><?php _e("HTML Body", 'google-analytics-dashboard-for-wp');?></option>
|
588 |
-
</select>
|
589 |
-
</td>
|
590 |
-
</tr>
|
591 |
-
</table>
|
592 |
-
</div>
|
593 |
-
<div id="gadwp-custom">
|
594 |
-
<table class="gadwp-settings-options">
|
595 |
-
<tr>
|
596 |
-
<td colspan="2"><?php echo "<h2>" . __( "Custom Dimensions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
597 |
-
</tr>
|
598 |
-
<tr>
|
599 |
-
<td class="gadwp-settings-title">
|
600 |
-
<label for="ga_author_dimindex"><?php _e("Authors:", 'google-analytics-dashboard-for-wp' ); ?>
|
601 |
-
</label>
|
602 |
-
</td>
|
603 |
-
<td>
|
604 |
-
<select id="ga_author_dimindex" name="options[ga_author_dimindex]">
|
605 |
-
<?php for ($i=0;$i<21;$i++) : ?>
|
606 |
-
<option value="<?php echo $i;?>" <?php selected( $options['ga_author_dimindex'], $i ); ?>><?php echo 0 == $i ?'Disabled':'dimension '.$i; ?></option>
|
607 |
-
<?php endfor; ?>
|
608 |
-
</select>
|
609 |
-
</td>
|
610 |
-
</tr>
|
611 |
-
<tr>
|
612 |
-
<td class="gadwp-settings-title">
|
613 |
-
<label for="ga_pubyear_dimindex"><?php _e("Publication Year:", 'google-analytics-dashboard-for-wp' ); ?>
|
614 |
-
</label>
|
615 |
-
</td>
|
616 |
-
<td>
|
617 |
-
<select id="ga_pubyear_dimindex" name="options[ga_pubyear_dimindex]">
|
618 |
-
<?php for ($i=0;$i<21;$i++) : ?>
|
619 |
-
<option value="<?php echo $i;?>" <?php selected( $options['ga_pubyear_dimindex'], $i ); ?>><?php echo 0 == $i ?'Disabled':'dimension '.$i; ?></option>
|
620 |
-
<?php endfor; ?>
|
621 |
-
</select>
|
622 |
-
</td>
|
623 |
-
</tr>
|
624 |
-
<tr>
|
625 |
-
<td class="gadwp-settings-title">
|
626 |
-
<label for="ga_pubyearmonth_dimindex"><?php _e("Publication Month:", 'google-analytics-dashboard-for-wp' ); ?>
|
627 |
-
</label>
|
628 |
-
</td>
|
629 |
-
<td>
|
630 |
-
<select id="ga_pubyearmonth_dimindex" name="options[ga_pubyearmonth_dimindex]">
|
631 |
-
<?php for ($i=0;$i<21;$i++) : ?>
|
632 |
-
<option value="<?php echo $i;?>" <?php selected( $options['ga_pubyearmonth_dimindex'], $i ); ?>><?php echo 0 == $i ?'Disabled':'dimension '.$i; ?></option>
|
633 |
-
<?php endfor; ?>
|
634 |
-
</select>
|
635 |
-
</td>
|
636 |
-
</tr>
|
637 |
-
<tr>
|
638 |
-
<td class="gadwp-settings-title">
|
639 |
-
<label for="ga_category_dimindex"><?php _e("Categories:", 'google-analytics-dashboard-for-wp' ); ?>
|
640 |
-
</label>
|
641 |
-
</td>
|
642 |
-
<td>
|
643 |
-
<select id="ga_category_dimindex" name="options[ga_category_dimindex]">
|
644 |
-
<?php for ($i=0;$i<21;$i++) : ?>
|
645 |
-
<option value="<?php echo $i;?>" <?php selected( $options['ga_category_dimindex'], $i ); ?>><?php echo 0 == $i ? 'Disabled':'dimension '.$i; ?></option>
|
646 |
-
<?php endfor; ?>
|
647 |
-
</select>
|
648 |
-
</td>
|
649 |
-
</tr>
|
650 |
-
<tr>
|
651 |
-
<td class="gadwp-settings-title">
|
652 |
-
<label for="ga_user_dimindex"><?php _e("User Type:", 'google-analytics-dashboard-for-wp' ); ?>
|
653 |
-
</label>
|
654 |
-
</td>
|
655 |
-
<td>
|
656 |
-
<select id="ga_user_dimindex" name="options[ga_user_dimindex]">
|
657 |
-
<?php for ($i=0;$i<21;$i++) : ?>
|
658 |
-
<option value="<?php echo $i;?>" <?php selected( $options['ga_user_dimindex'], $i ); ?>><?php echo 0 == $i ? 'Disabled':'dimension '.$i; ?></option>
|
659 |
-
<?php endfor; ?>
|
660 |
-
</select>
|
661 |
-
</td>
|
662 |
-
</tr>
|
663 |
-
<tr>
|
664 |
-
<td class="gadwp-settings-title">
|
665 |
-
<label for="ga_tag_dimindex"><?php _e("Tags:", 'google-analytics-dashboard-for-wp' ); ?>
|
666 |
-
</label>
|
667 |
-
</td>
|
668 |
-
<td>
|
669 |
-
<select id="ga_tag_dimindex" name="options[ga_tag_dimindex]">
|
670 |
-
<?php for ($i=0;$i<21;$i++) : ?>
|
671 |
-
<option value="<?php echo $i;?>" <?php selected( $options['ga_tag_dimindex'], $i ); ?>><?php echo 0 == $i ? 'Disabled':'dimension '.$i; ?></option>
|
672 |
-
<?php endfor; ?>
|
673 |
-
</select>
|
674 |
-
</td>
|
675 |
-
</tr>
|
676 |
-
</table>
|
677 |
-
</div>
|
678 |
-
<div id="gadwp-tmdatalayervars">
|
679 |
-
<table class="gadwp-settings-options">
|
680 |
-
<tr>
|
681 |
-
<td colspan="2"><?php echo "<h2>" . __( "Main Variables", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
682 |
-
</tr>
|
683 |
-
<tr>
|
684 |
-
<td class="gadwp-settings-title">
|
685 |
-
<label for="tm_author_var"><?php _e("Authors:", 'google-analytics-dashboard-for-wp' ); ?>
|
686 |
-
</label>
|
687 |
-
</td>
|
688 |
-
<td>
|
689 |
-
<select id="tm_author_var" name="options[tm_author_var]">
|
690 |
-
<option value="1" <?php selected( $options['tm_author_var'], 1 ); ?>>gadwpAuthor</option>
|
691 |
-
<option value="0" <?php selected( $options['tm_author_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
|
692 |
-
</select>
|
693 |
-
</td>
|
694 |
-
</tr>
|
695 |
-
<tr>
|
696 |
-
<td class="gadwp-settings-title">
|
697 |
-
<label for="tm_pubyear_var"><?php _e("Publication Year:", 'google-analytics-dashboard-for-wp' ); ?>
|
698 |
-
</label>
|
699 |
-
</td>
|
700 |
-
<td>
|
701 |
-
<select id="tm_pubyear_var" name="options[tm_pubyear_var]">
|
702 |
-
<option value="1" <?php selected( $options['tm_pubyear_var'], 1 ); ?>>gadwpPublicationYear</option>
|
703 |
-
<option value="0" <?php selected( $options['tm_pubyear_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
|
704 |
-
</select>
|
705 |
-
</td>
|
706 |
-
</tr>
|
707 |
-
<tr>
|
708 |
-
<td class="gadwp-settings-title">
|
709 |
-
<label for="tm_pubyearmonth_var"><?php _e("Publication Month:", 'google-analytics-dashboard-for-wp' ); ?>
|
710 |
-
</label>
|
711 |
-
</td>
|
712 |
-
<td>
|
713 |
-
<select id="tm_pubyearmonth_var" name="options[tm_pubyearmonth_var]">
|
714 |
-
<option value="1" <?php selected( $options['tm_pubyearmonth_var'], 1 ); ?>>gadwpPublicationYearMonth</option>
|
715 |
-
<option value="0" <?php selected( $options['tm_pubyearmonth_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
|
716 |
-
</select>
|
717 |
-
</td>
|
718 |
-
</tr>
|
719 |
-
<tr>
|
720 |
-
<td class="gadwp-settings-title">
|
721 |
-
<label for="tm_category_var"><?php _e("Categories:", 'google-analytics-dashboard-for-wp' ); ?>
|
722 |
-
</label>
|
723 |
-
</td>
|
724 |
-
<td>
|
725 |
-
<select id="tm_category_var" name="options[tm_category_var]">
|
726 |
-
<option value="1" <?php selected( $options['tm_category_var'], 1 ); ?>>gadwpCategory</option>
|
727 |
-
<option value="0" <?php selected( $options['tm_category_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
|
728 |
-
</select>
|
729 |
-
</td>
|
730 |
-
</tr>
|
731 |
-
<tr>
|
732 |
-
<td class="gadwp-settings-title">
|
733 |
-
<label for="tm_user_var"><?php _e("User Type:", 'google-analytics-dashboard-for-wp' ); ?>
|
734 |
-
</label>
|
735 |
-
</td>
|
736 |
-
<td>
|
737 |
-
<select id="tm_user_var" name="options[tm_user_var]">
|
738 |
-
<option value="1" <?php selected( $options['tm_user_var'], 1 ); ?>>gadwpUser</option>
|
739 |
-
<option value="0" <?php selected( $options['tm_user_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
|
740 |
-
</select>
|
741 |
-
</td>
|
742 |
-
</tr>
|
743 |
-
<tr>
|
744 |
-
<td class="gadwp-settings-title">
|
745 |
-
<label for="tm_tag_var"><?php _e("Tags:", 'google-analytics-dashboard-for-wp' ); ?>
|
746 |
-
</label>
|
747 |
-
</td>
|
748 |
-
<td>
|
749 |
-
<select id="tm_tag_var" name="options[tm_tag_var]">
|
750 |
-
<option value="1" <?php selected( $options['tm_tag_var'], 1 ); ?>>gadwpTag</option>
|
751 |
-
<option value="0" <?php selected( $options['tm_tag_var'], 0 ); ?>><?php _e( "Disabled", 'google-analytics-dashboard-for-wp' ); ?></option>
|
752 |
-
</select>
|
753 |
-
</td>
|
754 |
-
</tr>
|
755 |
-
</table>
|
756 |
-
</div>
|
757 |
-
<div id="gadwp-advanced">
|
758 |
-
<table class="gadwp-settings-options">
|
759 |
-
<tr>
|
760 |
-
<td colspan="2"><?php echo "<h2>" . __( "Advanced Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
761 |
-
</tr>
|
762 |
-
<tr>
|
763 |
-
<td class="gadwp-settings-title">
|
764 |
-
<label for="ga_speed_samplerate"><?php _e("Speed Sample Rate:", 'google-analytics-dashboard-for-wp'); ?>
|
765 |
-
</label>
|
766 |
-
</td>
|
767 |
-
<td>
|
768 |
-
<input type="number" id="ga_speed_samplerate" name="options[ga_speed_samplerate]" value="<?php echo (int)($options['ga_speed_samplerate']); ?>" max="100" min="1">
|
769 |
-
%
|
770 |
-
</td>
|
771 |
-
</tr>
|
772 |
-
<tr>
|
773 |
-
<td class="gadwp-settings-title">
|
774 |
-
<label for="ga_user_samplerate"><?php _e("User Sample Rate:", 'google-analytics-dashboard-for-wp'); ?>
|
775 |
-
</label>
|
776 |
-
</td>
|
777 |
-
<td>
|
778 |
-
<input type="number" id="ga_user_samplerate" name="options[ga_user_samplerate]" value="<?php echo (int)($options['ga_user_samplerate']); ?>" max="100" min="1">
|
779 |
-
%
|
780 |
-
</td>
|
781 |
-
</tr>
|
782 |
-
<tr>
|
783 |
-
<td colspan="2" class="gadwp-settings-title">
|
784 |
-
<div class="button-primary gadwp-settings-switchoo">
|
785 |
-
<input type="checkbox" name="options[ga_anonymize_ip]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_anonymize_ip" <?php checked( $options['ga_anonymize_ip'], 1 ); ?>>
|
786 |
-
<label class="gadwp-settings-switchoo-label" for="ga_anonymize_ip">
|
787 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
788 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
789 |
-
</label>
|
790 |
-
</div>
|
791 |
-
<div class="switch-desc"><?php echo " ".__("anonymize IPs while tracking", 'google-analytics-dashboard-for-wp' );?></div>
|
792 |
-
</td>
|
793 |
-
</tr>
|
794 |
-
<tr>
|
795 |
-
<td colspan="2" class="gadwp-settings-title">
|
796 |
-
<div class="button-primary gadwp-settings-switchoo">
|
797 |
-
<input type="checkbox" name="options[ga_optout]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_optout" <?php checked( $options['ga_optout'], 1 ); ?>>
|
798 |
-
<label class="gadwp-settings-switchoo-label" for="ga_optout">
|
799 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
800 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
801 |
-
</label>
|
802 |
-
</div>
|
803 |
-
<div class="switch-desc"><?php echo " ".__("enable support for user opt-out", 'google-analytics-dashboard-for-wp' );?></div>
|
804 |
-
</td>
|
805 |
-
</tr>
|
806 |
-
<tr>
|
807 |
-
<td colspan="2" class="gadwp-settings-title">
|
808 |
-
<div class="button-primary gadwp-settings-switchoo">
|
809 |
-
<input type="checkbox" name="options[ga_dnt_optout]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_dnt_optout" <?php checked( $options['ga_dnt_optout'], 1 ); ?>>
|
810 |
-
<label class="gadwp-settings-switchoo-label" for="ga_dnt_optout">
|
811 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
812 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
813 |
-
</label>
|
814 |
-
</div>
|
815 |
-
<div class="switch-desc"> <?php _e( 'exclude tracking for users sending Do Not Track header', 'google-analytics-dashboard-for-wp' ); ?></div>
|
816 |
-
</td>
|
817 |
-
</tr>
|
818 |
-
<tr>
|
819 |
-
<td colspan="2" class="gadwp-settings-title">
|
820 |
-
<div class="button-primary gadwp-settings-switchoo">
|
821 |
-
<input type="checkbox" name="options[ga_remarketing]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_remarketing" <?php checked( $options['ga_remarketing'], 1 ); ?>>
|
822 |
-
<label class="gadwp-settings-switchoo-label" for="ga_remarketing">
|
823 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
824 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
825 |
-
</label>
|
826 |
-
</div>
|
827 |
-
<div class="switch-desc"><?php echo " ".__("enable remarketing, demographics and interests reports", 'google-analytics-dashboard-for-wp' );?></div>
|
828 |
-
</td>
|
829 |
-
</tr>
|
830 |
-
<tr>
|
831 |
-
<td colspan="2" class="gadwp-settings-title">
|
832 |
-
<div class="button-primary gadwp-settings-switchoo">
|
833 |
-
<input type="checkbox" name="options[ga_event_bouncerate]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_event_bouncerate" <?php checked( $options['ga_event_bouncerate'], 1 ); ?>>
|
834 |
-
<label class="gadwp-settings-switchoo-label" for="ga_event_bouncerate">
|
835 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
836 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
837 |
-
</label>
|
838 |
-
</div>
|
839 |
-
<div class="switch-desc"><?php echo " ".__("exclude events from bounce-rate and time on page calculation", 'google-analytics-dashboard-for-wp' );?></div>
|
840 |
-
</td>
|
841 |
-
</tr>
|
842 |
-
<tr>
|
843 |
-
<td colspan="2" class="gadwp-settings-title">
|
844 |
-
<div class="button-primary gadwp-settings-switchoo">
|
845 |
-
<input type="checkbox" name="options[ga_enhanced_links]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_enhanced_links" <?php checked( $options['ga_enhanced_links'], 1 ); ?>>
|
846 |
-
<label class="gadwp-settings-switchoo-label" for="ga_enhanced_links">
|
847 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
848 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
849 |
-
</label>
|
850 |
-
</div>
|
851 |
-
<div class="switch-desc"><?php echo " ".__("enable enhanced link attribution", 'google-analytics-dashboard-for-wp' );?></div>
|
852 |
-
</td>
|
853 |
-
</tr>
|
854 |
-
<tr>
|
855 |
-
<td colspan="2" class="gadwp-settings-title">
|
856 |
-
<div class="button-primary gadwp-settings-switchoo">
|
857 |
-
<input type="checkbox" name="options[ga_event_precision]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_event_precision" <?php checked( $options['ga_event_precision'], 1 ); ?>>
|
858 |
-
<label class="gadwp-settings-switchoo-label" for="ga_event_precision">
|
859 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
860 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
861 |
-
</label>
|
862 |
-
</div>
|
863 |
-
<div class="switch-desc"><?php echo " ".__("use hitCallback to increase event tracking accuracy", 'google-analytics-dashboard-for-wp' );?></div>
|
864 |
-
</td>
|
865 |
-
</tr>
|
866 |
-
<tr>
|
867 |
-
<td colspan="2" class="gadwp-settings-title">
|
868 |
-
<div class="button-primary gadwp-settings-switchoo">
|
869 |
-
<input type="checkbox" name="options[ga_force_ssl]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_force_ssl" <?php checked( $options['ga_force_ssl'] || $options['ga_with_gtag'], 1 ); ?> <?php disabled( $options['ga_with_gtag'], true );?>>
|
870 |
-
<label class="gadwp-settings-switchoo-label" for="ga_force_ssl">
|
871 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
872 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
873 |
-
</label>
|
874 |
-
</div>
|
875 |
-
<div class="switch-desc"><?php echo " ".__("enable Force SSL", 'google-analytics-dashboard-for-wp' );?></div>
|
876 |
-
</td>
|
877 |
-
</tr>
|
878 |
-
<tr>
|
879 |
-
<td colspan="2"><?php echo "<h2>" . __( "Cross-domain Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
880 |
-
</tr>
|
881 |
-
<tr>
|
882 |
-
<td colspan="2" class="gadwp-settings-title">
|
883 |
-
<div class="button-primary gadwp-settings-switchoo">
|
884 |
-
<input type="checkbox" name="options[ga_crossdomain_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_crossdomain_tracking" <?php checked( $options['ga_crossdomain_tracking'], 1 ); ?>>
|
885 |
-
<label class="gadwp-settings-switchoo-label" for="ga_crossdomain_tracking">
|
886 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
887 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
888 |
-
</label>
|
889 |
-
</div>
|
890 |
-
<div class="switch-desc"><?php echo " ".__("enable cross domain tracking", 'google-analytics-dashboard-for-wp' ); ?></div>
|
891 |
-
</td>
|
892 |
-
</tr>
|
893 |
-
<tr>
|
894 |
-
<td class="gadwp-settings-title">
|
895 |
-
<label for="ga_crossdomain_list"><?php _e("Cross Domains:", 'google-analytics-dashboard-for-wp'); ?>
|
896 |
-
</label>
|
897 |
-
</td>
|
898 |
-
<td>
|
899 |
-
<input type="text" id="ga_crossdomain_list" name="options[ga_crossdomain_list]" value="<?php echo esc_attr($options['ga_crossdomain_list']); ?>" size="50">
|
900 |
-
</td>
|
901 |
-
</tr>
|
902 |
-
<tr>
|
903 |
-
<td colspan="2"><?php echo "<h2>" . __( "Cookie Customization", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
904 |
-
</tr>
|
905 |
-
<tr>
|
906 |
-
<td class="gadwp-settings-title">
|
907 |
-
<label for="ga_cookiedomain"><?php _e("Cookie Domain:", 'google-analytics-dashboard-for-wp'); ?>
|
908 |
-
</label>
|
909 |
-
</td>
|
910 |
-
<td>
|
911 |
-
<input type="text" id="ga_cookiedomain" name="options[ga_cookiedomain]" value="<?php echo esc_attr($options['ga_cookiedomain']); ?>" size="50">
|
912 |
-
</td>
|
913 |
-
</tr>
|
914 |
-
<tr>
|
915 |
-
<td class="gadwp-settings-title">
|
916 |
-
<label for="ga_cookiename"><?php _e("Cookie Name:", 'google-analytics-dashboard-for-wp'); ?>
|
917 |
-
</label>
|
918 |
-
</td>
|
919 |
-
<td>
|
920 |
-
<input type="text" id="ga_cookiename" name="options[ga_cookiename]" value="<?php echo esc_attr($options['ga_cookiename']); ?>" size="50">
|
921 |
-
</td>
|
922 |
-
</tr>
|
923 |
-
<tr>
|
924 |
-
<td class="gadwp-settings-title">
|
925 |
-
<label for="ga_cookieexpires"><?php _e("Cookie Expires:", 'google-analytics-dashboard-for-wp'); ?>
|
926 |
-
</label>
|
927 |
-
</td>
|
928 |
-
<td>
|
929 |
-
<input type="text" id="ga_cookieexpires" name="options[ga_cookieexpires]" value="<?php echo esc_attr($options['ga_cookieexpires']); ?>" size="10">
|
930 |
-
<?php _e("seconds", 'google-analytics-dashboard-for-wp' ); ?>
|
931 |
-
</td>
|
932 |
-
</tr>
|
933 |
-
</table>
|
934 |
-
</div>
|
935 |
-
<div id="gadwp-integration">
|
936 |
-
<table class="gadwp-settings-options">
|
937 |
-
<tr>
|
938 |
-
<td colspan="2"><?php echo "<h2>" . __( "Accelerated Mobile Pages (AMP)", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
939 |
-
</tr>
|
940 |
-
<tr>
|
941 |
-
<td colspan="2" class="gadwp-settings-title">
|
942 |
-
<div class="button-primary gadwp-settings-switchoo">
|
943 |
-
<input type="checkbox" name="options[amp_tracking_analytics]" value="1" class="gadwp-settings-switchoo-checkbox" id="amp_tracking_analytics" <?php checked( $options['amp_tracking_analytics'], 1 ); ?>>
|
944 |
-
<label class="gadwp-settings-switchoo-label" for="amp_tracking_analytics">
|
945 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
946 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
947 |
-
</label>
|
948 |
-
</div>
|
949 |
-
<div class="switch-desc"><?php echo " ".__("enable tracking for Accelerated Mobile Pages (AMP)", 'google-analytics-dashboard-for-wp' );?></div>
|
950 |
-
</td>
|
951 |
-
</tr>
|
952 |
-
<tr>
|
953 |
-
<td colspan="2" class="gadwp-settings-title">
|
954 |
-
<div class="button-primary gadwp-settings-switchoo">
|
955 |
-
<input type="checkbox" name="options[amp_tracking_clientidapi]" value="1" class="gadwp-settings-switchoo-checkbox" id="amp_tracking_clientidapi" <?php checked( $options['amp_tracking_clientidapi'] && !$options['ga_with_gtag'], 1 ); ?> <?php disabled( $options['ga_with_gtag'], true );?>>
|
956 |
-
<label class="gadwp-settings-switchoo-label" for="amp_tracking_clientidapi">
|
957 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
958 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
959 |
-
</label>
|
960 |
-
</div>
|
961 |
-
<div class="switch-desc"><?php echo " ".__("enable Google AMP Client Id API", 'google-analytics-dashboard-for-wp' );?></div>
|
962 |
-
</td>
|
963 |
-
</tr>
|
964 |
-
<tr>
|
965 |
-
<td colspan="2"><?php echo "<h2>" . __( "Ecommerce", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
966 |
-
</tr>
|
967 |
-
<tr>
|
968 |
-
<td class="gadwp-settings-title">
|
969 |
-
<label for="tracking_type"><?php _e("Ecommerce Tracking:", 'google-analytics-dashboard-for-wp' ); ?>
|
970 |
-
</label>
|
971 |
-
</td>
|
972 |
-
<td>
|
973 |
-
<select id="ecommerce_mode" name="options[ecommerce_mode]" <?php disabled( $options['ga_with_gtag'], true );?>>
|
974 |
-
<option value="disabled" <?php selected( $options['ecommerce_mode'], 'disabled' ); ?>><?php _e("Disabled", 'google-analytics-dashboard-for-wp');?></option>
|
975 |
-
<option value="standard" <?php selected( $options['ecommerce_mode'], 'standard' ); ?>><?php _e("Ecommerce Plugin", 'google-analytics-dashboard-for-wp');?></option>
|
976 |
-
<option value="enhanced" <?php selected( $options['ecommerce_mode'], 'enhanced' ); selected( $options['ga_with_gtag'], true );?>><?php _e("Enhanced Ecommerce Plugin", 'google-analytics-dashboard-for-wp');?></option>
|
977 |
-
</select>
|
978 |
-
</td>
|
979 |
-
</tr>
|
980 |
-
<tr>
|
981 |
-
<td colspan="2"><?php echo "<h2>" . __( "Optimize", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
982 |
-
</tr>
|
983 |
-
<tr>
|
984 |
-
<td colspan="2" class="gadwp-settings-title">
|
985 |
-
<div class="button-primary gadwp-settings-switchoo">
|
986 |
-
<input type="checkbox" name="options[optimize_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="optimize_tracking" <?php checked( $options['optimize_tracking'], 1 ); ?>>
|
987 |
-
<label class="gadwp-settings-switchoo-label" for="optimize_tracking">
|
988 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
989 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
990 |
-
</label>
|
991 |
-
</div>
|
992 |
-
<div class="switch-desc"><?php echo " ".__("enable Optimize tracking", 'google-analytics-dashboard-for-wp' );?></div>
|
993 |
-
</td>
|
994 |
-
</tr>
|
995 |
-
<tr>
|
996 |
-
<td colspan="2" class="gadwp-settings-title">
|
997 |
-
<div class="button-primary gadwp-settings-switchoo">
|
998 |
-
<input type="checkbox" name="options[optimize_pagehiding]" value="1" class="gadwp-settings-switchoo-checkbox" id="optimize_pagehiding" <?php checked( $options['optimize_pagehiding'], 1 ); ?>>
|
999 |
-
<label class="gadwp-settings-switchoo-label" for="optimize_pagehiding">
|
1000 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
1001 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
1002 |
-
</label>
|
1003 |
-
</div>
|
1004 |
-
<div class="switch-desc"><?php echo " ".__("enable Page Hiding support", 'google-analytics-dashboard-for-wp' );?></div>
|
1005 |
-
</td>
|
1006 |
-
</tr>
|
1007 |
-
<tr>
|
1008 |
-
<td class="gadwp-settings-title">
|
1009 |
-
<label for="tracking_type"><?php _e("Container ID:", 'google-analytics-dashboard-for-wp' ); ?>
|
1010 |
-
</label>
|
1011 |
-
</td>
|
1012 |
-
<td>
|
1013 |
-
<input type="text" name="options[optimize_containerid]" value="<?php echo esc_attr($options['optimize_containerid']); ?>" size="15">
|
1014 |
-
</td>
|
1015 |
-
</tr>
|
1016 |
-
</table>
|
1017 |
-
</div>
|
1018 |
-
<div id="gadwp-tmadvanced">
|
1019 |
-
<table class="gadwp-settings-options">
|
1020 |
-
<tr>
|
1021 |
-
<td colspan="2"><?php echo "<h2>" . __( "Advanced Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
1022 |
-
</tr>
|
1023 |
-
<tr>
|
1024 |
-
<td colspan="2" class="gadwp-settings-title">
|
1025 |
-
<div class="button-primary gadwp-settings-switchoo">
|
1026 |
-
<input type="checkbox" name="options[tm_optout]" value="1" class="gadwp-settings-switchoo-checkbox" id="tm_optout" <?php checked( $options['tm_optout'], 1 ); ?>>
|
1027 |
-
<label class="gadwp-settings-switchoo-label" for="tm_optout">
|
1028 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
1029 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
1030 |
-
</label>
|
1031 |
-
</div>
|
1032 |
-
<div class="switch-desc"><?php echo " ".__("enable support for user opt-out", 'google-analytics-dashboard-for-wp' );?></div>
|
1033 |
-
</td>
|
1034 |
-
</tr>
|
1035 |
-
<tr>
|
1036 |
-
<td colspan="2" class="gadwp-settings-title">
|
1037 |
-
<div class="button-primary gadwp-settings-switchoo">
|
1038 |
-
<input type="checkbox" name="options[tm_dnt_optout]" value="1" class="gadwp-settings-switchoo-checkbox" id="tm_dnt_optout" <?php checked( $options['tm_dnt_optout'], 1 ); ?>>
|
1039 |
-
<label class="gadwp-settings-switchoo-label" for="tm_dnt_optout">
|
1040 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
1041 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
1042 |
-
</label>
|
1043 |
-
</div>
|
1044 |
-
<div class="switch-desc"> <?php _e( 'exclude tracking for users sending Do Not Track header', 'google-analytics-dashboard-for-wp' ); ?></div>
|
1045 |
-
</td>
|
1046 |
-
</tr>
|
1047 |
-
</table>
|
1048 |
-
</div>
|
1049 |
-
<div id="gadwp-tmintegration">
|
1050 |
-
<table class="gadwp-settings-options">
|
1051 |
-
<tr>
|
1052 |
-
<td colspan="2"><?php echo "<h2>" . __( "Accelerated Mobile Pages (AMP)", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
1053 |
-
</tr>
|
1054 |
-
<tr>
|
1055 |
-
<td colspan="2" class="gadwp-settings-title">
|
1056 |
-
<div class="button-primary gadwp-settings-switchoo">
|
1057 |
-
<input type="checkbox" name="options[amp_tracking_tagmanager]" value="1" class="gadwp-settings-switchoo-checkbox" id="amp_tracking_tagmanager" <?php checked( $options['amp_tracking_tagmanager'], 1 ); ?>>
|
1058 |
-
<label class="gadwp-settings-switchoo-label" for="amp_tracking_tagmanager">
|
1059 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
1060 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
1061 |
-
</label>
|
1062 |
-
</div>
|
1063 |
-
<div class="switch-desc"><?php echo " ".__("enable tracking for Accelerated Mobile Pages (AMP)", 'google-analytics-dashboard-for-wp' );?></div>
|
1064 |
-
</td>
|
1065 |
-
</tr>
|
1066 |
-
<tr>
|
1067 |
-
<td class="gadwp-settings-title">
|
1068 |
-
<label for="tracking_type"><?php _e("AMP Container ID:", 'google-analytics-dashboard-for-wp' ); ?>
|
1069 |
-
</label>
|
1070 |
-
</td>
|
1071 |
-
<td>
|
1072 |
-
<input type="text" name="options[amp_containerid]" value="<?php echo esc_attr($options['amp_containerid']); ?>" size="15">
|
1073 |
-
</td>
|
1074 |
-
</tr>
|
1075 |
-
</table>
|
1076 |
-
</div>
|
1077 |
-
<div id="gadwp-exclude">
|
1078 |
-
<table class="gadwp-settings-options">
|
1079 |
-
<tr>
|
1080 |
-
<td colspan="2"><?php echo "<h2>" . __( "Exclude Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
1081 |
-
</tr>
|
1082 |
-
<tr>
|
1083 |
-
<td class="roles gadwp-settings-title">
|
1084 |
-
<label for="track_exclude"><?php _e("Exclude tracking for:", 'google-analytics-dashboard-for-wp' ); ?></label>
|
1085 |
-
</td>
|
1086 |
-
<td class="gadwp-settings-roles">
|
1087 |
-
<table>
|
1088 |
-
<tr>
|
1089 |
-
<?php if ( ! isset( $wp_roles ) ) : ?>
|
1090 |
-
<?php $wp_roles = new WP_Roles(); ?>
|
1091 |
-
<?php endif; ?>
|
1092 |
-
<?php $i = 0; ?>
|
1093 |
-
<?php foreach ( $wp_roles->role_names as $role => $name ) : ?>
|
1094 |
-
<?php if ( 'subscriber' != $role ) : ?>
|
1095 |
-
<?php $i++; ?>
|
1096 |
-
<td>
|
1097 |
-
<label>
|
1098 |
-
<input type="checkbox" name="options[track_exclude][]" value="<?php echo $role; ?>" <?php if (in_array($role,$options['track_exclude'])) echo 'checked="checked"'; ?> /> <?php echo $name; ?>
|
1099 |
-
</label>
|
1100 |
-
</td>
|
1101 |
-
<?php endif; ?>
|
1102 |
-
<?php if ( 0 == $i % 4 ) : ?>
|
1103 |
-
</tr>
|
1104 |
-
<tr>
|
1105 |
-
<?php endif; ?>
|
1106 |
-
<?php endforeach; ?>
|
1107 |
-
</table>
|
1108 |
-
</td>
|
1109 |
-
</tr>
|
1110 |
-
</table>
|
1111 |
-
</div>
|
1112 |
-
<table class="gadwp-settings-options">
|
1113 |
-
<tr>
|
1114 |
-
<td colspan="2">
|
1115 |
-
<hr>
|
1116 |
-
</td>
|
1117 |
-
</tr>
|
1118 |
-
<tr>
|
1119 |
-
<td colspan="2" class="submit">
|
1120 |
-
<input type="submit" name="Submit" class="button button-primary" value="<?php _e('Save Changes', 'google-analytics-dashboard-for-wp' ) ?>" />
|
1121 |
-
</td>
|
1122 |
-
</tr>
|
1123 |
-
</table>
|
1124 |
-
<input type="hidden" name="options[gadwp_hidden]" value="Y">
|
1125 |
-
<?php wp_nonce_field('gadwp_form','gadwp_security'); ?>
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
</form>
|
1133 |
-
<?php
|
1134 |
-
self::output_sidebar();
|
1135 |
-
}
|
1136 |
-
|
1137 |
-
public static function errors_debugging() {
|
1138 |
-
|
1139 |
-
$gadwp = GADWP();
|
1140 |
-
|
1141 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
1142 |
-
return;
|
1143 |
-
}
|
1144 |
-
|
1145 |
-
$anonim = GADWP_Tools::anonymize_options( $gadwp->config->options );
|
1146 |
-
|
1147 |
-
$options = self::update_options( 'frontend' );
|
1148 |
-
if ( ! $gadwp->config->options['tableid_jail'] || ! $gadwp->config->options['token'] ) {
|
1149 |
-
$message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
|
1150 |
-
}
|
1151 |
-
?>
|
1152 |
-
<div class="wrap">
|
1153 |
-
<?php echo "<h2>" . __( "Google Analytics Errors & Debugging", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
|
1154 |
-
</div>
|
1155 |
-
<div id="poststuff" class="gadwp">
|
1156 |
-
<div id="post-body" class="metabox-holder columns-2">
|
1157 |
-
<div id="post-body-content">
|
1158 |
-
<div class="settings-wrapper">
|
1159 |
-
<div class="inside">
|
1160 |
-
<?php if (isset($message)) echo $message; ?>
|
1161 |
-
<?php $tabs = array( 'errors' => __( "Errors & Details", 'google-analytics-dashboard-for-wp' ), 'config' => __( "Plugin Settings", 'google-analytics-dashboard-for-wp' ), 'sysinfo' => __( "System", 'google-analytics-dashboard-for-wp' ) ); ?>
|
1162 |
-
<?php self::navigation_tabs( $tabs ); ?>
|
1163 |
-
<div id="gadwp-errors">
|
1164 |
-
<table class="gadwp-settings-logdata">
|
1165 |
-
<tr>
|
1166 |
-
<td>
|
1167 |
-
<?php echo "<h2>" . __( "Error Details", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
|
1168 |
-
</td>
|
1169 |
-
</tr>
|
1170 |
-
<tr>
|
1171 |
-
<td>
|
1172 |
-
<?php $errors_count = GADWP_Tools::get_cache( 'errors_count' ); ?>
|
1173 |
-
<pre class="gadwp-settings-logdata"><?php echo '<span>' . __("Count: ", 'google-analytics-dashboard-for-wp') . '</span>' . (int)$errors_count;?></pre>
|
1174 |
-
<?php $errors = print_r( GADWP_Tools::get_cache( 'last_error' ), true ) ? esc_html( print_r( GADWP_Tools::get_cache( 'last_error' ), true ) ) : ''; ?>
|
1175 |
-
<?php $errors = str_replace( 'Deconf_', 'Google_', $errors); ?>
|
1176 |
-
<pre class="gadwp-settings-logdata"><?php echo '<span>' . __("Last Error: ", 'google-analytics-dashboard-for-wp') . '</span>' . "\n" . $errors;?></pre>
|
1177 |
-
<pre class="gadwp-settings-logdata"><?php echo '<span>' . __("GAPI Error: ", 'google-analytics-dashboard-for-wp') . '</span>'; echo "\n" . esc_html( print_r( GADWP_Tools::get_cache( 'gapi_errors' ), true ) ) ?></pre>
|
1178 |
-
<br />
|
1179 |
-
<hr>
|
1180 |
-
</td>
|
1181 |
-
</tr>
|
1182 |
-
<tr>
|
1183 |
-
<td>
|
1184 |
-
<?php echo "<h2>" . __( "Sampled Data", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
|
1185 |
-
</td>
|
1186 |
-
</tr>
|
1187 |
-
<tr>
|
1188 |
-
<td>
|
1189 |
-
<?php $sampling = GADWP_TOOLS::get_cache( 'sampleddata' ); ?>
|
1190 |
-
<?php if ( $sampling ) :?>
|
1191 |
-
<?php printf( __( "Last Detected on %s.", 'google-analytics-dashboard-for-wp' ), '<strong>'. $sampling['date'] . '</strong>' );?>
|
1192 |
-
<br />
|
1193 |
-
<?php printf( __( "The report was based on %s of sessions.", 'google-analytics-dashboard-for-wp' ), '<strong>'. $sampling['percent'] . '</strong>' );?>
|
1194 |
-
<br />
|
1195 |
-
<?php printf( __( "Sessions ratio: %s.", 'google-analytics-dashboard-for-wp' ), '<strong>'. $sampling['sessions'] . '</strong>' ); ?>
|
1196 |
-
<?php else :?>
|
1197 |
-
<?php _e( "None", 'google-analytics-dashboard-for-wp' ); ?>
|
1198 |
-
<?php endif;?>
|
1199 |
-
</td>
|
1200 |
-
</tr>
|
1201 |
-
</table>
|
1202 |
-
</div>
|
1203 |
-
<div id="gadwp-config">
|
1204 |
-
<table class="gadwp-settings-options">
|
1205 |
-
<tr>
|
1206 |
-
<td><?php echo "<h2>" . __( "Plugin Configuration", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
1207 |
-
</tr>
|
1208 |
-
<tr>
|
1209 |
-
<td>
|
1210 |
-
<pre class="gadwp-settings-logdata"><?php echo esc_html(print_r($anonim, true));?></pre>
|
1211 |
-
<br />
|
1212 |
-
<hr>
|
1213 |
-
</td>
|
1214 |
-
</tr>
|
1215 |
-
</table>
|
1216 |
-
</div>
|
1217 |
-
<div id="gadwp-sysinfo">
|
1218 |
-
<table class="gadwp-settings-options">
|
1219 |
-
<tr>
|
1220 |
-
<td><?php echo "<h2>" . __( "System Information", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
1221 |
-
</tr>
|
1222 |
-
<tr>
|
1223 |
-
<td>
|
1224 |
-
<pre class="gadwp-settings-logdata"><?php echo esc_html(GADWP_Tools::system_info());?></pre>
|
1225 |
-
<br />
|
1226 |
-
<hr>
|
1227 |
-
</td>
|
1228 |
-
</tr>
|
1229 |
-
</table>
|
1230 |
-
</div>
|
1231 |
-
<?php
|
1232 |
-
self::output_sidebar();
|
1233 |
-
}
|
1234 |
-
|
1235 |
-
public static function general_settings() {
|
1236 |
-
$gadwp = GADWP();
|
1237 |
-
|
1238 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
1239 |
-
return;
|
1240 |
-
}
|
1241 |
-
$options = self::update_options( 'general' );
|
1242 |
-
printf( '<div id="gapi-warning" class="updated"><p>%1$s <a href="https://exactmetrics.com/?utm_source=gadwp_config&utm_medium=link&utm_content=general_screen&utm_campaign=gadwp">%2$s</a></p></div>', __( 'Loading the required libraries. If this results in a blank screen or a fatal error, try this solution:', 'google-analytics-dashboard-for-wp' ), __( 'Library conflicts between WordPress plugins', 'google-analytics-dashboard-for-wp' ) );
|
1243 |
-
if ( null === $gadwp->gapi_controller ) {
|
1244 |
-
$gadwp->gapi_controller = new GADWP_GAPI_Controller();
|
1245 |
-
}
|
1246 |
-
echo '<script type="text/javascript">jQuery("#gapi-warning").hide()</script>';
|
1247 |
-
if ( isset( $_POST['gadwp_access_code'] ) ) {
|
1248 |
-
if ( 1 == ! stripos( 'x' . $_POST['gadwp_access_code'], 'UA-', 1 ) && $_POST['gadwp_access_code'] != get_option( 'gadwp_redeemed_code' ) ) {
|
1249 |
-
try {
|
1250 |
-
$gadwp_access_code = $_POST['gadwp_access_code'];
|
1251 |
-
update_option( 'gadwp_redeemed_code', $gadwp_access_code );
|
1252 |
-
GADWP_Tools::delete_cache( 'gapi_errors' );
|
1253 |
-
GADWP_Tools::delete_cache( 'last_error' );
|
1254 |
-
$gadwp->gapi_controller->client->authenticate( $_POST['gadwp_access_code'] );
|
1255 |
-
$gadwp->config->options['token'] = $gadwp->gapi_controller->client->getAccessToken();
|
1256 |
-
$gadwp->config->options['automatic_updates_minorversion'] = 1;
|
1257 |
-
$gadwp->config->set_plugin_options();
|
1258 |
-
$options = self::update_options( 'general' );
|
1259 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Plugin authorization succeeded.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1260 |
-
if ( $gadwp->config->options['token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
|
1261 |
-
$profiles = $gadwp->gapi_controller->refresh_profiles();
|
1262 |
-
if ( is_array ( $profiles ) && ! empty( $profiles ) ) {
|
1263 |
-
$gadwp->config->options['ga_profiles_list'] = $profiles;
|
1264 |
-
if ( ! $gadwp->config->options['tableid_jail'] ) {
|
1265 |
-
$profile = GADWP_Tools::guess_default_domain( $profiles );
|
1266 |
-
$gadwp->config->options['tableid_jail'] = $profile;
|
1267 |
-
}
|
1268 |
-
$gadwp->config->set_plugin_options();
|
1269 |
-
$options = self::update_options( 'general' );
|
1270 |
-
}
|
1271 |
-
}
|
1272 |
-
} catch ( Deconf_IO_Exception $e ) {
|
1273 |
-
$timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
|
1274 |
-
GADWP_Tools::set_error( $e, $timeout );
|
1275 |
-
} catch ( Deconf_Service_Exception $e ) {
|
1276 |
-
$timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
|
1277 |
-
GADWP_Tools::set_error( $e, $timeout );
|
1278 |
-
} catch ( Exception $e ) {
|
1279 |
-
$timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
|
1280 |
-
GADWP_Tools::set_error( $e, $timeout );
|
1281 |
-
$gadwp->gapi_controller->reset_token();
|
1282 |
-
}
|
1283 |
-
} else {
|
1284 |
-
if ( 1 == stripos( 'x' . $_POST['gadwp_access_code'], 'UA-', 1 ) ) {
|
1285 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "The access code is <strong>not</strong> your <strong>Tracking ID</strong> (UA-XXXXX-X) <strong>nor</strong> your <strong>email address</strong>!", 'google-analytics-dashboard-for-wp' ) . ".</p></div>";
|
1286 |
-
} else {
|
1287 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You can only use the access code <strong>once</strong>, please generate a <strong>new access</strong> code following the instructions!", 'google-analytics-dashboard-for-wp' ) . ".</p></div>";
|
1288 |
-
}
|
1289 |
-
}
|
1290 |
-
}
|
1291 |
-
if ( isset( $_POST['Clear'] ) ) {
|
1292 |
-
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1293 |
-
GADWP_Tools::clear_cache();
|
1294 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Cleared Cache.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1295 |
-
} else {
|
1296 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1297 |
-
}
|
1298 |
-
}
|
1299 |
-
if ( isset( $_POST['Reset'] ) ) {
|
1300 |
-
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1301 |
-
$gadwp->gapi_controller->reset_token();
|
1302 |
-
GADWP_Tools::clear_cache();
|
1303 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Token Reseted and Revoked.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1304 |
-
$options = self::update_options( 'Reset' );
|
1305 |
-
} else {
|
1306 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1307 |
-
}
|
1308 |
-
}
|
1309 |
-
if ( isset( $_POST['Reset_Err'] ) ) {
|
1310 |
-
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1311 |
-
|
1312 |
-
if ( GADWP_Tools::get_cache( 'gapi_errors' ) || GADWP_Tools::get_cache( 'last_error' ) ) {
|
1313 |
-
|
1314 |
-
$info = GADWP_Tools::system_info();
|
1315 |
-
$info .= 'GADWP Version: ' . GADWP_CURRENT_VERSION;
|
1316 |
-
|
1317 |
-
$sep = "\n---------------------------\n";
|
1318 |
-
$error_report = GADWP_Tools::get_cache( 'last_error' );
|
1319 |
-
$error_report .= $sep . print_r( GADWP_Tools::get_cache( 'gapi_errors' ), true );
|
1320 |
-
$error_report .= $sep . GADWP_Tools::get_cache( 'errors_count' );
|
1321 |
-
$error_report .= $sep . $info;
|
1322 |
-
|
1323 |
-
$error_report = urldecode( $error_report );
|
1324 |
-
|
1325 |
-
$url = GADWP_ENDPOINT_URL . 'gadwp-report.php';
|
1326 |
-
/* @formatter:off */
|
1327 |
-
$response = wp_remote_post( $url, array(
|
1328 |
-
'method' => 'POST',
|
1329 |
-
'timeout' => 45,
|
1330 |
-
'redirection' => 5,
|
1331 |
-
'httpversion' => '1.0',
|
1332 |
-
'blocking' => true,
|
1333 |
-
'headers' => array(),
|
1334 |
-
'body' => array( 'error_report' => $error_report ),
|
1335 |
-
'cookies' => array()
|
1336 |
-
)
|
1337 |
-
);
|
1338 |
-
}
|
1339 |
-
|
1340 |
-
/* @formatter:on */
|
1341 |
-
GADWP_Tools::delete_cache( 'last_error' );
|
1342 |
-
GADWP_Tools::delete_cache( 'gapi_errors' );
|
1343 |
-
delete_option( 'gadwp_got_updated' );
|
1344 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "All errors reseted.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1345 |
-
} else {
|
1346 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1347 |
-
}
|
1348 |
-
}
|
1349 |
-
if ( isset( $_POST['options']['gadwp_hidden'] ) && ! isset( $_POST['Clear'] ) && ! isset( $_POST['Reset'] ) && ! isset( $_POST['Reset_Err'] ) ) {
|
1350 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Settings saved.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1351 |
-
if ( ! ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) ) {
|
1352 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1353 |
-
}
|
1354 |
-
}
|
1355 |
-
if ( isset( $_POST['Hide'] ) ) {
|
1356 |
-
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1357 |
-
$message = "<div class='updated' id='gadwp-action'><p>" . __( "All other domains/properties were removed.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1358 |
-
$lock_profile = GADWP_Tools::get_selected_profile( $gadwp->config->options['ga_profiles_list'], $gadwp->config->options['tableid_jail'] );
|
1359 |
-
$gadwp->config->options['ga_profiles_list'] = array( $lock_profile );
|
1360 |
-
$options = self::update_options( 'general' );
|
1361 |
-
} else {
|
1362 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1363 |
-
}
|
1364 |
-
}
|
1365 |
-
?>
|
1366 |
-
<div class="wrap">
|
1367 |
-
<?php echo "<h2>" . __( "Google Analytics Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
|
1368 |
-
<hr>
|
1369 |
-
</div>
|
1370 |
-
<div id="poststuff" class="gadwp">
|
1371 |
-
<div id="post-body" class="metabox-holder columns-2">
|
1372 |
-
<div id="post-body-content">
|
1373 |
-
<div class="settings-wrapper">
|
1374 |
-
<div class="inside">
|
1375 |
-
<?php if ( $gadwp->gapi_controller->gapi_errors_handler() || GADWP_Tools::get_cache( 'last_error' ) ) : ?>
|
1376 |
-
<?php $message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );?>
|
1377 |
-
<?php endif;?>
|
1378 |
-
<?php if ( isset( $_POST['Authorize'] ) ) : ?>
|
1379 |
-
<?php GADWP_Tools::clear_cache(); ?>
|
1380 |
-
<?php $gadwp->gapi_controller->token_request(); ?>
|
1381 |
-
<div class="updated">
|
1382 |
-
<p><?php _e( "Use the red link (see below) to generate and get your access code! You need to generate a new code each time you authorize!", 'google-analytics-dashboard-for-wp' )?></p>
|
1383 |
-
</div>
|
1384 |
-
<?php else : ?>
|
1385 |
-
<?php if ( isset( $message ) ) :?>
|
1386 |
-
<?php echo $message;?>
|
1387 |
-
<?php endif; ?>
|
1388 |
-
<form name="gadwp_form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
|
1389 |
-
<input type="hidden" name="options[gadwp_hidden]" value="Y">
|
1390 |
-
<?php wp_nonce_field('gadwp_form','gadwp_security'); ?>
|
1391 |
-
<table class="gadwp-settings-options">
|
1392 |
-
<tr>
|
1393 |
-
<td colspan="2">
|
1394 |
-
<?php echo "<h2>" . __( "Plugin Authorization", 'google-analytics-dashboard-for-wp' ) . "</h2>";?>
|
1395 |
-
</td>
|
1396 |
-
</tr>
|
1397 |
-
<tr>
|
1398 |
-
<td colspan="2" class="gadwp-settings-info">
|
1399 |
-
<?php printf(__('You need to create a %1$s and watch this %2$s before proceeding to authorization.', 'google-analytics-dashboard-for-wp'), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://exactmetrics.com/creating-a-google-analytics-account/?utm_source=gadwp_config&utm_medium=link&utm_content=top_tutorial&utm_campaign=gadwp', __("free analytics account", 'google-analytics-dashboard-for-wp')), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://exactmetrics.com/?utm_source=gadwp_config&utm_medium=link&utm_content=top_video&utm_campaign=gadwp', __("video tutorial", 'google-analytics-dashboard-for-wp')));?>
|
1400 |
-
</td>
|
1401 |
-
</tr>
|
1402 |
-
<?php if (! $options['token'] || ($options['user_api'] && ! $options['network_mode'])) : ?>
|
1403 |
-
<tr>
|
1404 |
-
<td colspan="2" class="gadwp-settings-info">
|
1405 |
-
<input name="options[user_api]" type="checkbox" id="user_api" value="1" <?php checked( $options['user_api'], 1 ); ?> onchange="this.form.submit()" <?php echo ($options['network_mode'])?'disabled="disabled"':''; ?> /><?php echo " ".__("developer mode (requires advanced API knowledge)", 'google-analytics-dashboard-for-wp' );?>
|
1406 |
-
</td>
|
1407 |
-
</tr>
|
1408 |
-
<?php endif; ?>
|
1409 |
-
<?php if ($options['user_api'] && ! $options['network_mode']) : ?>
|
1410 |
-
<tr>
|
1411 |
-
<td class="gadwp-settings-title">
|
1412 |
-
<label for="options[client_id]"><?php _e("Client ID:", 'google-analytics-dashboard-for-wp'); ?></label>
|
1413 |
-
</td>
|
1414 |
-
<td>
|
1415 |
-
<input type="text" name="options[client_id]" value="<?php echo esc_attr($options['client_id']); ?>" size="40" required="required">
|
1416 |
-
</td>
|
1417 |
-
</tr>
|
1418 |
-
<tr>
|
1419 |
-
<td class="gadwp-settings-title">
|
1420 |
-
<label for="options[client_secret]"><?php _e("Client Secret:", 'google-analytics-dashboard-for-wp'); ?></label>
|
1421 |
-
</td>
|
1422 |
-
<td>
|
1423 |
-
<input type="text" name="options[client_secret]" value="<?php echo esc_attr($options['client_secret']); ?>" size="40" required="required">
|
1424 |
-
<input type="hidden" name="options[gadwp_hidden]" value="Y">
|
1425 |
-
<?php wp_nonce_field('gadwp_form','gadwp_security'); ?>
|
1426 |
-
</td>
|
1427 |
-
</tr>
|
1428 |
-
<?php endif; ?>
|
1429 |
-
<?php if ( $options['token'] ) : ?>
|
1430 |
-
<tr>
|
1431 |
-
<td colspan="2">
|
1432 |
-
<input type="submit" name="Reset" class="button button-secondary" value="<?php _e( "Clear Authorization", 'google-analytics-dashboard-for-wp' ); ?>" <?php echo $options['network_mode']?'disabled="disabled"':''; ?> />
|
1433 |
-
<input type="submit" name="Clear" class="button button-secondary" value="<?php _e( "Clear Cache", 'google-analytics-dashboard-for-wp' ); ?>" />
|
1434 |
-
<input type="submit" name="Reset_Err" class="button button-secondary" value="<?php _e( "Report & Reset Errors", 'google-analytics-dashboard-for-wp' ); ?>" />
|
1435 |
-
</td>
|
1436 |
-
</tr>
|
1437 |
-
<tr>
|
1438 |
-
<td colspan="2">
|
1439 |
-
<hr>
|
1440 |
-
</td>
|
1441 |
-
</tr>
|
1442 |
-
<tr>
|
1443 |
-
<td colspan="2"><?php echo "<h2>" . __( "General Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
1444 |
-
</tr>
|
1445 |
-
<tr>
|
1446 |
-
<td class="gadwp-settings-title">
|
1447 |
-
<label for="tableid_jail"><?php _e("Select View:", 'google-analytics-dashboard-for-wp' ); ?></label>
|
1448 |
-
</td>
|
1449 |
-
<td>
|
1450 |
-
<select id="tableid_jail" <?php disabled(empty($options['ga_profiles_list']) || 1 == count($options['ga_profiles_list']), true); ?> name="options[tableid_jail]">
|
1451 |
-
<?php if ( ! empty( $options['ga_profiles_list'] ) ) : ?>
|
1452 |
-
<?php foreach ( $options['ga_profiles_list'] as $items ) : ?>
|
1453 |
-
<?php if ( $items[3] ) : ?>
|
1454 |
-
<option value="<?php echo esc_attr( $items[1] ); ?>" <?php selected( $items[1], $options['tableid_jail'] ); ?> title="<?php _e( "View Name:", 'google-analytics-dashboard-for-wp' ); ?> <?php echo esc_attr( $items[0] ); ?>">
|
1455 |
-
<?php echo esc_html( GADWP_Tools::strip_protocol( $items[3] ) )?> ⇒ <?php echo esc_attr( $items[0] ); ?>
|
1456 |
-
</option>
|
1457 |
-
<?php endif; ?>
|
1458 |
-
<?php endforeach; ?>
|
1459 |
-
<?php else : ?>
|
1460 |
-
<option value=""><?php _e( "Property not found", 'google-analytics-dashboard-for-wp' ); ?></option>
|
1461 |
-
<?php endif; ?>
|
1462 |
-
</select>
|
1463 |
-
<?php if ( count( $options['ga_profiles_list'] ) > 1 ) : ?>
|
1464 |
-
<input type="submit" name="Hide" class="button button-secondary" value="<?php _e( "Lock Selection", 'google-analytics-dashboard-for-wp' ); ?>" />
|
1465 |
-
<?php endif; ?>
|
1466 |
-
</td>
|
1467 |
-
</tr>
|
1468 |
-
<?php if ( $options['tableid_jail'] ) : ?>
|
1469 |
-
<tr>
|
1470 |
-
<td class="gadwp-settings-title"></td>
|
1471 |
-
<td>
|
1472 |
-
<?php $profile_info = GADWP_Tools::get_selected_profile( $gadwp->config->options['ga_profiles_list'], $gadwp->config->options['tableid_jail'] ); ?>
|
1473 |
-
<pre><?php echo __( "View Name:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[0] ) . "<br />" . __( "Tracking ID:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[2] ) . "<br />" . __( "Default URL:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[3] ) . "<br />" . __( "Time Zone:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[5] );?></pre>
|
1474 |
-
</td>
|
1475 |
-
</tr>
|
1476 |
-
<?php endif; ?>
|
1477 |
-
<tr>
|
1478 |
-
<td class="gadwp-settings-title">
|
1479 |
-
<label for="theme_color"><?php _e("Theme Color:", 'google-analytics-dashboard-for-wp' ); ?></label>
|
1480 |
-
</td>
|
1481 |
-
<td>
|
1482 |
-
<input type="text" id="theme_color" class="theme_color" name="options[theme_color]" value="<?php echo esc_attr($options['theme_color']); ?>" size="10">
|
1483 |
-
</td>
|
1484 |
-
</tr>
|
1485 |
-
<tr>
|
1486 |
-
<td colspan="2">
|
1487 |
-
<hr>
|
1488 |
-
</td>
|
1489 |
-
</tr>
|
1490 |
-
<?php if ( !is_multisite()) :?>
|
1491 |
-
<tr>
|
1492 |
-
<td colspan="2"><?php echo "<h2>" . __( "Automatic Updates", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
1493 |
-
</tr>
|
1494 |
-
<tr>
|
1495 |
-
<td colspan="2" class="gadwp-settings-title">
|
1496 |
-
<div class="button-primary gadwp-settings-switchoo">
|
1497 |
-
<input type="checkbox" name="options[automatic_updates_minorversion]" value="1" class="gadwp-settings-switchoo-checkbox" id="automatic_updates_minorversion" <?php checked( $options['automatic_updates_minorversion'], 1 ); ?>>
|
1498 |
-
<label class="gadwp-settings-switchoo-label" for="automatic_updates_minorversion">
|
1499 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
1500 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
1501 |
-
</label>
|
1502 |
-
</div>
|
1503 |
-
<div class="switch-desc"><?php echo " ".__( "automatic updates for minor versions (security and maintenance releases only)", 'google-analytics-dashboard-for-wp' );?></div>
|
1504 |
-
</td>
|
1505 |
-
</tr>
|
1506 |
-
<tr>
|
1507 |
-
<td colspan="2">
|
1508 |
-
<hr>
|
1509 |
-
</td>
|
1510 |
-
</tr>
|
1511 |
-
<?php endif; ?>
|
1512 |
-
<tr>
|
1513 |
-
<td colspan="2"><?php echo "<h2>" . __( "Usage Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
1514 |
-
</tr>
|
1515 |
-
<tr>
|
1516 |
-
<td colspan="2" class="gadwp-settings-title">
|
1517 |
-
<div class="button-primary gadwp-settings-switchoo">
|
1518 |
-
<input type="checkbox" name="options[usage_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="usage_tracking" <?php checked( $options['usage_tracking'], 1 ); ?>>
|
1519 |
-
<label class="gadwp-settings-switchoo-label" for="usage_tracking">
|
1520 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
1521 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
1522 |
-
</label>
|
1523 |
-
</div>
|
1524 |
-
<div class="switch-desc"><?php echo " ". sprintf( esc_html__( 'ExactMetrics would like to %1$scollect some information%2$s to better understand how our users use our plugin to better prioritize features and bugfixes.', 'google-analytics-dashboard-for-wp' ), '<a href="https://exactmetrics.com/usage-tracking/?utm_source=wpdashboard&utm_campaign=usagetracking&utm_medium=plugin" target="_blank">', '</a>' ); ; ?></div>
|
1525 |
-
</td>
|
1526 |
-
</tr>
|
1527 |
-
<tr>
|
1528 |
-
<td colspan="2">
|
1529 |
-
<hr>
|
1530 |
-
</td>
|
1531 |
-
</tr>
|
1532 |
-
<tr>
|
1533 |
-
<td colspan="2" class="submit">
|
1534 |
-
<input type="submit" name="Submit" class="button button-primary" value="<?php _e('Save Changes', 'google-analytics-dashboard-for-wp' ) ?>" />
|
1535 |
-
</td>
|
1536 |
-
</tr>
|
1537 |
-
<?php else : ?>
|
1538 |
-
<tr>
|
1539 |
-
<td colspan="2">
|
1540 |
-
<hr>
|
1541 |
-
</td>
|
1542 |
-
</tr>
|
1543 |
-
<tr>
|
1544 |
-
<td colspan="2">
|
1545 |
-
<input type="submit" name="Authorize" class="button button-secondary" id="authorize" value="<?php _e( "Authorize Plugin", 'google-analytics-dashboard-for-wp' ); ?>" <?php echo $options['network_mode']?'disabled="disabled"':''; ?> />
|
1546 |
-
<input type="submit" name="Clear" class="button button-secondary" value="<?php _e( "Clear Cache", 'google-analytics-dashboard-for-wp' ); ?>" />
|
1547 |
-
</td>
|
1548 |
-
</tr>
|
1549 |
-
<tr>
|
1550 |
-
<td colspan="2">
|
1551 |
-
<hr>
|
1552 |
-
</td>
|
1553 |
-
</tr>
|
1554 |
-
</table>
|
1555 |
-
</form>
|
1556 |
-
<?php self::output_sidebar(); ?>
|
1557 |
-
<?php return; ?>
|
1558 |
-
<?php endif; ?>
|
1559 |
-
</table>
|
1560 |
-
</form>
|
1561 |
-
<?php endif; ?>
|
1562 |
-
<?php
|
1563 |
-
|
1564 |
-
self::output_sidebar();
|
1565 |
-
}
|
1566 |
-
|
1567 |
-
// Network Settings
|
1568 |
-
public static function general_settings_network() {
|
1569 |
-
$gadwp = GADWP();
|
1570 |
-
|
1571 |
-
if ( ! current_user_can( 'manage_network_options' ) ) {
|
1572 |
-
return;
|
1573 |
-
}
|
1574 |
-
$options = self::update_options( 'network' );
|
1575 |
-
/*
|
1576 |
-
* Include GAPI
|
1577 |
-
*/
|
1578 |
-
echo '<div id="gapi-warning" class="updated"><p>' . __( 'Loading the required libraries. If this results in a blank screen or a fatal error, try this solution:', 'google-analytics-dashboard-for-wp' ) . ' <a href="https://exactmetrics.com/?utm_source=gadwp_config&utm_medium=link&utm_content=general_screen&utm_campaign=gadwp">Library conflicts between WordPress plugins</a></p></div>';
|
1579 |
-
|
1580 |
-
if ( null === $gadwp->gapi_controller ) {
|
1581 |
-
$gadwp->gapi_controller = new GADWP_GAPI_Controller();
|
1582 |
-
}
|
1583 |
-
|
1584 |
-
echo '<script type="text/javascript">jQuery("#gapi-warning").hide()</script>';
|
1585 |
-
if ( isset( $_POST['gadwp_access_code'] ) ) {
|
1586 |
-
if ( 1 == ! stripos( 'x' . $_POST['gadwp_access_code'], 'UA-', 1 ) && $_POST['gadwp_access_code'] != get_option( 'gadwp_redeemed_code' ) ) {
|
1587 |
-
try {
|
1588 |
-
$gadwp_access_code = $_POST['gadwp_access_code'];
|
1589 |
-
update_option( 'gadwp_redeemed_code', $gadwp_access_code );
|
1590 |
-
$gadwp->gapi_controller->client->authenticate( $_POST['gadwp_access_code'] );
|
1591 |
-
$gadwp->config->options['token'] = $gadwp->gapi_controller->client->getAccessToken();
|
1592 |
-
$gadwp->config->options['automatic_updates_minorversion'] = 1;
|
1593 |
-
$gadwp->config->set_plugin_options( true );
|
1594 |
-
$options = self::update_options( 'network' );
|
1595 |
-
$message = "<div class='updated' id='gadwp-action'><p>" . __( "Plugin authorization succeeded.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1596 |
-
if ( is_multisite() ) { // Cleanup errors on the entire network
|
1597 |
-
foreach ( GADWP_Tools::get_sites( array( 'number' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
|
1598 |
-
switch_to_blog( $blog['blog_id'] );
|
1599 |
-
GADWP_Tools::delete_cache( 'last_error' );
|
1600 |
-
GADWP_Tools::delete_cache( 'gapi_errors' );
|
1601 |
-
restore_current_blog();
|
1602 |
-
}
|
1603 |
-
} else {
|
1604 |
-
GADWP_Tools::delete_cache( 'last_error' );
|
1605 |
-
GADWP_Tools::delete_cache( 'gapi_errors' );
|
1606 |
-
}
|
1607 |
-
if ( $gadwp->config->options['token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
|
1608 |
-
$profiles = $gadwp->gapi_controller->refresh_profiles();
|
1609 |
-
if ( is_array ( $profiles ) && ! empty( $profiles ) ) {
|
1610 |
-
$gadwp->config->options['ga_profiles_list'] = $profiles;
|
1611 |
-
if ( isset( $gadwp->config->options['tableid_jail'] ) && ! $gadwp->config->options['tableid_jail'] ) {
|
1612 |
-
$profile = GADWP_Tools::guess_default_domain( $profiles );
|
1613 |
-
$gadwp->config->options['tableid_jail'] = $profile;
|
1614 |
-
}
|
1615 |
-
$gadwp->config->set_plugin_options( true );
|
1616 |
-
$options = self::update_options( 'network' );
|
1617 |
-
}
|
1618 |
-
}
|
1619 |
-
} catch ( Deconf_IO_Exception $e ) {
|
1620 |
-
$timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
|
1621 |
-
GADWP_Tools::set_error( $e, $timeout );
|
1622 |
-
} catch ( Deconf_Service_Exception $e ) {
|
1623 |
-
$timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
|
1624 |
-
GADWP_Tools::set_error( $e, $timeout );
|
1625 |
-
} catch ( Exception $e ) {
|
1626 |
-
$timeout = $gadwp->gapi_controller->get_timeouts( 'midnight' );
|
1627 |
-
GADWP_Tools::set_error( $e, $timeout );
|
1628 |
-
$gadwp->gapi_controller->reset_token();
|
1629 |
-
}
|
1630 |
-
} else {
|
1631 |
-
if ( 1 == stripos( 'x' . $_POST['gadwp_access_code'], 'UA-', 1 ) ) {
|
1632 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "The access code is <strong>not</strong> your <strong>Tracking ID</strong> (UA-XXXXX-X) <strong>nor</strong> your <strong>email address</strong>!", 'google-analytics-dashboard-for-wp' ) . ".</p></div>";
|
1633 |
-
} else {
|
1634 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You can only use the access code <strong>once</strong>, please generate a <strong>new access code</strong> using the red link", 'google-analytics-dashboard-for-wp' ) . "!</p></div>";
|
1635 |
-
}
|
1636 |
-
}
|
1637 |
-
}
|
1638 |
-
if ( isset( $_POST['Refresh'] ) ) {
|
1639 |
-
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1640 |
-
$gadwp->config->options['ga_profiles_list'] = array();
|
1641 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Properties refreshed.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1642 |
-
$options = self::update_options( 'network' );
|
1643 |
-
if ( $gadwp->config->options['token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
|
1644 |
-
if ( ! empty( $gadwp->config->options['ga_profiles_list'] ) ) {
|
1645 |
-
$profiles = $gadwp->config->options['ga_profiles_list'];
|
1646 |
-
} else {
|
1647 |
-
$profiles = $gadwp->gapi_controller->refresh_profiles();
|
1648 |
-
}
|
1649 |
-
if ( $profiles ) {
|
1650 |
-
$gadwp->config->options['ga_profiles_list'] = $profiles;
|
1651 |
-
if ( isset( $gadwp->config->options['tableid_jail'] ) && ! $gadwp->config->options['tableid_jail'] ) {
|
1652 |
-
$profile = GADWP_Tools::guess_default_domain( $profiles );
|
1653 |
-
$gadwp->config->options['tableid_jail'] = $profile;
|
1654 |
-
}
|
1655 |
-
$gadwp->config->set_plugin_options( true );
|
1656 |
-
$options = self::update_options( 'network' );
|
1657 |
-
}
|
1658 |
-
}
|
1659 |
-
} else {
|
1660 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1661 |
-
}
|
1662 |
-
}
|
1663 |
-
if ( isset( $_POST['Clear'] ) ) {
|
1664 |
-
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1665 |
-
GADWP_Tools::clear_cache();
|
1666 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Cleared Cache.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1667 |
-
} else {
|
1668 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1669 |
-
}
|
1670 |
-
}
|
1671 |
-
if ( isset( $_POST['Reset'] ) ) {
|
1672 |
-
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1673 |
-
$gadwp->gapi_controller->reset_token();
|
1674 |
-
GADWP_Tools::clear_cache();
|
1675 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Token Reseted and Revoked.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1676 |
-
$options = self::update_options( 'Reset' );
|
1677 |
-
} else {
|
1678 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1679 |
-
}
|
1680 |
-
}
|
1681 |
-
if ( isset( $_POST['options']['gadwp_hidden'] ) && ! isset( $_POST['Clear'] ) && ! isset( $_POST['Reset'] ) && ! isset( $_POST['Refresh'] ) ) {
|
1682 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "Settings saved.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1683 |
-
if ( ! ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) ) {
|
1684 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1685 |
-
}
|
1686 |
-
}
|
1687 |
-
if ( isset( $_POST['Hide'] ) ) {
|
1688 |
-
if ( isset( $_POST['gadwp_security'] ) && wp_verify_nonce( $_POST['gadwp_security'], 'gadwp_form' ) ) {
|
1689 |
-
$message = "<div class='updated' id='gadwp-autodismiss'><p>" . __( "All other domains/properties were removed.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1690 |
-
$lock_profile = GADWP_Tools::get_selected_profile( $gadwp->config->options['ga_profiles_list'], $gadwp->config->options['tableid_jail'] );
|
1691 |
-
$gadwp->config->options['ga_profiles_list'] = array( $lock_profile );
|
1692 |
-
$options = self::update_options( 'network' );
|
1693 |
-
} else {
|
1694 |
-
$message = "<div class='error' id='gadwp-autodismiss'><p>" . __( "You don’t have permission to do this.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
|
1695 |
-
}
|
1696 |
-
}
|
1697 |
-
?>
|
1698 |
-
<div class="wrap">
|
1699 |
-
<h2><?php _e( "Google Analytics Settings", 'google-analytics-dashboard-for-wp' );?></h2>
|
1700 |
-
<hr>
|
1701 |
-
</div>
|
1702 |
-
<div id="poststuff" class="gadwp">
|
1703 |
-
<div id="post-body" class="metabox-holder columns-2">
|
1704 |
-
<div id="post-body-content">
|
1705 |
-
<div class="settings-wrapper">
|
1706 |
-
<div class="inside">
|
1707 |
-
<?php if ( $gadwp->gapi_controller->gapi_errors_handler() || GADWP_Tools::get_cache( 'last_error' ) ) : ?>
|
1708 |
-
<?php $message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadwp_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );?>
|
1709 |
-
<?php endif; ?>
|
1710 |
-
<?php if ( isset( $_POST['Authorize'] ) ) : ?>
|
1711 |
-
<?php GADWP_Tools::clear_cache();?>
|
1712 |
-
<?php $gadwp->gapi_controller->token_request();?>
|
1713 |
-
<div class="updated">
|
1714 |
-
<p><?php _e( "Use the red link (see below) to generate and get your access code! You need to generate a new code each time you authorize!", 'google-analytics-dashboard-for-wp' );?></p>
|
1715 |
-
</div>
|
1716 |
-
<?php else : ?>
|
1717 |
-
<?php if ( isset( $message ) ) : ?>
|
1718 |
-
<?php echo $message; ?>
|
1719 |
-
<?php endif; ?>
|
1720 |
-
<form name="gadwp_form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
|
1721 |
-
<input type="hidden" name="options[gadwp_hidden]" value="Y">
|
1722 |
-
<?php wp_nonce_field('gadwp_form','gadwp_security'); ?>
|
1723 |
-
<table class="gadwp-settings-options">
|
1724 |
-
<tr>
|
1725 |
-
<td colspan="2">
|
1726 |
-
<?php echo "<h2>" . __( "Network Setup", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
|
1727 |
-
</td>
|
1728 |
-
</tr>
|
1729 |
-
<tr>
|
1730 |
-
<td colspan="2" class="gadwp-settings-title">
|
1731 |
-
<div class="button-primary gadwp-settings-switchoo">
|
1732 |
-
<input type="checkbox" name="options[network_mode]" value="1" class="gadwp-settings-switchoo-checkbox" id="network_mode" <?php checked( $options['network_mode'], 1); ?> onchange="this.form.submit()">
|
1733 |
-
<label class="gadwp-settings-switchoo-label" for="network_mode">
|
1734 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
1735 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
1736 |
-
</label>
|
1737 |
-
</div>
|
1738 |
-
<div class="switch-desc"><?php echo " ".__("use a single Google Analytics account for the entire network", 'google-analytics-dashboard-for-wp' );?></div>
|
1739 |
-
</td>
|
1740 |
-
</tr>
|
1741 |
-
<?php if ($options['network_mode']) : ?>
|
1742 |
-
<tr>
|
1743 |
-
<td colspan="2">
|
1744 |
-
<hr>
|
1745 |
-
</td>
|
1746 |
-
</tr>
|
1747 |
-
<tr>
|
1748 |
-
<td colspan="2"><?php echo "<h2>" . __( "Plugin Authorization", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
1749 |
-
</tr>
|
1750 |
-
<tr>
|
1751 |
-
<td colspan="2" class="gadwp-settings-info">
|
1752 |
-
<?php printf(__('You need to create a %1$s and watch this %2$s before proceeding to authorization.', 'google-analytics-dashboard-for-wp'), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://exactmetrics.com/creating-a-google-analytics-account/?utm_source=gadwp_config&utm_medium=link&utm_content=top_tutorial&utm_campaign=gadwp', __("free analytics account", 'google-analytics-dashboard-for-wp')), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://exactmetrics.com/?utm_source=gadwp_config&utm_medium=link&utm_content=top_video&utm_campaign=gadwp', __("video tutorial", 'google-analytics-dashboard-for-wp')));?>
|
1753 |
-
</td>
|
1754 |
-
</tr>
|
1755 |
-
<?php if ( ! $options['token'] || $options['user_api'] ) : ?>
|
1756 |
-
<tr>
|
1757 |
-
<td colspan="2" class="gadwp-settings-info">
|
1758 |
-
<input name="options[user_api]" type="checkbox" id="user_api" value="1" <?php checked( $options['user_api'], 1 ); ?> onchange="this.form.submit()" /><?php echo " ".__("developer mode (requires advanced API knowledge)", 'google-analytics-dashboard-for-wp' );?>
|
1759 |
-
</td>
|
1760 |
-
</tr>
|
1761 |
-
<?php endif; ?>
|
1762 |
-
<?php if ( $options['user_api'] ) : ?>
|
1763 |
-
<tr>
|
1764 |
-
<td class="gadwp-settings-title">
|
1765 |
-
<label for="options[client_id]"><?php _e("Client ID:", 'google-analytics-dashboard-for-wp'); ?>
|
1766 |
-
</label>
|
1767 |
-
</td>
|
1768 |
-
<td>
|
1769 |
-
<input type="text" name="options[client_id]" value="<?php echo esc_attr($options['client_id']); ?>" size="40" required="required">
|
1770 |
-
</td>
|
1771 |
-
</tr>
|
1772 |
-
<tr>
|
1773 |
-
<td class="gadwp-settings-title">
|
1774 |
-
<label for="options[client_secret]"><?php _e("Client Secret:", 'google-analytics-dashboard-for-wp'); ?>
|
1775 |
-
</label>
|
1776 |
-
</td>
|
1777 |
-
<td>
|
1778 |
-
<input type="text" name="options[client_secret]" value="<?php echo esc_attr($options['client_secret']); ?>" size="40" required="required">
|
1779 |
-
<input type="hidden" name="options[gadwp_hidden]" value="Y">
|
1780 |
-
<?php wp_nonce_field('gadwp_form','gadwp_security'); ?>
|
1781 |
-
</td>
|
1782 |
-
</tr>
|
1783 |
-
<?php endif; ?>
|
1784 |
-
<?php if ( $options['token'] ) : ?>
|
1785 |
-
<tr>
|
1786 |
-
<td colspan="2">
|
1787 |
-
<input type="submit" name="Reset" class="button button-secondary" value="<?php _e( "Clear Authorization", 'google-analytics-dashboard-for-wp' ); ?>" />
|
1788 |
-
<input type="submit" name="Clear" class="button button-secondary" value="<?php _e( "Clear Cache", 'google-analytics-dashboard-for-wp' ); ?>" />
|
1789 |
-
<input type="submit" name="Refresh" class="button button-secondary" value="<?php _e( "Refresh Properties", 'google-analytics-dashboard-for-wp' ); ?>" />
|
1790 |
-
</td>
|
1791 |
-
</tr>
|
1792 |
-
<tr>
|
1793 |
-
<td colspan="2">
|
1794 |
-
<hr>
|
1795 |
-
</td>
|
1796 |
-
</tr>
|
1797 |
-
<tr>
|
1798 |
-
<td colspan="2">
|
1799 |
-
<?php echo "<h2>" . __( "Properties/Views Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
|
1800 |
-
</td>
|
1801 |
-
</tr>
|
1802 |
-
<?php if ( isset( $options['network_tableid'] ) ) : ?>
|
1803 |
-
<?php $options['network_tableid'] = json_decode( json_encode( $options['network_tableid'] ), false ); ?>
|
1804 |
-
<?php endif; ?>
|
1805 |
-
<?php foreach ( GADWP_Tools::get_sites( array( 'number' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) : ?>
|
1806 |
-
<tr>
|
1807 |
-
<td class="gadwp-settings-title-s">
|
1808 |
-
<label for="network_tableid"><?php echo '<strong>'.$blog['domain'].$blog['path'].'</strong>: ';?></label>
|
1809 |
-
</td>
|
1810 |
-
<td>
|
1811 |
-
<select id="network_tableid" <?php disabled(!empty($options['ga_profiles_list']),false);?> name="options[network_tableid][<?php echo $blog['blog_id'];?>]">
|
1812 |
-
<?php if ( ! empty( $options['ga_profiles_list'] ) ) : ?>
|
1813 |
-
<?php foreach ( $options['ga_profiles_list'] as $items ) : ?>
|
1814 |
-
<?php if ( $items[3] ) : ?>
|
1815 |
-
<?php $temp_id = $blog['blog_id']; ?>
|
1816 |
-
<option value="<?php echo esc_attr( $items[1] );?>" <?php selected( $items[1], isset( $options['network_tableid']->$temp_id ) ? $options['network_tableid']->$temp_id : '');?> title="<?php echo __( "View Name:", 'google-analytics-dashboard-for-wp' ) . ' ' . esc_attr( $items[0] );?>">
|
1817 |
-
<?php echo esc_html( GADWP_Tools::strip_protocol( $items[3] ) );?> ⇒ <?php echo esc_attr( $items[0] );?>
|
1818 |
-
</option>
|
1819 |
-
<?php endif; ?>
|
1820 |
-
<?php endforeach; ?>
|
1821 |
-
<?php else : ?>
|
1822 |
-
<option value="">
|
1823 |
-
<?php _e( "Property not found", 'google-analytics-dashboard-for-wp' );?>
|
1824 |
-
</option>
|
1825 |
-
<?php endif; ?>
|
1826 |
-
</select>
|
1827 |
-
<br />
|
1828 |
-
</td>
|
1829 |
-
</tr>
|
1830 |
-
<?php endforeach; ?>
|
1831 |
-
<tr>
|
1832 |
-
<td colspan="2">
|
1833 |
-
<h2><?php echo _e( "Automatic Updates", 'google-analytics-dashboard-for-wp' );?></h2>
|
1834 |
-
</td>
|
1835 |
-
</tr>
|
1836 |
-
<tr>
|
1837 |
-
<td colspan="2" class="gadwp-settings-title">
|
1838 |
-
<div class="button-primary gadwp-settings-switchoo">
|
1839 |
-
<input type="checkbox" name="options[automatic_updates_minorversion]" value="1" class="gadwp-settings-switchoo-checkbox" id="automatic_updates_minorversion" <?php checked( $options['automatic_updates_minorversion'], 1 ); ?>>
|
1840 |
-
<label class="gadwp-settings-switchoo-label" for="automatic_updates_minorversion">
|
1841 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
1842 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
1843 |
-
</label>
|
1844 |
-
</div>
|
1845 |
-
<div class="switch-desc"><?php echo " ".__( "automatic updates for minor versions (security and maintenance releases only)", 'google-analytics-dashboard-for-wp' );?></div>
|
1846 |
-
</td>
|
1847 |
-
</tr>
|
1848 |
-
<tr>
|
1849 |
-
<td colspan="2">
|
1850 |
-
<hr>
|
1851 |
-
</td>
|
1852 |
-
</tr>
|
1853 |
-
<tr>
|
1854 |
-
<td colspan="2">
|
1855 |
-
<hr><?php echo "<h2>" . __( "Exclude Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
1856 |
-
</tr>
|
1857 |
-
<tr>
|
1858 |
-
<td colspan="2" class="gadwp-settings-title">
|
1859 |
-
<div class="button-primary gadwp-settings-switchoo">
|
1860 |
-
<input type="checkbox" name="options[superadmin_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="superadmin_tracking"<?php checked( $options['superadmin_tracking'], 1); ?>">
|
1861 |
-
<label class="gadwp-settings-switchoo-label" for="superadmin_tracking">
|
1862 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
1863 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
1864 |
-
</label>
|
1865 |
-
</div>
|
1866 |
-
<div class="switch-desc"><?php echo " ".__("exclude Super Admin tracking for the entire network", 'google-analytics-dashboard-for-wp' );?></div>
|
1867 |
-
</td>
|
1868 |
-
</tr>
|
1869 |
-
<tr>
|
1870 |
-
<td colspan="2">
|
1871 |
-
<hr>
|
1872 |
-
</td>
|
1873 |
-
</tr>
|
1874 |
-
<tr>
|
1875 |
-
<td colspan="2"><?php echo "<h2>" . __( "Hide Announcements", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
|
1876 |
-
</tr>
|
1877 |
-
<tr>
|
1878 |
-
<td colspan="2" class="gadwp-settings-title">
|
1879 |
-
<div class="button-primary gadwp-settings-switchoo">
|
1880 |
-
<input type="checkbox" name="options[network_hide_am_notices]" value="1" class="gadwp-settings-switchoo-checkbox" id="network_hide_am_notices" <?php checked( $options['network_hide_am_notices'], 1 ); ?>>
|
1881 |
-
<label class="gadwp-settings-switchoo-label" for="network_hide_am_notices">
|
1882 |
-
<div class="gadwp-settings-switchoo-inner"></div>
|
1883 |
-
<div class="gadwp-settings-switchoo-switch"></div>
|
1884 |
-
</label>
|
1885 |
-
</div>
|
1886 |
-
<div class="switch-desc"><?php echo esc_html__( 'Hides plugin announcements and update details. This includes critical notices we use to inform about deprecations and important required configuration changes.' ); ?></div>
|
1887 |
-
</td>
|
1888 |
-
</tr>
|
1889 |
-
<tr>
|
1890 |
-
<td colspan="2">
|
1891 |
-
<hr>
|
1892 |
-
</td>
|
1893 |
-
</tr>
|
1894 |
-
<tr>
|
1895 |
-
<td colspan="2" class="submit">
|
1896 |
-
<input type="submit" name="Submit" class="button button-primary" value="<?php _e('Save Changes', 'google-analytics-dashboard-for-wp' ) ?>" />
|
1897 |
-
</td>
|
1898 |
-
</tr>
|
1899 |
-
<?php else : ?>
|
1900 |
-
<tr>
|
1901 |
-
<td colspan="2">
|
1902 |
-
<hr>
|
1903 |
-
</td>
|
1904 |
-
</tr>
|
1905 |
-
<tr>
|
1906 |
-
<td colspan="2">
|
1907 |
-
<input type="submit" name="Authorize" class="button button-secondary" id="authorize" value="<?php _e( "Authorize Plugin", 'google-analytics-dashboard-for-wp' ); ?>" />
|
1908 |
-
<input type="submit" name="Clear" class="button button-secondary" value="<?php _e( "Clear Cache", 'google-analytics-dashboard-for-wp' ); ?>" />
|
1909 |
-
</td>
|
1910 |
-
</tr>
|
1911 |
-
<?php endif; ?>
|
1912 |
-
<tr>
|
1913 |
-
<td colspan="2">
|
1914 |
-
<hr>
|
1915 |
-
</td>
|
1916 |
-
</tr>
|
1917 |
-
</table>
|
1918 |
-
</form>
|
1919 |
-
<?php self::output_sidebar(); ?>
|
1920 |
-
<?php return; ?>
|
1921 |
-
<?php endif;?>
|
1922 |
-
</table>
|
1923 |
-
</form>
|
1924 |
-
<?php endif; ?>
|
1925 |
-
<?php
|
1926 |
-
|
1927 |
-
self::output_sidebar();
|
1928 |
-
}
|
1929 |
-
|
1930 |
-
public static function output_sidebar() {
|
1931 |
-
global $wp_version;
|
1932 |
-
|
1933 |
-
$gadwp = GADWP();
|
1934 |
-
?>
|
1935 |
-
</div>
|
1936 |
-
</div>
|
1937 |
-
</div>
|
1938 |
-
<div id="postbox-container-1" class="postbox-container">
|
1939 |
-
<div class="meta-box-sortables">
|
1940 |
-
<div class="postbox">
|
1941 |
-
<h3>
|
1942 |
-
<span><?php _e("Setup Tutorial & Demo",'google-analytics-dashboard-for-wp') ?></span>
|
1943 |
-
</h3>
|
1944 |
-
<div class="inside">
|
1945 |
-
<a href="https://exactmetrics.com/quick-start-guide/?utm_source=gadwp_config&utm_medium=link&utm_content=video&utm_campaign=gadwp" target="_blank"><img src="<?php echo plugins_url( 'images/google-analytics-dashboard.png' , __FILE__ );?>" width="100%" alt="" /></a>
|
1946 |
-
</div>
|
1947 |
-
</div>
|
1948 |
-
<div class="postbox">
|
1949 |
-
<h3>
|
1950 |
-
<span><?php _e("Further Reading",'google-analytics-dashboard-for-wp')?></span>
|
1951 |
-
</h3>
|
1952 |
-
<div class="inside">
|
1953 |
-
<div class="gadwp-title">
|
1954 |
-
<a href="https://exactmetrics.com/quick-start-guide/?utm_source=gadwp_config&utm_medium=link&utm_content=getstarted&utm_campaign=gadwp"><img src="<?php echo plugins_url( 'images/clicky.png' , __FILE__ ); ?>" /></a>
|
1955 |
-
</div>
|
1956 |
-
<div class="gadwp-desc">
|
1957 |
-
<?php printf(__('%s with our quick start guide.', 'google-analytics-dashboard-for-wp'), sprintf('<a href="https://exactmetrics.com/quick-start-guide/?utm_source=gadwp_config&utm_medium=link&utm_content=getstarted&utm_campaign=gadwp">%s</a>', __('Get started', 'google-analytics-dashboard-for-wp')));?>
|
1958 |
-
</div>
|
1959 |
-
<br />
|
1960 |
-
<div class="gadwp-title">
|
1961 |
-
<a href="https://exactmetrics.com/google-analytics-gdpr-and-user-data-privacy-compliance/?utm_source=gadwp_config&utm_medium=link&utm_content=ssl&utm_campaign=gadwp"><img src="<?php echo plugins_url( 'images/ssl.png' , __FILE__ ); ?>" /></a>
|
1962 |
-
</div>
|
1963 |
-
<div class="gadwp-desc">
|
1964 |
-
<?php printf(__('%s with our guide to what you need to know.', 'google-analytics-dashboard-for-wp'), sprintf('<a href="https://exactmetrics.com/google-analytics-gdpr-and-user-data-privacy-compliance/?utm_source=gadwp_config&utm_medium=link&utm_content=gdprl&utm_campaign=gadwp">%s</a>', __('Get ready for GDPR', 'google-analytics-dashboard-for-wp')));?>
|
1965 |
-
</div>
|
1966 |
-
<br />
|
1967 |
-
<div class="gadwp-title">
|
1968 |
-
<a href="http://wordpress.org/support/view/plugin-reviews/google-analytics-dashboard-for-wp#plugin-info"><img src="<?php echo plugins_url( 'images/star.png' , __FILE__ ); ?>" /></a>
|
1969 |
-
</div>
|
1970 |
-
<div class="gadwp-desc">
|
1971 |
-
<?php printf(__('Your feedback and review are both important, %s!', 'google-analytics-dashboard-for-wp'), sprintf('<a href="http://wordpress.org/support/view/plugin-reviews/google-analytics-dashboard-for-wp/?filter=5">%s</a>', __('rate this plugin', 'google-analytics-dashboard-for-wp')));?>
|
1972 |
-
</div>
|
1973 |
-
</div>
|
1974 |
-
</div>
|
1975 |
-
<div class="postbox">
|
1976 |
-
<h3>
|
1977 |
-
<span><?php _e("Recommended Plugins",'google-analytics-dashboard-for-wp')?></span>
|
1978 |
-
</h3>
|
1979 |
-
<div class="inside">
|
1980 |
-
<div class="gadwp-title">
|
1981 |
-
<a href="https://wpforms.com/?utm_source=gadwp&utm_medium=link&utm_campaign=gadwpsettingspage"><img src="<?php echo plugins_url( 'images/wpforms.png' , __FILE__ ); ?>" /></a>
|
1982 |
-
</div>
|
1983 |
-
<div class="gadwp-desc">
|
1984 |
-
<?php printf(__('%s the most beginner friendly drag and drop form builder plugin for WordPress.', 'google-analytics-dashboard-for-wp'), sprintf('<a href="https://wpforms.com/?utm_source=gadwp&utm_medium=link&utm_campaign=gadwpsettingspage">%s</a>', __('WPForms', 'google-analytics-dashboard-for-wp')));?>
|
1985 |
-
</div>
|
1986 |
-
<br />
|
1987 |
-
<div class="gadwp-title">
|
1988 |
-
<a href="https://optinmonster.com/?utm_source=gadwp&utm_medium=link&utm_campaign=gadwpsettingspage"><img src="<?php echo plugins_url( 'images/optinmonster.png' , __FILE__ ); ?>" /></a>
|
1989 |
-
</div>
|
1990 |
-
<div class="gadwp-desc">
|
1991 |
-
<?php printf(__('%s the best conversion optimization toolkit to boost your subscribers and grow your sales.', 'google-analytics-dashboard-for-wp'), sprintf('<a href="https://optinmonster.com/?utm_source=gadwp&utm_medium=link&utm_campaign=gadwpsettingspage">%s</a>', __('OptinMonster', 'google-analytics-dashboard-for-wp')));?>
|
1992 |
-
</div>
|
1993 |
-
</div>
|
1994 |
-
</div>
|
1995 |
-
</div>
|
1996 |
-
</div>
|
1997 |
-
</div>
|
1998 |
-
</div>
|
1999 |
-
<?php
|
2000 |
-
// Dismiss the admin update notice
|
2001 |
-
if ( version_compare( $wp_version, '4.2', '<' ) && current_user_can( 'manage_options' ) ) {
|
2002 |
-
delete_option( 'gadwp_got_updated' );
|
2003 |
-
}
|
2004 |
-
}
|
2005 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/setup.php
DELETED
@@ -1,368 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Backend_Setup' ) ) {
|
15 |
-
|
16 |
-
final class GADWP_Backend_Setup {
|
17 |
-
|
18 |
-
private $gadwp;
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
$this->gadwp = GADWP();
|
22 |
-
|
23 |
-
// Styles & Scripts
|
24 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'load_styles_scripts' ) );
|
25 |
-
// Site Menu
|
26 |
-
add_action( 'admin_menu', array( $this, 'site_menu' ) );
|
27 |
-
// Network Menu
|
28 |
-
add_action( 'network_admin_menu', array( $this, 'network_menu' ) );
|
29 |
-
// Settings link
|
30 |
-
add_filter( "plugin_action_links_" . plugin_basename( GADWP_DIR . 'gadwp.php' ), array( $this, 'settings_link' ) );
|
31 |
-
// AM Notices
|
32 |
-
add_filter( "am_notifications_display", array( $this, 'notice_optout' ), 10, 1 );
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Add Site Menu
|
37 |
-
*/
|
38 |
-
public function site_menu() {
|
39 |
-
global $wp_version;
|
40 |
-
if ( current_user_can( 'manage_options' ) ) {
|
41 |
-
include ( GADWP_DIR . 'admin/settings.php' );
|
42 |
-
add_menu_page( __( "Google Analytics", 'google-analytics-dashboard-for-wp' ), __( "Google Analytics", 'google-analytics-dashboard-for-wp' ), 'manage_options', 'gadwp_settings', array( 'GADWP_Settings', 'general_settings' ), version_compare( $wp_version, '3.8.0', '>=' ) ? 'dashicons-chart-area' : GADWP_URL . 'admin/images/gadwp-icon.png' );
|
43 |
-
add_submenu_page( 'gadwp_settings', __( "General Settings", 'google-analytics-dashboard-for-wp' ), __( "General Settings", 'google-analytics-dashboard-for-wp' ), 'manage_options', 'gadwp_settings', array( 'GADWP_Settings', 'general_settings' ) );
|
44 |
-
add_submenu_page( 'gadwp_settings', __( "Backend Settings", 'google-analytics-dashboard-for-wp' ), __( "Backend Settings", 'google-analytics-dashboard-for-wp' ), 'manage_options', 'gadwp_backend_settings', array( 'GADWP_Settings', 'backend_settings' ) );
|
45 |
-
add_submenu_page( 'gadwp_settings', __( "Frontend Settings", 'google-analytics-dashboard-for-wp' ), __( "Frontend Settings", 'google-analytics-dashboard-for-wp' ), 'manage_options', 'gadwp_frontend_settings', array( 'GADWP_Settings', 'frontend_settings' ) );
|
46 |
-
add_submenu_page( 'gadwp_settings', __( "Tracking Code", 'google-analytics-dashboard-for-wp' ), __( "Tracking Code", 'google-analytics-dashboard-for-wp' ), 'manage_options', 'gadwp_tracking_settings', array( 'GADWP_Settings', 'tracking_settings' ) );
|
47 |
-
add_submenu_page( 'gadwp_settings', __( "Errors & Debug", 'google-analytics-dashboard-for-wp' ), __( "Errors & Debug", 'google-analytics-dashboard-for-wp' ), 'manage_options', 'gadwp_errors_debugging', array( 'GADWP_Settings', 'errors_debugging' ) );
|
48 |
-
}
|
49 |
-
}
|
50 |
-
|
51 |
-
public function notice_optout( $super_admin ) {
|
52 |
-
if ( ( isset( $this->gadwp->config->options['hide_am_notices'] ) && $this->gadwp->config->options['hide_am_notices'] ) ||
|
53 |
-
( isset( $this->gadwp->config->options['network_hide_am_notices'] ) && $this->gadwp->config->options['network_hide_am_notices'] )
|
54 |
-
)
|
55 |
-
{
|
56 |
-
return false;
|
57 |
-
}
|
58 |
-
return $super_admin;
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Add Network Menu
|
63 |
-
*/
|
64 |
-
public function network_menu() {
|
65 |
-
global $wp_version;
|
66 |
-
if ( current_user_can( 'manage_network' ) ) {
|
67 |
-
include ( GADWP_DIR . 'admin/settings.php' );
|
68 |
-
add_menu_page( __( "Google Analytics", 'google-analytics-dashboard-for-wp' ), "Google Analytics", 'manage_network', 'gadwp_settings', array( 'GADWP_Settings', 'general_settings_network' ), version_compare( $wp_version, '3.8.0', '>=' ) ? 'dashicons-chart-area' : GADWP_URL . 'admin/images/gadwp-icon.png' );
|
69 |
-
add_submenu_page( 'gadwp_settings', __( "General Settings", 'google-analytics-dashboard-for-wp' ), __( "General Settings", 'google-analytics-dashboard-for-wp' ), 'manage_network', 'gadwp_settings', array( 'GADWP_Settings', 'general_settings_network' ) );
|
70 |
-
add_submenu_page( 'gadwp_settings', __( "Errors & Debug", 'google-analytics-dashboard-for-wp' ), __( "Errors & Debug", 'google-analytics-dashboard-for-wp' ), 'manage_network', 'gadwp_errors_debugging', array( 'GADWP_Settings', 'errors_debugging' ) );
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Styles & Scripts conditional loading (based on current URI)
|
76 |
-
*
|
77 |
-
* @param
|
78 |
-
* $hook
|
79 |
-
*/
|
80 |
-
public function load_styles_scripts( $hook ) {
|
81 |
-
$new_hook = explode( '_page_', $hook );
|
82 |
-
|
83 |
-
if ( isset( $new_hook[1] ) ) {
|
84 |
-
$new_hook = '_page_' . $new_hook[1];
|
85 |
-
} else {
|
86 |
-
$new_hook = $hook;
|
87 |
-
}
|
88 |
-
|
89 |
-
/*
|
90 |
-
* GADWP main stylesheet
|
91 |
-
*/
|
92 |
-
wp_enqueue_style( 'gadwp', GADWP_URL . 'admin/css/gadwp.css', null, GADWP_CURRENT_VERSION );
|
93 |
-
|
94 |
-
/*
|
95 |
-
* GADWP UI
|
96 |
-
*/
|
97 |
-
|
98 |
-
if ( GADWP_Tools::get_cache( 'gapi_errors' ) ) {
|
99 |
-
$ed_bubble = '!';
|
100 |
-
} else {
|
101 |
-
$ed_bubble = '';
|
102 |
-
}
|
103 |
-
|
104 |
-
wp_enqueue_script( 'gadwp-backend-ui', plugins_url( 'js/ui.js', __FILE__ ), array( 'jquery' ), GADWP_CURRENT_VERSION, true );
|
105 |
-
|
106 |
-
/* @formatter:off */
|
107 |
-
wp_localize_script( 'gadwp-backend-ui', 'gadwp_ui_data', array(
|
108 |
-
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
109 |
-
'security' => wp_create_nonce( 'gadwp_dismiss_notices' ),
|
110 |
-
'ed_bubble' => $ed_bubble,
|
111 |
-
)
|
112 |
-
);
|
113 |
-
/* @formatter:on */
|
114 |
-
|
115 |
-
if ( $this->gadwp->config->options['switch_profile'] && count( $this->gadwp->config->options['ga_profiles_list'] ) > 1 ) {
|
116 |
-
$views = array();
|
117 |
-
foreach ( $this->gadwp->config->options['ga_profiles_list'] as $items ) {
|
118 |
-
if ( $items[3] ) {
|
119 |
-
$views[$items[1]] = esc_js( GADWP_Tools::strip_protocol( $items[3] ) ); // . ' ⇒ ' . $items[0] );
|
120 |
-
}
|
121 |
-
}
|
122 |
-
} else {
|
123 |
-
$views = false;
|
124 |
-
}
|
125 |
-
|
126 |
-
/*
|
127 |
-
* Main Dashboard Widgets Styles & Scripts
|
128 |
-
*/
|
129 |
-
$widgets_hooks = array( 'index.php' );
|
130 |
-
|
131 |
-
if ( in_array( $new_hook, $widgets_hooks ) ) {
|
132 |
-
if ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_back'] ) && $this->gadwp->config->options['dashboard_widget'] ) {
|
133 |
-
|
134 |
-
if ( $this->gadwp->config->options['ga_target_geomap'] ) {
|
135 |
-
$country_codes = GADWP_Tools::get_countrycodes();
|
136 |
-
if ( isset( $country_codes[$this->gadwp->config->options['ga_target_geomap']] ) ) {
|
137 |
-
$region = $this->gadwp->config->options['ga_target_geomap'];
|
138 |
-
} else {
|
139 |
-
$region = false;
|
140 |
-
}
|
141 |
-
} else {
|
142 |
-
$region = false;
|
143 |
-
}
|
144 |
-
|
145 |
-
wp_enqueue_style( 'gadwp-nprogress', GADWP_URL . 'common/nprogress/nprogress.css', null, GADWP_CURRENT_VERSION );
|
146 |
-
|
147 |
-
wp_enqueue_style( 'gadwp-backend-item-reports', GADWP_URL . 'admin/css/admin-widgets.css', null, GADWP_CURRENT_VERSION );
|
148 |
-
|
149 |
-
wp_register_style( 'jquery-ui-tooltip-html', GADWP_URL . 'common/realtime/jquery.ui.tooltip.html.css' );
|
150 |
-
|
151 |
-
wp_enqueue_style( 'jquery-ui-tooltip-html' );
|
152 |
-
|
153 |
-
wp_register_script( 'jquery-ui-tooltip-html', GADWP_URL . 'common/realtime/jquery.ui.tooltip.html.js' );
|
154 |
-
|
155 |
-
wp_register_script( 'googlecharts', 'https://www.gstatic.com/charts/loader.js', array(), null );
|
156 |
-
|
157 |
-
wp_enqueue_script( 'gadwp-nprogress', GADWP_URL . 'common/nprogress/nprogress.js', array( 'jquery' ), GADWP_CURRENT_VERSION );
|
158 |
-
|
159 |
-
wp_enqueue_script( 'gadwp-backend-dashboard-reports', GADWP_URL . 'common/js/reports5.js', array( 'jquery', 'googlecharts', 'gadwp-nprogress', 'jquery-ui-tooltip', 'jquery-ui-core', 'jquery-ui-position', 'jquery-ui-tooltip-html' ), GADWP_CURRENT_VERSION, true );
|
160 |
-
|
161 |
-
/* @formatter:off */
|
162 |
-
|
163 |
-
$datelist = array(
|
164 |
-
'realtime' => __( "Real-Time", 'google-analytics-dashboard-for-wp' ),
|
165 |
-
'today' => __( "Today", 'google-analytics-dashboard-for-wp' ),
|
166 |
-
'yesterday' => __( "Yesterday", 'google-analytics-dashboard-for-wp' ),
|
167 |
-
'7daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 7 ),
|
168 |
-
'14daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 14 ),
|
169 |
-
'30daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 30 ),
|
170 |
-
'90daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 90 ),
|
171 |
-
'365daysAgo' => sprintf( _n( "%s Year", "%s Years", 1, 'google-analytics-dashboard-for-wp' ), __('One', 'google-analytics-dashboard-for-wp') ),
|
172 |
-
'1095daysAgo' => sprintf( _n( "%s Year", "%s Years", 3, 'google-analytics-dashboard-for-wp' ), __('Three', 'google-analytics-dashboard-for-wp') ),
|
173 |
-
);
|
174 |
-
|
175 |
-
|
176 |
-
if ( $this->gadwp->config->options['user_api'] && ! $this->gadwp->config->options['backend_realtime_report'] ) {
|
177 |
-
array_shift( $datelist );
|
178 |
-
}
|
179 |
-
|
180 |
-
wp_localize_script( 'gadwp-backend-dashboard-reports', 'gadwpItemData', array(
|
181 |
-
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
182 |
-
'security' => wp_create_nonce( 'gadwp_backend_item_reports' ),
|
183 |
-
'dateList' => $datelist,
|
184 |
-
'reportList' => array(
|
185 |
-
'sessions' => __( "Sessions", 'google-analytics-dashboard-for-wp' ),
|
186 |
-
'users' => __( "Users", 'google-analytics-dashboard-for-wp' ),
|
187 |
-
'organicSearches' => __( "Organic", 'google-analytics-dashboard-for-wp' ),
|
188 |
-
'pageviews' => __( "Page Views", 'google-analytics-dashboard-for-wp' ),
|
189 |
-
'visitBounceRate' => __( "Bounce Rate", 'google-analytics-dashboard-for-wp' ),
|
190 |
-
'locations' => __( "Location", 'google-analytics-dashboard-for-wp' ),
|
191 |
-
'contentpages' => __( "Pages", 'google-analytics-dashboard-for-wp' ),
|
192 |
-
'referrers' => __( "Referrers", 'google-analytics-dashboard-for-wp' ),
|
193 |
-
'searches' => __( "Searches", 'google-analytics-dashboard-for-wp' ),
|
194 |
-
'trafficdetails' => __( "Traffic", 'google-analytics-dashboard-for-wp' ),
|
195 |
-
'technologydetails' => __( "Technology", 'google-analytics-dashboard-for-wp' ),
|
196 |
-
'404errors' => __( "404 Errors", 'google-analytics-dashboard-for-wp' ),
|
197 |
-
),
|
198 |
-
'i18n' => array(
|
199 |
-
__( "A JavaScript Error is blocking plugin resources!", 'google-analytics-dashboard-for-wp' ), //0
|
200 |
-
__( "Traffic Mediums", 'google-analytics-dashboard-for-wp' ),
|
201 |
-
__( "Visitor Type", 'google-analytics-dashboard-for-wp' ),
|
202 |
-
__( "Search Engines", 'google-analytics-dashboard-for-wp' ),
|
203 |
-
__( "Social Networks", 'google-analytics-dashboard-for-wp' ),
|
204 |
-
__( "Sessions", 'google-analytics-dashboard-for-wp' ),
|
205 |
-
__( "Users", 'google-analytics-dashboard-for-wp' ),
|
206 |
-
__( "Page Views", 'google-analytics-dashboard-for-wp' ),
|
207 |
-
__( "Bounce Rate", 'google-analytics-dashboard-for-wp' ),
|
208 |
-
__( "Organic Search", 'google-analytics-dashboard-for-wp' ),
|
209 |
-
__( "Pages/Session", 'google-analytics-dashboard-for-wp' ),
|
210 |
-
__( "Invalid response", 'google-analytics-dashboard-for-wp' ),
|
211 |
-
__( "No Data", 'google-analytics-dashboard-for-wp' ),
|
212 |
-
__( "This report is unavailable", 'google-analytics-dashboard-for-wp' ),
|
213 |
-
__( "report generated by", 'google-analytics-dashboard-for-wp' ), //14
|
214 |
-
__( "This plugin needs an authorization:", 'google-analytics-dashboard-for-wp' ) . ' <a href="' . menu_page_url( 'gadwp_settings', false ) . '">' . __( "authorize the plugin", 'google-analytics-dashboard-for-wp' ) . '</a>.',
|
215 |
-
__( "Browser", 'google-analytics-dashboard-for-wp' ), //16
|
216 |
-
__( "Operating System", 'google-analytics-dashboard-for-wp' ),
|
217 |
-
__( "Screen Resolution", 'google-analytics-dashboard-for-wp' ),
|
218 |
-
__( "Mobile Brand", 'google-analytics-dashboard-for-wp' ),
|
219 |
-
__( "REFERRALS", 'google-analytics-dashboard-for-wp' ), //20
|
220 |
-
__( "KEYWORDS", 'google-analytics-dashboard-for-wp' ),
|
221 |
-
__( "SOCIAL", 'google-analytics-dashboard-for-wp' ),
|
222 |
-
__( "CAMPAIGN", 'google-analytics-dashboard-for-wp' ),
|
223 |
-
__( "DIRECT", 'google-analytics-dashboard-for-wp' ),
|
224 |
-
__( "NEW", 'google-analytics-dashboard-for-wp' ), //25
|
225 |
-
__( "Time on Page", 'google-analytics-dashboard-for-wp' ),
|
226 |
-
__( "Page Load Time", 'google-analytics-dashboard-for-wp' ),
|
227 |
-
__( "Session Duration", 'google-analytics-dashboard-for-wp' ),
|
228 |
-
),
|
229 |
-
'rtLimitPages' => $this->gadwp->config->options['ga_realtime_pages'],
|
230 |
-
'colorVariations' => GADWP_Tools::variations( $this->gadwp->config->options['theme_color'] ),
|
231 |
-
'region' => $region,
|
232 |
-
'mapsApiKey' => apply_filters( 'gadwp_maps_api_key', $this->gadwp->config->options['maps_api_key'] ),
|
233 |
-
'language' => get_bloginfo( 'language' ),
|
234 |
-
'viewList' => $views,
|
235 |
-
'scope' => 'admin-widgets',
|
236 |
-
)
|
237 |
-
|
238 |
-
);
|
239 |
-
/* @formatter:on */
|
240 |
-
}
|
241 |
-
}
|
242 |
-
|
243 |
-
/*
|
244 |
-
* Posts/Pages List Styles & Scripts
|
245 |
-
*/
|
246 |
-
$contentstats_hooks = array( 'edit.php' );
|
247 |
-
if ( in_array( $hook, $contentstats_hooks ) ) {
|
248 |
-
if ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_back'] ) && $this->gadwp->config->options['backend_item_reports'] ) {
|
249 |
-
|
250 |
-
if ( $this->gadwp->config->options['ga_target_geomap'] ) {
|
251 |
-
$country_codes = GADWP_Tools::get_countrycodes();
|
252 |
-
if ( isset( $country_codes[$this->gadwp->config->options['ga_target_geomap']] ) ) {
|
253 |
-
$region = $this->gadwp->config->options['ga_target_geomap'];
|
254 |
-
} else {
|
255 |
-
$region = false;
|
256 |
-
}
|
257 |
-
} else {
|
258 |
-
$region = false;
|
259 |
-
}
|
260 |
-
|
261 |
-
wp_enqueue_style( 'gadwp-nprogress', GADWP_URL . 'common/nprogress/nprogress.css', null, GADWP_CURRENT_VERSION );
|
262 |
-
|
263 |
-
wp_enqueue_style( 'gadwp-backend-item-reports', GADWP_URL . 'admin/css/item-reports.css', null, GADWP_CURRENT_VERSION );
|
264 |
-
|
265 |
-
wp_enqueue_style( "wp-jquery-ui-dialog" );
|
266 |
-
|
267 |
-
wp_register_script( 'googlecharts', 'https://www.gstatic.com/charts/loader.js', array(), null );
|
268 |
-
|
269 |
-
wp_enqueue_script( 'gadwp-nprogress', GADWP_URL . 'common/nprogress/nprogress.js', array( 'jquery' ), GADWP_CURRENT_VERSION );
|
270 |
-
|
271 |
-
wp_enqueue_script( 'gadwp-backend-item-reports', GADWP_URL . 'common/js/reports5.js', array( 'gadwp-nprogress', 'googlecharts', 'jquery', 'jquery-ui-dialog' ), GADWP_CURRENT_VERSION, true );
|
272 |
-
|
273 |
-
/* @formatter:off */
|
274 |
-
wp_localize_script( 'gadwp-backend-item-reports', 'gadwpItemData', array(
|
275 |
-
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
276 |
-
'security' => wp_create_nonce( 'gadwp_backend_item_reports' ),
|
277 |
-
'dateList' => array(
|
278 |
-
'today' => __( "Today", 'google-analytics-dashboard-for-wp' ),
|
279 |
-
'yesterday' => __( "Yesterday", 'google-analytics-dashboard-for-wp' ),
|
280 |
-
'7daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 7 ),
|
281 |
-
'14daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 14 ),
|
282 |
-
'30daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 30 ),
|
283 |
-
'90daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 90 ),
|
284 |
-
'365daysAgo' => sprintf( _n( "%s Year", "%s Years", 1, 'google-analytics-dashboard-for-wp' ), __('One', 'google-analytics-dashboard-for-wp') ),
|
285 |
-
'1095daysAgo' => sprintf( _n( "%s Year", "%s Years", 3, 'google-analytics-dashboard-for-wp' ), __('Three', 'google-analytics-dashboard-for-wp') ),
|
286 |
-
),
|
287 |
-
'reportList' => array(
|
288 |
-
'uniquePageviews' => __( "Unique Views", 'google-analytics-dashboard-for-wp' ),
|
289 |
-
'users' => __( "Users", 'google-analytics-dashboard-for-wp' ),
|
290 |
-
'organicSearches' => __( "Organic", 'google-analytics-dashboard-for-wp' ),
|
291 |
-
'pageviews' => __( "Page Views", 'google-analytics-dashboard-for-wp' ),
|
292 |
-
'visitBounceRate' => __( "Bounce Rate", 'google-analytics-dashboard-for-wp' ),
|
293 |
-
'locations' => __( "Location", 'google-analytics-dashboard-for-wp' ),
|
294 |
-
'referrers' => __( "Referrers", 'google-analytics-dashboard-for-wp' ),
|
295 |
-
'searches' => __( "Searches", 'google-analytics-dashboard-for-wp' ),
|
296 |
-
'trafficdetails' => __( "Traffic", 'google-analytics-dashboard-for-wp' ),
|
297 |
-
'technologydetails' => __( "Technology", 'google-analytics-dashboard-for-wp' ),
|
298 |
-
),
|
299 |
-
'i18n' => array(
|
300 |
-
__( "A JavaScript Error is blocking plugin resources!", 'google-analytics-dashboard-for-wp' ), //0
|
301 |
-
__( "Traffic Mediums", 'google-analytics-dashboard-for-wp' ),
|
302 |
-
__( "Visitor Type", 'google-analytics-dashboard-for-wp' ),
|
303 |
-
__( "Social Networks", 'google-analytics-dashboard-for-wp' ),
|
304 |
-
__( "Search Engines", 'google-analytics-dashboard-for-wp' ),
|
305 |
-
__( "Unique Views", 'google-analytics-dashboard-for-wp' ),
|
306 |
-
__( "Users", 'google-analytics-dashboard-for-wp' ),
|
307 |
-
__( "Page Views", 'google-analytics-dashboard-for-wp' ),
|
308 |
-
__( "Bounce Rate", 'google-analytics-dashboard-for-wp' ),
|
309 |
-
__( "Organic Search", 'google-analytics-dashboard-for-wp' ),
|
310 |
-
__( "Pages/Session", 'google-analytics-dashboard-for-wp' ),
|
311 |
-
__( "Invalid response", 'google-analytics-dashboard-for-wp' ),
|
312 |
-
__( "No Data", 'google-analytics-dashboard-for-wp' ),
|
313 |
-
__( "This report is unavailable", 'google-analytics-dashboard-for-wp' ),
|
314 |
-
__( "report generated by", 'google-analytics-dashboard-for-wp' ), //14
|
315 |
-
__( "This plugin needs an authorization:", 'google-analytics-dashboard-for-wp' ) . ' <a href="' . menu_page_url( 'gadwp_settings', false ) . '">' . __( "authorize the plugin", 'google-analytics-dashboard-for-wp' ) . '</a>.',
|
316 |
-
__( "Browser", 'google-analytics-dashboard-for-wp' ), //16
|
317 |
-
__( "Operating System", 'google-analytics-dashboard-for-wp' ),
|
318 |
-
__( "Screen Resolution", 'google-analytics-dashboard-for-wp' ),
|
319 |
-
__( "Mobile Brand", 'google-analytics-dashboard-for-wp' ), //19
|
320 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ),
|
321 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ),
|
322 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ),
|
323 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ),
|
324 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ),
|
325 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ), //25
|
326 |
-
__( "Time on Page", 'google-analytics-dashboard-for-wp' ),
|
327 |
-
__( "Page Load Time", 'google-analytics-dashboard-for-wp' ),
|
328 |
-
__( "Exit Rate", 'google-analytics-dashboard-for-wp' ),
|
329 |
-
),
|
330 |
-
'colorVariations' => GADWP_Tools::variations( $this->gadwp->config->options['theme_color'] ),
|
331 |
-
'region' => $region,
|
332 |
-
'mapsApiKey' => apply_filters( 'gadwp_maps_api_key', $this->gadwp->config->options['maps_api_key'] ),
|
333 |
-
'language' => get_bloginfo( 'language' ),
|
334 |
-
'viewList' => false,
|
335 |
-
'scope' => 'admin-item',
|
336 |
-
)
|
337 |
-
);
|
338 |
-
/* @formatter:on */
|
339 |
-
}
|
340 |
-
}
|
341 |
-
|
342 |
-
/*
|
343 |
-
* Settings Styles & Scripts
|
344 |
-
*/
|
345 |
-
$settings_hooks = array( '_page_gadwp_settings', '_page_gadwp_backend_settings', '_page_gadwp_frontend_settings', '_page_gadwp_tracking_settings', '_page_gadwp_errors_debugging' );
|
346 |
-
|
347 |
-
if ( in_array( $new_hook, $settings_hooks ) ) {
|
348 |
-
wp_enqueue_style( 'wp-color-picker' );
|
349 |
-
wp_enqueue_script( 'wp-color-picker' );
|
350 |
-
wp_enqueue_script( 'wp-color-picker-script-handle', plugins_url( 'js/wp-color-picker-script.js', __FILE__ ), array( 'wp-color-picker' ), false, true );
|
351 |
-
wp_enqueue_script( 'gadwp-settings', plugins_url( 'js/settings.js', __FILE__ ), array( 'jquery' ), GADWP_CURRENT_VERSION, true );
|
352 |
-
}
|
353 |
-
}
|
354 |
-
|
355 |
-
/**
|
356 |
-
* Add "Settings" link in Plugins List
|
357 |
-
*
|
358 |
-
* @param
|
359 |
-
* $links
|
360 |
-
* @return array
|
361 |
-
*/
|
362 |
-
public function settings_link( $links ) {
|
363 |
-
$settings_link = '<a href="' . esc_url( get_admin_url( null, 'admin.php?page=gadwp_settings' ) ) . '">' . __( "Settings", 'google-analytics-dashboard-for-wp' ) . '</a>';
|
364 |
-
array_unshift( $links, $settings_link );
|
365 |
-
return $links;
|
366 |
-
}
|
367 |
-
}
|
368 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/tracking.php
DELETED
@@ -1,283 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Tracking functions for reporting plugin usage to the site for users that have opted in
|
4 |
-
*
|
5 |
-
* @package ExactMetrics
|
6 |
-
* @subpackage Admin
|
7 |
-
* @copyright Copyright (c) 2018, Chris Christoff
|
8 |
-
* @since 5.3.4
|
9 |
-
*/
|
10 |
-
|
11 |
-
// Exit if accessed directly
|
12 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
-
exit;
|
14 |
-
}
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Usage tracking
|
18 |
-
*
|
19 |
-
* @access public
|
20 |
-
* @since 7.0.0
|
21 |
-
* @return void
|
22 |
-
*/
|
23 |
-
class ExactMetrics_Tracking {
|
24 |
-
|
25 |
-
public function __construct() {
|
26 |
-
$this->gadwp = GADWP();
|
27 |
-
add_action( 'init', array( $this, 'schedule_send' ) );
|
28 |
-
add_action( 'admin_head', array( $this, 'check_for_optin' ) );
|
29 |
-
add_action( 'admin_head', array( $this, 'check_for_optout' ) );
|
30 |
-
add_filter( 'cron_schedules', array( $this, 'add_schedules' ) );
|
31 |
-
add_action( 'exactmetrics_usage_tracking_cron', array( $this, 'send_checkin' ) );
|
32 |
-
add_action( 'exactmetrics_settings_usage_tracking', array( $this, 'check_for_settings_optin' ) );
|
33 |
-
add_action( 'admin_notices', array( $this, 'setup_notice' ), 999 );
|
34 |
-
}
|
35 |
-
|
36 |
-
private function get_data() {
|
37 |
-
$data = array();
|
38 |
-
|
39 |
-
$options = get_option( 'gadwp_options' );
|
40 |
-
if ( empty( $options ) ) {
|
41 |
-
$options = array();
|
42 |
-
} else {
|
43 |
-
$options = (array) json_decode( $options );
|
44 |
-
}
|
45 |
-
|
46 |
-
$network_options = get_site_option( 'gadwp_network_options' );
|
47 |
-
if ( empty( $network_options ) ) {
|
48 |
-
$network_options = array();
|
49 |
-
} else {
|
50 |
-
$network_options = (array) json_decode( $network_options );
|
51 |
-
}
|
52 |
-
|
53 |
-
// Foreach network options, prefix with network
|
54 |
-
if ( ! empty ( $network_options ) ) {
|
55 |
-
foreach ( $network_options as $noptionid => $noptionvalue ) {
|
56 |
-
$new_id = 'network_' . $noptionid;
|
57 |
-
$options[ $new_id ] = $noptionvalue;
|
58 |
-
}
|
59 |
-
}
|
60 |
-
|
61 |
-
// Ensure tokens and secrets are never sent to us
|
62 |
-
unset( $options['token'] );
|
63 |
-
unset( $options['client_secret'] );
|
64 |
-
unset( $options['network_token'] );
|
65 |
-
unset( $options['network_client_secret'] );
|
66 |
-
|
67 |
-
// Retrieve current theme info
|
68 |
-
$theme_data = wp_get_theme();
|
69 |
-
|
70 |
-
$tracking_mode = 'default';
|
71 |
-
if ( ! empty( $options['tracking_type'] ) || ! empty( $options['network_tracking_type'] ) ) {
|
72 |
-
$tracking_mode = 'minor';
|
73 |
-
}
|
74 |
-
if ( ! empty( $options['ga_with_gtag'] ) || ! empty( $options['network_ga_with_gtag'] ) ) {
|
75 |
-
$tracking_mode = 'gtag';
|
76 |
-
}
|
77 |
-
|
78 |
-
$update_mode = 'none';
|
79 |
-
if ( ! empty( $options['automatic_updates_minorversion'] ) || ! empty( $options['network_automatic_updates_minorversion'] ) ) {
|
80 |
-
$update_mode = 'minor';
|
81 |
-
}
|
82 |
-
|
83 |
-
|
84 |
-
$count_b = 1;
|
85 |
-
if ( is_multisite() ) {
|
86 |
-
if ( function_exists( 'get_blog_count' ) ) {
|
87 |
-
$count_b = get_blog_count();
|
88 |
-
} else {
|
89 |
-
$count_b = 'Not Set';
|
90 |
-
}
|
91 |
-
}
|
92 |
-
|
93 |
-
$data['php_version'] = phpversion();
|
94 |
-
$data['mi_version'] = GADWP_CURRENT_VERSION;
|
95 |
-
$data['wp_version'] = get_bloginfo( 'version' );
|
96 |
-
$data['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
|
97 |
-
$data['multisite'] = is_multisite();
|
98 |
-
$data['url'] = home_url();
|
99 |
-
$data['themename'] = $theme_data->Name;
|
100 |
-
$data['themeversion'] = $theme_data->Version;
|
101 |
-
$data['settings'] = $options;
|
102 |
-
$data['tracking_mode'] = $tracking_mode;
|
103 |
-
$data['autoupdate'] = $update_mode;
|
104 |
-
$data['sites'] = $count_b;
|
105 |
-
$data['usagetracking'] = get_option( 'exactmetrics_usage_tracking_config', false );
|
106 |
-
$data['usercount'] = function_exists( 'get_user_count' ) ? get_user_count() : 'Not Set';
|
107 |
-
$data['timezoneoffset']= date('P');
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
// Retrieve current plugin information
|
112 |
-
if( ! function_exists( 'get_plugins' ) ) {
|
113 |
-
include ABSPATH . '/wp-admin/includes/plugin.php';
|
114 |
-
}
|
115 |
-
|
116 |
-
$plugins = array_keys( get_plugins() );
|
117 |
-
$active_plugins = get_option( 'active_plugins', array() );
|
118 |
-
|
119 |
-
foreach ( $plugins as $key => $plugin ) {
|
120 |
-
if ( in_array( $plugin, $active_plugins ) ) {
|
121 |
-
// Remove active plugins from list so we can show active and inactive separately
|
122 |
-
unset( $plugins[ $key ] );
|
123 |
-
}
|
124 |
-
}
|
125 |
-
|
126 |
-
$data['active_plugins'] = $active_plugins;
|
127 |
-
$data['inactive_plugins'] = $plugins;
|
128 |
-
$data['locale'] = get_locale();
|
129 |
-
|
130 |
-
return $data;
|
131 |
-
}
|
132 |
-
|
133 |
-
public function send_checkin( $override = false, $ignore_last_checkin = false ) {
|
134 |
-
|
135 |
-
$home_url = trailingslashit( home_url() );
|
136 |
-
if ( strpos( $home_url, 'exactmetrics.com' ) !== false ) {
|
137 |
-
return false;
|
138 |
-
}
|
139 |
-
|
140 |
-
if( ! $this->tracking_allowed() && ! $override ) {
|
141 |
-
return false;
|
142 |
-
}
|
143 |
-
|
144 |
-
// Send a maximum of once per week
|
145 |
-
$last_send = get_option( 'exactmetrics_usage_tracking_last_checkin' );
|
146 |
-
if ( is_numeric( $last_send ) && $last_send > strtotime( '-1 week' ) && ! $ignore_last_checkin ) {
|
147 |
-
return false;
|
148 |
-
}
|
149 |
-
|
150 |
-
$request = wp_remote_post( 'https://miusage.com/v1/em-checkin/', array(
|
151 |
-
'method' => 'POST',
|
152 |
-
'timeout' => 5,
|
153 |
-
'redirection' => 5,
|
154 |
-
'httpversion' => '1.1',
|
155 |
-
'blocking' => false,
|
156 |
-
'body' => $this->get_data(),
|
157 |
-
'user-agent' => 'EM/' . GADWP_CURRENT_VERSION . '; ' . get_bloginfo( 'url' )
|
158 |
-
) );
|
159 |
-
|
160 |
-
// If we have completed successfully, recheck in 1 week
|
161 |
-
update_option( 'exactmetrics_usage_tracking_last_checkin', time() );
|
162 |
-
return true;
|
163 |
-
}
|
164 |
-
|
165 |
-
private function tracking_allowed() {
|
166 |
-
return (bool) $this->get_option( 'usage_tracking', 0 );
|
167 |
-
}
|
168 |
-
|
169 |
-
public function schedule_send() {
|
170 |
-
if ( ! wp_next_scheduled( 'exactmetrics_usage_tracking_cron' ) ) {
|
171 |
-
$tracking = array();
|
172 |
-
$tracking['day'] = rand( 0, 6 );
|
173 |
-
$tracking['hour'] = rand( 0, 23 );
|
174 |
-
$tracking['minute'] = rand( 0, 59 );
|
175 |
-
$tracking['second'] = rand( 0, 59 );
|
176 |
-
$tracking['offset'] = ( $tracking['day'] * DAY_IN_SECONDS ) +
|
177 |
-
( $tracking['hour'] * HOUR_IN_SECONDS ) +
|
178 |
-
( $tracking['minute'] * MINUTE_IN_SECONDS ) +
|
179 |
-
$tracking['second'];
|
180 |
-
$tracking['initsend'] = strtotime("next sunday") + $tracking['offset'];
|
181 |
-
|
182 |
-
wp_schedule_event( $tracking['initsend'], 'weekly', 'exactmetrics_usage_tracking_cron' );
|
183 |
-
update_option( 'exactmetrics_usage_tracking_config', $tracking );
|
184 |
-
}
|
185 |
-
}
|
186 |
-
|
187 |
-
public function check_for_settings_optin( $new_value ) {
|
188 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
189 |
-
return;
|
190 |
-
}
|
191 |
-
|
192 |
-
$new_value = intval( $new_value );
|
193 |
-
$current_value = $this->get_option( 'usage_tracking', 0 );
|
194 |
-
|
195 |
-
if ( $current_value == $new_value ) {
|
196 |
-
return;
|
197 |
-
}
|
198 |
-
|
199 |
-
if ( $new_value ) {
|
200 |
-
$this->send_checkin( true, true );
|
201 |
-
update_option( 'exactmetrics_tracking_notice', 1 );
|
202 |
-
} else {
|
203 |
-
update_option( 'exactmetrics_tracking_notice', 0 );
|
204 |
-
}
|
205 |
-
}
|
206 |
-
|
207 |
-
public function check_for_optin() {
|
208 |
-
if ( ! ( ! empty( $_REQUEST['em_action'] ) && 'opt_into_tracking' === $_REQUEST['em_action'] ) ) {
|
209 |
-
return;
|
210 |
-
}
|
211 |
-
|
212 |
-
if ( $this->get_option( 'usage_tracking', 0 ) ) {
|
213 |
-
return;
|
214 |
-
}
|
215 |
-
|
216 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
217 |
-
return;
|
218 |
-
}
|
219 |
-
|
220 |
-
$this->set_option( 'usage_tracking', 1 );
|
221 |
-
$this->send_checkin( true, true );
|
222 |
-
update_option( 'exactmetrics_tracking_notice', 1 );
|
223 |
-
}
|
224 |
-
|
225 |
-
public function check_for_optout() {
|
226 |
-
if ( ! ( ! empty( $_REQUEST['em_action'] ) && 'opt_out_of_tracking' === $_REQUEST['em_action'] ) ) {
|
227 |
-
return;
|
228 |
-
}
|
229 |
-
|
230 |
-
if ( $this->get_option( 'usage_tracking', 0 ) ) {
|
231 |
-
return;
|
232 |
-
}
|
233 |
-
|
234 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
235 |
-
return;
|
236 |
-
}
|
237 |
-
|
238 |
-
$this->set_option( 'usage_tracking', 0 );
|
239 |
-
update_option( 'exactmetrics_tracking_notice', 1 );
|
240 |
-
}
|
241 |
-
|
242 |
-
public function setup_notice(){
|
243 |
-
if ( ! is_network_admin() && ( ! isset( $_GET['page'] ) || ( isset( $_GET['page'] ) && $_GET['page'] !== 'gadwp_tracking_settings' ) && $_GET['page'] !== 'gadwp_settings' ) ) {
|
244 |
-
if ( ! get_option( 'exactmetrics_tracking_notice' ) ) {
|
245 |
-
if ( ! $this->get_option( 'usage_tracking', 0 ) ) {
|
246 |
-
$optin_url = add_query_arg( 'em_action', 'opt_into_tracking' );
|
247 |
-
$optout_url = add_query_arg( 'em_action', 'opt_out_of_tracking' );
|
248 |
-
echo '<div class="updated"><p>';
|
249 |
-
echo sprintf( esc_html__( 'ExactMetrics would like to better understand how our users use our plugin so we can get a better understanding of which features and bugfixes to prioritize. %1$sCan we collect some %2$sinformation about our plugin usage?%3$s', 'google-analytics-dashboard-for-wp' ), '<br />', '<a href="https://exactmetrics.com/usage-tracking/?utm_source=wpdashboard&utm_campaign=usagetracking&utm_medium=plugin" target="_blank">', '</a>' );
|
250 |
-
echo ' <a href="' . esc_url( $optin_url ) . '" class="button-secondary">' . __( 'Yes, I\'d like to help out', 'google-analytics-dashboard-for-wp' ) . '</a>';
|
251 |
-
echo ' <a href="' . esc_url( $optout_url ) . '" class="button-secondary">' . __( 'No thanks', 'google-analytics-dashboard-for-wp' ) . '</a>';
|
252 |
-
echo '</p></div>';
|
253 |
-
return;
|
254 |
-
}
|
255 |
-
}
|
256 |
-
}
|
257 |
-
}
|
258 |
-
|
259 |
-
public function add_schedules( $schedules = array() ) {
|
260 |
-
// Adds once weekly to the existing schedules.
|
261 |
-
$schedules['weekly'] = array(
|
262 |
-
'interval' => 604800,
|
263 |
-
'display' => __( 'Once Weekly', 'google-analytics-dashboard-for-wp' )
|
264 |
-
);
|
265 |
-
return $schedules;
|
266 |
-
}
|
267 |
-
|
268 |
-
public function get_option( $option, $default = false ) {
|
269 |
-
if ( ! empty( $this->gadwp->config->options ) && is_array( $this->gadwp->config->options ) && isset( $this->gadwp->config->options[$option] ) ) {
|
270 |
-
return $this->gadwp->config->options[$option];
|
271 |
-
} else {
|
272 |
-
return $default;
|
273 |
-
}
|
274 |
-
}
|
275 |
-
|
276 |
-
public function set_option( $option, $value ) {
|
277 |
-
$new_options = array();
|
278 |
-
$new_options[$option] = $value;
|
279 |
-
$options = array_merge( $this->gadwp->config->options, $new_options );
|
280 |
-
$this->gadwp->config->options = $options;
|
281 |
-
$this->gadwp->config->set_plugin_options( false );
|
282 |
-
}
|
283 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/views/access-code.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Copyright 2018 ExactMetrics team
|
5 |
-
* Author URI: https://exactmetrics.com
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
?>
|
10 |
-
<form name="input" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" method="post">
|
11 |
-
<table class="gadwp-settings-options">
|
12 |
-
<tr>
|
13 |
-
<td colspan="2" class="gadwp-settings-info">
|
14 |
-
<?php echo __( "Use this link to get your <strong>one-time-use</strong> access code:", 'google-analytics-dashboard-for-wp' ) . ' <a href="' . $data['authUrl'] . '" id="gapi-access-code" target="_blank">' . __ ( "Get Access Code", 'google-analytics-dashboard-for-wp' ) . '</a>.'; ?>
|
15 |
-
</td>
|
16 |
-
</tr>
|
17 |
-
<tr>
|
18 |
-
<td class="gadwp-settings-title">
|
19 |
-
<label for="gadwp_access_code" title="<?php _e("Use the red link to get your access code! You need to generate a new one each time you authorize!",'google-analytics-dashboard-for-wp')?>"><?php echo _e( "Access Code:", 'google-analytics-dashboard-for-wp' ); ?></label>
|
20 |
-
</td>
|
21 |
-
<td>
|
22 |
-
<input type="text" id="gadwp_access_code" name="gadwp_access_code" value="" size="61" autocomplete="off" pattern=".\/.{30,}" required="required" title="<?php _e("Use the red link to get your access code! You need to generate a new one each time you authorize!",'google-analytics-dashboard-for-wp')?>">
|
23 |
-
</td>
|
24 |
-
</tr>
|
25 |
-
<tr>
|
26 |
-
<td colspan="2">
|
27 |
-
<hr>
|
28 |
-
</td>
|
29 |
-
</tr>
|
30 |
-
<tr>
|
31 |
-
<td colspan="2">
|
32 |
-
<input type="submit" class="button button-secondary" name="gadwp_authorize" value="<?php _e( "Save Access Code", 'google-analytics-dashboard-for-wp' ); ?>" />
|
33 |
-
</td>
|
34 |
-
</tr>
|
35 |
-
</table>
|
36 |
-
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/widgets.php
DELETED
@@ -1,65 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Backend_Widgets' ) ) {
|
15 |
-
|
16 |
-
class GADWP_Backend_Widgets {
|
17 |
-
|
18 |
-
private $gadwp;
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
$this->gadwp = GADWP();
|
22 |
-
if ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_back'] ) && ( 1 == $this->gadwp->config->options['dashboard_widget'] ) ) {
|
23 |
-
add_action( 'wp_dashboard_setup', array( $this, 'add_widget' ) );
|
24 |
-
}
|
25 |
-
}
|
26 |
-
|
27 |
-
public function add_widget() {
|
28 |
-
wp_add_dashboard_widget( 'gadwp-widget', __( "Google Analytics Dashboard", 'google-analytics-dashboard-for-wp' ), array( $this, 'dashboard_widget' ), $control_callback = null );
|
29 |
-
}
|
30 |
-
|
31 |
-
public function dashboard_widget() {
|
32 |
-
$projectId = 0;
|
33 |
-
|
34 |
-
if ( empty( $this->gadwp->config->options['token'] ) ) {
|
35 |
-
echo '<p>' . __( "This plugin needs an authorization:", 'google-analytics-dashboard-for-wp' ) . '</p><form action="' . menu_page_url( 'gadwp_settings', false ) . '" method="POST">' . get_submit_button( __( "Authorize Plugin", 'google-analytics-dashboard-for-wp' ), 'secondary' ) . '</form>';
|
36 |
-
return;
|
37 |
-
}
|
38 |
-
|
39 |
-
if ( current_user_can( 'manage_options' ) ) {
|
40 |
-
if ( $this->gadwp->config->options['tableid_jail'] ) {
|
41 |
-
$projectId = $this->gadwp->config->options['tableid_jail'];
|
42 |
-
} else {
|
43 |
-
echo '<p>' . __( "An admin should asign a default Google Analytics Profile.", 'google-analytics-dashboard-for-wp' ) . '</p><form action="' . menu_page_url( 'gadwp_settings', false ) . '" method="POST">' . get_submit_button( __( "Select Domain", 'google-analytics-dashboard-for-wp' ), 'secondary' ) . '</form>';
|
44 |
-
return;
|
45 |
-
}
|
46 |
-
} else {
|
47 |
-
if ( $this->gadwp->config->options['tableid_jail'] ) {
|
48 |
-
$projectId = $this->gadwp->config->options['tableid_jail'];
|
49 |
-
} else {
|
50 |
-
echo '<p>' . __( "An admin should asign a default Google Analytics Profile.", 'google-analytics-dashboard-for-wp' ) . '</p><form action="' . menu_page_url( 'gadwp_settings', false ) . '" method="POST">' . get_submit_button( __( "Select Domain", 'google-analytics-dashboard-for-wp' ), 'secondary' ) . '</form>';
|
51 |
-
return;
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
if ( ! ( $projectId ) ) {
|
56 |
-
echo '<p>' . __( "Something went wrong while retrieving property data. You need to create and properly configure a Google Analytics account:", 'google-analytics-dashboard-for-wp' ) . '</p> <form action="https://exactmetrics.com/how-to-set-up-google-analytics-on-your-website/" method="POST">' . get_submit_button( __( "Find out more!", 'google-analytics-dashboard-for-wp' ), 'secondary' ) . '</form>';
|
57 |
-
return;
|
58 |
-
}
|
59 |
-
|
60 |
-
?>
|
61 |
-
<div id="gadwp-window-1"></div>
|
62 |
-
<?php
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/admin-common.css
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.exactmetrics-wooedd-upsell-left {
|
2 |
+
width: 50%;
|
3 |
+
display: table-cell;
|
4 |
+
float: left;
|
5 |
+
}
|
6 |
+
|
7 |
+
.exactmetrics-wooedd-upsell-right {
|
8 |
+
width: 50%;
|
9 |
+
display: table-cell;
|
10 |
+
float: left;
|
11 |
+
}
|
12 |
+
|
13 |
+
.exactmetrics-wooedd-upsell-image {
|
14 |
+
width: 100%;
|
15 |
+
height: auto;
|
16 |
+
padding: 20px;
|
17 |
+
}
|
18 |
+
|
19 |
+
.exactmetrics-wooedd-upsell-image-small {
|
20 |
+
display: none;
|
21 |
+
}
|
22 |
+
|
23 |
+
.exactmetrics-wooedd-upsell-row {
|
24 |
+
display: table;
|
25 |
+
}
|
26 |
+
|
27 |
+
.exactmetrics-wooedd-upsell-left p {
|
28 |
+
margin: 1em 0;
|
29 |
+
font-size: 16px;
|
30 |
+
}
|
31 |
+
|
32 |
+
@media (max-width: 900px) {
|
33 |
+
.exactmetrics-wooedd-upsell-left {
|
34 |
+
width: 100%;
|
35 |
+
}
|
36 |
+
|
37 |
+
.exactmetrics-wooedd-upsell-right {
|
38 |
+
display: none;
|
39 |
+
}
|
40 |
+
|
41 |
+
.exactmetrics-wooedd-upsell-image-small {
|
42 |
+
display: block;
|
43 |
+
}
|
44 |
+
|
45 |
+
.exactmetrics-wooedd-upsell-image-large {
|
46 |
+
display: none;
|
47 |
+
}
|
48 |
+
}
|
assets/css/admin-common.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.exactmetrics-wooedd-upsell-left{width:50%;display:table-cell;float:left}.exactmetrics-wooedd-upsell-right{width:50%;display:table-cell;float:left}.exactmetrics-wooedd-upsell-image{width:100%;height:auto;padding:20px}.exactmetrics-wooedd-upsell-image-small{display:none}.exactmetrics-wooedd-upsell-row{display:table}.exactmetrics-wooedd-upsell-left p{margin:1em 0;font-size:16px}@media (max-width: 900px){.exactmetrics-wooedd-upsell-left{width:100%}.exactmetrics-wooedd-upsell-right{display:none}.exactmetrics-wooedd-upsell-image-small{display:block}.exactmetrics-wooedd-upsell-image-large{display:none}}
|
assets/css/images/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
assets/css/images/logo.png
ADDED
Binary file
|
assets/css/images/logo@2x.png
ADDED
Binary file
|
assets/css/images/mascot.png
ADDED
Binary file
|
assets/css/images/mascot@2x.png
ADDED
Binary file
|
assets/css/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
assets/fonts/README.md
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Updating Icons
|
2 |
+
|
3 |
+
The main font used by MonsterInsights for icons has the font-family: 'Misettings'.
|
4 |
+
|
5 |
+
The files used by this font are
|
6 |
+
|
7 |
+
- assets/fonts/icons.eot
|
8 |
+
- assets/fonts/icons.otf
|
9 |
+
- assets/fonts/icons.ttf
|
10 |
+
- assets/fonts/icons.woff
|
11 |
+
- assets/fonts/icons.woff2
|
12 |
+
|
13 |
+
The font files are generated using [FortAwesome](https://fortawesome.com).
|
14 |
+
|
15 |
+
After generating new files, you'll need to update the files mentioned above & the css
|
16 |
+
used for the icons which can be found in assets/css/admin.css starting on line 135, look
|
17 |
+
for the class `.monstericon-`.
|
assets/fonts/glyphicons-halflings-regular.eot
ADDED
Binary file
|
assets/fonts/glyphicons-halflings-regular.svg
ADDED
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
+
<metadata></metadata>
|
5 |
+
<defs>
|
6 |
+
<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
|
7 |
+
<font-face units-per-em="1200" ascent="960" descent="-240" />
|
8 |
+
<missing-glyph horiz-adv-x="500" />
|
9 |
+
<glyph horiz-adv-x="0" />
|
10 |
+
<glyph horiz-adv-x="400" />
|
11 |
+
<glyph unicode=" " />
|
12 |
+
<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
|
13 |
+
<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
|
14 |
+
<glyph unicode=" " />
|
15 |
+
<glyph unicode="¥" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
|
16 |
+
<glyph unicode=" " horiz-adv-x="650" />
|
17 |
+
<glyph unicode=" " horiz-adv-x="1300" />
|
18 |
+
<glyph unicode=" " horiz-adv-x="650" />
|
19 |
+
<glyph unicode=" " horiz-adv-x="1300" />
|
20 |
+
<glyph unicode=" " horiz-adv-x="433" />
|
21 |
+
<glyph unicode=" " horiz-adv-x="325" />
|
22 |
+
<glyph unicode=" " horiz-adv-x="216" />
|
23 |
+
<glyph unicode=" " horiz-adv-x="216" />
|
24 |
+
<glyph unicode=" " horiz-adv-x="162" />
|
25 |
+
<glyph unicode=" " horiz-adv-x="260" />
|
26 |
+
<glyph unicode=" " horiz-adv-x="72" />
|
27 |
+
<glyph unicode=" " horiz-adv-x="260" />
|
28 |
+
<glyph unicode=" " horiz-adv-x="325" />
|
29 |
+
<glyph unicode="€" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
|
30 |
+
<glyph unicode="₽" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
|
31 |
+
<glyph unicode="−" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
|
32 |
+
<glyph unicode="⌛" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
|
33 |
+
<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" />
|
34 |
+
<glyph unicode="☁" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
|
35 |
+
<glyph unicode="⛺" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
|
36 |
+
<glyph unicode="✉" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
|
37 |
+
<glyph unicode="✏" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
|
38 |
+
<glyph unicode="" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
|
39 |
+
<glyph unicode="" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
|
40 |
+
<glyph unicode="" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
|
41 |
+
<glyph unicode="" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
|
42 |
+
<glyph unicode="" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
|
43 |
+
<glyph unicode="" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
|
44 |
+
<glyph unicode="" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
|
45 |
+
<glyph unicode="" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
|
46 |
+
<glyph unicode="" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
47 |
+
<glyph unicode="" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
|
48 |
+
<glyph unicode="" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
|
49 |
+
<glyph unicode="" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
|
50 |
+
<glyph unicode="" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
|
51 |
+
<glyph unicode="" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
|
52 |
+
<glyph unicode="" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
53 |
+
<glyph unicode="" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
|
54 |
+
<glyph unicode="" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
|
55 |
+
<glyph unicode="" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
|
56 |
+
<glyph unicode="" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
|
57 |
+
<glyph unicode="" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
|
58 |
+
<glyph unicode="" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
|
59 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
|
60 |
+
<glyph unicode="" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
|
61 |
+
<glyph unicode="" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
|
62 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
|
63 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
|
64 |
+
<glyph unicode="" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
|
65 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
|
66 |
+
<glyph unicode="" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
|
67 |
+
<glyph unicode="" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
|
68 |
+
<glyph unicode="" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
|
69 |
+
<glyph unicode="" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
|
70 |
+
<glyph unicode="" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
|
71 |
+
<glyph unicode="" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
|
72 |
+
<glyph unicode="" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
|
73 |
+
<glyph unicode="" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
|
74 |
+
<glyph unicode="" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
|
75 |
+
<glyph unicode="" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
|
76 |
+
<glyph unicode="" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
|
77 |
+
<glyph unicode="" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
|
78 |
+
<glyph unicode="" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
|
79 |
+
<glyph unicode="" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
|
80 |
+
<glyph unicode="" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
|
81 |
+
<glyph unicode="" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
|
82 |
+
<glyph unicode="" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
|
83 |
+
<glyph unicode="" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
|
84 |
+
<glyph unicode="" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
|
85 |
+
<glyph unicode="" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
|
86 |
+
<glyph unicode="" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
|
87 |
+
<glyph unicode="" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
|
88 |
+
<glyph unicode="" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
89 |
+
<glyph unicode="" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
90 |
+
<glyph unicode="" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
|
91 |
+
<glyph unicode="" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
92 |
+
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
93 |
+
<glyph unicode="" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
94 |
+
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
95 |
+
<glyph unicode="" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
|
96 |
+
<glyph unicode="" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
|
97 |
+
<glyph unicode="" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
|
98 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
|
99 |
+
<glyph unicode="" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
|
100 |
+
<glyph unicode="" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
|
101 |
+
<glyph unicode="" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
|
102 |
+
<glyph unicode="" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
|
103 |
+
<glyph unicode="" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
|
104 |
+
<glyph unicode="" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
|
105 |
+
<glyph unicode="" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
|
106 |
+
<glyph unicode="" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
|
107 |
+
<glyph unicode="" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
|
108 |
+
<glyph unicode="" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
|
109 |
+
<glyph unicode="" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
|
110 |
+
<glyph unicode="" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
|
111 |
+
<glyph unicode="" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
|
112 |
+
<glyph unicode="" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
|
113 |
+
<glyph unicode="" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
114 |
+
<glyph unicode="" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
|
115 |
+
<glyph unicode="" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
|
116 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
|
117 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
|
118 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
|
119 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
|
120 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
|
121 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
|
122 |
+
<glyph unicode="" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
|
123 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
|
124 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
|
125 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
|
126 |
+
<glyph unicode="" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
|
127 |
+
<glyph unicode="" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
|
128 |
+
<glyph unicode="" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
|
129 |
+
<glyph unicode="" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
|
130 |
+
<glyph unicode="" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
|
131 |
+
<glyph unicode="" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
|
132 |
+
<glyph unicode="" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
|
133 |
+
<glyph unicode="" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
|
134 |
+
<glyph unicode="" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
|
135 |
+
<glyph unicode="" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
|
136 |
+
<glyph unicode="" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
|
137 |
+
<glyph unicode="" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
|
138 |
+
<glyph unicode="" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
|
139 |
+
<glyph unicode="" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
|
140 |
+
<glyph unicode="" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
|
141 |
+
<glyph unicode="" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
|
142 |
+
<glyph unicode="" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
|
143 |
+
<glyph unicode="" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
|
144 |
+
<glyph unicode="" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
|
145 |
+
<glyph unicode="" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
|
146 |
+
<glyph unicode="" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
|
147 |
+
<glyph unicode="" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
148 |
+
<glyph unicode="" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
|
149 |
+
<glyph unicode="" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
|
150 |
+
<glyph unicode="" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
|
151 |
+
<glyph unicode="" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
152 |
+
<glyph unicode="" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
|
153 |
+
<glyph unicode="" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
|
154 |
+
<glyph unicode="" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
|
155 |
+
<glyph unicode="" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
|
156 |
+
<glyph unicode="" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
|
157 |
+
<glyph unicode="" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
|
158 |
+
<glyph unicode="" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
|
159 |
+
<glyph unicode="" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
|
160 |
+
<glyph unicode="" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
|
161 |
+
<glyph unicode="" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
|
162 |
+
<glyph unicode="" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
|
163 |
+
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
|
164 |
+
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
|
165 |
+
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
|
166 |
+
<glyph unicode="" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
|
167 |
+
<glyph unicode="" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
|
168 |
+
<glyph unicode="" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
|
169 |
+
<glyph unicode="" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
|
170 |
+
<glyph unicode="" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
|
171 |
+
<glyph unicode="" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
|
172 |
+
<glyph unicode="" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
|
173 |
+
<glyph unicode="" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
|
174 |
+
<glyph unicode="" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
|
175 |
+
<glyph unicode="" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
|
176 |
+
<glyph unicode="" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
|
177 |
+
<glyph unicode="" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
|
178 |
+
<glyph unicode="" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
|
179 |
+
<glyph unicode="" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
|
180 |
+
<glyph unicode="" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
|
181 |
+
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
|
182 |
+
<glyph unicode="" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
|
183 |
+
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
|
184 |
+
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
|
185 |
+
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
|
186 |
+
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
|
187 |
+
<glyph unicode="" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
|
188 |
+
<glyph unicode="" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
|
189 |
+
<glyph unicode="" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
|
190 |
+
<glyph unicode="" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
|
191 |
+
<glyph unicode="" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
|
192 |
+
<glyph unicode="" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
|
193 |
+
<glyph unicode="" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
|
194 |
+
<glyph unicode="" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
|
195 |
+
<glyph unicode="" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
|
196 |
+
<glyph unicode="" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
|
197 |
+
<glyph unicode="" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
|
198 |
+
<glyph unicode="" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
|
199 |
+
<glyph unicode="" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
|
200 |
+
<glyph unicode="" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
|
201 |
+
<glyph unicode="" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
|
202 |
+
<glyph unicode="" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
|
203 |
+
<glyph unicode="" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
|
204 |
+
<glyph unicode="" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
|
205 |
+
<glyph unicode="" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
|
206 |
+
<glyph unicode="" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
|
207 |
+
<glyph unicode="" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
|
208 |
+
<glyph unicode="" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
|
209 |
+
<glyph unicode="" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
|
210 |
+
<glyph unicode="" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
|
211 |
+
<glyph unicode="" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
|
212 |
+
<glyph unicode="" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
|
213 |
+
<glyph unicode="" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
|
214 |
+
<glyph unicode="" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
|
215 |
+
<glyph unicode="" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
216 |
+
<glyph unicode="" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
|
217 |
+
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
|
218 |
+
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
|
219 |
+
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
|
220 |
+
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
|
221 |
+
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
|
222 |
+
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
|
223 |
+
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
|
224 |
+
<glyph unicode="" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
|
225 |
+
<glyph unicode="" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
|
226 |
+
<glyph unicode="" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
|
227 |
+
<glyph unicode="" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
|
228 |
+
<glyph unicode="" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
|
229 |
+
<glyph unicode="" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
|
230 |
+
<glyph unicode="" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
|
231 |
+
<glyph unicode="" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
|
232 |
+
<glyph unicode="" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
|
233 |
+
<glyph unicode="" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
|
234 |
+
<glyph unicode="" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
|
235 |
+
<glyph unicode="" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
|
236 |
+
<glyph unicode="" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
|
237 |
+
<glyph unicode="" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
|
238 |
+
<glyph unicode="" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
239 |
+
<glyph unicode="" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
240 |
+
<glyph unicode="" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
241 |
+
<glyph unicode="" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
242 |
+
<glyph unicode="" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
243 |
+
<glyph unicode="" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
|
244 |
+
<glyph unicode="" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
|
245 |
+
<glyph unicode="" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
|
246 |
+
<glyph unicode="" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
|
247 |
+
<glyph unicode="" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
|
248 |
+
<glyph unicode="" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
|
249 |
+
<glyph unicode="" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
|
250 |
+
<glyph unicode="" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
|
251 |
+
<glyph unicode="" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
|
252 |
+
<glyph unicode="" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
|
253 |
+
<glyph unicode="" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
|
254 |
+
<glyph unicode="" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
|
255 |
+
<glyph unicode="" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
|
256 |
+
<glyph unicode="" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
|
257 |
+
<glyph unicode="" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
|
258 |
+
<glyph unicode="" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
|
259 |
+
<glyph unicode="" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
|
260 |
+
<glyph unicode="" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
|
261 |
+
<glyph unicode="" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
|
262 |
+
<glyph unicode="" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
|
263 |
+
<glyph unicode="" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
|
264 |
+
<glyph unicode="" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
|
265 |
+
<glyph unicode="" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
|
266 |
+
<glyph unicode="" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
|
267 |
+
<glyph unicode="" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
|
268 |
+
<glyph unicode="" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
|
269 |
+
<glyph unicode="" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
|
270 |
+
<glyph unicode="" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
271 |
+
<glyph unicode="" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
|
272 |
+
<glyph unicode="" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
|
273 |
+
<glyph unicode="" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
|
274 |
+
<glyph unicode="" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
|
275 |
+
<glyph unicode="" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
|
276 |
+
<glyph unicode="" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
|
277 |
+
<glyph unicode="" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
|
278 |
+
<glyph unicode="" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
|
279 |
+
<glyph unicode="" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
|
280 |
+
<glyph unicode="" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
|
281 |
+
<glyph unicode="" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
|
282 |
+
<glyph unicode="" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
|
283 |
+
<glyph unicode="" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
|
284 |
+
<glyph unicode="" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
|
285 |
+
<glyph unicode="🔑" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
|
286 |
+
<glyph unicode="🚪" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
|
287 |
+
</font>
|
288 |
+
</defs></svg>
|
assets/fonts/glyphicons-halflings-regular.ttf
ADDED
Binary file
|
assets/fonts/glyphicons-halflings-regular.woff
ADDED
Binary file
|
assets/fonts/glyphicons-halflings-regular.woff2
ADDED
Binary file
|
assets/fonts/icons.eot
ADDED
Binary file
|
assets/fonts/icons.otf
ADDED
Binary file
|
assets/fonts/icons.ttf
ADDED
Binary file
|
assets/fonts/icons.woff
ADDED
Binary file
|
assets/fonts/icons.woff2
ADDED
Binary file
|
assets/fonts/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
assets/fonts/monsterinsights.eot
ADDED
Binary file
|
assets/fonts/monsterinsights.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" ><svg xmlns="http://www.w3.org/2000/svg"><metadata>Generated by Glyphter</metadata><defs><font id="soliloquy" horiz-adv-x="0"><font-face units-per-em="1024" ascent="1024" descent="0" font-family="soliloquy" font-weight="normal" /><missing-glyph horiz-adv-x="0" /><glyph unicode="A" d="M960,416C960,416,878.4,401.6,878.4,401.6C870.4,376,860.8,352,848,329.6C848,329.6,896,262.4,896,262.4C921.6,236.8,921.6,196.8,896,171.2C896,171.2,851.2,128,851.2,128C825.6,102.4,785.6,102.4,760,128C760,128,692.8,176,692.8,176C670.4,163.2,646.4,153.6,620.8,145.6C620.8,145.6,608,64,608,64C608,28.8,579.2,0,544,0C544,0,480,0,480,0C444.8,0,416,28.8,416,64C416,64,401.6,145.6,401.6,145.6C376,153.6,352,163.2,329.6,176C329.6,176,262.4,128,262.4,128C236.8,102.4,196.8,102.4,171.2,128C171.2,128,128,172.8,128,172.8C102.4,198.4,102.4,238.4,128,264C128,264,176,331.2,176,331.2C163.2,353.6,153.6,377.6,145.6,403.2C145.6,403.2,64,416,64,416C28.8,416,0,444.8,0,480C0,480,0,544,0,544C0,579.2,28.8,608,64,608C64,608,145.6,622.4,145.6,622.4C153.6,648,163.2,672,176,694.4C176,694.4,128,761.6,128,761.6C102.4,787.2,102.4,827.2,128,852.8C128,852.8,172.8,896,172.8,896C198.4,921.6,238.4,921.6,264,896C264,896,331.2,848,331.2,848C353.6,860.8,377.6,870.4,403.2,878.4C403.2,878.4,416,960,416,960C416,995.2,444.8,1024,480,1024C480,1024,544,1024,544,1024C579.2,1024,608,995.2,608,960C608,960,622.4,878.4,622.4,878.4C648,870.4,672,860.8,694.4,848C694.4,848,761.6,896,761.6,896C787.2,921.6,827.2,921.6,852.8,896C852.8,896,897.6,851.2,897.6,851.2C923.2,825.6,923.2,785.6,897.6,760C897.6,760,849.6,692.8,849.6,692.8C862.4,670.4,872,646.4,880,620.8C880,620.8,960,608,960,608C995.2,608,1024,579.2,1024,544C1024,544,1024,480,1024,480C1024,444.8,995.2,416,960,416C960,416,960,416,960,416M928,544C928,544,827.2,560,827.2,560C819.2,611.2,798.4,659.2,769.6,699.2C769.6,699.2,828.8,782.4,828.8,782.4C841.6,795.2,841.6,814.4,828.8,827.2C816,840,796.8,840,784,827.2C784,827.2,700.8,768,700.8,768C660.8,796.8,612.8,817.6,561.6,825.6C561.6,825.6,544,928,544,928C544,945.6,529.6,960,512,960C494.4,960,480,945.6,480,928C480,928,462.4,827.2,462.4,827.2C411.2,819.2,363.2,798.4,323.2,769.6C323.2,769.6,240,828.8,240,828.8C227.2,841.6,208,841.6,195.2,828.8C182.4,816,182.4,796.8,195.2,784C195.2,784,254.4,700.8,254.4,700.8C224,660.8,204.8,612.8,196.8,561.6C196.8,561.6,96,544,96,544C78.4,544,64,529.6,64,512C64,494.4,78.4,480,96,480C96,480,196.8,464,196.8,464C204.8,412.8,225.6,364.8,254.4,324.8C254.4,324.8,195.2,240,195.2,240C182.4,227.2,182.4,208,195.2,195.2C208,182.4,227.2,182.4,240,195.2C240,195.2,323.2,254.4,323.2,254.4C363.2,225.6,411.2,204.8,462.4,196.8C462.4,196.8,480,96,480,96C480,78.4,494.4,64,512,64C529.6,64,544,78.4,544,96C544,96,560,196.8,560,196.8C611.2,204.8,659.2,225.6,699.2,254.4C699.2,254.4,782.4,195.2,782.4,195.2C795.2,182.4,814.4,182.4,827.2,195.2C840,208,840,227.2,827.2,240C827.2,240,768,323.2,768,323.2C798.4,363.2,817.6,411.2,825.6,462.4C825.6,462.4,926.4,478.4,926.4,478.4C944,478.4,958.4,492.8,958.4,510.4C958.4,528,945.6,544,928,544C928,544,928,544,928,544M512,352C424,352,352,424,352,512C352,600,424,672,512,672C600,672,672,600,672,512C672,424,600,352,512,352C512,352,512,352,512,352M512,608C459.2,608,416,564.8,416,512C416,459.2,459.2,416,512,416C564.8,416,608,459.2,608,512C608,564.8,564.8,608,512,608C512,608,512,608,512,608" class="soliloquy-configuration"/><glyph unicode="B" d="M313.6,251.2C520,89.6,715.2,158.4,804.8,168C804.8,168,964.8,8,964.8,8C964.8,8,1024,8,1024,8C1024,8,840,192,840,192C838.4,302.4,1091.2,1016,0,1016C118.4,604.8,107.2,412.8,313.6,251.2M512,556.8C563.2,459.2,656,312,720,264C784,216,854.4,180.8,705.6,244.8C556.8,307.2,448,486.4,376,622.4C320,726.4,273.6,820.8,169.6,891.2C65.6,961.6,182.4,912,182.4,912C371.2,819.2,440,692.8,512,556.8" class="soliloquy-leaf"/><glyph unicode="D" d="M64,128C64,128,64,832,64,832C64,832,0,832,0,832C0,832,0,128,0,128C0,57.6,60.8,0,136,0C136,0,896,0,896,0C896,0,896,64,896,64C896,64,132.8,64,132.8,64C94.4,64,64,92.8,64,128C64,128,64,128,64,128M864,896C864,896,288,896,288,896C270.4,896,256,881.6,256,864C256,864,256,352,256,352C256,334.4,270.4,320,288,320C288,320,864,320,864,320C881.6,320,896,334.4,896,352C896,352,896,864,896,864C896,881.6,881.6,896,864,896C864,896,864,896,864,896M832,416C832,398.4,817.6,384,800,384C800,384,352,384,352,384C334.4,384,320,398.4,320,416C320,416,320,800,320,800C320,817.6,334.4,832,352,832C352,832,800,832,800,832C817.6,832,832,817.6,832,800C832,800,832,416,832,416C832,416,832,416,832,416M960,1024C960,1024,192,1024,192,1024C156.8,1024,128,995.2,128,960C128,960,128,192,128,192C128,156.8,156.8,128,192,128C192,128,960,128,960,128C995.2,128,1024,156.8,1024,192C1024,192,1024,960,1024,960C1024,995.2,995.2,1024,960,1024C960,1024,960,1024,960,1024M960,224C960,206.4,945.6,192,928,192C928,192,224,192,224,192C206.4,192,192,206.4,192,224C192,224,192,928,192,928C192,945.6,206.4,960,224,960C224,960,928,960,928,960C945.6,960,960,945.6,960,928C960,928,960,224,960,224C960,224,960,224,960,224" class="soliloquy-lightbox"/><glyph unicode="E" d="M992.432,835.643C992.432,835.643,850.042,693.253,850.042,693.253C850.042,693.253,720.451,720.451,720.451,720.451C720.451,720.451,694.852,850.042,694.852,850.042C694.852,850.042,835.643,992.432,835.643,992.432C790.846,1013.231,741.249,1024.43,691.653,1024.43C608.458,1024.43,523.664,992.432,459.669,928.436C368.475,837.243,342.877,704.452,381.274,589.26C381.274,589.26,43.697,251.683,43.697,251.683C-13.899,194.087,-13.899,101.293,43.697,43.697C72.495,14.899,109.293,0.5,147.69,0.5C186.087,0.5,222.885,14.899,251.683,43.697C251.683,43.697,589.26,381.274,589.26,381.274C624.457,370.075,659.655,363.675,696.452,363.675C781.246,363.675,864.441,395.673,928.436,459.669C1030.829,562.062,1050.028,712.451,992.432,835.643C992.432,835.643,992.432,835.643,992.432,835.643M877.24,512.465C829.243,464.468,765.248,437.27,696.452,437.27C667.654,437.27,640.456,442.07,613.258,450.069C613.258,450.069,570.061,464.468,570.061,464.468C570.061,464.468,538.063,432.47,538.063,432.47C538.063,432.47,200.486,94.894,200.486,94.894C186.087,80.495,168.488,72.495,147.69,72.495C128.491,72.495,109.293,80.495,94.894,94.894C80.495,109.293,72.495,126.891,72.495,147.69C72.495,166.889,80.495,186.087,94.894,200.486C94.894,200.486,432.47,538.063,432.47,538.063C432.47,538.063,464.468,570.061,464.468,570.061C464.468,570.061,450.069,613.258,450.069,613.258C418.071,707.652,442.07,808.445,510.865,877.24C558.862,925.237,622.857,952.435,691.653,952.435C691.653,952.435,642.056,902.838,642.056,902.838C642.056,902.838,614.858,875.64,614.858,875.64C614.858,875.64,622.857,837.243,622.857,837.243C622.857,837.243,648.456,707.652,648.456,707.652C648.456,707.652,658.055,659.655,658.055,659.655C658.055,659.655,706.052,650.055,706.052,650.055C706.052,650.055,835.643,624.457,835.643,624.457C835.643,624.457,874.04,616.458,874.04,616.458C874.04,616.458,901.238,643.656,901.238,643.656C901.238,643.656,950.835,693.253,950.835,693.253C950.835,626.057,925.237,560.462,877.24,512.465C877.24,512.465,877.24,512.465,877.24,512.465" class="soliloquy-misc"/><glyph unicode="F" d="M704,1024C704,1024,320,1024,320,1024C249.6,1024,192,966.4,192,896C192,896,192,128,192,128C192,57.6,249.6,0,320,0C320,0,704,0,704,0C774.4,0,832,57.6,832,128C832,128,832,896,832,896C832,966.4,774.4,1024,704,1024C704,1024,704,1024,704,1024M768,128C768,92.8,739.2,64,704,64C704,64,320,64,320,64C284.8,64,256,92.8,256,128C256,128,256,320,256,320C256,320,768,320,768,320C768,320,768,128,768,128C768,128,768,128,768,128M768,384C768,384,256,384,256,384C256,384,256,768,256,768C256,768,768,768,768,768C768,768,768,384,768,384C768,384,768,384,768,384M768,832C768,832,256,832,256,832C256,832,256,896,256,896C256,931.2,284.8,960,320,960C320,960,704,960,704,960C739.2,960,768,931.2,768,896C768,896,768,832,768,832C768,832,768,832,768,832M512,128C547.2,128,576,156.8,576,192C576,227.2,547.2,256,512,256C476.8,256,448,227.2,448,192C448,156.8,476.8,128,512,128C512,128,512,128,512,128" class="soliloquy-mobile"/><glyph unicode="G" d="M416,960C416,960,416,1024,416,1024C416,1024,1024,1024,1024,1024C1024,1024,1024,960,1024,960C1024,960,416,960,416,960C416,960,416,960,416,960C416,960,416,960,416,960M640,720C640,720,640,784,640,784C640,784,896,784,896,784C896,784,896,720,896,720C896,720,640,720,640,720C640,720,640,720,640,720C640,720,640,720,640,720M640,592C640,592,640,656,640,656C640,656,896,656,896,656C896,656,896,592,896,592C896,592,640,592,640,592C640,592,640,592,640,592C640,592,640,592,640,592M640,464C640,464,640,528,640,528C640,528,896,528,896,528C896,528,896,464,896,464C896,464,640,464,640,464C640,464,640,464,640,464C640,464,640,464,640,464M608,224C608,224,608,288,608,288C608,288,1024,288,1024,288C1024,288,1024,224,1024,224C1024,224,608,224,608,224C608,224,608,224,608,224C608,224,608,224,608,224M960,288C960,288,960,960,960,960C960,960,1024,960,1024,960C1024,960,1024,288,1024,288C1024,288,960,288,960,288C960,288,960,288,960,288C960,288,960,288,960,288M416,800C416,800,416,960,416,960C416,960,480,960,480,960C480,960,480,800,480,800C480,800,416,800,416,800C416,800,416,800,416,800C416,800,416,800,416,800M0,736C0,736,0,800,0,800C0,800,608,800,608,800C608,800,608,736,608,736C608,736,0,736,0,736C0,736,0,736,0,736C0,736,0,736,0,736M128,496C128,496,128,560,128,560C128,560,480,560,480,560C480,560,480,496,480,496C480,496,128,496,128,496C128,496,128,496,128,496C128,496,128,496,128,496M128,368C128,368,128,432,128,432C128,432,480,432,480,432C480,432,480,368,480,368C480,368,128,368,128,368C128,368,128,368,128,368C128,368,128,368,128,368M128,240C128,240,128,304,128,304C128,304,480,304,480,304C480,304,480,240,480,240C480,240,128,240,128,240C128,240,128,240,128,240C128,240,128,240,128,240M0,0C0,0,0,64,0,64C0,64,608,64,608,64C608,64,608,0,608,0C608,0,0,0,0,0C0,0,0,0,0,0C0,0,0,0,0,0M544,64C544,64,544,736,544,736C544,736,608,736,608,736C608,736,608,64,608,64C608,64,544,64,544,64C544,64,544,64,544,64C544,64,544,64,544,64M0,64C0,64,0,736,0,736C0,736,64,736,64,736C64,736,64,64,64,64C64,64,0,64,0,64C0,64,0,64,0,64C0,64,0,64,0,64" class="soliloquy-pagination"/><glyph unicode="H" d="M969.6,0C969.6,0,198.4,0,198.4,0C168,0,144,24,144,54.4C144,54.4,144,192,144,192C144,193.6,144,195.2,144,196.8C144,196.8,144,825.6,144,825.6C144,856,168,880,198.4,880C198.4,880,968,880,968,880C998.4,880,1022.4,856,1022.4,825.6C1022.4,825.6,1022.4,56,1022.4,56C1024,24,1000,0,969.6,0C969.6,0,969.6,0,969.6,0M198.4,83.2C198.4,68.8,211.2,56,225.6,56C225.6,56,713.6,56,713.6,56C713.6,56,440,371.2,440,371.2C440,371.2,198.4,176,198.4,176C198.4,176,198.4,83.2,198.4,83.2C198.4,83.2,198.4,83.2,198.4,83.2M969.6,796.8C969.6,811.2,956.8,824,942.4,824C942.4,824,227.2,824,227.2,824C212.8,824,200,811.2,200,796.8C200,796.8,200,251.2,200,251.2C200,251.2,420.8,432,420.8,432C425.6,435.2,430.4,436.8,435.2,438.4C436.8,438.4,436.8,438.4,438.4,440C440,440,443.2,441.6,444.8,441.6C452.8,443.2,462.4,440,467.2,433.6C467.2,433.6,552,334.4,552,334.4C552,334.4,809.6,544,809.6,544C816,550.4,824,552,832,550.4C841.6,550.4,849.6,548.8,857.6,544C857.6,544,969.6,422.4,969.6,422.4C969.6,422.4,969.6,796.8,969.6,796.8C969.6,796.8,969.6,796.8,969.6,796.8M969.6,337.6C968,337.6,968,337.6,969.6,337.6C969.6,337.6,828.8,488,828.8,488C828.8,488,587.2,291.2,587.2,291.2C587.2,291.2,792,54.4,792,54.4C792,54.4,940.8,54.4,940.8,54.4C955.2,54.4,968,67.2,968,81.6C968,81.6,968,337.6,968,337.6C968,337.6,969.6,337.6,969.6,337.6M364.8,550.4C304,550.4,254.4,600,254.4,660.8C254.4,721.6,304,771.2,364.8,771.2C425.6,771.2,475.2,721.6,475.2,660.8C473.6,600,425.6,550.4,364.8,550.4C364.8,550.4,364.8,550.4,364.8,550.4M364.8,715.2C334.4,715.2,310.4,691.2,310.4,660.8C310.4,630.4,334.4,606.4,364.8,606.4C395.2,606.4,419.2,630.4,419.2,660.8C419.2,689.6,395.2,715.2,364.8,715.2C364.8,715.2,364.8,715.2,364.8,715.2M256,960C256,960,192,960,192,960C192,960,192,1024,192,1024C192,1024,256,1024,256,1024C256,1024,256,960,256,960C256,960,256,960,256,960M448,960C448,960,384,960,384,960C384,960,384,1024,384,1024C384,1024,448,1024,448,1024C448,1024,448,960,448,960C448,960,448,960,448,960M640,960C640,960,576,960,576,960C576,960,576,1024,576,1024C576,1024,640,1024,640,1024C640,1024,640,960,640,960C640,960,640,960,640,960M832,960C832,960,768,960,768,960C768,960,768,1024,768,1024C768,1024,832,1024,832,1024C832,1024,832,960,832,960C832,960,832,960,832,960M1024,960C1024,960,960,960,960,960C960,960,960,1024,960,1024C960,1024,1024,1024,1024,1024C1024,1024,1024,960,1024,960C1024,960,1024,960,1024,960M64,960C64,960,0,960,0,960C0,960,0,1024,0,1024C0,1024,64,1024,64,1024C64,1024,64,960,64,960C64,960,64,960,64,960M64,768C64,768,0,768,0,768C0,768,0,832,0,832C0,832,64,832,64,832C64,832,64,768,64,768C64,768,64,768,64,768M64,576C64,576,0,576,0,576C0,576,0,640,0,640C0,640,64,640,64,640C64,640,64,576,64,576C64,576,64,576,64,576M64,384C64,384,0,384,0,384C0,384,0,448,0,448C0,448,64,448,64,448C64,448,64,384,64,384C64,384,64,384,64,384M64,192C64,192,0,192,0,192C0,192,0,256,0,256C0,256,64,256,64,256C64,256,64,192,64,192C64,192,64,192,64,192M64,0C64,0,0,0,0,0C0,0,0,64,0,64C0,64,64,64,64,64C64,64,64,0,64,0C64,0,64,0,64,0" class="soliloquy-proofing"/><glyph unicode="I" d="M992,960.654C992,960.654,32,960.654,32,960.654C14.4,960.654,0,946.254,0,928.654C0,911.054,14.4,896.654,32,896.654C32,896.654,64,896.654,64,896.654C64,896.654,64,320.654,64,320.654C64,285.454,92.8,256.654,128,256.654C128,256.654,404.8,256.654,404.8,256.654C404.8,256.654,324.8,109.454,324.8,109.454C315.2,95.054,321.6,75.854,337.6,67.854C355.2,59.854,376,64.654,385.6,79.054C385.6,79.054,475.2,242.254,475.2,242.254C478.4,247.054,480,250.254,480,255.054C480,255.054,544,255.054,544,255.054C544,250.254,545.6,245.454,548.8,242.254C548.8,242.254,638.4,79.054,638.4,79.054C648,64.654,670.4,59.854,686.4,67.854C704,75.854,708.8,95.054,699.2,109.454C699.2,109.454,619.2,256.654,619.2,256.654C619.2,256.654,896,256.654,896,256.654C931.2,256.654,960,285.454,960,320.654C960,320.654,960,896.654,960,896.654C960,896.654,992,896.654,992,896.654C1009.6,896.654,1024,911.054,1024,928.654C1024,946.254,1009.6,960.654,992,960.654C992,960.654,992,960.654,992,960.654M896,832.654C896,832.654,896,832.654,896,832.654C896,832.654,896,352.654,896,352.654C896,335.054,881.6,320.654,864,320.654C864,320.654,160,320.654,160,320.654C142.4,320.654,128,335.054,128,352.654C128,352.654,128,864.654,128,864.654C128,864.654,128,864.654,128,864.654C128,864.654,128,896.654,128,896.654C128,896.654,160,896.654,160,896.654C160,896.654,160,896.654,160,896.654C160,896.654,864,896.654,864,896.654C864,896.654,864,896.654,864,896.654C864,896.654,896,896.654,896,896.654C896,896.654,896,832.654,896,832.654C896,832.654,896,832.654,896,832.654M816,770.254C800,779.854,780.8,773.454,772.8,759.054C772.8,759.054,574.4,578.254,574.4,578.254C574.4,578.254,417.6,690.254,417.6,690.254C409.6,701.454,393.6,707.854,379.2,704.654C376,704.654,374.4,703.054,371.2,703.054C371.2,703.054,369.6,703.054,369.6,703.054C369.6,703.054,368,703.054,368,701.454C366.4,699.854,363.2,698.254,361.6,696.654C360,695.054,358.4,693.454,356.8,691.854C356.8,691.854,356.8,691.854,355.2,690.254C355.2,690.254,195.2,498.254,195.2,498.254C185.6,482.254,192,463.054,206.4,453.454C220.8,443.854,241.6,450.254,249.6,464.654C249.6,464.654,390.4,632.654,390.4,632.654C390.4,632.654,539.2,527.054,539.2,527.054C542.4,522.254,547.2,519.054,553.6,515.854C555.2,514.254,555.2,511.054,558.4,509.454C574.4,501.454,593.6,506.254,601.6,520.654C601.6,520.654,825.6,725.454,825.6,725.454C836.8,743.054,832,762.254,816,770.254C816,770.254,816,770.254,816,770.254" class="soliloquy-slideshow"/><glyph unicode="J" d="M195.829,420.092C195.829,420.092,420.092,195.829,420.092,195.829C420.092,195.829,464.945,240.682,464.945,240.682C464.945,240.682,240.682,464.945,240.682,464.945C240.682,464.945,195.829,420.092,195.829,420.092C195.829,420.092,195.829,420.092,195.829,420.092M532.224,1024C532.224,1024,18.021,509.797,18.021,509.797C-6.007,485.769,-6.007,445.722,18.021,420.092C18.021,420.092,420.092,18.021,420.092,18.021C444.12,-6.007,484.167,-6.007,509.797,18.021C509.797,18.021,1024,532.224,1024,532.224C1024,532.224,1024,1024,1024,1024C1024,1024,532.224,1024,532.224,1024C532.224,1024,532.224,1024,532.224,1024M956.721,554.65C956.721,554.65,487.371,83.698,487.371,83.698C474.556,70.883,455.334,70.883,442.519,83.698C442.519,83.698,83.698,442.519,83.698,442.519C70.883,455.334,70.883,474.556,83.698,487.371C83.698,487.371,554.65,956.721,554.65,956.721C554.65,956.721,959.925,959.925,959.925,959.925C959.925,959.925,956.721,554.65,956.721,554.65C956.721,554.65,956.721,554.65,956.721,554.65M859.007,676.393C908.665,726.051,908.665,807.747,859.007,857.405C809.348,907.063,727.653,907.063,677.995,857.405C628.336,807.747,628.336,726.051,677.995,676.393C726.051,626.734,807.747,626.734,859.007,676.393C859.007,676.393,859.007,676.393,859.007,676.393M722.847,814.154C748.477,839.784,788.524,839.784,814.154,814.154C839.784,788.524,839.784,748.477,814.154,722.847C788.524,697.217,748.477,697.217,722.847,722.847C697.217,748.477,697.217,788.524,722.847,814.154C722.847,814.154,722.847,814.154,722.847,814.154" class="soliloquy-tags"/><glyph unicode="K" d="M960,1024C960,1024,64,1024,64,1024C28.8,1024,0,995.2,0,960C0,960,0,228.8,0,228.8C0,227.2,0,225.6,0,224C0,224,0,64,0,64C0,28.8,28.8,0,64,0C64,0,960,0,960,0C995.2,0,1024,28.8,1024,64C1024,64,1024,960,1024,960C1024,995.2,995.2,1024,960,1024C960,1024,960,1024,960,1024M96,64C78.4,64,64,78.4,64,96C64,96,64,204.8,64,204.8C64,204.8,345.6,432,345.6,432C345.6,432,664,64,664,64C664,64,96,64,96,64C96,64,96,64,96,64M960,96C960,78.4,945.6,64,928,64C928,64,755.2,64,755.2,64C755.2,64,516.8,339.2,516.8,339.2C516.8,339.2,796.8,568,796.8,568C796.8,568,958.4,392,958.4,392C958.4,392,958.4,392,960,392C960,392,960,96,960,96C960,96,960,96,960,96M960,491.2C960,491.2,830.4,632,830.4,632C822.4,638.4,811.2,640,800,640C790.4,640,780.8,638.4,774.4,632C774.4,632,475.2,387.2,475.2,387.2C475.2,387.2,376,502.4,376,502.4C368,510.4,358.4,513.6,348.8,512C345.6,512,344,510.4,340.8,510.4C339.2,510.4,339.2,510.4,337.6,508.8C331.2,507.2,324.8,507.2,320,502.4C320,502.4,64,292.8,64,292.8C64,292.8,64,928,64,928C64,945.6,78.4,960,96,960C96,960,928,960,928,960C945.6,960,960,945.6,960,928C960,928,960,491.2,960,491.2C960,491.2,960,491.2,960,491.2M256,896C185.6,896,128,838.4,128,768C128,697.6,185.6,640,256,640C326.4,640,384,697.6,384,768C384,838.4,326.4,896,256,896C256,896,256,896,256,896M256,704C220.8,704,192,732.8,192,768C192,803.2,220.8,832,256,832C291.2,832,320,803.2,320,768C320,732.8,291.2,704,256,704C256,704,256,704,256,704" class="soliloquy-thumbnails"/><glyph unicode="L" d="M992,768C992,768,768,619.2,768,619.2C768,619.2,768,704,768,704C768,774.4,710.4,832,640,832C640,832,128,832,128,832C57.6,832,0,774.4,0,704C0,704,0,320,0,320C0,249.6,57.6,192,128,192C128,192,640,192,640,192C710.4,192,768,249.6,768,320C768,320,768,404.8,768,404.8C768,404.8,992,256,992,256C1009.6,256,1024,270.4,1024,288C1024,288,1024,736,1024,736C1024,753.6,1009.6,768,992,768C992,768,992,768,992,768M704,320C704,284.8,675.2,256,640,256C640,256,128,256,128,256C92.8,256,64,284.8,64,320C64,320,64,704,64,704C64,739.2,92.8,768,128,768C128,768,640,768,640,768C675.2,768,704,739.2,704,704C704,704,704,320,704,320C704,320,704,320,704,320M960,353.6C960,353.6,768,481.6,768,481.6C768,481.6,768,540.8,768,540.8C768,540.8,960,668.8,960,668.8C960,668.8,960,353.6,960,353.6C960,353.6,960,353.6,960,353.6" class="soliloquy-video"/><glyph unicode="M" d="M800,640C800,640,800,736,800,736C800,894.4,670.4,1024,512,1024C353.6,1024,224,894.4,224,736C224,736,224,640,224,640C224,640,224,640,224,640C153.6,640,96,582.4,96,512C96,512,96,128,96,128C96,57.6,153.6,0,224,0C224,0,800,0,800,0C870.4,0,928,57.6,928,128C928,128,928,512,928,512C928,582.4,870.4,640,800,640C800,640,800,640,800,640M288,736C288,859.2,388.8,960,512,960C635.2,960,736,859.2,736,736C736,736,736,640,736,640C736,640,288,640,288,640C288,640,288,736,288,736C288,736,288,736,288,736M864,128C864,92.8,835.2,64,800,64C800,64,224,64,224,64C188.8,64,160,92.8,160,128C160,128,160,512,160,512C160,547.2,188.8,576,224,576C224,576,800,576,800,576C835.2,576,864,547.2,864,512C864,512,864,128,864,128C864,128,864,128,864,128M512,448C494.4,448,480,433.6,480,416C480,416,480,224,480,224C480,206.4,494.4,192,512,192C529.6,192,544,206.4,544,224C544,224,544,416,544,416C544,433.6,529.6,448,512,448C512,448,512,448,512,448" class="soliloquy-watermark"/><glyph unicode="N" d="M682.667,461.267C682.667,466.244,681.067,470.333,677.867,473.533C674.667,476.733,670.578,478.333,665.6,478.333C665.6,478.333,546.133,478.333,546.133,478.333C546.133,478.333,546.133,666.067,546.133,666.067C546.133,670.689,544.444,674.689,541.067,678.067C537.689,681.444,533.689,683.133,529.067,683.133C529.067,683.133,426.667,683.133,426.667,683.133C422.044,683.133,418.044,681.444,414.667,678.067C411.289,674.689,409.6,670.689,409.6,666.067C409.6,666.067,409.6,478.333,409.6,478.333C409.6,478.333,290.133,478.333,290.133,478.333C285.511,478.333,281.511,476.644,278.133,473.267C274.756,469.889,273.067,465.889,273.067,461.267C273.067,456.289,274.667,452.2,277.867,449C277.867,449,465.6,261.267,465.6,261.267C468.8,258.067,472.889,256.467,477.867,256.467C482.844,256.467,486.933,258.067,490.133,261.267C490.133,261.267,677.333,448.467,677.333,448.467C680.889,452.733,682.667,457,682.667,461.267C682.667,461.267,682.667,461.267,682.667,461.267M1024,341.8C1024,285.267,1004,237,964,197C924,157,875.733,137,819.2,137C819.2,137,238.933,137,238.933,137C173.156,137,116.889,160.378,70.133,207.133C23.378,253.889,0,310.156,0,375.933C0,422.156,12.444,464.822,37.333,503.933C62.222,543.044,95.644,572.378,137.6,591.933C136.889,602.6,136.533,610.244,136.533,614.867C136.533,690.244,163.2,754.6,216.533,807.933C269.867,861.267,334.222,887.933,409.6,887.933C465.067,887.933,515.822,872.467,561.867,841.533C607.911,810.6,641.422,769.533,662.4,718.333C687.644,740.378,717.156,751.4,750.933,751.4C788.622,751.4,820.8,738.067,847.467,711.4C874.133,684.733,887.467,652.556,887.467,614.867C887.467,587.844,880.178,563.311,865.6,541.267C911.822,530.244,949.778,506.156,979.467,469C1009.156,431.844,1024,389.444,1024,341.8C1024,341.8,1024,341.8,1024,341.8" class="soliloquy-cloud-download"/><glyph unicode="O" d="M0,512C0,555.333,8.5,596.75,25.5,636.25C42.5,675.75,65.25,709.75,93.75,738.25C122.25,766.75,156.25,789.5,195.75,806.5C235.25,823.5,276.667,832,320,832C320,832,704,832,704,832C747.333,832,788.75,823.5,828.25,806.5C867.75,789.5,901.75,766.75,930.25,738.25C958.75,709.75,981.5,675.75,998.5,636.25C1015.5,596.75,1024,555.333,1024,512C1024,468.667,1015.5,427.25,998.5,387.75C981.5,348.25,958.75,314.25,930.25,285.75C901.75,257.25,867.75,234.5,828.25,217.5C788.75,200.5,747.333,192,704,192C704,192,320,192,320,192C276.667,192,235.25,200.5,195.75,217.5C156.25,234.5,122.25,257.25,93.75,285.75C65.25,314.25,42.5,348.25,25.5,387.75C8.5,427.25,0,468.667,0,512C0,512,0,512,0,512M704,256C738.667,256,771.75,262.75,803.25,276.25C834.75,289.75,862,308,885,331C908,354,926.25,381.25,939.75,412.75C953.25,444.25,960,477.333,960,512C960,546.667,953.25,579.75,939.75,611.25C926.25,642.75,908,670,885,693C862,716,834.75,734.25,803.25,747.75C771.75,761.25,738.667,768,704,768C669.333,768,636.25,761.25,604.75,747.75C573.25,734.25,546,716,523,693C500,670,481.75,642.75,468.25,611.25C454.75,579.75,448,546.667,448,512C448,477.333,454.75,444.25,468.25,412.75C481.75,381.25,500,354,523,331C546,308,573.25,289.75,604.75,276.25C636.25,262.75,669.333,256,704,256C704,256,704,256,704,256" class="soliloquy-toggle-on"/><glyph unicode="P" d="M810.667,469.333C810.667,469.333,810.667,554.667,810.667,554.667C810.667,566.222,806.445,576.222,798,584.667C789.555,593.111,779.555,597.333,768,597.333C768,597.333,597.333,597.333,597.333,597.333C597.333,597.333,597.333,768,597.333,768C597.333,779.555,593.111,789.555,584.667,798C576.222,806.445,566.222,810.667,554.667,810.667C554.667,810.667,469.333,810.667,469.333,810.667C457.778,810.667,447.778,806.445,439.333,798C430.889,789.555,426.667,779.555,426.667,768C426.667,768,426.667,597.333,426.667,597.333C426.667,597.333,256,597.333,256,597.333C244.445,597.333,234.445,593.111,226,584.667C217.555,576.222,213.333,566.222,213.333,554.667C213.333,554.667,213.333,469.333,213.333,469.333C213.333,457.778,217.555,447.778,226,439.333C234.445,430.889,244.445,426.667,256,426.667C256,426.667,426.667,426.667,426.667,426.667C426.667,426.667,426.667,256,426.667,256C426.667,244.445,430.889,234.445,439.333,226C447.778,217.555,457.778,213.333,469.333,213.333C469.333,213.333,554.667,213.333,554.667,213.333C566.222,213.333,576.222,217.555,584.667,226C593.111,234.445,597.333,244.445,597.333,256C597.333,256,597.333,426.667,597.333,426.667C597.333,426.667,768,426.667,768,426.667C779.555,426.667,789.555,430.889,798,439.333C806.445,447.778,810.667,457.778,810.667,469.333C810.667,469.333,810.667,469.333,810.667,469.333M1024,512C1024,419.111,1001.111,333.445,955.333,255C909.555,176.555,847.445,114.445,769,68.667C690.555,22.889,604.889,0,512,0C419.111,0,333.445,22.889,255,68.667C176.555,114.445,114.445,176.555,68.667,255C22.889,333.445,0,419.111,0,512C0,604.889,22.889,690.555,68.667,769C114.445,847.445,176.555,909.555,255,955.333C333.445,1001.111,419.111,1024,512,1024C604.889,1024,690.555,1001.111,769,955.333C847.445,909.555,909.555,847.445,955.333,769C1001.111,690.555,1024,604.889,1024,512C1024,512,1024,512,1024,512" class="soliloquy-plus-circle"/><glyph unicode="Q" d="M1024,736C1024,718.696,1017.672,703.689,1005.016,690.977C1005.016,690.977,557.023,242.984,557.023,242.984C544.367,230.328,529.36,224,512,224C494.64,224,479.633,230.328,466.977,242.984C466.977,242.984,18.984,690.977,18.984,690.977C6.328,703.633,0,718.64,0,736C0,753.36,6.328,768.367,18.984,781.023C31.64,793.679,46.647,800.007,64.007,800.007C64.007,800.007,959.993,800.007,959.993,800.007C977.297,800.007,992.304,793.679,1005.016,781.023C1017.728,768.367,1024.056,753.36,1024,736C1024,736,1024,736,1024,736" class="soliloquy-down-arrow"/><glyph unicode="R" d="M292.553,274.581C292.553,274.581,292.553,164.85,292.553,164.85C292.553,149.617,287.209,136.657,276.553,126.001C265.896,115.344,252.936,110,237.703,110C237.703,110,54.85,110,54.85,110C39.617,110,26.657,115.344,16.001,126.001C5.344,136.657,0,149.617,0,164.85C0,164.85,0,274.581,0,274.581C0,289.814,5.344,302.774,16.001,313.43C26.657,324.087,39.617,329.431,54.85,329.431C54.85,329.431,237.703,329.431,237.703,329.431C252.936,329.431,265.896,324.087,276.553,313.43C287.209,302.774,292.553,289.814,292.553,274.581C292.553,274.581,292.553,274.581,292.553,274.581M292.553,567.166C292.553,567.166,292.553,457.435,292.553,457.435C292.553,442.202,287.209,429.242,276.553,418.586C265.896,407.929,252.936,402.585,237.703,402.585C237.703,402.585,54.85,402.585,54.85,402.585C39.617,402.585,26.657,407.929,16.001,418.586C5.344,429.242,0,442.202,0,457.435C0,457.435,0,567.166,0,567.166C0,582.399,5.344,595.359,16.001,606.016C26.657,616.672,39.617,622.016,54.85,622.016C54.85,622.016,237.703,622.016,237.703,622.016C252.936,622.016,265.896,616.672,276.553,606.016C287.209,595.359,292.553,582.399,292.553,567.166C292.553,567.166,292.553,567.166,292.553,567.166M1024,274.581C1024,274.581,1024,164.85,1024,164.85C1024,149.617,1018.656,136.657,1007.999,126.001C997.343,115.344,984.383,110,969.15,110C969.15,110,420.557,110,420.557,110C405.325,110,392.364,115.344,381.708,126.001C371.052,136.657,365.707,149.617,365.707,164.85C365.707,164.85,365.707,274.581,365.707,274.581C365.707,289.814,371.052,302.774,381.708,313.43C392.364,324.087,405.325,329.431,420.557,329.431C420.557,329.431,969.15,329.431,969.15,329.431C984.383,329.431,997.343,324.087,1007.999,313.43C1018.656,302.774,1024,289.814,1024,274.581C1024,274.581,1024,274.581,1024,274.581M292.553,859.751C292.553,859.751,292.553,750.02,292.553,750.02C292.553,734.788,287.209,721.827,276.553,711.171C265.896,700.514,252.936,695.17,237.703,695.17C237.703,695.17,54.85,695.17,54.85,695.17C39.617,695.17,26.657,700.514,16.001,711.171C5.344,721.827,0,734.788,0,750.02C0,750.02,0,859.751,0,859.751C0,874.984,5.344,887.944,16.001,898.601C26.657,909.257,39.617,914.601,54.85,914.601C54.85,914.601,237.703,914.601,237.703,914.601C252.936,914.601,265.896,909.257,276.553,898.601C287.209,887.944,292.553,874.984,292.553,859.751C292.553,859.751,292.553,859.751,292.553,859.751M1024,567.166C1024,567.166,1024,457.435,1024,457.435C1024,442.202,1018.656,429.242,1007.999,418.586C997.343,407.929,984.383,402.585,969.15,402.585C969.15,402.585,420.557,402.585,420.557,402.585C405.325,402.585,392.364,407.929,381.708,418.586C371.052,429.242,365.707,442.202,365.707,457.435C365.707,457.435,365.707,567.166,365.707,567.166C365.707,582.399,371.052,595.359,381.708,606.016C392.364,616.672,405.325,622.016,420.557,622.016C420.557,622.016,969.15,622.016,969.15,622.016C984.383,622.016,997.343,616.672,1007.999,606.016C1018.656,595.359,1024,582.399,1024,567.166C1024,567.166,1024,567.166,1024,567.166M1024,859.751C1024,859.751,1024,750.02,1024,750.02C1024,734.788,1018.656,721.827,1007.999,711.171C997.343,700.514,984.383,695.17,969.15,695.17C969.15,695.17,420.557,695.17,420.557,695.17C405.325,695.17,392.364,700.514,381.708,711.171C371.052,721.827,365.707,734.788,365.707,750.02C365.707,750.02,365.707,859.751,365.707,859.751C365.707,874.984,371.052,887.944,381.708,898.601C392.364,909.257,405.325,914.601,420.557,914.601C420.557,914.601,969.15,914.601,969.15,914.601C984.383,914.601,997.343,909.257,1007.999,898.601C1018.656,887.944,1024,874.984,1024,859.751C1024,859.751,1024,859.751,1024,859.751" class="soliloquy-list"/><glyph unicode="S" d="M292.553,274.581C292.553,274.581,292.553,164.85,292.553,164.85C292.553,149.617,287.209,136.657,276.553,126.001C265.896,115.344,252.936,110,237.703,110C237.703,110,54.85,110,54.85,110C39.617,110,26.657,115.344,16.001,126.001C5.344,136.657,0,149.617,0,164.85C0,164.85,0,274.581,0,274.581C0,289.814,5.344,302.774,16.001,313.43C26.657,324.087,39.617,329.431,54.85,329.431C54.85,329.431,237.703,329.431,237.703,329.431C252.936,329.431,265.896,324.087,276.553,313.43C287.209,302.774,292.553,289.814,292.553,274.581C292.553,274.581,292.553,274.581,292.553,274.581M292.553,567.166C292.553,567.166,292.553,457.435,292.553,457.435C292.553,442.202,287.209,429.242,276.553,418.586C265.896,407.929,252.936,402.585,237.703,402.585C237.703,402.585,54.85,402.585,54.85,402.585C39.617,402.585,26.657,407.929,16.001,418.586C5.344,429.242,0,442.202,0,457.435C0,457.435,0,567.166,0,567.166C0,582.399,5.344,595.359,16.001,606.016C26.657,616.672,39.617,622.016,54.85,622.016C54.85,622.016,237.703,622.016,237.703,622.016C252.936,622.016,265.896,616.672,276.553,606.016C287.209,595.359,292.553,582.399,292.553,567.166C292.553,567.166,292.553,567.166,292.553,567.166M658.261,274.581C658.261,274.581,658.261,164.85,658.261,164.85C658.261,149.617,652.916,136.657,642.26,126.001C631.604,115.344,618.643,110,603.411,110C603.411,110,420.557,110,420.557,110C405.325,110,392.364,115.344,381.708,126.001C371.052,136.657,365.707,149.617,365.707,164.85C365.707,164.85,365.707,274.581,365.707,274.581C365.707,289.814,371.052,302.774,381.708,313.43C392.364,324.087,405.325,329.431,420.557,329.431C420.557,329.431,603.411,329.431,603.411,329.431C618.643,329.431,631.604,324.087,642.26,313.43C652.916,302.774,658.261,289.814,658.261,274.581C658.261,274.581,658.261,274.581,658.261,274.581M292.553,859.751C292.553,859.751,292.553,750.02,292.553,750.02C292.553,734.788,287.209,721.827,276.553,711.171C265.896,700.514,252.936,695.17,237.703,695.17C237.703,695.17,54.85,695.17,54.85,695.17C39.617,695.17,26.657,700.514,16.001,711.171C5.344,721.827,0,734.788,0,750.02C0,750.02,0,859.751,0,859.751C0,874.984,5.344,887.944,16.001,898.601C26.657,909.257,39.617,914.601,54.85,914.601C54.85,914.601,237.703,914.601,237.703,914.601C252.936,914.601,265.896,909.257,276.553,898.601C287.209,887.944,292.553,874.984,292.553,859.751C292.553,859.751,292.553,859.751,292.553,859.751M658.261,567.166C658.261,567.166,658.261,457.435,658.261,457.435C658.261,442.202,652.916,429.242,642.26,418.586C631.604,407.929,618.643,402.585,603.411,402.585C603.411,402.585,420.557,402.585,420.557,402.585C405.325,402.585,392.364,407.929,381.708,418.586C371.052,429.242,365.707,442.202,365.707,457.435C365.707,457.435,365.707,567.166,365.707,567.166C365.707,582.399,371.052,595.359,381.708,606.016C392.364,616.672,405.325,622.016,420.557,622.016C420.557,622.016,603.411,622.016,603.411,622.016C618.643,622.016,631.604,616.672,642.26,606.016C652.916,595.359,658.261,582.399,658.261,567.166C658.261,567.166,658.261,567.166,658.261,567.166M1024,274.581C1024,274.581,1024,164.85,1024,164.85C1024,149.617,1018.656,136.657,1007.999,126.001C997.343,115.344,984.383,110,969.15,110C969.15,110,786.297,110,786.297,110C771.064,110,758.104,115.344,747.447,126.001C736.791,136.657,731.447,149.617,731.447,164.85C731.447,164.85,731.447,274.581,731.447,274.581C731.447,289.814,736.791,302.774,747.447,313.43C758.104,324.087,771.064,329.431,786.297,329.431C786.297,329.431,969.15,329.431,969.15,329.431C984.383,329.431,997.343,324.087,1007.999,313.43C1018.656,302.774,1024,289.814,1024,274.581C1024,274.581,1024,274.581,1024,274.581M658.261,859.751C658.261,859.751,658.261,750.02,658.261,750.02C658.261,734.788,652.916,721.827,642.26,711.171C631.604,700.514,618.643,695.17,603.411,695.17C603.411,695.17,420.557,695.17,420.557,695.17C405.325,695.17,392.364,700.514,381.708,711.171C371.052,721.827,365.707,734.788,365.707,750.02C365.707,750.02,365.707,859.751,365.707,859.751C365.707,874.984,371.052,887.944,381.708,898.601C392.364,909.257,405.325,914.601,420.557,914.601C420.557,914.601,603.411,914.601,603.411,914.601C618.643,914.601,631.604,909.257,642.26,898.601C652.916,887.944,658.261,874.984,658.261,859.751C658.261,859.751,658.261,859.751,658.261,859.751M1024,567.166C1024,567.166,1024,457.435,1024,457.435C1024,442.202,1018.656,429.242,1007.999,418.586C997.343,407.929,984.383,402.585,969.15,402.585C969.15,402.585,786.297,402.585,786.297,402.585C771.064,402.585,758.104,407.929,747.447,418.586C736.791,429.242,731.447,442.202,731.447,457.435C731.447,457.435,731.447,567.166,731.447,567.166C731.447,582.399,736.791,595.359,747.447,606.016C758.104,616.672,771.064,622.016,786.297,622.016C786.297,622.016,969.15,622.016,969.15,622.016C984.383,622.016,997.343,616.672,1007.999,606.016C1018.656,595.359,1024,582.399,1024,567.166C1024,567.166,1024,567.166,1024,567.166M1024,859.751C1024,859.751,1024,750.02,1024,750.02C1024,734.788,1018.656,721.827,1007.999,711.171C997.343,700.514,984.383,695.17,969.15,695.17C969.15,695.17,786.297,695.17,786.297,695.17C771.064,695.17,758.104,700.514,747.447,711.171C736.791,721.827,731.447,734.788,731.447,750.02C731.447,750.02,731.447,859.751,731.447,859.751C731.447,874.984,736.791,887.944,747.447,898.601C758.104,909.257,771.064,914.601,786.297,914.601C786.297,914.601,969.15,914.601,969.15,914.601C984.383,914.601,997.343,909.257,1007.999,898.601C1018.656,887.944,1024,874.984,1024,859.751C1024,859.751,1024,859.751,1024,859.751" class="soliloquy-grid"/><glyph unicode="T" d="M118.5,656.615C118.5,700.923,126.192,742.666,141.577,781.846C156.962,821.026,178.192,855.18,205.269,884.308C232.346,913.436,263.526,938.666,298.808,960C334.09,981.334,372.038,997.334,412.654,1008C453.269,1018.666,494.705,1024,536.962,1024C601.782,1024,662.09,1010.359,717.885,983.077C773.68,955.795,819.013,916.103,853.885,864C888.757,811.897,906.192,753.026,906.192,687.385C906.192,648,902.295,609.436,894.5,571.692C886.705,533.949,874.397,497.641,857.577,462.769C840.757,427.897,820.243,397.231,796.038,370.769C771.834,344.308,742.09,323.18,706.808,307.385C671.526,291.59,632.757,283.692,590.5,283.692C562.603,283.692,534.91,290.257,507.423,303.385C479.936,316.513,460.243,334.564,448.346,357.538C444.243,341.538,438.5,318.462,431.115,288.308C423.731,258.154,418.91,238.666,416.654,229.846C414.397,221.026,410.192,206.462,404.038,186.154C397.885,165.846,392.551,151.282,388.038,142.462C383.526,133.641,376.962,120.82,368.346,104C359.731,87.18,350.295,71.282,340.038,56.308C329.782,41.334,317.064,23.59,301.885,3.077C301.885,3.077,293.269,0,293.269,0C293.269,0,287.731,6.154,287.731,6.154C281.577,70.564,278.5,109.128,278.5,121.846C278.5,159.59,282.91,201.949,291.731,248.923C300.551,295.897,314.192,354.872,332.654,425.846C351.115,496.82,361.782,538.462,364.654,550.769C351.526,577.436,344.962,612.103,344.962,654.769C344.962,688.82,355.628,720.82,376.962,750.769C398.295,780.718,425.372,795.692,458.192,795.692C483.218,795.692,502.705,787.385,516.654,770.769C530.603,754.154,537.577,733.128,537.577,707.692C537.577,680.615,528.551,641.436,510.5,590.154C492.449,538.872,483.423,500.513,483.423,475.077C483.423,449.231,492.654,427.795,511.115,410.769C529.577,393.743,551.936,385.231,578.192,385.231C600.757,385.231,621.68,390.359,640.962,400.615C660.243,410.872,676.346,424.82,689.269,442.462C702.192,460.103,713.68,479.59,723.731,500.923C733.782,522.257,741.577,544.923,747.115,568.923C752.654,592.923,756.757,615.692,759.423,637.231C762.09,658.769,763.423,679.18,763.423,698.462C763.423,769.436,740.962,824.718,696.038,864.308C651.115,903.897,592.551,923.692,520.346,923.692C438.295,923.692,369.782,897.128,314.808,844C259.834,790.872,232.346,723.487,232.346,641.846C232.346,623.795,234.91,606.359,240.038,589.538C245.166,572.718,250.705,559.385,256.654,549.538C262.603,539.692,268.141,530.359,273.269,521.538C278.397,512.718,280.962,506.462,280.962,502.769C280.962,491.282,277.885,476.308,271.731,457.846C265.577,439.385,257.987,430.154,248.962,430.154C248.141,430.154,244.654,430.769,238.5,432C217.577,438.154,199.013,449.641,182.808,466.462C166.603,483.282,154.09,502.666,145.269,524.615C136.449,546.564,129.782,568.718,125.269,591.077C120.757,613.436,118.5,635.282,118.5,656.615C118.5,656.615,118.5,656.615,118.5,656.615" class="soliloquy-pinterest-p"/><glyph unicode="U" d="M245.354,86.516C245.354,86.516,306.862,148.024,306.862,148.024C306.862,148.024,148.024,306.862,148.024,306.862C148.024,306.862,86.516,245.354,86.516,245.354C86.516,245.354,86.516,173.032,86.516,173.032C86.516,173.032,173.032,173.032,173.032,173.032C173.032,173.032,173.032,86.516,173.032,86.516C173.032,86.516,245.354,86.516,245.354,86.516C245.354,86.516,245.354,86.516,245.354,86.516M598.854,713.758C598.854,723.672,593.898,728.628,583.984,728.628C579.478,728.628,575.648,727.051,572.494,723.897C572.494,723.897,206.152,357.555,206.152,357.555C202.997,354.401,201.42,350.571,201.42,346.065C201.42,336.151,206.377,331.195,216.29,331.195C220.797,331.195,224.626,332.772,227.781,335.926C227.781,335.926,594.123,702.268,594.123,702.268C597.277,705.422,598.854,709.252,598.854,713.758C598.854,713.758,598.854,713.758,598.854,713.758M562.355,843.533C562.355,843.533,843.533,562.355,843.533,562.355C843.533,562.355,281.178,0,281.178,0C281.178,0,0,0,0,0C0,0,0,281.178,0,281.178C0,281.178,562.355,843.533,562.355,843.533M1024,778.646C1024,754.764,1015.664,734.486,998.991,717.814C998.991,717.814,886.791,605.613,886.791,605.613C886.791,605.613,605.613,886.791,605.613,886.791C605.613,886.791,717.814,998.316,717.814,998.316C734.036,1015.438,754.313,1024,778.646,1024C802.527,1024,823.03,1015.438,840.153,998.316C840.153,998.316,998.991,840.153,998.991,840.153C1015.664,822.58,1024,802.077,1024,778.646C1024,778.646,1024,778.646,1024,778.646" class="soliloquy-pencil"/><glyph unicode="V" d="M1024,199.973C1024,176.987,1015.955,157.45,999.865,141.36C999.865,141.36,882.64,24.135,882.64,24.135C866.55,8.045,847.013,0,824.027,0C801.041,0,781.504,8.045,765.414,24.135C765.414,24.135,512,277.549,512,277.549C512,277.549,258.586,24.135,258.586,24.135C242.496,8.045,222.959,0,199.973,0C176.987,0,157.45,8.045,141.36,24.135C141.36,24.135,24.135,141.36,24.135,141.36C8.045,157.45,0,176.987,0,199.973C0,222.959,8.045,242.496,24.135,258.586C24.135,258.586,277.549,512,277.549,512C277.549,512,24.135,765.414,24.135,765.414C8.045,781.504,0,801.041,0,824.027C0,847.013,8.045,866.55,24.135,882.64C24.135,882.64,141.36,999.865,141.36,999.865C157.45,1015.955,176.987,1024,199.973,1024C222.959,1024,242.496,1015.955,258.586,999.865C258.586,999.865,512,746.451,512,746.451C512,746.451,765.414,999.865,765.414,999.865C781.504,1015.955,801.041,1024,824.027,1024C847.013,1024,866.55,1015.955,882.64,999.865C882.64,999.865,999.865,882.64,999.865,882.64C1015.955,866.55,1024,847.013,1024,824.027C1024,801.041,1015.955,781.504,999.865,765.414C999.865,765.414,746.451,512,746.451,512C746.451,512,999.865,258.586,999.865,258.586C1015.955,242.496,1024,222.959,1024,199.973C1024,199.973,1024,199.973,1024,199.973" class="soliloquy-close"/><glyph unicode="W" d="M1024,751.577C1024,733.959,1017.834,718.985,1005.502,706.653C1005.502,706.653,527.195,228.346,527.195,228.346C527.195,228.346,437.347,138.498,437.347,138.498C425.015,126.166,410.041,120,392.423,120C374.806,120,359.832,126.166,347.499,138.498C347.499,138.498,257.652,228.346,257.652,228.346C257.652,228.346,18.498,467.499,18.498,467.499C6.166,479.832,0,494.806,0,512.423C0,530.041,6.166,545.015,18.498,557.347C18.498,557.347,108.346,647.195,108.346,647.195C120.678,659.527,135.652,665.693,153.27,665.693C170.887,665.693,185.861,659.527,198.194,647.195C198.194,647.195,392.423,452.305,392.423,452.305C392.423,452.305,825.806,886.348,825.806,886.348C838.139,898.681,853.113,904.846,870.73,904.846C888.348,904.846,903.322,898.681,915.654,886.348C915.654,886.348,1005.502,796.501,1005.502,796.501C1017.834,784.168,1024,769.194,1024,751.577C1024,751.577,1024,751.577,1024,751.577" class="soliloquy-check"/></font></defs></svg>
|
assets/fonts/monsterinsights.ttf
ADDED
Binary file
|
assets/fonts/monsterinsights.woff
ADDED
Binary file
|
assets/images/down-green.png
ADDED
Binary file
|
assets/images/down-green@2x.png
ADDED
Binary file
|
assets/images/down.png
ADDED
Binary file
|
assets/images/down@2x.png
ADDED
Binary file
|
assets/images/em-mascot.png
ADDED
Binary file
|
assets/images/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
assets/images/plugin-om.png
ADDED
Binary file
|
assets/images/plugin-smtp.png
ADDED
Binary file
|
assets/images/plugin-wpforms.png
ADDED
Binary file
|
assets/images/question-mark.png
ADDED
Binary file
|
assets/images/rafflepress.png
ADDED
Binary file
|
assets/images/seedprod.png
ADDED
Binary file
|
assets/images/trustpulse.png
ADDED
Binary file
|
assets/images/up-red.png
ADDED
Binary file
|
assets/images/up-red@2x.png
ADDED
Binary file
|
assets/images/up.png
ADDED
Binary file
|
assets/images/up@2x.png
ADDED
Binary file
|
assets/images/upsell/chart.png
ADDED
Binary file
|
assets/images/upsell/chart.svg
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewbox='0 0 560 260'>
|
2 |
+
<defs>
|
3 |
+
<style type="text/css">
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
.dataset {
|
9 |
+
fill-opacity: 0.2;
|
10 |
+
-webkit-filter: url(#dropshadow);
|
11 |
+
filter: url(#dropshadow);
|
12 |
+
}
|
13 |
+
|
14 |
+
#dataset-1 {
|
15 |
+
fill: #52C0A5;
|
16 |
+
}
|
17 |
+
|
18 |
+
#dataset-2 {
|
19 |
+
fill: #21A6EE;
|
20 |
+
}
|
21 |
+
|
22 |
+
#dataset-3 {
|
23 |
+
fill: #807CCC;
|
24 |
+
}
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
</style>
|
29 |
+
<filter id='dropshadow'>
|
30 |
+
<feGaussianBlur in='SourceAlpha' stdDeviation='3'></feGaussianBlur>
|
31 |
+
<feOffset dx='0' dy='0' result='offsetblur'></feOffset>
|
32 |
+
<feComponentTransfer>
|
33 |
+
<feFuncA slope='0.2' type='linear'></feFuncA>
|
34 |
+
</feComponentTransfer>
|
35 |
+
<feMerge>
|
36 |
+
<feMergeNode></feMergeNode>
|
37 |
+
<feMergeNode in='SourceGraphic'></feMergeNode>
|
38 |
+
</feMerge>
|
39 |
+
</filter>
|
40 |
+
</defs>
|
41 |
+
|
42 |
+
|
43 |
+
<g class='datasets'>
|
44 |
+
<path class='dataset' id="dataset-3" d="M0,260c0,0,4-8,7-8c59,0,83-150,132-150s66,33,113,33s57-46,78-46c20,0,36,33,74,33s27-24,47-24
|
45 |
+
c19,0,48,115,109,162L0,259V260z"/>
|
46 |
+
<path class='dataset' id="dataset-2" d="M2.9,260c35-6,63-136,88-136c40.3,0,60,23.3,131,39c89.9,19.9,99-93,136.9-92.5c49,0.7,58.8,27.1,78.1,28.5
|
47 |
+
c59.1,4.3,123.1-83.9,129-95c-0.6,48.8-0.8,79.1-1.4,124.3c-0.8,67.2-1.6,131.7-1.6,131.7S2.9,259,2.9,260z"/>
|
48 |
+
<path class='dataset' id="dataset-1" d="M-0.1,260c0,0,22-61,64-61c41,0,48-55,90-55c41,0,40-18,62-18c21,0,47,58,98,58
|
49 |
+
c31.5,0,68.1-47.1,152.7-69.1C519.9,101,565.9,4,565.9,4c-0.5,60-3,256-3,256H-0.1z"/>
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
</g>
|
54 |
+
</svg>
|
assets/images/upsell/woo-edd-upsell.png
ADDED
Binary file
|
assets/images/upsell/woo-edd-upsell.svg
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="721" height="331" viewBox="0 0 721 331">
|
2 |
+
<metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
|
3 |
+
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c142 79.160924, 2017/07/13-01:06:39 ">
|
4 |
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
5 |
+
<rdf:Description rdf:about=""/>
|
6 |
+
</rdf:RDF>
|
7 |
+
</x:xmpmeta>
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
<?xpacket end="w"?></metadata>
|
30 |
+
<defs>
|
31 |
+
<style>
|
32 |
+
.cls-1 {
|
33 |
+
opacity: 0.7;
|
34 |
+
}
|
35 |
+
</style>
|
36 |
+
</defs>
|
37 |
+
<image id="Vector_Smart_Object" data-name="Vector Smart Object" class="cls-1" width="721" height="331" xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtEAAAFLCAMAAAAnAiCNAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACSVBMVEUAAAAGhdcGhdcGhdcGhdcGhdcGhdcGhdcGhdcGhdcGhdcGhdcGhdcGhdcGhdcGhdcGhde+3/S+3/RVrOO+3/S+3/S+3/S+3/S+3/S+3/S+3/SQye2+3/S+3/SVy+6GxOt4vehcr+S+3/S+3/S+3/TE4vWx2fKez+6+3/S+3/Sn1PB5vekSi9lXrOSz2fJAoeAdkNtisuYpltyFw+s0nN5Lp+Kczu8vmd6s1vGi0vCf0O8smN09oODj8frW6/jS6fc5nt9uuOcOidgklNwekdsckNoRitl+v+pns+Zfr+Qzmt5bruR3u+g+oOAik9uQyO0XjdpJpeFLpuK43PMMiNhOp+I+n98nldxDouBZrOM4nd5tt+dUquJptOaHw+tHpOEmldxntOb///+DwutEpOHB4fUrl901nN/v9/0WjdrQ6Piv1/IllNyi0fAXjdlUq+Qtl91fr+Qsl93g8Ppjs+Z9vunX6/ix2fN0u+hzuumSyu7////0+v38/v+JxezP5/e22/JesOVxuehWrOM2nN6PyO2v2PJSquNYrON2vOmp1fCq1fAiktv6/f7v9/xhseWn0/AfkduKxutRquObze53vOlAouCEw+oQitiCwepls+U/oeAjk9uVyu0Zjtp6vupvuOdCoeBvt+djseVOqOKh0O+ZzO5Mp+KSye2IxOt/v+lstubF4/Xn8/sTi9mSyu1Tq+NGpOGYzO5st+cgktu53fNfseWLxuvf7/pyuug+oeB8vumr1vCTyu3l8vsllNxDo+EVjdkAAACHFG2mAAAAwnRSTlMALWSGOAuzkRZwe0NPWp2oIgstTxY4WnuGqLOzkU+zs7OznWQis7OzQ3Czs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Nws7Ozs7Ozs7Ozsy1Ps7Ozs7Nws7OGs7Ozs7Ozs7Ozs7Ozs7Ozs7ORs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs4aGhleKvvEAAAABYktHRACIBR1IAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAB3RJTUUH4gILDyoz4X4uSwAAG4FJREFUeNrt3f1jG0deBnDZrjcvrpPY2LItx6R1DPJb3DhxTEiBJhwOKE05DHlzyPXAkrEd7KYQ36UJBxQ4LsCVl4MD2is9jgAHDbnEJekLHMfLf4Z2Z3e1klbSzM776nl+SmVZlnY/HX13ZnYmk0GQZOno7Op8TvebQBBB6e5y3Ozp1v1GEGuyN8TSbSAbArpMWvcbQSyJ2wbuC/+1X/fbqU2HE6RH91tB7Mg+V4tLunuP+6/ndb+fmvSGoo37nw0xM+RbfZ8P2unV/X5qUhHdpfutIHakk3jZR0Ab3Ebv0/1WEDvit82mskEdbV4cExMpLqKkjQOdyexHX4dp0Y23legIaQNBZ7oJ6S4DOxbbNbrxthSd2es/eED3oYpPR29XL8YMDYpuvC1Fm91GI0LT3Xug3HR1cn3j6cbbSrThdTQiMsHJPnhI9zuR/xlBuh0SnuyD6b0uMbw/GhGZnkrb1an7vUiL4WOGiMjsr4g2tBtAQAyf14GITFekwNT9XqTFnXHXGf4L04FSnbYQXZYc8y8klemsgMbELyQF2VsRjWkySBrSiSYaSVf82bn701pgdjito/s9IkKz9/n9Xb2HdL8LaYFoJF2BaLvS1480zw9RiNb9HsWnTzdM5gwMZoeGR3JIy4xSiNb9HqXk8HB2cEC3U0rNY0OwTB0i+ocjOfJCJS+mV7SX8aMTurm25nxY91GyK0T0j0Tyo/lKXki56JyL2uSWenJY9/GxLm0vupypft1w49OXRbHBHoh2M2RgOw3PyQLRJFnTuj8m4TlZINrPuFGlxwQuB5MGosNkdTOuJKv7WFgciK5kyJDKYwANNEcgOpLDRpAebMsKenR0WtALQXQkIwYMuLRlxTEzW3Z2bE7ES0F0VfSTntJ9CHTEn4txTNxrQXSQcb2FR9+Q7gOgJS/5M4imBbwWRNdEay3d16bXhLO+6FEBrwXRtZnSKLpNQeeOQ7TMjGkD3ZY1tJt5AnqW4jnNMu8+D6LrMqJrkkfbgs7NnfCgnWz2HIhOnmE9oCd1f26NmZtfWDi12PQpEM2RSR2gJ3R/asMD0RwZ0dDf0Teu+1MbHojmiYZJS+1bRFPGE/1jpyP58TOVvAzRTaO+kR7U/ZGNjyf6J34ykp96pZKzEN08qhtp1BwtA9FcGVcsui2nJ7EFovkyqBT0gO6Pa0Egmi9qx8JxWdg6EM2XETTRybN43Dm+yP8y1ZElunWnoNCImLqSLCrLjrQ10e7Eo1n+l6kORHPmKJroxJFy6iCaMwondxzV9iElBaJNFJ1TJzp1d8pCtJGild1xmL45d1aJHlUbIXcHJ4uyS8P03Vpolej2iaqB8D7VH4xmEfwGqf31hZqXXjxR8wsnxLmGaN6oEq286JAoerbuN2aFfctCNG+GFIlW3hktT3TcKwtrpCGaN6q675TPupMnejrmV4SNHUI0bxSJVj+8IrHqqL/P5JSwtw3RvFEkWn3f3VzyrqfaX69rgKe9hz0152KfkDwQzRtFolM3YJhD752hUXRlmMbNsNhEj863zEwOovmjqPcujbdjsYmmuMl7IQfR/FEkWvfHlBGINjJqRsFTue6Mp4Z6aAWiFUXNTKV+3R9TRs45LKubQ7SiKAGdTtG5xXMM3XYe1Z/+XCQ/s1TJeYgWFEWdd1h5hlD93M9G8nOFSi5AtKAouisLC3VAtKIomh4N0RCtJqpWN4BoiFYTVSvQjOn+oPoD0Uqi6p6sdPZ1MAWiVUTZSo4QDdFKomy/LIhOiejFUwsLM7oPZeOoWxFd+X2z5iUVome8131J97FsGIULouv+qPqTBtFz/j3DprbSKjetaNdtZitJg+jgVrUF/peSEpW7v6Vv/RnWpEH0jNmile7QiSGWNIhe9EWLu1FYZNTuoozOjjSIzi0Q0cLXgRcStTvOorMjFaLnXNKzZl4Yqt2BBZeG6RBdLjy0rjvaJIdVb86ZxuUNmJIS0aZGOeh03mnIEoiWGbVXhSSpW+KfMRAtMePKFvaPxNqyY1rMivd6RHO9ed1HnjrqSw43dpYdo6fqF4tmj2tDj2iKO9Cb5MQ5M68CazKkBbSVvR0njwvgbLHoco6Zb1rh9KTqWLe10NxLYjw7zqsXL158rbXonw+e1lz0a+WnXXyVQnTwclyZPan7PDSPlhKapM+ya8PP/4Io0M5yYLa56KXgH81FX3B/YZlCdPBynPnFX9J9Kpokq6ni8GLX3I7PX6qc0yXOXNYm+kri93y+8vHP6j4XDTOlodPO1kZ6Lmihr15bKYiIHtE8uXw9UP3Lus9GfDR7tqyR9mvopRtCOFspupzr/heVgVOTxrPaPZcbaXtWkT5JzuQFUZ4tFV24TJpp0yZEHz6q73qwKvYsf3dcNGhLRRdukFbanA6P4aHsoM6rwZrYsnkF6e1dEgjaVtH+H2JppMf6ZcWAOqM2A5ZcHJ7yTqOwGtpm0YWr3mtN0x+8ft3KlMaSYRav6LgqErS9oi97r8Uwy1+3McVRvptykpBdZa9BtBfv4pB+M4N2E91nw/QOUkavQLSXq4yFtG5iqjNhQSk9KhKE9aIvsIlWtpiiMbHgtnCI5hCtdNUMM2L+1SFEc4hWtIuxUTGedJ3oL7zOnS+2Fv0rwdOai/6i+3K/SiGa5+0mF61tujJIM4h+fZU7xdaiS8HTmosuui+3RiGa5+0mF61qlX2zYjhpiOYQbeDAnooMGt3jAdHJRavarMq4TJg8Dw+ik4tuxwtDkj6DZy1BdHLRynZCMTDmbgkH0clFGzJxWU8mTB0Rh+jEottvxLA6Y2ZeIEJ0YtGKNpo3N31GzsWD6MSi27roIBkw0DREJxXd7kUHycCUabUHRCcV3ZZD4DHpmzTrGhGik4pu0wHDuAyMcfdPT8/P+wvEzoX/gmilolXvhWJ4+gazPKqn3XVxvdvhFt1/8dyPD9EJRaOJrs9A/1h2argqlOPlZGHZGR8016IpEJ1MdBtO9k+Yvv6xqZau/aWSZwhoiNYgur3WNeDOwFjzy8dpfzV+AbuxQ3Qi0empont6FeXX5mPj412MbjDBtdEvRCcRrWO/KknpcvQmONoR0ud4QEN0ItEp6os2RXSFNOc+vxCdQHSahgshGqLTdVloiuhI1cFHGqLZRdfUHHtVXVtV0iFOdGeX8ixEc6wONCdpiGYWfbjGRIf6hq1Xd8vOlZi1xmp67zBmqFJ0XT8HRPOTxgiLRtF1RTRE85PGKLg+0ZN1pweiE5CuOarTPmifNMYM1YmOuRXrkPprqx7dIrlTuzDT6Esv+cXz4qkFXBmqE52e0W/dkXY/F0SziAZoYZG2XwBEM4gGaIGRtbg6RNOLTtFsDhNyFKI1i57kP4lIJH1y7iKHaErRI1ieQ3SyEK1R9LBB2xmnJXIaaYimEt3Oy5DKi5RKGqIpRA+j4pCSAYjWInoEl4SyIqNPGqJbic6igpYWGeuqQ3Rz0VPpuUfWwMgoOyC6iegRtM+SI2GLIohuKHoI9bP0SJivBNHxoofG0DwriIRCGqLrRQ8fHQRncenZ4zgHertjfyZhuhJE14nu0k0gXdnnnSBnTyxpCZeGEA3RUtPj+NkX+2OIhmjLsicQ7cQ20hCdItGH9ndZfwds64Sgndhlc8R330G0LtF7DzopuKm7ZVqIFr/BOETrEv18e1Q4B0LRe+N+LH5mB0TrEt2b6G/17nH2WNWw9wag4z+qcNAQbZfofU26DcxMt39pePBQ7I8hur1FB8s3CVybVHq6O70PGltzZPogur1FB1/hVtUdme6Ojr0NfoQxQ72iexIv69UZfZlD+9yHvEumg95Pn6e1YafoJpnkFwzRHKLDqxzmRF/T67arTmfrc+8lGICzf907PxLuNIRo5aLjXoUSgH+ZtUc3RGGRcFsWRJsg+iCtgG5325Subtqnmx4JF4YQbUTVwVAX7214lWVhJJTREM0iuiPxVkBVhS/ZisjbpOpA/U/bKTKW3IVom3rvUhYZRQdEQ7S+yCg6IBqi9UXCneAQDdH6IqWJhmhtonvaXrSUJjo3PT//2oULEK1edLfbiUc9/p3CyGmi3VwsFCBavejM3s79z+lWpTGSlviHaNw5qylD0kBDNESLz6F99SOj+rIWlRkm5iE/68UNiEaiST5fwAjRjrN5E6KRSjp1E67JyV8nebXq0ZiHGpCG6DZPh2NYlqPnN0zMQ5FsQTQSpEu3YBGinW2IRki6vVPyxrVlY7Lin98bVY/GPERClN+CaISEFB2XC/bmzZqyw17R5fyGbg/2p6PynW5plmtQQXR7B6IhOl2BaFWib67Fpvqq4Dc7EkS3IbMC0UpE397ZlNQ15GY/UFcC0SpEb8v07IZ2EZk2CEQrEL0t2bOTpmVheBMV/aUvWxVrRN+RD9rOVrqvv38sKzpvRUQLmMqpMtaI3lIh2qo1cMuYB7PDcibdR+/0g2gpoknNsbm9Kilr694fsGih8r5JiRPuIVq66B3vOTdXpWXDI029ep3uTMhYywiiFYouuU/ZkXkkSKFux4p0/eL3p4JoxaK9p0irOdxsWFNID0gsNyBaqei1VZmxRXRW3h3YEG2c6LulRml9KOwQPSC74IBoo0SXGvbLtT4UVogeVNBAQzREK4u8RYwgGqI1RG6XHURDdFpBSxW9dqdYvEUubu4W763dhuhm2S42SgpEqwMtS/Tt7Z31urZms1QU2YmVMtF8+S3dZptGVQ0tS/TtYr3mMLe2N/j/gheIjsRo0RJ2K1YoemO7CWfSVO+IOb0QHYnJogfUdNvJEb1RpLpbY13EoLCFor8iPL9tgWglAytyRNd5XvemBm8Vi6VSzU+27rSj6FeE5yvmix5TClqo6HtRtet3f+f07779ex6g1wuFL73++u//wVejTyjxzq+EaCtES1xNX7Lom5H6ufSHX3vbO+P3A9F+/ujN85Vn3eW7RoRoK0Qr7LgTK7qytvPmH//J14MzXiu6nGvvVEoPrmYaom0QPaAYtCjRG+GI11bx7cgZjxFdKNy4Gpq+B9FiRP9pv5YMGNdECxJ9MyiQN4tfz+dbiY6a3kleeUB0RPSfqYYTZGQ4O9hnUBMtRnS4HsWf/0U+TyO67PCN4AoyMWmINkG0l6HJRqiPWik6AP2Nv8znaUVXljdfT1pMQ7QxostN9dH4AkRxR4cY0QHov/pmnkV0Ydnv9thMSBqiDRJdzlRMOz2o/m3wiw5A/3U+zya6sOJXHpvJZuVBdCi6VPqbhYVF3aRHxvRfFwoQ7YPe/Ns8s+hC4SpPLQ3RoWjvT4zqFp3LDfdpLzq4RZMT7rz7Xj6J6JA0RKdCdG6kvwr0hIa3wCn69mZT0C1FB6STLNAC0eaJzuUmo6IVT+kQIXq9OejWogPSCSbjQbSJoqtIayijOUXfJRwbgqYQ7ZNO0OEB0UaKjpJWO49UgGi/iP5Wnke03+PBXkpDtJmiI6R1/HUe0RtkYeT381yiCzcuOaEfiE6B6JEJ2aKnTy0sHJsTL5pMt/u7DzhFF66RuoO1VxqiDRWdG/c78WTdX7g4637e2WnRom+3KqJpRZNtY5n7OyDaVNG5IbmiF4i8U6JFk5W+7+f5Ra9cipx1iLZfdK5fpug5x49g0aSJ/vYHAkQXrjgBNIhOIrpY/Pv5+elmCI4dd2ZPNXuG2IzLFL0oSfROq34OBtGFJe/F2HrwIPoV2plKpPB0nBllpCdlVh3+pzkuVrTfROfFiF5OUElDNLXoE36j1uBiSkLGZYqeJ5/mpFjRRZommlq030gzzViCaFrRJ4OvaeeYKtFeIy1tLaVj7v+d5+J/llj0Fk0TTS+a9OAx3XYI0bSi50PRC8pED0sdYZkeHW3QHZ1YNNme6UVhogvn3WduQXRaROcGLBszJNeFH4gTfZ352hCiaUWfC0WfonXBH3f6/2GLRHuzSN9vBZpB9A0nRATRgkXPzQaiFfZZD9s19+6m92vfESi64E1YYpmvVCW68jrLF8r5hweR/GOh5qdXgn/80z9H8s3vVvIv7k+Xvf/T3H9d+NdIPnxYyb95P23+wfSLzs2ob6JzObvmRxfpig4W0ddZezsaiDYu8kQ/OnPme97rtrzP8ORxt3dgXimtfqvuYfGWUHq5JWgW0ZcjZx6iaXL6cfC6FBXFaOPeAUmZtOo+Q6+Mvi9UdOESYyHd7qKfPHYYRKtP1qZ7wcmA4QtiRXuDLLcgmjJHIq9rpOghm9brWKMso5lEX2DskW5v0bvkWu+OuaKHbVpTybswfLc1aCbR1yh6wtpR9KO4xz7yey/+3XDR6ssODtEUF4ZMoglN+jtZ2kP0o11nt870o5eJ50tXvmy4aFvWJi3Rja+wiY6eeoj2c9q1+/hptWm3k8MDfblguujMkEWiKbo61Iq+csG8LPOJPuLbfXYk8uAT/8E3bhTMF610L0MjRdPvoVUneskxLxd4RIfVcjlnz4TK/UeWVgoWiLZkHxYywHK/dbx6b+sinWhvHJy+Qzr1ok8/q3qpjz72HvU7OZyr3qc3WHTWX+Xfir2yStRn1MsbK1SilzhEJ3hXSlJMPlNppu7FPnlUabavFywRbcd+hqx26EhDdFzFcenV++8Gr/Z4JuzkKBgvOlymVO2cUjWi6Uh7z6Rf0rFO9N2SedlOKPpMUHEsrTzMf/p+zeG8dLlgvuhwLWkb9gVnbw3fuEwpOmFfB/VvqU8T0afPPn0UC/ppcNzKdfjD8hX2ey9XHcwbBfNFH9a0dwWH6MdnqRJ8T7Ym3Xai3W64x7sf11ccZ4O22J2i/dDrNfrOt0PQS5EvPHNFH9W0jnQy0d4qu2cpv0B3KUmT6aT092VZLzrohqt0zPkVx+Mqug/9ntAX/XL6avSgmSt6IiJaZRcexyj4M9qakJI0K03bRe+Gja7z7Eik+AgrDr87IxCd/+B+5FHTRY/r2mIomWhyJzj1ZQ4daW/u3Wa7iA4rC5LHT/3i4+OgYj4fHK2HlQGrT78adnKYLjqb0UQ6mWhym+EZsaS9xf4Z1r6zWvTHVZd6XnZPv1IZ4XbeCYvlh9FB2AcFO0SP1G1umDVaNDmEM9SiqUifd59xtz1EB3ON3n0xKvvskU9qKg5rRU/V79Y5qaYTj+c+w4/oRQdXQU1Ik+UN6Kd12Cw6uCZ84wv5/Hu1nc1OTV+njaJH4vYJn1Ay1JJQtNfZ8ZhBdGvSV7yfMyz0b6/o4NrvnZUHXnVcGRT0ezNWCpaLzmZio6LySCj6DmMhTUH6HfenLMuE2Sr6UdDJ8Wah8MDvxfhWpbfZqb34s1D04UyDDMjfPSvpmkrer33CIroF6RWHsYy2VXRw/4njwn0QUn0heLhudNVC0ROZhumXbTqp6FvMZUeF9HLjooOhjLZUdDBFlByFBxGsn77vFh9vrhSsFz2WaZZ+ube1JBVNNrh/koi0cyVGtDfxjqE32lLR4f0npCWOinaHUL5xrf7IWCd6KtMiA2MSrxGTit7w1qChHQhvTfoGc9Fhpeiwk8NviatF5/MPC/aLHm4F2k3f5FFJqhOviE6W2z0tijTZS5lpIxYLRYedGcHHTqHow300okl3Xv9kVnjeSiqaDBvuMopuRJo00WybZdkrujJ8kj7RQ/Sg5aQjqWh/jjRTB15j0qSJpp/tb7PoaO9c6kS3rKENFk1WCmOtpONJk4mkTHtWWCu6qvcyZaJHJvlF6hPtN9JHmEkH038jpJcSNNGWiq6+Py1doocHdHPmE00a6cePmEmfriVNFkNnWd/fUtHLy8tVoFMletyABppPNBllYZqvFE/6RqJtwW0UXac1PaIN8cwn+vZmwrqjhrS38gzjhrMQbZTooUHdkIWIXr1H6g7WTuka0qSfY5Npv1mINkf0+NSk7h47YaL9i8MEpXRI+qo/oYNpRgdEx4l+S/xoRetM9pukmV80GQt3XuYg7S9WxzT+DdFxojt0WzIjfKL9/g4u0qSfg7nmgGiIjg2naL+U5iW9yXDrShiIhuiY8Ir2Zyzxkd5kmqEUBKIhOibcogPSzxL0eAS3J7FfFUZ4QDRER8MvOiD9+Aij53A9WcbR7yAQDdExESA6IO18xFR5hOvJJgRdK/r2moGBaOURITok/ewJfQP9CVcNHSO66BgYiFYeIaKDHg/HOfsxHehgDyhnKzFoiIbouIgRvXpnMziHuxSmj4Rb5pQS9EPHiv7ss//QrTcun5UD0UojSPTq7cqy/7vN72t5VPHs3OP4i9Wic7l53Xrj4s57gGilESW6XHmEzbTzbKZhQ/1ktzKusp684oBoiG4QcaKjzXQZ9SdP6no+Ts98FBn53uRqoOtFx8T7yQt5cfHWPZpnnJsG0UojUPTq6tp6VQP17OzTp0/OeJl5ulu9Arizw1FBQzREN4xQ0aur29WmG2YnyUQOiIbo1hEsutxO77TkvFXkbp8hGqIbRLjo1dWNe80a6s2dZLM4IBqiqSJBtIt6e2crjnOpyHp7LERDNFvkiPZUrxXvloLuj61SqbgtUDNEQ3SDyBMtPRAN0TGBaIhOVyAaotMViIbodAWiITpdgWiITlcgGqLTFYiG6HQl/aK/9j1x+U+INj7pFy1ypLIE0cYnKtrOQDRERwPREJ2uQDREpysQrVL092vz4X9V5wffr88Pok/4sPL4d938N0STdAXZ4x2MJZG51oTfFaF/yQvZxWXBz4zRoumyfatUKt1juc8HojMEspxcutEQ9GWJf5bknPWiN/w55SyrTUF0Zr9MVUuNQK+cly561HrR4S1tDMvEQ3SmVyqr6w1EvyMdtDNnu+jtymcpQTR9npPr6nIs6OvyQc/yVbAGiI7edUzdSEN05pB3DHaKwkOKwPOx13DkNN0S/0e9eLfqLlgvmhyjuwl+qb1FZ7xjIGqdgUg2Np3mof8qTaLtWDpE39mAaNYccI9BUQKsteag2beWZTqr56wX7bUIm1sQzZou78tNhqy7TUULXuGgktvey49aL/pW5P9+6vcF0X5nx7oMWhvNVlTiXY+0cch3w5z1om9WDhb9VyhEZzI93kGQYutm46s3eaDJphWzPJYooqI/Ouy+26F/XxAdzOeQVgOoT0xXh52iV+94H2WT5SIHojN+ZwdDM2B47sVcGJokmqlbaa1YvMN0BQ3RmWAcPC2N9E3SaThtougT7i/dlfnpyTXEId2kNIcU0sl3EzQqawT0/2SrI0f0/2azY/0M+T+5vZarQf+IblHa40+/KwpYbV9zbvqLsB/srvmIpLISPS7Zy3ign/fexrq047xBPv5+3aCEpTOY6tzj/WdPF2UOBNfU6yW7E45SHqj9iI6UHKA9wlVT0OUdZ+a3daiKTSQ9ui2ThOeNtB1yZ9UhKUhHFZtIWL99IBoxIhCNpCsQjaQrpovu6fVDetg7ehGkafZWsYlE8BjN/wNvfyA4x0t3CgAAAABJRU5ErkJggg=="/>
|
38 |
+
</svg>
|
assets/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
assets/js/admin-common.js
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( document ).ready( function( $ ) {
|
2 |
+
/**
|
3 |
+
* Dismissable Notices
|
4 |
+
* - Sends an AJAX request to mark the notice as dismissed
|
5 |
+
*/
|
6 |
+
$( 'div.exactmetrics-notice' ).on( 'click', 'button.notice-dismiss', function( e ) {
|
7 |
+
e.preventDefault();
|
8 |
+
$( this ).closest( 'div.exactmetrics-notice' ).fadeOut();
|
9 |
+
|
10 |
+
// If this is a dismissible notice, it means we need to send an AJAX request
|
11 |
+
if ( $( this ).parent().hasClass( 'is-dismissible' ) ) {
|
12 |
+
$.post(
|
13 |
+
exactmetrics_admin_common.ajax,
|
14 |
+
{
|
15 |
+
action: 'exactmetrics_ajax_dismiss_notice',
|
16 |
+
nonce: exactmetrics_admin_common.dismiss_notice_nonce,
|
17 |
+
notice: $( this ).parent().data( 'notice' )
|
18 |
+
},
|
19 |
+
function( response ) {},
|
20 |
+
'json'
|
21 |
+
);
|
22 |
+
}
|
23 |
+
|
24 |
+
} );
|
25 |
+
});
|
assets/js/admin-common.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
;jQuery(document).ready(function(i){i('div.exactmetrics-notice').on('click','button.notice-dismiss',function(n){n.preventDefault();i(this).closest('div.exactmetrics-notice').fadeOut();if(i(this).parent().hasClass('is-dismissible')){i.post(exactmetrics_admin_common.ajax,{action:'exactmetrics_ajax_dismiss_notice',nonce:exactmetrics_admin_common.dismiss_notice_nonce,notice:i(this).parent().data('notice')},function(i){},'json')}})});
|
assets/js/frontend.js
ADDED
@@ -0,0 +1,643 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Developer's Notice:
|
3 |
+
*
|
4 |
+
* Note: JS in this file (and this file itself) is not garunteed backwards compatibility. JS can be added, changed or removed at any time without notice.
|
5 |
+
* For more information see the `Backwards Compatibility Guidelines for Developers` section of the README.md file.
|
6 |
+
*/
|
7 |
+
/**
|
8 |
+
* Handles:
|
9 |
+
* - JS Events handling
|
10 |
+
*
|
11 |
+
* @since 6.0.12
|
12 |
+
*/
|
13 |
+
var ExactMetrics = function(){
|
14 |
+
/* ExactMetrics JS events tracking works on all major browsers, including IE starting at IE 7, via polyfills for any major JS function used that
|
15 |
+
is not supported by at least 95% of the global and/or US browser marketshare. Currently, IE 7 & 8 which as of 2/14/17 have under 0.25% global marketshare, require
|
16 |
+
us to polyfill Array.prototype.lastIndexOf, and if they continue to drop, we might remove this polyfill at some point. In that case note that events tracking
|
17 |
+
for IE 7/8 will continue to work, with the exception of events tracking of downloads. */
|
18 |
+
var lastClicked = [];
|
19 |
+
var internalAsOutboundCategory = '';
|
20 |
+
|
21 |
+
this.setLastClicked = function(valuesArray,fieldsArray,tracked){
|
22 |
+
valuesArray = typeof valuesArray !== 'undefined' ? valuesArray : [];
|
23 |
+
fieldsArray = typeof fieldsArray !== 'undefined' ? fieldsArray : [];
|
24 |
+
tracked = typeof tracked !== 'undefined' ? tracked : false;
|
25 |
+
|
26 |
+
lastClicked.valuesArray = valuesArray;
|
27 |
+
lastClicked.fieldsArray = fieldsArray;
|
28 |
+
};
|
29 |
+
|
30 |
+
this.getLastClicked = function () {
|
31 |
+
return lastClicked;
|
32 |
+
};
|
33 |
+
|
34 |
+
this.setInternalAsOutboundCategory = function( category ){
|
35 |
+
internalAsOutboundCategory = category;
|
36 |
+
};
|
37 |
+
|
38 |
+
this.getInternalAsOutboundCategory = function () {
|
39 |
+
return internalAsOutboundCategory;
|
40 |
+
};
|
41 |
+
|
42 |
+
this.sendEvent = function ( fieldsArray ) {
|
43 |
+
__gaTrackerSend( [], fieldsArray );
|
44 |
+
};
|
45 |
+
|
46 |
+
function __gaTrackerIsDebug () {
|
47 |
+
if ( window.exactmetrics_debug_mode ) {
|
48 |
+
return true;
|
49 |
+
} else {
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
function __gaTrackerSend ( valuesArray, fieldsArray ) {
|
55 |
+
valuesArray = typeof valuesArray !== 'undefined' ? valuesArray : [];
|
56 |
+
fieldsArray = typeof fieldsArray !== 'undefined' ? fieldsArray : {};
|
57 |
+
|
58 |
+
__gaTracker( 'send', fieldsArray );
|
59 |
+
|
60 |
+
lastClicked.valuesArray = valuesArray;
|
61 |
+
lastClicked.fieldsArray = fieldsArray;
|
62 |
+
lastClicked.tracked = true;
|
63 |
+
__gaTrackerLog( 'Tracked: ' + valuesArray.type );
|
64 |
+
__gaTrackerLog( lastClicked );
|
65 |
+
}
|
66 |
+
|
67 |
+
function __gaTrackerNotSend ( valuesArray ) {
|
68 |
+
valuesArray = typeof valuesArray !== 'undefined' ? valuesArray : [];
|
69 |
+
|
70 |
+
lastClicked.valuesArray = valuesArray;
|
71 |
+
lastClicked.fieldsArray = [];
|
72 |
+
lastClicked.tracked = false;
|
73 |
+
__gaTrackerLog( 'Not Tracked: ' + valuesArray.exit );
|
74 |
+
__gaTrackerLog( lastClicked );
|
75 |
+
}
|
76 |
+
|
77 |
+
function __gaTrackerLog ( message ) {
|
78 |
+
if ( __gaTrackerIsDebug() ) {
|
79 |
+
console.dir( message );
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
function __gaTrackerStringTrim( x ) {
|
84 |
+
return x.replace(/^\s+|\s+$/gm,'');
|
85 |
+
}
|
86 |
+
|
87 |
+
function __gaTrackerGetDomain() {
|
88 |
+
var i=0,currentdomain=document.domain,p=currentdomain.split('.'),s='_gd'+(new Date()).getTime();
|
89 |
+
while(i<(p.length-1) && document.cookie.indexOf(s+'='+s)==-1){
|
90 |
+
currentdomain = p.slice(-1-(++i)).join('.');
|
91 |
+
document.cookie = s+"="+s+";domain="+currentdomain+";";
|
92 |
+
}
|
93 |
+
document.cookie = s+"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain="+currentdomain+";";
|
94 |
+
return currentdomain;
|
95 |
+
}
|
96 |
+
|
97 |
+
function __gaTrackerGetExtension( extension ) {
|
98 |
+
extension = extension.toString();
|
99 |
+
extension = extension.substring( 0, (extension.indexOf( "#" ) == -1 ) ? extension.length : extension.indexOf( "#" ) ); /* Remove the anchor at the end, if there is one */
|
100 |
+
extension = extension.substring( 0, (extension.indexOf( "?" ) == -1 ) ? extension.length : extension.indexOf( "?" ) ); /* Remove the query after the file name, if there is one */
|
101 |
+
extension = extension.substring( extension.lastIndexOf( "/" ) + 1, extension.length ); /* Remove everything before the last slash in the path */
|
102 |
+
if ( extension.length > 0 && extension.indexOf('.') !== -1 ) { /* If there's a period left in the URL, then there's a extension. Else it is not a extension. */
|
103 |
+
extension = extension.substring( extension.indexOf( "." ) + 1 ); /* Remove everything but what's after the first period */
|
104 |
+
return extension;
|
105 |
+
} else {
|
106 |
+
return "";
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
function __gaTrackerLoaded() {
|
111 |
+
return typeof(__gaTracker) !== 'undefined' && __gaTracker && __gaTracker.hasOwnProperty( "loaded" ) && __gaTracker.loaded == true; /* jshint ignore:line */
|
112 |
+
}
|
113 |
+
|
114 |
+
function __gaTrackerTrackedClick( event ) {
|
115 |
+
return event.which == 1 || event.which == 2 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
|
116 |
+
}
|
117 |
+
|
118 |
+
function __gaTrackerGetDownloadExtensions() {
|
119 |
+
var download_extensions = [];
|
120 |
+
if ( typeof exactmetrics_frontend.download_extensions == 'string' ) {
|
121 |
+
download_extensions = exactmetrics_frontend.download_extensions.split(",");
|
122 |
+
}
|
123 |
+
return download_extensions;
|
124 |
+
}
|
125 |
+
|
126 |
+
function __gaTrackerGetInboundPaths() {
|
127 |
+
var inbound_paths = [];
|
128 |
+
if ( typeof exactmetrics_frontend.inbound_paths == 'string' ) {
|
129 |
+
inbound_paths = JSON.parse( exactmetrics_frontend.inbound_paths );
|
130 |
+
}
|
131 |
+
|
132 |
+
return inbound_paths;
|
133 |
+
}
|
134 |
+
|
135 |
+
function __gaTrackerTrackedClickType( event ) {
|
136 |
+
if ( event.which == 1 ) {
|
137 |
+
return 'event.which=1';
|
138 |
+
} else if ( event.which == 2 ) {
|
139 |
+
return 'event.which=2';
|
140 |
+
} else if ( event.metaKey ){
|
141 |
+
return 'metaKey';
|
142 |
+
} else if ( event.ctrlKey ) {
|
143 |
+
return 'ctrlKey';
|
144 |
+
} else if ( event.shiftKey ) {
|
145 |
+
return 'shiftKey';
|
146 |
+
} else if ( event.altKey ) {
|
147 |
+
return 'altKey';
|
148 |
+
} else {
|
149 |
+
return '';
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
function __gaTrackerLinkType( el ) {
|
154 |
+
var download_extensions = __gaTrackerGetDownloadExtensions();
|
155 |
+
var inbound_paths = __gaTrackerGetInboundPaths();
|
156 |
+
var type = 'unknown';
|
157 |
+
var link = el.href;
|
158 |
+
var extension = __gaTrackerGetExtension( el.href );
|
159 |
+
var currentdomain = __gaTrackerGetDomain();
|
160 |
+
var hostname = el.hostname;
|
161 |
+
var protocol = el.protocol;
|
162 |
+
var pathname = el.pathname;
|
163 |
+
link = link.toString();
|
164 |
+
var index, len;
|
165 |
+
var category = el.getAttribute("data-vars-ga-category");
|
166 |
+
|
167 |
+
if ( category ) {
|
168 |
+
return category;
|
169 |
+
}
|
170 |
+
|
171 |
+
if ( link.match( /^javascript\:/i ) ) {
|
172 |
+
type = 'internal'; /* if it's a JS link, it's internal */
|
173 |
+
} else if ( protocol && protocol.length > 0 && ( __gaTrackerStringTrim( protocol ) == 'tel' || __gaTrackerStringTrim( protocol ) == 'tel:' ) ) { /* If it's a telephone link */
|
174 |
+
type = "tel";
|
175 |
+
} else if ( protocol && protocol.length > 0 && ( __gaTrackerStringTrim( protocol ) == 'mailto' || __gaTrackerStringTrim( protocol ) == 'mailto:' ) ) { /* If it's a email */
|
176 |
+
type = "mailto";
|
177 |
+
} else if ( hostname && currentdomain && hostname.length > 0 && currentdomain.length > 0 && ! hostname.endsWith( '.' + currentdomain) && hostname !== currentdomain ) { /* If it's a outbound */
|
178 |
+
type = "external";
|
179 |
+
} else if ( pathname && JSON.stringify( inbound_paths ) != "{}" && pathname.length > 0 ) { /* If it's an internal as outbound */
|
180 |
+
var inbound_paths_length = inbound_paths.length;
|
181 |
+
for ( var inbound_paths_index = 0; inbound_paths_index < inbound_paths_length; inbound_paths_index ++ ) {
|
182 |
+
if ( inbound_paths[ inbound_paths_index ].path && inbound_paths[ inbound_paths_index ].label && inbound_paths[ inbound_paths_index ].path.length > 0 && inbound_paths[ inbound_paths_index ].label.length > 0 && pathname.startsWith( inbound_paths[ inbound_paths_index ].path ) ) {
|
183 |
+
type = "internal-as-outbound";
|
184 |
+
internalAsOutboundCategory = "outbound-link-" + inbound_paths[ inbound_paths_index ].label;
|
185 |
+
break;
|
186 |
+
}
|
187 |
+
}
|
188 |
+
/* Enable window.exactmetrics_experimental_mode at your own risk. We might eventually remove it. Also you may/can/will burn through GA quota for your property quickly. */
|
189 |
+
} else if ( hostname && window.exactmetrics_experimental_mode && hostname.length > 0 && document.domain.length > 0 && hostname !== document.domain ) { /* If it's a cross-hostname link */
|
190 |
+
type = "cross-hostname";
|
191 |
+
}
|
192 |
+
|
193 |
+
if ( extension && ( type === 'unknown' || 'external' === type ) && download_extensions.length > 0 && extension.length > 0 ) { /* If it's a download */
|
194 |
+
for ( index = 0, len = download_extensions.length; index < len; ++index ) {
|
195 |
+
if ( download_extensions[ index ].length > 0 && ( link.endsWith( download_extensions[ index ] ) || download_extensions[ index ] == extension ) ) {
|
196 |
+
type = "download";
|
197 |
+
break;
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
if ( type === 'unknown' ) {
|
203 |
+
type = 'internal';
|
204 |
+
}
|
205 |
+
return type;
|
206 |
+
}
|
207 |
+
|
208 |
+
function __gaTrackerLinkTarget( el, event ) {
|
209 |
+
|
210 |
+
/* Is actual target set and not _(self|parent|top)? */
|
211 |
+
var target = ( el.target && !el.target.match( /^_(self|parent|top)$/i ) ) ? el.target : false;
|
212 |
+
|
213 |
+
/* Assume a target if Ctrl|shift|meta-click */
|
214 |
+
if ( event.ctrlKey || event.shiftKey || event.metaKey || event.which == 2 ) {
|
215 |
+
target = "_blank";
|
216 |
+
}
|
217 |
+
return target;
|
218 |
+
}
|
219 |
+
|
220 |
+
function __gaTrackerGetTitle( el ) {
|
221 |
+
if ( el.getAttribute("data-vars-ga-label") && el.getAttribute("data-vars-ga-label").replace(/\n/ig, '') ) {
|
222 |
+
return el.getAttribute("data-vars-ga-label").replace(/\n/ig, '');
|
223 |
+
} else if ( el.title && el.title.replace(/\n/ig, '') ) {
|
224 |
+
return el.title.replace(/\n/ig, '');
|
225 |
+
} else if ( el.innerText && el.innerText.replace(/\n/ig, '') ) {
|
226 |
+
return el.innerText.replace(/\n/ig, '');
|
227 |
+
} else if ( el.getAttribute('aria-label') && el.getAttribute('aria-label').replace(/\n/ig, '') ) {
|
228 |
+
return el.getAttribute('aria-label').replace(/\n/ig, '');
|
229 |
+
} else if ( el.alt && el.alt.replace(/\n/ig, '') ) {
|
230 |
+
return el.alt.replace(/\n/ig, '');
|
231 |
+
} else if ( el.textContent && el.textContent.replace(/\n/ig, '') ) {
|
232 |
+
return el.textContent.replace(/\n/ig, '');
|
233 |
+
} else {
|
234 |
+
return undefined;
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
function __gaTrackerGetInnerTitle( el ) {
|
239 |
+
var children = el.children;
|
240 |
+
var count = 0;
|
241 |
+
var child;
|
242 |
+
var value;
|
243 |
+
for (var i = 0; i < children.length; i++) {
|
244 |
+
child = children[i];
|
245 |
+
value = __gaTrackerGetTitle( child );
|
246 |
+
if ( value ) {
|
247 |
+
return value;
|
248 |
+
}
|
249 |
+
/* max search 100 elements to ensure performance */
|
250 |
+
if ( count == 99 ) {
|
251 |
+
return undefined;
|
252 |
+
}
|
253 |
+
count++;
|
254 |
+
}
|
255 |
+
return undefined;
|
256 |
+
}
|
257 |
+
|
258 |
+
function __gaTrackerClickEvent( event ) {
|
259 |
+
var el = event.srcElement || event.target;
|
260 |
+
var valuesArray = [];
|
261 |
+
var fieldsArray;
|
262 |
+
|
263 |
+
/* Start Values Array */
|
264 |
+
valuesArray.el = el;
|
265 |
+
valuesArray.ga_loaded = __gaTrackerLoaded();
|
266 |
+
valuesArray.click_type = __gaTrackerTrackedClickType( event );
|
267 |
+
|
268 |
+
/* If GA is blocked or not loaded, or not main|middle|touch click then don't track */
|
269 |
+
if ( ! __gaTrackerLoaded() || ! __gaTrackerTrackedClick( event ) ) {
|
270 |
+
valuesArray.exit = 'loaded';
|
271 |
+
__gaTrackerNotSend( valuesArray );
|
272 |
+
return;
|
273 |
+
}
|
274 |
+
|
275 |
+
/* Loop up the DOM tree through parent elements if clicked element is not a link (eg: an image inside a link) */
|
276 |
+
while ( el && (typeof el.tagName == 'undefined' || el.tagName.toLowerCase() != 'a' || ! el.href ) ) {
|
277 |
+
el = el.parentNode;
|
278 |
+
}
|
279 |
+
|
280 |
+
/* if a link with valid href has been clicked */
|
281 |
+
if ( el && el.href && ! el.hasAttribute('xlink:href') ) {
|
282 |
+
var link = el.href; /* What link are we tracking */
|
283 |
+
var extension = __gaTrackerGetExtension( el.href ); /* What extension is this link */
|
284 |
+
var download_extensions = __gaTrackerGetDownloadExtensions(); /* Let's get the extensions to track */
|
285 |
+
var inbound_paths = __gaTrackerGetInboundPaths(); /* Let's get the internal paths to track */
|
286 |
+
var home_url = exactmetrics_frontend.home_url; /* Let's get the url to compare for external/internal use */
|
287 |
+
var currentdomain = __gaTrackerGetDomain(); /* What domain are we on? */
|
288 |
+
var type = __gaTrackerLinkType( el ); /* What type of link is this? */
|
289 |
+
var target = __gaTrackerLinkTarget( el, event ); /* Is a new tab/window being opened? */
|
290 |
+
var action = el.getAttribute("data-vars-ga-action");
|
291 |
+
var label = el.getAttribute("data-vars-ga-label");
|
292 |
+
|
293 |
+
/* Element */
|
294 |
+
valuesArray.el = el; /* el is an a element so we can parse it */
|
295 |
+
valuesArray.el_href = el.href; /* "http://example.com:3000/pathname/?search=test#hash" */
|
296 |
+
valuesArray.el_protocol = el.protocol; /* "http:" */
|
297 |
+
valuesArray.el_hostname = el.hostname; /* "example.com" */
|
298 |
+
valuesArray.el_port = el.port; /* "3000" */
|
299 |
+
valuesArray.el_pathname = el.pathname; /* "/pathname/" */
|
300 |
+
valuesArray.el_search = el.search; /* "?search=test" */
|
301 |
+
valuesArray.el_hash = el.hash; /* "#hash" */
|
302 |
+
valuesArray.el_host = el.host; /* "example.com:3000" */
|
303 |
+
|
304 |
+
/* Settings */
|
305 |
+
valuesArray.debug_mode = __gaTrackerIsDebug(); /* "example.com:3000" */
|
306 |
+
valuesArray.download_extensions = download_extensions; /* Let's get the extensions to track */
|
307 |
+
valuesArray.inbound_paths = inbound_paths; /* Let's get the internal paths to track */
|
308 |
+
valuesArray.home_url = home_url; /* Let's get the url to compare for external/internal use */
|
309 |
+
|
310 |
+
/* Parsed/Logic */
|
311 |
+
valuesArray.link = link; /* What link are we tracking */
|
312 |
+
valuesArray.extension = extension; /* What extension is this link */
|
313 |
+
valuesArray.type = type; /* What type of link is this */
|
314 |
+
valuesArray.target = target; /* Is a new tab/window being opened? */
|
315 |
+
valuesArray.title = __gaTrackerGetTitle( el ); /* Try link title, then text content */
|
316 |
+
|
317 |
+
/* only find innerTitle if we need one */
|
318 |
+
if ( ! valuesArray.label && ! valuesArray.title ) {
|
319 |
+
valuesArray.title = __gaTrackerGetInnerTitle( el );
|
320 |
+
}
|
321 |
+
|
322 |
+
/* Let's track everything but internals (that aren't internal-as-externals) and javascript */
|
323 |
+
if ( type !== 'internal' && type !== 'javascript' ) {
|
324 |
+
|
325 |
+
var __gaTrackerHitBackRun = false; /* Tracker has not yet run */
|
326 |
+
|
327 |
+
/* HitCallback to open link in same window after tracker */
|
328 |
+
var __gaTrackerHitBack = function() {
|
329 |
+
/* Run the hitback only once */
|
330 |
+
if ( __gaTrackerHitBackRun ){
|
331 |
+
return;
|
332 |
+
}
|
333 |
+
__gaTrackerHitBackRun = true;
|
334 |
+
window.location.href = link;
|
335 |
+
};
|
336 |
+
|
337 |
+
var __gaTrackerNoRedirectExternal = function() {
|
338 |
+
valuesArray.exit = 'external';
|
339 |
+
__gaTrackerNotSend( valuesArray );
|
340 |
+
};
|
341 |
+
|
342 |
+
var __gaTrackerNoRedirectInboundAsExternal = function() {
|
343 |
+
valuesArray.exit = 'internal-as-outbound';
|
344 |
+
__gaTrackerNotSend( valuesArray );
|
345 |
+
};
|
346 |
+
var __gaTrackerNoRedirectCrossHostname = function() {
|
347 |
+
valuesArray.exit = 'cross-hostname';
|
348 |
+
__gaTrackerNotSend( valuesArray );
|
349 |
+
};
|
350 |
+
|
351 |
+
if ( target || type == 'mailto' || type == 'tel' ) { /* If target opens a new window then just track */
|
352 |
+
if ( type == 'download' ) {
|
353 |
+
fieldsArray = {
|
354 |
+
hitType : 'event',
|
355 |
+
eventCategory : 'download',
|
356 |
+
eventAction : action || link,
|
357 |
+
eventLabel : label || valuesArray.title,
|
358 |
+
};
|
359 |
+
|
360 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
361 |
+
} else if ( type == 'tel' ) {
|
362 |
+
fieldsArray = {
|
363 |
+
hitType : 'event',
|
364 |
+
eventCategory : 'tel',
|
365 |
+
eventAction : action || link,
|
366 |
+
eventLabel : label || valuesArray.title.replace('tel:', ''),
|
367 |
+
};
|
368 |
+
|
369 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
370 |
+
} else if ( type == 'mailto' ) {
|
371 |
+
fieldsArray = {
|
372 |
+
hitType : 'event',
|
373 |
+
eventCategory : 'mailto',
|
374 |
+
eventAction : action || link,
|
375 |
+
eventLabel : label || valuesArray.title.replace('mailto:', ''),
|
376 |
+
};
|
377 |
+
|
378 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
379 |
+
} else if ( type == 'internal-as-outbound' ) {
|
380 |
+
fieldsArray = {
|
381 |
+
hitType : 'event',
|
382 |
+
eventCategory : internalAsOutboundCategory,
|
383 |
+
eventAction : action || link,
|
384 |
+
eventLabel : label || valuesArray.title,
|
385 |
+
};
|
386 |
+
|
387 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
388 |
+
} else if ( type == 'external' ) {
|
389 |
+
fieldsArray = {
|
390 |
+
hitType: 'event',
|
391 |
+
eventCategory:'outbound-link',
|
392 |
+
eventAction: action || link,
|
393 |
+
eventLabel: label || valuesArray.title,
|
394 |
+
};
|
395 |
+
|
396 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
397 |
+
} else if ( type == 'cross-hostname' ) {
|
398 |
+
fieldsArray = {
|
399 |
+
hitType: 'event',
|
400 |
+
eventCategory:'cross-hostname',
|
401 |
+
eventAction: action || link,
|
402 |
+
eventLabel: label || valuesArray.title,
|
403 |
+
};
|
404 |
+
|
405 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
406 |
+
} else {
|
407 |
+
if ( type && type != 'internal' ) {
|
408 |
+
fieldsArray = {
|
409 |
+
hitType: 'event',
|
410 |
+
eventCategory: type,
|
411 |
+
eventAction: action || link,
|
412 |
+
eventLabel: label || valuesArray.title,
|
413 |
+
};
|
414 |
+
|
415 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
416 |
+
} else {
|
417 |
+
valuesArray.exit = 'type';
|
418 |
+
__gaTrackerNotSend( valuesArray );
|
419 |
+
}
|
420 |
+
}
|
421 |
+
} else {
|
422 |
+
/* Prevent standard click, track then open */
|
423 |
+
if ( type != 'cross-hostname' && type != 'external' && type != 'internal-as-outbound' ) {
|
424 |
+
if (! event.defaultPrevented ) {
|
425 |
+
if ( event.preventDefault ) {
|
426 |
+
event.preventDefault();
|
427 |
+
} else {
|
428 |
+
event.returnValue = false;
|
429 |
+
}
|
430 |
+
}
|
431 |
+
}
|
432 |
+
|
433 |
+
if ( type == 'download' ) {
|
434 |
+
fieldsArray = {
|
435 |
+
hitType : 'event',
|
436 |
+
eventCategory : 'download',
|
437 |
+
eventAction : action || link,
|
438 |
+
eventLabel : label || valuesArray.title,
|
439 |
+
hitCallback : __gaTrackerHitBack,
|
440 |
+
};
|
441 |
+
|
442 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
443 |
+
} else if ( type == 'internal-as-outbound' ) {
|
444 |
+
window.onbeforeunload = function(e) {
|
445 |
+
if (! event.defaultPrevented ) {
|
446 |
+
if ( event.preventDefault ) {
|
447 |
+
event.preventDefault();
|
448 |
+
} else {
|
449 |
+
event.returnValue = false;
|
450 |
+
}
|
451 |
+
}
|
452 |
+
|
453 |
+
fieldsArray = {
|
454 |
+
hitType : 'event',
|
455 |
+
eventCategory : internalAsOutboundCategory,
|
456 |
+
eventAction : action || link,
|
457 |
+
eventLabel : label || valuesArray.title,
|
458 |
+
hitCallback : __gaTrackerHitBack,
|
459 |
+
};
|
460 |
+
|
461 |
+
if ( navigator.sendBeacon ) {
|
462 |
+
fieldsArray.transport = 'beacon';
|
463 |
+
}
|
464 |
+
|
465 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
466 |
+
setTimeout( __gaTrackerHitBack, 1000 );
|
467 |
+
};
|
468 |
+
} else if ( type == 'external' ) {
|
469 |
+
window.onbeforeunload = function(e) {
|
470 |
+
if (! event.defaultPrevented ) {
|
471 |
+
if ( event.preventDefault ) {
|
472 |
+
event.preventDefault();
|
473 |
+
} else {
|
474 |
+
event.returnValue = false;
|
475 |
+
}
|
476 |
+
}
|
477 |
+
|
478 |
+
fieldsArray = {
|
479 |
+
hitType : 'event',
|
480 |
+
eventCategory : 'outbound-link',
|
481 |
+
eventAction : action || link,
|
482 |
+
eventLabel : label || valuesArray.title,
|
483 |
+
hitCallback : __gaTrackerHitBack,
|
484 |
+
};
|
485 |
+
|
486 |
+
if ( navigator.sendBeacon ) {
|
487 |
+
fieldsArray.transport = 'beacon';
|
488 |
+
}
|
489 |
+
|
490 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
491 |
+
setTimeout( __gaTrackerHitBack, 1000 );
|
492 |
+
};
|
493 |
+
} else if ( type == 'cross-hostname' ) {
|
494 |
+
window.onbeforeunload = function(e) {
|
495 |
+
if (! event.defaultPrevented ) {
|
496 |
+
if ( event.preventDefault ) {
|
497 |
+
event.preventDefault();
|
498 |
+
} else {
|
499 |
+
event.returnValue = false;
|
500 |
+
}
|
501 |
+
}
|
502 |
+
|
503 |
+
fieldsArray = {
|
504 |
+
hitType : 'event',
|
505 |
+
eventCategory : 'cross-hostname',
|
506 |
+
eventAction : action || link,
|
507 |
+
eventLabel : label || valuesArray.title,
|
508 |
+
hitCallback : __gaTrackerHitBack,
|
509 |
+
};
|
510 |
+
|
511 |
+
if ( navigator.sendBeacon ) {
|
512 |
+
fieldsArray.transport = 'beacon';
|
513 |
+
}
|
514 |
+
|
515 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
516 |
+
setTimeout( __gaTrackerHitBack, 1000 );
|
517 |
+
};
|
518 |
+
} else {
|
519 |
+
if ( type && type !== 'internal' ) {
|
520 |
+
fieldsArray = {
|
521 |
+
hitType: 'event',
|
522 |
+
eventCategory: type,
|
523 |
+
eventAction: action || link,
|
524 |
+
eventLabel: label || valuesArray.title,
|
525 |
+
hitCallback : __gaTrackerHitBack,
|
526 |
+
};
|
527 |
+
|
528 |
+
__gaTrackerSend( valuesArray, fieldsArray );
|
529 |
+
} else {
|
530 |
+
valuesArray.exit = 'type';
|
531 |
+
__gaTrackerNotSend( valuesArray );
|
532 |
+
}
|
533 |
+
}
|
534 |
+
|
535 |
+
if ( type != 'external' && type != 'cross-hostname' && type != 'internal-as-outbound' ) {
|
536 |
+
/* Run hitCallback again if GA takes longer than 1 second */
|
537 |
+
setTimeout( __gaTrackerHitBack, 1000 );
|
538 |
+
} else {
|
539 |
+
if ( type == 'external' ) {
|
540 |
+
setTimeout( __gaTrackerNoRedirectExternal, 1100 );
|
541 |
+
} else if ( type == 'cross-hostname' ) {
|
542 |
+
setTimeout( __gaTrackerNoRedirectCrossHostname, 1100 );
|
543 |
+
} else {
|
544 |
+
setTimeout( __gaTrackerNoRedirectInboundAsExternal, 1100 );
|
545 |
+
}
|
546 |
+
}
|
547 |
+
}
|
548 |
+
} else {
|
549 |
+
valuesArray.exit = 'internal';
|
550 |
+
__gaTrackerNotSend( valuesArray );
|
551 |
+
}
|
552 |
+
} else {
|
553 |
+
valuesArray.exit = 'notlink';
|
554 |
+
__gaTrackerNotSend( valuesArray );
|
555 |
+
}
|
556 |
+
}
|
557 |
+
var prevHash = window.location.hash;
|
558 |
+
function __gaTrackerHashChangeEvent() {
|
559 |
+
/* Todo: Ready this section for JS unit testing */
|
560 |
+
if ( exactmetrics_frontend.hash_tracking === "true" && prevHash != window.location.hash ) {
|
561 |
+
prevHash = window.location.hash;
|
562 |
+
__gaTracker('set', 'page', location.pathname + location.search + location.hash );
|
563 |
+
__gaTracker('send', 'pageview' );
|
564 |
+
__gaTrackerLog( "Hash change to: " + location.pathname + location.search + location.hash );
|
565 |
+
} else {
|
566 |
+
__gaTrackerLog( "Hash change to (untracked): " + location.pathname + location.search + location.hash );
|
567 |
+
}
|
568 |
+
}
|
569 |
+
|
570 |
+
/* Attach the event to all clicks in the document after page has loaded */
|
571 |
+
var __gaTrackerWindow = window;
|
572 |
+
if ( __gaTrackerWindow.addEventListener ) {
|
573 |
+
__gaTrackerWindow.addEventListener(
|
574 |
+
"load",
|
575 |
+
function() {
|
576 |
+
document.body.addEventListener(
|
577 |
+
"click",
|
578 |
+
__gaTrackerClickEvent,
|
579 |
+
false
|
580 |
+
);
|
581 |
+
},
|
582 |
+
false
|
583 |
+
);
|
584 |
+
window.addEventListener("hashchange", __gaTrackerHashChangeEvent, false );
|
585 |
+
} else {
|
586 |
+
if ( __gaTrackerWindow.attachEvent ) {
|
587 |
+
__gaTrackerWindow.attachEvent(
|
588 |
+
"onload",
|
589 |
+
function() {
|
590 |
+
document.body.attachEvent( "onclick", __gaTrackerClickEvent);
|
591 |
+
}
|
592 |
+
);
|
593 |
+
window.attachEvent( "onhashchange", __gaTrackerHashChangeEvent);
|
594 |
+
}
|
595 |
+
}
|
596 |
+
|
597 |
+
if (typeof String.prototype.endsWith !== 'function') {
|
598 |
+
String.prototype.endsWith = function(suffix) {
|
599 |
+
return this.indexOf(suffix, this.length - suffix.length) !== -1;
|
600 |
+
};
|
601 |
+
}
|
602 |
+
if (typeof String.prototype.startsWith !== 'function') {
|
603 |
+
String.prototype.startsWith = function(prefix) {
|
604 |
+
return this.indexOf(prefix) === 0;
|
605 |
+
};
|
606 |
+
}
|
607 |
+
|
608 |
+
if ( typeof Array.prototype.lastIndexOf !== 'function' ) {
|
609 |
+
Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/) {
|
610 |
+
'use strict';
|
611 |
+
|
612 |
+
if (this === void 0 || this === null) {
|
613 |
+
throw new TypeError();
|
614 |
+
}
|
615 |
+
|
616 |
+
var n, k,
|
617 |
+
t = Object(this),
|
618 |
+
len = t.length >>> 0; /* jshint ignore:line */
|
619 |
+
if (len === 0) {
|
620 |
+
return -1;
|
621 |
+
}
|
622 |
+
|
623 |
+
n = len - 1;
|
624 |
+
if (arguments.length > 1) {
|
625 |
+
n = Number(arguments[1]);
|
626 |
+
if (n != n) {
|
627 |
+
n = 0;
|
628 |
+
}
|
629 |
+
else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) { /* jshint ignore:line */
|
630 |
+
n = (n > 0 || -1) * Math.floor(Math.abs(n));
|
631 |
+
}
|
632 |
+
}
|
633 |
+
|
634 |
+
for (k = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n); k >= 0; k--) {
|
635 |
+
if (k in t && t[k] === searchElement) {
|
636 |
+
return k;
|
637 |
+
}
|
638 |
+
}
|
639 |
+
return -1;
|
640 |
+
};
|
641 |
+
}
|
642 |
+
};
|
643 |
+
var ExactMetricsObject = new ExactMetrics();
|
assets/js/frontend.min.js
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;var ExactMetrics=function(){var t=[],a='';this.setLastClicked=function(e,n,i){e=typeof e!=='undefined'?e:[];n=typeof n!=='undefined'?n:[];i=typeof i!=='undefined'?i:!1;t.valuesArray=e;t.fieldsArray=n};this.getLastClicked=function(){return t};this.setInternalAsOutboundCategory=function(e){a=e};this.getInternalAsOutboundCategory=function(){return a};this.sendEvent=function(t){e([],t)};function s(){if(window.exactmetrics_debug_mode){return!0}
|
2 |
+
else{return!1}};function e(e,n){e=typeof e!=='undefined'?e:[];n=typeof n!=='undefined'?n:{};__gaTracker('send',n);t.valuesArray=e;t.fieldsArray=n;t.tracked=!0;i('Tracked: '+e.type);i(t)};function n(e){e=typeof e!=='undefined'?e:[];t.valuesArray=e;t.fieldsArray=[];t.tracked=!1;i('Not Tracked: '+e.exit);i(t)};function i(e){if(s()){console.dir(e)}};function o(e){return e.replace(/^\s+|\s+$/gm,'')};function f(){var n=0,e=document.domain,i=e.split('.'),t='_gd'+(new Date()).getTime();while(n<(i.length-1)&&document.cookie.indexOf(t+'='+t)==-1){e=i.slice(-1-(++n)).join('.');document.cookie=t+'='+t+';domain='+e+';'};document.cookie=t+'=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain='+e+';';return e};function u(e){e=e.toString();e=e.substring(0,(e.indexOf('#')==-1)?e.length:e.indexOf('#'));e=e.substring(0,(e.indexOf('?')==-1)?e.length:e.indexOf('?'));e=e.substring(e.lastIndexOf('/')+1,e.length);if(e.length>0&&e.indexOf('.')!==-1){e=e.substring(e.indexOf('.')+1);return e}
|
3 |
+
else{return''}};function h(){return typeof(__gaTracker)!=='undefined'&&__gaTracker&&__gaTracker.hasOwnProperty('loaded')&&__gaTracker.loaded==!0};function y(e){return e.which==1||e.which==2||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey};function c(){var e=[];if(typeof exactmetrics_frontend.download_extensions=='string'){e=exactmetrics_frontend.download_extensions.split(',')};return e};function d(){var e=[];if(typeof exactmetrics_frontend.inbound_paths=='string'){e=JSON.parse(exactmetrics_frontend.inbound_paths)};return e};function b(e){if(e.which==1){return'event.which=1'}
|
4 |
+
else if(e.which==2){return'event.which=2'}
|
5 |
+
else if(e.metaKey){return'metaKey'}
|
6 |
+
else if(e.ctrlKey){return'ctrlKey'}
|
7 |
+
else if(e.shiftKey){return'shiftKey'}
|
8 |
+
else if(e.altKey){return'altKey'}
|
9 |
+
else{return''}};function m(e){var h=c(),i=d(),t='unknown',g=e.href,p=u(e.href),v=f(),l=e.hostname,r=e.protocol,y=e.pathname;g=g.toString();var s,b,m=e.getAttribute('data-vars-ga-category');if(m){return m};if(g.match(/^javascript\:/i)){t='internal'}
|
10 |
+
else if(r&&r.length>0&&(o(r)=='tel'||o(r)=='tel:')){t='tel'}
|
11 |
+
else if(r&&r.length>0&&(o(r)=='mailto'||o(r)=='mailto:')){t='mailto'}
|
12 |
+
else if(l&&v&&l.length>0&&v.length>0&&!l.endsWith('.'+v)&&l!==v){t='external'}
|
13 |
+
else if(y&&JSON.stringify(i)!='{}'&&y.length>0){var w=i.length;for(var n=0;n<w;n++){if(i[n].path&&i[n].label&&i[n].path.length>0&&i[n].label.length>0&&y.startsWith(i[n].path)){t='internal-as-outbound';a='outbound-link-'+i[n].label;break}}}
|
14 |
+
else if(l&&window.exactmetrics_experimental_mode&&l.length>0&&document.domain.length>0&&l!==document.domain){t='cross-hostname'};if(p&&(t==='unknown'||'external'===t)&&h.length>0&&p.length>0){for(s=0,b=h.length;s<b;++s){if(h[s].length>0&&(g.endsWith(h[s])||h[s]==p)){t='download';break}}};if(t==='unknown'){t='internal'};return t};function w(e,t){var n=(e.target&&!e.target.match(/^_(self|parent|top)$/i))?e.target:!1;if(t.ctrlKey||t.shiftKey||t.metaKey||t.which==2){n='_blank'};return n};function g(e){if(e.getAttribute('data-vars-ga-label')&&e.getAttribute('data-vars-ga-label').replace(/\n/ig,'')){return e.getAttribute('data-vars-ga-label').replace(/\n/ig,'')}
|
15 |
+
else if(e.title&&e.title.replace(/\n/ig,'')){return e.title.replace(/\n/ig,'')}
|
16 |
+
else if(e.innerText&&e.innerText.replace(/\n/ig,'')){return e.innerText.replace(/\n/ig,'')}
|
17 |
+
else if(e.getAttribute('aria-label')&&e.getAttribute('aria-label').replace(/\n/ig,'')){return e.getAttribute('aria-label').replace(/\n/ig,'')}
|
18 |
+
else if(e.alt&&e.alt.replace(/\n/ig,'')){return e.alt.replace(/\n/ig,'')}
|
19 |
+
else if(e.textContent&&e.textContent.replace(/\n/ig,'')){return e.textContent.replace(/\n/ig,'')}
|
20 |
+
else{return undefined}};function x(e){var i=e.children,a=0,r,n;for(var t=0;t<i.length;t++){r=i[t];n=g(r);if(n){return n};if(a==99){return undefined};a++};return undefined};function v(i){var o=i.srcElement||i.target,t=[],l;t.el=o;t.ga_loaded=h();t.click_type=b(i);if(!h()||!y(i)){t.exit='loaded';n(t);return}
|
21 |
+
while(o&&(typeof o.tagName=='undefined'||o.tagName.toLowerCase()!='a'||!o.href)){o=o.parentNode};if(o&&o.href&&!o.hasAttribute('xlink:href')){var v=o.href,E=u(o.href),D=c(),I=d(),M=exactmetrics_frontend.home_url,S=f(),r=m(o),C=w(o,i),p=o.getAttribute('data-vars-ga-action'),k=o.getAttribute('data-vars-ga-label');t.el=o;t.el_href=o.href;t.el_protocol=o.protocol;t.el_hostname=o.hostname;t.el_port=o.port;t.el_pathname=o.pathname;t.el_search=o.search;t.el_hash=o.hash;t.el_host=o.host;t.debug_mode=s();t.download_extensions=D;t.inbound_paths=I;t.home_url=M;t.link=v;t.extension=E;t.type=r;t.target=C;t.title=g(o);if(!t.label&&!t.title){t.title=x(o)};if(r!=='internal'&&r!=='javascript'){var A=!1,T=function(){if(A){return};A=!0;window.location.href=v},L=function(){t.exit='external';n(t)},O=function(){t.exit='internal-as-outbound';n(t)},K=function(){t.exit='cross-hostname';n(t)};if(C||r=='mailto'||r=='tel'){if(r=='download'){l={hitType:'event',eventCategory:'download',eventAction:p||v,eventLabel:k||t.title,};e(t,l)}
|
22 |
+
else if(r=='tel'){l={hitType:'event',eventCategory:'tel',eventAction:p||v,eventLabel:k||t.title.replace('tel:',''),};e(t,l)}
|
23 |
+
else if(r=='mailto'){l={hitType:'event',eventCategory:'mailto',eventAction:p||v,eventLabel:k||t.title.replace('mailto:',''),};e(t,l)}
|
24 |
+
else if(r=='internal-as-outbound'){l={hitType:'event',eventCategory:a,eventAction:p||v,eventLabel:k||t.title,};e(t,l)}
|
25 |
+
else if(r=='external'){l={hitType:'event',eventCategory:'outbound-link',eventAction:p||v,eventLabel:k||t.title,};e(t,l)}
|
26 |
+
else if(r=='cross-hostname'){l={hitType:'event',eventCategory:'cross-hostname',eventAction:p||v,eventLabel:k||t.title,};e(t,l)}
|
27 |
+
else{if(r&&r!='internal'){l={hitType:'event',eventCategory:r,eventAction:p||v,eventLabel:k||t.title,};e(t,l)}
|
28 |
+
else{t.exit='type';n(t)}}}
|
29 |
+
else{if(r!='cross-hostname'&&r!='external'&&r!='internal-as-outbound'){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()}
|
30 |
+
else{i.returnValue=!1}}};if(r=='download'){l={hitType:'event',eventCategory:'download',eventAction:p||v,eventLabel:k||t.title,hitCallback:T,};e(t,l)}
|
31 |
+
else if(r=='internal-as-outbound'){window.onbeforeunload=function(n){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()}
|
32 |
+
else{i.returnValue=!1}};l={hitType:'event',eventCategory:a,eventAction:p||v,eventLabel:k||t.title,hitCallback:T,};if(navigator.sendBeacon){l.transport='beacon'};e(t,l);setTimeout(T,1000)}}
|
33 |
+
else if(r=='external'){window.onbeforeunload=function(n){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()}
|
34 |
+
else{i.returnValue=!1}};l={hitType:'event',eventCategory:'outbound-link',eventAction:p||v,eventLabel:k||t.title,hitCallback:T,};if(navigator.sendBeacon){l.transport='beacon'};e(t,l);setTimeout(T,1000)}}
|
35 |
+
else if(r=='cross-hostname'){window.onbeforeunload=function(n){if(!i.defaultPrevented){if(i.preventDefault){i.preventDefault()}
|
36 |
+
else{i.returnValue=!1}};l={hitType:'event',eventCategory:'cross-hostname',eventAction:p||v,eventLabel:k||t.title,hitCallback:T,};if(navigator.sendBeacon){l.transport='beacon'};e(t,l);setTimeout(T,1000)}}
|
37 |
+
else{if(r&&r!=='internal'){l={hitType:'event',eventCategory:r,eventAction:p||v,eventLabel:k||t.title,hitCallback:T,};e(t,l)}
|
38 |
+
else{t.exit='type';n(t)}};if(r!='external'&&r!='cross-hostname'&&r!='internal-as-outbound'){setTimeout(T,1000)}
|
39 |
+
else{if(r=='external'){setTimeout(L,1100)}
|
40 |
+
else if(r=='cross-hostname'){setTimeout(K,1100)}
|
41 |
+
else{setTimeout(O,1100)}}}}
|
42 |
+
else{t.exit='internal';n(t)}}
|
43 |
+
else{t.exit='notlink';n(t)}};var l=window.location.hash;function p(){if(exactmetrics_frontend.hash_tracking==='true'&&l!=window.location.hash){l=window.location.hash;__gaTracker('set','page',location.pathname+location.search+location.hash);__gaTracker('send','pageview');i('Hash change to: '+location.pathname+location.search+location.hash)}
|
44 |
+
else{i('Hash change to (untracked): '+location.pathname+location.search+location.hash)}};var r=window;if(r.addEventListener){r.addEventListener('load',function(){document.body.addEventListener('click',v,!1)},!1);window.addEventListener('hashchange',p,!1)}
|
45 |
+
else{if(r.attachEvent){r.attachEvent('onload',function(){document.body.attachEvent('onclick',v)});window.attachEvent('onhashchange',p)}};if(typeof String.prototype.endsWith!=='function'){String.prototype.endsWith=function(e){return this.indexOf(e,this.length-e.length)!==-1}};if(typeof String.prototype.startsWith!=='function'){String.prototype.startsWith=function(e){return this.indexOf(e)===0}};if(typeof Array.prototype.lastIndexOf!=='function'){Array.prototype.lastIndexOf=function(e){'use strict';if(this===void 0||this===null){throw new TypeError()};var t,n,a=Object(this),i=a.length>>>0;if(i===0){return-1};t=i-1;if(arguments.length>1){t=Number(arguments[1]);if(t!=t){t=0}
|
46 |
+
else if(t!=0&&t!=(1/0)&&t!=-(1/0)){t=(t>0||-1)*Math.floor(Math.abs(t))}};for(n=t>=0?Math.min(t,i-1):i-Math.abs(t);n>=0;n--){if(n in a&&a[n]===e){return n}};return-1}}},ExactMetricsObject=new ExactMetrics();
|
assets/js/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
assets/lib/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
assets/lib/pandora/class-am-deactivation-survey.php
ADDED
@@ -0,0 +1,358 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! class_exists( 'AM_Deactivation_Survey' ) ) {
|
3 |
+
/**
|
4 |
+
* Awesome Motive Deactivation Survey.
|
5 |
+
*
|
6 |
+
* This prompts the user for more details when they deactivate the plugin.
|
7 |
+
*
|
8 |
+
* @version 1.2.1
|
9 |
+
* @package AwesomeMotive
|
10 |
+
* @author Jared Atchison and Chris Christoff
|
11 |
+
* @license GPL-2.0+
|
12 |
+
* @copyright Copyright (c) 2018
|
13 |
+
*/
|
14 |
+
class AM_Deactivation_Survey {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* The API URL we are calling.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
public $api_url = 'https://api.awesomemotive.com/v1/deactivation-survey/';
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Name for this plugin.
|
26 |
+
*
|
27 |
+
* @since 1.0.0
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
public $name;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Unique slug for this plugin.
|
34 |
+
*
|
35 |
+
* @since 1.0.0
|
36 |
+
* @var string
|
37 |
+
*/
|
38 |
+
public $plugin;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Primary class constructor.
|
42 |
+
*
|
43 |
+
* @since 1.0.0
|
44 |
+
* @param string $name Plugin name.
|
45 |
+
* @param string $plugin Plugin slug.
|
46 |
+
*/
|
47 |
+
public function __construct( $name = '', $plugin = '' ) {
|
48 |
+
|
49 |
+
$this->name = $name;
|
50 |
+
$this->plugin = $plugin;
|
51 |
+
|
52 |
+
// Don't run deactivation survey on dev sites.
|
53 |
+
if ( $this->is_dev_url() ) {
|
54 |
+
return;
|
55 |
+
}
|
56 |
+
|
57 |
+
add_action( 'admin_print_scripts', array( $this, 'js' ), 20 );
|
58 |
+
add_action( 'admin_print_scripts', array( $this, 'css' ) );
|
59 |
+
add_action( 'admin_footer', array( $this, 'modal' ) );
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Checks if current site is a development one.
|
64 |
+
*
|
65 |
+
* @since 1.2.0
|
66 |
+
* @return bool
|
67 |
+
*/
|
68 |
+
public function is_dev_url() {
|
69 |
+
// If it is an AM dev site, return false, so we can see them on our dev sites.
|
70 |
+
if ( defined ('AWESOMEMOTIVE_DEV_MODE' ) && AWESOMEMOTIVE_DEV_MODE ) {
|
71 |
+
return false;
|
72 |
+
}
|
73 |
+
|
74 |
+
$url = network_site_url( '/' );
|
75 |
+
$is_local_url = false;
|
76 |
+
|
77 |
+
// Trim it up
|
78 |
+
$url = strtolower( trim( $url ) );
|
79 |
+
|
80 |
+
// Need to get the host...so let's add the scheme so we can use parse_url
|
81 |
+
if ( false === strpos( $url, 'http://' ) && false === strpos( $url, 'https://' ) ) {
|
82 |
+
$url = 'http://' . $url;
|
83 |
+
}
|
84 |
+
$url_parts = parse_url( $url );
|
85 |
+
$host = ! empty( $url_parts['host'] ) ? $url_parts['host'] : false;
|
86 |
+
if ( ! empty( $url ) && ! empty( $host ) ) {
|
87 |
+
if ( false !== ip2long( $host ) ) {
|
88 |
+
if ( ! filter_var( $host, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) ) {
|
89 |
+
$is_local_url = true;
|
90 |
+
}
|
91 |
+
} else if ( 'localhost' === $host ) {
|
92 |
+
$is_local_url = true;
|
93 |
+
}
|
94 |
+
|
95 |
+
$tlds_to_check = array( '.dev', '.local', ':8888' );
|
96 |
+
foreach ( $tlds_to_check as $tld ) {
|
97 |
+
if ( false !== strpos( $host, $tld ) ) {
|
98 |
+
$is_local_url = true;
|
99 |
+
continue;
|
100 |
+
}
|
101 |
+
|
102 |
+
}
|
103 |
+
if ( substr_count( $host, '.' ) > 1 ) {
|
104 |
+
$subdomains_to_check = array( 'dev.', '*.staging.', 'beta.', 'test.' );
|
105 |
+
foreach ( $subdomains_to_check as $subdomain ) {
|
106 |
+
$subdomain = str_replace( '.', '(.)', $subdomain );
|
107 |
+
$subdomain = str_replace( array( '*', '(.)' ), '(.*)', $subdomain );
|
108 |
+
if ( preg_match( '/^(' . $subdomain . ')/', $host ) ) {
|
109 |
+
$is_local_url = true;
|
110 |
+
continue;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
}
|
115 |
+
return $is_local_url;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Checks if current admin screen is the plugins page.
|
120 |
+
*
|
121 |
+
* @since 1.0.0
|
122 |
+
* @return bool
|
123 |
+
*/
|
124 |
+
public function is_plugin_page() {
|
125 |
+
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
126 |
+
if ( empty( $screen ) ) {
|
127 |
+
return false;
|
128 |
+
}
|
129 |
+
return ( ! empty( $screen->id ) && in_array( $screen->id, array( 'plugins', 'plugins-network' ), true ) );
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Survey javascript.
|
134 |
+
*
|
135 |
+
* @since 1.0.0
|
136 |
+
*/
|
137 |
+
public function js() {
|
138 |
+
|
139 |
+
if ( ! $this->is_plugin_page() ) {
|
140 |
+
return;
|
141 |
+
}
|
142 |
+
?>
|
143 |
+
<script type="text/javascript">
|
144 |
+
jQuery(function($){
|
145 |
+
var $deactivateLink = $('#the-list').find('[data-slug="<?php echo $this->plugin; ?>"] span.deactivate a'),
|
146 |
+
$overlay = $('#am-deactivate-survey-<?php echo $this->plugin; ?>'),
|
147 |
+
$form = $overlay.find('form'),
|
148 |
+
formOpen = false;
|
149 |
+
// Plugin listing table deactivate link.
|
150 |
+
$deactivateLink.on('click', function(event) {
|
151 |
+
event.preventDefault();
|
152 |
+
$overlay.css('display', 'table');
|
153 |
+
formOpen = true;
|
154 |
+
$form.find('.am-deactivate-survey-option:first-of-type input[type=radio]').focus();
|
155 |
+
});
|
156 |
+
// Survey radio option selected.
|
157 |
+
$form.on('change', 'input[type=radio]', function(event) {
|
158 |
+
event.preventDefault();
|
159 |
+
$form.find('input[type=text], .error').hide();
|
160 |
+
$form.find('.am-deactivate-survey-option').removeClass('selected');
|
161 |
+
$(this).closest('.am-deactivate-survey-option').addClass('selected').find('input[type=text]').show();
|
162 |
+
});
|
163 |
+
// Survey Skip & Deactivate.
|
164 |
+
$form.on('click', '.am-deactivate-survey-deactivate', function(event) {
|
165 |
+
event.preventDefault();
|
166 |
+
location.href = $deactivateLink.attr('href');
|
167 |
+
});
|
168 |
+
// Survey submit.
|
169 |
+
$form.submit(function(event) {
|
170 |
+
event.preventDefault();
|
171 |
+
if (! $form.find('input[type=radio]:checked').val()) {
|
172 |
+
$form.find('.am-deactivate-survey-footer').prepend('<span class="error"><?php echo esc_js( __( 'Please select an option', 'google-analytics-dashboard-for-wp' ) ); ?></span>');
|
173 |
+
return;
|
174 |
+
}
|
175 |
+
var data = {
|
176 |
+
code: $form.find('.selected input[type=radio]').val(),
|
177 |
+
reason: $form.find('.selected .am-deactivate-survey-option-reason').text(),
|
178 |
+
details: $form.find('.selected input[type=text]').val(),
|
179 |
+
site: '<?php echo esc_url( home_url() ); ?>',
|
180 |
+
plugin: '<?php echo sanitize_key( $this->name ); ?>'
|
181 |
+
}
|
182 |
+
var submitSurvey = $.post('<?php echo $this->api_url; ?>', data);
|
183 |
+
submitSurvey.always(function() {
|
184 |
+
location.href = $deactivateLink.attr('href');
|
185 |
+
});
|
186 |
+
});
|
187 |
+
// Exit key closes survey when open.
|
188 |
+
$(document).keyup(function(event) {
|
189 |
+
if (27 === event.keyCode && formOpen) {
|
190 |
+
$overlay.hide();
|
191 |
+
formOpen = false;
|
192 |
+
$deactivateLink.focus();
|
193 |
+
}
|
194 |
+
});
|
195 |
+
});
|
196 |
+
</script>
|
197 |
+
<?php
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Survey CSS.
|
202 |
+
*
|
203 |
+
* @since 1.0.0
|
204 |
+
*/
|
205 |
+
public function css() {
|
206 |
+
|
207 |
+
if ( ! $this->is_plugin_page() ) {
|
208 |
+
return;
|
209 |
+
}
|
210 |
+
?>
|
211 |
+
<style type="text/css">
|
212 |
+
.am-deactivate-survey-modal {
|
213 |
+
display: none;
|
214 |
+
table-layout: fixed;
|
215 |
+
position: fixed;
|
216 |
+
z-index: 9999;
|
217 |
+
width: 100%;
|
218 |
+
height: 100%;
|
219 |
+
text-align: center;
|
220 |
+
font-size: 14px;
|
221 |
+
top: 0;
|
222 |
+
left: 0;
|
223 |
+
background: rgba(0,0,0,0.8);
|
224 |
+
}
|
225 |
+
.am-deactivate-survey-wrap {
|
226 |
+
display: table-cell;
|
227 |
+
vertical-align: middle;
|
228 |
+
}
|
229 |
+
.am-deactivate-survey {
|
230 |
+
background-color: #fff;
|
231 |
+
max-width: 550px;
|
232 |
+
margin: 0 auto;
|
233 |
+
padding: 30px;
|
234 |
+
text-align: left;
|
235 |
+
}
|
236 |
+
.am-deactivate-survey .error {
|
237 |
+
display: block;
|
238 |
+
color: red;
|
239 |
+
margin: 0 0 10px 0;
|
240 |
+
}
|
241 |
+
.am-deactivate-survey-title {
|
242 |
+
display: block;
|
243 |
+
font-size: 18px;
|
244 |
+
font-weight: 700;
|
245 |
+
text-transform: uppercase;
|
246 |
+
border-bottom: 1px solid #ddd;
|
247 |
+
padding: 0 0 18px 0;
|
248 |
+
margin: 0 0 18px 0;
|
249 |
+
}
|
250 |
+
.am-deactivate-survey-title span {
|
251 |
+
color: #999;
|
252 |
+
margin-right: 10px;
|
253 |
+
}
|
254 |
+
.am-deactivate-survey-desc {
|
255 |
+
display: block;
|
256 |
+
font-weight: 600;
|
257 |
+
margin: 0 0 18px 0;
|
258 |
+
}
|
259 |
+
.am-deactivate-survey-option {
|
260 |
+
margin: 0 0 10px 0;
|
261 |
+
}
|
262 |
+
.am-deactivate-survey-option-input {
|
263 |
+
margin-right: 10px !important;
|
264 |
+
}
|
265 |
+
.am-deactivate-survey-option-details {
|
266 |
+
display: none;
|
267 |
+
width: 90%;
|
268 |
+
margin: 10px 0 0 30px;
|
269 |
+
}
|
270 |
+
.am-deactivate-survey-footer {
|
271 |
+
margin-top: 18px;
|
272 |
+
}
|
273 |
+
.am-deactivate-survey-deactivate {
|
274 |
+
float: right;
|
275 |
+
font-size: 13px;
|
276 |
+
color: #ccc;
|
277 |
+
text-decoration: none;
|
278 |
+
padding-top: 7px;
|
279 |
+
}
|
280 |
+
</style>
|
281 |
+
<?php
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Survey modal.
|
286 |
+
*
|
287 |
+
* @since 1.0.0
|
288 |
+
*/
|
289 |
+
public function modal() {
|
290 |
+
|
291 |
+
if ( ! $this->is_plugin_page() ) {
|
292 |
+
return;
|
293 |
+
}
|
294 |
+
|
295 |
+
$options = array(
|
296 |
+
1 => array(
|
297 |
+
'title' => esc_html__( 'I no longer need the plugin', 'google-analytics-dashboard-for-wp' ),
|
298 |
+
),
|
299 |
+
2 => array(
|
300 |
+
'title' => esc_html__( 'I\'m switching to a different plugin', 'google-analytics-dashboard-for-wp' ),
|
301 |
+
'details' => esc_html__( 'Please share which plugin', 'google-analytics-dashboard-for-wp' ),
|
302 |
+
),
|
303 |
+
3 => array(
|
304 |
+
'title' => esc_html__( 'I couldn\'t get the plugin to work', 'google-analytics-dashboard-for-wp' ),
|
305 |
+
),
|
306 |
+
4 => array(
|
307 |
+
'title' => esc_html__( 'It\'s a temporary deactivation', 'google-analytics-dashboard-for-wp' ),
|
308 |
+
),
|
309 |
+
5 => array(
|
310 |
+
'title' => esc_html__( 'Other', 'google-analytics-dashboard-for-wp' ),
|
311 |
+
'details' => esc_html__( 'Please share the reason', 'google-analytics-dashboard-for-wp' ),
|
312 |
+
),
|
313 |
+
);
|
314 |
+
?>
|
315 |
+
<div class="am-deactivate-survey-modal" id="am-deactivate-survey-<?php echo $this->plugin; ?>">
|
316 |
+
<div class="am-deactivate-survey-wrap">
|
317 |
+
<form class="am-deactivate-survey" method="post">
|
318 |
+
<span class="am-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . esc_html__( 'Quick Feedback', 'google-analytics-dashboard-for-wp' ); ?></span>
|
319 |
+
<span class="am-deactivate-survey-desc">
|
320 |
+
<?php
|
321 |
+
// Translators: Placeholder for the plugin name.
|
322 |
+
echo sprintf( esc_html__('If you have a moment, please share why you are deactivating %s:', 'google-analytics-dashboard-for-wp' ), $this->name );
|
323 |
+
?>
|
324 |
+
</span>
|
325 |
+
<div class="am-deactivate-survey-options">
|
326 |
+
<?php foreach ( $options as $id => $option ) : ?>
|
327 |
+
<div class="am-deactivate-survey-option">
|
328 |
+
<label for="am-deactivate-survey-option-<?php echo $this->plugin; ?>-<?php echo $id; ?>" class="am-deactivate-survey-option-label">
|
329 |
+
<input id="am-deactivate-survey-option-<?php echo $this->plugin; ?>-<?php echo $id; ?>" class="am-deactivate-survey-option-input" type="radio" name="code" value="<?php echo $id; ?>" />
|
330 |
+
<span class="am-deactivate-survey-option-reason"><?php echo $option['title']; ?></span>
|
331 |
+
</label>
|
332 |
+
<?php if ( ! empty( $option['details'] ) ) : ?>
|
333 |
+
<input class="am-deactivate-survey-option-details" type="text" placeholder="<?php echo $option['details']; ?>" />
|
334 |
+
<?php endif; ?>
|
335 |
+
</div>
|
336 |
+
<?php endforeach; ?>
|
337 |
+
</div>
|
338 |
+
<div class="am-deactivate-survey-footer">
|
339 |
+
<button type="submit" class="am-deactivate-survey-submit button button-primary button-large">
|
340 |
+
<?php
|
341 |
+
// Translators: Adds an ampersand.
|
342 |
+
echo sprintf( esc_html__('Submit %s Deactivate', 'google-analytics-dashboard-for-wp' ), '&' );
|
343 |
+
?>
|
344 |
+
</button>
|
345 |
+
<a href="#" class="am-deactivate-survey-deactivate">
|
346 |
+
<?php
|
347 |
+
// Translators: Adds an ampersand.
|
348 |
+
echo sprintf( esc_html__('Skip %s Deactivate', 'google-analytics-dashboard-for-wp' ), '&' );
|
349 |
+
?>
|
350 |
+
</a>
|
351 |
+
</div>
|
352 |
+
</form>
|
353 |
+
</div>
|
354 |
+
</div>
|
355 |
+
<?php
|
356 |
+
}
|
357 |
+
}
|
358 |
+
} // End if().
|
common/ajax-actions.php
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Common_Ajax' ) ) {
|
15 |
-
|
16 |
-
final class GADWP_Common_Ajax {
|
17 |
-
|
18 |
-
private $gadwp;
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
$this->gadwp = GADWP();
|
22 |
-
|
23 |
-
if ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_back'] ) || GADWP_Tools::check_roles( $this->gadwp->config->options['access_front'] ) ) {
|
24 |
-
add_action( 'wp_ajax_gadwp_set_error', array( $this, 'ajax_set_error' ) );
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Ajax handler for storing JavaScript Errors
|
30 |
-
*
|
31 |
-
* @return json|int
|
32 |
-
*/
|
33 |
-
public function ajax_set_error() {
|
34 |
-
if ( ! isset( $_POST['gadwp_security_set_error'] ) || ! ( wp_verify_nonce( $_POST['gadwp_security_set_error'], 'gadwp_backend_item_reports' ) || wp_verify_nonce( $_POST['gadwp_security_set_error'], 'gadwp_frontend_item_reports' ) ) ) {
|
35 |
-
wp_die( - 40 );
|
36 |
-
}
|
37 |
-
$timeout = 24 * 60 * 60;
|
38 |
-
GADWP_Tools::set_error( $_POST['response'], $timeout );
|
39 |
-
wp_die();
|
40 |
-
}
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
common/js/reports5.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
"use strict";if(gadwpItemData.mapsApiKey){google.charts.load("current",{mapsApiKey:gadwpItemData.mapsApiKey,packages:["corechart","table","orgchart","geochart"]})}else{google.charts.load("current",{packages:["corechart","table","orgchart","geochart"]})}google.charts.setOnLoadCallback(GADWPReportLoad);gadwpItemData.getID=function(a){if(gadwpItemData.scope=="admin-item"){if(typeof a.id=="undefined"){return 0}if(a.id.split("-")[1]=="undefined"){return 0}else{return a.id.split("-")[1]}}else{if(typeof a.id=="undefined"){return 1}if(a.id.split("-")[4]=="undefined"){return 1}else{return a.id.split("-")[4]}}};gadwpItemData.getSelector=function(a){if(a=="admin-item"){return'a[id^="gadwp-"]'}else{return'li[id^="wp-admin-bar-gadwp"] a'}};gadwpItemData.responsiveDialog=function(){var b,a,c;c=jQuery(".ui-dialog:visible");c.each(function(){b=jQuery(this).find(".ui-dialog-content").data("ui-dialog");if(b.options.fluid){a=jQuery(window).width();if(a<(parseInt(b.options.maxWidth)+50)){jQuery(this).css("max-width","90%")}else{jQuery(this).css("max-width",b.options.maxWidth+"px")}b.option("position",b.options.position)}})};jQuery.fn.extend({gadwpItemReport:function(g){var a,d,h,e,f,i,c,b="-"+g;d={setCookie:function(k,m){var j,l=new Date();if(gadwpItemData.scope=="admin-widgets"){k="gadwp_wg_"+k}else{k="gadwp_ir_"+k}l.setTime(l.getTime()+(24*60*60*1000*365));j="expires="+l.toUTCString();document.cookie=k+"="+m+"; "+j+"; path=/"},getCookie:function(j){var l,m,n,k=0;if(gadwpItemData.scope=="admin-widgets"){j="gadwp_wg_"+j+"="}else{j="gadwp_ir_"+j+"="}m=document.cookie.split(";");for(k=0;k<m.length;k++){l=m[k];while(l.charAt(0)==" "){l=l.substring(1)}if(l.indexOf(j)==0){return l.substring(j.length,l.length)}}return false},escape:function(j){div=document.createElement("div");div.appendChild(document.createTextNode(j));return div.innerHTML}};h={addOptions:function(o,n){var j,l,m,k=[];if(!d.getCookie("default_metric")||!d.getCookie("default_dimension")||!d.getCookie("default_swmetric")){j="sessions";l="30daysAgo";if(gadwpItemData.scope=="front-item"||gadwpItemData.scope=="admin-item"){c="pageviews"}else{c="sessions"}d.setCookie("default_metric",j);d.setCookie("default_dimension",l);d.setCookie("default_swmetric",c)}else{j=d.getCookie("default_metric");l=d.getCookie("default_dimension");m=d.getCookie("default_view");c=d.getCookie("default_swmetric")}if(n==false){if(gadwpItemData.scope=="front-item"||gadwpItemData.scope=="admin-item"){k=""}else{k='<span id="gadwp-swmetric-sessions" title="'+gadwpItemData.i18n[5]+'" class="dashicons dashicons-clock" style="font-size:22px;padding:4px;"></span>'}k+='<span id="gadwp-swmetric-users" title="'+gadwpItemData.i18n[6]+'" class="dashicons dashicons-admin-users" style="font-size:22px;padding:4px;"></span>';k+='<span id="gadwp-swmetric-pageviews" title="'+gadwpItemData.i18n[7]+'" class="dashicons dashicons-admin-page" style="font-size:22px;padding:4px;"></span>';jQuery(o).html(k);jQuery("#gadwp-swmetric-"+c).css("color","#008ec2")}else{jQuery.each(n,function(p,q){if(p==j||p==l||p==m){k.push('<option value="'+p+'" selected="selected">'+q+"</option>")}else{k.push('<option value="'+p+'">'+q+"</option>")}});jQuery(o).html(k.join(""))}},init:function(){var j;if(!jQuery("#gadwp-window"+b).length){return}if(jQuery("#gadwp-window"+b).html().length){return}j='<div id="gadwp-container'+b+'">';if(gadwpItemData.viewList!=false){j+='<select id="gadwp-sel-view'+b+'"></select>'}j+='<select id="gadwp-sel-period'+b+'"></select> ';j+='<select id="gadwp-sel-report'+b+'"></select>';j+='<div id="gadwp-sel-metric'+b+'" style="float:right;display:none;">';j+="</div>";j+='<div id="gadwp-progressbar'+b+'"></div>';j+='<div id="gadwp-status'+b+'"></div>';j+='<div id="gadwp-reports'+b+'"></div>';j+='<div style="text-align:right;width:100%;font-size:0.8em;clear:both;margin-right:5px;margin-top:10px;">';j+=gadwpItemData.i18n[14];j+=' <a href="https://exactmetrics.com/?utm_source=gadwp_report&utm_medium=link&utm_content=back_report&utm_campaign=gadwp" rel="nofollow" style="text-decoration:none;font-size:1em;">GADWP</a> ';j+="</div>";j+="</div>",jQuery("#gadwp-window"+b).append(j);h.addOptions("#gadwp-sel-view"+b,gadwpItemData.viewList);h.addOptions("#gadwp-sel-period"+b,gadwpItemData.dateList);h.addOptions("#gadwp-sel-report"+b,gadwpItemData.reportList);h.addOptions("#gadwp-sel-metric"+b,false)}};e={oldViewPort:0,orgChartTableChartData:"",tableChartData:"",orgChartPieChartsData:"",geoChartTableChartData:"",areaChartBottomStatsData:"",realtime:"",rtRuns:null,i18n:null,getTitle:function(j){if(j=="admin-item"){return jQuery("#gadwp"+b).attr("title")}else{return document.getElementsByTagName("title")[0].innerHTML}},alertMessage:function(j){jQuery("#gadwp-status"+b).css({"margin-top":"3px","padding-left":"5px",height:"auto",color:"#000","border-left":"5px solid red"});jQuery("#gadwp-status"+b).html(j)},areaChartBottomStats:function(j){e.areaChartBottomStatsData=j;if(jQuery.isArray(j)){if(!jQuery.isNumeric(j[0])){if(jQuery.isArray(j[0])){jQuery("#gadwp-reports"+b).show();if(a.query=="visitBounceRate,bottomstats"){e.drawAreaChart(j[0],true)}else{e.drawAreaChart(j[0],false)}}else{e.throwDebug(j[0])}}else{jQuery("#gadwp-reports"+b).show();e.throwError("#gadwp-areachart"+b,j[0],"125px")}if(!jQuery.isNumeric(j[1])){if(jQuery.isArray(j[1])){jQuery("#gadwp-reports"+b).show();e.drawBottomStats(j[1])}else{e.throwDebug(j[1])}}else{jQuery("#gadwp-reports"+b).show();e.throwError("#gadwp-bottomstats"+b,j[1],"40px")}}else{e.throwDebug(j)}NProgress.done()},orgChartPieCharts:function(j){var k=0;e.orgChartPieChartsData=j;if(jQuery.isArray(j)){if(!jQuery.isNumeric(j[0])){if(jQuery.isArray(j[0])){jQuery("#gadwp-reports"+b).show();e.drawOrgChart(j[0])}else{e.throwDebug(j[0])}}else{jQuery("#gadwp-reports"+b).show();e.throwError("#gadwp-orgchart"+b,j[0],"125px")}for(k=1;k<j.length;k++){if(!jQuery.isNumeric(j[k])){if(jQuery.isArray(j[k])){jQuery("#gadwp-reports"+b).show();e.drawPieChart("piechart-"+k,j[k],e.i18n[k])}else{e.throwDebug(j[k])}}else{jQuery("#gadwp-reports"+b).show();e.throwError("#gadwp-piechart-"+k+b,j[k],"80px")}}}else{e.throwDebug(j)}NProgress.done()},geoChartTableChart:function(j){e.geoChartTableChartData=j;if(jQuery.isArray(j)){if(!jQuery.isNumeric(j[0])){if(jQuery.isArray(j[0])){jQuery("#gadwp-reports"+b).show();e.drawGeoChart(j[0]);e.drawTableChart(j[0])}else{e.throwDebug(j[0])}}else{jQuery("#gadwp-reports"+b).show();e.throwError("#gadwp-geochart"+b,j[0],"125px");e.throwError("#gadwp-tablechart"+b,j[0],"125px")}}else{e.throwDebug(j)}NProgress.done()},orgChartTableChart:function(j){e.orgChartTableChartData=j;if(jQuery.isArray(j)){if(!jQuery.isNumeric(j[0])){if(jQuery.isArray(j[0])){jQuery("#gadwp-reports"+b).show();e.drawOrgChart(j[0])}else{e.throwDebug(j[0])}}else{jQuery("#gadwp-reports"+b).show();e.throwError("#gadwp-orgchart"+b,j[0],"125px")}if(!jQuery.isNumeric(j[1])){if(jQuery.isArray(j[1])){e.drawTableChart(j[1])}else{e.throwDebug(j[1])}}else{e.throwError("#gadwp-tablechart"+b,j[1],"125px")}}else{e.throwDebug(j)}NProgress.done()},tableChart:function(j){e.tableChartData=j;if(jQuery.isArray(j)){if(!jQuery.isNumeric(j[0])){if(jQuery.isArray(j[0])){jQuery("#gadwp-reports"+b).show();e.drawTableChart(j[0])}else{e.throwDebug(j[0])}}else{jQuery("#gadwp-reports"+b).show();e.throwError("#gadwp-tablechart"+b,j[0],"125px")}}else{e.throwDebug(j)}NProgress.done()},drawTableChart:function(m){var l,j,k;l=google.visualization.arrayToDataTable(m);j={page:"enable",pageSize:10,width:"100%",allowHtml:true};k=new google.visualization.Table(document.getElementById("gadwp-tablechart"+b));k.draw(l,j)},drawOrgChart:function(m){var l,j,k;l=google.visualization.arrayToDataTable(m);j={allowCollapse:true,allowHtml:true,height:"100%"};k=new google.visualization.OrgChart(document.getElementById("gadwp-orgchart"+b));k.draw(l,j)},drawPieChart:function(o,m,n){var l,j,k;l=google.visualization.arrayToDataTable(m);j={is3D:false,tooltipText:"percentage",legend:"none",chartArea:{width:"99%",height:"80%"},title:n,pieSliceText:"value",colors:gadwpItemData.colorVariations};k=new google.visualization.PieChart(document.getElementById("gadwp-"+o+b));k.draw(l,j)},drawGeoChart:function(m){var l,j,k;l=google.visualization.arrayToDataTable(m);j={chartArea:{width:"99%",height:"90%"},colors:[gadwpItemData.colorVariations[5],gadwpItemData.colorVariations[4]]};if(gadwpItemData.region){j.region=gadwpItemData.region;j.displayMode="markers";j.datalessRegionColor="EFEFEF"}k=new google.visualization.GeoChart(document.getElementById("gadwp-geochart"+b));k.draw(l,j)},drawAreaChart:function(n,o){var m,j,l,k;m=google.visualization.arrayToDataTable(n);if(o){k=new google.visualization.NumberFormat({suffix:"%",fractionDigits:2});k.format(m,1)}j={legend:{position:"none"},pointSize:3,colors:[gadwpItemData.colorVariations[0],gadwpItemData.colorVariations[4]],chartArea:{width:"99%",height:"90%"},vAxis:{textPosition:"in",minValue:0},hAxis:{textPosition:"none"}};l=new google.visualization.AreaChart(document.getElementById("gadwp-areachart"+b));l.draw(m,j)},drawBottomStats:function(j){jQuery("#gdsessions"+b).html(j[0]);jQuery("#gdusers"+b).html(j[1]);jQuery("#gdpageviews"+b).html(j[2]);jQuery("#gdbouncerate"+b).html(j[3]);jQuery("#gdorganicsearch"+b).html(j[4]);jQuery("#gdpagespervisit"+b).html(j[5]);jQuery("#gdpagetime"+b).html(j[6]);jQuery("#gdpageload"+b).html(j[7]);jQuery("#gdsessionduration"+b).html(j[8])},rtOnlyUniqueValues:function(l,k,j){return j.indexOf(l)===k},rtCountSessions:function(k,m){var l=0,j=0;for(j=0;j<k.rows.length;j++){if(jQuery.inArray(m,k.rows[j])>-1){l+=parseInt(k.rows[j][6])}}return l},rtGenerateTooltip:function(k){var m=0,l="",j=0;for(j=0;j<k.length;j++){m+=parseInt(k[j].count);l+="<tr><td class='gadwp-pgdetailsl'>"+k[j].value+"</td><td class='gadwp-pgdetailsr'>"+k[j].count+"</td></tr>"}if(m){return("<table>"+l+"</table>")}else{return("")}},rtPageDetails:function(y,n){var w,o,r,x=0,v=0,m=0,s=0,t=0,z=0,C=0,q=0,l=0,u="",A="",p="",k="",B="";y=y.rows;for(x=0;x<y.length;x++){if(y[x][0]==n){o=y[x][5];switch(y[x][3]){case"REFERRAL":t+=parseInt(y[x][6]);u+="<tr><td class='gadwp-pgdetailsl'>"+y[x][1]+"</td><td class='gadwp-pgdetailsr'>"+y[x][6]+"</td></tr>";break;case"ORGANIC":z+=parseInt(y[x][6]);A+="<tr><td class='gadwp-pgdetailsl'>"+y[x][2]+"</td><td class='gadwp-pgdetailsr'>"+y[x][6]+"</td></tr>";break;case"SOCIAL":q+=parseInt(y[x][6]);p+="<tr><td class='gadwp-pgdetailsl'>"+y[x][1]+"</td><td class='gadwp-pgdetailsr'>"+y[x][6]+"</td></tr>";break;case"CUSTOM":l+=parseInt(y[x][6]);k+="<tr><td class='gadwp-pgdetailsl'>"+y[x][1]+"</td><td class='gadwp-pgdetailsr'>"+y[x][6]+"</td></tr>";break;case"DIRECT":C+=parseInt(y[x][6]);break}}}if(t){u="<table><tr><td>"+e.i18n[0]+"("+t+")</td></tr>"+u+"</table><br />"}if(z){A="<table><tr><td>"+e.i18n[1]+"("+z+")</td></tr>"+A+"</table><br />"}if(q){p="<table><tr><td>"+e.i18n[2]+"("+q+")</td></tr>"+p+"</table><br />"}if(l){k="<table><tr><td>"+e.i18n[3]+"("+l+")</td></tr>"+k+"</table><br />"}if(C){B="<table><tr><td>"+e.i18n[4]+"("+C+")</td></tr></table><br />"}return("<p><center><strong>"+o+"</strong></center></p>"+u+A+p+k+B)},rtRefresh:function(){if(e.render.focusFlag){a.from=false;a.to=false;a.query="realtime";jQuery.post(gadwpItemData.ajaxurl,a,function(j){if(jQuery.isArray(j)){jQuery("#gadwp-reports"+b).show();e.realtime=j[0];e.drawRealtime(e.realtime)}else{e.throwDebug(j)}NProgress.done()})}},drawRealtime:function(y){var j,n,o,w,t,r,x=0,v=[],z=[],p=[],m=[],q=[],k=[],l=[],s="",o=[],w=[],t=[],r=[],u=["REFERRAL","ORGANIC","SOCIAL","CUSTOM"],A=["DIRECT","NEW"];jQuery(function(){jQuery("#gadwp-widget *").tooltip({tooltipClass:"gadwp"})});y=y[0];if(jQuery.isNumeric(y)||typeof y==="undefined"){y=[];y.totalsForAllResults=[];y.totalsForAllResults["rt:activeUsers"]="0";y.rows=[]}if(y.totalsForAllResults["rt:activeUsers"]!==document.getElementById("gadwp-online").innerHTML){jQuery("#gadwp-online").fadeOut("slow");jQuery("#gadwp-online").fadeOut(500);jQuery("#gadwp-online").fadeOut("slow",function(){if((parseInt(y.totalsForAllResults["rt:activeUsers"]))<(parseInt(document.getElementById("gadwp-online").innerHTML))){jQuery("#gadwp-online").css({"background-color":"#FFE8E8"})}else{jQuery("#gadwp-online").css({"background-color":"#E0FFEC"})}document.getElementById("gadwp-online").innerHTML=y.totalsForAllResults["rt:activeUsers"]});jQuery("#gadwp-online").fadeIn("slow");jQuery("#gadwp-online").fadeIn(500);jQuery("#gadwp-online").fadeIn("slow",function(){jQuery("#gadwp-online").css({"background-color":"#FFFFFF"})})}if(y.totalsForAllResults["rt:activeUsers"]==0){y.rows=[]}for(x=0;x<y.rows.length;x++){v.push(y.rows[x][0]);if(y.rows[x][3]=="REFERRAL"){z.push(y.rows[x][1])}if(y.rows[x][3]=="ORGANIC"){p.push(y.rows[x][2])}if(y.rows[x][3]=="SOCIAL"){m.push(y.rows[x][1])}if(y.rows[x][3]=="CUSTOM"){k.push(y.rows[x][1])}q.push(y.rows[x][3])}n=v.filter(e.rtOnlyUniqueValues);for(x=0;x<n.length;x++){l[x]={pagepath:n[x],count:e.rtCountSessions(y,n[x])}}l.sort(function(C,B){return B.count-C.count});s="";for(x=0;x<l.length;x++){if(x<gadwpItemData.rtLimitPages){s+='<div class="gadwp-pline"><div class="gadwp-pleft"><a href="#" data-gadwp="'+e.rtPageDetails(y,l[x].pagepath)+'">'+l[x].pagepath.substring(0,70)+'</a></div><div class="gadwp-pright">'+l[x].count+"</div></div>"}}document.getElementById("gadwp-pages").innerHTML='<br /><div class="gadwp-pg">'+s+"</div>";o=z.filter(e.rtOnlyUniqueValues);for(x=0;x<o.length;x++){o[x]={value:o[x],count:e.rtCountSessions(y,o[x])}}o.sort(function(C,B){return B.count-C.count});w=p.filter(e.rtOnlyUniqueValues);for(x=0;x<w.length;x++){w[x]={value:w[x],count:e.rtCountSessions(y,w[x])}}w.sort(function(C,B){return B.count-C.count});t=m.filter(e.rtOnlyUniqueValues);for(x=0;x<t.length;x++){t[x]={value:t[x],count:e.rtCountSessions(y,t[x])}}t.sort(function(C,B){return B.count-C.count});r=k.filter(e.rtOnlyUniqueValues);for(x=0;x<r.length;x++){r[x]={value:r[x],count:e.rtCountSessions(y,r[x])}}r.sort(function(C,B){return B.count-C.count});j='<div class="gadwp-bigtext"><a href="#" data-gadwp="'+e.rtGenerateTooltip(o)+'"><div class="gadwp-bleft">'+e.i18n[0]+'</a></div><div class="gadwp-bright">'+e.rtCountSessions(y,u[0])+"</div></div>";j+='<div class="gadwp-bigtext"><a href="#" data-gadwp="'+e.rtGenerateTooltip(w)+'"><div class="gadwp-bleft">'+e.i18n[1]+'</a></div><div class="gadwp-bright">'+e.rtCountSessions(y,u[1])+"</div></div>";j+='<div class="gadwp-bigtext"><a href="#" data-gadwp="'+e.rtGenerateTooltip(t)+'"><div class="gadwp-bleft">'+e.i18n[2]+'</a></div><div class="gadwp-bright">'+e.rtCountSessions(y,u[2])+"</div></div>";j+='<div class="gadwp-bigtext"><a href="#" data-gadwp="'+e.rtGenerateTooltip(r)+'"><div class="gadwp-bleft">'+e.i18n[3]+'</a></div><div class="gadwp-bright">'+e.rtCountSessions(y,u[3])+"</div></div>";j+='<div class="gadwp-bigtext"><div class="gadwp-bleft">'+e.i18n[4]+'</div><div class="gadwp-bright">'+e.rtCountSessions(y,A[0])+"</div></div>";j+='<div class="gadwp-bigtext"><div class="gadwp-bleft">'+e.i18n[5]+'</div><div class="gadwp-bright">'+e.rtCountSessions(y,A[1])+"</div></div>";document.getElementById("gadwp-tdo-right").innerHTML=j},throwDebug:function(j){jQuery("#gadwp-status"+b).css({"margin-top":"3px","padding-left":"5px",height:"auto",color:"#000","border-left":"5px solid red"});if(j=="-24"){jQuery("#gadwp-status"+b).html(gadwpItemData.i18n[15])}else{jQuery("#gadwp-reports"+b).css({"background-color":"#F7F7F7",height:"auto","margin-top":"10px","padding-top":"50px","padding-bottom":"50px",color:"#000","text-align":"center"});jQuery("#gadwp-reports"+b).html(j);jQuery("#gadwp-reports"+b).show();jQuery("#gadwp-status"+b).html(gadwpItemData.i18n[11]);console.log("\n********************* GADWP Log ********************* \n\n"+j);a={action:"gadwp_set_error",response:j,gadwp_security_set_error:gadwpItemData.security};jQuery.post(gadwpItemData.ajaxurl,a)}},throwError:function(l,j,k){jQuery(l).css({"background-color":"#F7F7F7",height:"auto","padding-top":k,"padding-bottom":k,color:"#000","text-align":"center"});if(j==-21){jQuery(l).html(gadwpItemData.i18n[12])}else{jQuery(l).html(gadwpItemData.i18n[13]+" ("+j+")")}},render:function(j,o,n){var k,q,p,l,m;if(o=="realtime"){jQuery("#gadwp-sel-report"+b).hide()}else{jQuery("#gadwp-sel-report"+b).show();clearInterval(e.rtRuns)}jQuery("#gadwp-status"+b).html("");switch(o){case"today":q="today";p="today";break;case"yesterday":q="yesterday";p="yesterday";break;case"7daysAgo":q="7daysAgo";p="yesterday";break;case"14daysAgo":q="14daysAgo";p="yesterday";break;case"90daysAgo":q="90daysAgo";p="yesterday";break;case"365daysAgo":q="365daysAgo";p="yesterday";break;case"1095daysAgo":q="1095daysAgo";p="yesterday";break;default:q="30daysAgo";p="yesterday";break}d.setCookie("default_metric",n);d.setCookie("default_dimension",o);if(typeof j!=="undefined"){d.setCookie("default_view",j);k=j}else{k=false}if(gadwpItemData.scope=="admin-item"){a={action:"gadwp_backend_item_reports",gadwp_security_backend_item_reports:gadwpItemData.security,from:q,to:p,filter:g}}else{if(gadwpItemData.scope=="front-item"){a={action:"gadwp_frontend_item_reports",gadwp_security_frontend_item_reports:gadwpItemData.security,from:q,to:p,filter:gadwpItemData.filter}}else{a={action:"gadwp_backend_item_reports",gadwp_security_backend_item_reports:gadwpItemData.security,projectId:k,from:q,to:p}}}if(o=="realtime"){e.i18n=gadwpItemData.i18n.slice(20,26);e.render.focusFlag=1;jQuery(window).bind("focus",function(r){e.render.focusFlag=1}).bind("blur",function(r){e.render.focusFlag=0});l='<div id="gadwp-realtime'+b+'">';l+='<div class="gadwp-rt-box">';l+='<div class="gadwp-tdo-left">';l+='<div class="gadwp-online" id="gadwp-online">0</div>';l+="</div>";l+='<div class="gadwp-tdo-right" id="gadwp-tdo-right">';l+='<div class="gadwp-bigtext">';l+='<div class="gadwp-bleft">'+e.i18n[0]+"</div>";l+='<div class="gadwp-bright">0</div>';l+="</div>";l+='<div class="gadwp-bigtext">';l+='<div class="gadwp-bleft">'+e.i18n[1]+"</div>";l+='<div class="gadwp-bright">0</div>';l+="</div>";l+='<div class="gadwp-bigtext">';l+='<div class="gadwp-bleft">'+e.i18n[2]+"</div>";l+='<div class="gadwp-bright">0</div>';l+="</div>";l+='<div class="gadwp-bigtext">';l+='<div class="gadwp-bleft">'+e.i18n[3]+"</div>";l+='<div class="gadwp-bright">0</div>';l+="</div>";l+='<div class="gadwp-bigtext">';l+='<div class="gadwp-bleft">'+e.i18n[4]+"</div>";l+='<div class="gadwp-bright">0</div>';l+="</div>";l+='<div class="gadwp-bigtext">';l+='<div class="gadwp-bleft">'+e.i18n[5]+"</div>";l+='<div class="gadwp-bright">0</div>';l+="</div>";l+="</div>";l+="</div>";l+="<div>";l+='<div id="gadwp-pages" class="gadwp-pages"> </div>';l+="</div>";l+="</div>";jQuery("#gadwp-reports"+b).html(l);e.rtRefresh(e.render.focusFlag);e.rtRuns=setInterval(e.rtRefresh,55000)}else{if(jQuery.inArray(n,["referrers","contentpages","searches"])>-1){l='<div id="gadwp-orgcharttablechart'+b+'">';l+='<div id="gadwp-orgchart'+b+'"></div>';l+='<div id="gadwp-tablechart'+b+'"></div>';l+="</div>";jQuery("#gadwp-reports"+b).html(l);jQuery("#gadwp-reports"+b).hide();jQuery("#gadwp-sel-metric"+b).show();a.query="channelGrouping,"+n;a.metric=c;jQuery.post(gadwpItemData.ajaxurl,a,function(r){e.orgChartTableChart(r)})}else{if(n=="404errors"){l='<div id="gadwp-404tablechart'+b+'">';l+='<div id="gadwp-tablechart'+b+'"></div>';l+="</div>";jQuery("#gadwp-reports"+b).html(l);jQuery("#gadwp-reports"+b).hide();jQuery("#gadwp-sel-metric"+b).show();a.query=n;a.metric=c;jQuery.post(gadwpItemData.ajaxurl,a,function(r){e.tableChart(r)})}else{if(n=="trafficdetails"||n=="technologydetails"){l='<div id="gadwp-orgchartpiecharts'+b+'">';l+='<div id="gadwp-orgchart'+b+'"></div>';l+='<div class="gadwp-floatwraper">';l+='<div id="gadwp-piechart-1'+b+'" class="halfsize floatleft"></div>';l+='<div id="gadwp-piechart-2'+b+'" class="halfsize floatright"></div>';l+="</div>";l+='<div class="gadwp-floatwraper">';l+='<div id="gadwp-piechart-3'+b+'" class="halfsize floatleft"></div>';l+='<div id="gadwp-piechart-4'+b+'" class="halfsize floatright"></div>';l+="</div>";l+="</div>";jQuery("#gadwp-reports"+b).html(l);jQuery("#gadwp-reports"+b).hide();jQuery("#gadwp-sel-metric"+b).show();if(n=="trafficdetails"){a.query="channelGrouping,medium,visitorType,source,socialNetwork";e.i18n=gadwpItemData.i18n.slice(0,5)}else{e.i18n=gadwpItemData.i18n.slice(15,20);a.query="deviceCategory,browser,operatingSystem,screenResolution,mobileDeviceBranding"}a.metric=c;jQuery.post(gadwpItemData.ajaxurl,a,function(r){e.orgChartPieCharts(r)})}else{if(n=="locations"){l='<div id="gadwp-geocharttablechart'+b+'">';l+='<div id="gadwp-geochart'+b+'"></div>';l+='<div id="gadwp-tablechart'+b+'"></div>';l+="</div>";jQuery("#gadwp-reports"+b).html(l);jQuery("#gadwp-reports"+b).hide();jQuery("#gadwp-sel-metric"+b).show();a.query=n;a.metric=c;jQuery.post(gadwpItemData.ajaxurl,a,function(r){e.geoChartTableChart(r)})}else{l='<div id="gadwp-areachartbottomstats'+b+'">';l+='<div id="gadwp-areachart'+b+'"></div>';l+='<div id="gadwp-bottomstats'+b+'">';l+='<div class="inside">';l+='<div class="small-box"><h3>'+gadwpItemData.i18n[5]+'</h3><p id="gdsessions'+b+'"> </p></div>';l+='<div class="small-box"><h3>'+gadwpItemData.i18n[6]+'</h3><p id="gdusers'+b+'"> </p></div>';l+='<div class="small-box"><h3>'+gadwpItemData.i18n[7]+'</h3><p id="gdpageviews'+b+'"> </p></div>';l+='<div class="small-box"><h3>'+gadwpItemData.i18n[8]+'</h3><p id="gdbouncerate'+b+'"> </p></div>';l+='<div class="small-box"><h3>'+gadwpItemData.i18n[9]+'</h3><p id="gdorganicsearch'+b+'"> </p></div>';l+='<div class="small-box"><h3>'+gadwpItemData.i18n[10]+'</h3><p id="gdpagespervisit'+b+'"> </p></div>';l+='<div class="small-box"><h3>'+gadwpItemData.i18n[26]+'</h3><p id="gdpagetime'+b+'"> </p></div>';l+='<div class="small-box"><h3>'+gadwpItemData.i18n[27]+'</h3><p id="gdpageload'+b+'"> </p></div>';l+='<div class="small-box"><h3>'+gadwpItemData.i18n[28]+'</h3><p id="gdsessionduration'+b+'"> </p></div>';l+="</div>";l+="</div>";l+="</div>";jQuery("#gadwp-reports"+b).html(l);jQuery("#gadwp-reports"+b).hide();a.query=n+",bottomstats";jQuery.post(gadwpItemData.ajaxurl,a,function(r){e.areaChartBottomStats(r)})}}}}}},refresh:function(){if(jQuery("#gadwp-areachartbottomstats"+b).length>0&&jQuery.isArray(e.areaChartBottomStatsData)){e.areaChartBottomStats(e.areaChartBottomStatsData)}if(jQuery("#gadwp-orgchartpiecharts"+b).length>0&&jQuery.isArray(e.orgChartPieChartsData)){e.orgChartPieCharts(e.orgChartPieChartsData)}if(jQuery("#gadwp-geocharttablechart"+b).length>0&&jQuery.isArray(e.geoChartTableChartData)){e.geoChartTableChart(e.geoChartTableChartData)}if(jQuery("#gadwp-orgcharttablechart"+b).length>0&&jQuery.isArray(e.orgChartTableChartData)){e.orgChartTableChart(e.orgChartTableChartData)}if(jQuery("#gadwp-404tablechart"+b).length>0&&jQuery.isArray(e.tableChartData)){e.tableChart(e.tableChartData)}},init:function(){if(!jQuery("#gadwp-reports"+b).length){return}if(jQuery("#gadwp-reports"+b).html().length){return}try{NProgress.configure({parent:"#gadwp-progressbar"+b,showSpinner:false});NProgress.start()}catch(j){e.alertMessage(gadwpItemData.i18n[0])}e.render(jQuery("#gadwp-sel-view"+b).val(),jQuery("#gadwp-sel-period"+b).val(),jQuery("#gadwp-sel-report"+b).val());jQuery(window).resize(function(){var k=jQuery(window).width()-e.oldViewPort;if((k<-5)||(k>5)){e.oldViewPort=jQuery(window).width();e.refresh()}})}};h.init();e.init();jQuery("#gadwp-sel-view"+b).change(function(){jQuery("#gadwp-reports"+b).html("");e.init()});jQuery("#gadwp-sel-period"+b).change(function(){jQuery("#gadwp-sel-metric"+b).hide();jQuery("#gadwp-reports"+b).html("");e.init()});jQuery("#gadwp-sel-report"+b).change(function(){jQuery("#gadwp-sel-metric"+b).hide();jQuery("#gadwp-reports"+b).html("");e.init()});jQuery("[id^=gadwp-swmetric-]").click(function(){c=this.id.replace("gadwp-swmetric-","");d.setCookie("default_swmetric",c);jQuery("#gadwp-swmetric-sessions").css("color","#444");jQuery("#gadwp-swmetric-users").css("color","#444");jQuery("#gadwp-swmetric-pageviews").css("color","#444");jQuery("#"+this.id).css("color","#008ec2");jQuery("#gadwp-reports"+b).html("");e.init()});if(gadwpItemData.scope=="admin-widgets"){return}else{return this.dialog({width:"auto",maxWidth:510,height:"auto",modal:true,fluid:true,dialogClass:"gadwp wp-dialog",resizable:false,title:e.getTitle(gadwpItemData.scope),position:{my:"top",at:"top+100",of:window}})}}});function GADWPReportLoad(){if(gadwpItemData.scope=="admin-widgets"){jQuery("#gadwp-window-1").gadwpItemReport(1)}else{jQuery(gadwpItemData.getSelector(gadwpItemData.scope)).click(function(){if(!jQuery("#gadwp-window-"+gadwpItemData.getID(this)).length>0){jQuery("body").append('<div id="gadwp-window-'+gadwpItemData.getID(this)+'"></div>')}jQuery("#gadwp-window-"+gadwpItemData.getID(this)).gadwpItemReport(gadwpItemData.getID(this))})}jQuery(window).resize(function(){gadwpItemData.responsiveDialog()});jQuery(document).on("dialogopen",".ui-dialog",function(a,b){gadwpItemData.responsiveDialog()})};
|
|
common/nprogress/nprogress.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;-webkit-transform:rotate(3deg) translate(0,-4px);-ms-transform:rotate(3deg) translate(0,-4px);transform:rotate(3deg) translate(0,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:solid 2px transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner 400ms linear infinite;animation:nprogress-spinner 400ms linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .spinner,.nprogress-custom-parent #nprogress .bar{position:absolute}@ -webkit-keyframes nprogress-spinner{0{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@ keyframes nprogress-spinner{0{transform:rotate(0)}100%{transform:rotate(360deg)}}
|
|
common/nprogress/nprogress.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(a,b){if(typeof define==="function"&&define.amd){define(b)}else{if(typeof exports==="object"){module.exports=b()}else{a.NProgress=b()}}})(this,function(){var e={};e.version="0.1.6";var b=e.settings={minimum:0.08,easing:"ease",positionUsing:"",speed:200,trickle:true,trickleRate:0.02,trickleSpeed:800,showSpinner:true,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};e.configure=function(m){var n,o;for(n in m){o=m[n];if(o!==undefined&&m.hasOwnProperty(n)){b[n]=o}}return this};e.status=null;e.set=function(s){var m=e.isStarted();s=g(s,b.minimum,1);e.status=(s===1?null:s);var o=e.render(!m),p=o.querySelector(b.barSelector),q=b.speed,r=b.easing;o.offsetWidth;i(function(n){if(b.positionUsing===""){b.positionUsing=e.getPositioningCSS()}h(p,a(s,q,r));if(s===1){h(o,{transition:"none",opacity:1});o.offsetWidth;setTimeout(function(){h(o,{transition:"all "+q+"ms linear",opacity:0});setTimeout(function(){e.remove();n()},q)},q)}else{setTimeout(n,q)}});return this};e.isStarted=function(){return typeof e.status==="number"};e.start=function(){if(!e.status){e.set(0)}var m=function(){setTimeout(function(){if(!e.status){return}e.trickle();m()},b.trickleSpeed)};if(b.trickle){m()}return this};e.done=function(m){if(!m&&!e.status){return this}return e.inc(0.3+0.5*Math.random()).set(1)};e.inc=function(m){var o=e.status;if(!o){return e.start()}else{if(typeof m!=="number"){m=(1-o)*g(Math.random()*o,0.1,0.95)}o=g(o+m,0,0.994);return e.set(o)}};e.trickle=function(){return e.inc(Math.random()*b.trickleRate)};(function(){var m=0,n=0;e.promise=function(o){if(!o||o.state()=="resolved"){return this}if(n==0){e.start()}m++;n++;o.always(function(){n--;if(n==0){m=0;e.done()}else{e.set((m-n)/m)}});return this}})();e.render=function(m){if(e.isRendered()){return document.getElementById("nprogress")}j(document.documentElement,"nprogress-busy");var n=document.createElement("div");n.id="nprogress";n.innerHTML=b.template;var q=n.querySelector(b.barSelector),o=m?"-100":c(e.status||0),p=document.querySelector(b.parent),r;h(q,{transition:"all 0 linear",transform:"translate3d("+o+"%,0,0)"});if(!b.showSpinner){r=n.querySelector(b.spinnerSelector);r&&k(r)}if(p!=document.body){j(p,"nprogress-custom-parent")}p.appendChild(n);return n};e.remove=function(){l(document.documentElement,"nprogress-busy");l(document.querySelector(b.parent),"nprogress-custom-parent");var m=document.getElementById("nprogress");m&&k(m)};e.isRendered=function(){return !!document.getElementById("nprogress")};e.getPositioningCSS=function(){var m=document.body.style;var n=("WebkitTransform" in m)?"Webkit":("MozTransform" in m)?"Moz":("msTransform" in m)?"ms":("OTransform" in m)?"O":"";if(n+"Perspective" in m){return"translate3d"}else{if(n+"Transform" in m){return"translate"}else{return"margin"}}};function g(p,o,m){if(p<o){return o}if(p>m){return m}return p}function c(m){return(-1+m)*100}function a(q,o,p){var m;if(b.positionUsing==="translate3d"){m={transform:"translate3d("+c(q)+"%,0,0)"}}else{if(b.positionUsing==="translate"){m={transform:"translate("+c(q)+"%,0)"}}else{m={"margin-left":c(q)+"%"}}}m.transition="all "+o+"ms "+p;return m}var i=(function(){var n=[];function m(){var o=n.shift();if(o){o(m)}}return function(o){n.push(o);if(n.length==1){m()}}})();var h=(function(){var m=["Webkit","O","Moz","ms"],r={};function o(s){return s.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(t,u){return u.toUpperCase()})}function q(s){var u=document.body.style;if(s in u){return s}var t=m.length,w=s.charAt(0).toUpperCase()+s.slice(1),v;while(t--){v=m[t]+w;if(v in u){return v}}return s}function p(s){s=o(s);return r[s]||(r[s]=q(s))}function n(s,u,t){u=p(u);s.style[u]=t}return function(u,t){var s=arguments,w,v;if(s.length==2){for(w in t){v=t[w];if(v!==undefined&&t.hasOwnProperty(w)){n(u,w,v)}}}else{n(u,s[1],s[2])}}})();function f(n,m){var o=typeof n=="string"?n:d(n);return o.indexOf(" "+m+" ")>=0}function j(n,m){var p=d(n),o=p+m;if(f(p,m)){return}n.className=o.substring(1)}function l(n,m){var p=d(n),o;if(!f(n,m)){return}o=p.replace(" "+m+" "," ");n.className=o.substring(1,o.length-1)}function d(m){return(" "+(m.className||"")+" ").replace(/\s+/gi," ")}function k(m){m&&m.parentNode&&m.parentNode.removeChild(m)}return e});
|
|
common/realtime/images/ui-bg_flat_0_aaaaaa_40x100.png
DELETED
Binary file
|
common/realtime/images/ui-bg_flat_75_ffffff_40x100.png
DELETED
Binary file
|
common/realtime/images/ui-bg_glass_55_fbf9ee_1x400.png
DELETED
Binary file
|
common/realtime/images/ui-bg_glass_65_ffffff_1x400.png
DELETED
Binary file
|
common/realtime/images/ui-bg_glass_75_dadada_1x400.png
DELETED
Binary file
|
common/realtime/images/ui-bg_glass_75_e6e6e6_1x400.png
DELETED
Binary file
|
common/realtime/images/ui-bg_glass_95_fef1ec_1x400.png
DELETED
Binary file
|
common/realtime/images/ui-bg_highlight-soft_75_cccccc_1x100.png
DELETED
Binary file
|
common/realtime/images/ui-icons_222222_256x240.png
DELETED
Binary file
|
common/realtime/images/ui-icons_2e83ff_256x240.png
DELETED
Binary file
|
common/realtime/images/ui-icons_454545_256x240.png
DELETED
Binary file
|
common/realtime/images/ui-icons_888888_256x240.png
DELETED
Binary file
|
common/realtime/images/ui-icons_cd0a0a_256x240.png
DELETED
Binary file
|
common/realtime/jquery.ui.tooltip.html.css
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
/*! jQuery UI - v1.9.2 - 2013-09-22
|
2 |
-
* http://jqueryui.com
|
3 |
-
* Copyright 2018 jQuery Foundation and other contributors; Licensed MIT */.ui-tooltip.gadwp{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}* html .ui-tooltip.gadwp{background-image:none}body .ui-tooltip.gadwp{border-width:2px}.ui-widget.gadwp{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget.gadwp .ui-widget{font-size:1em}.ui-widget.gadwp input,.ui-widget.gadwp select,.ui-widget.gadwp textarea,.ui-widget.gadwp button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content.gadwp{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content.gadwp a{color:#222}.gadwp .ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.gadwp .ui-widget-header a{color:#222}
|
|
|
|
|
|
common/realtime/jquery.ui.tooltip.html.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
jQuery(function(){jQuery("#gadwp-widget *").tooltip({items:"[data-gadwp]",content:function(){return jQuery(this).attr("data-gadwp")}})});
|
|
config.php
DELETED
@@ -1,466 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Config' ) ) {
|
15 |
-
|
16 |
-
final class GADWP_Config {
|
17 |
-
|
18 |
-
public $options;
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
// Rename old option keys
|
22 |
-
$this->option_keys_rename(); // v5.2
|
23 |
-
// Get plugin options
|
24 |
-
$this->get_plugin_options();
|
25 |
-
// Automatic updates
|
26 |
-
add_filter( 'auto_update_plugin', array( $this, 'automatic_update' ), 10, 2 );
|
27 |
-
// Provide language packs for all available Network languages
|
28 |
-
if ( is_multisite() ) {
|
29 |
-
add_filter( 'plugins_update_check_locales', array( $this, 'translation_updates' ), 10, 1 );
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
public function get_major_version( $version ) {
|
34 |
-
$exploded_version = explode( '.', $version );
|
35 |
-
if ( isset( $exploded_version[2] ) ) {
|
36 |
-
return $exploded_version[0] . '.' . $exploded_version[1] . '.' . $exploded_version[2];
|
37 |
-
} else {
|
38 |
-
return $exploded_version[0] . '.' . $exploded_version[1] . '.0';
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
public function automatic_update( $update, $item ) {
|
43 |
-
$item = (array) $item;
|
44 |
-
if ( is_multisite() && ! is_main_site() ) {
|
45 |
-
return;
|
46 |
-
}
|
47 |
-
if ( ! isset( $item['new_version'] ) || ! isset( $item['plugin'] ) || ! $this->options['automatic_updates_minorversion'] ) {
|
48 |
-
return $update;
|
49 |
-
}
|
50 |
-
if ( isset( $item['slug'] ) && 'google-analytics-dashboard-for-wp' == $item['slug'] ) {
|
51 |
-
// Only when a minor update is available
|
52 |
-
if ( $this->get_major_version( GADWP_CURRENT_VERSION ) == $this->get_major_version( $item['new_version'] ) ) {
|
53 |
-
return ( $this->get_major_version( GADWP_CURRENT_VERSION ) == $this->get_major_version( $item['new_version'] ) );
|
54 |
-
}
|
55 |
-
}
|
56 |
-
return $update;
|
57 |
-
}
|
58 |
-
|
59 |
-
public function translation_updates( $locales ) {
|
60 |
-
$languages = get_available_languages();
|
61 |
-
return array_values( $languages );
|
62 |
-
}
|
63 |
-
|
64 |
-
// Validates data before storing
|
65 |
-
private function validate_data( $options ) {
|
66 |
-
/* @formatter:off */
|
67 |
-
$numerics = array( 'ga_realtime_pages',
|
68 |
-
'ga_enhanced_links',
|
69 |
-
'ga_crossdomain_tracking',
|
70 |
-
'ga_author_dimindex',
|
71 |
-
'ga_category_dimindex',
|
72 |
-
'ga_tag_dimindex',
|
73 |
-
'ga_user_dimindex',
|
74 |
-
'ga_pubyear_dimindex',
|
75 |
-
'ga_pubyearmonth_dimindex',
|
76 |
-
'tm_author_var',
|
77 |
-
'tm_category_var',
|
78 |
-
'tm_tag_var',
|
79 |
-
'tm_user_var',
|
80 |
-
'tm_pubyear_var',
|
81 |
-
'tm_pubyearmonth_var',
|
82 |
-
'ga_aff_tracking',
|
83 |
-
'amp_tracking_analytics',
|
84 |
-
'amp_tracking_clientidapi',
|
85 |
-
'amp_tracking_tagmanager',
|
86 |
-
'optimize_tracking',
|
87 |
-
'optimize_pagehiding',
|
88 |
-
'trackingcode_infooter',
|
89 |
-
'trackingevents_infooter',
|
90 |
-
'ga_formsubmit_tracking',
|
91 |
-
'superadmin_tracking',
|
92 |
-
'ga_pagescrolldepth_tracking',
|
93 |
-
'tm_pagescrolldepth_tracking',
|
94 |
-
'ga_speed_samplerate',
|
95 |
-
'ga_user_samplerate',
|
96 |
-
'ga_event_precision',
|
97 |
-
'with_endpoint',
|
98 |
-
'backend_realtime_report',
|
99 |
-
'ga_optout',
|
100 |
-
'ga_dnt_optout',
|
101 |
-
'tm_optout',
|
102 |
-
'tm_dnt_optout',
|
103 |
-
'ga_with_gtag',
|
104 |
-
'usage_tracking',
|
105 |
-
'hide_am_notices',
|
106 |
-
'network_hide_am_notices',
|
107 |
-
);
|
108 |
-
foreach ( $numerics as $key ) {
|
109 |
-
if ( isset( $options[$key] ) ) {
|
110 |
-
$options[$key] = (int) $options[$key];
|
111 |
-
}
|
112 |
-
}
|
113 |
-
|
114 |
-
$texts = array( 'ga_crossdomain_list',
|
115 |
-
'client_id',
|
116 |
-
'client_secret',
|
117 |
-
'theme_color',
|
118 |
-
'ga_target_geomap',
|
119 |
-
'ga_cookiedomain',
|
120 |
-
'ga_cookiename',
|
121 |
-
'pagetitle_404',
|
122 |
-
'maps_api_key',
|
123 |
-
'web_containerid',
|
124 |
-
'amp_containerid',
|
125 |
-
'optimize_containerid',
|
126 |
-
'ga_event_downloads',
|
127 |
-
'ga_event_affiliates',
|
128 |
-
'ecommerce_mode',
|
129 |
-
'tracking_type',
|
130 |
-
);
|
131 |
-
foreach ( $texts as $key ) {
|
132 |
-
if ( isset( $options[$key] ) ) {
|
133 |
-
$options[$key] = trim (sanitize_text_field( $options[$key] ));
|
134 |
-
}
|
135 |
-
}
|
136 |
-
/* @formatter:on */
|
137 |
-
|
138 |
-
if ( isset( $options['ga_event_downloads'] ) && empty( $options['ga_event_downloads'] ) ) {
|
139 |
-
$options['ga_event_downloads'] = 'zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*';
|
140 |
-
}
|
141 |
-
|
142 |
-
if ( isset( $options['pagetitle_404'] ) && empty( $options['pagetitle_404'] ) ) {
|
143 |
-
$options['pagetitle_404'] = 'Page Not Found';
|
144 |
-
}
|
145 |
-
|
146 |
-
if ( isset( $options['ga_event_affiliates'] ) && empty( $options['ga_event_affiliates'] ) ) {
|
147 |
-
$options['ga_event_affiliates'] = '/out/';
|
148 |
-
}
|
149 |
-
|
150 |
-
if ( isset( $options['ga_speed_samplerate'] ) && ( $options['ga_speed_samplerate'] < 1 || $options['ga_speed_samplerate'] > 100 ) ) {
|
151 |
-
$options['ga_speed_samplerate'] = 1;
|
152 |
-
}
|
153 |
-
|
154 |
-
if ( isset( $options['ga_user_samplerate'] ) && ( $options['ga_user_samplerate'] < 1 || $options['ga_user_samplerate'] > 100 ) ) {
|
155 |
-
$options['ga_user_samplerate'] = 100;
|
156 |
-
}
|
157 |
-
|
158 |
-
if ( isset( $options['ga_cookieexpires'] ) && $options['ga_cookieexpires'] ) { // v4.9
|
159 |
-
$options['ga_cookieexpires'] = (int) $options['ga_cookieexpires'];
|
160 |
-
}
|
161 |
-
|
162 |
-
return $options;
|
163 |
-
}
|
164 |
-
|
165 |
-
public function set_plugin_options( $network_settings = false ) {
|
166 |
-
// Handle Network Mode
|
167 |
-
$options = $this->options;
|
168 |
-
$get_network_options = get_site_option( 'gadwp_network_options' );
|
169 |
-
$old_network_options = (array) json_decode( $get_network_options );
|
170 |
-
|
171 |
-
if ( is_multisite() ) {
|
172 |
-
if ( $network_settings ) { // Retrieve network options, clear blog options, store both to db
|
173 |
-
$network_options['token'] = $this->options['token'];
|
174 |
-
$options['token'] = '';
|
175 |
-
if ( is_network_admin() ) {
|
176 |
-
$network_options['ga_profiles_list'] = $this->options['ga_profiles_list'];
|
177 |
-
$options['ga_profiles_list'] = array();
|
178 |
-
$network_options['client_id'] = $this->options['client_id'];
|
179 |
-
$options['client_id'] = '';
|
180 |
-
$network_options['client_secret'] = $this->options['client_secret'];
|
181 |
-
$options['client_secret'] = '';
|
182 |
-
$network_options['user_api'] = $this->options['user_api'];
|
183 |
-
$options['user_api'] = 0;
|
184 |
-
$network_options['network_mode'] = $this->options['network_mode'];
|
185 |
-
$network_options['superadmin_tracking'] = $this->options['superadmin_tracking'];
|
186 |
-
$network_options['automatic_updates_minorversion'] = $this->options['automatic_updates_minorversion'];
|
187 |
-
unset( $options['network_mode'] );
|
188 |
-
if ( isset( $this->options['network_tableid'] ) ) {
|
189 |
-
$network_options['network_tableid'] = $this->options['network_tableid'];
|
190 |
-
unset( $options['network_tableid'] );
|
191 |
-
}
|
192 |
-
}
|
193 |
-
$merged_options = array_merge( $old_network_options, $network_options );
|
194 |
-
update_site_option( 'gadwp_network_options', json_encode( $this->validate_data( $merged_options ) ) );
|
195 |
-
}
|
196 |
-
}
|
197 |
-
update_option( 'gadwp_options', json_encode( $this->validate_data( $options ) ) );
|
198 |
-
}
|
199 |
-
|
200 |
-
private function get_plugin_options() {
|
201 |
-
/*
|
202 |
-
* Get plugin options
|
203 |
-
*/
|
204 |
-
global $blog_id;
|
205 |
-
|
206 |
-
if ( ! get_option( 'gadwp_options' ) ) {
|
207 |
-
GADWP_Install::install();
|
208 |
-
}
|
209 |
-
$this->options = (array) json_decode( get_option( 'gadwp_options' ) );
|
210 |
-
// Maintain Compatibility
|
211 |
-
$this->maintain_compatibility();
|
212 |
-
// Handle Network Mode
|
213 |
-
if ( is_multisite() ) {
|
214 |
-
$get_network_options = get_site_option( 'gadwp_network_options' );
|
215 |
-
$network_options = (array) json_decode( $get_network_options );
|
216 |
-
if ( isset( $network_options['network_mode'] ) && ( $network_options['network_mode'] ) ) {
|
217 |
-
if ( ! is_network_admin() && ! empty( $network_options['ga_profiles_list'] ) && isset( $network_options['network_tableid']->$blog_id ) ) {
|
218 |
-
$network_options['ga_profiles_list'] = array( 0 => GADWP_Tools::get_selected_profile( $network_options['ga_profiles_list'], $network_options['network_tableid']->$blog_id ) );
|
219 |
-
$network_options['tableid_jail'] = $network_options['ga_profiles_list'][0][1];
|
220 |
-
}
|
221 |
-
$this->options = array_merge( $this->options, $network_options );
|
222 |
-
} else {
|
223 |
-
$this->options['network_mode'] = 0;
|
224 |
-
}
|
225 |
-
}
|
226 |
-
}
|
227 |
-
|
228 |
-
private function maintain_compatibility() {
|
229 |
-
$flag = false;
|
230 |
-
|
231 |
-
$prevver = get_option( 'gadwp_version' );
|
232 |
-
if ( $prevver && GADWP_CURRENT_VERSION != $prevver ) {
|
233 |
-
$flag = true;
|
234 |
-
update_option( 'gadwp_version', GADWP_CURRENT_VERSION );
|
235 |
-
update_option( 'gadwp_got_updated', true );
|
236 |
-
GADWP_Tools::clear_cache();
|
237 |
-
GADWP_Tools::delete_cache( 'last_error' );
|
238 |
-
if ( is_multisite() ) { // Cleanup errors and cookies on the entire network
|
239 |
-
foreach ( GADWP_Tools::get_sites( array( 'number' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
|
240 |
-
switch_to_blog( $blog['blog_id'] );
|
241 |
-
GADWP_Tools::delete_cache( 'gapi_errors' );
|
242 |
-
restore_current_blog();
|
243 |
-
}
|
244 |
-
} else {
|
245 |
-
GADWP_Tools::delete_cache( 'gapi_errors' );
|
246 |
-
}
|
247 |
-
|
248 |
-
// Enable GADWP EndPoint for those updating from a version lower than 5.2, introduced in GADWP v5.3
|
249 |
-
if (version_compare( $prevver, '5.2', '<' ) ) {
|
250 |
-
$this->options['with_endpoint'] = 2;
|
251 |
-
}
|
252 |
-
}
|
253 |
-
|
254 |
-
if ( isset( $this->options['item_reports'] ) ) { // v4.8
|
255 |
-
$this->options['backend_item_reports'] = $this->options['item_reports'];
|
256 |
-
}
|
257 |
-
if ( isset( $this->options['ga_dash_frontend_stats'] ) ) { // v4.8
|
258 |
-
$this->options['frontend_item_reports'] = $this->options['ga_dash_frontend_stats'];
|
259 |
-
}
|
260 |
-
|
261 |
-
/* @formatter:off */
|
262 |
-
$zeros = array( 'ga_enhanced_links',
|
263 |
-
'network_mode',
|
264 |
-
'ga_enhanced_excludesa',
|
265 |
-
'ga_remarketing',
|
266 |
-
'ga_event_bouncerate',
|
267 |
-
'ga_author_dimindex',
|
268 |
-
'ga_tag_dimindex',
|
269 |
-
'ga_category_dimindex',
|
270 |
-
'ga_user_dimindex',
|
271 |
-
'ga_pubyear_dimindex',
|
272 |
-
'ga_pubyearmonth_dimindex',
|
273 |
-
'tm_author_var', // v5.0
|
274 |
-
'tm_category_var', // v5.0
|
275 |
-
'tm_tag_var', // v5.0
|
276 |
-
'tm_user_var', // v5.0
|
277 |
-
'tm_pubyear_var', // v5.0
|
278 |
-
'tm_pubyearmonth_var', // v5.0
|
279 |
-
'ga_crossdomain_tracking',
|
280 |
-
'api_backoff', // v4.8.1.3
|
281 |
-
'ga_aff_tracking',
|
282 |
-
'ga_hash_tracking',
|
283 |
-
'switch_profile', // V4.7
|
284 |
-
'amp_tracking_analytics', //v5.0
|
285 |
-
'amp_tracking_clientidapi', //v5.1.2
|
286 |
-
'optimize_tracking', //v5.0
|
287 |
-
'optimize_pagehiding', //v5.0
|
288 |
-
'amp_tracking_tagmanager', //v5.0
|
289 |
-
'trackingcode_infooter', //v5.0
|
290 |
-
'trackingevents_infooter', //v5.0
|
291 |
-
'ga_formsubmit_tracking', //v5.0
|
292 |
-
'superadmin_tracking', //v5.0
|
293 |
-
'ga_pagescrolldepth_tracking', //v5.0
|
294 |
-
'tm_pagescrolldepth_tracking', //v5.0
|
295 |
-
'ga_event_precision', //v5.1.1.1
|
296 |
-
'ga_force_ssl', //v5.1.2
|
297 |
-
'with_endpoint', //v5.2
|
298 |
-
'backend_realtime_report', //v5.2
|
299 |
-
'ga_optout', //v5.2.3
|
300 |
-
'ga_dnt_optout', //v5.2.3
|
301 |
-
'ga_with_gtag', //v5.3
|
302 |
-
'frontend_item_reports',
|
303 |
-
'tm_optout', //v5.3.1.2
|
304 |
-
'tm_dnt_optout', //v5.3.1.2
|
305 |
-
'usage_tracking', //v5.3.4
|
306 |
-
'hide_am_notices', //v5.3.4
|
307 |
-
'network_hide_am_notices', //v5.3.4
|
308 |
-
);
|
309 |
-
foreach ( $zeros as $key ) {
|
310 |
-
if ( ! isset( $this->options[$key] ) ) {
|
311 |
-
$this->options[$key] = 0;
|
312 |
-
$flag = true;
|
313 |
-
}
|
314 |
-
}
|
315 |
-
|
316 |
-
if ( isset($this->options['ga_dash_tracking']) && 0 == $this->options['ga_dash_tracking'] ) { // v5.0.1
|
317 |
-
$this->options['tracking_type'] = 'disabled';
|
318 |
-
$flag = true;
|
319 |
-
}
|
320 |
-
|
321 |
-
$unsets = array( 'ga_dash_jailadmins', // v4.7
|
322 |
-
'ga_tracking_code',
|
323 |
-
'ga_dash_tableid', // v4.9
|
324 |
-
'ga_dash_frontend_keywords', // v4.8
|
325 |
-
'ga_dash_apikey', // v4.9.1.3
|
326 |
-
'ga_dash_default_metric', // v4.8.1
|
327 |
-
'ga_dash_default_dimension', // v4.8.1
|
328 |
-
'ga_dash_adsense', // v5.0
|
329 |
-
'ga_dash_frontend_stats', // v4.8
|
330 |
-
'item_reports', // v4.8
|
331 |
-
'ga_dash_tracking', // v5.0
|
332 |
-
'ga_dash_cachetime', // v5.2
|
333 |
-
'ga_dash_default_ua', // v5.2
|
334 |
-
'ga_dash_hidden', // v5.2
|
335 |
-
);
|
336 |
-
foreach ( $unsets as $key ) {
|
337 |
-
if ( isset( $this->options[$key] ) ) {
|
338 |
-
unset( $this->options[$key] );
|
339 |
-
$flag = true;
|
340 |
-
}
|
341 |
-
}
|
342 |
-
|
343 |
-
$empties = array( 'ga_crossdomain_list',
|
344 |
-
'ga_cookiedomain', // v4.9.4
|
345 |
-
'ga_cookiename', // v4.9.4
|
346 |
-
'ga_cookieexpires', // v4.9.4
|
347 |
-
'maps_api_key', // v4.9.4
|
348 |
-
'web_containerid', // v5.0
|
349 |
-
'amp_containerid', // v5.0
|
350 |
-
'optimize_containerid', // v5.0
|
351 |
-
);
|
352 |
-
foreach ( $empties as $key ) {
|
353 |
-
if ( ! isset( $this->options[$key] ) ) {
|
354 |
-
$this->options[$key] = '';
|
355 |
-
$flag = true;
|
356 |
-
}
|
357 |
-
}
|
358 |
-
|
359 |
-
$ones = array( 'ga_speed_samplerate',
|
360 |
-
'automatic_updates_minorversion',
|
361 |
-
'backend_item_reports', // v4.8
|
362 |
-
'dashboard_widget', // v4.7
|
363 |
-
);
|
364 |
-
foreach ( $ones as $key ) {
|
365 |
-
if ( ! isset( $this->options[$key] ) ) {
|
366 |
-
$this->options[$key] = 1;
|
367 |
-
$flag = true;
|
368 |
-
}
|
369 |
-
}
|
370 |
-
|
371 |
-
$arrays = array( 'access_front',
|
372 |
-
'access_back',
|
373 |
-
'ga_profiles_list',
|
374 |
-
'track_exclude',
|
375 |
-
);
|
376 |
-
foreach ( $arrays as $key ) {
|
377 |
-
if ( ! is_array( $this->options[$key] ) ) {
|
378 |
-
$this->options[$key] = array();
|
379 |
-
$flag = true;
|
380 |
-
}
|
381 |
-
}
|
382 |
-
if ( empty( $this->options['access_front'] ) ) {
|
383 |
-
$this->options['access_front'][] = 'administrator';
|
384 |
-
}
|
385 |
-
if ( empty( $this->options['access_back'] ) ) {
|
386 |
-
$this->options['access_back'][] = 'administrator';
|
387 |
-
}
|
388 |
-
/* @formatter:on */
|
389 |
-
|
390 |
-
if ( ! isset( $this->options['ga_event_affiliates'] ) ) {
|
391 |
-
$this->options['ga_event_affiliates'] = '/out/';
|
392 |
-
$flag = true;
|
393 |
-
}
|
394 |
-
|
395 |
-
if ( ! isset( $this->options['ga_user_samplerate'] ) ) {
|
396 |
-
$this->options['ga_user_samplerate'] = 100;
|
397 |
-
}
|
398 |
-
|
399 |
-
if ( ! isset( $this->options['ga_event_downloads'] ) ) {
|
400 |
-
$this->options['ga_event_downloads'] = 'zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*';
|
401 |
-
$flag = true;
|
402 |
-
}
|
403 |
-
|
404 |
-
if ( ! isset( $this->options['pagetitle_404'] ) ) { // v4.9.4
|
405 |
-
$this->options['pagetitle_404'] = 'Page Not Found';
|
406 |
-
$flag = true;
|
407 |
-
}
|
408 |
-
|
409 |
-
if ( ! isset( $this->options['ecommerce_mode'] ) ) { // v5.0
|
410 |
-
$this->options['ecommerce_mode'] = 'disabled';
|
411 |
-
$flag = true;
|
412 |
-
}
|
413 |
-
|
414 |
-
if ( isset( $this->options['ga_dash_tracking'] ) && 'classic' == $this->options['ga_dash_tracking'] ) { // v5.0
|
415 |
-
$this->options['tracking_type'] = 'universal';
|
416 |
-
$flag = true;
|
417 |
-
}
|
418 |
-
|
419 |
-
if ( $flag ) {
|
420 |
-
$this->set_plugin_options( false );
|
421 |
-
}
|
422 |
-
}
|
423 |
-
|
424 |
-
private function option_keys_rename() {
|
425 |
-
|
426 |
-
/* @formatter:off */
|
427 |
-
$batch = array( 'ga_dash_token' => 'token',
|
428 |
-
'ga_dash_clientid' => 'client_id',
|
429 |
-
'ga_dash_clientsecret' => 'client_secret',
|
430 |
-
'ga_dash_access_front' => 'access_front',
|
431 |
-
'ga_dash_access_back' => 'access_back',
|
432 |
-
'ga_dash_tableid_jail' => 'tableid_jail',
|
433 |
-
'ga_dash_tracking_type' => 'tracking_type',
|
434 |
-
'ga_dash_userapi' => 'user_api',
|
435 |
-
'ga_dash_network' => 'network_mode',
|
436 |
-
'ga_dash_tableid_network' => 'network_tableid',
|
437 |
-
'ga_dash_anonim' => 'ga_anonymize_ip',
|
438 |
-
'ga_dash_profile_list' => 'ga_profiles_list',
|
439 |
-
'ga_dash_remarketing' => 'ga_remarketing',
|
440 |
-
'ga_dash_excludesa' => 'superadmin_tracking',
|
441 |
-
'ga_track_exclude' => 'track_exclude',
|
442 |
-
'ga_dash_style' => 'theme_color',
|
443 |
-
);
|
444 |
-
/* @formatter:on */
|
445 |
-
|
446 |
-
if ( is_multisite() ) {
|
447 |
-
$options = get_site_option( 'gadash_network_options' );
|
448 |
-
if ( $options ) {
|
449 |
-
$options = (array) json_decode( $options );
|
450 |
-
$options = GADWP_Tools::array_keys_rename( $options, $batch );
|
451 |
-
update_site_option( 'gadwp_network_options', json_encode( $this->validate_data( $options ) ) );
|
452 |
-
delete_site_option( 'gadash_network_options' );
|
453 |
-
}
|
454 |
-
}
|
455 |
-
|
456 |
-
$options = get_option( 'gadash_options' );
|
457 |
-
if ( $options ) {
|
458 |
-
$options = (array) json_decode( $options );
|
459 |
-
$options = GADWP_Tools::array_keys_rename( $options, $batch );
|
460 |
-
update_option( 'gadwp_options', json_encode( $this->validate_data( $options ) ) );
|
461 |
-
delete_option( 'gadash_options' );
|
462 |
-
}
|
463 |
-
}
|
464 |
-
}
|
465 |
-
}
|
466 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/ajax-actions.php
DELETED
@@ -1,157 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Frontend_Ajax' ) ) {
|
15 |
-
|
16 |
-
final class GADWP_Frontend_Ajax {
|
17 |
-
|
18 |
-
private $gadwp;
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
$this->gadwp = GADWP();
|
22 |
-
|
23 |
-
if ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_front'] ) && $this->gadwp->config->options['frontend_item_reports'] ) {
|
24 |
-
// Item Reports action
|
25 |
-
add_action( 'wp_ajax_gadwp_frontend_item_reports', array( $this, 'ajax_item_reports' ) );
|
26 |
-
}
|
27 |
-
|
28 |
-
// Frontend Widget actions
|
29 |
-
add_action( 'wp_ajax_ajax_frontwidget_report', array( $this, 'ajax_frontend_widget' ) );
|
30 |
-
add_action( 'wp_ajax_nopriv_ajax_frontwidget_report', array( $this, 'ajax_frontend_widget' ) );
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Ajax handler for Item Reports
|
35 |
-
*
|
36 |
-
* @return string|int
|
37 |
-
*/
|
38 |
-
public function ajax_item_reports() {
|
39 |
-
if ( ! isset( $_POST['gadwp_security_frontend_item_reports'] ) || ! wp_verify_nonce( $_POST['gadwp_security_frontend_item_reports'], 'gadwp_frontend_item_reports' ) ) {
|
40 |
-
wp_die( - 30 );
|
41 |
-
}
|
42 |
-
|
43 |
-
$from = $_POST['from'];
|
44 |
-
$to = $_POST['to'];
|
45 |
-
$query = $_POST['query'];
|
46 |
-
$uri = $_POST['filter'];
|
47 |
-
if ( isset( $_POST['metric'] ) ) {
|
48 |
-
$metric = $_POST['metric'];
|
49 |
-
} else {
|
50 |
-
$metric = 'pageviews';
|
51 |
-
}
|
52 |
-
|
53 |
-
$query = $_POST['query'];
|
54 |
-
if ( ob_get_length() ) {
|
55 |
-
ob_clean();
|
56 |
-
}
|
57 |
-
|
58 |
-
if ( ! GADWP_Tools::check_roles( $this->gadwp->config->options['access_front'] ) || 0 == $this->gadwp->config->options['frontend_item_reports'] ) {
|
59 |
-
wp_die( - 31 );
|
60 |
-
}
|
61 |
-
|
62 |
-
if ( $this->gadwp->config->options['token'] && $this->gadwp->config->options['tableid_jail'] ) {
|
63 |
-
if ( null === $this->gadwp->gapi_controller ) {
|
64 |
-
$this->gadwp->gapi_controller = new GADWP_GAPI_Controller();
|
65 |
-
}
|
66 |
-
} else {
|
67 |
-
wp_die( - 24 );
|
68 |
-
}
|
69 |
-
|
70 |
-
if ( $this->gadwp->config->options['tableid_jail'] ) {
|
71 |
-
$projectId = $this->gadwp->config->options['tableid_jail'];
|
72 |
-
} else {
|
73 |
-
wp_die( - 26 );
|
74 |
-
}
|
75 |
-
|
76 |
-
$profile_info = GADWP_Tools::get_selected_profile( $this->gadwp->config->options['ga_profiles_list'], $projectId );
|
77 |
-
|
78 |
-
if ( isset( $profile_info[4] ) ) {
|
79 |
-
$this->gadwp->gapi_controller->timeshift = $profile_info[4];
|
80 |
-
} else {
|
81 |
-
$this->gadwp->gapi_controller->timeshift = (int) current_time( 'timestamp' ) - time();
|
82 |
-
}
|
83 |
-
|
84 |
-
$uri = '/' . ltrim( $uri, '/' );
|
85 |
-
|
86 |
-
// allow URL correction before sending an API request
|
87 |
-
$filter = apply_filters( 'gadwp_frontenditem_uri', $uri );
|
88 |
-
|
89 |
-
$lastchar = substr( $filter, - 1 );
|
90 |
-
|
91 |
-
if ( isset( $profile_info[6] ) && $profile_info[6] && '/' == $lastchar ) {
|
92 |
-
$filter = $filter . $profile_info[6];
|
93 |
-
}
|
94 |
-
|
95 |
-
// Encode URL
|
96 |
-
$filter = rawurlencode( rawurldecode( $filter ) );
|
97 |
-
|
98 |
-
$queries = explode( ',', $query );
|
99 |
-
|
100 |
-
$results = array();
|
101 |
-
|
102 |
-
foreach ( $queries as $value ) {
|
103 |
-
$results[] = $this->gadwp->gapi_controller->get( $projectId, $value, $from, $to, $filter, $metric );
|
104 |
-
}
|
105 |
-
|
106 |
-
wp_send_json( $results );
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Ajax handler for getting analytics data for frontend Widget
|
111 |
-
*
|
112 |
-
* @return string|int
|
113 |
-
*/
|
114 |
-
public function ajax_frontend_widget() {
|
115 |
-
if ( ! isset( $_POST['gadwp_number'] ) || ! isset( $_POST['gadwp_optionname'] ) || ! is_active_widget( false, false, 'gadwp-frontwidget-report' ) ) {
|
116 |
-
wp_die( - 30 );
|
117 |
-
}
|
118 |
-
$widget_index = $_POST['gadwp_number'];
|
119 |
-
$option_name = $_POST['gadwp_optionname'];
|
120 |
-
$options = get_option( $option_name );
|
121 |
-
if ( isset( $options[$widget_index] ) ) {
|
122 |
-
$instance = $options[$widget_index];
|
123 |
-
} else {
|
124 |
-
wp_die( - 32 );
|
125 |
-
}
|
126 |
-
switch ( $instance['period'] ) { // make sure we have a valid request
|
127 |
-
case '7daysAgo' :
|
128 |
-
$period = '7daysAgo';
|
129 |
-
break;
|
130 |
-
case '14daysAgo' :
|
131 |
-
$period = '14daysAgo';
|
132 |
-
break;
|
133 |
-
default :
|
134 |
-
$period = '30daysAgo';
|
135 |
-
break;
|
136 |
-
}
|
137 |
-
if ( ob_get_length() ) {
|
138 |
-
ob_clean();
|
139 |
-
}
|
140 |
-
if ( $this->gadwp->config->options['token'] && $this->gadwp->config->options['tableid_jail'] ) {
|
141 |
-
if ( null === $this->gadwp->gapi_controller ) {
|
142 |
-
$this->gadwp->gapi_controller = new GADWP_GAPI_Controller();
|
143 |
-
}
|
144 |
-
} else {
|
145 |
-
wp_die( - 24 );
|
146 |
-
}
|
147 |
-
$projectId = $this->gadwp->config->options['tableid_jail'];
|
148 |
-
$profile_info = GADWP_Tools::get_selected_profile( $this->gadwp->config->options['ga_profiles_list'], $projectId );
|
149 |
-
if ( isset( $profile_info[4] ) ) {
|
150 |
-
$this->gadwp->gapi_controller->timeshift = $profile_info[4];
|
151 |
-
} else {
|
152 |
-
$this->gadwp->gapi_controller->timeshift = (int) current_time( 'timestamp' ) - time();
|
153 |
-
}
|
154 |
-
wp_send_json( $this->gadwp->gapi_controller->frontend_widget_stats( $projectId, $period, (int) $instance['anonim'] ) );
|
155 |
-
}
|
156 |
-
}
|
157 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/css/item-reports.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.column-gadwp_stats{width:70px}.gadwp-icon{color:#555}.gadwp-icon:hover{color:#2ea2cc}.gadwp-icon-oldwp{padding-top:5px}[id^=gadwp-container-]{width:480px}[id^=gadwp-areachart-]{height:280px}[id^=gadwp-progressbar-]{width:100%;height:3px;margin:5px 0 0 0}[id^=gadwp-bottomstats-]{width:100%}[id^=gadwp-bottomstats-] .inside{display:table;margin:0 auto;padding:0}[id^=gadwp-bottomstats-] .inside .small-box{width:31.2%;float:left;margin:10px 5px 10px 5px;background:#fff;text-align:center;-moz-box-shadow:0 0 7px 0 #BBB;-webkit-box-shadow:0 0 7px 0 #BBB;box-shadow:0 0 7px 0 #BBB}[id^=gadwp-bottomstats-] .inside .small-box h3{font-family:'Open Sans',sans-serif;font-size:1em;color:#777;padding:0 5px 0 5px;margin:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}[id^=gadwp-bottomstats-] .inside .small-box p{font-size:1.2em;margin:0 0 2px 0}.gadwp-floatwraper{display:table;width:100%;height:100%}[id^=gadwp-piechart-].halfsize{width:47%;margin:10px 0 0 0;height:200px;float:left}[id^=gadwp-piechart-].floatleft{float:left}[id^=gadwp-piechart-].floatright{float:right}[id^=gadwp-tablechart-],[id^=gadwp-tablechart-]{margin:10px 0 0 0}.ui-dialog.gadwp{font-family:'Open Sans',sans-serif;font-size:13px;-webkit-box-sizing:initial;-moz-box-sizing:initial}.ui-dialog.gadwp select{font-family:'Open Sans',sans-serif;border:1px solid #ddd;font-size:14px;background:#fff;padding:2px;color:#333;width:auto}.ui-dialog.gadwp table{margin:auto;width:auto}.gadwp .ui-dialog-titlebar{font-size:1.1em;text-overflow:ellipsis;overflow:hidden}@media screen and (max-width:500px){[id^=gadwp-container-]{width:410px}[id^=gadwp-bottomstats-] .inside .small-box{width:30.8%}}@media screen and (max-width:410px){[id^=gadwp-container-]{width:260px}[id^=gadwp-bottomstats-] .inside .small-box{width:46%}}#wpadminbar #wp-admin-bar-gadwp-1>.ab-item:before{content:'\f239';top:2px}.no-font-face #wpadminbar #wp-admin-bar-gadwp-1>.ab-item{text-indent:0}@media screen and (max-width:782px){#wpadminbar #wp-admin-bar-gadwp-1>.ab-item{text-indent:100%;white-space:nowrap;overflow:hidden;width:52px;padding:0;color:#999;position:relative}#wpadminbar #wp-admin-bar-gadwp-1>.ab-item:before{display:block;text-indent:0;font:normal 32px/1 'dashicons';speak:none;top:7px;width:52px;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#wpadminbar li#wp-admin-bar-gadwp-1{display:block}#wpadminbar #wp-admin-bar-gadwp-1{position:static}}
|
|
front/css/widgets.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
#gadwp{font-family:'Open Sans',sans-serif}#gadwp-searches td{line-height:1.5em;padding:2px;font-size:1em}#gadwp-searches{line-height:10px;margin-top:15px}#gadwp-visits{height:200px;margin-top:15px}#gadwp-content{width:100%}#gadwp-title{text-transform:uppercase;font-weight:600;font-size:14px;padding-bottom:2px}#gadwp-widget{padding:0 5px}#gadwp-widgetchart{width:100%}#gadwp-widgettotals{margin:0 0 10px 0;width:100%;display:table;clear:both}#gadwp-widgettotals .gadwp-left{padding:10px 0 0 0;width:45%;float:left;font-weight:600}#gadwp-progressbar{width:100%;height:3px;margin:3px 0}#gadwp-widgettotals .gadwp-right{padding:10px 0 0 0;float:left;font-style:italic}.widget_gadwp-frontwidget-report h2.widget-title{margin-bottom:0}
|
|
front/item-reports.php
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Frontend_Item_Reports' ) ) {
|
15 |
-
|
16 |
-
final class GADWP_Frontend_Item_Reports {
|
17 |
-
|
18 |
-
private $gadwp;
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
$this->gadwp = GADWP();
|
22 |
-
|
23 |
-
add_action( 'admin_bar_menu', array( $this, 'custom_adminbar_node' ), 999 );
|
24 |
-
}
|
25 |
-
|
26 |
-
function custom_adminbar_node( $wp_admin_bar ) {
|
27 |
-
if ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_front'] ) && $this->gadwp->config->options['frontend_item_reports'] ) {
|
28 |
-
/* @formatter:off */
|
29 |
-
$args = array( 'id' => 'gadwp-1',
|
30 |
-
'title' => '<span class="ab-icon"></span><span class="">' . __( "Analytics", 'google-analytics-dashboard-for-wp' ) . '</span>',
|
31 |
-
'href' => '#1',
|
32 |
-
);
|
33 |
-
/* @formatter:on */
|
34 |
-
$wp_admin_bar->add_node( $args );
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/js/tracking-analytics-events.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
"use strict";var gadwpRedirectLink,gadwpRedirectCalled=!1,gadwpDefaultPrevented=!1;function gadwpRedirect(){gadwpRedirectCalled||(gadwpRedirectCalled=!0,0==gadwpDefaultPrevented?document.location.href=gadwpRedirectLink:gadwpDefaultPrevented=!1)}function gadwp_send_event(t,e,a,n){if(gadwpUAEventsData.options.ga_with_gtag){if("undefined"==typeof gtag)return;n?gadwpUAEventsData.options.event_bouncerate?gtag("event",e,{event_category:t,event_label:a,non_interaction:1,event_callback:gadwpRedirect}):gtag("event",e,{event_category:t,event_label:a,event_callback:gadwpRedirect}):gadwpUAEventsData.options.event_bouncerate?gtag("event",e,{event_category:t,event_label:a,non_interaction:1}):gtag("event",e,{event_category:t,event_label:a})}else{if("undefined"==typeof ga)return;n?gadwpUAEventsData.options.event_bouncerate?ga("send","event",t,e,a,{nonInteraction:1,hitCallback:gadwpRedirect}):ga("send","event",t,e,a,{hitCallback:gadwpRedirect}):gadwpUAEventsData.options.event_bouncerate?ga("send","event",t,e,a,{nonInteraction:1}):ga("send","event",t,e,a)}}jQuery(window).on("load",function(){gadwpUAEventsData.options.event_tracking&&(jQuery("a").filter(function(){if("string"==typeof this.href){var t=new RegExp(".*\\.("+gadwpUAEventsData.options.event_downloads+")(\\?.*)?$");return this.href.match(t)}}).click(function(t){gadwp_send_event(this.getAttribute("data-vars-ga-category")||"download",this.getAttribute("data-vars-ga-action")||"click",this.getAttribute("data-vars-ga-label")||this.href,!1)}),jQuery('a[href^="mailto"]').click(function(t){gadwp_send_event(this.getAttribute("data-vars-ga-category")||"email",this.getAttribute("data-vars-ga-action")||"send",this.getAttribute("data-vars-ga-label")||this.href,!1)}),jQuery('a[href^="tel"]').click(function(t){gadwp_send_event(this.getAttribute("data-vars-ga-category")||"telephone",this.getAttribute("data-vars-ga-action")||"call",this.getAttribute("data-vars-ga-label")||this.href,!1)}),gadwpUAEventsData.options.root_domain&&jQuery('a[href^="http"]').filter(function(){if("string"==typeof this.href)var t=new RegExp(".*\\.("+gadwpUAEventsData.options.event_downloads+")(\\?.*)?$");if(t&&!this.href.match(t)&&-1==this.href.indexOf(gadwpUAEventsData.options.root_domain)&&-1<this.href.indexOf("://"))return this.href}).click(function(t){gadwpRedirectCalled=!1,gadwpRedirectLink=this.href;var e=this.getAttribute("data-vars-ga-category")||"outbound",a=this.getAttribute("data-vars-ga-action")||"click",n=this.getAttribute("data-vars-ga-label")||this.href;if("_blank"!=this.target&&gadwpUAEventsData.options.event_precision?t.isDefaultPrevented()&&(gadwpRedirectCalled=!(gadwpDefaultPrevented=!0)):gadwpDefaultPrevented=!(gadwpRedirectCalled=!0),"_blank"!=this.target&&gadwpUAEventsData.options.event_precision)return gadwp_send_event(e,a,n,!0),setTimeout(gadwpRedirect,gadwpUAEventsData.options.event_timeout),!1;gadwp_send_event(e,a,n,!1)})),gadwpUAEventsData.options.event_affiliates&&gadwpUAEventsData.options.aff_tracking&&jQuery("a").filter(function(){if(""!=gadwpUAEventsData.options.event_affiliates&&"string"==typeof this.href){var t=new RegExp("("+gadwpUAEventsData.options.event_affiliates.replace(/\//g,"/")+")");return this.href.match(t)}}).click(function(t){gadwpRedirectCalled=!1,gadwpRedirectLink=this.href;var e=this.getAttribute("data-vars-ga-category")||"affiliates",a=this.getAttribute("data-vars-ga-action")||"click",n=this.getAttribute("data-vars-ga-label")||this.href;if("_blank"!=this.target&&gadwpUAEventsData.options.event_precision?t.isDefaultPrevented()&&(gadwpRedirectCalled=!(gadwpDefaultPrevented=!0)):gadwpDefaultPrevented=!(gadwpRedirectCalled=!0),"_blank"!=this.target&&gadwpUAEventsData.options.event_precision)return gadwp_send_event(e,a,n,!0),setTimeout(gadwpRedirect,gadwpUAEventsData.options.event_timeout),!1;gadwp_send_event(e,a,n,!1)}),gadwpUAEventsData.options.root_domain&&gadwpUAEventsData.options.hash_tracking&&jQuery("a").filter(function(){if(-1!=this.href.indexOf(gadwpUAEventsData.options.root_domain)||-1==this.href.indexOf("://"))return this.hash}).click(function(t){gadwp_send_event(this.getAttribute("data-vars-ga-category")||"hashmark",this.getAttribute("data-vars-ga-action")||"click",this.getAttribute("data-vars-ga-label")||this.href,!1)}),gadwpUAEventsData.options.event_formsubmit&&jQuery('input[type="submit"], button[type="submit"]').click(function(t){var e=this;gadwp_send_event(e.getAttribute("data-vars-ga-category")||"form",e.getAttribute("data-vars-ga-action")||"submit",e.getAttribute("data-vars-ga-label")||e.name||e.value,!1)}),gadwpUAEventsData.options.ga_pagescrolldepth_tracking&&jQuery.scrollDepth({percentage:!0,userTiming:!1,pixelDepth:!1,gtmOverride:!0,nonInteraction:!0})});
|
|
front/js/tracking-scrolldepth.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{if(typeof module==="object"&&module.exports){module.exports=a(require("jquery"))}else{a(jQuery)}}}(function(g){var f={minHeight:0,elements:[],percentage:true,userTiming:true,pixelDepth:true,nonInteraction:true,gaGlobal:false,gtmOverride:false,trackerName:false,dataLayer:"dataLayer"};var b=g(window),a=[],h=false,d=0,c,j,e,k,i;g.scrollDepth=function(u){var m=+new Date;u=g.extend({},f,u);if(g(document).height()<u.minHeight){return}if(u.gaGlobal){c=true;e=u.gaGlobal}else{if(typeof gtag==="function"){k=true;e="gtag"}else{if(typeof ga==="function"){c=true;e="ga"}else{if(typeof __gaTracker==="function"){c=true;e="__gaTracker"}}}}if(typeof _gaq!=="undefined"&&typeof _gaq.push==="function"){j=true}if(typeof u.eventHandler==="function"){i=u.eventHandler}else{if(typeof window[u.dataLayer]!=="undefined"&&typeof window[u.dataLayer].push==="function"&&!u.gtmOverride){i=function(v){window[u.dataLayer].push(v)}}}function s(y,w,v,x){var z=u.trackerName?(u.trackerName+".send"):"send";if(i){i({event:"ScrollDistance",eventCategory:"Scroll Depth",eventAction:y,eventLabel:w,eventValue:1,eventNonInteraction:u.nonInteraction});if(u.pixelDepth&&arguments.length>2&&v>d){d=v;i({event:"ScrollDistance",eventCategory:"Scroll Depth",eventAction:"Pixel Depth",eventLabel:n(v),eventValue:1,eventNonInteraction:u.nonInteraction})}if(u.userTiming&&arguments.length>3){i({event:"ScrollTiming",eventCategory:"Scroll Depth",eventAction:y,eventLabel:w,eventTiming:x})}}else{if(k){window[e]("event",y,{event_category:"Scroll Depth",event_label:w,non_interaction:u.nonInteraction})}if(c){window[e](z,"event","Scroll Depth",y,w,1,{nonInteraction:u.nonInteraction});if(u.pixelDepth&&arguments.length>2&&v>d){d=v;window[e](z,"event","Scroll Depth","Pixel Depth",n(v),1,{nonInteraction:u.nonInteraction})}if(u.userTiming&&arguments.length>3){window[e](z,"timing","Scroll Depth",y,x,w)}}if(j){_gaq.push(["_trackEvent","Scroll Depth",y,w,1,u.nonInteraction]);if(u.pixelDepth&&arguments.length>2&&v>d){d=v;_gaq.push(["_trackEvent","Scroll Depth","Pixel Depth",n(v),1,u.nonInteraction])}if(u.userTiming&&arguments.length>3){_gaq.push(["_trackTiming","Scroll Depth",y,x,w,100])}}}}function r(v){return{"25%":parseInt(v*0.25,10),"50%":parseInt(v*0.5,10),"75%":parseInt(v*0.75,10),"100%":v-5}}function p(w,v,x){g.each(w,function(y,z){if(g.inArray(y,a)===-1&&v>=z){s("Percentage",y,v,x);a.push(y)}})}function o(x,v,w){g.each(x,function(y,z){if(g.inArray(z,a)===-1&&g(z).length){if(v>=g(z).offset().top){s("Elements",z,v,w);a.push(z)}}})}function n(v){return(Math.floor(v/250)*250).toString()}function t(){l()}g.scrollDepth.reset=function(){a=[];d=0;b.off("scroll.scrollDepth");l()};g.scrollDepth.addElements=function(v){if(typeof v=="undefined"||!g.isArray(v)){return}g.merge(u.elements,v);if(!h){l()}};g.scrollDepth.removeElements=function(v){if(typeof v=="undefined"||!g.isArray(v)){return}g.each(v,function(x,z){var w=g.inArray(z,u.elements);var y=g.inArray(z,a);if(w!=-1){u.elements.splice(w,1)}if(y!=-1){a.splice(y,1)}})};function q(A,C){var y,x,v;var B=null;var z=0;var w=function(){z=new Date;B=null;v=A.apply(y,x)};return function(){var D=new Date;if(!z){z=D}var E=C-(D-z);y=this;x=arguments;if(E<=0){clearTimeout(B);B=null;z=D;v=A.apply(y,x)}else{if(!B){B=setTimeout(w,E)}}return v}}function l(){h=true;b.on("scroll.scrollDepth",q(function(){var x=g(document).height(),w=window.innerHeight?window.innerHeight:b.height(),v=b.scrollTop()+w,y=r(x),z=+new Date-m;if(a.length>=u.elements.length+(u.percentage?4:0)){b.off("scroll.scrollDepth");h=false;return}if(u.elements){o(u.elements,v,z)}if(u.percentage){p(y,v,z)}},500))}t()};return g.scrollDepth}));
|
|
front/js/widgets.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
jQuery(window).resize(function(){if(typeof gadwp_drawFrontWidgetChart=="function"&&typeof gadwpFrontWidgetData!=="undefined"&&!jQuery.isNumeric(gadwpFrontWidgetData)){gadwp_drawFrontWidgetChart(gadwpFrontWidgetData)}});
|
|
front/setup.php
DELETED
@@ -1,133 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Frontend_Setup' ) ) {
|
15 |
-
|
16 |
-
final class GADWP_Frontend_Setup {
|
17 |
-
|
18 |
-
private $gadwp;
|
19 |
-
|
20 |
-
public function __construct() {
|
21 |
-
$this->gadwp = GADWP();
|
22 |
-
|
23 |
-
// Styles & Scripts
|
24 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'load_styles_scripts' ) );
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Styles & Scripts conditional loading
|
29 |
-
*
|
30 |
-
* @param
|
31 |
-
* $hook
|
32 |
-
*/
|
33 |
-
public function load_styles_scripts() {
|
34 |
-
$lang = get_bloginfo( 'language' );
|
35 |
-
$lang = explode( '-', $lang );
|
36 |
-
$lang = $lang[0];
|
37 |
-
|
38 |
-
/*
|
39 |
-
* Item reports Styles & Scripts
|
40 |
-
*/
|
41 |
-
if ( GADWP_Tools::check_roles( $this->gadwp->config->options['access_front'] ) && $this->gadwp->config->options['frontend_item_reports'] ) {
|
42 |
-
|
43 |
-
wp_enqueue_style( 'gadwp-nprogress', GADWP_URL . 'common/nprogress/nprogress.css', null, GADWP_CURRENT_VERSION );
|
44 |
-
|
45 |
-
wp_enqueue_style( 'gadwp-frontend-item-reports', GADWP_URL . 'front/css/item-reports.css', null, GADWP_CURRENT_VERSION );
|
46 |
-
|
47 |
-
$country_codes = GADWP_Tools::get_countrycodes();
|
48 |
-
if ( $this->gadwp->config->options['ga_target_geomap'] && isset( $country_codes[$this->gadwp->config->options['ga_target_geomap']] ) ) {
|
49 |
-
$region = $this->gadwp->config->options['ga_target_geomap'];
|
50 |
-
} else {
|
51 |
-
$region = false;
|
52 |
-
}
|
53 |
-
|
54 |
-
wp_enqueue_style( "wp-jquery-ui-dialog" );
|
55 |
-
|
56 |
-
wp_register_script( 'googlecharts', 'https://www.gstatic.com/charts/loader.js', array(), null );
|
57 |
-
|
58 |
-
wp_enqueue_script( 'gadwp-nprogress', GADWP_URL . 'common/nprogress/nprogress.js', array( 'jquery' ), GADWP_CURRENT_VERSION );
|
59 |
-
|
60 |
-
wp_enqueue_script( 'gadwp-frontend-item-reports', GADWP_URL . 'common/js/reports5.js', array( 'gadwp-nprogress', 'googlecharts', 'jquery', 'jquery-ui-dialog' ), GADWP_CURRENT_VERSION, true );
|
61 |
-
|
62 |
-
/* @formatter:off */
|
63 |
-
wp_localize_script( 'gadwp-frontend-item-reports', 'gadwpItemData', array(
|
64 |
-
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
65 |
-
'security' => wp_create_nonce( 'gadwp_frontend_item_reports' ),
|
66 |
-
'dateList' => array(
|
67 |
-
'today' => __( "Today", 'google-analytics-dashboard-for-wp' ),
|
68 |
-
'yesterday' => __( "Yesterday", 'google-analytics-dashboard-for-wp' ),
|
69 |
-
'7daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 7 ),
|
70 |
-
'14daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 14 ),
|
71 |
-
'30daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 30 ),
|
72 |
-
'90daysAgo' => sprintf( __( "Last %d Days", 'google-analytics-dashboard-for-wp' ), 90 ),
|
73 |
-
'365daysAgo' => sprintf( _n( "%s Year", "%s Years", 1, 'google-analytics-dashboard-for-wp' ), __('One', 'google-analytics-dashboard-for-wp') ),
|
74 |
-
'1095daysAgo' => sprintf( _n( "%s Year", "%s Years", 3, 'google-analytics-dashboard-for-wp' ), __('Three', 'google-analytics-dashboard-for-wp') ),
|
75 |
-
),
|
76 |
-
'reportList' => array(
|
77 |
-
'uniquePageviews' => __( "Unique Views", 'google-analytics-dashboard-for-wp' ),
|
78 |
-
'users' => __( "Users", 'google-analytics-dashboard-for-wp' ),
|
79 |
-
'organicSearches' => __( "Organic", 'google-analytics-dashboard-for-wp' ),
|
80 |
-
'pageviews' => __( "Page Views", 'google-analytics-dashboard-for-wp' ),
|
81 |
-
'visitBounceRate' => __( "Bounce Rate", 'google-analytics-dashboard-for-wp' ),
|
82 |
-
'locations' => __( "Location", 'google-analytics-dashboard-for-wp' ),
|
83 |
-
'referrers' => __( "Referrers", 'google-analytics-dashboard-for-wp' ),
|
84 |
-
'searches' => __( "Searches", 'google-analytics-dashboard-for-wp' ),
|
85 |
-
'trafficdetails' => __( "Traffic", 'google-analytics-dashboard-for-wp' ),
|
86 |
-
'technologydetails' => __( "Technology", 'google-analytics-dashboard-for-wp' ),
|
87 |
-
),
|
88 |
-
'i18n' => array(
|
89 |
-
__( "A JavaScript Error is blocking plugin resources!", 'google-analytics-dashboard-for-wp' ), //0
|
90 |
-
__( "Traffic Mediums", 'google-analytics-dashboard-for-wp' ),
|
91 |
-
__( "Visitor Type", 'google-analytics-dashboard-for-wp' ),
|
92 |
-
__( "Search Engines", 'google-analytics-dashboard-for-wp' ),
|
93 |
-
__( "Social Networks", 'google-analytics-dashboard-for-wp' ),
|
94 |
-
__( "Unique Views", 'google-analytics-dashboard-for-wp' ),
|
95 |
-
__( "Users", 'google-analytics-dashboard-for-wp' ),
|
96 |
-
__( "Page Views", 'google-analytics-dashboard-for-wp' ),
|
97 |
-
__( "Bounce Rate", 'google-analytics-dashboard-for-wp' ),
|
98 |
-
__( "Organic Search", 'google-analytics-dashboard-for-wp' ),
|
99 |
-
__( "Pages/Session", 'google-analytics-dashboard-for-wp' ),
|
100 |
-
__( "Invalid response", 'google-analytics-dashboard-for-wp' ),
|
101 |
-
__( "No Data", 'google-analytics-dashboard-for-wp' ),
|
102 |
-
__( "This report is unavailable", 'google-analytics-dashboard-for-wp' ),
|
103 |
-
__( "report generated by", 'google-analytics-dashboard-for-wp' ), //14
|
104 |
-
__( "This plugin needs an authorization:", 'google-analytics-dashboard-for-wp' ) . ' <strong>' . __( "authorize the plugin", 'google-analytics-dashboard-for-wp' ) . '</strong>!',
|
105 |
-
__( "Browser", 'google-analytics-dashboard-for-wp' ), //16
|
106 |
-
__( "Operating System", 'google-analytics-dashboard-for-wp' ),
|
107 |
-
__( "Screen Resolution", 'google-analytics-dashboard-for-wp' ),
|
108 |
-
__( "Mobile Brand", 'google-analytics-dashboard-for-wp' ),
|
109 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ),
|
110 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ),
|
111 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ),
|
112 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ),
|
113 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ),
|
114 |
-
__( "Future Use", 'google-analytics-dashboard-for-wp' ), //25
|
115 |
-
__( "Time on Page", 'google-analytics-dashboard-for-wp' ),
|
116 |
-
__( "Page Load Time", 'google-analytics-dashboard-for-wp' ),
|
117 |
-
__( "Exit Rate", 'google-analytics-dashboard-for-wp' ),
|
118 |
-
__( "Precision: ", 'google-analytics-dashboard-for-wp' ), //29
|
119 |
-
),
|
120 |
-
'colorVariations' => GADWP_Tools::variations( $this->gadwp->config->options['theme_color'] ),
|
121 |
-
'region' => $region,
|
122 |
-
'mapsApiKey' => apply_filters( 'gadwp_maps_api_key', $this->gadwp->config->options['maps_api_key'] ),
|
123 |
-
'language' => get_bloginfo( 'language' ),
|
124 |
-
'filter' => $_SERVER["REQUEST_URI"],
|
125 |
-
'viewList' => false,
|
126 |
-
'scope' => 'front-item',
|
127 |
-
)
|
128 |
-
);
|
129 |
-
/* @formatter:on */
|
130 |
-
}
|
131 |
-
}
|
132 |
-
}
|
133 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/tracking-analytics.php
DELETED
@@ -1,775 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Tracking_Analytics_Base' ) ) {
|
15 |
-
|
16 |
-
class GADWP_Tracking_Analytics_Base {
|
17 |
-
|
18 |
-
protected $gadwp;
|
19 |
-
|
20 |
-
protected $uaid;
|
21 |
-
|
22 |
-
public function __construct() {
|
23 |
-
$this->gadwp = GADWP();
|
24 |
-
|
25 |
-
$profile = GADWP_Tools::get_selected_profile( $this->gadwp->config->options['ga_profiles_list'], $this->gadwp->config->options['tableid_jail'] );
|
26 |
-
|
27 |
-
$this->uaid = esc_html( $profile[2] );
|
28 |
-
}
|
29 |
-
|
30 |
-
protected function build_custom_dimensions() {
|
31 |
-
$custom_dimensions = array();
|
32 |
-
|
33 |
-
if ( $this->gadwp->config->options['ga_author_dimindex'] && ( is_single() || is_page() ) ) {
|
34 |
-
global $post;
|
35 |
-
$author_id = $post->post_author;
|
36 |
-
$author_name = get_the_author_meta( 'display_name', $author_id );
|
37 |
-
$index = (int) $this->gadwp->config->options['ga_author_dimindex'];
|
38 |
-
$custom_dimensions[$index] = esc_attr( $author_name );
|
39 |
-
}
|
40 |
-
|
41 |
-
if ( $this->gadwp->config->options['ga_pubyear_dimindex'] && is_single() ) {
|
42 |
-
global $post;
|
43 |
-
$date = get_the_date( 'Y', $post->ID );
|
44 |
-
$index = (int) $this->gadwp->config->options['ga_pubyear_dimindex'];
|
45 |
-
$custom_dimensions[$index] = (int) $date;
|
46 |
-
}
|
47 |
-
|
48 |
-
if ( $this->gadwp->config->options['ga_pubyearmonth_dimindex'] && is_single() ) {
|
49 |
-
global $post;
|
50 |
-
$date = get_the_date( 'Y-m', $post->ID );
|
51 |
-
$index = (int) $this->gadwp->config->options['ga_pubyearmonth_dimindex'];
|
52 |
-
$custom_dimensions[$index] = esc_attr( $date );
|
53 |
-
}
|
54 |
-
|
55 |
-
if ( $this->gadwp->config->options['ga_category_dimindex'] && is_category() ) {
|
56 |
-
$fields = array();
|
57 |
-
$index = (int) $this->gadwp->config->options['ga_category_dimindex'];
|
58 |
-
$custom_dimensions[$index] = esc_attr( single_tag_title( '', false ) );
|
59 |
-
}
|
60 |
-
|
61 |
-
if ( $this->gadwp->config->options['ga_category_dimindex'] && is_single() ) {
|
62 |
-
global $post;
|
63 |
-
$categories = get_the_category( $post->ID );
|
64 |
-
foreach ( $categories as $category ) {
|
65 |
-
$index = (int) $this->gadwp->config->options['ga_category_dimindex'];
|
66 |
-
$custom_dimensions[$index] = esc_attr( $category->name );
|
67 |
-
break;
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
if ( $this->gadwp->config->options['ga_tag_dimindex'] && is_single() ) {
|
72 |
-
global $post;
|
73 |
-
$fields = array();
|
74 |
-
$post_tags_list = '';
|
75 |
-
$post_tags_array = get_the_tags( $post->ID );
|
76 |
-
if ( $post_tags_array ) {
|
77 |
-
foreach ( $post_tags_array as $tag ) {
|
78 |
-
$post_tags_list .= $tag->name . ', ';
|
79 |
-
}
|
80 |
-
}
|
81 |
-
$post_tags_list = rtrim( $post_tags_list, ', ' );
|
82 |
-
if ( $post_tags_list ) {
|
83 |
-
$index = (int) $this->gadwp->config->options['ga_tag_dimindex'];
|
84 |
-
$custom_dimensions[$index] = esc_attr( $post_tags_list );
|
85 |
-
}
|
86 |
-
}
|
87 |
-
|
88 |
-
if ( $this->gadwp->config->options['ga_user_dimindex'] ) {
|
89 |
-
$fields = array();
|
90 |
-
$index = (int) $this->gadwp->config->options['ga_user_dimindex'];
|
91 |
-
$custom_dimensions[$index] = is_user_logged_in() ? 'registered' : 'guest';
|
92 |
-
}
|
93 |
-
|
94 |
-
return $custom_dimensions;
|
95 |
-
}
|
96 |
-
|
97 |
-
protected function is_event_tracking( $opt, $with_pagescrolldepth = true ) {
|
98 |
-
if ( $this->gadwp->config->options['ga_event_tracking'] || $this->gadwp->config->options['ga_aff_tracking'] || $this->gadwp->config->options['ga_hash_tracking'] || $this->gadwp->config->options['ga_formsubmit_tracking'] ) {
|
99 |
-
return true;
|
100 |
-
}
|
101 |
-
|
102 |
-
if ( $this->gadwp->config->options['ga_pagescrolldepth_tracking'] && $with_pagescrolldepth ) {
|
103 |
-
return true;
|
104 |
-
}
|
105 |
-
return false;
|
106 |
-
}
|
107 |
-
}
|
108 |
-
}
|
109 |
-
|
110 |
-
if ( ! class_exists( 'GADWP_Tracking_Analytics_Common' ) ) {
|
111 |
-
|
112 |
-
class GADWP_Tracking_Analytics_Common extends GADWP_Tracking_Analytics_Base {
|
113 |
-
|
114 |
-
protected $commands;
|
115 |
-
|
116 |
-
public function __construct() {
|
117 |
-
parent::__construct();
|
118 |
-
|
119 |
-
$this->load_scripts();
|
120 |
-
|
121 |
-
if ( $this->gadwp->config->options['optimize_tracking'] && $this->gadwp->config->options['optimize_pagehiding'] && $this->gadwp->config->options['optimize_containerid'] ) {
|
122 |
-
add_action( 'wp_head', array( $this, 'optimize_output' ), 99 );
|
123 |
-
}
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Styles & Scripts load
|
128 |
-
*/
|
129 |
-
private function load_scripts() {
|
130 |
-
if ( $this->is_event_tracking( true ) ) {
|
131 |
-
|
132 |
-
$root_domain = GADWP_Tools::get_root_domain();
|
133 |
-
|
134 |
-
wp_enqueue_script( 'gadwp-tracking-analytics-events', GADWP_URL . 'front/js/tracking-analytics-events.js', array( 'jquery' ), GADWP_CURRENT_VERSION, $this->gadwp->config->options['trackingevents_infooter'] );
|
135 |
-
|
136 |
-
if ( $this->gadwp->config->options['ga_pagescrolldepth_tracking'] ) {
|
137 |
-
wp_enqueue_script( 'gadwp-pagescrolldepth-tracking', GADWP_URL . 'front/js/tracking-scrolldepth.js', array( 'jquery' ), GADWP_CURRENT_VERSION, $this->gadwp->config->options['trackingevents_infooter'] );
|
138 |
-
}
|
139 |
-
|
140 |
-
/* @formatter:off */
|
141 |
-
wp_localize_script( 'gadwp-tracking-analytics-events', 'gadwpUAEventsData', array(
|
142 |
-
'options' => array(
|
143 |
-
'event_tracking' => $this->gadwp->config->options['ga_event_tracking'],
|
144 |
-
'event_downloads' => esc_js($this->gadwp->config->options['ga_event_downloads']),
|
145 |
-
'event_bouncerate' => $this->gadwp->config->options['ga_event_bouncerate'],
|
146 |
-
'aff_tracking' => $this->gadwp->config->options['ga_aff_tracking'],
|
147 |
-
'event_affiliates' => esc_js($this->gadwp->config->options['ga_event_affiliates']),
|
148 |
-
'hash_tracking' => $this->gadwp->config->options ['ga_hash_tracking'],
|
149 |
-
'root_domain' => $root_domain,
|
150 |
-
'event_timeout' => apply_filters( 'gadwp_analyticsevents_timeout', 100 ),
|
151 |
-
'event_precision' => $this->gadwp->config->options['ga_event_precision'],
|
152 |
-
'event_formsubmit' => $this->gadwp->config->options ['ga_formsubmit_tracking'],
|
153 |
-
'ga_pagescrolldepth_tracking' => $this->gadwp->config->options['ga_pagescrolldepth_tracking'],
|
154 |
-
'ga_with_gtag' => $this->gadwp->config->options ['ga_with_gtag'],
|
155 |
-
),
|
156 |
-
)
|
157 |
-
);
|
158 |
-
/* @formatter:on */
|
159 |
-
}
|
160 |
-
}
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Outputs the Google Optimize tracking code
|
164 |
-
*/
|
165 |
-
public function optimize_output() {
|
166 |
-
GADWP_Tools::load_view( 'front/views/optimize-code.php', array( 'containerid' => $this->gadwp->config->options['optimize_containerid'] ) );
|
167 |
-
}
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Sanitizes the output of commands in the tracking code
|
171 |
-
* @param string $value
|
172 |
-
* @return string
|
173 |
-
*/
|
174 |
-
protected function filter( $value, $is_dim = false ) {
|
175 |
-
if ( 'true' == $value || 'false' == $value || ( is_numeric( $value ) && ! $is_dim ) ) {
|
176 |
-
return $value;
|
177 |
-
}
|
178 |
-
|
179 |
-
if ( substr( $value, 0, 1 ) == '[' && substr( $value, - 1 ) == ']' || substr( $value, 0, 1 ) == '{' && substr( $value, - 1 ) == '}' ) {
|
180 |
-
return $value;
|
181 |
-
}
|
182 |
-
|
183 |
-
return "'" . $value . "'";
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Retrieves the commands
|
188 |
-
*/
|
189 |
-
public function get() {
|
190 |
-
return $this->commands;
|
191 |
-
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Stores the commands
|
195 |
-
* @param array $commands
|
196 |
-
*/
|
197 |
-
public function set( $commands ) {
|
198 |
-
$this->commands = $commands;
|
199 |
-
}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* Formats the command before being added to the commands
|
203 |
-
* @param string $command
|
204 |
-
* @param array $fields
|
205 |
-
* @param string $fieldsobject
|
206 |
-
* @return array
|
207 |
-
*/
|
208 |
-
public function prepare( $command, $fields, $fieldsobject = null ) {
|
209 |
-
return array( 'command' => $command, 'fields' => $fields, 'fieldsobject' => $fieldsobject );
|
210 |
-
}
|
211 |
-
|
212 |
-
/**
|
213 |
-
* Adds a formatted command to commands
|
214 |
-
* @param string $command
|
215 |
-
* @param array $fields
|
216 |
-
* @param string $fieldsobject
|
217 |
-
*/
|
218 |
-
protected function add( $command, $fields, $fieldsobject = null ) {
|
219 |
-
$this->commands[] = $this->prepare( $command, $fields, $fieldsobject );
|
220 |
-
}
|
221 |
-
}
|
222 |
-
}
|
223 |
-
|
224 |
-
if ( ! class_exists( 'GADWP_Tracking_Analytics' ) ) {
|
225 |
-
|
226 |
-
class GADWP_Tracking_Analytics extends GADWP_Tracking_Analytics_Common {
|
227 |
-
|
228 |
-
public function __construct() {
|
229 |
-
parent::__construct();
|
230 |
-
|
231 |
-
if ( $this->gadwp->config->options['trackingcode_infooter'] ) {
|
232 |
-
add_action( 'wp_footer', array( $this, 'output' ), 99 );
|
233 |
-
} else {
|
234 |
-
add_action( 'wp_head', array( $this, 'output' ), 99 );
|
235 |
-
}
|
236 |
-
}
|
237 |
-
|
238 |
-
/**
|
239 |
-
* Builds the commands based on user's options
|
240 |
-
*/
|
241 |
-
private function build_commands() {
|
242 |
-
$fields = array();
|
243 |
-
$fieldsobject = array();
|
244 |
-
$fields['trackingId'] = $this->uaid;
|
245 |
-
if ( 1 != $this->gadwp->config->options['ga_speed_samplerate'] ) {
|
246 |
-
$fieldsobject['siteSpeedSampleRate'] = (int) $this->gadwp->config->options['ga_speed_samplerate'];
|
247 |
-
}
|
248 |
-
if ( 100 != $this->gadwp->config->options['ga_user_samplerate'] ) {
|
249 |
-
$fieldsobject['sampleRate'] = (int) $this->gadwp->config->options['ga_user_samplerate'];
|
250 |
-
}
|
251 |
-
if ( $this->gadwp->config->options['ga_crossdomain_tracking'] && '' != $this->gadwp->config->options['ga_crossdomain_list'] ) {
|
252 |
-
$fieldsobject['allowLinker'] = 'true';
|
253 |
-
}
|
254 |
-
if ( ! empty( $this->gadwp->config->options['ga_cookiedomain'] ) ) {
|
255 |
-
$fieldsobject['cookieDomain'] = $this->gadwp->config->options['ga_cookiedomain'];
|
256 |
-
} else {
|
257 |
-
$fields['cookieDomain'] = 'auto';
|
258 |
-
}
|
259 |
-
if ( ! empty( $this->gadwp->config->options['ga_cookiename'] ) ) {
|
260 |
-
$fieldsobject['cookieName'] = $this->gadwp->config->options['ga_cookiename'];
|
261 |
-
}
|
262 |
-
if ( ! empty( $this->gadwp->config->options['ga_cookieexpires'] ) ) {
|
263 |
-
$fieldsobject['cookieExpires'] = (int) $this->gadwp->config->options['ga_cookieexpires'];
|
264 |
-
}
|
265 |
-
if ( $this->gadwp->config->options['amp_tracking_clientidapi'] ) {
|
266 |
-
$fieldsobject['useAmpClientId'] = 'true';
|
267 |
-
}
|
268 |
-
$this->add( 'create', $fields, $fieldsobject );
|
269 |
-
|
270 |
-
if ( $this->gadwp->config->options['ga_crossdomain_tracking'] && '' != $this->gadwp->config->options['ga_crossdomain_list'] ) {
|
271 |
-
$fields = array();
|
272 |
-
$fields['plugin'] = 'linker';
|
273 |
-
$this->add( 'require', $fields );
|
274 |
-
|
275 |
-
$fields = array();
|
276 |
-
$domains = '';
|
277 |
-
$domains = explode( ',', $this->gadwp->config->options['ga_crossdomain_list'] );
|
278 |
-
$domains = array_map( 'trim', $domains );
|
279 |
-
$domains = strip_tags( implode( "','", $domains ) );
|
280 |
-
$domains = "['" . $domains . "']";
|
281 |
-
$fields['domains'] = $domains;
|
282 |
-
$this->add( 'linker:autoLink', $fields );
|
283 |
-
}
|
284 |
-
|
285 |
-
if ( $this->gadwp->config->options['ga_remarketing'] ) {
|
286 |
-
$fields = array();
|
287 |
-
$fields['plugin'] = 'displayfeatures';
|
288 |
-
$this->add( 'require', $fields );
|
289 |
-
}
|
290 |
-
|
291 |
-
if ( $this->gadwp->config->options['ga_enhanced_links'] ) {
|
292 |
-
$fields = array();
|
293 |
-
$fields['plugin'] = 'linkid';
|
294 |
-
$this->add( 'require', $fields );
|
295 |
-
}
|
296 |
-
|
297 |
-
if ( $this->gadwp->config->options['ga_force_ssl'] ) {
|
298 |
-
$fields = array();
|
299 |
-
$fields['option'] = 'forceSSL';
|
300 |
-
$fields['value'] = 'true';
|
301 |
-
$this->add( 'set', $fields );
|
302 |
-
}
|
303 |
-
|
304 |
-
$custom_dimensions = $this->build_custom_dimensions();
|
305 |
-
if ( ! empty( $custom_dimensions ) ) {
|
306 |
-
foreach ( $custom_dimensions as $index => $value ) {
|
307 |
-
$fields = array();
|
308 |
-
$fields['gadwp_dimension'] = 'dimension' . $index;
|
309 |
-
$fields['gadwp_dim_value'] = $value;
|
310 |
-
$this->add( 'set', $fields );
|
311 |
-
}
|
312 |
-
}
|
313 |
-
|
314 |
-
if ( $this->gadwp->config->options['ga_anonymize_ip'] ) {
|
315 |
-
$fields = array();
|
316 |
-
$fields['option'] = 'anonymizeIp';
|
317 |
-
$fields['value'] = 'true';
|
318 |
-
$this->add( 'set', $fields );
|
319 |
-
}
|
320 |
-
|
321 |
-
if ( 'enhanced' == $this->gadwp->config->options['ecommerce_mode'] ) {
|
322 |
-
$fields = array();
|
323 |
-
$fields['plugin'] = 'ec';
|
324 |
-
$this->add( 'require', $fields );
|
325 |
-
} else if ( 'standard' == $this->gadwp->config->options['ecommerce_mode'] ) {
|
326 |
-
$fields = array();
|
327 |
-
$fields['plugin'] = 'ecommerce';
|
328 |
-
$this->add( 'require', $fields );
|
329 |
-
}
|
330 |
-
|
331 |
-
if ( $this->gadwp->config->options['optimize_tracking'] && $this->gadwp->config->options['optimize_containerid'] ) {
|
332 |
-
$fields = array();
|
333 |
-
$fields['plugin'] = esc_attr( $this->gadwp->config->options['optimize_containerid'] );
|
334 |
-
$this->add( 'require', $fields );
|
335 |
-
}
|
336 |
-
|
337 |
-
$fields = array();
|
338 |
-
$fields['hitType'] = 'pageview';
|
339 |
-
$this->add( 'send', $fields );
|
340 |
-
|
341 |
-
do_action( 'gadwp_analytics_commands', $this );
|
342 |
-
}
|
343 |
-
|
344 |
-
/**
|
345 |
-
* Outputs the Google Analytics tracking code
|
346 |
-
*/
|
347 |
-
public function output() {
|
348 |
-
$this->commands = array();
|
349 |
-
|
350 |
-
$this->build_commands();
|
351 |
-
|
352 |
-
$trackingcode = '';
|
353 |
-
|
354 |
-
foreach ( $this->commands as $set ) {
|
355 |
-
$command = $set['command'];
|
356 |
-
|
357 |
-
$fields = '';
|
358 |
-
foreach ( $set['fields'] as $fieldkey => $fieldvalue ) {
|
359 |
-
if ( false === strpos( $fieldkey, 'gadwp_dim_value' ) ) {
|
360 |
-
$fieldvalue = $this->filter( $fieldvalue );
|
361 |
-
} else {
|
362 |
-
$fieldvalue = $this->filter( $fieldvalue, true );
|
363 |
-
}
|
364 |
-
$fields .= ", " . $fieldvalue;
|
365 |
-
}
|
366 |
-
|
367 |
-
if ( $set['fieldsobject'] ) {
|
368 |
-
$fieldsobject = ", {";
|
369 |
-
foreach ( $set['fieldsobject'] as $fieldkey => $fieldvalue ) {
|
370 |
-
$fieldvalue = $this->filter( $fieldvalue );
|
371 |
-
$fieldkey = $this->filter( $fieldkey );
|
372 |
-
$fieldsobject .= $fieldkey . ": " . $fieldvalue . ", ";
|
373 |
-
}
|
374 |
-
$fieldsobject = rtrim( $fieldsobject, ", " );
|
375 |
-
$fieldsobject .= "}";
|
376 |
-
$trackingcode .= " ga('" . $command . "'" . $fields . $fieldsobject . ");\n";
|
377 |
-
} else {
|
378 |
-
$trackingcode .= " ga('" . $command . "'" . $fields . ");\n";
|
379 |
-
}
|
380 |
-
}
|
381 |
-
|
382 |
-
$tracking_script_path = apply_filters( 'gadwp_analytics_script_path', 'https://www.google-analytics.com/analytics.js' );
|
383 |
-
|
384 |
-
if ( $this->gadwp->config->options['ga_optout'] || $this->gadwp->config->options['ga_dnt_optout'] ) {
|
385 |
-
GADWP_Tools::load_view( 'front/views/analytics-optout-code.php', array( 'uaid' => $this->uaid, 'gaDntOptout' => $this->gadwp->config->options['ga_dnt_optout'], 'gaOptout' => $this->gadwp->config->options['ga_optout'] ) );
|
386 |
-
}
|
387 |
-
|
388 |
-
GADWP_Tools::load_view( 'front/views/analytics-code.php', array( 'trackingcode' => $trackingcode, 'tracking_script_path' => $tracking_script_path, 'ga_with_gtag' => $this->gadwp->config->options['ga_with_gtag'] , 'uaid' => $this->uaid ) );
|
389 |
-
}
|
390 |
-
}
|
391 |
-
}
|
392 |
-
|
393 |
-
|
394 |
-
if ( ! class_exists( 'GADWP_Tracking_GlobalSiteTag' ) ) {
|
395 |
-
|
396 |
-
class GADWP_Tracking_GlobalSiteTag extends GADWP_Tracking_Analytics_Common {
|
397 |
-
|
398 |
-
public function __construct() {
|
399 |
-
parent::__construct();
|
400 |
-
|
401 |
-
if ( $this->gadwp->config->options['trackingcode_infooter'] ) {
|
402 |
-
add_action( 'wp_footer', array( $this, 'output' ), 99 );
|
403 |
-
} else {
|
404 |
-
add_action( 'wp_head', array( $this, 'output' ), 99 );
|
405 |
-
}
|
406 |
-
}
|
407 |
-
|
408 |
-
/**
|
409 |
-
* Builds the commands based on user's options
|
410 |
-
*/
|
411 |
-
private function build_commands() {
|
412 |
-
$fields = array();
|
413 |
-
$fieldsobject = array();
|
414 |
-
$fields['trackingId'] = $this->uaid;
|
415 |
-
$custom_dimensions = $this->build_custom_dimensions();
|
416 |
-
/*
|
417 |
-
* if ( 1 != $this->gadwp->config->options['ga_speed_samplerate'] ) {
|
418 |
-
* $fieldsobject['siteSpeedSampleRate'] = (int) $this->gadwp->config->options['ga_speed_samplerate'];
|
419 |
-
* }
|
420 |
-
*/
|
421 |
-
if ( ! empty( $this->gadwp->config->options['ga_cookiedomain'] ) ) {
|
422 |
-
$fieldsobject['cookie_domain'] = $this->gadwp->config->options['ga_cookiedomain'];
|
423 |
-
}
|
424 |
-
if ( ! empty( $this->gadwp->config->options['ga_cookiename'] ) ) {
|
425 |
-
$fieldsobject['cookie_name'] = $this->gadwp->config->options['ga_cookiename'];
|
426 |
-
}
|
427 |
-
if ( ! empty( $this->gadwp->config->options['ga_cookieexpires'] ) ) {
|
428 |
-
$fieldsobject['cookie_expires'] = (int) $this->gadwp->config->options['ga_cookieexpires'];
|
429 |
-
}
|
430 |
-
/*
|
431 |
-
* if ( $this->gadwp->config->options['amp_tracking_clientidapi'] ) {
|
432 |
-
* $fieldsobject['useAmpClientId'] = 'true';
|
433 |
-
* }
|
434 |
-
*/
|
435 |
-
if ( $this->gadwp->config->options['ga_crossdomain_tracking'] && '' != $this->gadwp->config->options['ga_crossdomain_list'] ) {
|
436 |
-
$domains = '';
|
437 |
-
$domains = explode( ',', $this->gadwp->config->options['ga_crossdomain_list'] );
|
438 |
-
$domains = array_map( 'trim', $domains );
|
439 |
-
$domains = strip_tags( implode( "','", $domains ) );
|
440 |
-
$domains = "['" . $domains . "']";
|
441 |
-
$fieldsobject['linker'] = "{ 'domains' : " . $domains . " }";
|
442 |
-
}
|
443 |
-
if ( ! $this->gadwp->config->options['ga_remarketing'] ) {
|
444 |
-
$fieldsobject['allow_display_features'] = 'false';
|
445 |
-
}
|
446 |
-
if ( $this->gadwp->config->options['ga_enhanced_links'] ) {
|
447 |
-
$fieldsobject['link_attribution'] = 'true';
|
448 |
-
}
|
449 |
-
if ( $this->gadwp->config->options['ga_anonymize_ip'] ) {
|
450 |
-
$fieldsobject['anonymize_ip'] = 'true';
|
451 |
-
}
|
452 |
-
if ( $this->gadwp->config->options['optimize_tracking'] && $this->gadwp->config->options['optimize_containerid'] ) {
|
453 |
-
$fieldsobject['optimize_id'] = esc_attr( $this->gadwp->config->options['optimize_containerid'] );
|
454 |
-
}
|
455 |
-
if ( 100 != $this->gadwp->config->options['ga_user_samplerate'] ) {
|
456 |
-
$fieldsobject['sample_rate'] = (int) $this->gadwp->config->options['ga_user_samplerate'];
|
457 |
-
}
|
458 |
-
if ( ! empty( $custom_dimensions ) ) {
|
459 |
-
$fieldsobject['custom_map'] = "{\n\t\t";
|
460 |
-
foreach ( $custom_dimensions as $index => $value ) {
|
461 |
-
$fieldsobject['custom_map'] .= "'dimension" . $index . "': '" . "gadwp_dim_" . $index . "', \n\t\t";
|
462 |
-
}
|
463 |
-
$fieldsobject['custom_map'] = rtrim( $fieldsobject['custom_map'], ", \n\t\t" );
|
464 |
-
$fieldsobject['custom_map'] .= "\n\t}";
|
465 |
-
}
|
466 |
-
$this->add( 'config', $fields, $fieldsobject );
|
467 |
-
|
468 |
-
if ( ! empty( $custom_dimensions ) ) {
|
469 |
-
$fields = array();
|
470 |
-
$fieldsobject = array();
|
471 |
-
$fields['event_name'] = 'gadwp_dimensions';
|
472 |
-
foreach ( $custom_dimensions as $index => $value ) {
|
473 |
-
$fieldsobject['gadwp_dim_' . $index] = $value;
|
474 |
-
}
|
475 |
-
$this->add( 'event', $fields, $fieldsobject );
|
476 |
-
}
|
477 |
-
|
478 |
-
do_action( 'gadwp_gtag_commands', $this );
|
479 |
-
}
|
480 |
-
|
481 |
-
/**
|
482 |
-
* Outputs the Google Analytics tracking code
|
483 |
-
*/
|
484 |
-
public function output() {
|
485 |
-
$this->commands = array();
|
486 |
-
|
487 |
-
$this->build_commands();
|
488 |
-
|
489 |
-
$trackingcode = '';
|
490 |
-
|
491 |
-
foreach ( $this->commands as $set ) {
|
492 |
-
$command = $set['command'];
|
493 |
-
|
494 |
-
$fields = '';
|
495 |
-
foreach ( $set['fields'] as $fieldkey => $fieldvalue ) {
|
496 |
-
$fieldvalue = $this->filter( $fieldvalue );
|
497 |
-
$fields .= ", " . $fieldvalue;
|
498 |
-
}
|
499 |
-
|
500 |
-
if ( $set['fieldsobject'] ) {
|
501 |
-
$fieldsobject = ", {\n\t";
|
502 |
-
foreach ( $set['fieldsobject'] as $fieldkey => $fieldvalue ) {
|
503 |
-
if ( false === strpos( $fieldkey, 'gadwp_' ) ) {
|
504 |
-
$fieldvalue = $this->filter( $fieldvalue );
|
505 |
-
} else {
|
506 |
-
$fieldvalue = $this->filter( $fieldvalue, true );
|
507 |
-
}
|
508 |
-
$fieldkey = $this->filter( $fieldkey );
|
509 |
-
$fieldsobject .= $fieldkey . ": " . $fieldvalue . ", \n\t";
|
510 |
-
}
|
511 |
-
$fieldsobject = rtrim( $fieldsobject, ", \n\t" );
|
512 |
-
$fieldsobject .= "\n }";
|
513 |
-
$trackingcode .= " gtag('" . $command . "'" . $fields . $fieldsobject . ");\n";
|
514 |
-
} else {
|
515 |
-
$trackingcode .= " gtag('" . $command . "'" . $fields . ");\n";
|
516 |
-
}
|
517 |
-
}
|
518 |
-
|
519 |
-
$tracking_script_path = apply_filters( 'gadwp_gtag_script_path', 'https://www.googletagmanager.com/gtag/js' );
|
520 |
-
|
521 |
-
if ( $this->gadwp->config->options['ga_optout'] || $this->gadwp->config->options['ga_dnt_optout'] ) {
|
522 |
-
GADWP_Tools::load_view( 'front/views/analytics-optout-code.php', array( 'uaid' => $this->uaid, 'gaDntOptout' => $this->gadwp->config->options['ga_dnt_optout'], 'gaOptout' => $this->gadwp->config->options['ga_optout'] ) );
|
523 |
-
}
|
524 |
-
|
525 |
-
GADWP_Tools::load_view( 'front/views/analytics-code.php', array( 'trackingcode' => $trackingcode, 'tracking_script_path' => $tracking_script_path, 'ga_with_gtag' => $this->gadwp->config->options['ga_with_gtag'] , 'uaid' => $this->uaid ) );
|
526 |
-
}
|
527 |
-
}
|
528 |
-
}
|
529 |
-
|
530 |
-
if ( ! class_exists( 'GADWP_Tracking_Analytics_AMP' ) ) {
|
531 |
-
|
532 |
-
class GADWP_Tracking_Analytics_AMP extends GADWP_Tracking_Analytics_Base {
|
533 |
-
|
534 |
-
private $config;
|
535 |
-
|
536 |
-
public function __construct() {
|
537 |
-
parent::__construct();
|
538 |
-
|
539 |
-
add_filter( 'amp_post_template_data', array( $this, 'load_scripts' ) );
|
540 |
-
add_action( 'amp_post_template_footer', array( $this, 'output' ) );
|
541 |
-
add_filter( 'the_content', array( $this, 'add_data_attributes' ), 999, 1 );
|
542 |
-
if ( $this->gadwp->config->options['amp_tracking_clientidapi'] ) {
|
543 |
-
add_action( 'amp_post_template_head', array( $this, 'add_amp_client_id' ) );
|
544 |
-
}
|
545 |
-
}
|
546 |
-
|
547 |
-
private function get_link_event_data( $link ) {
|
548 |
-
if ( empty( $link ) ) {
|
549 |
-
return false;
|
550 |
-
}
|
551 |
-
if ( $this->gadwp->config->options['ga_event_tracking'] ) {
|
552 |
-
// on changes adjust the substr() length parameter
|
553 |
-
if ( substr( $link, 0, 7 ) === "mailto:" ) {
|
554 |
-
return array( 'email', 'send', $link );
|
555 |
-
}
|
556 |
-
|
557 |
-
// on changes adjust the substr() length parameter
|
558 |
-
if ( substr( $link, 0, 4 ) === "tel:" ) {
|
559 |
-
return array( 'telephone', 'call', $link );
|
560 |
-
}
|
561 |
-
|
562 |
-
// Add download data-vars
|
563 |
-
if ( $this->gadwp->config->options['ga_event_downloads'] && preg_match( '/.*\.(' . $this->gadwp->config->options['ga_event_downloads'] . ')(\?.*)?$/i', $link, $matches ) ) {
|
564 |
-
return array( 'download', 'click', $link );
|
565 |
-
}
|
566 |
-
}
|
567 |
-
if ( $this->gadwp->config->options['ga_hash_tracking'] ) {
|
568 |
-
// Add hashmark data-vars
|
569 |
-
$root_domain = GADWP_Tools::get_root_domain();
|
570 |
-
if ( $root_domain && ( strpos( $link, $root_domain ) > - 1 || strpos( $link, '://' ) === false ) && strpos( $link, '#' ) > - 1 ) {
|
571 |
-
return array( 'hashmark', 'click', $link );
|
572 |
-
}
|
573 |
-
}
|
574 |
-
if ( $this->gadwp->config->options['ga_aff_tracking'] ) {
|
575 |
-
// Add affiliate data-vars
|
576 |
-
if ( strpos( $link, $this->gadwp->config->options['ga_event_affiliates'] ) > - 1 ) {
|
577 |
-
return array( 'affiliates', 'click', $link );
|
578 |
-
}
|
579 |
-
}
|
580 |
-
if ( $this->gadwp->config->options['ga_event_tracking'] ) {
|
581 |
-
// Add outbound data-vars
|
582 |
-
$root_domain = GADWP_Tools::get_root_domain();
|
583 |
-
if ( $root_domain && strpos( $link, $root_domain ) === false && strpos( $link, '://' ) > - 1 ) {
|
584 |
-
return array( 'outbound', 'click', $link );
|
585 |
-
}
|
586 |
-
}
|
587 |
-
return false;
|
588 |
-
}
|
589 |
-
|
590 |
-
public function add_data_attributes( $content ) {
|
591 |
-
if ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() && $this->is_event_tracking( false ) ) {
|
592 |
-
|
593 |
-
$dom = GADWP_Tools::get_dom_from_content( $content );
|
594 |
-
|
595 |
-
if ( $dom ) {
|
596 |
-
|
597 |
-
$links = $dom->getElementsByTagName( 'a' );
|
598 |
-
|
599 |
-
foreach ( $links as $item ) {
|
600 |
-
|
601 |
-
$data_attributes = $this->get_link_event_data( $item->getAttribute( 'href' ) );
|
602 |
-
|
603 |
-
if ( $data_attributes ) {
|
604 |
-
if ( ! $item->hasAttribute( 'data-vars-ga-category' ) ) {
|
605 |
-
$item->setAttribute( 'data-vars-ga-category', $data_attributes[0] );
|
606 |
-
}
|
607 |
-
if ( ! $item->hasAttribute( 'data-vars-ga-action' ) ) {
|
608 |
-
$item->setAttribute( 'data-vars-ga-action', $data_attributes[1] );
|
609 |
-
}
|
610 |
-
if ( ! $item->hasAttribute( 'data-vars-ga-label' ) ) {
|
611 |
-
$item->setAttribute( 'data-vars-ga-label', $data_attributes[2] );
|
612 |
-
}
|
613 |
-
}
|
614 |
-
}
|
615 |
-
|
616 |
-
if ( $this->gadwp->config->options['ga_formsubmit_tracking'] ) {
|
617 |
-
$form_submits = $dom->getElementsByTagName( 'input' );
|
618 |
-
foreach ( $form_submits as $item ) {
|
619 |
-
if ( $item->getAttribute( 'type' ) == 'submit' ) {
|
620 |
-
if ( ! $item->hasAttribute( 'data-vars-ga-category' ) ) {
|
621 |
-
$item->setAttribute( 'data-vars-ga-category', 'form' );
|
622 |
-
}
|
623 |
-
if ( ! $item->hasAttribute( 'data-vars-ga-action' ) ) {
|
624 |
-
$item->setAttribute( 'data-vars-ga-action', 'submit' );
|
625 |
-
}
|
626 |
-
if ( ! $item->hasAttribute( 'data-vars-ga-label' ) ) {
|
627 |
-
if ( $item->getAttribute( 'value' ) ) {
|
628 |
-
$label = $item->getAttribute( 'value' );
|
629 |
-
}
|
630 |
-
if ( $item->getAttribute( 'name' ) ) {
|
631 |
-
$label = $item->getAttribute( 'name' );
|
632 |
-
}
|
633 |
-
$item->setAttribute( 'data-vars-ga-label', $label );
|
634 |
-
}
|
635 |
-
}
|
636 |
-
}
|
637 |
-
}
|
638 |
-
return GADWP_Tools::get_content_from_dom( $dom );
|
639 |
-
}
|
640 |
-
}
|
641 |
-
|
642 |
-
return $content;
|
643 |
-
}
|
644 |
-
|
645 |
-
/**
|
646 |
-
* Inserts the Analytics AMP script in the head section
|
647 |
-
*/
|
648 |
-
public function load_scripts( $data ) {
|
649 |
-
if ( ! isset( $data['amp_component_scripts'] ) ) {
|
650 |
-
$data['amp_component_scripts'] = array();
|
651 |
-
}
|
652 |
-
|
653 |
-
$data['amp_component_scripts']['amp-analytics'] = 'https://cdn.ampproject.org/v0/amp-analytics-0.1.js';
|
654 |
-
|
655 |
-
return $data;
|
656 |
-
}
|
657 |
-
|
658 |
-
/**
|
659 |
-
* Retrieves the AMP config array
|
660 |
-
*/
|
661 |
-
public function get() {
|
662 |
-
return $this->config;
|
663 |
-
}
|
664 |
-
|
665 |
-
/**
|
666 |
-
* Stores the AMP config array
|
667 |
-
* @param array $config
|
668 |
-
*/
|
669 |
-
public function set( $config ) {
|
670 |
-
$this->config = $config;
|
671 |
-
}
|
672 |
-
|
673 |
-
private function build_json() {
|
674 |
-
$this->config = array();
|
675 |
-
|
676 |
-
// Set the Tracking ID
|
677 |
-
/* @formatter:off */
|
678 |
-
$this->config['vars'] = array(
|
679 |
-
'account' => $this->uaid,
|
680 |
-
'documentLocation' => '${canonicalUrl}',
|
681 |
-
);
|
682 |
-
/* @formatter:on */
|
683 |
-
|
684 |
-
// Set Custom Dimensions as extraUrlParams
|
685 |
-
$custom_dimensions = $this->build_custom_dimensions();
|
686 |
-
|
687 |
-
if ( ! empty( $custom_dimensions ) ) {
|
688 |
-
foreach ( $custom_dimensions as $index => $value ) {
|
689 |
-
$dimension = 'cd' . $index;
|
690 |
-
$this->config['extraUrlParams'][$dimension] = $value;
|
691 |
-
}
|
692 |
-
}
|
693 |
-
|
694 |
-
// Set Triggers
|
695 |
-
/* @formatter:off */
|
696 |
-
$this->config['triggers']['gadwpTrackPageview'] = array(
|
697 |
-
'on' => 'visible',
|
698 |
-
'request' => 'pageview',
|
699 |
-
);
|
700 |
-
/* @formatter:on */
|
701 |
-
|
702 |
-
// Set Sampling Rate only if lower than 100%
|
703 |
-
if ( 100 != $this->gadwp->config->options['ga_user_samplerate'] ) {
|
704 |
-
/* @formatter:off */
|
705 |
-
$this->config['triggers']['gadwpTrackPageview']['sampleSpec'] = array(
|
706 |
-
'sampleOn' => '${clientId}',
|
707 |
-
'threshold' => (int) $this->gadwp->config->options['ga_user_samplerate'],
|
708 |
-
);
|
709 |
-
/* @formatter:on */
|
710 |
-
}
|
711 |
-
|
712 |
-
// Set Scroll events
|
713 |
-
if ( $this->gadwp->config->options['ga_pagescrolldepth_tracking'] ) {
|
714 |
-
/* @formatter:off */
|
715 |
-
$this->config['triggers']['gadwpScrollPings'] = array (
|
716 |
-
'on' => 'scroll',
|
717 |
-
'scrollSpec' => array(
|
718 |
-
'verticalBoundaries' => '[25, 50, 75, 100]',
|
719 |
-
),
|
720 |
-
'request' => 'event',
|
721 |
-
'vars' => array(
|
722 |
-
'eventCategory' => 'Scroll Depth',
|
723 |
-
'eventAction' => 'Percentage',
|
724 |
-
'eventLabel' => '${verticalScrollBoundary}%',
|
725 |
-
),
|
726 |
-
);
|
727 |
-
/* @formatter:on */
|
728 |
-
$this->config['triggers']['gadwpScrollPings']['extraUrlParams'] = array( 'ni' => true );
|
729 |
-
}
|
730 |
-
|
731 |
-
if ( $this->is_event_tracking( false ) ) {
|
732 |
-
// Set downloads, outbound links, affiliate links, hashmarks, e-mails, telephones, form submits events
|
733 |
-
/* @formatter:off */
|
734 |
-
$this->config['triggers']['gadwpEventTracking'] = array (
|
735 |
-
'on' => 'click',
|
736 |
-
'selector' => '[data-vars-ga-category][data-vars-ga-action][data-vars-ga-label]',
|
737 |
-
'request' => 'event',
|
738 |
-
'vars' => array(
|
739 |
-
'eventCategory' => '${gaCategory}',
|
740 |
-
'eventAction' => '${gaAction}',
|
741 |
-
'eventLabel' => '${gaLabel}',
|
742 |
-
),
|
743 |
-
);
|
744 |
-
/* @formatter:on */
|
745 |
-
if ( $this->gadwp->config->options['ga_event_bouncerate'] ) {
|
746 |
-
$this->config['triggers']['gadwpEventTracking']['extraUrlParams'] = array( 'ni' => (bool) $this->gadwp->config->options['ga_event_bouncerate'] );
|
747 |
-
}
|
748 |
-
}
|
749 |
-
do_action( 'gadwp_analytics_amp_config', $this );
|
750 |
-
}
|
751 |
-
|
752 |
-
public function add_amp_client_id() {
|
753 |
-
GADWP_Tools::load_view( 'front/views/analytics-amp-clientidapi.php' );
|
754 |
-
}
|
755 |
-
|
756 |
-
/**
|
757 |
-
* Outputs the Google Analytics tracking code for AMP
|
758 |
-
*/
|
759 |
-
public function output() {
|
760 |
-
$this->build_json();
|
761 |
-
|
762 |
-
if ( version_compare( phpversion(), '5.4.0', '<' ) ) {
|
763 |
-
$json = json_encode( $this->config );
|
764 |
-
} else {
|
765 |
-
$json = json_encode( $this->config, JSON_PRETTY_PRINT );
|
766 |
-
}
|
767 |
-
|
768 |
-
$json = str_replace( array( '"[', ']"' ), array( '[', ']' ), $json ); // make verticalBoundaries a JavaScript array
|
769 |
-
|
770 |
-
$data = array( 'json' => $json );
|
771 |
-
|
772 |
-
GADWP_Tools::load_view( 'front/views/analytics-amp-code.php', $data );
|
773 |
-
}
|
774 |
-
}
|
775 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/tracking-tagmanager.php
DELETED
@@ -1,185 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Tracking_TagManager' ) ) {
|
15 |
-
|
16 |
-
class GADWP_Tracking_TagManager {
|
17 |
-
|
18 |
-
private $gadwp;
|
19 |
-
|
20 |
-
private $datalayer;
|
21 |
-
|
22 |
-
private $uaid;
|
23 |
-
|
24 |
-
public function __construct() {
|
25 |
-
$this->gadwp = GADWP();
|
26 |
-
|
27 |
-
$profile = GADWP_Tools::get_selected_profile( $this->gadwp->config->options['ga_profiles_list'], $this->gadwp->config->options['tableid_jail'] );
|
28 |
-
|
29 |
-
$this->uaid = esc_html( $profile[2] );
|
30 |
-
|
31 |
-
if ( $this->gadwp->config->options['trackingcode_infooter'] ) {
|
32 |
-
add_action( 'wp_footer', array( $this, 'output' ), 99 );
|
33 |
-
} else {
|
34 |
-
add_action( 'wp_head', array( $this, 'output' ), 99 );
|
35 |
-
}
|
36 |
-
|
37 |
-
if ( $this->gadwp->config->options['amp_tracking_tagmanager'] && $this->gadwp->config->options['amp_containerid'] ) {
|
38 |
-
add_filter( 'amp_post_template_data', array( $this, 'amp_add_analytics_script' ) );
|
39 |
-
add_action( 'amp_post_template_footer', array( $this, 'amp_output' ) );
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Retrieves the datalayer variables
|
45 |
-
*/
|
46 |
-
public function get() {
|
47 |
-
return $this->datalayer;
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Stores the datalayer variables
|
52 |
-
* @param array $datalayer
|
53 |
-
*/
|
54 |
-
public function set( $datalayer ) {
|
55 |
-
$this->datalayer = $datalayer;
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Adds a variable to the datalayer
|
60 |
-
* @param string $name
|
61 |
-
* @param string $value
|
62 |
-
*/
|
63 |
-
private function add_var( $name, $value ) {
|
64 |
-
$this->datalayer[$name] = $value;
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Builds the datalayer based on user's options
|
69 |
-
*/
|
70 |
-
private function build_custom_dimensions() {
|
71 |
-
global $post;
|
72 |
-
|
73 |
-
if ( $this->gadwp->config->options['tm_author_var'] && ( is_single() || is_page() ) ) {
|
74 |
-
global $post;
|
75 |
-
$author_id = $post->post_author;
|
76 |
-
$author_name = get_the_author_meta( 'display_name', $author_id );
|
77 |
-
$this->add_var( 'gadwpAuthor', esc_attr( $author_name ) );
|
78 |
-
}
|
79 |
-
|
80 |
-
if ( $this->gadwp->config->options['tm_pubyear_var'] && is_single() ) {
|
81 |
-
global $post;
|
82 |
-
$date = get_the_date( 'Y', $post->ID );
|
83 |
-
$this->add_var( 'gadwpPublicationYear', (int) $date );
|
84 |
-
}
|
85 |
-
|
86 |
-
if ( $this->gadwp->config->options['tm_pubyearmonth_var'] && is_single() ) {
|
87 |
-
global $post;
|
88 |
-
$date = get_the_date( 'Y-m', $post->ID );
|
89 |
-
$this->add_var( 'gadwpPublicationYearMonth', esc_attr( $date ) );
|
90 |
-
}
|
91 |
-
|
92 |
-
if ( $this->gadwp->config->options['tm_category_var'] && is_category() ) {
|
93 |
-
$this->add_var( 'gadwpCategory', esc_attr( single_tag_title( '', false ) ) );
|
94 |
-
}
|
95 |
-
if ( $this->gadwp->config->options['tm_category_var'] && is_single() ) {
|
96 |
-
global $post;
|
97 |
-
$categories = get_the_category( $post->ID );
|
98 |
-
foreach ( $categories as $category ) {
|
99 |
-
$this->add_var( 'gadwpCategory', esc_attr( $category->name ) );
|
100 |
-
break;
|
101 |
-
}
|
102 |
-
}
|
103 |
-
|
104 |
-
if ( $this->gadwp->config->options['tm_tag_var'] && is_single() ) {
|
105 |
-
global $post;
|
106 |
-
$post_tags_list = '';
|
107 |
-
$post_tags_array = get_the_tags( $post->ID );
|
108 |
-
if ( $post_tags_array ) {
|
109 |
-
foreach ( $post_tags_array as $tag ) {
|
110 |
-
$post_tags_list .= $tag->name . ', ';
|
111 |
-
}
|
112 |
-
}
|
113 |
-
$post_tags_list = rtrim( $post_tags_list, ', ' );
|
114 |
-
if ( $post_tags_list ) {
|
115 |
-
$this->add_var( 'gadwpTag', esc_attr( $post_tags_list ) );
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
if ( $this->gadwp->config->options['tm_user_var'] ) {
|
120 |
-
$usertype = is_user_logged_in() ? 'registered' : 'guest';
|
121 |
-
$this->add_var( 'gadwpUser', $usertype );
|
122 |
-
}
|
123 |
-
|
124 |
-
do_action( 'gadwp_tagmanager_datalayer', $this );
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Outputs the Google Tag Manager tracking code
|
129 |
-
*/
|
130 |
-
public function output() {
|
131 |
-
$this->build_custom_dimensions();
|
132 |
-
|
133 |
-
if ( is_array( $this->datalayer ) ) {
|
134 |
-
$vars = "{";
|
135 |
-
foreach ( $this->datalayer as $var => $value ) {
|
136 |
-
$vars .= "'" . $var . "': '" . $value . "', ";
|
137 |
-
}
|
138 |
-
$vars = rtrim( $vars, ", " );
|
139 |
-
$vars .= "}";
|
140 |
-
} else {
|
141 |
-
$vars = "{}";
|
142 |
-
}
|
143 |
-
|
144 |
-
if ( ( $this->gadwp->config->options['tm_optout'] || $this->gadwp->config->options['tm_dnt_optout'] ) && ! empty( $this->uaid ) ) {
|
145 |
-
GADWP_Tools::load_view( 'front/views/analytics-optout-code.php', array( 'uaid' => $this->uaid, 'gaDntOptout' => $this->gadwp->config->options['tm_dnt_optout'], 'gaOptout' => $this->gadwp->config->options['tm_optout'] ) );
|
146 |
-
}
|
147 |
-
|
148 |
-
GADWP_Tools::load_view( 'front/views/tagmanager-code.php', array( 'containerid' => $this->gadwp->config->options['web_containerid'], 'vars' => $vars ) );
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* Inserts the Analytics AMP script in the head section
|
153 |
-
*/
|
154 |
-
public function amp_add_analytics_script( $data ) {
|
155 |
-
if ( ! isset( $data['amp_component_scripts'] ) ) {
|
156 |
-
$data['amp_component_scripts'] = array();
|
157 |
-
}
|
158 |
-
|
159 |
-
$data['amp_component_scripts']['amp-analytics'] = 'https://cdn.ampproject.org/v0/amp-analytics-0.1.js';
|
160 |
-
|
161 |
-
return $data;
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Outputs the Tag Manager code for AMP
|
166 |
-
*/
|
167 |
-
public function amp_output() {
|
168 |
-
$this->build_custom_dimensions();
|
169 |
-
|
170 |
-
$vars = array( 'vars' => $this->datalayer );
|
171 |
-
|
172 |
-
if ( version_compare( phpversion(), '5.4.0', '<' ) ) {
|
173 |
-
$json = json_encode( $vars );
|
174 |
-
} else {
|
175 |
-
$json = json_encode( $vars, JSON_PRETTY_PRINT );
|
176 |
-
}
|
177 |
-
|
178 |
-
$amp_containerid = $this->gadwp->config->options['amp_containerid'];
|
179 |
-
|
180 |
-
$json = str_replace( array( '"[', ']"' ), array( '[', ']' ), $json ); // make verticalBoundaries a JavaScript array
|
181 |
-
|
182 |
-
GADWP_Tools::load_view( 'front/views/tagmanager-amp-code.php', array( 'json' => $json, 'containerid' => $amp_containerid ) );
|
183 |
-
}
|
184 |
-
}
|
185 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/tracking.php
DELETED
@@ -1,79 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
if ( ! class_exists( 'GADWP_Tracking' ) ) {
|
15 |
-
|
16 |
-
class GADWP_Tracking {
|
17 |
-
|
18 |
-
private $gadwp;
|
19 |
-
|
20 |
-
public $analytics;
|
21 |
-
|
22 |
-
public $analytics_amp;
|
23 |
-
|
24 |
-
public $tagmanager;
|
25 |
-
|
26 |
-
public function __construct() {
|
27 |
-
$this->gadwp = GADWP();
|
28 |
-
|
29 |
-
$this->init();
|
30 |
-
}
|
31 |
-
|
32 |
-
public function tracking_code() { // Removed since 5.0
|
33 |
-
GADWP_Tools::doing_it_wrong( __METHOD__, __( "This method is deprecated, read the documentation!", 'google-analytics-dashboard-for-wp' ), '5.0' );
|
34 |
-
}
|
35 |
-
|
36 |
-
public static function gadwp_user_optout( $atts, $content = "" ) {
|
37 |
-
if ( ! isset( $atts['html_tag'] ) ) {
|
38 |
-
$atts['html_tag'] = 'a';
|
39 |
-
}
|
40 |
-
if ( 'a' == $atts['html_tag'] ) {
|
41 |
-
return '<a href="#" class="gadwp_useroptout" onclick="gaOptout()">' . esc_html( $content ) . '</a>';
|
42 |
-
} else if ( 'button' == $atts['html_tag'] ) {
|
43 |
-
return '<button class="gadwp_useroptout" onclick="gaOptout()">' . esc_html( $content ) . '</button>';
|
44 |
-
}
|
45 |
-
}
|
46 |
-
|
47 |
-
public function init() {
|
48 |
-
// excluded roles
|
49 |
-
if ( GADWP_Tools::check_roles( $this->gadwp->config->options['track_exclude'], true ) || ( $this->gadwp->config->options['superadmin_tracking'] && current_user_can( 'manage_network' ) ) ) {
|
50 |
-
return;
|
51 |
-
}
|
52 |
-
|
53 |
-
if ( 'universal' == $this->gadwp->config->options['tracking_type'] && $this->gadwp->config->options['tableid_jail'] ) {
|
54 |
-
|
55 |
-
// Analytics
|
56 |
-
require_once 'tracking-analytics.php';
|
57 |
-
|
58 |
-
if ( 1 == $this->gadwp->config->options['ga_with_gtag'] ) {
|
59 |
-
$this->analytics = new GADWP_Tracking_GlobalSiteTag();
|
60 |
-
} else {
|
61 |
-
$this->analytics = new GADWP_Tracking_Analytics();
|
62 |
-
}
|
63 |
-
|
64 |
-
if ( $this->gadwp->config->options['amp_tracking_analytics'] ) {
|
65 |
-
$this->analytics_amp = new GADWP_Tracking_Analytics_AMP();
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
if ( 'tagmanager' == $this->gadwp->config->options['tracking_type'] && $this->gadwp->config->options['web_containerid'] ) {
|
70 |
-
|
71 |
-
// Tag Manager
|
72 |
-
require_once 'tracking-tagmanager.php';
|
73 |
-
$this->tagmanager = new GADWP_Tracking_TagManager();
|
74 |
-
}
|
75 |
-
|
76 |
-
add_shortcode( 'gadwp_useroptout', array( $this, 'gadwp_user_optout' ) );
|
77 |
-
}
|
78 |
-
}
|
79 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/views/analytics-amp-clientidapi.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Copyright 2018 ExactMetrics team
|
5 |
-
* Author URI: https://exactmetrics.com
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
?>
|
10 |
-
|
11 |
-
<meta name="amp-google-client-id-api" content="googleanalytics">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/views/analytics-amp-code.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Copyright 2018 ExactMetrics team
|
5 |
-
* Author URI: https://exactmetrics.com
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
?>
|
10 |
-
<amp-analytics type="googleanalytics" id="gadwp-googleanalytics">
|
11 |
-
<script type="application/json">
|
12 |
-
<?php echo $data['json']; ?>
|
13 |
-
</script>
|
14 |
-
</amp-analytics>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/views/analytics-code.php
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Copyright 2018 ExactMetrics team
|
5 |
-
* Author URI: https://exactmetrics.com
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
?>
|
10 |
-
|
11 |
-
<?php if ( 0 == $data['ga_with_gtag'] ):?>
|
12 |
-
<!-- BEGIN ExactMetrics v<?php echo GADWP_CURRENT_VERSION; ?> Universal Analytics - https://exactmetrics.com/ -->
|
13 |
-
<script>
|
14 |
-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
15 |
-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
16 |
-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
17 |
-
})(window,document,'script','<?php echo $data['tracking_script_path']?>','ga');
|
18 |
-
<?php echo $data['trackingcode']?>
|
19 |
-
</script>
|
20 |
-
<!-- END ExactMetrics Universal Analytics -->
|
21 |
-
<?php else:?>
|
22 |
-
<!-- BEGIN ExactMetrics v<?php echo GADWP_CURRENT_VERSION; ?> Global Site Tag - https://exactmetrics.com/ -->
|
23 |
-
<script async src="<?php echo $data['tracking_script_path']?>?id=<?php echo $data['uaid']?>"></script>
|
24 |
-
<script>
|
25 |
-
window.dataLayer = window.dataLayer || [];
|
26 |
-
function gtag(){dataLayer.push(arguments);}
|
27 |
-
gtag('js', new Date());
|
28 |
-
<?php echo $data['trackingcode']?>
|
29 |
-
|
30 |
-
if (window.performance) {
|
31 |
-
var timeSincePageLoad = Math.round(performance.now());
|
32 |
-
gtag('event', 'timing_complete', {
|
33 |
-
'name': 'load',
|
34 |
-
'value': timeSincePageLoad,
|
35 |
-
'event_category': 'JS Dependencies'
|
36 |
-
});
|
37 |
-
}
|
38 |
-
</script>
|
39 |
-
<!-- END ExactMetrics Global Site Tag -->
|
40 |
-
<?php endif;?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/views/analytics-optout-code.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Copyright 2018 ExactMetrics team
|
5 |
-
* Author URI: https://exactmetrics.com
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
?>
|
10 |
-
<script>
|
11 |
-
var gadwpDnt = false;
|
12 |
-
var gadwpProperty = '<?php echo $data['uaid']?>';
|
13 |
-
var gadwpDntFollow = <?php echo $data['gaDntOptout'] ? 'true' : 'false'?>;
|
14 |
-
var gadwpOptout = <?php echo $data['gaOptout'] ? 'true' : 'false'?>;
|
15 |
-
var disableStr = 'ga-disable-' + gadwpProperty;
|
16 |
-
if(gadwpDntFollow && (window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1")) {
|
17 |
-
gadwpDnt = true;
|
18 |
-
}
|
19 |
-
if (gadwpDnt || (document.cookie.indexOf(disableStr + '=true') > -1 && gadwpOptout)) {
|
20 |
-
window[disableStr] = true;
|
21 |
-
}
|
22 |
-
function gaOptout() {
|
23 |
-
var expDate = new Date;
|
24 |
-
expDate.setFullYear(expDate.getFullYear( ) + 10);
|
25 |
-
document.cookie = disableStr + '=true; expires=' + expDate.toGMTString( ) + '; path=/';
|
26 |
-
window[disableStr] = true;
|
27 |
-
}
|
28 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/views/optimize-code.php
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Copyright 2018 ExactMetrics team
|
5 |
-
* Author URI: https://exactmetrics.com
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
?>
|
10 |
-
<style>
|
11 |
-
.async-hide {
|
12 |
-
opacity: 0 !important
|
13 |
-
}
|
14 |
-
</style>
|
15 |
-
<script>
|
16 |
-
(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
|
17 |
-
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
|
18 |
-
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
|
19 |
-
})(window,document.documentElement,'async-hide','dataLayer',4000,
|
20 |
-
{'<?php echo $data['containerid']; ?>':true});
|
21 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/views/tagmanager-amp-code.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Copyright 2018 ExactMetrics team
|
5 |
-
* Author URI: https://exactmetrics.com
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
?>
|
10 |
-
<amp-analytics config="https://www.googletagmanager.com/amp.json?id=<?php echo $data['containerid']; ?>>m.url=SOURCE_URL" data-credentials="include">
|
11 |
-
<script type="application/json">
|
12 |
-
<?php echo $data['json']; ?>
|
13 |
-
</script>
|
14 |
-
</amp-analytics>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/views/tagmanager-code.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Copyright 2018 ExactMetrics team
|
5 |
-
* Author URI: https://exactmetrics.com
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
?>
|
10 |
-
<!-- BEGIN GADWP v<?php echo GADWP_CURRENT_VERSION; ?> Tag Manager - https://exactmetrics.com/ -->
|
11 |
-
<script>
|
12 |
-
window.dataLayer = window.dataLayer || [];
|
13 |
-
window.dataLayer.push(<?php echo $data['vars']; ?>);
|
14 |
-
</script>
|
15 |
-
|
16 |
-
<script>
|
17 |
-
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
18 |
-
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
19 |
-
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
20 |
-
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
21 |
-
})(window,document,'script','dataLayer','<?php echo $data['containerid']; ?>');
|
22 |
-
</script>
|
23 |
-
<!-- END GADWP Tag Manager -->
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
front/widgets.php
DELETED
@@ -1,195 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
final class GADWP_Frontend_Widget extends WP_Widget {
|
15 |
-
|
16 |
-
private $gadwp;
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
$this->gadwp = GADWP();
|
20 |
-
|
21 |
-
parent::__construct( 'gadwp-frontwidget-report', __( 'Google Analytics Dashboard', 'google-analytics-dashboard-for-wp' ), array( 'description' => __( "Will display your google analytics stats in a widget", 'google-analytics-dashboard-for-wp' ) ) );
|
22 |
-
// Frontend Styles
|
23 |
-
if ( is_active_widget( false, false, $this->id_base, true ) ) {
|
24 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'load_styles_scripts' ) );
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
public function load_styles_scripts() {
|
29 |
-
$lang = get_bloginfo( 'language' );
|
30 |
-
$lang = explode( '-', $lang );
|
31 |
-
$lang = $lang[0];
|
32 |
-
|
33 |
-
wp_enqueue_style( 'gadwp-front-widget', GADWP_URL . 'front/css/widgets.css', null, GADWP_CURRENT_VERSION );
|
34 |
-
wp_enqueue_script( 'gadwp-front-widget', GADWP_URL . 'front/js/widgets.js', array( 'jquery' ), GADWP_CURRENT_VERSION );
|
35 |
-
wp_enqueue_script( 'googlecharts', 'https://www.gstatic.com/charts/loader.js', array(), null );
|
36 |
-
}
|
37 |
-
|
38 |
-
public function widget( $args, $instance ) {
|
39 |
-
$widget_title = apply_filters( 'widget_title', $instance['title'] );
|
40 |
-
$title = __( "Sessions", 'google-analytics-dashboard-for-wp' );
|
41 |
-
echo "\n<!-- BEGIN GADWP v" . GADWP_CURRENT_VERSION . " Widget - https://exactmetrics.com/ -->\n";
|
42 |
-
echo $args['before_widget'];
|
43 |
-
if ( ! empty( $widget_title ) ) {
|
44 |
-
echo $args['before_title'] . $widget_title . $args['after_title'];
|
45 |
-
}
|
46 |
-
|
47 |
-
if ( isset( $this->gadwp->config->options['theme_color'] ) ) {
|
48 |
-
$css = "colors:['" . $this->gadwp->config->options['theme_color'] . "','" . GADWP_Tools::colourVariator( $this->gadwp->config->options['theme_color'], - 20 ) . "'],";
|
49 |
-
$color = $this->gadwp->config->options['theme_color'];
|
50 |
-
} else {
|
51 |
-
$css = "";
|
52 |
-
$color = "#3366CC";
|
53 |
-
}
|
54 |
-
ob_start();
|
55 |
-
if ( $instance['anonim'] ) {
|
56 |
-
$formater = "var formatter = new google.visualization.NumberFormat({
|
57 |
-
suffix: '%',
|
58 |
-
fractionDigits: 2
|
59 |
-
});
|
60 |
-
|
61 |
-
formatter.format(data, 1);";
|
62 |
-
} else {
|
63 |
-
$formater = '';
|
64 |
-
}
|
65 |
-
$periodtext = "";
|
66 |
-
switch ( $instance['period'] ) {
|
67 |
-
case '7daysAgo' :
|
68 |
-
$periodtext = sprintf( __( 'Last %d Days', 'google-analytics-dashboard-for-wp' ), 7 );
|
69 |
-
break;
|
70 |
-
case '14daysAgo' :
|
71 |
-
$periodtext = sprintf( __( 'Last %d Days', 'google-analytics-dashboard-for-wp' ), 14 );
|
72 |
-
break;
|
73 |
-
case '30daysAgo' :
|
74 |
-
$periodtext = sprintf( __( 'Last %d Days', 'google-analytics-dashboard-for-wp' ), 30 );
|
75 |
-
break;
|
76 |
-
default :
|
77 |
-
$periodtext = "";
|
78 |
-
break;
|
79 |
-
}
|
80 |
-
switch ( $instance['display'] ) {
|
81 |
-
case '1' :
|
82 |
-
echo '<div id="gadwp-widget"><div id="gadwp-widgetchart"></div><div id="gadwp-widgettotals"></div></div>';
|
83 |
-
break;
|
84 |
-
case '2' :
|
85 |
-
echo '<div id="gadwp-widget"><div id="gadwp-widgetchart"></div></div>';
|
86 |
-
break;
|
87 |
-
case '3' :
|
88 |
-
echo '<div id="gadwp-widget"><div id="gadwp-widgettotals"></div></div>';
|
89 |
-
break;
|
90 |
-
}
|
91 |
-
?>
|
92 |
-
<script type="text/javascript">
|
93 |
-
google.charts.load('current', {'packages':['corechart']});
|
94 |
-
google.charts.setOnLoadCallback( GADWPWidgetLoad );
|
95 |
-
function GADWPWidgetLoad (){
|
96 |
-
jQuery.post("<?php echo admin_url( 'admin-ajax.php' ); ?>", {action: "ajax_frontwidget_report", gadwp_number: "<?php echo $this->number; ?>", gadwp_optionname: "<?php echo $this->option_name; ?>" }, function(response){
|
97 |
-
if (!jQuery.isNumeric(response) && jQuery.isArray(response)){
|
98 |
-
if (jQuery("#gadwp-widgetchart")[0]){
|
99 |
-
gadwpFrontWidgetData = response[0];
|
100 |
-
gadwp_drawFrontWidgetChart(gadwpFrontWidgetData);
|
101 |
-
}
|
102 |
-
if (jQuery("#gadwp-widgettotals")[0]){
|
103 |
-
gadwp_drawFrontWidgetTotals(response[1]);
|
104 |
-
}
|
105 |
-
}else{
|
106 |
-
jQuery("#gadwp-widgetchart").css({"background-color":"#F7F7F7","height":"auto","padding-top":"50px","padding-bottom":"50px","color":"#000","text-align":"center"});
|
107 |
-
jQuery("#gadwp-widgetchart").html("<?php __( "This report is unavailable", 'google-analytics-dashboard-for-wp' ); ?> ("+response+")");
|
108 |
-
}
|
109 |
-
});
|
110 |
-
}
|
111 |
-
function gadwp_drawFrontWidgetChart(response) {
|
112 |
-
var data = google.visualization.arrayToDataTable(response);
|
113 |
-
var options = {
|
114 |
-
legend: { position: "none" },
|
115 |
-
pointSize: "3",
|
116 |
-
<?php echo $css; ?>
|
117 |
-
title: "<?php echo $title; ?>",
|
118 |
-
titlePosition: "in",
|
119 |
-
chartArea: { width: "95%", height: "75%" },
|
120 |
-
hAxis: { textPosition: "none"},
|
121 |
-
vAxis: { textPosition: "none", minValue: 0, gridlines: { color: "transparent" }, baselineColor: "transparent"}
|
122 |
-
}
|
123 |
-
var chart = new google.visualization.AreaChart(document.getElementById("gadwp-widgetchart"));
|
124 |
-
<?php echo $formater; ?>
|
125 |
-
chart.draw(data, options);
|
126 |
-
}
|
127 |
-
function gadwp_drawFrontWidgetTotals(response) {
|
128 |
-
if ( null == response ){
|
129 |
-
response = 0;
|
130 |
-
}
|
131 |
-
jQuery("#gadwp-widgettotals").html('<div class="gadwp-left"><?php _e( "Period:", 'google-analytics-dashboard-for-wp' ); ?></div> <div class="gadwp-right"><?php echo $periodtext; ?> </div><div class="gadwp-left"><?php _e( "Sessions:", 'google-analytics-dashboard-for-wp' ); ?></div> <div class="gadwp-right">'+response+'</div>');
|
132 |
-
}
|
133 |
-
</script>
|
134 |
-
<?php
|
135 |
-
if ( 1 == $instance['give_credits'] ) :
|
136 |
-
?>
|
137 |
-
<div style="text-align: right; width: 100%; font-size: 0.8em; clear: both; margin-right: 5px;"><?php _e( 'generated by', 'google-analytics-dashboard-for-wp' ); ?> <a href="https://exactmetrics.com/?utm_source=gadwp_report&utm_medium=link&utm_content=front_widget&utm_campaign=gadwp" rel="nofollow" style="text-decoration: none; font-size: 1em;">GADWP</a>
|
138 |
-
</div>
|
139 |
-
|
140 |
-
<?php
|
141 |
-
endif;
|
142 |
-
$widget_content = ob_get_contents();
|
143 |
-
if ( ob_get_length() ) {
|
144 |
-
ob_end_clean();
|
145 |
-
}
|
146 |
-
echo $widget_content;
|
147 |
-
echo $args['after_widget'];
|
148 |
-
echo "\n<!-- END GADWP Widget -->\n";
|
149 |
-
}
|
150 |
-
|
151 |
-
public function form( $instance ) {
|
152 |
-
$widget_title = ( isset( $instance['title'] ) ? $instance['title'] : __( "Google Analytics Stats", 'google-analytics-dashboard-for-wp' ) );
|
153 |
-
$period = ( isset( $instance['period'] ) ? $instance['period'] : '7daysAgo' );
|
154 |
-
$display = ( isset( $instance['display'] ) ? $instance['display'] : 1 );
|
155 |
-
$give_credits = ( isset( $instance['give_credits'] ) ? $instance['give_credits'] : 1 );
|
156 |
-
$anonim = ( isset( $instance['anonim'] ) ? $instance['anonim'] : 0 );
|
157 |
-
/* @formatter:off */
|
158 |
-
?>
|
159 |
-
<p>
|
160 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( "Title:",'google-analytics-dashboard-for-wp' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $widget_title ); ?>">
|
161 |
-
</p>
|
162 |
-
<p>
|
163 |
-
<label for="<?php echo $this->get_field_id( 'display' ); ?>"><?php _e( "Display:",'google-analytics-dashboard-for-wp' ); ?></label> <select id="<?php echo $this->get_field_id('display'); ?>" class="widefat" name="<?php echo $this->get_field_name( 'display' ); ?>">
|
164 |
-
<option value="1" <?php selected( $display, 1 ); ?>><?php _e('Chart & Totals', 'google-analytics-dashboard-for-wp');?></option>
|
165 |
-
<option value="2" <?php selected( $display, 2 ); ?>><?php _e('Chart', 'google-analytics-dashboard-for-wp');?></option>
|
166 |
-
<option value="3" <?php selected( $display, 3 ); ?>><?php _e('Totals', 'google-analytics-dashboard-for-wp');?></option>
|
167 |
-
</select>
|
168 |
-
</p>
|
169 |
-
<p>
|
170 |
-
<label for="<?php echo $this->get_field_id( 'anonim' ); ?>"><?php _e( "Anonymize stats:",'google-analytics-dashboard-for-wp' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'anonim' ); ?>" name="<?php echo $this->get_field_name( 'anonim' ); ?>" type="checkbox" <?php checked( $anonim, 1 ); ?> value="1">
|
171 |
-
</p>
|
172 |
-
<p>
|
173 |
-
<label for="<?php echo $this->get_field_id( 'period' ); ?>"><?php _e( "Stats for:",'google-analytics-dashboard-for-wp' ); ?></label> <select id="<?php echo $this->get_field_id('period'); ?>" class="widefat" name="<?php echo $this->get_field_name( 'period' ); ?>">
|
174 |
-
<option value="7daysAgo" <?php selected( $period, '7daysAgo' ); ?>><?php printf( __('Last %d Days', 'google-analytics-dashboard-for-wp'), 7 );?></option>
|
175 |
-
<option value="14daysAgo" <?php selected( $period, '14daysAgo' ); ?>><?php printf( __('Last %d Days', 'google-analytics-dashboard-for-wp'), 14 );?></option>
|
176 |
-
<option value="30daysAgo" <?php selected( $period, '30daysAgo' ); ?>><?php printf( __('Last %d Days', 'google-analytics-dashboard-for-wp'), 30 );?></option>
|
177 |
-
</select>
|
178 |
-
</p>
|
179 |
-
<p>
|
180 |
-
<label for="<?php echo $this->get_field_id( 'give_credits' ); ?>"><?php _e( "Give credits:",'google-analytics-dashboard-for-wp' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id( 'give_credits' ); ?>" name="<?php echo $this->get_field_name( 'give_credits' ); ?>" type="checkbox" <?php checked( $give_credits, 1 ); ?> value="1">
|
181 |
-
</p>
|
182 |
-
<?php
|
183 |
-
/* @formatter:on */
|
184 |
-
}
|
185 |
-
|
186 |
-
public function update( $new_instance, $old_instance ) {
|
187 |
-
$instance = array();
|
188 |
-
$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : 'Analytics Stats';
|
189 |
-
$instance['period'] = ( ! empty( $new_instance['period'] ) ) ? strip_tags( $new_instance['period'] ) : '7daysAgo';
|
190 |
-
$instance['display'] = ( ! empty( $new_instance['display'] ) ) ? strip_tags( $new_instance['display'] ) : 1;
|
191 |
-
$instance['give_credits'] = ( ! empty( $new_instance['give_credits'] ) ) ? strip_tags( $new_instance['give_credits'] ) : 0;
|
192 |
-
$instance['anonim'] = ( ! empty( $new_instance['anonim'] ) ) ? strip_tags( $new_instance['anonim'] ) : 0;
|
193 |
-
return $instance;
|
194 |
-
}
|
195 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gadwp.php
CHANGED
@@ -4,284 +4,725 @@
|
|
4 |
* Plugin URI: https://exactmetrics.com
|
5 |
* Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website.
|
6 |
* Author: ExactMetrics
|
7 |
-
* Version:
|
8 |
* Author URI: https://exactmetrics.com
|
9 |
* Text Domain: google-analytics-dashboard-for-wp
|
10 |
* Domain Path: /languages
|
11 |
*/
|
12 |
|
13 |
-
// Exit if accessed directly
|
14 |
-
if ( ! defined( 'ABSPATH' ) )
|
15 |
-
exit
|
16 |
-
|
17 |
-
// Plugin Version
|
18 |
-
if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) {
|
19 |
-
define( 'GADWP_CURRENT_VERSION', '5.3.9' );
|
20 |
}
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
|
|
|
|
|
|
|
|
|
28 |
|
29 |
-
|
|
|
30 |
|
31 |
-
|
|
|
32 |
|
33 |
-
|
|
|
34 |
|
35 |
-
|
|
|
36 |
|
37 |
-
|
|
|
38 |
|
39 |
-
|
|
|
|
|
|
|
|
|
40 |
|
41 |
-
|
|
|
|
|
42 |
|
43 |
-
|
|
|
44 |
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
|
|
|
|
|
|
|
|
|
48 |
|
49 |
-
|
|
|
|
|
50 |
|
51 |
-
|
52 |
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
|
|
|
|
|
|
64 |
}
|
|
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
*/
|
76 |
-
private function __wakeup() {
|
77 |
-
_doing_it_wrong( __FUNCTION__, __( "This is not allowed, read the documentation!", 'google-analytics-dashboard-for-wp' ), '4.6' );
|
78 |
}
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
*
|
83 |
-
* @return GADWP_Manager
|
84 |
-
*/
|
85 |
-
public static function instance() {
|
86 |
-
if ( null === self::$instance ) {
|
87 |
-
self::$instance = new self();
|
88 |
-
self::$instance->setup();
|
89 |
-
self::$instance->config = new GADWP_Config();
|
90 |
-
if ( is_admin() && class_exists( 'AM_Notification' ) && defined( 'GADWP_CURRENT_VERSION' ) ) {
|
91 |
-
new AM_Notification( 'exact-metrics', GADWP_CURRENT_VERSION );
|
92 |
-
}
|
93 |
-
}
|
94 |
-
return self::$instance;
|
95 |
}
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
private function setup() {
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
}
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
}
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
/*
|
140 |
-
* Plugin i18n
|
141 |
-
*/
|
142 |
-
add_action( 'init', array( self::$instance, 'load_i18n' ) );
|
143 |
-
|
144 |
-
/*
|
145 |
-
* Plugin Init
|
146 |
-
*/
|
147 |
-
add_action( 'init', array( self::$instance, 'load' ) );
|
148 |
-
|
149 |
-
/*
|
150 |
-
* Include Install
|
151 |
-
*/
|
152 |
-
include_once ( GADWP_DIR . 'install/install.php' );
|
153 |
-
register_activation_hook( GADWP_FILE, array( 'GADWP_Install', 'install' ) );
|
154 |
-
|
155 |
-
/*
|
156 |
-
* Include Uninstall
|
157 |
-
*/
|
158 |
-
include_once ( GADWP_DIR . 'install/uninstall.php' );
|
159 |
-
register_uninstall_hook( GADWP_FILE, array( 'GADWP_Uninstall', 'uninstall' ) );
|
160 |
-
|
161 |
-
/*
|
162 |
-
* Load Frontend Widgets
|
163 |
-
* (needed during ajax)
|
164 |
-
*/
|
165 |
-
include_once ( GADWP_DIR . 'front/widgets.php' );
|
166 |
-
|
167 |
-
/*
|
168 |
-
* Add Frontend Widgets
|
169 |
-
* (needed during ajax)
|
170 |
-
*/
|
171 |
-
add_action( 'widgets_init', array( self::$instance, 'add_frontend_widget' ) );
|
172 |
}
|
173 |
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
/*
|
224 |
-
* Load Backend Setup
|
225 |
-
*/
|
226 |
-
include_once ( GADWP_DIR . 'admin/setup.php' );
|
227 |
-
self::$instance->backend_setup = new GADWP_Backend_Setup();
|
228 |
-
|
229 |
-
if ( self::$instance->config->options['dashboard_widget'] ) {
|
230 |
-
/*
|
231 |
-
* Load Backend Widget
|
232 |
-
*/
|
233 |
-
include_once ( GADWP_DIR . 'admin/widgets.php' );
|
234 |
-
self::$instance->backend_widgets = new GADWP_Backend_Widgets();
|
235 |
-
}
|
236 |
-
|
237 |
-
if ( self::$instance->config->options['backend_item_reports'] ) {
|
238 |
-
/*
|
239 |
-
* Load Backend Item Reports
|
240 |
-
*/
|
241 |
-
include_once ( GADWP_DIR . 'admin/item-reports.php' );
|
242 |
-
self::$instance->backend_item_reports = new GADWP_Backend_Item_Reports();
|
243 |
-
}
|
244 |
-
|
245 |
-
include_once ( GADWP_DIR . 'admin/tracking.php' );
|
246 |
-
self::$instance->usage_tracking = new ExactMetrics_Tracking();
|
247 |
-
}
|
248 |
-
} else {
|
249 |
-
if ( GADWP_Tools::check_roles( self::$instance->config->options['access_front'] ) ) {
|
250 |
-
/*
|
251 |
-
* Load Frontend Setup
|
252 |
-
*/
|
253 |
-
include_once ( GADWP_DIR . 'front/setup.php' );
|
254 |
-
self::$instance->frontend_setup = new GADWP_Frontend_Setup();
|
255 |
-
|
256 |
-
if ( self::$instance->config->options['frontend_item_reports'] ) {
|
257 |
-
/*
|
258 |
-
* Load Frontend Item Reports
|
259 |
-
*/
|
260 |
-
include_once ( GADWP_DIR . 'front/item-reports.php' );
|
261 |
-
self::$instance->frontend_item_reports = new GADWP_Frontend_Item_Reports();
|
262 |
-
}
|
263 |
-
}
|
264 |
-
|
265 |
-
if ( ! GADWP_Tools::check_roles( self::$instance->config->options['track_exclude'], true ) && 'disabled' != self::$instance->config->options['tracking_type'] ) {
|
266 |
-
/*
|
267 |
-
* Load tracking class
|
268 |
-
*/
|
269 |
-
include_once ( GADWP_DIR . 'front/tracking.php' );
|
270 |
-
self::$instance->tracking = new GADWP_Tracking();
|
271 |
-
}
|
272 |
-
}
|
273 |
}
|
274 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
}
|
276 |
|
277 |
/**
|
278 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
*/
|
280 |
-
function
|
281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
}
|
|
|
283 |
|
284 |
-
|
285 |
-
*
|
|
|
|
|
|
|
|
|
|
|
286 |
*/
|
287 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
* Plugin URI: https://exactmetrics.com
|
5 |
* Description: Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website.
|
6 |
* Author: ExactMetrics
|
7 |
+
* Version: 6.0.0
|
8 |
* Author URI: https://exactmetrics.com
|
9 |
* Text Domain: google-analytics-dashboard-for-wp
|
10 |
* Domain Path: /languages
|
11 |
*/
|
12 |
|
13 |
+
// Exit if accessed directly.
|
14 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
+
exit;
|
|
|
|
|
|
|
|
|
16 |
}
|
17 |
|
18 |
+
/**
|
19 |
+
* Main plugin class.
|
20 |
+
*
|
21 |
+
* @since 6.0.0
|
22 |
+
*
|
23 |
+
* @package ExactMetrics
|
24 |
+
* @author Chris Christoff
|
25 |
+
* @access public
|
26 |
+
*/
|
27 |
+
final class ExactMetrics_Lite {
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Holds the class object.
|
31 |
+
*
|
32 |
+
* @since 6.0.0
|
33 |
+
* @access public
|
34 |
+
* @var object Instance of instantiated ExactMetrics class.
|
35 |
+
*/
|
36 |
+
public static $instance;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Plugin version, used for cache-busting of style and script file references.
|
40 |
+
*
|
41 |
+
* @since 6.0.0
|
42 |
+
* @access public
|
43 |
+
* @var string $version Plugin version.
|
44 |
+
*/
|
45 |
+
public $version = '6.0.0';
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Plugin file.
|
49 |
+
*
|
50 |
+
* @since 6.0.0
|
51 |
+
* @access public
|
52 |
+
* @var string $file PHP File constant for main file.
|
53 |
+
*/
|
54 |
+
public $file;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* The name of the plugin.
|
58 |
+
*
|
59 |
+
* @since 6.0.0
|
60 |
+
* @access public
|
61 |
+
* @var string $plugin_name Plugin name.
|
62 |
+
*/
|
63 |
+
public $plugin_name = 'ExactMetrics Lite';
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Unique plugin slug identifier.
|
67 |
+
*
|
68 |
+
* @since 6.0.0
|
69 |
+
* @access public
|
70 |
+
* @var string $plugin_slug Plugin slug.
|
71 |
+
*/
|
72 |
+
public $plugin_slug = 'exactmetrics-lite';
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Holds instance of ExactMetrics License class.
|
76 |
+
*
|
77 |
+
* @since 6.0.0
|
78 |
+
* @access public
|
79 |
+
* @var ExactMetrics_License $license Instance of License class.
|
80 |
+
*/
|
81 |
+
protected $license;
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Holds instance of ExactMetrics Admin Notice class.
|
85 |
+
*
|
86 |
+
* @since 6.0.0
|
87 |
+
* @access public
|
88 |
+
* @var ExactMetrics_Admin_Notice $notices Instance of Admin Notice class.
|
89 |
+
*/
|
90 |
+
public $notices;
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Holds instance of ExactMetrics Reporting class.
|
94 |
+
*
|
95 |
+
* @since 6.0.0
|
96 |
+
* @access public
|
97 |
+
* @var ExactMetrics_Reporting $reporting Instance of Reporting class.
|
98 |
+
*/
|
99 |
+
public $reporting;
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Holds instance of ExactMetrics Auth class.
|
103 |
+
*
|
104 |
+
* @since 7.0.0
|
105 |
+
* @access public
|
106 |
+
* @var ExactMetrics_Auth $auth Instance of Auth class.
|
107 |
+
*/
|
108 |
+
protected $auth;
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Holds instance of ExactMetrics API Auth class.
|
112 |
+
*
|
113 |
+
* @since 6.0.0
|
114 |
+
* @access public
|
115 |
+
* @var ExactMetrics_Auth $api_auth Instance of APIAuth class.
|
116 |
+
*/
|
117 |
+
public $api_auth;
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Holds instance of ExactMetrics API Rest Routes class.
|
121 |
+
*
|
122 |
+
* @since 7.4.0
|
123 |
+
* @access public
|
124 |
+
* @var ExactMetrics_Rest_Routes $routes Instance of rest routes.
|
125 |
+
*/
|
126 |
+
public $routes;
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Primary class constructor.
|
130 |
+
*
|
131 |
+
* @since 6.0.0
|
132 |
+
* @access public
|
133 |
+
*/
|
134 |
+
public function __construct() {
|
135 |
+
// We don't use this
|
136 |
+
}
|
137 |
|
138 |
+
/**
|
139 |
+
* Returns the singleton instance of the class.
|
140 |
+
*
|
141 |
+
* @access public
|
142 |
+
* @since 6.0.0
|
143 |
+
*
|
144 |
+
* @return object The ExactMetrics_Lite object.
|
145 |
+
*/
|
146 |
+
public static function get_instance() {
|
147 |
+
|
148 |
+
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof ExactMetrics_Lite ) ) {
|
149 |
+
self::$instance = new ExactMetrics_Lite();
|
150 |
+
self::$instance->file = __FILE__;
|
151 |
+
|
152 |
+
global $wp_version;
|
153 |
+
|
154 |
+
// Detect non-supported WordPress version and return early
|
155 |
+
if ( version_compare( $wp_version, '3.8', '<' ) && ( ! defined( 'EXACTMETRICS_FORCE_ACTIVATION' ) || ! EXACTMETRICS_FORCE_ACTIVATION ) ) {
|
156 |
+
add_action( 'admin_notices', array( self::$instance, 'exactmetrics_wp_notice' ) );
|
157 |
+
return;
|
158 |
+
}
|
159 |
|
160 |
+
// Detect Pro version and return early
|
161 |
+
if ( defined( 'EXACTMETRICS_PRO_VERSION' ) ) {
|
162 |
+
add_action( 'admin_notices', array( self::$instance, 'exactmetrics_pro_notice' ) );
|
163 |
+
return;
|
164 |
+
}
|
165 |
|
166 |
+
// Define constants
|
167 |
+
self::$instance->define_globals();
|
168 |
|
169 |
+
// Load in settings
|
170 |
+
self::$instance->load_settings();
|
171 |
|
172 |
+
// Load in Licensing
|
173 |
+
self::$instance->load_licensing();
|
174 |
|
175 |
+
// Load in Auth
|
176 |
+
self::$instance->load_auth();
|
177 |
|
178 |
+
// Load files
|
179 |
+
self::$instance->require_files();
|
180 |
|
181 |
+
// This does the version to version background upgrade routines and initial install
|
182 |
+
$mi_version = get_option( 'exactmetrics_current_version', '5.5.3' );
|
183 |
+
if ( version_compare( $mi_version, '6.0.0', '<' ) ) {
|
184 |
+
exactmetrics_lite_call_install_and_upgrade();
|
185 |
+
}
|
186 |
|
187 |
+
if ( is_admin() ) {
|
188 |
+
new AM_Deactivation_Survey( 'ExactMetrics', 'google-analytics-dashboard-for-wp' );
|
189 |
+
}
|
190 |
|
191 |
+
// Load the plugin textdomain.
|
192 |
+
add_action( 'plugins_loaded', array( self::$instance, 'load_plugin_textdomain' ) );
|
193 |
|
194 |
+
// Load admin only components.
|
195 |
+
if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) {
|
196 |
+
self::$instance->notices = new ExactMetrics_Notice_Admin();
|
197 |
+
self::$instance->reporting = new ExactMetrics_Reporting();
|
198 |
+
self::$instance->api_auth = new ExactMetrics_API_Auth();
|
199 |
+
self::$instance->routes = new ExactMetrics_Rest_Routes();
|
200 |
+
}
|
201 |
|
202 |
+
if ( exactmetrics_is_pro_version() ) {
|
203 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'pro/includes/load.php';
|
204 |
+
} else {
|
205 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'lite/includes/load.php';
|
206 |
+
}
|
207 |
|
208 |
+
// Run hook to load ExactMetrics addons.
|
209 |
+
do_action( 'exactmetrics_load_plugins' ); // the updater class for each addon needs to be instantiated via `exactmetrics_updater`
|
210 |
+
}
|
211 |
|
212 |
+
return self::$instance;
|
213 |
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Throw error on object clone
|
218 |
+
*
|
219 |
+
* The whole idea of the singleton design pattern is that there is a single
|
220 |
+
* object therefore, we don't want the object to be cloned.
|
221 |
+
*
|
222 |
+
* @since 6.0.0
|
223 |
+
* @access public
|
224 |
+
*
|
225 |
+
* @return void
|
226 |
+
*/
|
227 |
+
public function __clone() {
|
228 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'google-analytics-dashboard-for-wp' ), '6.0.0' );
|
229 |
+
}
|
230 |
|
231 |
+
/**
|
232 |
+
* Disable unserializing of the class
|
233 |
+
*
|
234 |
+
* Attempting to wakeup an ExactMetrics instance will throw a doing it wrong notice.
|
235 |
+
*
|
236 |
+
* @since 6.0.0
|
237 |
+
* @access public
|
238 |
+
*
|
239 |
+
* @return void
|
240 |
+
*/
|
241 |
+
public function __wakeup() {
|
242 |
+
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'google-analytics-dashboard-for-wp' ), '6.0.0' );
|
243 |
+
}
|
244 |
|
245 |
+
/**
|
246 |
+
* Magic get function.
|
247 |
+
*
|
248 |
+
* We use this to lazy load certain functionality. Right now used to lazyload
|
249 |
+
* the API & Auth frontend, so it's only loaded if user is using a plugin
|
250 |
+
* that requires it.
|
251 |
+
*
|
252 |
+
* @since 7.0.0
|
253 |
+
* @access public
|
254 |
+
*
|
255 |
+
* @return void
|
256 |
+
*/
|
257 |
+
public function __get( $key ) {
|
258 |
+
if ( $key === 'auth' ) {
|
259 |
+
if ( empty( self::$instance->auth ) ) {
|
260 |
+
// LazyLoad Auth for Frontend
|
261 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/auth.php';
|
262 |
+
self::$instance->auth = new ExactMetrics_Auth();
|
263 |
}
|
264 |
+
return self::$instance->$key;
|
265 |
+
} else {
|
266 |
+
return self::$instance->$key;
|
267 |
}
|
268 |
+
}
|
269 |
|
270 |
+
/**
|
271 |
+
* Define ExactMetrics constants.
|
272 |
+
*
|
273 |
+
* This function defines all of the ExactMetrics PHP constants.
|
274 |
+
*
|
275 |
+
* @since 6.0.0
|
276 |
+
* @access public
|
277 |
+
*
|
278 |
+
* @return void
|
279 |
+
*/
|
280 |
+
public function define_globals() {
|
281 |
+
|
282 |
+
if ( ! defined( 'EXACTMETRICS_VERSION' ) ) {
|
283 |
+
define( 'EXACTMETRICS_VERSION', $this->version );
|
284 |
}
|
285 |
|
286 |
+
if ( ! defined( 'EXACTMETRICS_LITE_VERSION' ) ) {
|
287 |
+
define( 'EXACTMETRICS_LITE_VERSION', EXACTMETRICS_VERSION );
|
|
|
|
|
|
|
288 |
}
|
289 |
|
290 |
+
if ( ! defined( 'EXACTMETRICS_PLUGIN_NAME' ) ) {
|
291 |
+
define( 'EXACTMETRICS_PLUGIN_NAME', $this->plugin_name );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
}
|
293 |
|
294 |
+
if ( ! defined( 'EXACTMETRICS_PLUGIN_SLUG' ) ) {
|
295 |
+
define( 'EXACTMETRICS_PLUGIN_SLUG', $this->plugin_slug );
|
296 |
+
}
|
|
|
297 |
|
298 |
+
if ( ! defined( 'EXACTMETRICS_PLUGIN_FILE' ) ) {
|
299 |
+
define( 'EXACTMETRICS_PLUGIN_FILE', $this->file );
|
300 |
+
}
|
|
|
301 |
|
302 |
+
if ( ! defined( 'EXACTMETRICS_PLUGIN_DIR' ) ) {
|
303 |
+
define( 'EXACTMETRICS_PLUGIN_DIR', plugin_dir_path( $this->file ) );
|
304 |
+
}
|
|
|
305 |
|
306 |
+
if ( ! defined( 'EXACTMETRICS_PLUGIN_URL' ) ) {
|
307 |
+
define( 'EXACTMETRICS_PLUGIN_URL', plugin_dir_url( $this->file ) );
|
308 |
+
}
|
309 |
+
}
|
310 |
|
311 |
+
/**
|
312 |
+
* Loads the plugin textdomain for translation.
|
313 |
+
*
|
314 |
+
* @access public
|
315 |
+
* @since 6.0.0
|
316 |
+
*
|
317 |
+
* @return void
|
318 |
+
*/
|
319 |
+
public function load_plugin_textdomain() {
|
320 |
+
|
321 |
+
$mi_locale = get_locale();
|
322 |
+
if ( function_exists( 'get_user_locale' ) ) {
|
323 |
+
$mi_locale = get_user_locale();
|
324 |
+
}
|
325 |
+
|
326 |
+
// Traditional WordPress plugin locale filter.
|
327 |
+
$mi_locale = apply_filters( 'plugin_locale', $mi_locale, 'google-analytics-dashboard-for-wp' );
|
328 |
+
$mi_mofile = sprintf( '%1$s-%2$s.mo', 'google-analytics-dashboard-for-wp', $mi_locale );
|
329 |
+
|
330 |
+
// Look for wp-content/languages/google-analytics-dashboard-for-wp/google-analytics-dashboard-for-wp-{lang}_{country}.mo
|
331 |
+
$mi_mofile1 = WP_LANG_DIR . '/google-analytics-dashboard-for-wp/' . $mi_mofile;
|
332 |
+
|
333 |
+
// Look in wp-content/languages/plugins/google-analytics-dashboard-for-wp/google-analytics-dashboard-for-wp-{lang}_{country}.mo
|
334 |
+
$mi_mofile2 = WP_LANG_DIR . '/plugins/google-analytics-dashboard-for-wp/' . $mi_mofile;
|
335 |
|
336 |
+
// Look in wp-content/languages/plugins/google-analytics-dashboard-for-wp-{lang}_{country}.mo
|
337 |
+
$mi_mofile3 = WP_LANG_DIR . '/plugins/' . $mi_mofile;
|
338 |
+
|
339 |
+
// Look in wp-content/plugins/google-analytics-dashboard-for-wp/languages/google-analytics-dashboard-for-wp-{lang}_{country}.mo
|
340 |
+
$mi_mofile4 = dirname( plugin_basename( EXACTMETRICS_PLUGIN_FILE ) ) . '/languages/';
|
341 |
+
$mi_mofile4 = apply_filters( 'exactmetrics_lite_languages_directory', $mi_mofile4 );
|
342 |
+
|
343 |
+
if ( file_exists( $mi_mofile1 ) ) {
|
344 |
+
load_textdomain( 'google-analytics-dashboard-for-wp', $mi_mofile1 );
|
345 |
+
} elseif ( file_exists( $mi_mofile2 ) ) {
|
346 |
+
load_textdomain( 'google-analytics-dashboard-for-wp', $mi_mofile2 );
|
347 |
+
} elseif ( file_exists( $mi_mofile3 ) ) {
|
348 |
+
load_textdomain( 'google-analytics-dashboard-for-wp', $mi_mofile3 );
|
349 |
+
} else {
|
350 |
+
load_plugin_textdomain( 'google-analytics-dashboard-for-wp', false, $mi_mofile4 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
}
|
352 |
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Output a nag notice if the user has an out of date WP version installed
|
357 |
+
*
|
358 |
+
* @access public
|
359 |
+
* @since 6.0.0
|
360 |
+
*
|
361 |
+
* @return void
|
362 |
+
*/
|
363 |
+
public function exactmetrics_wp_notice() {
|
364 |
+
$url = admin_url( 'plugins.php' );
|
365 |
+
// Check for MS dashboard
|
366 |
+
if( is_network_admin() ) {
|
367 |
+
$url = network_admin_url( 'plugins.php' );
|
368 |
}
|
369 |
+
?>
|
370 |
+
<div class="error">
|
371 |
+
<p>
|
372 |
+
<?php
|
373 |
+
// Translators: Make version number bold and add a link to return to the plugins page.
|
374 |
+
echo sprintf( esc_html__( 'Sorry, but your version of WordPress does not meet ExactMetrics\'s required version of %1$s3.8%2$s to run properly. The plugin not been activated. %3$sClick here to return to the Dashboard%4$s.', 'google-analytics-dashboard-for-wp' ), '<strong>', '</strong>', '<a href="' . $url . '">', '</a>' );
|
375 |
+
?>
|
376 |
+
</p>
|
377 |
+
</div>
|
378 |
+
<?php
|
379 |
+
}
|
380 |
|
381 |
+
/**
|
382 |
+
* Output a nag notice if the user has both Lite and Pro activated
|
383 |
+
*
|
384 |
+
* @access public
|
385 |
+
* @since 6.0.0
|
386 |
+
*
|
387 |
+
* @return void
|
388 |
+
*/
|
389 |
+
public function exactmetrics_pro_notice() {
|
390 |
+
$url = admin_url( 'plugins.php' );
|
391 |
+
// Check for MS dashboard
|
392 |
+
if( is_network_admin() ) {
|
393 |
+
$url = network_admin_url( 'plugins.php' );
|
394 |
}
|
395 |
+
?>
|
396 |
+
<div class="error">
|
397 |
+
<p>
|
398 |
+
<?php
|
399 |
+
// Translators: Adds a link to the plugins page.
|
400 |
+
echo sprintf( esc_html__( 'Please %1$suninstall%2$s the ExactMetrics Lite Plugin. Your Pro version of ExactMetrics may not work as expected until the Lite version is uninstalled.', 'google-analytics-dashboard-for-wp' ), '<a href="' . $url . '">', '</a>' );
|
401 |
+
?>
|
402 |
+
</p>
|
403 |
+
</div>
|
404 |
+
<?php
|
405 |
|
406 |
+
}
|
407 |
+
|
408 |
+
/**
|
409 |
+
* Loads ExactMetrics settings
|
410 |
+
*
|
411 |
+
* Adds the items to the base object, and adds the helper functions.
|
412 |
+
*
|
413 |
+
* @since 6.0.0
|
414 |
+
* @access public
|
415 |
+
*
|
416 |
+
* @return void
|
417 |
+
*/
|
418 |
+
public function load_settings() {
|
419 |
+
global $exactmetrics_settings;
|
420 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/options.php';
|
421 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/helpers.php';
|
422 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/deprecated.php';
|
423 |
+
$exactmetrics_settings = exactmetrics_get_options();
|
424 |
+
}
|
425 |
+
|
426 |
+
|
427 |
+
/**
|
428 |
+
* Loads ExactMetrics License
|
429 |
+
*
|
430 |
+
* Loads license class used by ExactMetrics
|
431 |
+
*
|
432 |
+
* @since 7.0.0
|
433 |
+
* @access public
|
434 |
+
*
|
435 |
+
* @return void
|
436 |
+
*/
|
437 |
+
public function load_licensing(){
|
438 |
+
if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) {
|
439 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'lite/includes/license-compat.php';
|
440 |
+
self::$instance->license = new ExactMetrics_License_Compat();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
}
|
442 |
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Loads ExactMetrics Auth
|
446 |
+
*
|
447 |
+
* Loads auth used by ExactMetrics
|
448 |
+
*
|
449 |
+
* @since 7.0.0
|
450 |
+
* @access public
|
451 |
+
*
|
452 |
+
* @return void
|
453 |
+
*/
|
454 |
+
public function load_auth() {
|
455 |
+
if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) {
|
456 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/auth.php';
|
457 |
+
self::$instance->auth = new ExactMetrics_Auth();
|
458 |
+
}
|
459 |
+
}
|
460 |
+
|
461 |
+
/**
|
462 |
+
* Loads all files into scope.
|
463 |
+
*
|
464 |
+
* @access public
|
465 |
+
* @since 6.0.0
|
466 |
+
*
|
467 |
+
* @return void
|
468 |
+
*/
|
469 |
+
public function require_files() {
|
470 |
+
|
471 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/capabilities.php';
|
472 |
+
|
473 |
+
if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) {
|
474 |
+
|
475 |
+
// Lite and Pro files
|
476 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'assets/lib/pandora/class-am-deactivation-survey.php';
|
477 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/ajax.php';
|
478 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/admin.php';
|
479 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/common.php';
|
480 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/notice.php';
|
481 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/licensing/autoupdate.php';
|
482 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/review.php';
|
483 |
+
|
484 |
+
// Pages
|
485 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/pages/settings.php';
|
486 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/pages/tools.php';
|
487 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/pages/reports.php';
|
488 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/pages/addons.php';
|
489 |
+
|
490 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/api-auth.php';
|
491 |
+
|
492 |
+
// Reports
|
493 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/reports/abstract-report.php';
|
494 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/reports/overview.php';
|
495 |
+
|
496 |
+
// Reporting Functionality
|
497 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/reporting.php';
|
498 |
+
|
499 |
+
// Routes used by Vue
|
500 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/routes.php';
|
501 |
+
}
|
502 |
+
|
503 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/api-request.php';
|
504 |
+
|
505 |
+
if ( is_admin() || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) {
|
506 |
+
// Late loading classes (self instantiating)
|
507 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/admin/tracking.php';
|
508 |
+
}
|
509 |
+
|
510 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/frontend/frontend.php';
|
511 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/frontend/seedprod.php';
|
512 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/measurement-protocol.php';
|
513 |
+
}
|
514 |
}
|
515 |
|
516 |
/**
|
517 |
+
* Fired when the plugin is activated.
|
518 |
+
*
|
519 |
+
* @access public
|
520 |
+
* @since 6.0.0
|
521 |
+
*
|
522 |
+
* @global int $wp_version The version of WordPress for this install.
|
523 |
+
* @global object $wpdb The WordPress database object.
|
524 |
+
* @param boolean $network_wide True if WPMU superadmin uses "Network Activate" action, false otherwise.
|
525 |
+
*
|
526 |
+
* @return void
|
527 |
*/
|
528 |
+
function exactmetrics_lite_activation_hook( $network_wide ) {
|
529 |
+
|
530 |
+
global $wp_version;
|
531 |
+
|
532 |
+
$url = admin_url( 'plugins.php' );
|
533 |
+
// Check for MS dashboard
|
534 |
+
if ( is_network_admin() ) {
|
535 |
+
$url = network_admin_url( 'plugins.php' );
|
536 |
+
}
|
537 |
+
|
538 |
+
if ( version_compare( $wp_version, '3.8', '<' ) && ( ! defined( 'EXACTMETRICS_FORCE_ACTIVATION' ) || ! EXACTMETRICS_FORCE_ACTIVATION ) ) {
|
539 |
+
deactivate_plugins( plugin_basename( __FILE__ ) );
|
540 |
+
wp_die( sprintf( esc_html__( 'Sorry, but your version of WordPress does not meet MonsterInsight\'s required version of %1$s3.8%2$s to run properly. The plugin not been activated. %3$sClick here to return to the Dashboard%4$s.', 'google-analytics-by-wordpress' ), '<strong>', '</strong>', '<a href="' . $url . '">', '</a>' ) );
|
541 |
+
}
|
542 |
+
|
543 |
+
if ( class_exists( 'ExactMetrics' ) ) {
|
544 |
+
deactivate_plugins( plugin_basename( __FILE__ ) );
|
545 |
+
wp_die( sprintf( esc_html__( 'Please uninstall and remove ExactMetrics Pro before activating Google Analytics Dashboard for WP (GADWP). The Lite version has not been activated. %1$sClick here to return to the Dashboard%2$s.', 'google-analytics-by-wordpress' ), '<a href="' . $url . '">', '</a>' ) );
|
546 |
+
}
|
547 |
+
|
548 |
+
// Add transient to trigger redirect.
|
549 |
+
set_transient( '_exactmetrics_activation_redirect', 1, 30 );
|
550 |
}
|
551 |
+
register_activation_hook( __FILE__, 'exactmetrics_lite_activation_hook' );
|
552 |
|
553 |
+
/**
|
554 |
+
* Fired when the plugin is uninstalled.
|
555 |
+
*
|
556 |
+
* @access public
|
557 |
+
* @since 6.0.0
|
558 |
+
*
|
559 |
+
* @return void
|
560 |
*/
|
561 |
+
function exactmetrics_lite_uninstall_hook() {
|
562 |
+
wp_cache_flush();
|
563 |
+
|
564 |
+
// Note, if both MI Pro and Lite are active, this is an MI Pro instance
|
565 |
+
// Therefore MI Lite can only use functions of the instance common to
|
566 |
+
// both plugins. If it needs to be pro specific, then include a file that
|
567 |
+
// has that method.
|
568 |
+
$instance = ExactMetrics();
|
569 |
+
|
570 |
+
// If uninstalling via wp-cli load admin-specific files only here.
|
571 |
+
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
572 |
+
define( 'WP_ADMIN', true );
|
573 |
+
$instance->require_files();
|
574 |
+
$instance->load_auth();
|
575 |
+
$instance->notices = new ExactMetrics_Notice_Admin();
|
576 |
+
$instance->reporting = new ExactMetrics_Reporting();
|
577 |
+
$instance->api_auth = new ExactMetrics_API_Auth();
|
578 |
+
}
|
579 |
+
|
580 |
+
// Don't delete any data if the PRO version is already active.
|
581 |
+
if ( exactmetrics_is_pro_version() ) {
|
582 |
+
return;
|
583 |
+
}
|
584 |
+
|
585 |
+
if ( is_multisite() ) {
|
586 |
+
$site_list = get_sites();
|
587 |
+
foreach ( (array) $site_list as $site ) {
|
588 |
+
switch_to_blog( $site->blog_id );
|
589 |
+
|
590 |
+
// Delete auth
|
591 |
+
$instance->api_auth->delete_auth();
|
592 |
+
|
593 |
+
// Delete data
|
594 |
+
$instance->reporting->delete_aggregate_data('site');
|
595 |
+
|
596 |
+
restore_current_blog();
|
597 |
+
}
|
598 |
+
// Delete network auth using a custom function as some variables are not initiated.
|
599 |
+
$instance->api_auth->uninstall_network_auth();
|
600 |
+
|
601 |
+
// Delete network data
|
602 |
+
$instance->reporting->delete_aggregate_data('network');
|
603 |
+
} else {
|
604 |
+
// Delete auth
|
605 |
+
$instance->api_auth->delete_auth();
|
606 |
+
|
607 |
+
// Delete data
|
608 |
+
$instance->reporting->delete_aggregate_data('site');
|
609 |
+
}
|
610 |
+
|
611 |
+
}
|
612 |
+
register_uninstall_hook( __FILE__, 'exactmetrics_lite_uninstall_hook' );
|
613 |
+
|
614 |
+
/**
|
615 |
+
* The main function responsible for returning the one true ExactMetrics_Lite
|
616 |
+
* Instance to functions everywhere.
|
617 |
+
*
|
618 |
+
* Use this function like you would a global variable, except without needing
|
619 |
+
* to declare the global.
|
620 |
+
*
|
621 |
+
* Example: <?php $exactmetrics = ExactMetrics_Lite(); ?>
|
622 |
+
*
|
623 |
+
* @since 6.0.0
|
624 |
+
*
|
625 |
+
* @uses ExactMetrics_Lite::get_instance() Retrieve ExactMetrics_Lite instance.
|
626 |
+
*
|
627 |
+
* @return ExactMetrics_Lite The singleton ExactMetrics_Lite instance.
|
628 |
+
*/
|
629 |
+
function ExactMetrics_Lite() {
|
630 |
+
return ExactMetrics_Lite::get_instance();
|
631 |
+
}
|
632 |
+
|
633 |
+
/**
|
634 |
+
* ExactMetrics Install and Updates.
|
635 |
+
*
|
636 |
+
* This function is used install and upgrade ExactMetrics. This is used for upgrade routines
|
637 |
+
* that can be done automatically, behind the scenes without the need for user interaction
|
638 |
+
* (for example pagination or user input required), as well as the initial install.
|
639 |
+
*
|
640 |
+
* @since 6.0.0
|
641 |
+
* @access public
|
642 |
+
*
|
643 |
+
* @global string $wp_version WordPress version (provided by WordPress core).
|
644 |
+
* @uses ExactMetrics_Lite::load_settings() Loads ExactMetrics settings
|
645 |
+
* @uses ExactMetrics_Install::init() Runs upgrade process
|
646 |
+
*
|
647 |
+
* @return void
|
648 |
+
*/
|
649 |
+
function exactmetrics_lite_install_and_upgrade() {
|
650 |
+
global $wp_version;
|
651 |
+
|
652 |
+
// If the WordPress site doesn't meet the correct WP version requirements, don't activate ExactMetrics
|
653 |
+
if ( version_compare( $wp_version, '3.8', '<' ) ) {
|
654 |
+
if ( is_plugin_active( plugin_basename( __FILE__ ) ) ) {
|
655 |
+
return;
|
656 |
+
}
|
657 |
+
}
|
658 |
+
|
659 |
+
// Don't run if MI Pro is installed
|
660 |
+
if ( class_exists( 'ExactMetrics' ) ) {
|
661 |
+
if ( is_plugin_active( plugin_basename( __FILE__ ) ) ) {
|
662 |
+
return;
|
663 |
+
}
|
664 |
+
}
|
665 |
+
|
666 |
+
|
667 |
+
// Load settings and globals (so we can use/set them during the upgrade process)
|
668 |
+
ExactMetrics_Lite()->define_globals();
|
669 |
+
ExactMetrics_Lite()->load_settings();
|
670 |
+
|
671 |
+
// Load in Auth
|
672 |
+
ExactMetrics()->load_auth();
|
673 |
+
|
674 |
+
// Load upgrade file
|
675 |
+
require_once EXACTMETRICS_PLUGIN_DIR . 'includes/em-install.php';
|
676 |
+
|
677 |
+
// Run the ExactMetrics upgrade routines
|
678 |
+
$updates = new ExactMetrics_Install();
|
679 |
+
$updates->init();
|
680 |
+
}
|
681 |
+
|
682 |
+
/**
|
683 |
+
* ExactMetrics check for install and update processes.
|
684 |
+
*
|
685 |
+
* This function is used to call the ExactMetrics automatic upgrade class, which in turn
|
686 |
+
* checks to see if there are any update procedures to be run, and if
|
687 |
+
* so runs them. Also installs ExactMetrics for the first time.
|
688 |
+
*
|
689 |
+
* @since 6.0.0
|
690 |
+
* @access public
|
691 |
+
*
|
692 |
+
* @uses ExactMetrics_Install() Runs install and upgrade process.
|
693 |
+
*
|
694 |
+
* @return void
|
695 |
+
*/
|
696 |
+
function exactmetrics_lite_call_install_and_upgrade(){
|
697 |
+
add_action( 'wp_loaded', 'exactmetrics_lite_install_and_upgrade' );
|
698 |
+
}
|
699 |
+
|
700 |
+
/**
|
701 |
+
* Returns the ExactMetrics combined object that you can use for both
|
702 |
+
* ExactMetrics Lite and Pro Users. When both plugins active, defers to the
|
703 |
+
* more complete Pro object.
|
704 |
+
*
|
705 |
+
* Warning: Do not use this in Lite or Pro specific code (use the individual objects instead).
|
706 |
+
* Also do not use in the ExactMetrics Lite/Pro upgrade and install routines.
|
707 |
+
*
|
708 |
+
* Use this function like you would a global variable, except without needing
|
709 |
+
* to declare the global.
|
710 |
+
*
|
711 |
+
* Prevents the need to do conditional global object logic when you have code that you want to work with
|
712 |
+
* both Pro and Lite.
|
713 |
+
*
|
714 |
+
* Example: <?php $exactmetrics = ExactMetrics(); ?>
|
715 |
+
*
|
716 |
+
* @since 6.0.0
|
717 |
+
*
|
718 |
+
* @uses ExactMetrics::get_instance() Retrieve ExactMetrics Pro instance.
|
719 |
+
* @uses ExactMetrics_Lite::get_instance() Retrieve ExactMetrics Lite instance.
|
720 |
+
*
|
721 |
+
* @return ExactMetrics The singleton ExactMetrics instance.
|
722 |
+
*/
|
723 |
+
if ( ! function_exists( 'ExactMetrics' ) ) {
|
724 |
+
function ExactMetrics() {
|
725 |
+
return ( class_exists( 'ExactMetrics' ) ? ExactMetrics_Pro() : ExactMetrics_Lite() );
|
726 |
+
}
|
727 |
+
add_action( 'plugins_loaded', 'ExactMetrics' );
|
728 |
+
}
|
includes/admin/admin.php
ADDED
@@ -0,0 +1,522 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin class.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @subpackage Admin
|
9 |
+
* @author Chris Christoff
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Register menu items for ExactMetrics.
|
19 |
+
*
|
20 |
+
* @since 6.0.0
|
21 |
+
* @access public
|
22 |
+
*
|
23 |
+
* @return void
|
24 |
+
*/
|
25 |
+
function exactmetrics_admin_menu() {
|
26 |
+
$hook = exactmetrics_get_menu_hook();
|
27 |
+
$menu_icon_inline = exactmetrics_get_inline_menu_icon();
|
28 |
+
|
29 |
+
if ( $hook === 'exactmetrics_settings' ) {
|
30 |
+
// If dashboards disabled, first settings page
|
31 |
+
add_menu_page( __( 'ExactMetrics', 'google-analytics-dashboard-for-wp' ), 'ExactMetrics', 'exactmetrics_save_settings', 'exactmetrics_settings', 'exactmetrics_settings_page', $menu_icon_inline, '100.00013467543' );
|
32 |
+
$hook = 'exactmetrics_settings';
|
33 |
+
|
34 |
+
add_submenu_page( $hook, __( 'ExactMetrics', 'google-analytics-dashboard-for-wp' ), __( 'Settings', 'google-analytics-dashboard-for-wp' ), 'exactmetrics_save_settings', 'exactmetrics_settings' );
|
35 |
+
} else {
|
36 |
+
// if dashboards enabled, first dashboard
|
37 |
+
add_menu_page( __( 'General:', 'google-analytics-dashboard-for-wp' ), 'ExactMetrics', 'exactmetrics_view_dashboard', 'exactmetrics_reports', 'exactmetrics_reports_page', $menu_icon_inline, '100.00013467543' );
|
38 |
+
|
39 |
+
add_submenu_page( $hook, __( 'General Reports:', 'google-analytics-dashboard-for-wp' ), __( 'Reports', 'google-analytics-dashboard-for-wp' ), 'exactmetrics_view_dashboard', 'exactmetrics_reports', 'exactmetrics_reports_page' );
|
40 |
+
|
41 |
+
// then settings page
|
42 |
+
add_submenu_page( $hook, __( 'ExactMetrics', 'google-analytics-dashboard-for-wp' ), __( 'Settings', 'google-analytics-dashboard-for-wp' ), 'exactmetrics_save_settings', 'exactmetrics_settings', 'exactmetrics_settings_page' );
|
43 |
+
|
44 |
+
// Add dashboard submenu.
|
45 |
+
add_submenu_page( 'index.php', __( 'General Reports:', 'google-analytics-dashboard-for-wp' ), 'ExactMetrics', 'exactmetrics_view_dashboard', 'admin.php?page=exactmetrics_reports' );
|
46 |
+
}
|
47 |
+
|
48 |
+
$submenu_base = add_query_arg( 'page', 'exactmetrics_settings', admin_url( 'admin.php' ) );
|
49 |
+
|
50 |
+
// then tools
|
51 |
+
add_submenu_page( $hook, __( 'Tools:', 'google-analytics-dashboard-for-wp' ), __( 'Tools', 'google-analytics-dashboard-for-wp' ), 'manage_options', $submenu_base . '#/tools' );
|
52 |
+
|
53 |
+
// then addons
|
54 |
+
$network_key = exactmetrics_is_pro_version() ? ExactMetrics()->license->get_network_license_key() : '';
|
55 |
+
if ( ! exactmetrics_is_network_active() || ( exactmetrics_is_network_active() && empty( $network_key ) ) ) {
|
56 |
+
add_submenu_page( $hook, __( 'Addons:', 'google-analytics-dashboard-for-wp' ), '<span style="color:' . exactmetrics_menu_highlight_color() . '"> ' . __( 'Addons', 'google-analytics-dashboard-for-wp' ) . '</span>', 'exactmetrics_save_settings', $submenu_base . '#/addons' );
|
57 |
+
}
|
58 |
+
|
59 |
+
// Add About us page.
|
60 |
+
add_submenu_page( $hook, __( 'About Us:', 'google-analytics-dashboard-for-wp' ), __( 'About Us', 'google-analytics-dashboard-for-wp' ), 'manage_options', $submenu_base . '#/about' );
|
61 |
+
}
|
62 |
+
add_action( 'admin_menu', 'exactmetrics_admin_menu' );
|
63 |
+
|
64 |
+
function exactmetrics_get_menu_hook() {
|
65 |
+
$dashboards_disabled = exactmetrics_get_option( 'dashboards_disabled', false );
|
66 |
+
if ( $dashboards_disabled || ( current_user_can( 'exactmetrics_save_settings' ) && ! current_user_can( 'exactmetrics_view_dashboard' ) ) ) {
|
67 |
+
return 'exactmetrics_settings';
|
68 |
+
} else {
|
69 |
+
return 'exactmetrics_reports';
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
function exactmetrics_network_admin_menu() {
|
74 |
+
// Get the base class object.
|
75 |
+
$base = ExactMetrics();
|
76 |
+
|
77 |
+
// First, let's see if this is an MS network enabled plugin. If it is, we should load the license
|
78 |
+
// menu page and the updater on the network panel
|
79 |
+
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
|
80 |
+
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
81 |
+
}
|
82 |
+
|
83 |
+
$plugin = plugin_basename( EXACTMETRICS_PLUGIN_FILE );
|
84 |
+
if ( ! is_plugin_active_for_network( $plugin ) ) {
|
85 |
+
return;
|
86 |
+
}
|
87 |
+
|
88 |
+
$menu_icon_inline = exactmetrics_get_inline_menu_icon();
|
89 |
+
$hook = 'exactmetrics_network';
|
90 |
+
$submenu_base = add_query_arg( 'page', 'exactmetrics_network', network_admin_url( 'admin.php' ) );
|
91 |
+
add_menu_page( __( 'Network Settings:', 'google-analytics-dashboard-for-wp' ), 'ExactMetrics', 'exactmetrics_save_settings', 'exactmetrics_network', 'exactmetrics_network_page', $menu_icon_inline, '100.00013467543' );
|
92 |
+
|
93 |
+
add_submenu_page( $hook, __( 'Network Settings:', 'google-analytics-dashboard-for-wp' ), __( 'Network Settings', 'google-analytics-dashboard-for-wp' ), 'exactmetrics_save_settings', 'exactmetrics_network', 'exactmetrics_network_page' );
|
94 |
+
|
95 |
+
add_submenu_page( $hook, __( 'General Reports:', 'google-analytics-dashboard-for-wp' ), __( 'Reports', 'google-analytics-dashboard-for-wp' ), 'exactmetrics_view_dashboard', 'exactmetrics_reports', 'exactmetrics_reports_page' );
|
96 |
+
|
97 |
+
// then addons
|
98 |
+
add_submenu_page( $hook, __( 'Addons:', 'google-analytics-dashboard-for-wp' ), '<span style="color:' . exactmetrics_menu_highlight_color() . '"> ' . __( 'Addons', 'google-analytics-dashboard-for-wp' ) . '</span>', 'exactmetrics_save_settings', $submenu_base . '#/addons' );
|
99 |
+
|
100 |
+
$submenu_base = add_query_arg( 'page', 'exactmetrics_network', network_admin_url( 'admin.php' ) );
|
101 |
+
|
102 |
+
// Add About us page.
|
103 |
+
add_submenu_page( $hook, __( 'About Us:', 'google-analytics-dashboard-for-wp' ), __( 'About Us', 'google-analytics-dashboard-for-wp' ), 'manage_options', $submenu_base . '#/about' );
|
104 |
+
}
|
105 |
+
add_action( 'network_admin_menu', 'exactmetrics_network_admin_menu', 5 );
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Adds one or more classes to the body tag in the dashboard.
|
109 |
+
*
|
110 |
+
* @param String $classes Current body classes.
|
111 |
+
* @return String Altered body classes.
|
112 |
+
*/
|
113 |
+
function exactmetrics_add_admin_body_class( $classes ) {
|
114 |
+
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
115 |
+
if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'exactmetrics' ) === false ) {
|
116 |
+
return $classes;
|
117 |
+
}
|
118 |
+
|
119 |
+
return "$classes exactmetrics_page ";
|
120 |
+
}
|
121 |
+
add_filter( 'admin_body_class', 'exactmetrics_add_admin_body_class', 10, 1 );
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Adds one or more classes to the body tag in the dashboard.
|
125 |
+
*
|
126 |
+
* @param String $classes Current body classes.
|
127 |
+
* @return String Altered body classes.
|
128 |
+
*/
|
129 |
+
function exactmetrics_add_admin_body_class_tools_page( $classes ) {
|
130 |
+
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
131 |
+
|
132 |
+
if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'exactmetrics_tools' ) === false || 'insights_page_exactmetrics_tools' === $screen->id ) {
|
133 |
+
return $classes;
|
134 |
+
}
|
135 |
+
|
136 |
+
return "$classes insights_page_exactmetrics_tools ";
|
137 |
+
}
|
138 |
+
add_filter( 'admin_body_class', 'exactmetrics_add_admin_body_class_tools_page', 10, 1 );
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Adds one or more classes to the body tag in the dashboard.
|
142 |
+
*
|
143 |
+
* @param String $classes Current body classes.
|
144 |
+
* @return String Altered body classes.
|
145 |
+
*/
|
146 |
+
function exactmetrics_add_admin_body_class_addons_page( $classes ) {
|
147 |
+
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
148 |
+
if ( empty( $screen ) || empty( $screen->id ) || strpos( $screen->id, 'exactmetrics_addons' ) === false || 'insights_page_exactmetrics_addons' === $screen->id ) {
|
149 |
+
return $classes;
|
150 |
+
}
|
151 |
+
|
152 |
+
return "$classes insights_page_exactmetrics_addons ";
|
153 |
+
}
|
154 |
+
add_filter( 'admin_body_class', 'exactmetrics_add_admin_body_class_addons_page', 10, 1 );
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Add a link to the settings page to the plugins list
|
158 |
+
*
|
159 |
+
* @param array $links array of links for the plugins, adapted when the current plugin is found.
|
160 |
+
*
|
161 |
+
* @return array $links
|
162 |
+
*/
|
163 |
+
function exactmetrics_add_action_links( $links ) {
|
164 |
+
$docs = '<a title="' . esc_html__( 'ExactMetrics Knowledge Base', 'google-analytics-dashboard-for-wp' ) . '" href="'. exactmetrics_get_url( 'all-plugins', 'kb-link', "https://www.exactmetrics.com/docs/" ) .'">' . esc_html__( 'Documentation', 'google-analytics-dashboard-for-wp' ) . '</a>';
|
165 |
+
array_unshift( $links, $docs );
|
166 |
+
|
167 |
+
// If lite, show a link where they can get pro from
|
168 |
+
if ( ! exactmetrics_is_pro_version() ) {
|
169 |
+
$get_pro = '<a title="' . esc_html__( 'Get ExactMetrics Pro', 'google-analytics-dashboard-for-wp' ) .'" href="'. exactmetrics_get_upgrade_link( 'all-plugins', 'upgrade-link', "https://www.exactmetrics.com/docs/" ) .'">' . esc_html__( 'Get ExactMetrics Pro', 'google-analytics-dashboard-for-wp' ) . '</a>';
|
170 |
+
array_unshift( $links, $get_pro );
|
171 |
+
}
|
172 |
+
|
173 |
+
// If Lite, support goes to forum. If pro, it goes to our website
|
174 |
+
if ( exactmetrics_is_pro_version() ) {
|
175 |
+
$support = '<a title="ExactMetrics Pro Support" href="'. exactmetrics_get_url( 'all-plugins', 'pro-support-link', "https://www.exactmetrics.com/my-account/support/" ) .'">' . esc_html__( 'Support', 'google-analytics-dashboard-for-wp' ) . '</a>';
|
176 |
+
array_unshift( $links, $support );
|
177 |
+
} else {
|
178 |
+
$support = '<a title="ExactMetrics Lite Support" href="'. exactmetrics_get_url( 'all-plugins', 'lite-support-link', "https://www.exactmetrics.com/lite-support/" ) .'">' . esc_html__( 'Support', 'google-analytics-dashboard-for-wp' ) . '</a>';
|
179 |
+
array_unshift( $links, $support );
|
180 |
+
}
|
181 |
+
|
182 |
+
$settings_link = '<a href="' . esc_url( admin_url( 'admin.php?page=exactmetrics_settings' ) ) . '">' . esc_html__( 'Settings', 'google-analytics-dashboard-for-wp' ) . '</a>';
|
183 |
+
array_unshift( $links, $settings_link );
|
184 |
+
|
185 |
+
return $links;
|
186 |
+
}
|
187 |
+
add_filter( 'plugin_action_links_' . plugin_basename( EXACTMETRICS_PLUGIN_FILE ), 'exactmetrics_add_action_links' );
|
188 |
+
|
189 |
+
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Loads a partial view for the Administration screen
|
193 |
+
*
|
194 |
+
* @access public
|
195 |
+
* @since 6.0.0
|
196 |
+
*
|
197 |
+
* @param string $template PHP file at includes/admin/partials, excluding file extension
|
198 |
+
* @param array $data Any data to pass to the view
|
199 |
+
* @return void
|
200 |
+
*/
|
201 |
+
function exactmetrics_load_admin_partial( $template, $data = array() ) {
|
202 |
+
|
203 |
+
if ( exactmetrics_is_pro_version() ) {
|
204 |
+
$dir = trailingslashit( plugin_dir_path( ExactMetrics()->file ) . 'pro/includes/admin/partials' );
|
205 |
+
|
206 |
+
if ( file_exists( $dir . $template . '.php' ) ) {
|
207 |
+
require_once( $dir . $template . '.php' );
|
208 |
+
return true;
|
209 |
+
}
|
210 |
+
} else {
|
211 |
+
$dir = trailingslashit( plugin_dir_path( ExactMetrics()->file ) . 'lite/includes/admin/partials' );
|
212 |
+
|
213 |
+
if ( file_exists( $dir . $template . '.php' ) ) {
|
214 |
+
require_once( $dir . $template . '.php' );
|
215 |
+
return true;
|
216 |
+
}
|
217 |
+
}
|
218 |
+
|
219 |
+
$dir = trailingslashit( plugin_dir_path( ExactMetrics()->file ) . 'includes/admin/partials' );
|
220 |
+
|
221 |
+
if ( file_exists( $dir . $template . '.php' ) ) {
|
222 |
+
require_once( $dir . $template . '.php' );
|
223 |
+
return true;
|
224 |
+
}
|
225 |
+
|
226 |
+
return false;
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* When user is on a ExactMetrics related admin page, display footer text
|
231 |
+
* that graciously asks them to rate us.
|
232 |
+
*
|
233 |
+
* @since 6.0.0
|
234 |
+
* @param string $text
|
235 |
+
* @return string
|
236 |
+
*/
|
237 |
+
function exactmetrics_admin_footer( $text ) {
|
238 |
+
global $current_screen;
|
239 |
+
if ( ! empty( $current_screen->id ) && strpos( $current_screen->id, 'exactmetrics' ) !== false ) {
|
240 |
+
$url = 'https://wordpress.org/support/view/plugin-reviews/google-analytics-dashboard-for-wp?filter=5';
|
241 |
+
// Translators: Placeholders add a link to the wordpress.org repository.
|
242 |
+
$text = sprintf( esc_html__( 'Please rate %1$sExactMetrics%2$s on %3$s %4$sWordPress.org%5$s to help us spread the word. Thank you from the ExactMetrics team!', 'google-analytics-dashboard-for-wp' ), '<strong>', '</strong>', '<a class="exactmetrics-no-text-decoration" href="' . $url . '" target="_blank" rel="noopener noreferrer"><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i><i class="monstericon-star"></i></a>', '<a href="' . $url . '" target="_blank" rel="noopener noreferrer">', '</a>' );
|
243 |
+
}
|
244 |
+
return $text;
|
245 |
+
}
|
246 |
+
add_filter( 'admin_footer_text', 'exactmetrics_admin_footer', 1, 2 );
|
247 |
+
|
248 |
+
function exactmetrics_admin_setup_notices() {
|
249 |
+
|
250 |
+
// Don't show on ExactMetrics pages
|
251 |
+
$screen = get_current_screen();
|
252 |
+
if ( empty( $screen->id ) || strpos( $screen->id, 'exactmetrics' ) !== false ) {
|
253 |
+
return;
|
254 |
+
}
|
255 |
+
|
256 |
+
// Make sure they have the permissions to do something
|
257 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
258 |
+
return;
|
259 |
+
}
|
260 |
+
|
261 |
+
// Priority:
|
262 |
+
// 1. Google Analytics not authenticated
|
263 |
+
// 2. License key not entered for pro
|
264 |
+
// 3. License key not valid/okay for pro
|
265 |
+
// 4. WordPress + PHP min versions
|
266 |
+
// 5. (old) Optin setting not configured
|
267 |
+
// 6. Manual UA code
|
268 |
+
// 7. Automatic updates not configured
|
269 |
+
// 8. Woo upsell
|
270 |
+
// 9. EDD upsell
|
271 |
+
|
272 |
+
|
273 |
+
// 1. Google Analytics not authenticated
|
274 |
+
if ( ! is_network_admin() && ! exactmetrics_get_ua() ) {
|
275 |
+
|
276 |
+
$submenu_base = is_network_admin() ? add_query_arg( 'page', 'exactmetrics_network', network_admin_url( 'admin.php' ) ) : add_query_arg( 'page', 'exactmetrics_settings', admin_url( 'admin.php' ) );
|
277 |
+
$title = esc_html__( 'Please Setup Website Analytics to See Audience Insights', 'google-analytics-dashboard-for-wp' );
|
278 |
+
$primary = esc_html__( 'Connect ExactMetrics and Setup Website Analytics', 'google-analytics-dashboard-for-wp' );
|
279 |
+
$urlone = is_network_admin() ? network_admin_url( 'admin.php?page=exactmetrics-onboarding' ) : admin_url( 'admin.php?page=exactmetrics-onboarding' );
|
280 |
+
$secondary = esc_html__( 'Learn More', 'google-analytics-dashboard-for-wp' );
|
281 |
+
$urltwo = $submenu_base . '#/about/getting-started';
|
282 |
+
$message = esc_html__( 'ExactMetrics, WordPress analytics plugin, helps you connect your website with Google Analytics, so you can see how people find and use your website. Over 2 million website owners use ExactMetrics to see the stats that matter and grow their business.', 'google-analytics-dashboard-for-wp' );
|
283 |
+
echo '<div class="notice notice-info"><p style="font-weight:700">'. $title .'</p><p>'. $message.'</p><p><a href="'. $urlone .'" class="button-primary">'. $primary .'</a> <a href="'. $urltwo .'" class="button-secondary">'. $secondary .'</a></p></div>';
|
284 |
+
return;
|
285 |
+
}
|
286 |
+
|
287 |
+
// 2. License key not entered for pro
|
288 |
+
$key = exactmetrics_is_pro_version() ? ExactMetrics()->license->get_license_key() : '';
|
289 |
+
if ( exactmetrics_is_pro_version() && empty( $key ) ) {
|
290 |
+
$page = is_network_admin() ? network_admin_url( 'admin.php?page=exactmetrics_network' ) : admin_url( 'admin.php?page=exactmetrics_settings' );
|
291 |
+
// Translators: Adds a link to retrieve the license.
|
292 |
+
$message = sprintf( esc_html__( 'Warning: No valid license key has been entered for ExactMetrics. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s', 'google-analytics-dashboard-for-wp' ), '<a href="'. esc_url( $page ) . '">', '</a>' );
|
293 |
+
echo '<div class="error"><p>'. $message.'</p></div>';
|
294 |
+
return;
|
295 |
+
}
|
296 |
+
|
297 |
+
// 3. License key not valid/okay for pro
|
298 |
+
if ( exactmetrics_is_pro_version() ) {
|
299 |
+
$message = '';
|
300 |
+
if ( ExactMetrics()->license->get_site_license_key() ){
|
301 |
+
if ( ExactMetrics()->license->site_license_expired() ) {
|
302 |
+
// Translators: Adds a link to the license renewal.
|
303 |
+
$message = sprintf( esc_html__( 'Your license key for ExactMetrics has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-dashboard-for-wp' ), '<a href="'. exactmetrics_get_url( 'admin-notices', 'expired-license', "https://www.exactmetrics.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
|
304 |
+
} else if ( ExactMetrics()->license->site_license_disabled() ) {
|
305 |
+
$message = esc_html__( 'Your license key for ExactMetrics has been disabled. Please use a different key.', 'google-analytics-dashboard-for-wp' );
|
306 |
+
} else if ( ExactMetrics()->license->site_license_invalid() ) {
|
307 |
+
$message = esc_html__( 'Your license key for ExactMetrics is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-dashboard-for-wp' );
|
308 |
+
}
|
309 |
+
} else if ( ExactMetrics()->license->get_network_license_key() ) {
|
310 |
+
if ( ExactMetrics()->license->network_license_expired() ) {
|
311 |
+
// Translators: Adds a link to renew license.
|
312 |
+
$message = sprintf( esc_html__( 'Your network license key for ExactMetrics has expired. %1$sPlease click here to renew your license key.%2$s', 'google-analytics-dashboard-for-wp' ), '<a href="'. exactmetrics_get_url( 'admin-notices', 'expired-license', "https://www.exactmetrics.com/login/" ) .'" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>' );
|
313 |
+
} else if ( ExactMetrics()->license->network_license_disabled() ) {
|
314 |
+
$message = esc_html__( 'Your network license key for ExactMetrics has been disabled. Please use a different key.', 'google-analytics-dashboard-for-wp' );
|
315 |
+
} else if ( ExactMetrics()->license->network_license_invalid() ) {
|
316 |
+
$message = esc_html__( 'Your network license key for ExactMetrics is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key.', 'google-analytics-dashboard-for-wp' );
|
317 |
+
}
|
318 |
+
}
|
319 |
+
if ( ! empty( $message ) ) {
|
320 |
+
echo '<div class="error"><p>'. $message.'</p></div>';
|
321 |
+
return;
|
322 |
+
}
|
323 |
+
}
|
324 |
+
|
325 |
+
// 4. Notices for PHP/WP version deprecations
|
326 |
+
if ( current_user_can( 'update_core' ) ) {
|
327 |
+
global $wp_version;
|
328 |
+
|
329 |
+
// PHP 5.2/5.3
|
330 |
+
if ( version_compare( phpversion(), '5.4', '<' ) ) {
|
331 |
+
$url = exactmetrics_get_url( 'global-notice', 'settings-page', 'https://www.exactmetrics.com/docs/update-php/' );
|
332 |
+
// Translators: Placeholders add the PHP version, a link to the ExactMetrics blog and a line break.
|
333 |
+
$message = sprintf( esc_html__( 'Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress will stop supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s', 'google-analytics-dashboard-for-wp' ), phpversion(), '<a href="' . $url . '" target="_blank">', '</a>', '<br>' );
|
334 |
+
echo '<div class="error"><p>'. $message.'</p></div>';
|
335 |
+
return;
|
336 |
+
}
|
337 |
+
// WordPress 3.0 - 4.5
|
338 |
+
else if ( version_compare( $wp_version, '4.6', '<' ) ) {
|
339 |
+
$url = exactmetrics_get_url( 'global-notice', 'settings-page', 'https://www.exactmetrics.com/docs/update-wordpress/' );
|
340 |
+
// Translators: Placeholders add the current WordPress version and links to the ExactMetrics blog
|
341 |
+
$message = sprintf( esc_html__( 'Your site is running an outdated version of WordPress (%1$s).%4$sExactMetrics will stop supporting WordPress versions lower than 4.6 in April, 2019.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s', 'google-analytics-dashboard-for-wp' ), $wp_version, '<a href="' . $url . '" target="_blank">', '</a>', '<br>' );
|
342 |
+
echo '<div class="error"><p>'. $message.'</p></div>';
|
343 |
+
return;
|
344 |
+
}
|
345 |
+
// PHP 5.4/5.5
|
346 |
+
// else if ( version_compare( phpversion(), '5.6', '<' ) ) {
|
347 |
+
// $url = exactmetrics_get_url( 'global-notice', 'settings-page', 'https://www.exactmetrics.com/docs/update-php/' );
|
348 |
+
// $message = sprintf( esc_html__( 'Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress will stop supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s', 'google-analytics-dashboard-for-wp' ), phpversion(), '<a href="' . $url . '" target="_blank">', '</a>', '<br>' );
|
349 |
+
// echo '<div class="error"><p>'. $message.'</p></div>';
|
350 |
+
// return;
|
351 |
+
// }
|
352 |
+
// // WordPress 4.6 - 4.8
|
353 |
+
// else if ( version_compare( $wp_version, '4.9', '<' ) ) {
|
354 |
+
// $url = exactmetrics_get_url( 'global-notice', 'settings-page', 'https://www.exactmetrics.com/docs/update-wordpress/' );
|
355 |
+
// $message = sprintf( esc_html__( 'Your site is running an outdated version of WordPress (%1$s).%4$sExactMetrics will stop supporting WordPress versions lower than 4.9 in October, 2019.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s', 'google-analytics-dashboard-for-wp' ), $wp_version, '<a href="' . $url . '" target="_blank">', '</a>', '<br>' );
|
356 |
+
// echo '<div class="error"><p>'. $message.'</p></div>';
|
357 |
+
// return;
|
358 |
+
// }
|
359 |
+
}
|
360 |
+
|
361 |
+
// 5. Optin setting not configured
|
362 |
+
// if ( ! is_network_admin() ) {
|
363 |
+
// if ( ! get_option( 'exactmetrics_tracking_notice' ) ) {
|
364 |
+
// if ( ! exactmetrics_get_option( 'anonymous_data', false ) ) {
|
365 |
+
// if ( ! exactmetrics_is_dev_url( network_site_url( '/' ) ) ) {
|
366 |
+
// if ( exactmetrics_is_pro_version() ) {
|
367 |
+
// exactmetrics_update_option( 'anonymous_data', 1 );
|
368 |
+
// return;
|
369 |
+
// }
|
370 |
+
// $optin_url = add_query_arg( 'mi_action', 'opt_into_tracking' );
|
371 |
+
// $optout_url = add_query_arg( 'mi_action', 'opt_out_of_tracking' );
|
372 |
+
// echo '<div class="updated"><p>';
|
373 |
+
// echo esc_html__( 'Allow ExactMetrics to track plugin usage? Opt-in to tracking and our newsletter to stay informed of the latest changes to ExactMetrics and help us ensure compatibility.', 'google-analytics-dashboard-for-wp' );
|
374 |
+
// echo ' <a href="' . esc_url( $optin_url ) . '" class="button-secondary">' . __( 'Allow', 'google-analytics-dashboard-for-wp' ) . '</a>';
|
375 |
+
// echo ' <a href="' . esc_url( $optout_url ) . '" class="button-secondary">' . __( 'Do not allow', 'google-analytics-dashboard-for-wp' ) . '</a>';
|
376 |
+
// echo '</p></div>';
|
377 |
+
// return;
|
378 |
+
// } else {
|
379 |
+
// // is testing site
|
380 |
+
// update_option( 'exactmetrics_tracking_notice', '1' );
|
381 |
+
// }
|
382 |
+
// }
|
383 |
+
// }
|
384 |
+
// }
|
385 |
+
|
386 |
+
$notices = get_option( 'exactmetrics_notices' );
|
387 |
+
if ( ! is_array( $notices ) ) {
|
388 |
+
$notices = array();
|
389 |
+
}
|
390 |
+
|
391 |
+
// 6. Authenticate, not manual
|
392 |
+
$authed = ExactMetrics()->auth->is_authed() || ExactMetrics()->auth->is_network_authed();
|
393 |
+
$url = is_network_admin() ? network_admin_url( 'admin.php?page=exactmetrics_network' ) : admin_url( 'admin.php?page=exactmetrics_settings' );
|
394 |
+
|
395 |
+
if ( empty( $authed ) && ! isset( $notices['exactmetrics_auth_not_manual' ] ) ) {
|
396 |
+
echo '<div class="notice notice-info is-dismissible exactmetrics-notice" data-notice="exactmetrics_auth_not_manual">';
|
397 |
+
echo '<p>';
|
398 |
+
// Translators: Placeholders add links to the settings panel.
|
399 |
+
echo sprintf( esc_html__( 'Important: You are currently using manual UA code output. We highly recommend %1$sauthenticating with ExactMetrics%2$s so that you can access our new reporting area and take advantage of new ExactMetrics features.', 'google-analytics-dashboard-for-wp' ), '<a href="' . $url .'">', '</a>' );
|
400 |
+
echo '</p>';
|
401 |
+
echo '</div>';
|
402 |
+
return;
|
403 |
+
}
|
404 |
+
|
405 |
+
// 7. Automatic updates not configured
|
406 |
+
// if ( ! is_network_admin() ) {
|
407 |
+
// $updates = exactmetrics_get_option( 'automatic_updates', false );
|
408 |
+
// $url = admin_url( 'admin.php?page=exactmetrics_settings' );
|
409 |
+
|
410 |
+
// if ( empty( $updates) && ! isset( $notices['exactmetrics_automatic_updates' ] ) ) {
|
411 |
+
// echo '<div class="notice notice-info is-dismissible exactmetrics-notice" data-notice="exactmetrics_automatic_updates">';
|
412 |
+
// echo '<p>';
|
413 |
+
// echo sprintf( esc_html__( 'Important: Please %1$sconfigure the Automatic Updates Settings%2$s in ExactMetrics.', 'google-analytics-dashboard-for-wp' ), '<a href="' . $url .'">', '</a>' );
|
414 |
+
// echo '</p>';
|
415 |
+
// echo '</div>';
|
416 |
+
// return;
|
417 |
+
// }
|
418 |
+
// }
|
419 |
+
|
420 |
+
// 8. WooUpsell
|
421 |
+
if ( ! exactmetrics_is_pro_version() && class_exists( 'WooCommerce' ) ) {
|
422 |
+
if ( ! isset( $notices['exactmetrics_woocommerce_tracking_available' ] ) ) {
|
423 |
+
echo '<div class="notice notice-success is-dismissible exactmetrics-notice exactmetrics-wooedd-upsell-row" data-notice="exactmetrics_woocommerce_tracking_available">';
|
424 |
+
echo '<div class="exactmetrics-wooedd-upsell-left">';
|
425 |
+
echo '<p><strong>';
|
426 |
+
echo esc_html( 'Enhanced Ecommerce Analytics for Your WooCommerce Store', 'google-analytics-dashboard-for-wp' );
|
427 |
+
echo '</strong></p>';
|
428 |
+
echo '<img class="exactmetrics-wooedd-upsell-image exactmetrics-wooedd-upsell-image-small" src="' . trailingslashit( EXACTMETRICS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
|
429 |
+
echo '<p>';
|
430 |
+
echo esc_html( 'ExactMetrics Pro gives you detailed stats and insights about your customers.', 'google-analytics-dashboard-for-wp' );
|
431 |
+
echo '</p>';
|
432 |
+
echo '<p>';
|
433 |
+
echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-dashboard-for-wp' );
|
434 |
+
echo '</p>';
|
435 |
+
echo '<p>';
|
436 |
+
echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-dashboard-for-wp' );
|
437 |
+
echo '</p>';
|
438 |
+
echo '<p>';
|
439 |
+
echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-dashboard-for-wp' );
|
440 |
+
echo '</p>';
|
441 |
+
// Translators: Placeholders add a link to the ExactMetrics website.
|
442 |
+
echo sprintf( esc_html__( '%1$sGet ExactMetrics Pro%2$s', 'google-analytics-dashboard-for-wp' ), '<a class="button button-primary button-hero" href="'. exactmetrics_get_upgrade_link( 'admin-notices', 'woocommerce-upgrade' ) .'">', ' »</a>' );
|
443 |
+
echo '</p>';
|
444 |
+
echo '</div><div class="exactmetrics-wooedd-upsell-right">';
|
445 |
+
echo '<img class="exactmetrics-wooedd-upsell-image exactmetrics-wooedd-upsell-image-large" src="' . trailingslashit( EXACTMETRICS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
|
446 |
+
echo '</div>';
|
447 |
+
echo '</div>';
|
448 |
+
return;
|
449 |
+
}
|
450 |
+
}
|
451 |
+
|
452 |
+
// 9. EDDUpsell
|
453 |
+
if ( ! exactmetrics_is_pro_version() && class_exists( 'Easy_Digital_Downloads' ) ) {
|
454 |
+
if ( ! isset( $notices['exactmetrics_edd_tracking_available' ] ) ) {
|
455 |
+
echo '<div class="notice notice-success is-dismissible exactmetrics-notice exactmetrics-wooedd-upsell-row" data-notice="exactmetrics_edd_tracking_available">';
|
456 |
+
echo '<div class="exactmetrics-wooedd-upsell-left">';
|
457 |
+
echo '<p><strong>';
|
458 |
+
echo esc_html( 'Enhanced Ecommerce Analytics for Your Easy Digital Downloads Store', 'google-analytics-dashboard-for-wp' );
|
459 |
+
echo '</strong></p>';
|
460 |
+
echo '<img class="exactmetrics-wooedd-upsell-image exactmetrics-wooedd-upsell-image-small" src="' . trailingslashit( EXACTMETRICS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
|
461 |
+
echo '<p>';
|
462 |
+
echo esc_html( 'ExactMetrics Pro gives you detailed stats and insights about your customers.', 'google-analytics-dashboard-for-wp' );
|
463 |
+
echo '</p>';
|
464 |
+
echo '<p>';
|
465 |
+
echo esc_html( 'This helps you make data-driven decisions about your content, and marketing strategy so you can increase your website traffic, leads, and sales.', 'google-analytics-dashboard-for-wp' );
|
466 |
+
echo '</p>';
|
467 |
+
echo '<p>';
|
468 |
+
echo esc_html( 'Pro customers also get Form Tracking, Custom Dimensions Tracking, UserID Tracking and much more.', 'google-analytics-dashboard-for-wp' );
|
469 |
+
echo '</p>';
|
470 |
+
echo '<p>';
|
471 |
+
echo esc_html( 'Start making data-driven decisions to grow your business.', 'google-analytics-dashboard-for-wp' );
|
472 |
+
echo '</p>';
|
473 |
+
echo sprintf( esc_html__( '%1$sGet ExactMetrics Pro%2$s', 'google-analytics-dashboard-for-wp' ), '<a class="button button-primary button-hero" href="'. exactmetrics_get_upgrade_link( 'admin-notices', 'edd-upgrade' ) .'">', ' »</a>' );
|
474 |
+
echo '</p>';
|
475 |
+
echo '</div><div class="exactmetrics-wooedd-upsell-right">';
|
476 |
+
echo '<img class="exactmetrics-wooedd-upsell-image exactmetrics-wooedd-upsell-image-large" src="' . trailingslashit( EXACTMETRICS_PLUGIN_URL ) . 'assets/images/upsell/woo-edd-upsell.png">';
|
477 |
+
echo '</div>';
|
478 |
+
echo '</div>';
|
479 |
+
return;
|
480 |
+
}
|
481 |
+
}
|
482 |
+
|
483 |
+
if ( isset( $notices['exactmetrics_cross_domains_extracted'] ) && false === $notices['exactmetrics_cross_domains_extracted'] ) {
|
484 |
+
$page = is_network_admin() ? network_admin_url( 'admin.php?page=exactmetrics_network' ) : admin_url( 'admin.php?page=exactmetrics_settings' );
|
485 |
+
$page = $page . '#/advanced';
|
486 |
+
// Translators: Adds a link to the settings panel.
|
487 |
+
$message = sprintf( esc_html__( 'Warning: ExactMetrics found cross-domain settings in the custom code field and converted them to the new settings structure. %1$sPlease click here to review and remove the code no longer needed.%2$s', 'google-analytics-dashboard-for-wp' ), '<a href="'. esc_url( $page ) . '">', '</a>' );
|
488 |
+
echo '<div class="notice notice-success is-dismissible exactmetrics-notice" data-notice="exactmetrics_cross_domains_extracted"><p>'. $message.'</p></div>';
|
489 |
+
return;
|
490 |
+
}
|
491 |
+
}
|
492 |
+
add_action( 'admin_notices', 'exactmetrics_admin_setup_notices' );
|
493 |
+
add_action( 'network_admin_notices', 'exactmetrics_admin_setup_notices' );
|
494 |
+
|
495 |
+
|
496 |
+
// AM Notices
|
497 |
+
function exactmetrics_am_notice_optout( $super_admin ) {
|
498 |
+
if ( exactmetrics_get_option( 'hide_am_notices', false ) || exactmetrics_get_option( 'network_hide_am_notices', false ) ) {
|
499 |
+
return false;
|
500 |
+
}
|
501 |
+
return $super_admin;
|
502 |
+
}
|
503 |
+
add_filter( "am_notifications_display", 'exactmetrics_am_notice_optout', 10, 1 );
|
504 |
+
|
505 |
+
/**
|
506 |
+
* Inline critical css for the menu to prevent breaking the layout when our scripts get blocked by browsers.
|
507 |
+
*/
|
508 |
+
function exactmetrics_admin_menu_inline_styles() {
|
509 |
+
?>
|
510 |
+
<style type="text/css">
|
511 |
+
#toplevel_page_exactmetrics_reports .wp-menu-image img,
|
512 |
+
#toplevel_page_exactmetrics_settings .wp-menu-image img,
|
513 |
+
#toplevel_page_exactmetrics_network .wp-menu-image img {
|
514 |
+
width: 18px;
|
515 |
+
height: auto;
|
516 |
+
padding-top: 7px;
|
517 |
+
}
|
518 |
+
</style>
|
519 |
+
<?php
|
520 |
+
}
|
521 |
+
|
522 |
+
add_action( 'admin_footer', 'exactmetrics_admin_menu_inline_styles', 300 );
|
includes/admin/ajax.php
ADDED
@@ -0,0 +1,209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Handles all admin ajax interactions for the ExactMetrics plugin.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @subpackage Ajax
|
9 |
+
* @author Chris Christoff
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Stores a user setting for the logged-in WordPress User
|
19 |
+
*
|
20 |
+
* @access public
|
21 |
+
* @since 6.0.0
|
22 |
+
*/
|
23 |
+
function exactmetrics_ajax_set_user_setting() {
|
24 |
+
|
25 |
+
// Run a security check first.
|
26 |
+
check_ajax_referer( 'exactmetrics-set-user-setting', 'nonce' );
|
27 |
+
|
28 |
+
// Prepare variables.
|
29 |
+
$name = stripslashes( $_POST['name'] );
|
30 |
+
$value = stripslashes( $_POST['value'] );
|
31 |
+
|
32 |
+
// Set user setting.
|
33 |
+
set_user_setting( $name, $value );
|
34 |
+
|
35 |
+
// Send back the response.
|
36 |
+
wp_send_json_success();
|
37 |
+
wp_die();
|
38 |
+
|
39 |
+
}
|
40 |
+
add_action( 'wp_ajax_exactmetrics_install_addon', 'exactmetrics_ajax_install_addon' );
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Installs a ExactMetrics addon.
|
44 |
+
*
|
45 |
+
* @access public
|
46 |
+
* @since 6.0.0
|
47 |
+
*/
|
48 |
+
function exactmetrics_ajax_install_addon() {
|
49 |
+
|
50 |
+
// Run a security check first.
|
51 |
+
check_ajax_referer( 'exactmetrics-install', 'nonce' );
|
52 |
+
|
53 |
+
if ( ! current_user_can( 'install_plugins' ) ) {
|
54 |
+
echo json_encode( true );
|
55 |
+
}
|
56 |
+
|
57 |
+
// Install the addon.
|
58 |
+
if ( isset( $_POST['plugin'] ) ) {
|
59 |
+
$download_url = $_POST['plugin'];
|
60 |
+
global $hook_suffix;
|
61 |
+
|
62 |
+
// Set the current screen to avoid undefined notices.
|
63 |
+
set_current_screen();
|
64 |
+
|
65 |
+
// Prepare variables.
|
66 |
+
$method = '';
|
67 |
+
$url = add_query_arg(
|
68 |
+
array(
|
69 |
+
'page' => 'exactmetrics-settings'
|
70 |
+
),
|
71 |
+
admin_url( 'admin.php' )
|
72 |
+
);
|
73 |
+
$url = esc_url( $url );
|
74 |
+
|
75 |
+
// Start output bufferring to catch the filesystem form if credentials are needed.
|
76 |
+
ob_start();
|
77 |
+
if ( false === ( $creds = request_filesystem_credentials( $url, $method, false, false, null ) ) ) {
|
78 |
+
$form = ob_get_clean();
|
79 |
+
echo json_encode( array( 'form' => $form ) );
|
80 |
+
wp_die();
|
81 |
+
}
|
82 |
+
|
83 |
+
// If we are not authenticated, make it happen now.
|
84 |
+
if ( ! WP_Filesystem( $creds ) ) {
|
85 |
+
ob_start();
|
86 |
+
request_filesystem_credentials( $url, $method, true, false, null );
|
87 |
+
$form = ob_get_clean();
|
88 |
+
echo json_encode( array( 'form' => $form ) );
|
89 |
+
wp_die();
|
90 |
+
}
|
91 |
+
|
92 |
+
// We do not need any extra credentials if we have gotten this far, so let's install the plugin.
|
93 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
94 |
+
$base = ExactMetrics();
|
95 |
+
require_once plugin_dir_path( $base->file ) . '/includes/admin/licensing/skin.php';
|
96 |
+
|
97 |
+
// Create the plugin upgrader with our custom skin.
|
98 |
+
$installer = new Plugin_Upgrader( $skin = new ExactMetrics_Skin() );
|
99 |
+
$installer->install( $download_url );
|
100 |
+
|
101 |
+
// Flush the cache and return the newly installed plugin basename.
|
102 |
+
wp_cache_flush();
|
103 |
+
if ( $installer->plugin_info() ) {
|
104 |
+
$plugin_basename = $installer->plugin_info();
|
105 |
+
echo json_encode( array( 'plugin' => $plugin_basename ) );
|
106 |
+
wp_die();
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
// Send back a response.
|
111 |
+
echo json_encode( true );
|
112 |
+
wp_die();
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
add_action( 'wp_ajax_exactmetrics_activate_addon', 'exactmetrics_ajax_activate_addon' );
|
117 |
+
/**
|
118 |
+
* Activates a ExactMetrics addon.
|
119 |
+
*
|
120 |
+
* @access public
|
121 |
+
* @since 6.0.0
|
122 |
+
*/
|
123 |
+
function exactmetrics_ajax_activate_addon() {
|
124 |
+
|
125 |
+
// Run a security check first.
|
126 |
+
check_ajax_referer( 'exactmetrics-activate', 'nonce' );
|
127 |
+
|
128 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
129 |
+
echo json_encode( true );
|
130 |
+
}
|
131 |
+
|
132 |
+
// Activate the addon.
|
133 |
+
if ( isset( $_POST['plugin'] ) ) {
|
134 |
+
if ( isset( $_POST['isnetwork'] ) && $_POST['isnetwork'] ) {
|
135 |
+
$activate = activate_plugin( $_POST['plugin'], NULL, true );
|
136 |
+
} else {
|
137 |
+
$activate = activate_plugin( $_POST['plugin'] );
|
138 |
+
}
|
139 |
+
|
140 |
+
if ( is_wp_error( $activate ) ) {
|
141 |
+
echo json_encode( array( 'error' => $activate->get_error_message() ) );
|
142 |
+
wp_die();
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
echo json_encode( true );
|
147 |
+
wp_die();
|
148 |
+
|
149 |
+
}
|
150 |
+
|
151 |
+
add_action( 'wp_ajax_exactmetrics_deactivate_addon', 'exactmetrics_ajax_deactivate_addon' );
|
152 |
+
/**
|
153 |
+
* Deactivates a ExactMetrics addon.
|
154 |
+
*
|
155 |
+
* @access public
|
156 |
+
* @since 6.0.0
|
157 |
+
*/
|
158 |
+
function exactmetrics_ajax_deactivate_addon() {
|
159 |
+
|
160 |
+
// Run a security check first.
|
161 |
+
check_ajax_referer( 'exactmetrics-deactivate', 'nonce' );
|
162 |
+
|
163 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
164 |
+
echo json_encode( true );
|
165 |
+
}
|
166 |
+
|
167 |
+
// Deactivate the addon.
|
168 |
+
if ( isset( $_POST['plugin'] ) ) {
|
169 |
+
if ( isset( $_POST['isnetwork'] ) && $_POST['isnetwork'] ) {
|
170 |
+
$deactivate = deactivate_plugins( $_POST['plugin'], false, true );
|
171 |
+
} else {
|
172 |
+
$deactivate = deactivate_plugins( $_POST['plugin'] );
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
echo json_encode( true );
|
177 |
+
wp_die();
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Called whenever a notice is dismissed in ExactMetrics or its Addons.
|
182 |
+
*
|
183 |
+
* Updates a key's value in the options table to mark the notice as dismissed,
|
184 |
+
* preventing it from displaying again
|
185 |
+
*
|
186 |
+
* @access public
|
187 |
+
* @since 6.0.0
|
188 |
+
*/
|
189 |
+
function exactmetrics_ajax_dismiss_notice() {
|
190 |
+
|
191 |
+
// Run a security check first.
|
192 |
+
check_ajax_referer( 'exactmetrics-dismiss-notice', 'nonce' );
|
193 |
+
|
194 |
+
// Deactivate the notice
|
195 |
+
if ( isset( $_POST['notice'] ) ) {
|
196 |
+
// Init the notice class and mark notice as deactivated
|
197 |
+
ExactMetrics()->notices->dismiss( $_POST['notice'] );
|
198 |
+
|
199 |
+
// Return true
|
200 |
+
echo json_encode( true );
|
201 |
+
wp_die();
|
202 |
+
}
|
203 |
+
|
204 |
+
// If here, an error occurred
|
205 |
+
echo json_encode( false );
|
206 |
+
wp_die();
|
207 |
+
|
208 |
+
}
|
209 |
+
add_action( 'wp_ajax_exactmetrics_ajax_dismiss_notice', 'exactmetrics_ajax_dismiss_notice' );
|
includes/admin/api-auth.php
ADDED
@@ -0,0 +1,583 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Google Client admin class.
|
4 |
+
*
|
5 |
+
* Handles retrieving whether a particular notice has been dismissed or not,
|
6 |
+
* as well as marking a notice as dismissed.
|
7 |
+
*
|
8 |
+
* @since 7.0.0
|
9 |
+
*
|
10 |
+
* @package ExactMetrics
|
11 |
+
* @subpackage GA Client
|
12 |
+
* @author Chris Christoff
|
13 |
+
*/
|
14 |
+
|
15 |
+
// Exit if accessed directly
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit;
|
18 |
+
}
|
19 |
+
|
20 |
+
final class ExactMetrics_API_Auth {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Primary class constructor.
|
24 |
+
*
|
25 |
+
* @access public
|
26 |
+
* @since 7.0.0
|
27 |
+
*/
|
28 |
+
public function __construct() {
|
29 |
+
|
30 |
+
// Authentication Actions
|
31 |
+
add_action( 'wp_ajax_exactmetrics_maybe_authenticate', array( $this, 'maybe_authenticate' ) );
|
32 |
+
add_action( 'wp_ajax_exactmetrics_maybe_reauthenticate', array( $this, 'maybe_reauthenticate' ) );
|
33 |
+
add_action( 'wp_ajax_exactmetrics_maybe_verify', array( $this, 'maybe_verify' ) );
|
34 |
+
add_action( 'wp_ajax_exactmetrics_maybe_delete', array( $this, 'maybe_delete' ) );
|
35 |
+
|
36 |
+
add_action( 'admin_init', array( $this, 'authenticate_listener' ) );
|
37 |
+
add_action( 'admin_init', array( $this, 'reauthenticate_listener' ) );
|
38 |
+
|
39 |
+
add_action( 'wp_ajax_nopriv_exactmetrics_is_installed', array( $this, 'is_installed' ) );
|
40 |
+
add_action( 'wp_ajax_nopriv_exactmetrics_rauthenticate', array( $this, 'rauthenticate' ) );
|
41 |
+
|
42 |
+
add_filter( 'exactmetrics_maybe_authenticate_siteurl', array( $this, 'before_redirect' ) );
|
43 |
+
}
|
44 |
+
|
45 |
+
public function get_tt(){
|
46 |
+
$tt = is_network_admin() ? get_site_option( 'exactmetrics_network_tt', '' ) : get_option( 'exactmetrics_site_tt', '' );
|
47 |
+
if ( empty( $tt ) ) {
|
48 |
+
// if TT is empty, generate a new one, save it and then return it
|
49 |
+
$tt = $this->generate_tt();
|
50 |
+
$this->is_network_admin() ? update_site_option( 'exactmetrics_network_tt', $tt ) : update_option( 'exactmetrics_site_tt', $tt );
|
51 |
+
}
|
52 |
+
return $tt;
|
53 |
+
}
|
54 |
+
|
55 |
+
public function rotate_tt(){
|
56 |
+
$tt = $this->generate_tt();
|
57 |
+
is_network_admin() ? update_site_option( 'exactmetrics_network_tt', $tt ) : update_option( 'exactmetrics_site_tt', $tt );
|
58 |
+
}
|
59 |
+
|
60 |
+
public function generate_tt(){
|
61 |
+
return hash( 'sha512', wp_generate_password( 128, true, true ) . AUTH_SALT . uniqid( "", true ) );
|
62 |
+
}
|
63 |
+
|
64 |
+
public function validate_tt( $passed_tt = '' ) {
|
65 |
+
$tt = $this->get_tt();
|
66 |
+
return hash_equals( $tt, $passed_tt );
|
67 |
+
}
|
68 |
+
|
69 |
+
public function is_installed() {
|
70 |
+
wp_send_json_success(
|
71 |
+
array(
|
72 |
+
'version' => EXACTMETRICS_VERSION,
|
73 |
+
'pro' => exactmetrics_is_pro_version(),
|
74 |
+
)
|
75 |
+
);
|
76 |
+
}
|
77 |
+
|
78 |
+
public function maybe_authenticate(){
|
79 |
+
|
80 |
+
// Check nonce
|
81 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
82 |
+
|
83 |
+
// current user can authenticate
|
84 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
85 |
+
wp_send_json_error( array( 'message' => __( "You don't have permission to authenticate ExactMetrics.", 'google-analytics-dashboard-for-wp' ) ) );
|
86 |
+
}
|
87 |
+
|
88 |
+
if ( ! empty( $_REQUEST['isnetwork'] ) && $_REQUEST['isnetwork'] ) {
|
89 |
+
define( 'WP_NETWORK_ADMIN', true );
|
90 |
+
}
|
91 |
+
|
92 |
+
// Only for Pro users, require a license key to be entered first so we can link to things.
|
93 |
+
if ( exactmetrics_is_pro_version() ) {
|
94 |
+
$valid = is_network_admin() ? ExactMetrics()->license->is_network_licensed() : ExactMetrics()->license->is_site_licensed();
|
95 |
+
if ( ! $valid ) {
|
96 |
+
wp_send_json_error( array( 'message' => __( "Cannot authenticate. Please enter a valid, active license key for ExactMetrics Pro into the settings.", 'google-analytics-dashboard-for-wp' ) ) );
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
// we do not have a current auth
|
101 |
+
if ( ! $this->is_network_admin() && ExactMetrics()->auth->is_authed() ) {
|
102 |
+
wp_send_json_error( array( 'message' => __( "Cannot authenticate. Please re-authenticate.", 'google-analytics-dashboard-for-wp' ) ) );
|
103 |
+
} else if ( $this->is_network_admin() && ExactMetrics()->auth->is_network_authed() ) {
|
104 |
+
wp_send_json_error( array( 'message' => __( "Cannot network authenticate. Please re-authenticate on the network settings panel.", 'google-analytics-dashboard-for-wp' ) ) );
|
105 |
+
}
|
106 |
+
|
107 |
+
$sitei = $this->get_sitei();
|
108 |
+
//update_network_option( get_current_network_id(), 'exactmetrics_network_sitei', $sitei );
|
109 |
+
|
110 |
+
$siteurl = add_query_arg( array(
|
111 |
+
'tt' => $this->get_tt(),
|
112 |
+
'sitei' => $sitei,
|
113 |
+
'miversion' => EXACTMETRICS_VERSION,
|
114 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
115 |
+
'network' => is_network_admin() ? 'network' : 'site',
|
116 |
+
'siteurl' => is_network_admin() ? network_admin_url() : site_url(),
|
117 |
+
'return' => is_network_admin() ? network_admin_url( 'admin.php?page=exactmetrics_network' ) : admin_url( 'admin.php?page=exactmetrics_settings' ),
|
118 |
+
'testurl' => 'https://' . exactmetrics_get_api_url() . 'test/',
|
119 |
+
), $this->get_route( 'https://' . exactmetrics_get_api_url() . 'auth/new/{type}' ) );
|
120 |
+
|
121 |
+
if ( exactmetrics_is_pro_version() ) {
|
122 |
+
$key = is_network_admin() ? ExactMetrics()->license->get_network_license_key() : ExactMetrics()->license->get_site_license_key();
|
123 |
+
$siteurl = add_query_arg( 'license', $key, $siteurl );
|
124 |
+
}
|
125 |
+
|
126 |
+
$siteurl = apply_filters( 'exactmetrics_maybe_authenticate_siteurl', $siteurl );
|
127 |
+
wp_send_json_success( array( 'redirect' => $siteurl ) );
|
128 |
+
}
|
129 |
+
|
130 |
+
public function rauthenticate() {
|
131 |
+
// Check for missing params
|
132 |
+
$reqd_args = array( 'key', 'token', 'ua', 'miview', 'a', 'w', 'p', 'tt', 'network' );
|
133 |
+
foreach ( $reqd_args as $arg ) {
|
134 |
+
if ( empty( $_REQUEST[$arg] ) ) {
|
135 |
+
wp_send_json_error(
|
136 |
+
array(
|
137 |
+
'error' => 'authenticate_missing_arg',
|
138 |
+
'message' => 'Authenticate missing parameter: ' . $arg,
|
139 |
+
'version' => EXACTMETRICS_VERSION,
|
140 |
+
'pro' => exactmetrics_is_pro_version(),
|
141 |
+
)
|
142 |
+
);
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
if ( ! empty( $_REQUEST['network'] ) && 'network' === $_REQUEST['network'] ) {
|
147 |
+
define( 'WP_NETWORK_ADMIN', true );
|
148 |
+
}
|
149 |
+
|
150 |
+
if ( ! $this->validate_tt( $_REQUEST['tt'] ) ) {
|
151 |
+
wp_send_json_error(
|
152 |
+
array(
|
153 |
+
'error' => 'authenticate_invalid_tt',
|
154 |
+
'message' => 'Invalid TT sent',
|
155 |
+
'version' => EXACTMETRICS_VERSION,
|
156 |
+
'pro' => exactmetrics_is_pro_version(),
|
157 |
+
)
|
158 |
+
);
|
159 |
+
}
|
160 |
+
|
161 |
+
// If the tt is validated, send a success response to trigger the regular auth process.
|
162 |
+
wp_send_json_success();
|
163 |
+
}
|
164 |
+
|
165 |
+
public function authenticate_listener(){
|
166 |
+
// Make sure it's for us
|
167 |
+
if ( empty( $_REQUEST['mi-oauth-action'] ) || $_REQUEST['mi-oauth-action'] !== 'auth' ) {
|
168 |
+
return;
|
169 |
+
}
|
170 |
+
|
171 |
+
// User can authenticate
|
172 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
173 |
+
return;
|
174 |
+
}
|
175 |
+
|
176 |
+
// Invalid request
|
177 |
+
if ( empty( $_REQUEST['tt'] ) || ! $this->validate_tt( $_REQUEST['tt'] ) ) {
|
178 |
+
return;
|
179 |
+
}
|
180 |
+
|
181 |
+
// Make sure has required params
|
182 |
+
if ( empty( $_REQUEST['key'] ) ||
|
183 |
+
empty( $_REQUEST['token'] ) ||
|
184 |
+
empty( $_REQUEST['ua'] ) ||
|
185 |
+
empty( $_REQUEST['miview'] ) ||
|
186 |
+
empty( $_REQUEST['a'] ) ||
|
187 |
+
empty( $_REQUEST['w'] ) ||
|
188 |
+
empty( $_REQUEST['p'] )
|
189 |
+
) {
|
190 |
+
return;
|
191 |
+
}
|
192 |
+
|
193 |
+
// Invalid UA code
|
194 |
+
$ua = exactmetrics_is_valid_ua( $_REQUEST['ua'] );
|
195 |
+
if ( empty( $ua ) ) {
|
196 |
+
return;
|
197 |
+
}
|
198 |
+
|
199 |
+
$profile = array(
|
200 |
+
'key' => sanitize_text_field( $_REQUEST['key'] ),
|
201 |
+
'token' => sanitize_text_field( $_REQUEST['token'] ),
|
202 |
+
'ua' => exactmetrics_is_valid_ua( $_REQUEST['ua'] ),
|
203 |
+
'viewname' => sanitize_text_field( $_REQUEST['miview'] ),
|
204 |
+
'a' => sanitize_text_field( $_REQUEST['a'] ), // AccountID
|
205 |
+
'w' => sanitize_text_field( $_REQUEST['w'] ), // PropertyID
|
206 |
+
'p' => sanitize_text_field( $_REQUEST['p'] ), // View ID
|
207 |
+
'siteurl' => site_url(),
|
208 |
+
'neturl' => network_admin_url(),
|
209 |
+
);
|
210 |
+
|
211 |
+
$worked = $this->verify_auth( $profile );
|
212 |
+
if ( ! $worked || is_wp_error( $worked ) ) {
|
213 |
+
return;
|
214 |
+
}
|
215 |
+
|
216 |
+
// Save Profile
|
217 |
+
$this->is_network_admin() ? ExactMetrics()->auth->set_network_analytics_profile( $profile ) : ExactMetrics()->auth->set_analytics_profile( $profile );
|
218 |
+
|
219 |
+
// Clear cache
|
220 |
+
$where = $this->is_network_admin() ? 'network' : 'site';
|
221 |
+
ExactMetrics()->reporting->delete_aggregate_data( $where );
|
222 |
+
|
223 |
+
$url = $this->is_network_admin() ? network_admin_url( 'admin.php?page=exactmetrics_network' ) : admin_url( 'admin.php?page=exactmetrics_settings' ) ;
|
224 |
+
$url = add_query_arg( array(
|
225 |
+
'mi_action' => 'auth',
|
226 |
+
'success' => 'true',
|
227 |
+
), $url );
|
228 |
+
$url = apply_filters( 'exactmetrics_auth_success_redirect_url', $url );
|
229 |
+
wp_safe_redirect( $url );
|
230 |
+
exit;
|
231 |
+
}
|
232 |
+
|
233 |
+
public function maybe_reauthenticate(){
|
234 |
+
|
235 |
+
// Check nonce
|
236 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
237 |
+
|
238 |
+
// current user can authenticate
|
239 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
240 |
+
wp_send_json_error( array( 'message' => __( "You don't have permission to re-authenticate ExactMetrics.", 'google-analytics-dashboard-for-wp' ) ) );
|
241 |
+
}
|
242 |
+
|
243 |
+
if ( ! empty( $_REQUEST['isnetwork'] ) && $_REQUEST['isnetwork'] ) {
|
244 |
+
define( 'WP_NETWORK_ADMIN', true );
|
245 |
+
}
|
246 |
+
|
247 |
+
// Only for Pro users, require a license key to be entered first so we can link to things.
|
248 |
+
if ( exactmetrics_is_pro_version() ) {
|
249 |
+
$valid = is_network_admin() ? ExactMetrics()->license->is_network_licensed() : ExactMetrics()->license->is_site_licensed();
|
250 |
+
if ( exactmetrics_is_pro_version() && ! $valid ) {
|
251 |
+
wp_send_json_error( array( 'message' => __( "Cannot re-authenticate. Please enter a valid, active license key for ExactMetrics Pro into the settings.", 'google-analytics-dashboard-for-wp' ) ) );
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
// we do have a current auth
|
256 |
+
if ( ! $this->is_network_admin() && ! ExactMetrics()->auth->is_authed() ) {
|
257 |
+
wp_send_json_error( array( 'message' => __( "Cannot re-authenticate. Please authenticate.", 'google-analytics-dashboard-for-wp' ) ) );
|
258 |
+
} else if ( $this->is_network_admin() && ! ExactMetrics()->auth->is_network_authed() ) {
|
259 |
+
wp_send_json_error( array( 'message' => __( "Cannot re-authenticate the network. Please authenticate on the network settings panel.", 'google-analytics-dashboard-for-wp' ) ) );
|
260 |
+
}
|
261 |
+
|
262 |
+
$siteurl = add_query_arg( array(
|
263 |
+
'tt' => $this->get_tt(),
|
264 |
+
'sitei' => $this->get_sitei(),
|
265 |
+
'miversion' => EXACTMETRICS_VERSION,
|
266 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
267 |
+
'network' => is_network_admin() ? 'network' : 'site',
|
268 |
+
'siteurl' => is_network_admin() ? network_admin_url() : site_url(),
|
269 |
+
'key' => ExactMetrics()->auth->get_key(),
|
270 |
+
'token' => ExactMetrics()->auth->get_token(),
|
271 |
+
'return' => is_network_admin() ? network_admin_url( 'admin.php?page=exactmetrics_network' ) : admin_url( 'admin.php?page=exactmetrics_settings' ),
|
272 |
+
'testurl' => 'https://' . exactmetrics_get_api_url() . 'test/',
|
273 |
+
), $this->get_route( 'https://' . exactmetrics_get_api_url() . 'auth/reauth/{type}' ) );
|
274 |
+
|
275 |
+
if ( exactmetrics_is_pro_version() ) {
|
276 |
+
$key = is_network_admin() ? ExactMetrics()->license->get_network_license_key() : ExactMetrics()->license->get_site_license_key();
|
277 |
+
$siteurl = add_query_arg( 'license', $key, $siteurl );
|
278 |
+
}
|
279 |
+
|
280 |
+
$siteurl = apply_filters( 'exactmetrics_maybe_authenticate_siteurl', $siteurl );
|
281 |
+
|
282 |
+
wp_send_json_success( array( 'redirect' => $siteurl ) );
|
283 |
+
}
|
284 |
+
|
285 |
+
public function reauthenticate_listener(){
|
286 |
+
// Make sure it's for us
|
287 |
+
if ( empty( $_REQUEST['mi-oauth-action'] ) || $_REQUEST['mi-oauth-action'] !== 'reauth' ) {
|
288 |
+
return;
|
289 |
+
}
|
290 |
+
|
291 |
+
// User can authenticate
|
292 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
293 |
+
return;
|
294 |
+
}
|
295 |
+
|
296 |
+
// Invalid request
|
297 |
+
if ( empty( $_REQUEST['tt'] ) || ! $this->validate_tt( $_REQUEST['tt'] ) ) {
|
298 |
+
return;
|
299 |
+
}
|
300 |
+
|
301 |
+
// Make sure has required params
|
302 |
+
if (
|
303 |
+
empty( $_REQUEST['ua'] ) ||
|
304 |
+
empty( $_REQUEST['miview'] ) ||
|
305 |
+
empty( $_REQUEST['a'] ) ||
|
306 |
+
empty( $_REQUEST['w'] ) ||
|
307 |
+
empty( $_REQUEST['p'] )
|
308 |
+
) {
|
309 |
+
return;
|
310 |
+
}
|
311 |
+
|
312 |
+
// Invalid UA code
|
313 |
+
$ua = exactmetrics_is_valid_ua( $_REQUEST['ua'] );
|
314 |
+
if ( empty( $ua ) ) {
|
315 |
+
return;
|
316 |
+
}
|
317 |
+
|
318 |
+
// we do have a current auth
|
319 |
+
$existing = $this->is_network_admin() ? ExactMetrics()->auth->get_network_analytics_profile() : ExactMetrics()->auth->get_analytics_profile();
|
320 |
+
if ( empty( $existing['key'] ) || empty( $existing['token'] ) ) {
|
321 |
+
return;
|
322 |
+
}
|
323 |
+
|
324 |
+
$profile = array(
|
325 |
+
'key' => $existing['key'],
|
326 |
+
'token' => $existing['token'],
|
327 |
+
'ua' => exactmetrics_is_valid_ua( $_REQUEST['ua'] ),
|
328 |
+
'viewname' => sanitize_text_field( $_REQUEST['miview'] ),
|
329 |
+
'a' => sanitize_text_field( $_REQUEST['a'] ),
|
330 |
+
'w' => sanitize_text_field( $_REQUEST['w'] ),
|
331 |
+
'p' => sanitize_text_field( $_REQUEST['p'] ),
|
332 |
+
'siteurl' => site_url(),
|
333 |
+
'neturl' => network_admin_url(),
|
334 |
+
);
|
335 |
+
|
336 |
+
// Save Profile
|
337 |
+
$this->is_network_admin() ? ExactMetrics()->auth->set_network_analytics_profile( $profile ) : ExactMetrics()->auth->set_analytics_profile( $profile );
|
338 |
+
|
339 |
+
// Clear cache
|
340 |
+
$where = $this->is_network_admin() ? 'network' : 'site';
|
341 |
+
ExactMetrics()->reporting->delete_aggregate_data( $where );
|
342 |
+
|
343 |
+
$url = $this->is_network_admin() ? network_admin_url( 'admin.php?page=exactmetrics_network' ) : admin_url( 'admin.php?page=exactmetrics_settings' ) ;
|
344 |
+
$url = add_query_arg( array(
|
345 |
+
'mi_action' => 'reauth',
|
346 |
+
'success' => 'true',
|
347 |
+
), $url );
|
348 |
+
$url = apply_filters( 'exactmetrics_reauth_success_redirect_url', $url );
|
349 |
+
|
350 |
+
wp_safe_redirect( $url );
|
351 |
+
exit;
|
352 |
+
}
|
353 |
+
|
354 |
+
public function maybe_verify(){
|
355 |
+
|
356 |
+
// Check nonce
|
357 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
358 |
+
|
359 |
+
// current user can verify
|
360 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
361 |
+
wp_send_json_error( array( 'message' => __( "You don't have permission to verify ExactMetrics.", 'google-analytics-dashboard-for-wp' ) ) );
|
362 |
+
}
|
363 |
+
|
364 |
+
if ( ! empty( $_REQUEST['isnetwork'] ) && $_REQUEST['isnetwork'] ) {
|
365 |
+
define( 'WP_NETWORK_ADMIN', true );
|
366 |
+
}
|
367 |
+
|
368 |
+
// we have an auth to verify
|
369 |
+
if ( $this->is_network_admin() && ! ExactMetrics()->auth->is_network_authed() ) {
|
370 |
+
wp_send_json_error( array( 'message' => __( "Cannot verify. Please authenticate.", 'google-analytics-dashboard-for-wp' ) ) );
|
371 |
+
} else if ( ! $this->is_network_admin() && ! ExactMetrics()->auth->is_authed() ) {
|
372 |
+
wp_send_json_error( array( 'message' => __( "Cannot verify. Please authenticate.", 'google-analytics-dashboard-for-wp' ) ) );
|
373 |
+
}
|
374 |
+
|
375 |
+
if ( exactmetrics_is_pro_version() ) {
|
376 |
+
$valid = is_network_admin() ? ExactMetrics()->license->is_network_licensed() : ExactMetrics()->license->is_site_licensed();
|
377 |
+
if ( ! $valid ) {
|
378 |
+
wp_send_json_error( array( 'message' => __( "Cannot verify. Please enter a valid, active license key for ExactMetrics Pro into the settings.", 'google-analytics-dashboard-for-wp' ) ) );
|
379 |
+
}
|
380 |
+
}
|
381 |
+
|
382 |
+
$worked = $this->verify_auth();
|
383 |
+
if ( $worked && ! is_wp_error( $worked ) ) {
|
384 |
+
wp_send_json_success( array( 'message' => __( "Successfully verified.", 'google-analytics-dashboard-for-wp' ) ) );
|
385 |
+
} else {
|
386 |
+
wp_send_json_error( array( 'message' => __( "Could not verify.", 'google-analytics-dashboard-for-wp' ) ) );
|
387 |
+
}
|
388 |
+
}
|
389 |
+
|
390 |
+
public function verify_auth( $credentials = array() ){
|
391 |
+
$creds = ! empty( $credentials ) ? $credentials : ( $this->is_network_admin() ? ExactMetrics()->auth->get_network_analytics_profile( true ) : ExactMetrics()->auth->get_analytics_profile( true ) );
|
392 |
+
|
393 |
+
if ( empty( $creds['key'] ) ) {
|
394 |
+
return new WP_Error( 'validation-error', sprintf( __( 'Verify auth key not passed', 'google-analytics-dashboard-for-wp' ) ) );
|
395 |
+
}
|
396 |
+
|
397 |
+
$network = ! empty( $_REQUEST['network'] ) ? $_REQUEST['network'] === 'network' : $this->is_network_admin();
|
398 |
+
$api = new ExactMetrics_API_Request( $this->get_route( 'auth/verify/{type}/' ), array( 'network' => $network, 'tt' => $this->get_tt(), 'key' => $creds['key'], 'token' => $creds['token'], 'testurl' => 'https://' . exactmetrics_get_api_url() . 'test/' ) );
|
399 |
+
$ret = $api->request();
|
400 |
+
|
401 |
+
$this->rotate_tt();
|
402 |
+
if ( is_wp_error( $ret ) ) {
|
403 |
+
return $ret;
|
404 |
+
} else {
|
405 |
+
return true;
|
406 |
+
}
|
407 |
+
}
|
408 |
+
|
409 |
+
public function maybe_delete(){
|
410 |
+
|
411 |
+
// Check nonce
|
412 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
413 |
+
|
414 |
+
// current user can delete
|
415 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
416 |
+
wp_send_json_error( array( 'message' => __( "You don't have permission to deauthenticate ExactMetrics.", 'google-analytics-dashboard-for-wp' ) ) );
|
417 |
+
}
|
418 |
+
|
419 |
+
if ( ! empty( $_REQUEST['isnetwork'] ) && $_REQUEST['isnetwork'] ) {
|
420 |
+
define( 'WP_NETWORK_ADMIN', true );
|
421 |
+
}
|
422 |
+
|
423 |
+
// we have an auth to delete
|
424 |
+
if ( $this->is_network_admin() && ! ExactMetrics()->auth->is_network_authed() ) {
|
425 |
+
wp_send_json_error( array( 'message' => __( "Cannot deauthenticate. You are not currently authed.", 'google-analytics-dashboard-for-wp' ) ) );
|
426 |
+
} else if ( ! $this->is_network_admin() && ! ExactMetrics()->auth->is_authed() ) {
|
427 |
+
wp_send_json_error( array( 'message' => __( "Cannot deauthenticate. You are not currently authed.", 'google-analytics-dashboard-for-wp' ) ) );
|
428 |
+
}
|
429 |
+
|
430 |
+
if ( exactmetrics_is_pro_version() ) {
|
431 |
+
$valid = is_network_admin() ? ExactMetrics()->license->is_network_licensed() : ExactMetrics()->license->is_site_licensed();
|
432 |
+
if ( ! $valid ) {
|
433 |
+
wp_send_json_error( array( 'message' => __( "Cannot deauthenticate. Please enter a valid, active license key for ExactMetrics Pro into the settings.", 'google-analytics-dashboard-for-wp' ) ) );
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
$force = ! empty( $_REQUEST['forcedelete'] ) && $_REQUEST['forcedelete'] === 'true';
|
438 |
+
|
439 |
+
$worked = $this->delete_auth( $force );
|
440 |
+
if ( $worked && ! is_wp_error( $worked ) ) {
|
441 |
+
wp_send_json_success( array( 'message' => __( "Successfully deauthenticated.", 'google-analytics-dashboard-for-wp' ) ) );
|
442 |
+
} else {
|
443 |
+
if ( $force ) {
|
444 |
+
wp_send_json_success( array( 'message' => __( "Successfully force deauthenticated.", 'google-analytics-dashboard-for-wp' ) ) );
|
445 |
+
} else {
|
446 |
+
wp_send_json_error( array( 'message' => __( "Could not deauthenticate.", 'google-analytics-dashboard-for-wp' ) ) );
|
447 |
+
}
|
448 |
+
}
|
449 |
+
}
|
450 |
+
|
451 |
+
public function delete_auth( $force = false ){
|
452 |
+
if ( $this->is_network_admin() && ! ExactMetrics()->auth->is_network_authed() ) {
|
453 |
+
return false;
|
454 |
+
} else if ( ! $this->is_network_admin() && ! ExactMetrics()->auth->is_authed() ) {
|
455 |
+
return false;
|
456 |
+
}
|
457 |
+
|
458 |
+
$creds = $this->is_network_admin() ? ExactMetrics()->auth->get_network_analytics_profile( true ) : ExactMetrics()->auth->get_analytics_profile( true );
|
459 |
+
|
460 |
+
if ( empty( $creds['key'] ) ) {
|
461 |
+
return false;
|
462 |
+
}
|
463 |
+
|
464 |
+
// If we have a new siteurl enabled option and the profile site doesn't match the current site, deactivate anyways
|
465 |
+
if ( is_network_admin() ) {
|
466 |
+
$siteurl = network_admin_url();
|
467 |
+
if ( ! empty( $creds['neturl' ] ) && $creds['neturl'] !== $siteurl ) {
|
468 |
+
ExactMetrics()->auth->delete_network_analytics_profile( true );
|
469 |
+
return true;
|
470 |
+
}
|
471 |
+
} else {
|
472 |
+
$siteurl = site_url();
|
473 |
+
if ( ! empty( $creds['siteurl' ] ) && $creds['siteurl'] !== $siteurl ) {
|
474 |
+
ExactMetrics()->auth->delete_analytics_profile( true );
|
475 |
+
return true;
|
476 |
+
}
|
477 |
+
}
|
478 |
+
|
479 |
+
$api = new ExactMetrics_API_Request( $this->get_route( 'auth/delete/{type}/' ), array( 'network' => $this->is_network_admin(), 'tt' => $this->get_tt(), 'key' => $creds['key'], 'token' => $creds['token'], 'testurl' => 'https://' . exactmetrics_get_api_url() . 'test/' ) );
|
480 |
+
$ret = $api->request();
|
481 |
+
|
482 |
+
$this->rotate_tt();
|
483 |
+
if ( is_wp_error( $ret ) && ! $force ) {
|
484 |
+
return false;
|
485 |
+
} else {
|
486 |
+
if ( $this->is_network_admin() ) {
|
487 |
+
ExactMetrics()->auth->delete_network_analytics_profile( true );
|
488 |
+
} else {
|
489 |
+
ExactMetrics()->auth->delete_analytics_profile( true );
|
490 |
+
|
491 |
+
}
|
492 |
+
return true;
|
493 |
+
}
|
494 |
+
}
|
495 |
+
|
496 |
+
/**
|
497 |
+
* Function to delete network auth in the uninstall process where we can't check if is network admin.
|
498 |
+
*
|
499 |
+
* @return bool
|
500 |
+
*/
|
501 |
+
public function uninstall_network_auth() {
|
502 |
+
|
503 |
+
if ( ! ExactMetrics()->auth->is_network_authed() ) {
|
504 |
+
return false;
|
505 |
+
}
|
506 |
+
|
507 |
+
$creds = ExactMetrics()->auth->get_network_analytics_profile( true );
|
508 |
+
|
509 |
+
$api = new ExactMetrics_API_Request( $this->get_route( 'auth/delete/{type}/' ), array(
|
510 |
+
'network' => true,
|
511 |
+
'tt' => $this->get_tt(),
|
512 |
+
'key' => $creds['key'],
|
513 |
+
'token' => $creds['token'],
|
514 |
+
'testurl' => 'https://' . exactmetrics_get_api_url() . 'test/'
|
515 |
+
) );
|
516 |
+
// Force the network admin url otherwise this will fail not finding the url in relay.
|
517 |
+
$api->site_url = network_admin_url();
|
518 |
+
$ret = $api->request();
|
519 |
+
|
520 |
+
$this->rotate_tt();
|
521 |
+
if ( is_wp_error( $ret ) ) {
|
522 |
+
return false;
|
523 |
+
} else {
|
524 |
+
ExactMetrics()->auth->delete_network_analytics_profile( true );
|
525 |
+
return true;
|
526 |
+
}
|
527 |
+
}
|
528 |
+
|
529 |
+
public function get_type() {
|
530 |
+
$base = exactmetrics_is_pro_version() ? 'pro' : 'lite';
|
531 |
+
return apply_filters( 'exactmetrics_api_auth_get_type', $base );
|
532 |
+
}
|
533 |
+
|
534 |
+
public function get_route( $route = '' ) {
|
535 |
+
$route = str_replace( '{type}', $this->get_type(), $route );
|
536 |
+
$route = trailingslashit( $route );
|
537 |
+
return $route;
|
538 |
+
}
|
539 |
+
|
540 |
+
public function is_network_admin() {
|
541 |
+
return is_multisite() && is_network_admin();
|
542 |
+
}
|
543 |
+
|
544 |
+
public function get_sitei() {
|
545 |
+
// $sitei = get_network_option( get_current_network_id(), 'exactmetrics_network_sitei', false );
|
546 |
+
// if ( ! empty( $sitei ) && strlen( $sitei ) >= 1 ) {
|
547 |
+
// return $sitei;
|
548 |
+
// }
|
549 |
+
|
550 |
+
$auth_key = defined( 'AUTH_KEY' ) ? AUTH_KEY : '';
|
551 |
+
$secure_auth_key = defined( 'SECURE_AUTH_KEY' ) ? SECURE_AUTH_KEY : '';
|
552 |
+
$logged_in_key = defined( 'LOGGED_IN_KEY' ) ? LOGGED_IN_KEY : '';
|
553 |
+
|
554 |
+
$sitei = $auth_key . $secure_auth_key . $logged_in_key;
|
555 |
+
$sitei = preg_replace('/[^a-zA-Z0-9]/', '', $sitei );
|
556 |
+
$sitei = sanitize_text_field( $sitei );
|
557 |
+
$sitei = trim( $sitei );
|
558 |
+
$sitei = ( strlen($sitei) > 30 ) ? substr($sitei, 0, 30 ) : $sitei;
|
559 |
+
return $sitei;
|
560 |
+
}
|
561 |
+
|
562 |
+
/**
|
563 |
+
* Logic to run before serving the redirect url during auth.
|
564 |
+
*
|
565 |
+
* @param string $url
|
566 |
+
*
|
567 |
+
* @return string
|
568 |
+
*/
|
569 |
+
public function before_redirect( $url ) {
|
570 |
+
|
571 |
+
// If Bad Behavior plugin is installed.
|
572 |
+
if ( function_exists( 'bb2_read_settings' ) ) {
|
573 |
+
// Make sure the offsite_forms option is enabled to allow auth.
|
574 |
+
$bb_settings = get_option( 'bad_behavior_settings' );
|
575 |
+
if ( empty( $bb_settings['offsite_forms'] ) || false === $bb_settings['offsite_forms'] ) {
|
576 |
+
$bb_settings['offsite_forms'] = true;
|
577 |
+
update_option( 'bad_behavior_settings', $bb_settings );
|
578 |
+
}
|
579 |
+
}
|
580 |
+
|
581 |
+
return $url;
|
582 |
+
}
|
583 |
+
}
|
includes/admin/common.php
ADDED
@@ -0,0 +1,1094 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Common admin class.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @subpackage Common
|
9 |
+
* @author Chris Christoff
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
function exactmetrics_is_settings_page() {
|
18 |
+
$current_screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
19 |
+
global $admin_page_hooks;
|
20 |
+
|
21 |
+
if ( ! is_object( $current_screen ) || empty( $current_screen->id ) || empty( $admin_page_hooks ) ) {
|
22 |
+
return false;
|
23 |
+
}
|
24 |
+
|
25 |
+
$settings_page = false;
|
26 |
+
if ( ! empty( $admin_page_hooks['exactmetrics_settings'] ) && $current_screen->id === $admin_page_hooks['exactmetrics_settings'] ) {
|
27 |
+
$settings_page = true;
|
28 |
+
}
|
29 |
+
|
30 |
+
if ( $current_screen->id === 'toplevel_page_exactmetrics_settings' ) {
|
31 |
+
$settings_page = true;
|
32 |
+
}
|
33 |
+
|
34 |
+
if ( $current_screen->id === 'exactmetrics_page_exactmetrics_settings' ) {
|
35 |
+
$settings_page = true;
|
36 |
+
}
|
37 |
+
|
38 |
+
if ( strpos( $current_screen->id, 'exactmetrics_settings' ) !== false ) {
|
39 |
+
$settings_page = true;
|
40 |
+
}
|
41 |
+
|
42 |
+
if ( ! empty( $current_screen->base ) && strpos( $current_screen->base, 'exactmetrics_network' ) !== false ) {
|
43 |
+
$settings_page = true;
|
44 |
+
}
|
45 |
+
return $settings_page;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Determine if the current page is the Reports page.
|
50 |
+
*
|
51 |
+
* @return bool
|
52 |
+
*/
|
53 |
+
function exactmetrics_is_reports_page() {
|
54 |
+
$current_screen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
|
55 |
+
global $admin_page_hooks;
|
56 |
+
|
57 |
+
if ( ! is_object( $current_screen ) || empty( $current_screen->id ) || empty( $admin_page_hooks ) ) {
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
|
61 |
+
$settings_page = false;
|
62 |
+
if ( ! empty( $admin_page_hooks['exactmetrics_reports'] ) && $current_screen->id === $admin_page_hooks['exactmetrics_reports'] ) {
|
63 |
+
$settings_page = true;
|
64 |
+
}
|
65 |
+
|
66 |
+
if ( 'toplevel_page_exactmetrics_reports' === $current_screen->id ) {
|
67 |
+
$settings_page = true;
|
68 |
+
}
|
69 |
+
|
70 |
+
if ( strpos( $current_screen->id, 'exactmetrics_reports' ) !== false ) {
|
71 |
+
$settings_page = true;
|
72 |
+
}
|
73 |
+
|
74 |
+
if ( ! empty( $current_screen->base ) && strpos( $current_screen->base, 'exactmetrics_network' ) !== false ) {
|
75 |
+
$settings_page = true;
|
76 |
+
}
|
77 |
+
|
78 |
+
return $settings_page;
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Loads styles for all ExactMetrics-based Administration Screens.
|
83 |
+
*
|
84 |
+
* @return null Return early if not on the proper screen.
|
85 |
+
* @since 6.0.0
|
86 |
+
* @access public
|
87 |
+
*
|
88 |
+
*/
|
89 |
+
function exactmetrics_admin_styles() {
|
90 |
+
|
91 |
+
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
92 |
+
|
93 |
+
// Load Common admin styles.
|
94 |
+
wp_register_style( 'exactmetrics-admin-common-style', plugins_url( 'assets/css/admin-common' . $suffix . '.css', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version() );
|
95 |
+
wp_enqueue_style( 'exactmetrics-admin-common-style' );
|
96 |
+
|
97 |
+
// Get current screen.
|
98 |
+
$screen = get_current_screen();
|
99 |
+
|
100 |
+
// Bail if we're not on a ExactMetrics screen.
|
101 |
+
if ( empty( $screen->id ) || strpos( $screen->id, 'exactmetrics' ) === false ) {
|
102 |
+
return;
|
103 |
+
}
|
104 |
+
|
105 |
+
$version_path = exactmetrics_is_pro_version() ? 'pro' : 'lite';
|
106 |
+
$rtl = is_rtl() ? '.rtl' : '';
|
107 |
+
|
108 |
+
// For the settings page, load the Vue app styles.
|
109 |
+
if ( exactmetrics_is_settings_page() ) {
|
110 |
+
if ( ! defined( 'EXACTMETRICS_LOCAL_JS_URL' ) ) {
|
111 |
+
wp_enqueue_style( 'exactmetrics-vue-style-vendors', plugins_url( $version_path . '/assets/vue/css/chunk-vendors' . $rtl . '.css', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version() );
|
112 |
+
wp_enqueue_style( 'exactmetrics-vue-style-common', plugins_url( $version_path . '/assets/vue/css/chunk-common' . $rtl . '.css', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version() );
|
113 |
+
wp_enqueue_style( 'exactmetrics-vue-style', plugins_url( $version_path . '/assets/vue/css/settings' . $rtl . '.css', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version() );
|
114 |
+
}
|
115 |
+
|
116 |
+
// Don't load other styles on the settings page.
|
117 |
+
return;
|
118 |
+
}
|
119 |
+
|
120 |
+
if ( exactmetrics_is_reports_page() ) {
|
121 |
+
if ( ! defined( 'EXACTMETRICS_LOCAL_REPORTS_JS_URL' ) ) {
|
122 |
+
wp_enqueue_style( 'exactmetrics-vue-style-vendors', plugins_url( $version_path . '/assets/vue/css/chunk-vendors' . $rtl . '.css', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version() );
|
123 |
+
wp_enqueue_style( 'exactmetrics-vue-style-common', plugins_url( $version_path . '/assets/vue/css/chunk-common' . $rtl . '.css', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version() );
|
124 |
+
wp_enqueue_style( 'exactmetrics-vue-style', plugins_url( $version_path . '/assets/vue/css/reports' . $rtl . '.css', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version() );
|
125 |
+
}
|
126 |
+
|
127 |
+
return;
|
128 |
+
}
|
129 |
+
|
130 |
+
// Tooltips
|
131 |
+
wp_enqueue_script( 'jquery-ui-tooltip' );
|
132 |
+
}
|
133 |
+
|
134 |
+
add_action( 'admin_enqueue_scripts', 'exactmetrics_admin_styles' );
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Loads scripts for all ExactMetrics-based Administration Screens.
|
138 |
+
*
|
139 |
+
* @return null Return early if not on the proper screen.
|
140 |
+
* @since 6.0.0
|
141 |
+
* @access public
|
142 |
+
*
|
143 |
+
*/
|
144 |
+
function exactmetrics_admin_scripts() {
|
145 |
+
|
146 |
+
// Our Common Admin JS.
|
147 |
+
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
148 |
+
|
149 |
+
wp_register_script( 'exactmetrics-admin-common-script', plugins_url( 'assets/js/admin-common' . $suffix . '.js', EXACTMETRICS_PLUGIN_FILE ), array( 'jquery' ), exactmetrics_get_asset_version() );
|
150 |
+
wp_enqueue_script( 'exactmetrics-admin-common-script' );
|
151 |
+
wp_localize_script(
|
152 |
+
'exactmetrics-admin-common-script',
|
153 |
+
'exactmetrics_admin_common',
|
154 |
+
array(
|
155 |
+
'ajax' => admin_url( 'admin-ajax.php' ),
|
156 |
+
'dismiss_notice_nonce' => wp_create_nonce( 'exactmetrics-dismiss-notice' ),
|
157 |
+
)
|
158 |
+
);
|
159 |
+
|
160 |
+
// Get current screen.
|
161 |
+
$screen = get_current_screen();
|
162 |
+
|
163 |
+
// Bail if we're not on a ExactMetrics screen.
|
164 |
+
if ( empty( $screen->id ) || strpos( $screen->id, 'exactmetrics' ) === false ) {
|
165 |
+
return;
|
166 |
+
}
|
167 |
+
|
168 |
+
$version_path = exactmetrics_is_pro_version() ? 'pro' : 'lite';
|
169 |
+
|
170 |
+
// For the settings page, load the Vue app.
|
171 |
+
if ( exactmetrics_is_settings_page() ) {
|
172 |
+
global $wp_version;
|
173 |
+
|
174 |
+
if ( ! defined( 'EXACTMETRICS_LOCAL_VENDORS_JS_URL' ) ) {
|
175 |
+
wp_enqueue_script( 'exactmetrics-vue-vendors', plugins_url( $version_path . '/assets/vue/js/chunk-vendors.js', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version(), true );
|
176 |
+
wp_enqueue_script( 'exactmetrics-vue-common', plugins_url( $version_path . '/assets/vue/js/chunk-common.js', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version(), true );
|
177 |
+
} else {
|
178 |
+
wp_enqueue_script( 'exactmetrics-vue-vendors', EXACTMETRICS_LOCAL_VENDORS_JS_URL, array(), exactmetrics_get_asset_version(), true );
|
179 |
+
wp_enqueue_script( 'exactmetrics-vue-common', EXACTMETRICS_LOCAL_COMMON_JS_URL, array(), exactmetrics_get_asset_version(), true );
|
180 |
+
}
|
181 |
+
$app_js_url = defined( 'EXACTMETRICS_LOCAL_JS_URL' ) && EXACTMETRICS_LOCAL_JS_URL ? EXACTMETRICS_LOCAL_JS_URL : plugins_url( $version_path . '/assets/vue/js/settings.js', EXACTMETRICS_PLUGIN_FILE );
|
182 |
+
wp_register_script( 'exactmetrics-vue-script', $app_js_url, array(), exactmetrics_get_asset_version(), true );
|
183 |
+
wp_enqueue_script( 'exactmetrics-vue-script' );
|
184 |
+
$plugins = get_plugins();
|
185 |
+
$install_amp_url = false;
|
186 |
+
if ( current_user_can( 'install_plugins' ) ) {
|
187 |
+
$amp_key = 'amp/amp.php';
|
188 |
+
if ( array_key_exists( $amp_key, $plugins ) ) {
|
189 |
+
$install_amp_url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=' . $amp_key ), 'activate-plugin_' . $amp_key );
|
190 |
+
} else {
|
191 |
+
$install_amp_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=amp' ), 'install-plugin_amp' );
|
192 |
+
}
|
193 |
+
}
|
194 |
+
$install_fbia_url = false;
|
195 |
+
if ( current_user_can( 'install_plugins' ) ) {
|
196 |
+
$fbia_key = 'fb-instant-articles/facebook-instant-articles.php';
|
197 |
+
if ( array_key_exists( $fbia_key, $plugins ) ) {
|
198 |
+
$install_fbia_url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=' . $fbia_key ), 'activate-plugin_' . $fbia_key );
|
199 |
+
} else {
|
200 |
+
$install_fbia_url = wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=fb-instant-articles' ), 'install-plugin_fb-instant-articles' );
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
$prepared_dimensions = array();
|
205 |
+
if ( class_exists( 'ExactMetrics_Admin_Custom_Dimensions' ) ) {
|
206 |
+
$dimensions = new ExactMetrics_Admin_Custom_Dimensions();
|
207 |
+
$dimensions = $dimensions->custom_dimensions();
|
208 |
+
$prepared_dimensions = array();
|
209 |
+
foreach ( $dimensions as $dimension_type => $dimension ) {
|
210 |
+
$dimension['type'] = $dimension_type;
|
211 |
+
$prepared_dimensions[] = $dimension;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
$is_authed = ( ExactMetrics()->auth->is_authed() || ExactMetrics()->auth->is_network_authed() );
|
215 |
+
|
216 |
+
wp_localize_script(
|
217 |
+
'exactmetrics-vue-script',
|
218 |
+
'exactmetrics',
|
219 |
+
array(
|
220 |
+
'ajax' => admin_url( 'admin-ajax.php' ),
|
221 |
+
'nonce' => wp_create_nonce( 'mi-admin-nonce' ),
|
222 |
+
'network' => is_network_admin(),
|
223 |
+
'translations' => wp_get_jed_locale_data( exactmetrics_is_pro_version() ? 'exactmetrics-premium' : 'google-analytics-dashboard-for-wp' ),
|
224 |
+
'assets' => plugins_url( $version_path . '/assets/vue', EXACTMETRICS_PLUGIN_FILE ),
|
225 |
+
'roles' => exactmetrics_get_roles(),
|
226 |
+
'roles_manage_options' => exactmetrics_get_manage_options_roles(),
|
227 |
+
'shareasale_id' => exactmetrics_get_shareasale_id(),
|
228 |
+
'shareasale_url' => exactmetrics_get_shareasale_url( exactmetrics_get_shareasale_id(), '' ),
|
229 |
+
'addons_url' => is_multisite() ? network_admin_url( 'admin.php?page=exactmetrics_network#/addons' ) : admin_url( 'admin.php?page=exactmetrics_settings#/addons' ),
|
230 |
+
'install_amp_url' => $install_amp_url,
|
231 |
+
'install_fbia_url' => $install_fbia_url,
|
232 |
+
'dimensions' => $prepared_dimensions,
|
233 |
+
'wizard_url' => admin_url( 'index.php?page=exactmetrics-onboarding' ),
|
234 |
+
'install_plugins' => current_user_can( 'install_plugins' ),
|
235 |
+
'unfiltered_html' => current_user_can( 'unfiltered_html' ),
|
236 |
+
'activate_nonce' => wp_create_nonce( 'exactmetrics-activate' ),
|
237 |
+
'deactivate_nonce' => wp_create_nonce( 'exactmetrics-deactivate' ),
|
238 |
+
'install_nonce' => wp_create_nonce( 'exactmetrics-install' ),
|
239 |
+
// Used to add notices for future deprecations.
|
240 |
+
'versions' => array(
|
241 |
+
'php_version' => phpversion(),
|
242 |
+
'php_version_below_54' => apply_filters( 'exactmetrics_temporarily_hide_php_52_and_53_upgrade_warnings', version_compare( phpversion(), '5.4', '<' ) ),
|
243 |
+
'php_version_below_56' => apply_filters( 'exactmetrics_temporarily_hide_php_54_and_55_upgrade_warnings', version_compare( phpversion(), '5.6', '<' ) ),
|
244 |
+
'php_update_link' => exactmetrics_get_url( 'settings-notice', 'settings-page', 'https://www.exactmetrics.com/docs/update-php/' ),
|
245 |
+
'wp_version' => $wp_version,
|
246 |
+
'wp_version_below_46' => version_compare( $wp_version, '4.6', '<' ),
|
247 |
+
'wp_version_below_49' => version_compare( $wp_version, '4.9', '<' ),
|
248 |
+
'wp_update_link' => exactmetrics_get_url( 'settings-notice', 'settings-page', 'https://www.exactmetrics.com/docs/update-wordpress/' ),
|
249 |
+
),
|
250 |
+
'plugin_version' => EXACTMETRICS_VERSION,
|
251 |
+
'is_admin' => true,
|
252 |
+
'reports_url' => add_query_arg( 'page', 'exactmetrics_reports', admin_url( 'admin.php' ) ),
|
253 |
+
'first_run_notice' => apply_filters( 'exactmetrics_settings_first_time_notice_hide', exactmetrics_get_option( 'exactmetrics_first_run_notice' ) ),
|
254 |
+
'getting_started_url' => is_multisite() ? network_admin_url( 'admin.php?page=exactmetrics_network#/about/getting-started' ) : admin_url( 'admin.php?page=exactmetrics_settings#/about/getting-started' ),
|
255 |
+
'authed' => $is_authed,
|
256 |
+
)
|
257 |
+
);
|
258 |
+
|
259 |
+
// Don't load other scripts on the settings page.
|
260 |
+
return;
|
261 |
+
}
|
262 |
+
|
263 |
+
if ( exactmetrics_is_reports_page() ) {
|
264 |
+
global $wp_version;
|
265 |
+
if ( ! defined( 'EXACTMETRICS_LOCAL_VENDORS_JS_URL' ) ) {
|
266 |
+
wp_enqueue_script( 'exactmetrics-vue-vendors', plugins_url( $version_path . '/assets/vue/js/chunk-vendors.js', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version(), true );
|
267 |
+
wp_enqueue_script( 'exactmetrics-vue-common', plugins_url( $version_path . '/assets/vue/js/chunk-common.js', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version(), true );
|
268 |
+
} else {
|
269 |
+
wp_enqueue_script( 'exactmetrics-vue-vendors', EXACTMETRICS_LOCAL_VENDORS_JS_URL, array(), exactmetrics_get_asset_version(), true );
|
270 |
+
wp_enqueue_script( 'exactmetrics-vue-common', EXACTMETRICS_LOCAL_COMMON_JS_URL, array(), exactmetrics_get_asset_version(), true );
|
271 |
+
}
|
272 |
+
$app_js_url = defined( 'EXACTMETRICS_LOCAL_REPORTS_JS_URL' ) && EXACTMETRICS_LOCAL_REPORTS_JS_URL ? EXACTMETRICS_LOCAL_REPORTS_JS_URL : plugins_url( $version_path . '/assets/vue/js/reports.js', EXACTMETRICS_PLUGIN_FILE );
|
273 |
+
wp_register_script( 'exactmetrics-vue-reports', $app_js_url, array(), exactmetrics_get_asset_version(), true );
|
274 |
+
wp_enqueue_script( 'exactmetrics-vue-reports' );
|
275 |
+
|
276 |
+
// We do not have a current auth.
|
277 |
+
$site_auth = ExactMetrics()->auth->get_viewname();
|
278 |
+
$ms_auth = is_multisite() && ExactMetrics()->auth->get_network_viewname();
|
279 |
+
|
280 |
+
wp_localize_script(
|
281 |
+
'exactmetrics-vue-reports',
|
282 |
+
'exactmetrics',
|
283 |
+
array(
|
284 |
+
'ajax' => admin_url( 'admin-ajax.php' ),
|
285 |
+
'nonce' => wp_create_nonce( 'mi-admin-nonce' ),
|
286 |
+
'network' => is_network_admin(),
|
287 |
+
'translations' => wp_get_jed_locale_data( exactmetrics_is_pro_version() ? 'exactmetrics-premium' : 'google-analytics-dashboard-for-wp' ),
|
288 |
+
'assets' => plugins_url( $version_path . '/assets/vue', EXACTMETRICS_PLUGIN_FILE ),
|
289 |
+
'shareasale_id' => exactmetrics_get_shareasale_id(),
|
290 |
+
'shareasale_url' => exactmetrics_get_shareasale_url( exactmetrics_get_shareasale_id(), '' ),
|
291 |
+
'addons_url' => is_multisite() ? network_admin_url( 'admin.php?page=exactmetrics_network#/addons' ) : admin_url( 'admin.php?page=exactmetrics_settings#/addons' ),
|
292 |
+
'timezone' => date( 'e' ),
|
293 |
+
'authed' => $site_auth || $ms_auth,
|
294 |
+
'settings_url' => add_query_arg( 'page', 'exactmetrics_settings', admin_url( 'admin.php' ) ),
|
295 |
+
// Used to add notices for future deprecations.
|
296 |
+
'versions' => array(
|
297 |
+
'php_version' => phpversion(),
|
298 |
+
'php_version_below_54' => apply_filters( 'exactmetrics_temporarily_hide_php_52_and_53_upgrade_warnings', version_compare( phpversion(), '5.4', '<' ) ),
|
299 |
+
'php_version_below_56' => apply_filters( 'exactmetrics_temporarily_hide_php_54_and_55_upgrade_warnings', version_compare( phpversion(), '5.6', '<' ) ),
|
300 |
+
'php_update_link' => exactmetrics_get_url( 'settings-notice', 'settings-page', 'https://www.exactmetrics.com/docs/update-php/' ),
|
301 |
+
'wp_version' => $wp_version,
|
302 |
+
'wp_version_below_46' => version_compare( $wp_version, '4.6', '<' ),
|
303 |
+
'wp_version_below_49' => version_compare( $wp_version, '4.9', '<' ),
|
304 |
+
'wp_update_link' => exactmetrics_get_url( 'settings-notice', 'settings-page', 'https://www.exactmetrics.com/docs/update-wordpress/' ),
|
305 |
+
),
|
306 |
+
'plugin_version' => EXACTMETRICS_VERSION,
|
307 |
+
'is_admin' => true,
|
308 |
+
'wizard_url' => admin_url( 'index.php?page=exactmetrics-onboarding' ),
|
309 |
+
'install_nonce' => wp_create_nonce( 'exactmetrics-install' ),
|
310 |
+
'activate_nonce' => wp_create_nonce( 'exactmetrics-activate' ),
|
311 |
+
'deactivate_nonce'=> wp_create_nonce( 'exactmetrics-deactivate' ),
|
312 |
+
'update_settings' => current_user_can( 'exactmetrics_save_settings' ),
|
313 |
+
)
|
314 |
+
);
|
315 |
+
|
316 |
+
return;
|
317 |
+
}
|
318 |
+
// ublock notice
|
319 |
+
add_action( 'admin_print_footer_scripts', 'exactmetrics_settings_ublock_error_js', 9999999 );
|
320 |
+
}
|
321 |
+
|
322 |
+
add_action( 'admin_enqueue_scripts', 'exactmetrics_admin_scripts' );
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Remove Assets that conflict with ours from our screens.
|
326 |
+
*
|
327 |
+
* @return null Return early if not on the proper screen.
|
328 |
+
* @since 6.0.4
|
329 |
+
* @access public
|
330 |
+
*
|
331 |
+
*/
|
332 |
+
function exactmetrics_remove_conflicting_asset_files() {
|
333 |
+
|
334 |
+
// Get current screen.
|
335 |
+
$screen = get_current_screen();
|
336 |
+
|
337 |
+
// Bail if we're not on a ExactMetrics screen.
|
338 |
+
if ( empty( $screen->id ) || strpos( $screen->id, 'exactmetrics' ) === false ) {
|
339 |
+
return;
|
340 |
+
}
|
341 |
+
|
342 |
+
$styles = array(
|
343 |
+
'kt_admin_css', // Pinnacle theme
|
344 |
+
'select2-css', // Schema theme
|
345 |
+
'tweetshare_style', // TweetShare - Click To Tweet
|
346 |
+
'tweetshare_custom_style', // TweetShare - Click To Tweet
|
347 |
+
'tweeetshare_custome_style', // TweetShare - Click To Tweet
|
348 |
+
'tweeetshare_notice_style', // TweetShare - Click To Tweet
|
349 |
+
'tweeetshare_theme_style', // TweetShare - Click To Tweet
|
350 |
+
'tweeetshare_tweet_box_style', // TweetShare - Click To Tweet
|
351 |
+
'soultype2-admin', // SoulType Plugin
|
352 |
+
'thesis-options-stylesheet', // Thesis Options Stylesheet
|
353 |
+
'imagify-sweetalert-core', // Imagify
|
354 |
+
'imagify-sweetalert', // Imagify
|
355 |
+
'smls-backend-style', // Smart Logo Showcase Lite
|
356 |
+
'wp-reactjs-starter', // wp-real-media-library
|
357 |
+
'control-panel-modal-plugin', // Ken Theme
|
358 |
+
'theme-admin-css', // Vitrine Theme
|
359 |
+
'qi-framework-styles', // Artisan Nayma Theme
|
360 |
+
'artisan-pages-style', // Artisan Pages Plugin
|
361 |
+
'control-panel-modal-plugin', // Ken Theme
|
362 |
+
'sweetalert', // Church Suite Theme by Webnus
|
363 |
+
'woo_stock_alerts_admin_css', // WooCommerce bolder product alerts
|
364 |
+
'custom_wp_admin_css', // Fix for Add Social Share
|
365 |
+
'fo_css', // Fix for Add Social Share
|
366 |
+
'font_css', // Fix for Add Social Share
|
367 |
+
'font2_css', // Fix for Add Social Share
|
368 |
+
'font3_css', // Fix for Add Social Share
|
369 |
+
'hover_css', // Fix for Add Social Share
|
370 |
+
'fontend_styling', // Fix for Add Social Share
|
371 |
+
'datatable', // WP Todo
|
372 |
+
'bootstrap', // WP Todo
|
373 |
+
'flipclock', // WP Todo
|
374 |
+
'repuso_css_admin', // Social testimonials and reviews by Repuso
|
375 |
+
);
|
376 |
+
|
377 |
+
$scripts = array(
|
378 |
+
'kad_admin_js', // Pinnacle theme
|
379 |
+
'dt-chart', // DesignThemes core features plugin
|
380 |
+
'tweeetshare_font_script', // TweetShare - Click To Tweet
|
381 |
+
'tweeetshare_jquery_script', // TweetShare - Click To Tweet
|
382 |
+
'tweeetshare_jqueryui_script', // TweetShare - Click To Tweet
|
383 |
+
'tweeetshare_custom_script', // TweetShare - Click To Tweet
|
384 |
+
'imagify-promise-polyfill', // Imagify
|
385 |
+
'imagify-sweetalert', // Imagify
|
386 |
+
'imagify-chart', // Imagify
|
387 |
+
'chartjs', // Comet Cache Pro
|
388 |
+
'wp-reactjs-starter', // wp-real-media-library
|
389 |
+
'jquery-tooltipster', // WP Real Media Library
|
390 |
+
'jquery-nested-sortable', // WP Real Media Library
|
391 |
+
'jquery-aio-tree', // WP Real Media Library
|
392 |
+
'wp-media-picker', // WP Real Media Library
|
393 |
+
'rml-general', // WP Real Media Library
|
394 |
+
'rml-library', // WP Real Media Library
|
395 |
+
'rml-grid', // WP Real Media Library
|
396 |
+
'rml-list', // WP Real Media Library
|
397 |
+
'rml-modal', // WP Real Media Library
|
398 |
+
'rml-order', // WP Real Media Library
|
399 |
+
'rml-meta', // WP Real Media Library
|
400 |
+
'rml-uploader', // WP Real Media Library
|
401 |
+
'rml-options', // WP Real Media Library
|
402 |
+
'rml-usersettings', // WP Real Media Library
|
403 |
+
'rml-main', // WP Real Media Library
|
404 |
+
'control-panel-sweet-alert', // Ken Theme
|
405 |
+
'sweet-alert-js', // Vitrine Theme
|
406 |
+
'theme-admin-script', // Vitrine Theme
|
407 |
+
'sweetalert', // Church Suite Theme by Webnus
|
408 |
+
'be_alerts_charts', // WooCommerce bolder product alerts
|
409 |
+
'magayo-lottery-results', // Magayo Lottery Results
|
410 |
+
'control-panel-sweet-alert', // Ken Theme
|
411 |
+
'cpm_chart', // WP Project Manager
|
412 |
+
'adminscripts', // Artisan Nayma Theme
|
413 |
+
'artisan-pages-script', // Artisan Pages Plugin
|
414 |
+
'tooltipster', // Grand News Theme
|
415 |
+
'fancybox', // Grand News Theme
|
416 |
+
'grandnews-admin-cript', // Grand News Theme
|
417 |
+
'colorpicker', // Grand News Theme
|
418 |
+
'eye', // Grand News Theme
|
419 |
+
'icheck', // Grand News Theme
|
420 |
+
'learn-press-chart', // LearnPress
|
421 |
+
'theme-script-main', // My Listing Theme by 27collective
|
422 |
+
'selz', // Selz eCommerce
|
423 |
+
'tie-admin-scripts', // Tie Theme
|
424 |
+
'blossomthemes-toolkit', // BlossomThemes Toolkit
|
425 |
+
'illdy-widget-upload-image', // Illdy Companion By Colorlib
|
426 |
+
'moment.js', // WooCommerce Table Rate Shipping
|
427 |
+
'default', // Bridge Theme
|
428 |
+
'qode-tax-js', // Bridge Theme
|
429 |
+
'wc_smartship_moment_js', // WooCommerce Posti SmartShip by markup.fi
|
430 |
+
'ecwid-admin-js', // Fixes Conflict for Ecwid Shopping Cart
|
431 |
+
'td-wp-admin-js', // Newspaper by tagDiv
|
432 |
+
'moment', // Screets Live Chat
|
433 |
+
'wpmf-base', // WP Media Folder Fix
|
434 |
+
'wpmf-media-filters', // WP Media Folder Fix
|
435 |
+
'wpmf-folder-tree', // WP Media Folder Fix
|
436 |
+
'wpmf-assign-tree', // WP Media Folder Fix
|
437 |
+
'js_files_for_wp_admin', // TagDiv Composer Fix
|
438 |
+
'tdb_js_files_for_wp_admin_last', // TagDiv Composer Fix
|
439 |
+
'tdb_js_files_for_wp_admin', // TagDiv Composer Fix
|
440 |
+
'wd-functions', // affiliate boxes
|
441 |
+
'ellk-aliExpansion', // Ali Dropship Plugin
|
442 |
+
'ftmetajs', // Houzez Theme
|
443 |
+
'qode_admin_default', // Fix For Stockholm Theme
|
444 |
+
'qodef-tax-js', // Fix for Prowess Theme
|
445 |
+
'qodef-user-js', // Fix for Prowess Theme
|
446 |
+
'qodef-ui-admin', // Fix for Prowess Theme
|
447 |
+
'ssi_script', // Fix for Add Social Share
|
448 |
+
'live_templates', // Fix for Add Social Share
|
449 |
+
'default', // Fix for Add Social Share
|
450 |
+
'handsontable', // Fix WP Tables
|
451 |
+
'moment-js', // Magee Shortcodes
|
452 |
+
'postbox', // Scripts from wp-admin enqueued everywhere by WP Posts Filter
|
453 |
+
'link', // Scripts from wp-admin enqueued everywhere by WP Posts Filter
|
454 |
+
'wpvr_scripts', // WP Video Robot
|
455 |
+
'wpvr_scripts_loaded', // WP Video Robot
|
456 |
+
'wpvr_scripts_assets', // WP Video Robot
|
457 |
+
'writee_widget_admin', // Fix for the Writtee theme
|
458 |
+
'__ytprefs_admin__', // Fix for YouTube by EmbedPlus plugin
|
459 |
+
'momentjs', // Fix for Blog Time plugin
|
460 |
+
'c2c_BlogTime', // Fix for Blog Time plugin
|
461 |
+
'material-wp', // Fix for MaterialWP plugin
|
462 |
+
'wp-color-picker-alpha', // Fix for MaterialWP plugin
|
463 |
+
'grandtour-theme-script', // Grandtour Theme
|
464 |
+
'swifty-img-widget-admin-script', // Fix for Swifty Image Widget
|
465 |
+
'datatable', // WP Todo
|
466 |
+
'flipclock', // WP Todo
|
467 |
+
'bootstrap', // WP Todo
|
468 |
+
'repuso_js_admin', // Social testimonials and reviews by Repuso
|
469 |
+
'chart', // Video Mate Pro Theme
|
470 |
+
'reuse_vendor', // RedQ Reuse Form
|
471 |
+
'jetpack-onboarding-vendor', // Jetpack Onboarding Bluehost
|
472 |
+
'date-js', // Google Analytics by Web Dorado
|
473 |
+
);
|
474 |
+
|
475 |
+
if ( ! empty( $styles ) ) {
|
476 |
+
foreach ( $styles as $style ) {
|
477 |
+
wp_dequeue_style( $style ); // Remove CSS file from MI screen
|
478 |
+
wp_deregister_style( $style );
|
479 |
+
}
|
480 |
+
}
|
481 |
+
if ( ! empty( $scripts ) ) {
|
482 |
+
foreach ( $scripts as $script ) {
|
483 |
+
wp_dequeue_script( $script ); // Remove JS file from MI screen
|
484 |
+
wp_deregister_script( $script );
|
485 |
+
}
|
486 |
+
}
|
487 |
+
|
488 |
+
$third_party = array(
|
489 |
+
'select2',
|
490 |
+
'sweetalert',
|
491 |
+
'clipboard',
|
492 |
+
'matchHeight',
|
493 |
+
'inputmask',
|
494 |
+
'jquery-confirm',
|
495 |
+
'list',
|
496 |
+
'toastr',
|
497 |
+
'tooltipster',
|
498 |
+
'flag-icon',
|
499 |
+
'bootstrap',
|
500 |
+
);
|
501 |
+
|
502 |
+
global $wp_styles;
|
503 |
+
foreach ( $wp_styles->queue as $handle ) {
|
504 |
+
if ( strpos( $wp_styles->registered[ $handle ]->src, 'wp-content' ) === false ) {
|
505 |
+
return;
|
506 |
+
}
|
507 |
+
|
508 |
+
if ( strpos( $wp_styles->registered[ $handle ]->handle, 'exactmetrics' ) !== false ) {
|
509 |
+
return;
|
510 |
+
}
|
511 |
+
|
512 |
+
foreach ( $third_party as $partial ) {
|
513 |
+
if ( strpos( $wp_styles->registered[ $handle ]->handle, $partial ) !== false ) {
|
514 |
+
wp_dequeue_style( $handle ); // Remove css file from MI screen
|
515 |
+
wp_deregister_style( $handle );
|
516 |
+
break;
|
517 |
+
} else if ( strpos( $wp_styles->registered[ $handle ]->src, $partial ) !== false ) {
|
518 |
+
wp_dequeue_style( $handle ); // Remove css file from MI screen
|
519 |
+
wp_deregister_style( $handle );
|
520 |
+
break;
|
521 |
+
}
|
522 |
+
}
|
523 |
+
}
|
524 |
+
|
525 |
+
global $wp_scripts;
|
526 |
+
foreach ( $wp_scripts->queue as $handle ) {
|
527 |
+
if ( strpos( $wp_scripts->registered[ $handle ]->src, 'wp-content' ) === false ) {
|
528 |
+
return;
|
529 |
+
}
|
530 |
+
|
531 |
+
if ( strpos( $wp_scripts->registered[ $handle ]->handle, 'exactmetrics' ) !== false ) {
|
532 |
+
return;
|
533 |
+
}
|
534 |
+
|
535 |
+
foreach ( $third_party as $partial ) {
|
536 |
+
if ( strpos( $wp_scripts->registered[ $handle ]->handle, $partial ) !== false ) {
|
537 |
+
wp_dequeue_script( $handle ); // Remove JS file from MI screen
|
538 |
+
wp_deregister_script( $handle );
|
539 |
+
break;
|
540 |
+
} else if ( strpos( $wp_scripts->registered[ $handle ]->src, $partial ) !== false ) {
|
541 |
+
wp_dequeue_script( $handle ); // Remove JS file from MI screen
|
542 |
+
wp_deregister_script( $handle );
|
543 |
+
break;
|
544 |
+
}
|
545 |
+
}
|
546 |
+
}
|
547 |
+
|
548 |
+
// Remove actions from themes that are not following best practices and break the admin doing so
|
549 |
+
// Theme: Newspaper by tagDiv
|
550 |
+
remove_action( 'admin_enqueue_scripts', 'load_wp_admin_js' );
|
551 |
+
remove_action( 'admin_enqueue_scripts', 'load_wp_admin_css' );
|
552 |
+
remove_action( 'admin_print_scripts-widgets.php', 'td_on_admin_print_scripts_farbtastic' );
|
553 |
+
remove_action( 'admin_print_styles-widgets.php', 'td_on_admin_print_styles_farbtastic' );
|
554 |
+
remove_action( 'admin_print_footer_scripts', 'check_if_media_uploads_is_loaded', 9999 );
|
555 |
+
remove_action( 'print_media_templates', 'td_custom_gallery_settings_hook' );
|
556 |
+
remove_action( 'print_media_templates', 'td_change_backbone_js_hook' );
|
557 |
+
remove_action( 'admin_head', 'tdc_on_admin_head' ); // TagDiv Composer Fix
|
558 |
+
remove_action( 'print_media_templates', 'us_media_templates' ); // Impreza Theme Fix
|
559 |
+
remove_action( 'admin_footer', 'gt3pg_add_gallery_template' ); // GT3 Photo & Video Gallery By GT3 Themes Plugin Fix
|
560 |
+
// Plugin WP Booklist:
|
561 |
+
remove_action( 'admin_footer', 'wpbooklist_jre_dismiss_prem_notice_forever_action_javascript' );
|
562 |
+
remove_action( 'admin_footer', 'wpbooklist_dashboard_add_book_action_javascript' );
|
563 |
+
remove_action( 'admin_footer', 'wpbooklist_edit_book_show_form_action_javascript' );
|
564 |
+
remove_action( 'admin_footer', 'wpbooklist_show_book_in_colorbox_action_javascript' );
|
565 |
+
remove_action( 'admin_footer', 'wpbooklist_new_lib_shortcode_action_javascript' );
|
566 |
+
remove_action( 'admin_footer', 'wpbooklist_dashboard_save_library_display_options_action_javascript' );
|
567 |
+
remove_action( 'admin_footer', 'wpbooklist_dashboard_save_post_display_options_action_javascript' );
|
568 |
+
remove_action( 'admin_footer', 'wpbooklist_dashboard_save_page_display_options_action_javascript' );
|
569 |
+
remove_action( 'admin_footer', 'wpbooklist_update_display_options_action_javascript' );
|
570 |
+
remove_action( 'admin_footer', 'wpbooklist_edit_book_pagination_action_javascript' );
|
571 |
+
remove_action( 'admin_footer', 'wpbooklist_edit_book_switch_lib_action_javascript' );
|
572 |
+
remove_action( 'admin_footer', 'wpbooklist_edit_book_search_action_javascript' );
|
573 |
+
remove_action( 'admin_footer', 'wpbooklist_edit_book_actual_action_javascript' );
|
574 |
+
remove_action( 'admin_footer', 'wpbooklist_delete_book_action_javascript' );
|
575 |
+
remove_action( 'admin_footer', 'wpbooklist_user_apis_action_javascript' );
|
576 |
+
remove_action( 'admin_footer', 'wpbooklist_upload_new_stylepak_action_javascript' );
|
577 |
+
remove_action( 'admin_footer', 'wpbooklist_upload_new_post_template_action_javascript' );
|
578 |
+
remove_action( 'admin_footer', 'wpbooklist_upload_new_page_template_action_javascript' );
|
579 |
+
remove_action( 'admin_footer', 'wpbooklist_create_db_library_backup_action_javascript' );
|
580 |
+
remove_action( 'admin_footer', 'wpbooklist_restore_db_library_backup_action_javascript' );
|
581 |
+
remove_action( 'admin_footer', 'wpbooklist_create_csv_action_javascript' );
|
582 |
+
remove_action( 'admin_footer', 'wpbooklist_amazon_localization_action_javascript' );
|
583 |
+
remove_action( 'admin_footer', 'wpbooklist_delete_book_bulk_action_javascript' );
|
584 |
+
remove_action( 'admin_footer', 'wpbooklist_reorder_action_javascript' );
|
585 |
+
remove_action( 'admin_footer', 'wpbooklist_exit_results_action_javascript' );
|
586 |
+
remove_action( 'admin_footer', 'wpbooklist_storytime_select_category_action_javascript' );
|
587 |
+
remove_action( 'admin_footer', 'wpbooklist_storytime_get_story_action_javascript' );
|
588 |
+
remove_action( 'admin_footer', 'wpbooklist_storytime_expand_browse_action_javascript' );
|
589 |
+
remove_action( 'admin_footer', 'wpbooklist_storytime_save_settings_action_javascript' );
|
590 |
+
remove_action( 'admin_footer', 'wpbooklist_delete_story_action_javascript' );
|
591 |
+
}
|
592 |
+
|
593 |
+
add_action( 'admin_enqueue_scripts', 'exactmetrics_remove_conflicting_asset_files', 9999 );
|
594 |
+
|
595 |
+
/**
|
596 |
+
* Remove non-MI notices from MI page.
|
597 |
+
*
|
598 |
+
* @return null Return early if not on the proper screen.
|
599 |
+
* @since 6.0.0
|
600 |
+
* @access public
|
601 |
+
*
|
602 |
+
*/
|
603 |
+
function hide_non_exactmetrics_warnings() {
|
604 |
+
// Bail if we're not on a ExactMetrics screen.
|
605 |
+
if ( empty( $_REQUEST['page'] ) || strpos( $_REQUEST['page'], 'exactmetrics' ) === false ) {
|
606 |
+
return;
|
607 |
+
}
|
608 |
+
|
609 |
+
global $wp_filter;
|
610 |
+
if ( ! empty( $wp_filter['user_admin_notices']->callbacks ) && is_array( $wp_filter['user_admin_notices']->callbacks ) ) {
|
611 |
+
foreach ( $wp_filter['user_admin_notices']->callbacks as $priority => $hooks ) {
|
612 |
+
foreach ( $hooks as $name => $arr ) {
|
613 |
+
if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
|
614 |
+
unset( $wp_filter['user_admin_notices']->callbacks[ $priority ][ $name ] );
|
615 |
+
continue;
|
616 |
+
}
|
617 |
+
if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'exactmetrics' ) !== false ) {
|
618 |
+
continue;
|
619 |
+
}
|
620 |
+
if ( ! empty( $name ) && strpos( $name, 'exactmetrics' ) === false ) {
|
621 |
+
unset( $wp_filter['user_admin_notices']->callbacks[ $priority ][ $name ] );
|
622 |
+
}
|
623 |
+
}
|
624 |
+
}
|
625 |
+
}
|
626 |
+
|
627 |
+
if ( ! empty( $wp_filter['admin_notices']->callbacks ) && is_array( $wp_filter['admin_notices']->callbacks ) ) {
|
628 |
+
foreach ( $wp_filter['admin_notices']->callbacks as $priority => $hooks ) {
|
629 |
+
foreach ( $hooks as $name => $arr ) {
|
630 |
+
if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
|
631 |
+
unset( $wp_filter['admin_notices']->callbacks[ $priority ][ $name ] );
|
632 |
+
continue;
|
633 |
+
}
|
634 |
+
if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'exactmetrics' ) !== false ) {
|
635 |
+
continue;
|
636 |
+
}
|
637 |
+
if ( ! empty( $name ) && strpos( $name, 'exactmetrics' ) === false ) {
|
638 |
+
unset( $wp_filter['admin_notices']->callbacks[ $priority ][ $name ] );
|
639 |
+
}
|
640 |
+
}
|
641 |
+
}
|
642 |
+
}
|
643 |
+
|
644 |
+
if ( ! empty( $wp_filter['all_admin_notices']->callbacks ) && is_array( $wp_filter['all_admin_notices']->callbacks ) ) {
|
645 |
+
foreach ( $wp_filter['all_admin_notices']->callbacks as $priority => $hooks ) {
|
646 |
+
foreach ( $hooks as $name => $arr ) {
|
647 |
+
if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
|
648 |
+
unset( $wp_filter['all_admin_notices']->callbacks[ $priority ][ $name ] );
|
649 |
+
continue;
|
650 |
+
}
|
651 |
+
if ( ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) && strpos( strtolower( get_class( $arr['function'][0] ) ), 'exactmetrics' ) !== false ) {
|
652 |
+
continue;
|
653 |
+
}
|
654 |
+
if ( ! empty( $name ) && strpos( $name, 'exactmetrics' ) === false ) {
|
655 |
+
unset( $wp_filter['all_admin_notices']->callbacks[ $priority ][ $name ] );
|
656 |
+
}
|
657 |
+
}
|
658 |
+
}
|
659 |
+
}
|
660 |
+
}
|
661 |
+
|
662 |
+
add_action( 'admin_print_scripts', 'hide_non_exactmetrics_warnings' );
|
663 |
+
add_action( 'admin_head', 'hide_non_exactmetrics_warnings', PHP_INT_MAX );
|
664 |
+
|
665 |
+
/**
|
666 |
+
* Called whenever an upgrade button / link is displayed in Lite, this function will
|
667 |
+
* check if there's a shareasale ID specified.
|
668 |
+
*
|
669 |
+
* There are three ways to specify an ID, ordered by highest to lowest priority
|
670 |
+
* - add_filter( 'exactmetrics_shareasale_id', function() { return 1234; } );
|
671 |
+
* - define( 'EXACTMETRICS_SHAREASALE_ID', 1234 );
|
672 |
+
* - get_option( 'exactmetrics_shareasale_id' ); (with the option being in the wp_options table)
|
673 |
+
*
|
674 |
+
* If an ID is present, returns the ShareASale link with the affiliate ID, and tells
|
675 |
+
* ShareASale to then redirect to exactmetrics.com/lite
|
676 |
+
*
|
677 |
+
* If no ID is present, just returns the exactmetrics.com/lite URL with UTM tracking.
|
678 |
+
*
|
679 |
+
* @return string Upgrade link.
|
680 |
+
* @since 6.0.0
|
681 |
+
* @access public
|
682 |
+
*
|
683 |
+
*/
|
684 |
+
function exactmetrics_get_upgrade_link( $medium = '', $campaign = '', $url = '' ) {
|
685 |
+
$url = exactmetrics_get_url( $medium, $campaign, $url, false );
|
686 |
+
|
687 |
+
if ( exactmetrics_is_pro_version() ) {
|
688 |
+
return esc_url( $url );
|
689 |
+
}
|
690 |
+
|
691 |
+
// Get the ShareASale ID
|
692 |
+
$shareasale_id = exactmetrics_get_shareasale_id();
|
693 |
+
|
694 |
+
// If we have a shareasale ID return the shareasale url
|
695 |
+
if ( ! empty( $shareasale_id ) ) {
|
696 |
+
$shareasale_id = absint( $shareasale_id );
|
697 |
+
|
698 |
+
return esc_url( exactmetrics_get_shareasale_url( $shareasale_id, $url ) );
|
699 |
+
} else {
|
700 |
+
return esc_url( $url );
|
701 |
+
}
|
702 |
+
}
|
703 |
+
|
704 |
+
function exactmetrics_get_url( $medium = '', $campaign = '', $url = '', $escape = true ) {
|
705 |
+
// Setup Campaign variables
|
706 |
+
$source = exactmetrics_is_pro_version() ? 'proplugin' : 'liteplugin';
|
707 |
+
$medium = ! empty( $medium ) ? $medium : 'defaultmedium';
|
708 |
+
$campaign = ! empty( $campaign ) ? $campaign : 'defaultcampaign';
|
709 |
+
$content = EXACTMETRICS_VERSION;
|
710 |
+
$default_url = exactmetrics_is_pro_version() ? '' : 'lite/';
|
711 |
+
$url = ! empty( $url ) ? $url : 'https://www.exactmetrics.com/' . $default_url;
|
712 |
+
|
713 |
+
// Put together redirect URL
|
714 |
+
$url = add_query_arg(
|
715 |
+
array(
|
716 |
+
'utm_source' => $source, // Pro/Lite Plugin
|
717 |
+
'utm_medium' => sanitize_key( $medium ), // Area of ExactMetrics (example Reports)
|
718 |
+
'utm_campaign' => sanitize_key( $campaign ), // Which link (example eCommerce Report)
|
719 |
+
'utm_content' => $content, // Version number of MI
|
720 |
+
),
|
721 |
+
trailingslashit( $url )
|
722 |
+
);
|
723 |
+
|
724 |
+
if ( $escape ) {
|
725 |
+
return esc_url( $url );
|
726 |
+
} else {
|
727 |
+
return $url;
|
728 |
+
}
|
729 |
+
}
|
730 |
+
|
731 |
+
function exactmetrics_settings_ublock_error_js() {
|
732 |
+
echo "<script type='text/javascript'>\n";
|
733 |
+
echo "jQuery( document ).ready( function( $ ) {
|
734 |
+
if ( window.uorigindetected == null){
|
735 |
+
$('#exactmetrics-ublock-origin-error').show();
|
736 |
+
$('.exactmetrics-nav-tabs').hide();
|
737 |
+
$('.exactmetrics-nav-container').hide();
|
738 |
+
$('#exactmetrics-addon-heading').hide();
|
739 |
+
$('#exactmetrics-addons').hide();
|
740 |
+
$('#exactmetrics-reports').hide();
|
741 |
+
}
|
742 |
+
});";
|
743 |
+
echo "\n</script>";
|
744 |
+
}
|
745 |
+
|
746 |
+
function exactmetrics_ublock_notice() {
|
747 |
+
ob_start(); ?>
|
748 |
+
<div id="exactmetrics-ublock-origin-error" class="error inline" style="display:none;">
|
749 |
+
<?php
|
750 |
+
// Translators: Placeholders are for links to fix the issue.
|
751 |
+
echo sprintf( esc_html__( 'ExactMetrics has detected that it\'s files are being blocked. This is usually caused by a adblock browser plugin (particularly uBlock Origin), or a conflicting WordPress theme or plugin. This issue only affects the admin side of ExactMetrics. To solve this, ensure ExactMetrics is whitelisted for your website URL in any adblock browser plugin you use. For step by step directions on how to do this, %1$sclick here%2$s. If this doesn\'t solve the issue (rare), send us a ticket %3$shere%2$s and we\'ll be happy to help diagnose the issue.', 'google-analytics-dashboard-for-wp' ), '<a href="https://exactmetrics.com/docs/exactmetrics-asset-files-blocked/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">', '</a>', '<a href="https://exactmetrics.com/contact/" target="_blank" rel="noopener noreferrer" referrer="no-referrer">' );
|
752 |
+
?>
|
753 |
+
</div>
|
754 |
+
<?php
|
755 |
+
return ob_get_clean();
|
756 |
+
}
|
757 |
+
|
758 |
+
/**
|
759 |
+
* Some themes/plugins don't add proper checks and load JS code in all admin pages causing conflicts.
|
760 |
+
*/
|
761 |
+
function exactmetrics_remove_unnecessary_footer_hooks() {
|
762 |
+
|
763 |
+
$screen = get_current_screen();
|
764 |
+
// Bail if we're not on a ExactMetrics screen.
|
765 |
+
if ( empty( $screen->id ) || strpos( $screen->id, 'exactmetrics' ) === false ) {
|
766 |
+
return;
|
767 |
+
}
|
768 |
+
|
769 |
+
// Remove js code added by Newspaper theme - version 8.8.0.
|
770 |
+
remove_action( 'print_media_templates', 'td_custom_gallery_settings_hook' );
|
771 |
+
remove_action( 'print_media_templates', 'td_change_backbone_js_hook' );
|
772 |
+
// Remove js code added by the Brooklyn theme - version 4.5.3.1.
|
773 |
+
remove_action( 'print_media_templates', 'ut_create_gallery_options' );
|
774 |
+
|
775 |
+
// Remove js code added by WordPress Book List Plugin - version 5.8.1.
|
776 |
+
remove_action( 'admin_footer', 'wpbooklist_jre_dismiss_prem_notice_forever_action_javascript' );
|
777 |
+
remove_action( 'admin_footer', 'wpbooklist_dashboard_add_book_action_javascript' );
|
778 |
+
remove_action( 'admin_footer', 'wpbooklist_edit_book_show_form_action_javascript' );
|
779 |
+
remove_action( 'admin_footer', 'wpbooklist_show_book_in_colorbox_action_javascript' );
|
780 |
+
remove_action( 'admin_footer', 'wpbooklist_new_lib_shortcode_action_javascript' );
|
781 |
+
remove_action( 'admin_footer', 'wpbooklist_dashboard_save_library_display_options_action_javascript' );
|
782 |
+
remove_action( 'admin_footer', 'wpbooklist_dashboard_save_post_display_options_action_javascript' );
|
783 |
+
remove_action( 'admin_footer', 'wpbooklist_dashboard_save_page_display_options_action_javascript' );
|
784 |
+
remove_action( 'admin_footer', 'wpbooklist_update_display_options_action_javascript' );
|
785 |
+
remove_action( 'admin_footer', 'wpbooklist_edit_book_pagination_action_javascript' );
|
786 |
+
remove_action( 'admin_footer', 'wpbooklist_edit_book_switch_lib_action_javascript' );
|
787 |
+
remove_action( 'admin_footer', 'wpbooklist_edit_book_search_action_javascript' );
|
788 |
+
remove_action( 'admin_footer', 'wpbooklist_edit_book_actual_action_javascript' );
|
789 |
+
remove_action( 'admin_footer', 'wpbooklist_delete_book_action_javascript' );
|
790 |
+
remove_action( 'admin_footer', 'wpbooklist_user_apis_action_javascript' );
|
791 |
+
remove_action( 'admin_footer', 'wpbooklist_upload_new_stylepak_action_javascript' );
|
792 |
+
remove_action( 'admin_footer', 'wpbooklist_upload_new_post_template_action_javascript' );
|
793 |
+
remove_action( 'admin_footer', 'wpbooklist_upload_new_page_template_action_javascript' );
|
794 |
+
remove_action( 'admin_footer', 'wpbooklist_create_db_library_backup_action_javascript' );
|
795 |
+
remove_action( 'admin_footer', 'wpbooklist_restore_db_library_backup_action_javascript' );
|
796 |
+
remove_action( 'admin_footer', 'wpbooklist_create_csv_action_javascript' );
|
797 |
+
remove_action( 'admin_footer', 'wpbooklist_amazon_localization_action_javascript' );
|
798 |
+
remove_action( 'admin_footer', 'wpbooklist_delete_book_bulk_action_javascript' );
|
799 |
+
remove_action( 'admin_footer', 'wpbooklist_reorder_action_javascript' );
|
800 |
+
remove_action( 'admin_footer', 'wpbooklist_exit_results_action_javascript' );
|
801 |
+
remove_action( 'admin_footer', 'wpbooklist_storytime_select_category_action_javascript' );
|
802 |
+
remove_action( 'admin_footer', 'wpbooklist_storytime_get_story_action_javascript' );
|
803 |
+
remove_action( 'admin_footer', 'wpbooklist_storytime_expand_browse_action_javascript' );
|
804 |
+
remove_action( 'admin_footer', 'wpbooklist_storytime_save_settings_action_javascript' );
|
805 |
+
remove_action( 'admin_footer', 'wpbooklist_delete_story_action_javascript' );
|
806 |
+
}
|
807 |
+
|
808 |
+
add_action( 'admin_head', 'exactmetrics_remove_unnecessary_footer_hooks', 15 );
|
809 |
+
|
810 |
+
/**
|
811 |
+
* Display dismissable admin pointer for year in review 2019 report
|
812 |
+
*
|
813 |
+
*/
|
814 |
+
function exactmetrics_yearinreview_admin_menu_tooltip() {
|
815 |
+
|
816 |
+
$dismiss_tooltip = get_option( 'exactmetrics_yearinreview_dismiss_admin_tooltip', false );
|
817 |
+
$activated = get_option( 'exactmetrics_over_time', array() );
|
818 |
+
$ua_code = exactmetrics_get_ua();
|
819 |
+
$dashboards_disabled = exactmetrics_get_option( 'dashboards_disabled', false );
|
820 |
+
|
821 |
+
if ( $dashboards_disabled ) {
|
822 |
+
return;
|
823 |
+
}
|
824 |
+
|
825 |
+
if ( ! current_user_can( 'exactmetrics_view_dashboard' ) ) {
|
826 |
+
return;
|
827 |
+
}
|
828 |
+
|
829 |
+
if ( exactmetrics_is_reports_page() || exactmetrics_is_settings_page() ) {
|
830 |
+
// Don't show on MI pages.
|
831 |
+
return;
|
832 |
+
}
|
833 |
+
|
834 |
+
// equivalent to: 01/01/2020 @ 12:00am (UTC)
|
835 |
+
$new_year = '1577836800';
|
836 |
+
|
837 |
+
// equivalent to: 01/02/2020 @ 12:00am (UTC)
|
838 |
+
$start_time = '1577923200';
|
839 |
+
|
840 |
+
// equivalent to: 01/13/2020 @ 12:00am (UTC)
|
841 |
+
$end_time = '1578873600';
|
842 |
+
|
843 |
+
if ( $dismiss_tooltip ) {
|
844 |
+
return;
|
845 |
+
}
|
846 |
+
|
847 |
+
// don't show before January 02, 2020
|
848 |
+
if ( $start_time > time() ) {
|
849 |
+
return;
|
850 |
+
}
|
851 |
+
|
852 |
+
// don't show after January 13, 2020
|
853 |
+
if ( $end_time < time() ) {
|
854 |
+
return;
|
855 |
+
}
|
856 |
+
|
857 |
+
if ( empty( $activated['connected_date'] ) || ( $activated['connected_date'] > $new_year ) || empty( $ua_code ) ) {
|
858 |
+
return;
|
859 |
+
}
|
860 |
+
|
861 |
+
// remove lite upsell
|
862 |
+
remove_action( 'adminmenu', 'exactmetrics_get_admin_menu_tooltip' );
|
863 |
+
|
864 |
+
$url = admin_url( 'admin.php?page=exactmetrics_reports#/year-in-review' );
|
865 |
+
?>
|
866 |
+
<div id="exactmetrics-yearinreview-admin-menu-tooltip" class="exactmetrics-yearinreview-admin-menu-tooltip-hide">
|
867 |
+
<div class="exactmetrics-yearinreview-admin-menu-tooltip-header">
|
868 |
+
<span class="exactmetrics-yearinreview-admin-menu-tooltip-icon">
|
869 |
+
<span class="dashicons dashicons-megaphone"></span>
|
870 |
+
</span>
|
871 |
+
<?php esc_html_e( 'Your 2019 Analytics Report', 'google-analytics-dashboard-for-wp' ); ?>
|
872 |
+
<a href="#" class="exactmetrics-yearinreview-admin-menu-tooltip-close">
|
873 |
+
<span class="dashicons dashicons-dismiss"></span>
|
874 |
+
</a>
|
875 |
+
</div>
|
876 |
+
<div class="exactmetrics-yearinreview-admin-menu-tooltip-content">
|
877 |
+
<strong><?php esc_html_e( 'See how your website performed this year and find tips along the way to help grow even more in 2020!', 'google-analytics-dashboard-for-wp' ); ?></strong>
|
878 |
+
<p>
|
879 |
+
<a href="<?php echo esc_url( $url ); ?>" class="button button-primary exactmetrics-yearinreview-admin-menu-tooltip-btn-link"><?php esc_html_e( 'View 2019 Year in Review report!', 'google-analytics-dashboard-for-wp' ); ?></a>
|
880 |
+
</p>
|
881 |
+
</div>
|
882 |
+
</div>
|
883 |
+
<style type="text/css">
|
884 |
+
#exactmetrics-yearinreview-admin-menu-tooltip {
|
885 |
+
position: absolute;
|
886 |
+
left: 100%;
|
887 |
+
top: 100%;
|
888 |
+
background: #fff;
|
889 |
+
margin-left: 16px;
|
890 |
+
width: 350px;
|
891 |
+
box-shadow: 0px 4px 7px 0px #ccc;
|
892 |
+
}
|
893 |
+
|
894 |
+
#exactmetrics-yearinreview-admin-menu-tooltip:before {
|
895 |
+
content: '';
|
896 |
+
width: 0;
|
897 |
+
height: 0;
|
898 |
+
border-style: solid;
|
899 |
+
border-width: 12px 12px 12px 0;
|
900 |
+
border-color: transparent #fff transparent transparent;
|
901 |
+
position: absolute;
|
902 |
+
right: 100%;
|
903 |
+
top: 130px;
|
904 |
+
z-index: 10;
|
905 |
+
}
|
906 |
+
|
907 |
+
#exactmetrics-yearinreview-admin-menu-tooltip:after {
|
908 |
+
content: '';
|
909 |
+
width: 0;
|
910 |
+
height: 0;
|
911 |
+
border-style: solid;
|
912 |
+
border-width: 13px 13px 13px 0;
|
913 |
+
border-color: transparent #ccc transparent transparent;
|
914 |
+
position: absolute;
|
915 |
+
right: 100%;
|
916 |
+
margin-left: -1px;
|
917 |
+
top: 129px;
|
918 |
+
z-index: 5;
|
919 |
+
}
|
920 |
+
|
921 |
+
#exactmetrics-yearinreview-admin-menu-tooltip.exactmetrics-yearinreview-tooltip-arrow-top:before {
|
922 |
+
top: 254px;
|
923 |
+
}
|
924 |
+
|
925 |
+
#exactmetrics-yearinreview-admin-menu-tooltip.exactmetrics-yearinreview-tooltip-arrow-top:after {
|
926 |
+
top: 253px;
|
927 |
+
}
|
928 |
+
|
929 |
+
.exactmetrics-yearinreview-admin-menu-tooltip-header {
|
930 |
+
background: #03a0d2;
|
931 |
+
padding: 5px 12px;
|
932 |
+
font-size: 14px;
|
933 |
+
font-weight: 700;
|
934 |
+
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
|
935 |
+
color: #fff;
|
936 |
+
line-height: 1.6;
|
937 |
+
}
|
938 |
+
|
939 |
+
.exactmetrics-yearinreview-admin-menu-tooltip-icon {
|
940 |
+
background: #fff;
|
941 |
+
border-radius: 50%;
|
942 |
+
width: 28px;
|
943 |
+
height: 25px;
|
944 |
+
display: inline-block;
|
945 |
+
color: #03a0d2;
|
946 |
+
text-align: center;
|
947 |
+
padding: 3px 0 0;
|
948 |
+
margin-right: 6px;
|
949 |
+
}
|
950 |
+
|
951 |
+
.exactmetrics-yearinreview-admin-menu-tooltip-hide {
|
952 |
+
display: none;
|
953 |
+
}
|
954 |
+
|
955 |
+
.exactmetrics-yearinreview-admin-menu-tooltip-content {
|
956 |
+
padding: 20px 15px 7px;
|
957 |
+
}
|
958 |
+
|
959 |
+
.exactmetrics-yearinreview-admin-menu-tooltip-content strong {
|
960 |
+
font-size: 14px;
|
961 |
+
}
|
962 |
+
|
963 |
+
.exactmetrics-yearinreview-admin-menu-tooltip-content p strong {
|
964 |
+
font-size: 13px;
|
965 |
+
}
|
966 |
+
|
967 |
+
.exactmetrics-yearinreview-admin-menu-tooltip-close {
|
968 |
+
color: #fff;
|
969 |
+
text-decoration: none;
|
970 |
+
position: absolute;
|
971 |
+
right: 10px;
|
972 |
+
top: 12px;
|
973 |
+
display: block;
|
974 |
+
}
|
975 |
+
|
976 |
+
.exactmetrics-yearinreview-admin-menu-tooltip-close:hover {
|
977 |
+
color: #fff;
|
978 |
+
text-decoration: none;
|
979 |
+
}
|
980 |
+
|
981 |
+
.exactmetrics-yearinreview-admin-menu-tooltip-close .dashicons {
|
982 |
+
font-size: 14px;
|
983 |
+
}
|
984 |
+
|
985 |
+
@media ( max-width: 782px ) {
|
986 |
+
#exactmetrics-yearinreview-admin-menu-tooltip {
|
987 |
+
display: none;
|
988 |
+
}
|
989 |
+
}
|
990 |
+
</style>
|
991 |
+
<script type="text/javascript">
|
992 |
+
if ( 'undefined' !== typeof jQuery ) {
|
993 |
+
jQuery( function ( $ ) {
|
994 |
+
var $tooltip = $( document.getElementById( 'exactmetrics-yearinreview-admin-menu-tooltip' ) );
|
995 |
+
var $menuwrapper = $( document.getElementById( 'adminmenuwrap' ) );
|
996 |
+
var $menuitem = $( document.getElementById( 'toplevel_page_exactmetrics_reports' ) );
|
997 |
+
if ( 0 === $menuitem.length ) {
|
998 |
+
$menuitem = $( document.getElementById( 'toplevel_page_exactmetrics_network' ) );
|
999 |
+
}
|
1000 |
+
|
1001 |
+
if ( $menuitem.length ) {
|
1002 |
+
$menuwrapper.append( $tooltip );
|
1003 |
+
$tooltip.removeClass( 'exactmetrics-yearinreview-admin-menu-tooltip-hide' );
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
function alignTooltip() {
|
1007 |
+
var sticky = $( 'body' ).hasClass( 'sticky-menu' );
|
1008 |
+
|
1009 |
+
var menuitem_pos = $menuitem.position();
|
1010 |
+
var tooltip_top = menuitem_pos.top - 124;
|
1011 |
+
if ( sticky && $( window ).height() > $menuwrapper.height() + 150 ) {
|
1012 |
+
$tooltip.removeClass( 'exactmetrics-yearinreview-tooltip-arrow-top' );
|
1013 |
+
} else {
|
1014 |
+
tooltip_top = menuitem_pos.top - 250;
|
1015 |
+
$tooltip.addClass( 'exactmetrics-yearinreview-tooltip-arrow-top' );
|
1016 |
+
}
|
1017 |
+
// Don't let the tooltip go outside of the screen and make the close button not visible.
|
1018 |
+
if ( tooltip_top < 40 ) {
|
1019 |
+
tooltip_top = 40;
|
1020 |
+
}
|
1021 |
+
$tooltip.css( {
|
1022 |
+
top: tooltip_top + 'px'
|
1023 |
+
} );
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
var $document = $( document );
|
1027 |
+
var timeout = setTimeout( alignTooltip, 10 );
|
1028 |
+
$document.on( 'wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu', function () {
|
1029 |
+
if ( timeout ) {
|
1030 |
+
clearTimeout( timeout );
|
1031 |
+
}
|
1032 |
+
timeout = setTimeout( alignTooltip, 10 );
|
1033 |
+
} );
|
1034 |
+
|
1035 |
+
$( '.exactmetrics-yearinreview-admin-menu-tooltip-btn-link' ).on( 'click', function ( e ) {
|
1036 |
+
hideYearInReviewTooltip();
|
1037 |
+
} );
|
1038 |
+
|
1039 |
+
$( '.exactmetrics-yearinreview-admin-menu-tooltip-close' ).on( 'click', function ( e ) {
|
1040 |
+
e.preventDefault();
|
1041 |
+
hideYearInReviewTooltip();
|
1042 |
+
} );
|
1043 |
+
|
1044 |
+
function hideYearInReviewTooltip() {
|
1045 |
+
$tooltip.addClass( 'exactmetrics-yearinreview-admin-menu-tooltip-hide' );
|
1046 |
+
$.post( ajaxurl, {
|
1047 |
+
action: 'exactmetrics_yearinreview_hide_admin_tooltip',
|
1048 |
+
nonce: '<?php echo esc_js( wp_create_nonce( 'mi-admin-nonce' ) ); ?>',
|
1049 |
+
} );
|
1050 |
+
}
|
1051 |
+
} );
|
1052 |
+
}
|
1053 |
+
</script>
|
1054 |
+
<?php
|
1055 |
+
}
|
1056 |
+
|
1057 |
+
add_action( 'adminmenu', 'exactmetrics_yearinreview_admin_menu_tooltip', 5 );
|
1058 |
+
|
1059 |
+
/**
|
1060 |
+
* Store the time when the year in review tooltip was hidden so it won't show again
|
1061 |
+
*/
|
1062 |
+
function exactmetrics_mark_yearinreview_tooltip_hidden() {
|
1063 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
1064 |
+
update_option( 'exactmetrics_yearinreview_dismiss_admin_tooltip', true );
|
1065 |
+
wp_send_json_success();
|
1066 |
+
}
|
1067 |
+
|
1068 |
+
add_action( 'wp_ajax_exactmetrics_yearinreview_hide_admin_tooltip', 'exactmetrics_mark_yearinreview_tooltip_hidden' );
|
1069 |
+
|
1070 |
+
/**
|
1071 |
+
* Prevent plugins/themes from removing the version number from scripts loaded by our plugin.
|
1072 |
+
* Ideally those plugins/themes would follow WordPress coding best practices, but in lieu of that
|
1073 |
+
* we can at least attempt to prevent 99% of them from doing bad things.
|
1074 |
+
*
|
1075 |
+
* @param string $src The script source.
|
1076 |
+
*
|
1077 |
+
* @return string
|
1078 |
+
*/
|
1079 |
+
function exactmetrics_prevent_version_number_removal( $src ) {
|
1080 |
+
// Apply this only to admin-side scripts.
|
1081 |
+
if ( ! is_admin() ) {
|
1082 |
+
return $src;
|
1083 |
+
}
|
1084 |
+
|
1085 |
+
// Make sure are only changing our scripts and only if the version number is missing.
|
1086 |
+
if ( ( false !== strpos( $src, 'exactmetrics' ) || false !== strpos( $src, 'google-analytics-dashboard-for-wp' ) || false !== strpos( $src, 'exactmetrics-premium' ) ) && false === strpos( $src, '?ver' ) ) {
|
1087 |
+
$src = add_query_arg( 'ver', exactmetrics_get_asset_version(), $src );
|
1088 |
+
}
|
1089 |
+
|
1090 |
+
return $src;
|
1091 |
+
}
|
1092 |
+
|
1093 |
+
add_filter( 'script_loader_src', 'exactmetrics_prevent_version_number_removal', 9999, 1 );
|
1094 |
+
add_filter( 'style_loader_src', 'exactmetrics_prevent_version_number_removal', 9999, 1 );
|
includes/admin/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
includes/admin/licensing/autoupdate.php
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Filters the auto update plugin routine to allow ExactMetrics to be
|
4 |
+
* automatically updated.
|
5 |
+
*
|
6 |
+
* @since 6.3.0
|
7 |
+
*
|
8 |
+
* @param bool $update Flag to update the plugin or not.
|
9 |
+
* @param array $item Update data about a specific plugin.
|
10 |
+
* @return bool $update The new update state.
|
11 |
+
*/
|
12 |
+
function exactmetrics_automatic_updates( $update, $item ) {
|
13 |
+
|
14 |
+
// If this is multisite and is not on the main site, return early.
|
15 |
+
if ( is_multisite() && ! is_main_site() ) {
|
16 |
+
return $update;
|
17 |
+
}
|
18 |
+
|
19 |
+
// If we don't have everything we need, return early.
|
20 |
+
$item = (array) $item;
|
21 |
+
if ( ! isset( $item['new_version'] ) || ! isset( $item['slug'] ) ) {
|
22 |
+
return $update;
|
23 |
+
}
|
24 |
+
|
25 |
+
// If the plugin isn't ours, return early.
|
26 |
+
$is_free = 'google-analytics-dashboard-for-wp' === $item['slug'];
|
27 |
+
$is_paid = isset( $item['exactmetrics_plugin'] ); // see updater class
|
28 |
+
if ( ! $is_free && ! $is_paid ) {
|
29 |
+
return $update;
|
30 |
+
}
|
31 |
+
|
32 |
+
$version = $is_free ? EXACTMETRICS_LITE_VERSION : $item['old_version'];
|
33 |
+
$automatic_updates = exactmetrics_get_option( 'automatic_updates', false );
|
34 |
+
$current_major = exactmetrics_get_major_version( $version );
|
35 |
+
$new_major = exactmetrics_get_major_version( $item['new_version'] );
|
36 |
+
|
37 |
+
// If the opt in update allows major updates but there is no major version update, return early.
|
38 |
+
if ( $current_major < $new_major ) {
|
39 |
+
if ( $automatic_updates === 'all' ) {
|
40 |
+
return true;
|
41 |
+
} else {
|
42 |
+
return $update;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
|
46 |
+
// If the opt in update allows minor updates but there is no minor version update, return early.
|
47 |
+
if ( $current_major == $new_major ) {
|
48 |
+
if ( $automatic_updates === 'all' || $automatic_updates === 'minor' ) {
|
49 |
+
return true;
|
50 |
+
} else {
|
51 |
+
return $update;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
// All our checks have passed - this plugin can be updated!
|
56 |
+
return true;
|
57 |
+
}
|
58 |
+
|
59 |
+
add_filter( 'auto_update_plugin', 'exactmetrics_automatic_updates', 10, 2 );
|
60 |
+
/**
|
61 |
+
* Notes about autoupdater:
|
62 |
+
* This runs on the normal WordPress auto-update sequence:
|
63 |
+
* 1. In wp-includes/update.php, wp_version_check() is called by the WordPress update cron (every 8 or 12 hours; can be overriden to be faster/long or turned off by plugins)
|
64 |
+
* 2. In wp-includes/update.php, wp_version_check() ends with a action call to do_action( 'wp_maybe_auto_update' ) if cron is running
|
65 |
+
* 3. In wp-includes/update.php, wp_maybe_auto_update() hooks into wp_maybe_auto_update action, creates a new WP_Automatic_Updater instance and calls WP_Automatic_Updater->run
|
66 |
+
* 4. In wp-admin/includes/class-wp-automatic-updater.php $this->run() checks to make sure we're on the main site if on a network, and also if the autoupdates are disabled (by plugin, by being on a version controlled site, etc )
|
67 |
+
* 5. In wp-admin/includes/class-wp-automatic-updater.php $this->run() then checks to see which plugins have new versions (version/update check)
|
68 |
+
* 6. In wp-admin/includes/class-wp-automatic-updater.php $this->run() then calls $this->update() for each plugin installed who has an upgrade.
|
69 |
+
* 7 In wp-admin/includes/class-wp-automatic-updater.php $this->update() double checks filesystem access and then installs the plugin if able
|
70 |
+
*
|
71 |
+
* Notes:
|
72 |
+
* - This autoupdater only works if WordPress core detects no version control. If you want to test this, do it on a new WP site without any .git folders anywhere.
|
73 |
+
* - This autoupdater only works if the file access is able to be written to
|
74 |
+
* - This autoupdater only works if a new version has been detected, and will run not the second the update is released, but whenever the cron for wp_version_check is next released. This is generally run every 8-12 hours.
|
75 |
+
* - However, that cron can be disabled, the autoupdater can be turned off via constant or filter, version control or file lock can be detected, and other plugins can be installed (incl in functions of theme) that turn off all
|
76 |
+
* all automatic plugin updates.
|
77 |
+
* - If you want to test this is working, you have to manually run the wp_version_check cron. Install the WP Crontrol plugin or Core Control plugin, and run the cron manually using it.
|
78 |
+
* - Again, because you skimmed over it the first time, if you want to test this manually you need to test this on a new WP install without version control for core, plugins, etc, without file lock, with license key entered (for pro only)
|
79 |
+
* and use the WP Crontrol or Core Control plugin to run wp_version_check
|
80 |
+
* - You may have to manually remove an option called "auto_update.lock" from the WP options table
|
81 |
+
* - You may need to run wp_version_check multiple times (note though that they must be spaced at least 60 seconds apart)
|
82 |
+
* - Because WP's updater asks the OS if the file is writable, make sure you do not have any files/folders for the plugin you are trying to autoupdate open when testing.
|
83 |
+
* - You may need to delete the plugin info transient to get it to hard refresh the plugin info.
|
84 |
+
*/
|
85 |
+
|
86 |
+
|
87 |
+
function exactmetrics_get_major_version( $version ) {
|
88 |
+
$exploded_version = explode( '.', $version );
|
89 |
+
if ( isset( $exploded_version[2] ) ) {
|
90 |
+
return $exploded_version[0] . '.' . $exploded_version[1] . '.' . $exploded_version[2];
|
91 |
+
} else {
|
92 |
+
return $exploded_version[0] . '.' . $exploded_version[1] . '.0';
|
93 |
+
}
|
94 |
+
}
|
includes/admin/licensing/skin.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Skin class.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @subpackage Upgrader Skin
|
9 |
+
* @author Chris Christoff
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
class ExactMetrics_Skin extends WP_Upgrader_Skin {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Primary class constructor.
|
21 |
+
*
|
22 |
+
* @since 6.0.0
|
23 |
+
*
|
24 |
+
* @param array $args Empty array of args (we will use defaults).
|
25 |
+
*/
|
26 |
+
public function __construct( $args = array() ) {
|
27 |
+
|
28 |
+
parent::__construct();
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Set the upgrader object and store it as a property in the parent class.
|
34 |
+
*
|
35 |
+
* @since 6.0.0
|
36 |
+
*
|
37 |
+
* @param object $upgrader The upgrader object (passed by reference).
|
38 |
+
*/
|
39 |
+
public function set_upgrader( &$upgrader ) {
|
40 |
+
|
41 |
+
if ( is_object( $upgrader ) ) {
|
42 |
+
$this->upgrader =& $upgrader;
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Set the upgrader result and store it as a property in the parent class.
|
49 |
+
*
|
50 |
+
* @since 6.0.0
|
51 |
+
*
|
52 |
+
* @param object $result The result of the install process.
|
53 |
+
*/
|
54 |
+
public function set_result( $result ) {
|
55 |
+
|
56 |
+
$this->result = $result;
|
57 |
+
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Empty out the header of its HTML content and only check to see if it has
|
62 |
+
* been performed or not.
|
63 |
+
*
|
64 |
+
* @since 6.0.0
|
65 |
+
*/
|
66 |
+
public function header() {}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Empty out the footer of its HTML contents.
|
70 |
+
*
|
71 |
+
* @since 6.0.0
|
72 |
+
*/
|
73 |
+
function footer() {}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Instead of outputting HTML for errors, json_encode the errors and send them
|
77 |
+
* back to the Ajax script for processing.
|
78 |
+
*
|
79 |
+
* @since 6.0.0
|
80 |
+
*
|
81 |
+
* @param array $errors Array of errors with the install process.
|
82 |
+
*/
|
83 |
+
function error( $errors ) {
|
84 |
+
|
85 |
+
if ( ! empty( $errors ) ) {
|
86 |
+
$error_message = esc_html__( 'There was an error installing the addon. Please try again.', 'google-analytics-dashboard-for-wp' );
|
87 |
+
if ( is_wp_error( $errors ) ) {
|
88 |
+
/**
|
89 |
+
* @var WP_Error $errors
|
90 |
+
*/
|
91 |
+
$message = $errors->get_error_message();
|
92 |
+
|
93 |
+
if ( ! empty( $message ) ) {
|
94 |
+
// Translators: The name of the addon that can't be installed.
|
95 |
+
$error_message = sprintf( esc_html__( 'There was an error installing the addon: %s', 'google-analytics-dashboard-for-wp' ), esc_html( $message ) );
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
wp_send_json( array( 'error' => $error_message ) );
|
100 |
+
}
|
101 |
+
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Empty out the feedback method to prevent outputting HTML strings as the install
|
106 |
+
* is progressing.
|
107 |
+
*
|
108 |
+
* @since 6.0.0
|
109 |
+
*
|
110 |
+
* @param string $string The feedback string.
|
111 |
+
*/
|
112 |
+
function feedback( $string ) {
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
}
|
includes/admin/notice.php
ADDED
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Notices admin class.
|
4 |
+
*
|
5 |
+
* Handles retrieving whether a particular notice has been dismissed or not,
|
6 |
+
* as well as marking a notice as dismissed.
|
7 |
+
*
|
8 |
+
* @since 6.0.0
|
9 |
+
*
|
10 |
+
* @package ExactMetrics
|
11 |
+
* @subpackage Notices
|
12 |
+
* @author Chris Christoff
|
13 |
+
*/
|
14 |
+
|
15 |
+
// Exit if accessed directly
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit;
|
18 |
+
}
|
19 |
+
|
20 |
+
final class ExactMetrics_Notice_Admin {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Holds all dismissed notices
|
24 |
+
*
|
25 |
+
* @access public
|
26 |
+
* @since 6.0.0
|
27 |
+
* @var array $notices Array of dismissed notices.
|
28 |
+
*/
|
29 |
+
public $notices;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Primary class constructor.
|
33 |
+
*
|
34 |
+
* @access public
|
35 |
+
* @since 6.0.0
|
36 |
+
*/
|
37 |
+
public function __construct() {
|
38 |
+
|
39 |
+
// Populate $notices
|
40 |
+
$this->notices = get_option( 'exactmetrics_notices' );
|
41 |
+
if ( ! is_array( $this->notices ) ) {
|
42 |
+
$this->notices = array();
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Checks if a given notice has been dismissed or not
|
49 |
+
*
|
50 |
+
* @access public
|
51 |
+
* @since 6.0.0
|
52 |
+
*
|
53 |
+
* @param string $notice Programmatic Notice Name
|
54 |
+
* @return bool Notice Dismissed
|
55 |
+
*/
|
56 |
+
|
57 |
+
public function is_dismissed( $notice ) {
|
58 |
+
if ( ! isset( $this->notices[ $notice ] ) ) {
|
59 |
+
return false;
|
60 |
+
}
|
61 |
+
return true;
|
62 |
+
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Marks the given notice as dismissed
|
67 |
+
*
|
68 |
+
* @access public
|
69 |
+
* @since 6.0.0
|
70 |
+
*
|
71 |
+
* @param string $notice Programmatic Notice Name
|
72 |
+
* @return null
|
73 |
+
*/
|
74 |
+
public function dismiss( $notice ) {
|
75 |
+
$this->notices[ $notice ] = true;
|
76 |
+
update_option( 'exactmetrics_notices', $this->notices );
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Marks a notice as not dismissed
|
83 |
+
*
|
84 |
+
* @access public
|
85 |
+
* @since 6.0.0
|
86 |
+
*
|
87 |
+
* @param string $notice Programmatic Notice Name
|
88 |
+
* @return null
|
89 |
+
*/
|
90 |
+
public function undismiss( $notice ) {
|
91 |
+
unset( $this->notices[ $notice ] );
|
92 |
+
update_option( 'exactmetrics_notices', $this->notices );
|
93 |
+
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Displays an inline notice with some ExactMetrics styling.
|
98 |
+
*
|
99 |
+
* @access public
|
100 |
+
* @since 6.0.0
|
101 |
+
*
|
102 |
+
* @param string $notice Programmatic Notice Name
|
103 |
+
* @param string $title Title
|
104 |
+
* @param string $message Message
|
105 |
+
* @param string $type Message Type (updated|warning|error) - green, yellow/orange and red respectively.
|
106 |
+
* @param string $button_text Button Text (optional)
|
107 |
+
* @param string $button_url Button URL (optional)
|
108 |
+
* @param bool $is_dismissible User can Dismiss Message (default: false)
|
109 |
+
*/
|
110 |
+
public function display_inline_notice( $name, $title, $message, $type = 'success', $is_dismissible = false, $args = array() ) {
|
111 |
+
/* Available/Planned $args options
|
112 |
+
* $args = array(
|
113 |
+
* 'primary' => array(
|
114 |
+
* 'text' => '',
|
115 |
+
* 'url' => '',
|
116 |
+
* 'target' => '',
|
117 |
+
* 'class' => 'button button-primary',
|
118 |
+
* ),
|
119 |
+
* 'secondary' => array(
|
120 |
+
* 'text' => '',
|
121 |
+
* 'url' => '',
|
122 |
+
* 'target' => '',
|
123 |
+
* 'class' => 'button button-secondary',
|
124 |
+
* ),
|
125 |
+
* 'skip_message_escape' => true // note: This param is for internal use only. Do not use as a developer.
|
126 |
+
* );
|
127 |
+
*/
|
128 |
+
|
129 |
+
|
130 |
+
// Check if the notice is dismissible, and if so has been dismissed.
|
131 |
+
if ( $is_dismissible && $this->is_dismissed( $name ) ) {
|
132 |
+
// Nothing to show here, return!
|
133 |
+
return '';
|
134 |
+
}
|
135 |
+
|
136 |
+
$dismissible = ( $is_dismissible ) ? ' is-dismissible': '';
|
137 |
+
|
138 |
+
// Display inline notice
|
139 |
+
ob_start();
|
140 |
+
?>
|
141 |
+
<div class="exactmetrics-notice <?php echo 'exactmetrics-' . esc_attr( $type ) . '-notice' . $dismissible; ?>" data-notice="<?php echo esc_attr( $name ); ?>">
|
142 |
+
<div class="exactmetrics-notice-icon <?php echo 'exactmetrics-' . esc_attr( $type ) . '-notice-icon'?>">
|
143 |
+
</div>
|
144 |
+
<div class="exactmetrics-notice-text <?php echo 'exactmetrics-' . esc_attr( $type ) . '-notice-text'?>">
|
145 |
+
<?php
|
146 |
+
// Title
|
147 |
+
if ( ! empty ( $title ) ) {
|
148 |
+
?>
|
149 |
+
<p class="exactmetrics-notice-title"><?php echo esc_html( $title ); ?></p>
|
150 |
+
<?php
|
151 |
+
}
|
152 |
+
|
153 |
+
// Message
|
154 |
+
if ( ! empty( $message ) ) {
|
155 |
+
if ( empty( $args['skip_message_escape'] ) ) {
|
156 |
+
?>
|
157 |
+
<p class="exactmetrics-notice-message"><?php echo esc_html( $message ); ?></p>
|
158 |
+
<?php
|
159 |
+
} else {
|
160 |
+
?>
|
161 |
+
<p class="exactmetrics-notice-message"><?php echo $message; ?></p>
|
162 |
+
<?php
|
163 |
+
}
|
164 |
+
}
|
165 |
+
|
166 |
+
// Primary Button
|
167 |
+
if ( ! empty( $args['primary']['text'] ) ) {
|
168 |
+
|
169 |
+
$text = '';
|
170 |
+
if ( ! empty( $args['primary']['text'] ) ) {
|
171 |
+
$text = $args['primary']['text'];
|
172 |
+
}
|
173 |
+
|
174 |
+
$url = '#';
|
175 |
+
if ( ! empty( $args['primary']['url'] ) ) {
|
176 |
+
$url = $args['primary']['url'];
|
177 |
+
}
|
178 |
+
|
179 |
+
$target = '';
|
180 |
+
if ( ! empty( $args['primary']['target'] ) && $args['primary']['target'] === 'blank') {
|
181 |
+
$target = ' target="_blank" rel="noopener noreferrer"';
|
182 |
+
}
|
183 |
+
|
184 |
+
$class = 'button button-primary';
|
185 |
+
if ( ! empty( $args['primary']['class'] ) ) {
|
186 |
+
$class = ' class="'. $args['primary']['class'] . '"';
|
187 |
+
}
|
188 |
+
?>
|
189 |
+
<a href="<?php echo esc_attr( $url ); ?>"<?php echo $target; ?><?php echo $class;?>><?php echo esc_html( $text ); ?></a>
|
190 |
+
<?php
|
191 |
+
}
|
192 |
+
|
193 |
+
// Secondary Button
|
194 |
+
if ( ! empty( $args['secondary']['text'] ) ) {
|
195 |
+
|
196 |
+
$text = '';
|
197 |
+
if ( ! empty( $args['secondary']['text'] ) ) {
|
198 |
+
$text = $args['secondary']['text'];
|
199 |
+
}
|
200 |
+
|
201 |
+
$url = '#';
|
202 |
+
if ( ! empty( $args['secondary']['url'] ) ) {
|
203 |
+
$url = $args['secondary']['url'];
|
204 |
+
}
|
205 |
+
|
206 |
+
$target = '';
|
207 |
+
if ( ! empty( $args['secondary']['target'] ) && $args['secondary']['target'] === 'blank') {
|
208 |
+
$target = ' target="_blank" rel="noopener noreferrer"';
|
209 |
+
}
|
210 |
+
|
211 |
+
$class = 'button button-secondary';
|
212 |
+
if ( ! empty( $args['secondary']['class'] ) ) {
|
213 |
+
$class = ' class="'. $args['secondary']['class'] . '"';
|
214 |
+
}
|
215 |
+
?>
|
216 |
+
<a href="<?php echo esc_attr( $url ); ?>"<?php echo $target; ?><?php echo $class;?>><?php echo esc_html( $text ); ?></a>
|
217 |
+
<?php
|
218 |
+
}
|
219 |
+
|
220 |
+
// Dismiss Button
|
221 |
+
if ( $is_dismissible ) {
|
222 |
+
?>
|
223 |
+
<button type="button" class="notice-dismiss<?php echo $dismissible; ?>">
|
224 |
+
<span class="screen-reader-text">
|
225 |
+
<?php esc_html_e( 'Dismiss this notice', 'google-analytics-dashboard-for-wp' ); ?>
|
226 |
+
</span>
|
227 |
+
</button>
|
228 |
+
<?php
|
229 |
+
}
|
230 |
+
?>
|
231 |
+
</div>
|
232 |
+
</div>
|
233 |
+
<?php
|
234 |
+
return ob_get_clean();
|
235 |
+
}
|
236 |
+
}
|
includes/admin/pages/addons.php
ADDED
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Addons class.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @author Chris Christoff
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Callback to output the ExactMetrics addons page.
|
19 |
+
*
|
20 |
+
* @since 6.0.0
|
21 |
+
*/
|
22 |
+
function exactmetrics_addons_page() {
|
23 |
+
echo exactmetrics_ublock_notice();
|
24 |
+
exactmetrics_settings_error_page( 'exactmetrics-addons' );
|
25 |
+
exactmetrics_settings_inline_js();
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Retrieves addons from the stored transient or remote server.
|
30 |
+
*
|
31 |
+
* @since 6.0.0
|
32 |
+
*
|
33 |
+
* @return bool | array false | Array of licensed and unlicensed Addons.
|
34 |
+
*/
|
35 |
+
function exactmetrics_get_addons() {
|
36 |
+
|
37 |
+
// Get license key and type.
|
38 |
+
$key = '';
|
39 |
+
$type = 'lite';
|
40 |
+
if ( exactmetrics_is_pro_version() ) {
|
41 |
+
$key = is_network_admin() ? ExactMetrics()->license->get_network_license_key() : ExactMetrics()->license->get_site_license_key();
|
42 |
+
$type = is_network_admin() ? ExactMetrics()->license->get_network_license_type() : ExactMetrics()->license->get_site_license_type();
|
43 |
+
}
|
44 |
+
|
45 |
+
// Get addons data from transient or perform API query if no transient.
|
46 |
+
if ( false === ( $addons = get_transient( '_exactmetrics_addons' ) ) ) {
|
47 |
+
$addons = exactmetrics_get_addons_data( $key );
|
48 |
+
}
|
49 |
+
|
50 |
+
// If no Addons exist, return false
|
51 |
+
if ( ! $addons ) {
|
52 |
+
return false;
|
53 |
+
}
|
54 |
+
|
55 |
+
// Iterate through Addons, to build two arrays:
|
56 |
+
// - Addons the user is licensed to use,
|
57 |
+
// - Addons the user isn't licensed to use.
|
58 |
+
$results = array(
|
59 |
+
'licensed' => array(),
|
60 |
+
'unlicensed'=> array(),
|
61 |
+
);
|
62 |
+
foreach ( (array) $addons as $i => $addon ) {
|
63 |
+
|
64 |
+
// Determine whether the user is licensed to use this Addon or not.
|
65 |
+
if (
|
66 |
+
empty( $type ) ||
|
67 |
+
( in_array( 'Pro', $addon->categories ) && ( $type != 'pro' && $type != 'master' ) ) ||
|
68 |
+
( in_array( 'Plus', $addon->categories ) && $type != 'plus' && $type != 'pro' && $type != 'master' ) ||
|
69 |
+
( in_array( 'Basic', $addon->categories ) && ( $type != 'basic' && $type != 'plus' && $type != 'pro' && $type != 'master' ) )
|
70 |
+
) {
|
71 |
+
// Unlicensed
|
72 |
+
$results['unlicensed'][] = $addon;
|
73 |
+
continue;
|
74 |
+
}
|
75 |
+
|
76 |
+
// Licensed
|
77 |
+
$results['licensed'][] = $addon;
|
78 |
+
|
79 |
+
}
|
80 |
+
|
81 |
+
// Return Addons, split by licensed and unlicensed.
|
82 |
+
return $results;
|
83 |
+
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Pings the remote server for addons data.
|
88 |
+
*
|
89 |
+
* @since 6.0.0
|
90 |
+
*
|
91 |
+
* @param string $key The user license key.
|
92 |
+
* @return array Array of addon data otherwise.
|
93 |
+
*/
|
94 |
+
function exactmetrics_get_addons_data( $key ) {
|
95 |
+
// Get Addons
|
96 |
+
// If the key is valid, we'll get personalised upgrade URLs for each Addon (if necessary) and plugin update information.
|
97 |
+
if ( exactmetrics_is_pro_version() && $key ) {
|
98 |
+
$addons = ExactMetrics()->license_actions->perform_remote_request( 'get-addons-data-v600', array( 'tgm-updater-key' => $key ) );
|
99 |
+
} else {
|
100 |
+
$addons = exactmetrics_get_all_addons_data();
|
101 |
+
}
|
102 |
+
|
103 |
+
// If there was an API error, set transient for only 10 minutes.
|
104 |
+
if ( ! $addons ) {
|
105 |
+
set_transient( '_exactmetrics_addons', false, 10 * MINUTE_IN_SECONDS );
|
106 |
+
return false;
|
107 |
+
}
|
108 |
+
|
109 |
+
// If there was an error retrieving the addons, set the error.
|
110 |
+
if ( isset( $addons->error ) ) {
|
111 |
+
set_transient( '_exactmetrics_addons', false, 10 * MINUTE_IN_SECONDS );
|
112 |
+
return false;
|
113 |
+
}
|
114 |
+
|
115 |
+
// Otherwise, our request worked. Save the data and return it.
|
116 |
+
set_transient( '_exactmetrics_addons', $addons, 4 * HOUR_IN_SECONDS );
|
117 |
+
return $addons;
|
118 |
+
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Get all addons without a license, for lite users.
|
123 |
+
*
|
124 |
+
* @return array|bool|mixed|object
|
125 |
+
*/
|
126 |
+
function exactmetrics_get_all_addons_data() {
|
127 |
+
// Build the body of the request.
|
128 |
+
$body = array(
|
129 |
+
'tgm-updater-action' => 'get-all-addons-data',
|
130 |
+
'tgm-updater-key' => '',
|
131 |
+
'tgm-updater-wp-version' => get_bloginfo( 'version' ),
|
132 |
+
'tgm-updater-referer' => site_url(),
|
133 |
+
'tgm-updater-mi-version' => EXACTMETRICS_VERSION,
|
134 |
+
'tgm-updater-is-pro' => false,
|
135 |
+
);
|
136 |
+
$body = http_build_query( $body, '', '&' );
|
137 |
+
|
138 |
+
// Build the headers of the request.
|
139 |
+
$headers = array(
|
140 |
+
'Content-Type' => 'application/x-www-form-urlencoded',
|
141 |
+
'Content-Length' => strlen( $body ),
|
142 |
+
);
|
143 |
+
|
144 |
+
// Setup variable for wp_remote_post.
|
145 |
+
$post = array(
|
146 |
+
'headers' => $headers,
|
147 |
+
'body' => $body,
|
148 |
+
);
|
149 |
+
|
150 |
+
// Perform the query and retrieve the response.
|
151 |
+
$response = wp_remote_post( exactmetrics_get_licensing_url(), $post );
|
152 |
+
$response_code = wp_remote_retrieve_response_code( $response );
|
153 |
+
$response_body = wp_remote_retrieve_body( $response );
|
154 |
+
|
155 |
+
// Bail out early if there are any errors.
|
156 |
+
if ( 200 !== $response_code || is_wp_error( $response_body ) ) {
|
157 |
+
return false;
|
158 |
+
}
|
159 |
+
|
160 |
+
// Return the json decoded content.
|
161 |
+
return json_decode( $response_body );
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Retrieve the plugin basename from the plugin slug.
|
166 |
+
*
|
167 |
+
* @since 6.0.0
|
168 |
+
*
|
169 |
+
* @param string $slug The plugin slug.
|
170 |
+
* @return string The plugin basename if found, else the plugin slug.
|
171 |
+
*/
|
172 |
+
function exactmetrics_get_plugin_basename_from_slug( $slug ) {
|
173 |
+
$keys = array_keys( get_plugins() );
|
174 |
+
|
175 |
+
foreach ( $keys as $key ) {
|
176 |
+
if ( preg_match( '|^' . $slug . '|', $key ) ) {
|
177 |
+
return $key;
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
return $slug;
|
182 |
+
|
183 |
+
}
|
includes/admin/pages/reports.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Reports class.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @subpackage Reports
|
9 |
+
* @author Chris Christoff
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
function exactmetrics_reports_page_body_class( $classes ) {
|
18 |
+
if ( ! empty( $_REQUEST['page'] ) && $_REQUEST['page'] === 'exactmetrics_reports' ) {
|
19 |
+
$classes .= ' exactmetrics-reporting-page ';
|
20 |
+
}
|
21 |
+
return $classes;
|
22 |
+
}
|
23 |
+
add_filter( 'admin_body_class', 'exactmetrics_reports_page_body_class' );
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Callback for getting all of the reports tabs for ExactMetrics.
|
27 |
+
*
|
28 |
+
* @since 6.0.0
|
29 |
+
* @access public
|
30 |
+
*
|
31 |
+
* @return array Array of tab information.
|
32 |
+
*/
|
33 |
+
function exactmetrics_get_reports() {
|
34 |
+
/**
|
35 |
+
* Developer Alert:
|
36 |
+
*
|
37 |
+
* Per the README, this is considered an internal hook and should
|
38 |
+
* not be used by other developers. This hook's behavior may be modified
|
39 |
+
* or the hook may be removed at any time, without warning.
|
40 |
+
*/
|
41 |
+
$reports = apply_filters( 'exactmetrics_get_reports', array() );
|
42 |
+
return $reports;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Callback to output the ExactMetrics reports page.
|
47 |
+
*
|
48 |
+
* @since 6.0.0
|
49 |
+
* @access public
|
50 |
+
*
|
51 |
+
* @return void
|
52 |
+
*/
|
53 |
+
function exactmetrics_reports_page() {
|
54 |
+
/**
|
55 |
+
* Developer Alert:
|
56 |
+
*
|
57 |
+
* Per the README, this is considered an internal hook and should
|
58 |
+
* not be used by other developers. This hook's behavior may be modified
|
59 |
+
* or the hook may be removed at any time, without warning.
|
60 |
+
*/
|
61 |
+
do_action( 'exactmetrics_head' );
|
62 |
+
echo exactmetrics_ublock_notice();
|
63 |
+
exactmetrics_settings_error_page( 'exactmetrics-reports');
|
64 |
+
exactmetrics_settings_inline_js();
|
65 |
+
}
|
includes/admin/pages/settings.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Callback to output the ExactMetrics settings page.
|
9 |
+
*
|
10 |
+
* @since 7.4.0
|
11 |
+
* @access public
|
12 |
+
*
|
13 |
+
* @return void
|
14 |
+
*/
|
15 |
+
function exactmetrics_settings_page() {
|
16 |
+
echo exactmetrics_ublock_notice();
|
17 |
+
exactmetrics_settings_error_page( 'exactmetrics-vue-site-settings' );
|
18 |
+
exactmetrics_settings_inline_js();
|
19 |
+
}
|
20 |
+
|
21 |
+
function exactmetrics_network_page() {
|
22 |
+
echo exactmetrics_ublock_notice();
|
23 |
+
exactmetrics_settings_error_page( 'exactmetrics-vue-network-settings' );
|
24 |
+
exactmetrics_settings_inline_js();
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Attempt to catch the js error preventing the Vue app from loading and displaying that message for better support.
|
29 |
+
*/
|
30 |
+
function exactmetrics_settings_inline_js() {
|
31 |
+
?>
|
32 |
+
<script type="text/javascript">
|
33 |
+
var ua = window.navigator.userAgent;
|
34 |
+
var msie = ua.indexOf( 'MSIE ' );
|
35 |
+
if ( msie > 0 ) {
|
36 |
+
var browser_error = document.getElementById( 'exactmetrics-error-browser' );
|
37 |
+
var js_error = document.getElementById( 'exactmetrics-error-js' );
|
38 |
+
js_error.style.display = 'none';
|
39 |
+
browser_error.style.display = 'block';
|
40 |
+
} else {
|
41 |
+
window.onerror = function myErrorHandler( errorMsg, url, lineNumber ) {
|
42 |
+
/* Don't try to put error in container that no longer exists post-vue loading */
|
43 |
+
var message_container = document.getElementById( 'exactmetrics-nojs-error-message' );
|
44 |
+
if ( ! message_container ) {
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
var message = document.getElementById( 'exactmetrics-alert-message' );
|
48 |
+
message.innerHTML = errorMsg;
|
49 |
+
message_container.style.display = 'block';
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
}
|
53 |
+
</script>
|
54 |
+
<?php
|
55 |
+
}
|
56 |
+
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Error page HTML
|
60 |
+
**/
|
61 |
+
function exactmetrics_settings_error_page( $id = 'exactmetrics-vue-site-settings', $footer = '', $margin = '82px 0' ) {
|
62 |
+
$inline_logo_image = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAABsCAMAAACFD5GwAAAC91BMVEUAAAAfDlshD1khDlkhDlkgDlhlKPchD1keEVkhD1ljJu8hD1gjD1wiD1YgDlkhDlggDlgWCmTmNWEgD1ggDVilQNoiD1mlP9whD1khDlkgD1khDlkgD1ggDlkgDVggDlggDlcfDlkgDlkgDVggDlcgD1khD1kgDlgfDFjlNmMhD1kgDlciDlYgD1khDlkhDlkgD1kgDlkhD1kgDlghDlshDlkhDlggDlkgDlceD1YcDFEeDlweDVMhD1ggDlggDlkfDlMhD1kgDlkfDlchD1kfDlcgDlchDlkgDlghDlggDVkhD1kgDlghDlggDlkfDVkhD1ogDlkfDlkhD1khDlghD1khD1kgDlgfDVYgD1kfDVIiD1YfDlcfDlcgD1ggDVceDF8hDlkgD1ofD1cdDVQgDlggDVgeDlgjDVshDVghDlggDlggDlQiD1YfDFYgDlgjD2AfD1qcPNIiEGEcDEcjD1QgD10iDl8hDmARBzAjEGAgD1ckEF4gD1IhD1ElDE4XDIYhE2AYCjswFa+iPtpiJ/DVMWKTOssjEE0kEF8ZC0cdC2AeDWQlElciEmZ3LLYYCz5yLL2wKl8fD1c/Gp1sKqLWMmAeD02aO89pKP0hD2THLmEtEF9UIeAgDFGJMcUhD2MaDkoXDEG1LF6kKGAnEVp3ML4OB3PbNGO+LWMSC5wkEWNdJOEiDk5eJuX8OmLuN2KLJF2+SfQpEnFdJefOMWIZC0eDM71UI5BVIr+yLFNfKM+wJdkXCjJJFb4nC00AAABbJd1WJNYvDlSkHG6yRerTNWQVCpMhD1llKPWmP9zkNGIhD1oiD1khDlhlKfYhDVkgD1kgDljkM2EhD1sjEF8iD1weD1mqQOEiEFYiD1IYC05mKPnrNWIXC0gLC1hsKv/4OGOuQuMlEWQWDVgeD1ZSIco5F3HnNGIdDlIvFHDyN2NEFVpqKv9oKfzeMmJiJu9ZI9k0FoXVMGFtK/9rLPxQIIjkNGGUJF56IF5yHl1XGVtWGVsC+SP/AAAAyHRSTlMABPbb7Ck5+xvMtZUrAo53hgzGQolAPcPD5uLVl0Y5kW4T0XAV6KmlSyzzYgrv6/jFg9dQHt29SSAQDggGz6wnHP2xejYuGd/IubSfnMFpX7h9a/GZjIBYVVQi2DR0XE4YooU+MCRlOjJzy35a32dB4In+uUb15MeYJvv69dKRfkZBNh797Ozk286dd29uW1RMEP389/XJx7ywq6Sgl5WRj4V5Zjs6JiEdEw7s3tfOxsbEwLmxsayqm46Af3VqRkBAOjU0MzAuKvfLDFgAABOdSURBVHja7Nx5TJt1HMfxLwVkk3MBCQwmUC5DL8p9dNznuAdMhzAcOwBxc97TxCMe8b6iRk3URP8x8fpH4xGN8YjxM/N7KiUcshFitkwzky1q9H+fp8/T41faDmrXUPK8/lv7NGmfd3+/p9/SjIKj5p07yo1R7WkPtpFq64nPvnthDiJhybCvllRbTLKWMTgIkdeTaiupapqDO6st7TCptoqcB2IEeLDijXdJtRXE990twBvDsxZShb3Jmxet8EqwPfEQqcLbkUIw+Lbc+T2pwlfNQBE4tiW+t9Uak6BOxWFLlw4ea78huWNOACfqmRpShaHUHhs484O3VRPR3igGDtNWkirclB1cOs+FXDxdV0Z21bfdZ+PLszvUqTi86M1FDBzh1YfI6d4CQQDnvrfUS3EYuT4SPJbfS5zxD8FbEo9QhYfJCjbLr17TcA55iMjOZ+A/UG8fJ9XmVzak8RyN6ka9HphpYuDMFkaTanOrzTUu8qt3abfPhTl1x8Ic3DFNkp5Um1jpCY99F/nHyY8XtPPgCHerl+LN63CFFZz50w/kkV+Wsbs8E28/RKrNqOFkjMfyXSj4kS7rkQes4NhYUz2pNhvL3nzw5rR30rq0VMyCN/jge6TaVJK1NgHuBMOz+vXPzcesDG7Y8on9pNo8dnUIfF5mymqjDdjx9CDjL96n09RL8aZxy413HbvR3bH+KdqgkYJF/ocB7PRJdZ/eHCLe3bbDQzxt3NSrTOD36SeqSLWFxD/Xzn/xIWjVwltLzdtFcMcKSbW1lBXwhZNJtcXs6liYt0Jx7ilSbTnH0wUo5u8nVbiIz5kq1e3NPnrDtW0R5FfNsAYyq3EbqULixW+v+j++m2zuTG+EnWBMS5okv5JjINOoX0uHxpeP/fnzqQCt/Hrpt7/PzzE4MbZcMpZDvuWkOwLHkSoE3jx1aSXQvhcvinlXrUyQehmNGthZl3Y+XUu+bItyBFZ/4xEKz58KOO/P//z58oXVC0Cjtru3cjQ6enSXLqvYBIAJN7eogYPJoqcAfbIS+Pb81x+rF4TzhthRclM/c2yZQWg8HuzAEc1DCV7EJrRRyPV1J2Q2W8iX67sTYoP5Xx3UZrWnFwS4Hj5YCbjvbwurNrz0RhV5qDEbrYBtIsiBLeXwbpRCrhiiUvKhwQjA1EBBU8AAlO+gQHy0EnBf25m5hSe9nt02+0/uhoK8giPhVUwchVq8/akUkw+JkLTQOuWMlFWVWci3wyZI+igQb14K7Por9cXCU+TDOwsMQtJWCDweOyFKSji09jVcR17VyE/0FlqnJGhQ1EK+JcMulwLxyGP/BjIk/frXuVU2u498es4GCLotELgLsglyGTVBUkFe5cJumtYpBUBjKvlm0SpbQkC+fuxXcUFuzKmLK3+sYtZMfvTZgMHo8A+cCVkiueyHbBd5oW+HXexGAsdcS360GoEYHQXokS+u3qjXX3/5zJxQR36ZAeueiCsfGFPECUHgvZAVEIe/syl4gSmnVDdCoTR14TyLzCH/+gHh+BUIXFQS6Sa95AhxQhD4Nivs2KiXBRwJWfEGA28qn84x7KfLiNMAN0cEP3A3Ubw74oUgcBdkrMv3AkakPnwDP3wOtj3EuSn5QN8LI8QZBoTe4AfOJL9CELgfgCFf6tJKnrYDMBoBDJaFb+CnFj1mhNE9mlkmLMRUPERuRvIh9AQ/8BCFUuzawLVaAJ3SUmVD5OEWiIZTIGoJ28DVJ6yMW8BJgmCDZI4dtJDL0CLuigtJ4HXt0/qqbRbyJ35b/UhePHESsGYKbTNIgSlDCnOYeBUQVeX6GJP1VQ168rQPgGmK1qptyIvw92zzqrzdXz2i3Bq4bxb4rfcknKzLH+8gp8plsOxQBN6R2JxrN3BE/vfxxFzJWFI9KVrNHekGY3lFonjLtukx+8Hcx4iG7P7yqKLBqIyuUqVxVfN0dm8xZE194gNKSRINUSEdBcAOEmdc/nB9AKJej7gHCjN2GqLSt2clOwPcZE4xNxcDaOxqnpiIvYGI8lKSJrLGiei6PelRxsimA+LBZQnibfxMFjddUZ5vSN/Zua+e3BzO3J1vyC/v783xPjFdsx4/fL6Konpyml6AG3aSnPTlQEEIArs2UlZsP3kzs5AV15BdSyeDhAExXdSy9oNua50JMga060hSCk/yvnUrRCnywMv4V9EJUSpVyke42TERBTDIyvtI1gJOgePd001UCFlRFdEuiLLIpTKNuT2pVOf75aDzVRb10VpfPf7oT+tw9pVVdJDTSDqDu8Y7yalOQEltsAPHertzNxRm6bxpIDOUkV02GFyKdUWwS3Mb2nk90rOu9BFYp6xPM3/eHY+oI4prtK9xl5ad4NTJ+1yrAHeFjsAJlARFhoUoFaIk19bdBd6A0rcdLiyFPH129ux6+v7y0+9n3OeDCXC4CX9mHlFHgh24+Gi203R2m7JlGdx+jrsdigPK3MrA0Zj4wPoeeCpv9R3YrFxhc6RqhhFySQPAJonyDPz+cF0j7Bic3apINOl9Bc8mHpp13eYZuEwLJwaJMo12QiKYYmDnuYaf/+WXn9YV+HYxsJmc7oGHE9XkoGMwpQY7MO9WkumskO2mafADVSKDJy5wbQ/WYCU5PgN3O/5IOSNvGU7JUpYe5XM2K48nxa0aSPILBrKnkzpNELE0+8nI6s4a3g2gsW44NrZQJ71T7TELAezsnklogtkzcHUk7NK7BrLHUjoEAKyfRLpZiAoPRU/1lkCUEUGc17i+/gMjmxwa3oeHcw+Tw/gsUHllA6eSohuKznbISvQkOQT4D9wFL1gnlTLvgSusgEZagXn5UoccciiEqNQxKUc1kKzGvj83jlmUFdgFERsgxQwAUytJlMBCRxEwFk+iIw2egQvsHUv2W5TjK8AKSFIH0T6S1JbMrvmq/MXH1xn47O1/nMFRcojWwMOyK2myCSgNUWB9CXiCPFtatl8m8H4+LGTaSqo/mJmVkAFZcYq4xPaSRAsgsoZEzRDNcH/Wq3C+2xonSTYM0c44UigPM1SRLImbg+0rOIY7bVzgo5B0kYu5o8b5a0atsmuU2gD0BiXwvf+1d2YxjVVhHP9YTCWd2qljdNraKS0tIPsOBUqh7CCbCBQEBmQbx33f1xijcY1GYzRxiUv0ySXxxcT4YsxJvPeGViii0QlmjGM08cHE/UFOb+9yTue0nYpIyf09EKDtvU3/9/y/5ZxzexeiWFeyLJsOoaO7JDDYqCF4hVS5SHBOvXGkTkcLfFjJvipnZ8+JnEY3I/mbHdGzfx6L+FJ5CHtUHsLPShLKGrmyET2c9NJgw5xHC0zkbpTAJVYpG5MxiEbVhTPHYelqn5idKPYBwctnYNH8DEg0Xhdj0beDxCSP2g7tlsAwItApKSZfkE4YAMyikxTYhqiUbASh4aWYAmxGqahwEG1R7BUZQSmPvRBhUFBekhstfOi1w95mtsDZcwyBJ7H3ml0Qi6dbvNiYvPlgkknWg99/FbaDTF8QydB7Uh7bREXHdk1gqEMSSmhskl6mWyCzFCywukISJuT5glxGL1pxYs4eHZ0W8VRyEjCr2MZa1FT9HPE2FdfuZAt8ITAEbsECPw6nIz+SOTQBkydv+PaLZAT+4tev1HPBV20ggi8vV/X5eN7s2mmBOSqLVmiwIBlJrk4pIo8oChEC9zLmb5kCD6Ft2iXXkB/rzETK7FmH0uVqxrlBtwkyVIhxf4It8FUsgbH9FNXA6ZgN4pOa7ZMNzDH88vMXJMH7z35DzIUNE9W68LDKXQa4cI9hpwXuW7HJ1Ns85OolCVnO+qhDq7dC1akENnWTBp1Y4BkOF5lqs80y4ca7+iBnl0UKJsxSJtbEaVXjzBIvEpbART6GwF3KcWOZD0W9ynvxhAP+Bcs/ELt7j5UL6gisuvim7sLZwk4LbI87BS3CyUloIPqP46BwUCWwYzTagOtMVmA7kTNhh+eKAQ7g5C0HJPCwtTaJirE4hyUwVwUMgc9S4n8shj7Z44TsdhOkzOI62Qi7SZVI88ugcA2HuMDuTBfSQdgtHX0CiagFHj+NwDpfsgK34CEmv3mXGSHOGpV9AiR6BIRGW1MVuIIl8IE7qRqJfbPnrLMgZXoQqpoDBV8d4sUrx2kjWu9BZPHsosBjSELxseqovVhMQEgkCdwoxe3JJAXO6MF5bAmAKgqvXQulxACGfDmLmsKuwvMolhGmReezBG4YFdstTBYODoxK1/gcpMrMOuKMoKZw3ms2W/0ToKY+hPiLYbcEpnrHXLTMXBFiBGwtVQTGeonYkxTYY1aqITks5hvRNsVUFKiP1JHd2K2PnH+IxtbFFLiAJXBTllQlsXHVV3rFBUWNkCKOW/iYnRQGjyMDSA4LqHxl9wSeciMC0UzmyqTGZQ3RUcQcVs/o89MQ5Y1D8QRuyKQGEW5qcG24jdRELc0SG19+AaFsxm53hsB6lsDQR5kNg3YBF9MBSJVLTvLhlyAB1yDEF8COC7yqZ67iJMlqJP9tbQBMs51sdBQK0hXQGXWj7NXKOAJfK9eptCHk0jP/YqJSKSDE5Z6RwHamwIMh8X0n4uIES7Pf/vSiOLz1evZJ/rv7IS5n3YwEXcfOC4yqztGrKQiQmROylhF3arpEzvGL7LbO6bxaqlVpkHvYmfoFn++on8PnOJ8p8JD0F93sqi0BhWNyKBXza3crqDC1XLiU2ghuHZUKLIoM+3B+3RCAenKtBRgYPnzo58/jcGrr6ZMnOfMSxKGxh0Phe/+TnQ2rJHrALHBIxCvPK3ERi3R0I4lVFAqiICUwDCqP42OEECbY30UJTDgy0YhYKiIHMKamSEmG5/HxhkGFPRRCFeenIjAcFOh9MYVGwFSEQsIwuX+mABi8uPX1qc/i8fXWnyc2eG8XMDH4EeJvNeywwOxqw+OUVLWp7hKxEhnCqwmmC+vQaVjtYwisl2/yRVbG2V3E9V2LfcAgalaOj3fYJ38EYr1an5LAru6Iwv0uEDHk3SkmvGMCLsilU+APq5wVF16T5GXz42d/n9hAj9wODDy92LN8sGsC50sD+KCqNELODKUqYgvcUIVi0dkYAvtxQnaAjEa9dcPeYiAYEFcMKVEiqOsd6qhpODDkz8TvlZuBlASGjmfEeJM/dGTpwNHrLbh1a5ciATqIhTdVR2q/XtbK7Oe+/iwhW7/8tD2G3Yw43OnkESo/ArslsGKzFc1qVbjIJ1VyXEAEbW2EwNBqQTEcZcVgXFaVJS4xC/B5Fqm1t5hojJhPLQbT89cC/sFZS6QNNVzRgL/XHIy7HfGthyiB2Qpzqxd7IIbmdtxvGT0EuybwER251dBzNTHn4BhAasr0paTA0NqHSMpWWEmWKeK9GZAIO7E02ogoxiFlgaHDjEiO1ygTowrLzAyaEJjt0j//dWK7WnJXUpG48ZKssICE2mOwwwLXMgTWg0N+yEj2PGQbMWYimctap2OXzU5Y1Ys6LnUAvRLoSnUrcQASMoKfdw1ITB9WH//4EWppPb9ACEy1h2ySUUUxjY+qjlZmlC63yjYOSVgOAZMPCIHZCp/6Y2Pbpnn3pYEpWb76sSweO8fwHOy0wP7anNNhyYNct/hrVkGzvNDJkoM57rZHx+h4T0Tj0rriRlh0WiOv7AeFpsmWWtG5veepI6wxciBvllSB+KzeHPMYJKTe6sxxq+KyobAFh8ttLPmFZFPBnGPt6ZTbNU5vTrcRCBarvN5uImNyzdSJLjRa0e5QhcZ+s3hZV+R5gM3rvyWp8NbTP504sYGNv6dgbHx8bH4gmxMEhITS5V29T5bHAEwaM2QfXghUd7iATdNZC9XV5/sMsGNkEMcydRxdni1cNEFK0G/LNW2bqO+gx5HpWKB48toaiM9rnyWn8Kmtn3//6eQGH6lNQ6EQx2G3WXWPxTlBV5l2n6z/n09efO7cpHj3nXPf6yna/qKNNYQJbfB39LR3QRxcbu1WhunG2YFzbvR2u8u6ncMXJrrVQNN5nNQ4XAKN9KHE1dXlShxdApY1XkrzPKCxz3jgViSzeSto7C98/boQkgneCxr7iebcUR4pCNfNgcY+IpAVRmrWPwKN/UOnn1p1xr8CGnsAw02D1YUE1T44Y1y3CUFEsHoeaOwJ7rs7iEh0Y41wRmQYszcRifZN4HuIq7I2SI2DlmI4A556hEMEG+ZBA2jsIYxlvIDUCDk2SJLFG8Pka/nMMRNo7C1aC9oQAb+ZP5VU8L0nk/p2ad7fCRp7j/srqDSJKx1PPBCLb6HcWbBqX+++Vym+bp302jXLUKLv/hd4RODOywCNvUrJq5kCIuAqHgAmUy1Bjnq63gUae5ma+TWOiqgvMGb2G1+5mXxqMKwF3zTg44F1nrDpL0svd0AMTYNX4wUAChxyBkAjDWheNofXBEK72oABSN6ooLx8tbRdK43SBUflXZRPr926AiqWWhCPCO7QaxNH6cTtL/BBRNLfqqzYzST150MDi6CRXlxbhSjufKxZ7GtaqOGNurXgm4ZkLLsRAffl1U8A3H94HakJrY+OlIBGOjKnLw9TXpx/qY4KvusFDaCRrvj8m4TCQjhMptebAx2gkc5Ue1cRE+HqIdBId/Ky1xj6FlVqbef9gMOuQzEIa+sFNaCxP5iu43hEdT7uvgk09g/VlxHZFm8uBo19RdOjRbLCId312paj/UfrhbpIthVsm9c2/e5PGnLne+sKrtB2hO41/gHNSL1BL4zHZwAAAABJRU5ErkJggg==';
|
63 |
+
?>
|
64 |
+
<style type="text/css">
|
65 |
+
#exactmetrics-settings-area {
|
66 |
+
visibility: hidden;
|
67 |
+
animation: loadExactMetricsSettingsNoJSView 0s 2s forwards;
|
68 |
+
}
|
69 |
+
|
70 |
+
@keyframes loadExactMetricsSettingsNoJSView{
|
71 |
+
to { visibility: visible; }
|
72 |
+
}
|
73 |
+
</style>
|
74 |
+
<!--[if IE]>
|
75 |
+
<style>
|
76 |
+
#exactmetrics-settings-area{
|
77 |
+
visibility: visible !important;
|
78 |
+
}
|
79 |
+
</style>
|
80 |
+
<![endif]-->
|
81 |
+
<div id="<?php echo $id; ?>">
|
82 |
+
<div id="exactmetrics-settings-area" class="exactmetrics-settings-area mi-container" style="font-family:'Helvetica Neue', 'HelveticaNeue-Light', 'Helvetica Neue Light', Helvetica, Arial, 'Lucida Grande', sans-serif;margin: auto;width: 750px;max-width: 100%;">
|
83 |
+
<div id="exactmetrics-settings-error-loading-area">
|
84 |
+
<div class="" style="text-align: center; background-color: #fff;border: 1px solid #D6E2EC; padding: 15px 50px 30px; color: #777777; margin: <?php echo esc_attr( $margin ); ?>">
|
85 |
+
<div class="" style="border-bottom: 0;padding: 5px 20px 0;">
|
86 |
+
<img class="" src="<?php echo esc_attr( $inline_logo_image ); ?>" alt="" style="max-width: 100%;width: 240px;padding: 30px 0 15px;">
|
87 |
+
</div>
|
88 |
+
<div id="exactmetrics-error-js">
|
89 |
+
<h3 class="" style="font-size: 20px;color: #434343;font-weight: 500;line-height:1.4;"><?php esc_html_e( 'Ooops! It Appears JavaScript Didn’t Load', 'google-analytics-dashboard-for-wp' ); ?></h3>
|
90 |
+
<p class="info" style="line-height: 1.5;margin: 1em 0;font-size: 16px;color: #434343;padding: 5px 20px 20px;"><?php esc_html_e( 'There seems to be an issue running JavaScript on your website, which ExactMetrics is crafted in to give you the best experience possible.', 'google-analytics-dashboard-for-wp' ); ?></p>
|
91 |
+
<p class="info"style="line-height: 1.5;margin: 1em 0;font-size: 16px;color: #434343;padding: 5px 20px 20px;">
|
92 |
+
<?php
|
93 |
+
// Translators: Placeholders make the text bold.
|
94 |
+
printf( esc_html__( 'If you are using an %1$sad blocker%2$s, please disable or whitelist the current page to load ExactMetrics correctly.', 'google-analytics-dashboard-for-wp' ), '<strong>', '</strong>' );
|
95 |
+
?>
|
96 |
+
</p>
|
97 |
+
<div style="display: none" id="exactmetrics-nojs-error-message">
|
98 |
+
<div class="" style=" border: 1px solid #E75066;
|
99 |
+
border-left: 3px solid #E75066;
|
100 |
+
background-color: #FEF8F9;
|
101 |
+
color: #E75066;
|
102 |
+
font-size: 14px;
|
103 |
+
padding: 18px 18px 18px 21px;
|
104 |
+
font-weight: 300;
|
105 |
+
text-align: left;">
|
106 |
+
<strong style="font-weight: 500;" id="exactmetrics-alert-message"></strong>
|
107 |
+
</div>
|
108 |
+
<p class="" style="font-size: 14px;color: #777777;padding-bottom: 15px;"><?php esc_html_e( 'Copy the error message above and paste it in a message to the ExactMetrics support team.', 'google-analytics-dashboard-for-wp' ); ?></p>
|
109 |
+
</div>
|
110 |
+
<a href="https://www.exactmetrics.com/docs/fix-javascript-error" target="_blank" style="margin-left: auto;background-color: #6528F5;border-color: #6528F5;border-bottom-width: 2px;color: #fff;border-radius: 3px;font-weight: 500;transition: all 0.1s ease-in-out;transition-duration: 0.2s;padding: 14px 35px;font-size: 16px;margin-top: 10px;margin-bottom: 20px; text-decoration: none; display: inline-block;">
|
111 |
+
<?php esc_html_e( 'Resolve This Issue', 'google-analytics-dashboard-for-wp' ); ?>
|
112 |
+
</a>
|
113 |
+
</div>
|
114 |
+
<div id="exactmetrics-error-browser" style="display: none">
|
115 |
+
<h3 class="" style="font-size: 20px;color: #434343;font-weight: 500;"><?php esc_html_e( 'Your browser version is not supported', 'google-analytics-dashboard-for-wp' ); ?></h3>
|
116 |
+
<p class="info" style="line-height: 1.5;margin: 1em 0;font-size: 16px;color: #434343;padding: 5px 20px 20px;"><?php esc_html_e( 'You are using a browser which is no longer supported by ExactMetrics. Please update or use another browser in order to access the plugin settings.', 'google-analytics-dashboard-for-wp' ); ?></p>
|
117 |
+
<a href="https://www.exactmetrics.com/docs/browser-support-policy/" target="_blank" style="margin-left: auto;background-color: #6528F5;border-color: #6528F5;border-bottom-width: 2px;color: #fff;border-radius: 3px;font-weight: 500;transition: all 0.1s ease-in-out;transition-duration: 0.2s;padding: 14px 35px;font-size: 16px;margin-top: 10px;margin-bottom: 20px; text-decoration: none; display: inline-block;">
|
118 |
+
<?php esc_html_e( 'View supported browsers', 'google-analytics-dashboard-for-wp' ); ?>
|
119 |
+
</a>
|
120 |
+
</div>
|
121 |
+
</div>
|
122 |
+
</div>
|
123 |
+
<div style="text-align: center;">
|
124 |
+
<?php echo wp_kses_post( $footer ); ?>
|
125 |
+
</div>
|
126 |
+
</div>
|
127 |
+
</div>
|
128 |
+
<?php
|
129 |
+
}
|
includes/admin/pages/tools.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* ExactMetrics settings export.
|
9 |
+
*
|
10 |
+
* @since 6.0.0
|
11 |
+
* @access public
|
12 |
+
*
|
13 |
+
* @return void
|
14 |
+
*/
|
15 |
+
function exactmetrics_process_export_settings() {
|
16 |
+
if ( ! isset( $_POST['exactmetrics_action'] ) || empty( $_POST['exactmetrics_action'] ) ) {
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
|
20 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
21 |
+
return;
|
22 |
+
}
|
23 |
+
|
24 |
+
if ( 'exactmetrics_export_settings' !== $_POST['exactmetrics_action'] ) {
|
25 |
+
return;
|
26 |
+
}
|
27 |
+
|
28 |
+
if ( empty( $_POST['exactmetrics_export_settings'] ) || ! wp_verify_nonce( $_POST['exactmetrics_export_settings'], 'mi-admin-nonce' ) ) {
|
29 |
+
return;
|
30 |
+
}
|
31 |
+
|
32 |
+
$settings = exactmetrics_export_settings();
|
33 |
+
ignore_user_abort( true );
|
34 |
+
|
35 |
+
nocache_headers();
|
36 |
+
header( 'Content-Type: application/json; charset=utf-8' );
|
37 |
+
header( 'Content-Disposition: attachment; filename=exactmetrics-settings-export-' . date( 'm-d-Y' ) . '.json' );
|
38 |
+
header( "Expires: 0" );
|
39 |
+
|
40 |
+
echo $settings;
|
41 |
+
exit;
|
42 |
+
}
|
43 |
+
|
44 |
+
add_action( 'admin_init', 'exactmetrics_process_export_settings' );
|
includes/admin/reporting.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ExactMetrics Reporting.
|
4 |
+
*
|
5 |
+
* Handles aggregating data.
|
6 |
+
*
|
7 |
+
* @since 7.0.0
|
8 |
+
*
|
9 |
+
* @package ExactMetrics
|
10 |
+
* @subpackage GA Reporting
|
11 |
+
* @author Chris Christoff
|
12 |
+
*/
|
13 |
+
|
14 |
+
// Exit if accessed directly
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit;
|
17 |
+
}
|
18 |
+
|
19 |
+
final class ExactMetrics_Reporting {
|
20 |
+
|
21 |
+
public $reports = array();
|
22 |
+
|
23 |
+
public function __construct( ) {
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
public function add_report( $report = false ){
|
28 |
+
if ( empty( $report ) || ! is_object( $report ) ) {
|
29 |
+
return;
|
30 |
+
}
|
31 |
+
|
32 |
+
if ( version_compare( $report->version, '1.0.0', '<' ) ) {
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
|
36 |
+
$this->reports[] = $report;
|
37 |
+
}
|
38 |
+
|
39 |
+
public function get_aggregate_data() {
|
40 |
+
if ( ! empty( $this->reports ) ) {
|
41 |
+
foreach ( $this->reports as $report ) {
|
42 |
+
$report->get_data( array( 'default' => true ) );
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
// $where possible values: auto, site, network, both
|
48 |
+
public function delete_aggregate_data( $where = 'site' ) {
|
49 |
+
if ( ! empty( $this->reports ) ) {
|
50 |
+
foreach ( $this->reports as $report ) {
|
51 |
+
$report->delete_cache( $where );
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
public function get_report( $name = '' ) {
|
57 |
+
if ( empty( $name ) || empty( $this->reports ) ) {
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
|
61 |
+
foreach ( $this->reports as $report ) {
|
62 |
+
if ( $name === $report->name ) {
|
63 |
+
return $report;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
return false;
|
67 |
+
}
|
68 |
+
}
|
includes/admin/reports/abstract-report.php
ADDED
@@ -0,0 +1,456 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Report Abstract
|
4 |
+
*
|
5 |
+
* Ensures all of the reports have a uniform class with helper functions.
|
6 |
+
*
|
7 |
+
* @since 6.0.0
|
8 |
+
*
|
9 |
+
* @package ExactMetrics
|
10 |
+
* @subpackage Reports
|
11 |
+
* @author Chris Christoff
|
12 |
+
*/
|
13 |
+
|
14 |
+
// Exit if accessed directly
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit;
|
17 |
+
}
|
18 |
+
|
19 |
+
class ExactMetrics_Report {
|
20 |
+
|
21 |
+
public $title;
|
22 |
+
public $class;
|
23 |
+
public $name;
|
24 |
+
public $version = '1.0.0';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Primary class constructor.
|
28 |
+
*
|
29 |
+
* @access public
|
30 |
+
* @since 6.0.0
|
31 |
+
*/
|
32 |
+
public function __construct() {
|
33 |
+
add_filter( 'exactmetrics_reports_abstract_get_data_pre_cache', array( $this, 'requirements' ), 10, 3 );
|
34 |
+
}
|
35 |
+
|
36 |
+
// Let's get the HTML to output for a particular report. This is not the AJAX endpoint. Args can hold things (generally start/end date range)
|
37 |
+
protected function get_report_html( $args = array() ) {
|
38 |
+
/* Defined in the report class */
|
39 |
+
// For ajax, args start, end, and data will be set with the data to use. Else call $this->get_data( array( 'default' => true ) )
|
40 |
+
return '';
|
41 |
+
}
|
42 |
+
|
43 |
+
public function additional_data() {
|
44 |
+
return array();
|
45 |
+
}
|
46 |
+
|
47 |
+
public function requirements( $error = false, $args = array(), $name = '' ) {
|
48 |
+
return $error;
|
49 |
+
}
|
50 |
+
|
51 |
+
public function show_report( $args = array() ) {
|
52 |
+
|
53 |
+
if ( ! current_user_can( 'exactmetrics_view_dashboard' ) ) {
|
54 |
+
return exactmetrics_get_message( 'error', esc_html__( 'Access denied', 'google-analytics-dashboard-for-wp' ) );
|
55 |
+
}
|
56 |
+
|
57 |
+
if ( exactmetrics_get_option( 'dashboard_disabled', false ) ) {
|
58 |
+
if ( current_user_can( 'exactmetrics_save_settings' ) ) {
|
59 |
+
$url = is_network_admin() ? network_admin_url( 'admin.php?page=exactmetrics_settings' ) : admin_url( 'admin.php?page=exactmetrics_settings' );
|
60 |
+
// Translators: Placeholders add a link to the settings panel.
|
61 |
+
return exactmetrics_get_message( 'error', sprintf( esc_html__( 'Please %1$senable the dashboard%2$s to see report data.', 'google-analytics-dashboard-for-wp' ), '<a href="' . $url . '">', '</a>' ) );
|
62 |
+
} else {
|
63 |
+
return exactmetrics_get_message( 'error', esc_html__( 'The dashboard is disabled.', 'google-analytics-dashboard-for-wp' ) );
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
if ( exactmetrics_is_pro_version() ) {
|
68 |
+
if ( ! ExactMetrics()->license->has_license() ) {
|
69 |
+
$url = is_network_admin() ? network_admin_url( 'admin.php?page=exactmetrics_settings' ) : admin_url( 'admin.php?page=exactmetrics_settings' );
|
70 |
+
// Translators: Placeholders add a link to the settings panel.
|
71 |
+
return exactmetrics_get_message( 'error', esc_html__( 'You do not have an active license. Please %1$scheck your license configuration.%2$s', 'google-analytics-dashboard-for-wp' ), '<a href="' . $url . '">', '</a>' );
|
72 |
+
} else if ( ExactMetrics()->license->license_has_error() ) {
|
73 |
+
return exactmetrics_get_message( 'error', $this->get_license_error() );
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
if ( ! ( ExactMetrics()->auth->is_authed() || ExactMetrics()->auth->is_network_authed() ) ) {
|
78 |
+
if ( current_user_can( 'exactmetrics_save_settings' ) ) {
|
79 |
+
$url = is_network_admin() ? network_admin_url( 'admin.php?page=exactmetrics_settings' ) : admin_url( 'admin.php?page=exactmetrics_settings' );
|
80 |
+
// Translators: Placeholders add a link to the settings panel.
|
81 |
+
return exactmetrics_get_message( 'error', sprintf( esc_html__( 'Please %1$sauthenticate %2$swith Google Analytics to allow the plugin to fetch data.', 'google-analytics-dashboard-for-wp' ), '<a href="' . $url . '">', '</a>' ) );
|
82 |
+
} else {
|
83 |
+
return exactmetrics_get_message( 'error', esc_html__( 'The Google oAuth authentication needs to be re-authenticated to view data.', 'google-analytics-dashboard-for-wp' ) );
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
if ( exactmetrics_is_pro_version() ) {
|
88 |
+
if ( ! ExactMetrics()->license->license_can( $this->level ) ) {
|
89 |
+
return $this->get_upsell_notice();
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
$error = $this->requirements( false, array(), $this->name );
|
94 |
+
|
95 |
+
if ( ! empty( $error ) ) {
|
96 |
+
return exactmetrics_get_message( 'error', $error );
|
97 |
+
}
|
98 |
+
|
99 |
+
if ( ! empty( $args['error'] ) ) {
|
100 |
+
return exactmetrics_get_message( 'error', $args['error'] );
|
101 |
+
}
|
102 |
+
|
103 |
+
if ( empty( $args['data'] ) || ! is_array( $args['data'] ) ) {
|
104 |
+
if ( exactmetrics_is_pro_version() ) {
|
105 |
+
return '';
|
106 |
+
} else {
|
107 |
+
// Try to get default data.
|
108 |
+
$args = $this->get_data( array( 'default' => true ) );
|
109 |
+
if ( empty( $args['data'] ) || is_array( $args['data'] ) ) {
|
110 |
+
return exactmetrics_get_message( 'error', __( 'No data found', 'google-analytics-dashboard-for-wp' ) );
|
111 |
+
}
|
112 |
+
|
113 |
+
if ( ! empty( $args['error'] ) ) {
|
114 |
+
return exactmetrics_get_message( 'error', $args['error'] );
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
return $this->get_report_html( $args['data'] );
|
120 |
+
}
|
121 |
+
|
122 |
+
// Deletes the report data from the cache
|
123 |
+
public function delete_cache( $where = 'site' ) {
|
124 |
+
|
125 |
+
if ( $where === 'site' || $where === 'both' ) {
|
126 |
+
delete_option( 'exactmetrics_report_data_' . $this->name );
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( $where === 'network' || $where === 'both' ) {
|
130 |
+
delete_option( 'exactmetrics_network_report_data_' . $this->name );
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
// Get report data
|
135 |
+
public function get_data( $args = array() ) {
|
136 |
+
|
137 |
+
if ( ! empty( $args['default'] ) ) {
|
138 |
+
$args['start'] = $this->default_start_date();
|
139 |
+
$args['end'] = $this->default_end_date();
|
140 |
+
}
|
141 |
+
|
142 |
+
$start = ! empty( $args['start'] ) && $this->is_valid_date( $args['start'] ) ? $args['start'] : '';
|
143 |
+
$end = ! empty( $args['end'] ) && $this->is_valid_date( $args['end'] ) ? $args['end'] : '';
|
144 |
+
|
145 |
+
if ( exactmetrics_is_pro_version() && ! ExactMetrics()->license->license_can( $this->level ) ) {
|
146 |
+
return array(
|
147 |
+
'success' => true,
|
148 |
+
'upgrade' => true,
|
149 |
+
'data' => array(),
|
150 |
+
);
|
151 |
+
}
|
152 |
+
|
153 |
+
if ( ! $this->is_valid_date_range( $start, $end ) ) {
|
154 |
+
return array(
|
155 |
+
'success' => false,
|
156 |
+
'error' => __( 'Invalid date range.', 'google-analytics-dashboard-for-wp' ),
|
157 |
+
'data' => array(),
|
158 |
+
);
|
159 |
+
}
|
160 |
+
|
161 |
+
if ( ( $start !== $this->default_start_date() || $end !== $this->default_end_date() ) && ! exactmetrics_is_pro_version() ) {
|
162 |
+
$start = $this->default_start_date();
|
163 |
+
$end = $this->default_end_date();
|
164 |
+
// return array(
|
165 |
+
// 'success' => false,
|
166 |
+
// 'error' => __( 'Please upgrade to ExactMetrics Pro to use custom date ranges.', 'google-analytics-dashboard-for-wp' ),
|
167 |
+
// 'data' => array(),
|
168 |
+
// );
|
169 |
+
}
|
170 |
+
|
171 |
+
$error = apply_filters( 'exactmetrics_reports_abstract_get_data_pre_cache', false, $args, $this->name );
|
172 |
+
if ( $error ) {
|
173 |
+
return apply_filters( 'exactmetrics_reports_handle_error_message', array(
|
174 |
+
'success' => false,
|
175 |
+
'error' => $error,
|
176 |
+
'data' => array(),
|
177 |
+
) );
|
178 |
+
}
|
179 |
+
|
180 |
+
$check_cache = ( $start === $this->default_start_date() && $end === $this->default_end_date() ) || apply_filters( 'exactmetrics_report_use_cache', false, $this->name );
|
181 |
+
$site_auth = ExactMetrics()->auth->get_viewname();
|
182 |
+
$ms_auth = is_multisite() && ExactMetrics()->auth->get_network_viewname();
|
183 |
+
$transient = 'exactmetrics_report_' . $this->name . '_' . $start . '_' . $end;
|
184 |
+
// Set to same time as MI cache. MI caches same day to 15 and others to 1 day, so there's no point pinging MI before then.
|
185 |
+
$expiration = date( 'Y-m-d' ) === $end ? apply_filters( 'exactmetrics_report_transient_expiration', 15 * MINUTE_IN_SECONDS, $this->name ) : DAY_IN_SECONDS;
|
186 |
+
|
187 |
+
// Default date range, check.
|
188 |
+
if ( $site_auth || $ms_auth ) {
|
189 |
+
// Single site or MS with auth at subsite
|
190 |
+
$option_name = $site_auth ? 'exactmetrics_report_data_' . $this->name : 'exactmetrics_network_report_data_' . $this->name;
|
191 |
+
$p = $site_auth ? ExactMetrics()->auth->get_viewid() : ExactMetrics()->auth->get_network_viewid();
|
192 |
+
|
193 |
+
$data = array();
|
194 |
+
if ( $check_cache ) {
|
195 |
+
$data = ! $site_auth && $ms_auth ? get_site_option( $option_name, array() ) : get_option( $option_name, array() );
|
196 |
+
} else {
|
197 |
+
$data = ! $site_auth && $ms_auth ? get_site_transient( $transient ) : get_transient( $transient );
|
198 |
+
}
|
199 |
+
|
200 |
+
if ( ! empty( $data ) &&
|
201 |
+
! empty( $data['expires'] ) &&
|
202 |
+
$data['expires'] >= time() &&
|
203 |
+
! empty( $data['data'] ) &&
|
204 |
+
! empty( $data['p'] ) &&
|
205 |
+
$data['p'] === $p
|
206 |
+
) {
|
207 |
+
return $this->prepare_report_data( array(
|
208 |
+
'success' => true,
|
209 |
+
'data' => $data['data'],
|
210 |
+
) );
|
211 |
+
}
|
212 |
+
|
213 |
+
// Nothing in cache, either not saved before, expired or mismatch. Let's grab from API
|
214 |
+
$api_options = array( 'start' => $start, 'end' => $end );
|
215 |
+
if ( ! $site_auth && $ms_auth ) {
|
216 |
+
$api_options['network'] = true;
|
217 |
+
}
|
218 |
+
|
219 |
+
$api = new ExactMetrics_API_Request( 'analytics/reports/' . $this->name . '/', $api_options, 'GET' );
|
220 |
+
|
221 |
+
$additional_data = $this->additional_data();
|
222 |
+
|
223 |
+
if ( ! empty( $additional_data ) ) {
|
224 |
+
$api->set_additional_data( $additional_data );
|
225 |
+
}
|
226 |
+
|
227 |
+
$ret = $api->request();
|
228 |
+
|
229 |
+
if ( is_wp_error( $ret ) ) {
|
230 |
+
return array(
|
231 |
+
'success' => false,
|
232 |
+
'error' => $ret->get_error_message(),
|
233 |
+
'data' => array(),
|
234 |
+
);
|
235 |
+
} else {
|
236 |
+
// Success
|
237 |
+
$data = array(
|
238 |
+
'expires' => time() + $expiration,
|
239 |
+
'p' => $p,
|
240 |
+
'data' => $ret['data'],
|
241 |
+
);
|
242 |
+
|
243 |
+
if ( $check_cache ) {
|
244 |
+
! $site_auth && $ms_auth ? update_site_option( $option_name, $data ) : update_option( $option_name, $data );
|
245 |
+
} else {
|
246 |
+
! $site_auth && $ms_auth ? set_site_transient( $transient, $data, $expiration ) : set_transient( $transient, $data, $expiration );
|
247 |
+
}
|
248 |
+
|
249 |
+
return $this->prepare_report_data( array(
|
250 |
+
'success' => true,
|
251 |
+
'data' => $ret['data'],
|
252 |
+
) );
|
253 |
+
}
|
254 |
+
|
255 |
+
} else {
|
256 |
+
return array(
|
257 |
+
'success' => false,
|
258 |
+
'error' => __( 'You must authenticate with ExactMetrics to use reports.', 'google-analytics-dashboard-for-wp' ),
|
259 |
+
'data' => array(),
|
260 |
+
);
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
public function default_start_date() {
|
265 |
+
return date( 'Y-m-d', strtotime( '-30 days' ) );
|
266 |
+
}
|
267 |
+
|
268 |
+
public function default_end_date() {
|
269 |
+
return date( 'Y-m-d', strtotime( '-1 day' ) );
|
270 |
+
}
|
271 |
+
|
272 |
+
// Checks to see if date range is valid. Should be 30-yesterday always for lite & any valid date range to today for Pro.
|
273 |
+
public function is_valid_date_range( $start, $end ) {
|
274 |
+
$start = strtotime( $start );
|
275 |
+
$end = strtotime( $end );
|
276 |
+
|
277 |
+
if ( $start > strtotime( 'now' ) || $end > strtotime( 'now' ) || $start < strtotime( '01 January 2005' ) || $end < strtotime( '01 January 2005' ) ) {
|
278 |
+
return false;
|
279 |
+
}
|
280 |
+
|
281 |
+
// return false if the start date is after the end date
|
282 |
+
return ( $start > $end ) ? false : true;
|
283 |
+
}
|
284 |
+
|
285 |
+
// Is a valid date value
|
286 |
+
public function is_valid_date( $date = '' ) {
|
287 |
+
$d = ExactMetricsDateTime::createFromFormat( 'Y-m-d', $date );
|
288 |
+
|
289 |
+
return $d && $d->format( 'Y-m-d' ) === $date;
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Do not use the functions below this. They are unused and are just here so people
|
294 |
+
* with out of date ExactMetrics addons won't get fatal errors.
|
295 |
+
*/
|
296 |
+
protected function get_api_max_limit() {
|
297 |
+
return 300;
|
298 |
+
}
|
299 |
+
|
300 |
+
protected function get_date_range() {
|
301 |
+
return array();
|
302 |
+
}
|
303 |
+
|
304 |
+
public function get_upsell_notice() {
|
305 |
+
$has_level = exactmetrics_is_pro_version() ? ExactMetrics()->license->get_license_type() : false;
|
306 |
+
$has_level = $has_level ? $has_level : 'lite';
|
307 |
+
// Translators: Placeholders add the license level and the report title.
|
308 |
+
$message = sprintf( __( 'You currently have a %1$s level license, but this report requires at least a %2$s level license to view the %3$s. Please upgrade to view this report.', 'google-analytics-dashboard-for-wp' ), $has_level, $this->level, $this->title );
|
309 |
+
ob_start(); ?>
|
310 |
+
<div class="exactmetrics-upsell-report-container exactmetrics-upsell-report-<?php echo $this->name; ?>-bg">
|
311 |
+
<div class="exactmetrics-upsell-container">
|
312 |
+
<div class="row justify-content-center">
|
313 |
+
<div class="col-lg-10 col-lg-offset-1 align-self-center">
|
314 |
+
<div class="exactmetrics-upsell-card">
|
315 |
+
<img class="exactmetrics-upgrade-mascot"
|
316 |
+
src="<?php echo trailingslashit( EXACTMETRICS_PLUGIN_URL ); ?>assets/css/images/em-mascot.png"
|
317 |
+
srcset="<?php echo trailingslashit( EXACTMETRICS_PLUGIN_URL ); ?>assets/css/images/mascot@2x.png 2x"
|
318 |
+
alt="">
|
319 |
+
<div class="exactmetrics-upsell-card-card-content">
|
320 |
+
<span class="exactmetrics-upsell-card-title"><?php esc_html_e( 'Ready to Get Analytics Super-Powers?', 'google-analytics-dashboard-for-wp' ); ?></span>
|
321 |
+
<p class="exactmetrics-upsell-card-subtitle">
|
322 |
+
<strong><?php esc_html_e( '(And Crush Your Competition?)', 'google-analytics-dashboard-for-wp' ); ?></strong>
|
323 |
+
</p>
|
324 |
+
<?php if ( exactmetrics_is_pro_version() ) { ?>
|
325 |
+
<p>
|
326 |
+
<?php
|
327 |
+
// Translators: License level and smiley.
|
328 |
+
echo sprintf( esc_html__( 'Hey there! It looks like you\'ve got the %1$s license installed on your site. That\'s awesome! %s', 'google-analytics-dashboard-for-wp' ), $has_level, '<span class="dashicons dashicons-smiley"></span>' );
|
329 |
+
?>
|
330 |
+
</p>
|
331 |
+
|
332 |
+
<p>
|
333 |
+
<?php
|
334 |
+
// Translators: Placeholders add the report title and license level.
|
335 |
+
echo sprintf( esc_html__( 'Do you want to access to %1$s reporting right now%2$s in your WordPress Dashboard? That comes with the %3$s level%4$s of our paid packages. You\'ll need to upgrade your license to get instant access.', 'google-analytics-dashboard-for-wp' ), '<strong>' . $this->title, '</strong>', '<strong><a href="' . exactmetrics_get_url( 'reports-page', $this->name . '-report-upsell-license-link', 'https://exactmetrics.com/my-account/' ) . '">' . $this->level, '</a></strong>' );
|
336 |
+
?>
|
337 |
+
</p>
|
338 |
+
|
339 |
+
<p>
|
340 |
+
<?php
|
341 |
+
// Translators: Placeholdes add links to the account area and a guide.
|
342 |
+
echo sprintf( esc_html__( 'It\'s easy! To upgrade, navigate to %1$sMy Account%2$s on ExactMetrics.com, go to the licenses tab, and click upgrade. We also have a %3$sstep by step guide%4$s with pictures of this process.', 'google-analytics-dashboard-for-wp' ), '<a href="' . exactmetrics_get_url( 'reports-page', $this->name . '-report-upsell-license-link', 'https://exactmetrics.com/my-account/' ) . '"><strong>', '</strong></a>', '<a href="' . exactmetrics_get_url( 'reports-page', $this->name . '-report-upsell-license-link', 'https://www.exactmetrics.com/docs/upgrade-exactmetrics-license/' ) . '" style="text-decoration:underline !important">', '</a>' );
|
343 |
+
?>
|
344 |
+
</p>
|
345 |
+
|
346 |
+
<p><?php esc_html_e( 'If you have any questions, don\'t hesitate to reach out. We\'re here to help.', 'google-analytics-dashboard-for-wp' ); ?></p>
|
347 |
+
<?php } else { ?>
|
348 |
+
<p>
|
349 |
+
<?php
|
350 |
+
// Translators: Placeholder adds a smiley face.
|
351 |
+
echo sprintf( esc_html__( 'Hey there! %s It looks like you\'ve got the free version of ExactMetrics installed on your site. That\'s awesome!', 'google-analytics-dashboard-for-wp' ), '<span class="dashicons dashicons-smiley"></span>' );
|
352 |
+
?>
|
353 |
+
</p>
|
354 |
+
|
355 |
+
<p>
|
356 |
+
<?php
|
357 |
+
// Translators: Placeholders make the text bold, add the license level and add a link to upgrade.
|
358 |
+
echo sprintf( esc_html__( 'Do you you want to access to %1$s reporting right now%2$s in your WordPress Dashboard? That comes with %3$s level%4$s of our paid packages. To get instant access, you\'ll want to buy a ExactMetrics license, which also gives you access to powerful addons, expanded reporting (including the ability to use custom date ranges), comprehensive tracking features (like UserID tracking) and access to our world-class support team.', 'google-analytics-dashboard-for-wp' ), '<strong>' . $this->title, '</strong>', '<a href="' . exactmetrics_get_upgrade_link( 'reports-page', $this->name . '-report-upsell-license-link' ) . '">' . $this->level, '</a>' );
|
359 |
+
?>
|
360 |
+
</p>
|
361 |
+
|
362 |
+
<p>
|
363 |
+
<?php
|
364 |
+
// Translators: Placeholders make the text bold, add the license level and add a link to upgrade.
|
365 |
+
echo sprintf( esc_html__( 'Upgrading is easy! To upgrade, navigate to %1$ssour pricing page%2$s, purchase the required license, and then follow the %3$sinstructions in the email receipt%4$s to upgrade. It only takes a few minutes to unlock the most powerful, yet easy to use analytics tracking system for WordPress.', 'google-analytics-dashboard-for-wp' ), '<a href="' . exactmetrics_get_upgrade_link( 'reports-page', $this->name . '-report-upsell-license-link' ) . '"><strong>', '</strong></a>', '<a style="text-decoration:underline !important" href="' . exactmetrics_get_url( 'reports-page', $this->name . '-report-go-lite-pro-link', 'https://www.exactmetrics.com/docs/go-lite-pro/' ) . '">', '</a>' );
|
366 |
+
?>
|
367 |
+
</p>
|
368 |
+
|
369 |
+
<p><?php esc_html_e( 'If you have any questions, don\'t hesitate to reach out. We\'re here to help.', 'google-analytics-dashboard-for-wp' ); ?></p>
|
370 |
+
<?php } ?>
|
371 |
+
</div>
|
372 |
+
<div class="exactmetrics-upsell-card-action">
|
373 |
+
<?php if ( exactmetrics_is_pro_version() ) { ?>
|
374 |
+
<a href="<?php echo exactmetrics_get_upgrade_link( 'reports-page', $this->name . '-report-upsell-license-link' ); ?>"
|
375 |
+
class="exactmetrics-upsell-card-button"><?php esc_html_e( 'Upgrade Now', 'google-analytics-dashboard-for-wp' ); ?></a>
|
376 |
+
<?php } else { ?>
|
377 |
+
<a href="<?php echo exactmetrics_get_url( 'reports-page', $this->name . '-report-upsell-license-link', 'https://www.exactmetrics.com/docs/upgrade-exactmetrics-license/' ); ?>"
|
378 |
+
class="exactmetrics-upsell-card-button"><?php esc_html_e( 'Get ExactMetrics Pro', 'google-analytics-dashboard-for-wp' ); ?></a>
|
379 |
+
<?php } ?>
|
380 |
+
</div>
|
381 |
+
</div>
|
382 |
+
</div>
|
383 |
+
</div>
|
384 |
+
</div>
|
385 |
+
</div>
|
386 |
+
</div>
|
387 |
+
<?php
|
388 |
+
return ob_get_clean();
|
389 |
+
}
|
390 |
+
|
391 |
+
function get_ga_report_range( $data = array() ) {
|
392 |
+
if ( empty( $data['reportcurrentrange'] ) || empty( $data['reportcurrentrange']['startDate'] ) || empty( $data['reportcurrentrange']['endDate'] ) ) {
|
393 |
+
return '';
|
394 |
+
} else {
|
395 |
+
if ( ! empty( $data['reportprevrange'] ) && ! empty( $data['reportprevrange']['startDate'] ) && ! empty( $data['reportprevrange']['endDate'] ) ) {
|
396 |
+
return urlencode( '_u.date00=' . str_replace( '-', '', $data['reportcurrentrange']['startDate'] ) . '&_u.date01=' . str_replace( '-', '', $data['reportcurrentrange']['endDate'] ) . '&_u.date10=' . str_replace( '-', '', $data['reportprevrange']['startDate'] ) . '&_u.date11=' . str_replace( '-', '', $data['reportprevrange']['endDate'] ) );
|
397 |
+
} else {
|
398 |
+
return urlencode( '_u.date00=' . str_replace( '-', '', $data['reportcurrentrange']['startDate'] ) . '&_u.date01=' . str_replace( '-', '', $data['reportcurrentrange']['endDate'] ) );
|
399 |
+
}
|
400 |
+
}
|
401 |
+
}
|
402 |
+
|
403 |
+
/**
|
404 |
+
* Grab the link to the addons page used in each report's error message.
|
405 |
+
*
|
406 |
+
* @return string
|
407 |
+
*/
|
408 |
+
public function get_addons_page_link() {
|
409 |
+
if ( current_user_can( 'install_plugins' ) ) {
|
410 |
+
$addons_link = 'install_addon';
|
411 |
+
} else {
|
412 |
+
$addons_link = esc_html__( 'Please ask your webmaster to enable this addon.', 'google-analytics-dashboard-for-wp' );
|
413 |
+
}
|
414 |
+
|
415 |
+
return $addons_link;
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* When called will add the footer link to be displayed in the error popup.
|
420 |
+
*
|
421 |
+
* @param array $data The data sent as error response to the ajax call.
|
422 |
+
*
|
423 |
+
* @return array
|
424 |
+
*/
|
425 |
+
public function add_error_addon_link( $data ) {
|
426 |
+
$data['data']['footer'] = $this->get_addons_page_link();
|
427 |
+
|
428 |
+
return $data;
|
429 |
+
}
|
430 |
+
|
431 |
+
/**
|
432 |
+
* Added to allow individual reports to alter data when outputting for Vue reports.
|
433 |
+
*
|
434 |
+
* @param $data
|
435 |
+
*
|
436 |
+
* @return mixed
|
437 |
+
*/
|
438 |
+
public function prepare_report_data( $data ) {
|
439 |
+
return $data;
|
440 |
+
}
|
441 |
+
}
|
442 |
+
|
443 |
+
if ( ! class_exists( 'ExactMetricsDateTime' ) ) {
|
444 |
+
class ExactMetricsDateTime extends DateTime {
|
445 |
+
public static function createFromFormat( $format, $time, $timezone = null ) {
|
446 |
+
if ( ! $timezone ) {
|
447 |
+
$timezone = new DateTimeZone( date_default_timezone_get() );
|
448 |
+
}
|
449 |
+
if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) {
|
450 |
+
return parent::createFromFormat( $format, $time, $timezone );
|
451 |
+
}
|
452 |
+
|
453 |
+
return new DateTime( date( $format, strtotime( $time ) ), $timezone );
|
454 |
+
}
|
455 |
+
}
|
456 |
+
}
|
includes/admin/reports/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
includes/admin/reports/overview.php
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Overview Report
|
4 |
+
*
|
5 |
+
* Ensures all of the reports have a uniform class with helper functions.
|
6 |
+
*
|
7 |
+
* @since 6.0.0
|
8 |
+
*
|
9 |
+
* @package ExactMetrics
|
10 |
+
* @subpackage Reports
|
11 |
+
* @author Chris Christoff
|
12 |
+
*/
|
13 |
+
|
14 |
+
// Exit if accessed directly
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit;
|
17 |
+
}
|
18 |
+
|
19 |
+
final class ExactMetrics_Report_Overview extends ExactMetrics_Report {
|
20 |
+
|
21 |
+
public $title;
|
22 |
+
public $class = 'ExactMetrics_Report_Overview';
|
23 |
+
public $name = 'overview';
|
24 |
+
public $version = '1.0.0';
|
25 |
+
public $level = 'lite';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Primary class constructor.
|
29 |
+
*
|
30 |
+
* @access public
|
31 |
+
* @since 6.0.0
|
32 |
+
*/
|
33 |
+
public function __construct() {
|
34 |
+
$this->title = __( 'Overview', 'google-analytics-dashboard-for-wp' );
|
35 |
+
parent::__construct();
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Prepare report-specific data for output.
|
40 |
+
*
|
41 |
+
* @param array $data The data from the report before it gets sent to the frontend.
|
42 |
+
*
|
43 |
+
* @return mixed
|
44 |
+
*/
|
45 |
+
public function prepare_report_data( $data ) {
|
46 |
+
// Add flags to the countries report.
|
47 |
+
if ( ! empty( $data['data']['countries'] ) ) {
|
48 |
+
$country_names = exactmetrics_get_country_list( true );
|
49 |
+
foreach ( $data['data']['countries'] as $key => $country ) {
|
50 |
+
$data['data']['countries'][ $key ]['name'] = isset( $country_names[ $country['iso'] ] ) ? $country_names[ $country['iso'] ] : $country['iso'];
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
// Escape urls for the top pages report.
|
55 |
+
if ( ! empty( $data['data']['toppages'] ) ) {
|
56 |
+
foreach ( $data['data']['toppages'] as $key => $page ) {
|
57 |
+
$title = $data['data']['toppages'][ $key ]['title'];
|
58 |
+
$url = '(not set)' === $title ? '' : esc_url( $data['data']['toppages'][ $key ]['hostname'] );
|
59 |
+
|
60 |
+
$data['data']['toppages'][ $key ]['hostname'] = $url;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
// Bounce rate add symbol.
|
65 |
+
if ( ! empty( $data['data']['infobox']['bounce']['value'] ) ) {
|
66 |
+
$data['data']['infobox']['bounce']['value'] .= '%';
|
67 |
+
}
|
68 |
+
|
69 |
+
// Add GA links.
|
70 |
+
if ( ! empty( $data['data'] ) ) {
|
71 |
+
$data['data']['galinks'] = array(
|
72 |
+
'countries' => 'https://analytics.google.com/analytics/web/#report/visitors-geo/' . ExactMetrics()->auth->get_referral_url() . $this->get_ga_report_range( $data['data'] ),
|
73 |
+
'referrals' => 'https://analytics.google.com/analytics/web/#report/trafficsources-referrals/' . ExactMetrics()->auth->get_referral_url() . $this->get_ga_report_range( $data['data'] ),
|
74 |
+
'topposts' => 'https://analytics.google.com/analytics/web/#/report/content-pages/' . ExactMetrics()->auth->get_referral_url() . $this->get_ga_report_range( $data['data'] ),
|
75 |
+
);
|
76 |
+
}
|
77 |
+
|
78 |
+
return $data;
|
79 |
+
}
|
80 |
+
}
|
includes/admin/review.php
ADDED
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Ask for some love.
|
4 |
+
*
|
5 |
+
* @package ExactMetrics
|
6 |
+
* @author ExactMetrics
|
7 |
+
* @since 7.0.7
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @copyright Copyright (c) 2018, ExactMetrics LLC
|
10 |
+
*/
|
11 |
+
class ExactMetrics_Review {
|
12 |
+
/**
|
13 |
+
* Primary class constructor.
|
14 |
+
*
|
15 |
+
* @since 7.0.7
|
16 |
+
*/
|
17 |
+
public function __construct() {
|
18 |
+
// Admin notice requesting review.
|
19 |
+
add_action( 'admin_notices', array( $this, 'review_request' ) );
|
20 |
+
add_action( 'wp_ajax_exactmetrics_review_dismiss', array( $this, 'review_dismiss' ) );
|
21 |
+
}
|
22 |
+
/**
|
23 |
+
* Add admin notices as needed for reviews.
|
24 |
+
*
|
25 |
+
* @since 7.0.7
|
26 |
+
*/
|
27 |
+
public function review_request() {
|
28 |
+
// Only consider showing the review request to admin users.
|
29 |
+
if ( ! is_super_admin() ) {
|
30 |
+
return;
|
31 |
+
}
|
32 |
+
|
33 |
+
// If the user has opted out of product annoucement notifications, don't
|
34 |
+
// display the review request.
|
35 |
+
if ( exactmetrics_get_option( 'hide_am_notices', false ) || exactmetrics_get_option( 'network_hide_am_notices', false ) ) {
|
36 |
+
return;
|
37 |
+
}
|
38 |
+
// Verify that we can do a check for reviews.
|
39 |
+
$review = get_option( 'exactmetrics_review' );
|
40 |
+
$time = time();
|
41 |
+
$load = false;
|
42 |
+
|
43 |
+
if ( ! $review ) {
|
44 |
+
$review = array(
|
45 |
+
'time' => $time,
|
46 |
+
'dismissed' => false,
|
47 |
+
);
|
48 |
+
update_option( 'exactmetrics_review', $review );
|
49 |
+
} else {
|
50 |
+
// Check if it has been dismissed or not.
|
51 |
+
if ( ( isset( $review['dismissed'] ) && ! $review['dismissed'] ) && ( isset( $review['time'] ) && ( ( $review['time'] + DAY_IN_SECONDS ) <= $time ) ) ) {
|
52 |
+
$load = true;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
// If we cannot load, return early.
|
57 |
+
if ( ! $load ) {
|
58 |
+
return;
|
59 |
+
}
|
60 |
+
|
61 |
+
$this->review();
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Maybe show review request.
|
66 |
+
*
|
67 |
+
* @since 7.0.7
|
68 |
+
*/
|
69 |
+
public function review() {
|
70 |
+
// Fetch when plugin was initially installed.
|
71 |
+
$activated = get_option( 'exactmetrics_over_time', array() );
|
72 |
+
$ua_code = exactmetrics_get_ua();
|
73 |
+
|
74 |
+
if ( ! empty( $activated['connected_date'] ) ) {
|
75 |
+
// Only continue if plugin has been tracking for at least 14 days.
|
76 |
+
if ( ( $activated['connected_date'] + ( DAY_IN_SECONDS * 14 ) ) > time() ) {
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
} else {
|
80 |
+
if ( empty( $activated ) ) {
|
81 |
+
$data = array(
|
82 |
+
'installed_version' => EXACTMETRICS_VERSION,
|
83 |
+
'installed_date' => time(),
|
84 |
+
'installed_pro' => exactmetrics_is_pro_version(),
|
85 |
+
);
|
86 |
+
} else {
|
87 |
+
$data = $activated;
|
88 |
+
}
|
89 |
+
// If already has a UA code mark as connected now.
|
90 |
+
if ( ! empty( $ua_code ) ) {
|
91 |
+
$data['connected_date'] = time();
|
92 |
+
}
|
93 |
+
|
94 |
+
update_option( 'exactmetrics_over_time', $data );
|
95 |
+
return;
|
96 |
+
}
|
97 |
+
|
98 |
+
// Only proceed with displaying if the user is tracking.
|
99 |
+
if ( empty( $ua_code ) ) {
|
100 |
+
return;
|
101 |
+
}
|
102 |
+
|
103 |
+
$feedback_url = add_query_arg( array(
|
104 |
+
'wpf192157_24' => untrailingslashit( home_url() ),
|
105 |
+
'wpf192157_26' => exactmetrics_get_license_key(),
|
106 |
+
'wpf192157_27' => exactmetrics_is_pro_version() ? 'pro' : 'lite',
|
107 |
+
'wpf192157_28' => EXACTMETRICS_VERSION,
|
108 |
+
), 'https://www.exactmetrics.com/plugin-feedback/' );
|
109 |
+
$feedback_url = exactmetrics_get_url( 'review-notice', 'feedback', $feedback_url );
|
110 |
+
// We have a candidate! Output a review message.
|
111 |
+
?>
|
112 |
+
<div class="notice notice-info is-dismissible exactmetrics-review-notice">
|
113 |
+
<div class="exactmetrics-review-step exactmetrics-review-step-1">
|
114 |
+
<p><?php esc_html_e( 'Are you enjoying ExactMetrics?', 'google-analytics-dashboard-for-wp' ); ?></p>
|
115 |
+
<p>
|
116 |
+
<a href="#" class="exactmetrics-review-switch-step" data-step="3"><?php esc_html_e( 'Yes', 'google-analytics-dashboard-for-wp' ); ?></a><br />
|
117 |
+
<a href="#" class="exactmetrics-review-switch-step" data-step="2"><?php esc_html_e( 'Not Really', 'google-analytics-dashboard-for-wp' ); ?></a>
|
118 |
+
</p>
|
119 |
+
</div>
|
120 |
+
<div class="exactmetrics-review-step exactmetrics-review-step-2" style="display: none">
|
121 |
+
<p><?php esc_html_e( 'We\'re sorry to hear you aren\'t enjoying ExactMetrics. We would love a chance to improve. Could you take a minute and let us know what we can do better?', 'google-analytics-dashboard-for-wp' ); ?></p>
|
122 |
+
<p>
|
123 |
+
<a href="<?php echo esc_url( $feedback_url ); ?>" class="exactmetrics-dismiss-review-notice exactmetrics-review-out"><?php esc_html_e( 'Give Feedback', 'google-analytics-dashboard-for-wp' ); ?></a><br>
|
124 |
+
<a href="#" class="exactmetrics-dismiss-review-notice" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'No thanks', 'google-analytics-dashboard-for-wp' ); ?></a>
|
125 |
+
</p>
|
126 |
+
</div>
|
127 |
+
<div class="exactmetrics-review-step exactmetrics-review-step-3" style="display: none">
|
128 |
+
<p><?php esc_html_e( 'That’s awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?', 'google-analytics-dashboard-for-wp' ); ?></p>
|
129 |
+
<p><strong><?php echo wp_kses( __( '~ Syed Balkhi<br>Co-Founder of ExactMetrics', 'google-analytics-dashboard-for-wp' ), array( 'br' => array() ) ); ?></strong></p>
|
130 |
+
<p>
|
131 |
+
<a href="https://wordpress.org/support/plugin/google-analytics-dashboard-for-wp/reviews/?filter=5#new-post" class="exactmetrics-dismiss-review-notice exactmetrics-review-out" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Ok, you deserve it', 'google-analytics-dashboard-for-wp' ); ?></a><br>
|
132 |
+
<a href="#" class="exactmetrics-dismiss-review-notice" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Nope, maybe later', 'google-analytics-dashboard-for-wp' ); ?></a><br>
|
133 |
+
<a href="#" class="exactmetrics-dismiss-review-notice" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'I already did', 'google-analytics-dashboard-for-wp' ); ?></a>
|
134 |
+
</p>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
<script type="text/javascript">
|
138 |
+
jQuery( document ).ready( function ( $ ) {
|
139 |
+
$( document ).on( 'click', '.exactmetrics-dismiss-review-notice, .exactmetrics-review-notice button', function ( event ) {
|
140 |
+
if ( ! $( this ).hasClass( 'exactmetrics-review-out' ) ) {
|
141 |
+
event.preventDefault();
|
142 |
+
}
|
143 |
+
$.post( ajaxurl, {
|
144 |
+
action: 'exactmetrics_review_dismiss'
|
145 |
+
} );
|
146 |
+
$( '.exactmetrics-review-notice' ).remove();
|
147 |
+
} );
|
148 |
+
|
149 |
+
$( document ).on( 'click', '.exactmetrics-review-switch-step', function ( e ) {
|
150 |
+
e.preventDefault();
|
151 |
+
var target = $( this ).attr( 'data-step' );
|
152 |
+
if ( target ) {
|
153 |
+
var notice = $( this ).closest( '.exactmetrics-review-notice' );
|
154 |
+
var review_step = notice.find( '.exactmetrics-review-step-' + target );
|
155 |
+
if ( review_step.length > 0 ) {
|
156 |
+
notice.find( '.exactmetrics-review-step:visible').fadeOut( function ( ) {
|
157 |
+
review_step.fadeIn();
|
158 |
+
});
|
159 |
+
}
|
160 |
+
}
|
161 |
+
})
|
162 |
+
} );
|
163 |
+
</script>
|
164 |
+
<?php
|
165 |
+
}
|
166 |
+
/**
|
167 |
+
* Dismiss the review admin notice
|
168 |
+
*
|
169 |
+
* @since 7.0.7
|
170 |
+
*/
|
171 |
+
public function review_dismiss() {
|
172 |
+
$review = get_option( 'exactmetrics_review', array() );
|
173 |
+
$review['time'] = time();
|
174 |
+
$review['dismissed'] = true;
|
175 |
+
update_option( 'exactmetrics_review', $review );
|
176 |
+
|
177 |
+
if ( is_super_admin() && is_multisite() ) {
|
178 |
+
$site_list = get_sites();
|
179 |
+
foreach ( (array) $site_list as $site ) {
|
180 |
+
switch_to_blog( $site->blog_id );
|
181 |
+
|
182 |
+
update_option( 'exactmetrics_review', $review );
|
183 |
+
|
184 |
+
restore_current_blog();
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
die;
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
+
new ExactMetrics_Review();
|
includes/admin/routes.php
ADDED
@@ -0,0 +1,746 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Routes for VUE are registered here.
|
4 |
+
*
|
5 |
+
* @package exactmetrics
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class ExactMetrics_Rest_Routes
|
10 |
+
*/
|
11 |
+
class ExactMetrics_Rest_Routes {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* ExactMetrics_Rest_Routes constructor.
|
15 |
+
*/
|
16 |
+
public function __construct() {
|
17 |
+
|
18 |
+
add_action( 'wp_ajax_exactmetrics_vue_get_license', array( $this, 'get_license' ) );
|
19 |
+
add_action( 'wp_ajax_exactmetrics_vue_get_profile', array( $this, 'get_profile' ) );
|
20 |
+
add_action( 'wp_ajax_exactmetrics_vue_get_settings', array( $this, 'get_settings' ) );
|
21 |
+
add_action( 'wp_ajax_exactmetrics_vue_update_settings', array( $this, 'update_settings' ) );
|
22 |
+
add_action( 'wp_ajax_exactmetrics_vue_get_addons', array( $this, 'get_addons' ) );
|
23 |
+
add_action( 'wp_ajax_exactmetrics_update_manual_ua', array( $this, 'update_manual_ua' ) );
|
24 |
+
add_action( 'wp_ajax_exactmetrics_vue_get_report_data', array( $this, 'get_report_data' ) );
|
25 |
+
add_action( 'wp_ajax_exactmetrics_vue_install_plugin', array( $this, 'install_plugin' ) );
|
26 |
+
add_action( 'wp_ajax_exactmetrics_vue_notice_status', array( $this, 'get_notice_status' ) );
|
27 |
+
add_action( 'wp_ajax_exactmetrics_vue_notice_dismiss', array( $this, 'dismiss_notice' ) );
|
28 |
+
|
29 |
+
add_action( 'wp_ajax_exactmetrics_handle_settings_import', array( $this, 'handle_settings_import' ) );
|
30 |
+
|
31 |
+
add_action( 'admin_notices', array( $this, 'hide_old_notices' ), 0 );
|
32 |
+
|
33 |
+
add_action( 'wp_ajax_exactmetrics_vue_dismiss_first_time_notice', array( $this, 'dismiss_first_time_notice' ) );
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Ajax handler for grabbing the license
|
38 |
+
*/
|
39 |
+
public function get_license() {
|
40 |
+
|
41 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
42 |
+
|
43 |
+
if ( ! current_user_can( 'exactmetrics_view_dashboard' ) || ! exactmetrics_is_pro_version() ) {
|
44 |
+
return;
|
45 |
+
}
|
46 |
+
|
47 |
+
$site_license = array(
|
48 |
+
'key' => ExactMetrics()->license->get_site_license_key(),
|
49 |
+
'type' => ExactMetrics()->license->get_site_license_type(),
|
50 |
+
'is_disabled' => ExactMetrics()->license->site_license_disabled(),
|
51 |
+
'is_expired' => ExactMetrics()->license->site_license_expired(),
|
52 |
+
'is_invalid' => ExactMetrics()->license->site_license_invalid(),
|
53 |
+
);
|
54 |
+
$network_license = array(
|
55 |
+
'key' => ExactMetrics()->license->get_network_license_key(),
|
56 |
+
'type' => ExactMetrics()->license->get_network_license_type(),
|
57 |
+
'is_disabled' => ExactMetrics()->license->network_license_disabled(),
|
58 |
+
'is_expired' => ExactMetrics()->license->network_license_expired(),
|
59 |
+
'is_invalid' => ExactMetrics()->license->network_license_disabled(),
|
60 |
+
);
|
61 |
+
|
62 |
+
wp_send_json( array(
|
63 |
+
'site' => $site_license,
|
64 |
+
'network' => $network_license,
|
65 |
+
) );
|
66 |
+
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Ajax handler for grabbing the current authenticated profile.
|
71 |
+
*/
|
72 |
+
public function get_profile() {
|
73 |
+
|
74 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
75 |
+
|
76 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
+
wp_send_json( array(
|
81 |
+
'ua' => ExactMetrics()->auth->get_ua(),
|
82 |
+
'viewname' => ExactMetrics()->auth->get_viewname(),
|
83 |
+
'manual_ua' => ExactMetrics()->auth->get_manual_ua(),
|
84 |
+
'network_ua' => ExactMetrics()->auth->get_network_ua(),
|
85 |
+
'network_viewname' => ExactMetrics()->auth->get_network_viewname(),
|
86 |
+
'network_manual_ua' => ExactMetrics()->auth->get_network_manual_ua(),
|
87 |
+
) );
|
88 |
+
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Ajax handler for grabbing the settings.
|
93 |
+
*/
|
94 |
+
public function get_settings() {
|
95 |
+
|
96 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
97 |
+
|
98 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
99 |
+
return;
|
100 |
+
}
|
101 |
+
|
102 |
+
$options = exactmetrics_get_options();
|
103 |
+
|
104 |
+
// Array fields are needed even if empty.
|
105 |
+
$array_fields = array( 'view_reports', 'save_settings', 'ignore_users' );
|
106 |
+
foreach ( $array_fields as $array_field ) {
|
107 |
+
if ( ! isset( $options[ $array_field ] ) ) {
|
108 |
+
$options[ $array_field ] = array();
|
109 |
+
}
|
110 |
+
}
|
111 |
+
if ( isset( $options['custom_code'] ) ) {
|
112 |
+
$options['custom_code'] = stripslashes( $options['custom_code'] );
|
113 |
+
}
|
114 |
+
|
115 |
+
wp_send_json( $options );
|
116 |
+
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Ajax handler for updating the settings.
|
121 |
+
*/
|
122 |
+
public function update_settings() {
|
123 |
+
|
124 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
125 |
+
|
126 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
127 |
+
return;
|
128 |
+
}
|
129 |
+
|
130 |
+
if ( isset( $_POST['setting'] ) ) {
|
131 |
+
$setting = sanitize_text_field( wp_unslash( $_POST['setting'] ) );
|
132 |
+
if ( isset( $_POST['value'] ) ) {
|
133 |
+
$value = $this->handle_sanitization( $setting, $_POST['value'] );
|
134 |
+
exactmetrics_update_option( $setting, $value );
|
135 |
+
} else {
|
136 |
+
exactmetrics_update_option( $setting, false );
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
wp_send_json_success();
|
141 |
+
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Sanitization specific to each field.
|
146 |
+
*
|
147 |
+
* @param string $field The key of the field to sanitize.
|
148 |
+
* @param string $value The value of the field to sanitize.
|
149 |
+
*
|
150 |
+
* @return mixed The sanitized input.
|
151 |
+
*/
|
152 |
+
private function handle_sanitization( $field, $value ) {
|
153 |
+
|
154 |
+
$value = wp_unslash( $value );
|
155 |
+
|
156 |
+
// Textarea fields.
|
157 |
+
$textarea_fields = array(
|
158 |
+
'custom_code',
|
159 |
+
);
|
160 |
+
|
161 |
+
if ( in_array( $field, $textarea_fields, true ) ) {
|
162 |
+
if ( function_exists( 'sanitize_textarea_field' ) ) {
|
163 |
+
return sanitize_textarea_field( $value );
|
164 |
+
} else {
|
165 |
+
return wp_kses( $value, array() );
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
$array_value = json_decode( $value, true );
|
170 |
+
if ( is_array( $array_value ) ) {
|
171 |
+
$value = $array_value;
|
172 |
+
// Don't save empty values.
|
173 |
+
foreach ( $value as $key => $item ) {
|
174 |
+
if ( is_array( $item ) ) {
|
175 |
+
$empty = true;
|
176 |
+
foreach ( $item as $item_value ) {
|
177 |
+
if ( ! empty( $item_value ) ) {
|
178 |
+
$empty = false;
|
179 |
+
}
|
180 |
+
}
|
181 |
+
if ( $empty ) {
|
182 |
+
unset( $value[ $key ] );
|
183 |
+
}
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
// Reset array keys because JavaScript can't handle arrays with non-sequential keys.
|
188 |
+
$value = array_values( $value );
|
189 |
+
|
190 |
+
return $value;
|
191 |
+
}
|
192 |
+
|
193 |
+
return sanitize_text_field( $value );
|
194 |
+
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* Return the state of the addons ( installed, activated )
|
199 |
+
*/
|
200 |
+
public function get_addons() {
|
201 |
+
|
202 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
203 |
+
|
204 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
205 |
+
return;
|
206 |
+
}
|
207 |
+
|
208 |
+
if ( isset( $_POST['network'] ) && intval( $_POST['network'] ) > 0 ) {
|
209 |
+
define( 'WP_NETWORK_ADMIN', true );
|
210 |
+
}
|
211 |
+
|
212 |
+
$addons_data = exactmetrics_get_addons();
|
213 |
+
$parsed_addons = array();
|
214 |
+
$installed_plugins = get_plugins();
|
215 |
+
|
216 |
+
if ( ! is_array( $addons_data ) ) {
|
217 |
+
$addons_data = array();
|
218 |
+
}
|
219 |
+
|
220 |
+
foreach ( $addons_data as $addons_type => $addons ) {
|
221 |
+
foreach ( $addons as $addon ) {
|
222 |
+
$slug = 'exactmetrics-' . $addon->slug;
|
223 |
+
if ( 'exactmetrics-ecommerce' === $slug ) {
|
224 |
+
$addon = $this->get_addon( $installed_plugins, $addons_type, $addon, $slug );
|
225 |
+
if ( empty( $addon->installed ) ) {
|
226 |
+
$slug = 'ga-ecommerce';
|
227 |
+
$addon = $this->get_addon( $installed_plugins, $addons_type, $addon, $slug );
|
228 |
+
}
|
229 |
+
} else {
|
230 |
+
$addon = $this->get_addon( $installed_plugins, $addons_type, $addon, $slug );
|
231 |
+
}
|
232 |
+
$parsed_addons[ $addon->slug ] = $addon;
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
// Include data about the plugins needed by some addons ( WooCommerce, EDD, Google AMP, CookieBot, etc ).
|
237 |
+
// WooCommerce.
|
238 |
+
$parsed_addons['woocommerce'] = array(
|
239 |
+
'active' => class_exists( 'WooCommerce' ),
|
240 |
+
);
|
241 |
+
// Edd.
|
242 |
+
$parsed_addons['easy_digital_downloads'] = array(
|
243 |
+
'active' => class_exists( 'Easy_Digital_Downloads' ),
|
244 |
+
);
|
245 |
+
// MemberPress.
|
246 |
+
$parsed_addons['memberpress'] = array(
|
247 |
+
'active' => defined( 'MEPR_VERSION' ) && version_compare( MEPR_VERSION, '1.3.43', '>' ),
|
248 |
+
);
|
249 |
+
// LifterLMS.
|
250 |
+
$parsed_addons['lifterlms'] = array(
|
251 |
+
'active' => function_exists( 'LLMS' ) && version_compare( LLMS()->version, '3.32.0', '>=' ),
|
252 |
+
);
|
253 |
+
// Cookiebot.
|
254 |
+
$parsed_addons['cookiebot'] = array(
|
255 |
+
'active' => function_exists( 'cookiebot_active' ) && cookiebot_active(),
|
256 |
+
);
|
257 |
+
// Cookie Notice.
|
258 |
+
$parsed_addons['cookie_notice'] = array(
|
259 |
+
'active' => class_exists( 'Cookie_Notice' ),
|
260 |
+
);
|
261 |
+
// Fb Instant Articles.
|
262 |
+
$parsed_addons['instant_articles'] = array(
|
263 |
+
'active' => defined( 'IA_PLUGIN_VERSION' ) && version_compare( IA_PLUGIN_VERSION, '3.3.4', '>' ),
|
264 |
+
);
|
265 |
+
// Google AMP.
|
266 |
+
$parsed_addons['google_amp'] = array(
|
267 |
+
'active' => defined( 'AMP__FILE__' ),
|
268 |
+
);
|
269 |
+
// WPForms.
|
270 |
+
$parsed_addons['wpforms-lite'] = array(
|
271 |
+
'active' => function_exists( 'wpforms' ),
|
272 |
+
'icon' => plugin_dir_url( EXACTMETRICS_PLUGIN_FILE ) . 'assets/images/plugin-wpforms.png',
|
273 |
+
'title' => 'WPForms',
|
274 |
+
'excerpt' => __( 'The most beginner friendly drag & drop WordPress forms plugin allowing you to create beautiful contact forms, subscription forms, payment forms, and more in minutes, not hours!', 'google-analytics-dashboard-for-wp' ),
|
275 |
+
'installed' => array_key_exists( 'wpforms-lite/wpforms.php', $installed_plugins ),
|
276 |
+
'basename' => 'wpforms-lite/wpforms.php',
|
277 |
+
'slug' => 'wpforms-lite',
|
278 |
+
);
|
279 |
+
// OptinMonster.
|
280 |
+
$parsed_addons['optinmonster'] = array(
|
281 |
+
'active' => class_exists( 'OMAPI' ),
|
282 |
+
'icon' => plugin_dir_url( EXACTMETRICS_PLUGIN_FILE ) . 'assets/images/plugin-om.png',
|
283 |
+
'title' => 'OptinMonster',
|
284 |
+
'excerpt' => __( 'Our high-converting optin forms like Exit-Intent® popups, Fullscreen Welcome Mats, and Scroll boxes help you dramatically boost conversions and get more email subscribers.', 'google-analytics-dashboard-for-wp' ),
|
285 |
+
'installed' => array_key_exists( 'optinmonster/optin-monster-wp-api.php', $installed_plugins ),
|
286 |
+
'basename' => 'optinmonster/optin-monster-wp-api.php',
|
287 |
+
'slug' => 'optinmonster',
|
288 |
+
);
|
289 |
+
// OptinMonster.
|
290 |
+
$parsed_addons['wp-mail-smtp'] = array(
|
291 |
+
'active' => function_exists( 'wp_mail_smtp' ),
|
292 |
+
'icon' => plugin_dir_url( EXACTMETRICS_PLUGIN_FILE ) . 'assets/images/plugin-smtp.png',
|
293 |
+
'title' => 'WP Mail SMTP',
|
294 |
+
'excerpt' => __( 'SMTP (Simple Mail Transfer Protocol) is an industry standard for sending emails. SMTP helps increase email deliverability by using proper authentication.', 'google-analytics-dashboard-for-wp' ),
|
295 |
+
'installed' => array_key_exists( 'wp-mail-smtp/wp_mail_smtp.php', $installed_plugins ),
|
296 |
+
'basename' => 'wp-mail-smtp/wp_mail_smtp.php',
|
297 |
+
'slug' => 'wp-mail-smtp',
|
298 |
+
);
|
299 |
+
// SeedProd.
|
300 |
+
$parsed_addons['coming-soon'] = array(
|
301 |
+
'active' => function_exists( 'seed_csp4_activation' ),
|
302 |
+
'icon' => plugin_dir_url( EXACTMETRICS_PLUGIN_FILE ) . 'assets/images/seedprod.png',
|
303 |
+
'title' => 'SeedProd',
|
304 |
+
'excerpt' => __( 'Better Coming Soon & Maintenance Mode Pages', 'google-analytics-dashboard-for-wp' ),
|
305 |
+
'installed' => array_key_exists( 'coming-soon/coming-soon.php', $installed_plugins ),
|
306 |
+
'basename' => 'coming-soon/coming-soon.php',
|
307 |
+
'slug' => 'coming-soon',
|
308 |
+
);
|
309 |
+
$parsed_addons['rafflepress'] = array(
|
310 |
+
'active' => function_exists( 'rafflepress_lite_activation' ),
|
311 |
+
'icon' => plugin_dir_url( EXACTMETRICS_PLUGIN_FILE ) . 'assets/images/rafflepress.png',
|
312 |
+
'title' => 'RafflePress',
|
313 |
+
'excerpt' => __( 'Get More Traffic with Viral Giveaways', 'google-analytics-dashboard-for-wp' ),
|
314 |
+
'installed' => array_key_exists( 'rafflepress/rafflepress.php', $installed_plugins ),
|
315 |
+
'basename' => 'rafflepress/rafflepress.php',
|
316 |
+
'slug' => 'rafflepress',
|
317 |
+
);
|
318 |
+
$parsed_addons['trustpulse-api'] = array(
|
319 |
+
'active' => class_exists( 'TPAPI' ),
|
320 |
+
'icon' => plugin_dir_url( EXACTMETRICS_PLUGIN_FILE ) . 'assets/images/trustpulse.png',
|
321 |
+
'title' => 'TrustPulse',
|
322 |
+
'excerpt' => __( 'Social Proof Notifications that Boost Sales', 'google-analytics-dashboard-for-wp' ),
|
323 |
+
'installed' => array_key_exists( 'trustpulse-api/trustpulse.php', $installed_plugins ),
|
324 |
+
'basename' => 'trustpulse-api/trustpulse.php',
|
325 |
+
'slug' => 'trustpulse-api',
|
326 |
+
);
|
327 |
+
// Gravity Forms.
|
328 |
+
$parsed_addons['gravity_forms'] = array(
|
329 |
+
'active' => class_exists( 'GFCommon' ),
|
330 |
+
);
|
331 |
+
// Formidable Forms.
|
332 |
+
$parsed_addons['formidable_forms'] = array(
|
333 |
+
'active' => class_exists( 'FrmHooksController' ),
|
334 |
+
);
|
335 |
+
// Manual UA Addon.
|
336 |
+
if ( ! isset( $parsed_addons['manual_ua'] ) ) {
|
337 |
+
$parsed_addons['manual_ua'] = array(
|
338 |
+
'active' => class_exists( 'ExactMetrics_Manual_UA' ),
|
339 |
+
);
|
340 |
+
}
|
341 |
+
|
342 |
+
wp_send_json( $parsed_addons );
|
343 |
+
}
|
344 |
+
|
345 |
+
public function get_addon( $installed_plugins, $addons_type, $addon, $slug ) {
|
346 |
+
$active = false;
|
347 |
+
$installed = false;
|
348 |
+
$plugin_basename = exactmetrics_get_plugin_basename_from_slug( $slug );
|
349 |
+
|
350 |
+
if ( isset( $installed_plugins[ $plugin_basename ] ) ) {
|
351 |
+
$installed = true;
|
352 |
+
|
353 |
+
if ( is_multisite() && is_network_admin() ) {
|
354 |
+
$active = is_plugin_active_for_network( $plugin_basename );
|
355 |
+
} else {
|
356 |
+
$active = is_plugin_active( $plugin_basename );
|
357 |
+
}
|
358 |
+
}
|
359 |
+
if ( empty( $addon->url ) ) {
|
360 |
+
$addon->url = '';
|
361 |
+
}
|
362 |
+
|
363 |
+
$addon->type = $addons_type;
|
364 |
+
$addon->installed = $installed;
|
365 |
+
$addon->active = $active;
|
366 |
+
$addon->basename = $plugin_basename;
|
367 |
+
|
368 |
+
return $addon;
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* Use custom notices in the Vue app on the Settings screen.
|
373 |
+
*/
|
374 |
+
public function hide_old_notices() {
|
375 |
+
|
376 |
+
global $wp_version;
|
377 |
+
if ( version_compare( $wp_version, '4.6', '<' ) ) {
|
378 |
+
// remove_all_actions triggers an infinite loop on older versions.
|
379 |
+
return;
|
380 |
+
}
|
381 |
+
|
382 |
+
$screen = get_current_screen();
|
383 |
+
// Bail if we're not on a ExactMetrics screen.
|
384 |
+
if ( empty( $screen->id ) || strpos( $screen->id, 'exactmetrics' ) === false ) {
|
385 |
+
return;
|
386 |
+
}
|
387 |
+
|
388 |
+
// Hide admin notices on the settings screen.
|
389 |
+
if ( exactmetrics_is_settings_page() ) {
|
390 |
+
remove_all_actions( 'admin_notices' );
|
391 |
+
}
|
392 |
+
|
393 |
+
}
|
394 |
+
|
395 |
+
/**
|
396 |
+
* Update manual ua.
|
397 |
+
*/
|
398 |
+
public function update_manual_ua() {
|
399 |
+
|
400 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
401 |
+
|
402 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
403 |
+
return;
|
404 |
+
}
|
405 |
+
|
406 |
+
$manual_ua_code = isset( $_POST['manual_ua_code'] ) ? sanitize_text_field( wp_unslash( $_POST['manual_ua_code'] ) ) : '';
|
407 |
+
$manual_ua_code = exactmetrics_is_valid_ua( $manual_ua_code ); // Also sanitizes the string.
|
408 |
+
if ( ! empty( $_REQUEST['isnetwork'] ) && sanitize_text_field( wp_unslash( $_REQUEST['isnetwork'] ) ) ) {
|
409 |
+
define( 'WP_NETWORK_ADMIN', true );
|
410 |
+
}
|
411 |
+
$manual_ua_code_old = is_network_admin() ? ExactMetrics()->auth->get_network_manual_ua() : ExactMetrics()->auth->get_manual_ua();
|
412 |
+
|
413 |
+
if ( $manual_ua_code && $manual_ua_code_old && $manual_ua_code_old === $manual_ua_code ) {
|
414 |
+
// Same code we had before
|
415 |
+
// Do nothing.
|
416 |
+
wp_send_json_success();
|
417 |
+
} else if ( $manual_ua_code && $manual_ua_code_old && $manual_ua_code_old !== $manual_ua_code ) {
|
418 |
+
// Different UA code.
|
419 |
+
if ( is_network_admin() ) {
|
420 |
+
ExactMetrics()->auth->set_network_manual_ua( $manual_ua_code );
|
421 |
+
} else {
|
422 |
+
ExactMetrics()->auth->set_manual_ua( $manual_ua_code );
|
423 |
+
}
|
424 |
+
} else if ( $manual_ua_code && empty( $manual_ua_code_old ) ) {
|
425 |
+
// Move to manual.
|
426 |
+
if ( is_network_admin() ) {
|
427 |
+
ExactMetrics()->auth->set_network_manual_ua( $manual_ua_code );
|
428 |
+
} else {
|
429 |
+
ExactMetrics()->auth->set_manual_ua( $manual_ua_code );
|
430 |
+
}
|
431 |
+
} else if ( empty( $manual_ua_code ) && $manual_ua_code_old ) {
|
432 |
+
// Deleted manual.
|
433 |
+
if ( is_network_admin() ) {
|
434 |
+
ExactMetrics()->auth->delete_network_manual_ua();
|
435 |
+
} else {
|
436 |
+
ExactMetrics()->auth->delete_manual_ua();
|
437 |
+
}
|
438 |
+
} else if ( isset( $_POST['manual_ua_code'] ) && empty( $manual_ua_code ) ) {
|
439 |
+
wp_send_json_error( array(
|
440 |
+
'error' => __( 'Invalid UA code', 'google-analytics-dashboard-for-wp' ),
|
441 |
+
) );
|
442 |
+
}
|
443 |
+
|
444 |
+
wp_send_json_success();
|
445 |
+
}
|
446 |
+
|
447 |
+
/**
|
448 |
+
*
|
449 |
+
*/
|
450 |
+
public function handle_settings_import() {
|
451 |
+
|
452 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
453 |
+
|
454 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
455 |
+
return;
|
456 |
+
}
|
457 |
+
|
458 |
+
if ( ! isset( $_FILES['import_file'] ) ) {
|
459 |
+
return;
|
460 |
+
}
|
461 |
+
|
462 |
+
$extension = explode( '.', sanitize_text_field( wp_unslash( $_FILES['import_file']['name'] ) ) );
|
463 |
+
$extension = end( $extension );
|
464 |
+
|
465 |
+
if ( 'json' !== $extension ) {
|
466 |
+
wp_send_json_error( array(
|
467 |
+
'message' => esc_html__( 'Please upload a valid .json file', 'google-analytics-dashboard-for-wp' ),
|
468 |
+
) );
|
469 |
+
}
|
470 |
+
|
471 |
+
$import_file = sanitize_text_field( wp_unslash( $_FILES['import_file']['tmp_name'] ) );
|
472 |
+
|
473 |
+
$file = file_get_contents( $import_file );
|
474 |
+
if ( empty( $file ) ) {
|
475 |
+
wp_send_json_error( array(
|
476 |
+
'message' => esc_html__( 'Please upload a file to import', 'google-analytics-dashboard-for-wp' ),
|
477 |
+
) );
|
478 |
+
}
|
479 |
+
|
480 |
+
// Retrieve the settings from the file and convert the json object to an array.
|
481 |
+
$new_settings = json_decode( wp_json_encode( json_decode( $file ) ), true );
|
482 |
+
$settings = exactmetrics_get_options();
|
483 |
+
$exclude = array(
|
484 |
+
'analytics_profile',
|
485 |
+
'analytics_profile_code',
|
486 |
+
'analytics_profile_name',
|
487 |
+
'oauth_version',
|
488 |
+
'cron_last_run',
|
489 |
+
'exactmetrics_oauth_status',
|
490 |
+
);
|
491 |
+
|
492 |
+
foreach ( $exclude as $e ) {
|
493 |
+
if ( ! empty( $new_settings[ $e ] ) ) {
|
494 |
+
unset( $new_settings[ $e ] );
|
495 |
+
}
|
496 |
+
}
|
497 |
+
|
498 |
+
if ( ! is_super_admin() ) {
|
499 |
+
if ( ! empty( $new_settings['custom_code'] ) ) {
|
500 |
+
unset( $new_settings['custom_code'] );
|
501 |
+
}
|
502 |
+
}
|
503 |
+
|
504 |
+
foreach ( $exclude as $e ) {
|
505 |
+
if ( ! empty( $settings[ $e ] ) ) {
|
506 |
+
$new_settings = $settings[ $e ];
|
507 |
+
}
|
508 |
+
}
|
509 |
+
|
510 |
+
global $exactmetrics_settings;
|
511 |
+
$exactmetrics_settings = $new_settings;
|
512 |
+
|
513 |
+
update_option( exactmetrics_get_option_name(), $new_settings );
|
514 |
+
|
515 |
+
wp_send_json_success( $new_settings );
|
516 |
+
|
517 |
+
}
|
518 |
+
|
519 |
+
/**
|
520 |
+
* Generic Ajax handler for grabbing report data in JSON.
|
521 |
+
*/
|
522 |
+
public function get_report_data() {
|
523 |
+
|
524 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
525 |
+
|
526 |
+
if ( ! current_user_can( 'exactmetrics_view_dashboard' ) ) {
|
527 |
+
wp_send_json_error( array( 'message' => __( "You don't have permission to view ExactMetrics reports.", 'google-analytics-dashboard-for-wp' ) ) );
|
528 |
+
}
|
529 |
+
|
530 |
+
if ( ! empty( $_REQUEST['isnetwork'] ) && $_REQUEST['isnetwork'] ) {
|
531 |
+
define( 'WP_NETWORK_ADMIN', true );
|
532 |
+
}
|
533 |
+
$settings_page = admin_url( 'admin.php?page=exactmetrics_settings' );
|
534 |
+
|
535 |
+
// Only for Pro users, require a license key to be entered first so we can link to things.
|
536 |
+
if ( exactmetrics_is_pro_version() ) {
|
537 |
+
if ( ! ExactMetrics()->license->is_site_licensed() && ! ExactMetrics()->license->is_network_licensed() ) {
|
538 |
+
wp_send_json_error( array(
|
539 |
+
'message' => __( "You can't view ExactMetrics reports because you are not licensed.", 'google-analytics-dashboard-for-wp' ),
|
540 |
+
'footer' => '<a href="' . $settings_page . '">' . __( 'Add your license', 'google-analytics-dashboard-for-wp' ) . '</a>',
|
541 |
+
) );
|
542 |
+
} else if ( ExactMetrics()->license->is_site_licensed() && ! ExactMetrics()->license->site_license_has_error() ) {
|
543 |
+
// Good to go: site licensed.
|
544 |
+
} else if ( ExactMetrics()->license->is_network_licensed() && ! ExactMetrics()->license->network_license_has_error() ) {
|
545 |
+
// Good to go: network licensed.
|
546 |
+
} else {
|
547 |
+
wp_send_json_error( array( 'message' => __( "You can't view ExactMetrics reports due to license key errors.", 'google-analytics-dashboard-for-wp' ) ) );
|
548 |
+
}
|
549 |
+
}
|
550 |
+
|
551 |
+
// We do not have a current auth.
|
552 |
+
$site_auth = ExactMetrics()->auth->get_viewname();
|
553 |
+
$ms_auth = is_multisite() && ExactMetrics()->auth->get_network_viewname();
|
554 |
+
if ( ! $site_auth && ! $ms_auth ) {
|
555 |
+
wp_send_json_error( array( 'message' => __( 'You must authenticate with ExactMetrics before you can view reports.', 'google-analytics-dashboard-for-wp' ) ) );
|
556 |
+
}
|
557 |
+
|
558 |
+
$report_name = isset( $_POST['report'] ) ? sanitize_text_field( wp_unslash( $_POST['report'] ) ) : '';
|
559 |
+
|
560 |
+
if ( empty( $report_name ) ) {
|
561 |
+
wp_send_json_error( array( 'message' => __( 'Unknown report. Try refreshing and retrying. Contact support if this issue persists.', 'google-analytics-dashboard-for-wp' ) ) );
|
562 |
+
}
|
563 |
+
|
564 |
+
$report = ExactMetrics()->reporting->get_report( $report_name );
|
565 |
+
|
566 |
+
$isnetwork = ! empty( $_REQUEST['isnetwork'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['isnetwork'] ) ) : '';
|
567 |
+
$start = ! empty( $_POST['start'] ) ? sanitize_text_field( wp_unslash( $_POST['start'] ) ) : $report->default_start_date();
|
568 |
+
$end = ! empty( $_POST['end'] ) ? sanitize_text_field( wp_unslash( $_POST['end'] ) ) : $report->default_end_date();
|
569 |
+
|
570 |
+
$args = array(
|
571 |
+
'start' => $start,
|
572 |
+
'end' => $end,
|
573 |
+
);
|
574 |
+
|
575 |
+
if ( $isnetwork ) {
|
576 |
+
$args['network'] = true;
|
577 |
+
}
|
578 |
+
|
579 |
+
if ( exactmetrics_is_pro_version() && ! ExactMetrics()->license->license_can( $report->level ) ) {
|
580 |
+
$data = array(
|
581 |
+
'success' => false,
|
582 |
+
'error' => 'license_level',
|
583 |
+
);
|
584 |
+
} else {
|
585 |
+
$data = apply_filters( 'exactmetrics_vue_reports_data', $report->get_data( $args ), $report_name, $report );
|
586 |
+
}
|
587 |
+
|
588 |
+
if ( ! empty( $data['success'] ) && ! empty( $data['data'] ) ) {
|
589 |
+
wp_send_json_success( $data['data'] );
|
590 |
+
} else if ( isset( $data['success'] ) && false === $data['success'] && ! empty( $data['error'] ) ) {
|
591 |
+
// Use a custom handler for invalid_grant errors.
|
592 |
+
if ( strpos( $data['error'], 'invalid_grant' ) > 0 ) {
|
593 |
+
wp_send_json_error(
|
594 |
+
array(
|
595 |
+
'message' => 'invalid_grant',
|
596 |
+
'footer' => '',
|
597 |
+
)
|
598 |
+
);
|
599 |
+
}
|
600 |
+
|
601 |
+
wp_send_json_error(
|
602 |
+
array(
|
603 |
+
'message' => $data['error'],
|
604 |
+
'footer' => isset( $data['data']['footer'] ) ? $data['data']['footer'] : '',
|
605 |
+
)
|
606 |
+
);
|
607 |
+
}
|
608 |
+
|
609 |
+
wp_send_json_error( array( 'message' => __( 'We encountered an error when fetching the report data.', 'google-analytics-dashboard-for-wp' ) ) );
|
610 |
+
|
611 |
+
}
|
612 |
+
|
613 |
+
/**
|
614 |
+
* Install plugins which are not addons.
|
615 |
+
*/
|
616 |
+
public function install_plugin() {
|
617 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
618 |
+
|
619 |
+
if ( ! current_user_can( 'install_plugins' ) ) {
|
620 |
+
wp_send_json( array(
|
621 |
+
'message' => esc_html__( 'You are not allowed to install plugins', 'exactmetrics-premium' ),
|
622 |
+
) );
|
623 |
+
}
|
624 |
+
|
625 |
+
$slug = isset( $_POST['slug'] ) ? sanitize_text_field( wp_unslash( $_POST['slug'] ) ) : false;
|
626 |
+
|
627 |
+
if ( ! $slug ) {
|
628 |
+
wp_send_json( array(
|
629 |
+
'message' => esc_html__( 'Missing plugin name.', 'exactmetrics-premium' ),
|
630 |
+
) );
|
631 |
+
}
|
632 |
+
|
633 |
+
include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
634 |
+
|
635 |
+
$api = plugins_api( 'plugin_information', array(
|
636 |
+
'slug' => $slug,
|
637 |
+
'fields' => array(
|
638 |
+
'short_description' => false,
|
639 |
+
'sections' => false,
|
640 |
+
'requires' => false,
|
641 |
+
'rating' => false,
|
642 |
+
'ratings' => false,
|
643 |
+
'downloaded' => false,
|
644 |
+
'last_updated' => false,
|
645 |
+
'added' => false,
|
646 |
+
'tags' => false,
|
647 |
+
'compatibility' => false,
|
648 |
+
'homepage' => false,
|
649 |
+
'donate_link' => false,
|
650 |
+
),
|
651 |
+
) );
|
652 |
+
|
653 |
+
if ( is_wp_error( $api ) ) {
|
654 |
+
return $api->get_error_message();
|
655 |
+
}
|
656 |
+
|
657 |
+
$download_url = $api->download_link;
|
658 |
+
|
659 |
+
$method = '';
|
660 |
+
$url = add_query_arg(
|
661 |
+
array(
|
662 |
+
'page' => 'exactmetrics-settings',
|
663 |
+
),
|
664 |
+
admin_url( 'admin.php' )
|
665 |
+
);
|
666 |
+
$url = esc_url( $url );
|
667 |
+
|
668 |
+
ob_start();
|
669 |
+
if ( false === ( $creds = request_filesystem_credentials( $url, $method, false, false, null ) ) ) {
|
670 |
+
$form = ob_get_clean();
|
671 |
+
|
672 |
+
wp_send_json( array( 'form' => $form ) );
|
673 |
+
}
|
674 |
+
|
675 |
+
// If we are not authenticated, make it happen now.
|
676 |
+
if ( ! WP_Filesystem( $creds ) ) {
|
677 |
+
ob_start();
|
678 |
+
request_filesystem_credentials( $url, $method, true, false, null );
|
679 |
+
$form = ob_get_clean();
|
680 |
+
|
681 |
+
wp_send_json( array( 'form' => $form ) );
|
682 |
+
|
683 |
+
}
|
684 |
+
|
685 |
+
// We do not need any extra credentials if we have gotten this far, so let's install the plugin.
|
686 |
+
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
687 |
+
$base = ExactMetrics();
|
688 |
+
require_once plugin_dir_path( $base->file ) . '/includes/admin/licensing/skin.php';
|
689 |
+
|
690 |
+
// Prevent languange upgrade in ajax calls.
|
691 |
+
remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
|
692 |
+
// Create the plugin upgrader with our custom skin.
|
693 |
+
$installer = new Plugin_Upgrader( new ExactMetrics_Skin() );
|
694 |
+
$installer->install( $download_url );
|
695 |
+
|
696 |
+
// Flush the cache and return the newly installed plugin basename.
|
697 |
+
wp_cache_flush();
|
698 |
+
wp_send_json_success();
|
699 |
+
|
700 |
+
wp_die();
|
701 |
+
}
|
702 |
+
|
703 |
+
/**
|
704 |
+
* Store that the first run notice has been dismissed so it doesn't show up again.
|
705 |
+
*/
|
706 |
+
public function dismiss_first_time_notice() {
|
707 |
+
|
708 |
+
exactmetrics_update_option( 'exactmetrics_first_run_notice', true );
|
709 |
+
|
710 |
+
wp_send_json_success();
|
711 |
+
}
|
712 |
+
|
713 |
+
/**
|
714 |
+
* Get the notice status by id.
|
715 |
+
*/
|
716 |
+
public function get_notice_status() {
|
717 |
+
|
718 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
719 |
+
|
720 |
+
$notice_id = empty( $_POST['notice'] ) ? false : sanitize_text_field( wp_unslash( $_POST['notice'] ) );
|
721 |
+
if ( ! $notice_id ) {
|
722 |
+
wp_send_json_error();
|
723 |
+
}
|
724 |
+
$is_dismissed = ExactMetrics()->notices->is_dismissed( $notice_id );
|
725 |
+
|
726 |
+
wp_send_json_success( array(
|
727 |
+
'dismissed' => $is_dismissed,
|
728 |
+
) );
|
729 |
+
}
|
730 |
+
|
731 |
+
/**
|
732 |
+
* Dismiss notices by id.
|
733 |
+
*/
|
734 |
+
public function dismiss_notice() {
|
735 |
+
|
736 |
+
check_ajax_referer( 'mi-admin-nonce', 'nonce' );
|
737 |
+
|
738 |
+
$notice_id = empty( $_POST['notice'] ) ? false : sanitize_text_field( wp_unslash( $_POST['notice'] ) );
|
739 |
+
if ( ! $notice_id ) {
|
740 |
+
wp_send_json_error();
|
741 |
+
}
|
742 |
+
ExactMetrics()->notices->dismiss( $notice_id );
|
743 |
+
|
744 |
+
wp_send_json_success();
|
745 |
+
}
|
746 |
+
}
|
includes/admin/tracking.php
ADDED
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tracking functions for reporting plugin usage to the ExactMetrics site for users that have opted in
|
4 |
+
*
|
5 |
+
* @package ExactMetrics
|
6 |
+
* @subpackage Admin
|
7 |
+
* @copyright Copyright (c) 2018, Chris Christoff
|
8 |
+
* @since 7.0.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Usage tracking
|
18 |
+
*
|
19 |
+
* @access public
|
20 |
+
* @since 7.0.0
|
21 |
+
* @return void
|
22 |
+
*/
|
23 |
+
class ExactMetrics_Tracking {
|
24 |
+
|
25 |
+
public function __construct() {
|
26 |
+
add_action( 'init', array( $this, 'schedule_send' ) );
|
27 |
+
add_action( 'exactmetrics_settings_save_general_end', array( $this, 'check_for_settings_optin' ) );
|
28 |
+
add_action( 'admin_head', array( $this, 'check_for_optin' ) );
|
29 |
+
add_action( 'admin_head', array( $this, 'check_for_optout' ) );
|
30 |
+
add_filter( 'cron_schedules', array( $this, 'add_schedules' ) );
|
31 |
+
add_action( 'exactmetrics_usage_tracking_cron', array( $this, 'send_checkin' ) );
|
32 |
+
}
|
33 |
+
|
34 |
+
private function get_data() {
|
35 |
+
$data = array();
|
36 |
+
|
37 |
+
// Retrieve current theme info
|
38 |
+
$theme_data = wp_get_theme();
|
39 |
+
$tracking_mode = exactmetrics_get_option( 'tracking_mode', 'analytics' );
|
40 |
+
$events_mode = exactmetrics_get_option( 'events_mode', 'none' );
|
41 |
+
$update_mode = exactmetrics_get_option( 'automatic_updates', false );
|
42 |
+
|
43 |
+
if ( $tracking_mode === false ) {
|
44 |
+
$tracking_mode = 'analytics';
|
45 |
+
}
|
46 |
+
if ( $events_mode === false ) {
|
47 |
+
$events_mode = 'none';
|
48 |
+
}
|
49 |
+
|
50 |
+
if ( $update_mode === false ) {
|
51 |
+
$update_mode = 'none';
|
52 |
+
}
|
53 |
+
|
54 |
+
$count_b = 1;
|
55 |
+
if ( is_multisite() ) {
|
56 |
+
if ( function_exists( 'get_blog_count' ) ) {
|
57 |
+
$count_b = get_blog_count();
|
58 |
+
} else {
|
59 |
+
$count_b = 'Not Set';
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
$usesauth = 'No';
|
64 |
+
$local = ExactMetrics()->auth->is_authed();
|
65 |
+
$network = ExactMetrics()->auth->is_network_authed();
|
66 |
+
|
67 |
+
if ( $local && $network ) {
|
68 |
+
$usesauth = 'Both';
|
69 |
+
} else if ( $local ) {
|
70 |
+
$usesauth = 'Local';
|
71 |
+
} else if ( $network ) {
|
72 |
+
$usesauth = 'Network';
|
73 |
+
}
|
74 |
+
|
75 |
+
$data['php_version'] = phpversion();
|
76 |
+
$data['mi_version'] = EXACTMETRICS_VERSION;
|
77 |
+
$data['wp_version'] = get_bloginfo( 'version' );
|
78 |
+
$data['server'] = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : '';
|
79 |
+
$data['over_time'] = get_option( 'exactmetrics_over_time', array() );
|
80 |
+
$data['multisite'] = is_multisite();
|
81 |
+
$data['url'] = home_url();
|
82 |
+
$data['themename'] = $theme_data->Name;
|
83 |
+
$data['themeversion'] = $theme_data->Version;
|
84 |
+
$data['email'] = get_bloginfo( 'admin_email' );
|
85 |
+
$data['key'] = exactmetrics_get_license_key();
|
86 |
+
$data['sas'] = exactmetrics_get_shareasale_id();
|
87 |
+
$data['settings'] = exactmetrics_get_options();
|
88 |
+
$data['tracking_mode'] = $tracking_mode;
|
89 |
+
$data['events_mode'] = $events_mode;
|
90 |
+
$data['autoupdate'] = $update_mode;
|
91 |
+
$data['pro'] = (int) exactmetrics_is_pro_version();
|
92 |
+
$data['sites'] = $count_b;
|
93 |
+
$data['usagetracking'] = get_option( 'exactmetrics_usage_tracking_config', false );
|
94 |
+
$data['usercount'] = function_exists( 'get_user_count' ) ? get_user_count() : 'Not Set';
|
95 |
+
$data['usesauth'] = $usesauth;
|
96 |
+
$data['timezoneoffset']= date('P');
|
97 |
+
$data['installed_lite']= get_option( 'exactmetrics_installed_lite', array() );
|
98 |
+
$data['installed_pro'] = get_option( 'exactmetrics_installed_pro', array() );
|
99 |
+
|
100 |
+
|
101 |
+
|
102 |
+
// Retrieve current plugin information
|
103 |
+
if( ! function_exists( 'get_plugins' ) ) {
|
104 |
+
include ABSPATH . '/wp-admin/includes/plugin.php';
|
105 |
+
}
|
106 |
+
|
107 |
+
$plugins = array_keys( get_plugins() );
|
108 |
+
$active_plugins = get_option( 'active_plugins', array() );
|
109 |
+
|
110 |
+
foreach ( $plugins as $key => $plugin ) {
|
111 |
+
if ( in_array( $plugin, $active_plugins ) ) {
|
112 |
+
// Remove active plugins from list so we can show active and inactive separately
|
113 |
+
unset( $plugins[ $key ] );
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
$data['active_plugins'] = $active_plugins;
|
118 |
+
$data['inactive_plugins'] = $plugins;
|
119 |
+
$data['locale'] = get_locale();
|
120 |
+
|
121 |
+
return $data;
|
122 |
+
}
|
123 |
+
|
124 |
+
public function send_checkin( $override = false, $ignore_last_checkin = false ) {
|
125 |
+
|
126 |
+
$home_url = trailingslashit( home_url() );
|
127 |
+
if ( strpos( $home_url, 'exactmetrics.com' ) !== false ) {
|
128 |
+
return false;
|
129 |
+
}
|
130 |
+
|
131 |
+
if( ! $this->tracking_allowed() && ! $override ) {
|
132 |
+
return false;
|
133 |
+
}
|
134 |
+
|
135 |
+
// Send a maximum of once per week
|
136 |
+
$last_send = get_option( 'exactmetrics_usage_tracking_last_checkin' );
|
137 |
+
if ( is_numeric( $last_send ) && $last_send > strtotime( '-1 week' ) && ! $ignore_last_checkin ) {
|
138 |
+
return false;
|
139 |
+
}
|
140 |
+
|
141 |
+
$request = wp_remote_post( 'https://miusage.com/v1/em-checkin/', array(
|
142 |
+
'method' => 'POST',
|
143 |
+
'timeout' => 5,
|
144 |
+
'redirection' => 5,
|
145 |
+
'httpversion' => '1.1',
|
146 |
+
'blocking' => false,
|
147 |
+
'body' => $this->get_data(),
|
148 |
+
'user-agent' => 'MI/' . EXACTMETRICS_VERSION . '; ' . get_bloginfo( 'url' )
|
149 |
+
) );
|
150 |
+
|
151 |
+
// If we have completed successfully, recheck in 1 week
|
152 |
+
update_option( 'exactmetrics_usage_tracking_last_checkin', time() );
|
153 |
+
return true;
|
154 |
+
}
|
155 |
+
|
156 |
+
private function tracking_allowed() {
|
157 |
+
return (bool) exactmetrics_get_option( 'anonymous_data', false ) || exactmetrics_is_pro_version();
|
158 |
+
}
|
159 |
+
|
160 |
+
public function schedule_send() {
|
161 |
+
if ( ! wp_next_scheduled( 'exactmetrics_usage_tracking_cron' ) ) {
|
162 |
+
$tracking = array();
|
163 |
+
$tracking['day'] = rand( 0, 6 );
|
164 |
+
$tracking['hour'] = rand( 0, 23 );
|
165 |
+
$tracking['minute'] = rand( 0, 59 );
|
166 |
+
$tracking['second'] = rand( 0, 59 );
|
167 |
+
$tracking['offset'] = ( $tracking['day'] * DAY_IN_SECONDS ) +
|
168 |
+
( $tracking['hour'] * HOUR_IN_SECONDS ) +
|
169 |
+
( $tracking['minute'] * MINUTE_IN_SECONDS ) +
|
170 |
+
$tracking['second'];
|
171 |
+
$tracking['initsend'] = strtotime("next sunday") + $tracking['offset'];
|
172 |
+
|
173 |
+
wp_schedule_event( $tracking['initsend'], 'weekly', 'exactmetrics_usage_tracking_cron' );
|
174 |
+
update_option( 'exactmetrics_usage_tracking_config', $tracking );
|
175 |
+
}
|
176 |
+
}
|
177 |
+
|
178 |
+
public function check_for_settings_optin() {
|
179 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
180 |
+
return;
|
181 |
+
}
|
182 |
+
|
183 |
+
if ( exactmetrics_is_pro_version() ) {
|
184 |
+
return;
|
185 |
+
}
|
186 |
+
|
187 |
+
// Send an intial check in on settings save
|
188 |
+
$anonymous_data = isset( $_POST['anonymous_data'] ) ? 1 : 0;
|
189 |
+
if ( $anonymous_data ) {
|
190 |
+
$this->send_checkin( true, true );
|
191 |
+
}
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
+
public function check_for_optin() {
|
196 |
+
if ( ! ( ! empty( $_REQUEST['mi_action'] ) && 'opt_into_tracking' === $_REQUEST['mi_action'] ) ) {
|
197 |
+
return;
|
198 |
+
}
|
199 |
+
|
200 |
+
if ( exactmetrics_get_option( 'anonymous_data', false ) ) {
|
201 |
+
return;
|
202 |
+
}
|
203 |
+
|
204 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
205 |
+
return;
|
206 |
+
}
|
207 |
+
|
208 |
+
if ( exactmetrics_is_pro_version() ) {
|
209 |
+
return;
|
210 |
+
}
|
211 |
+
|
212 |
+
exactmetrics_update_option( 'anonymous_data', 1 );
|
213 |
+
$this->send_checkin( true, true );
|
214 |
+
update_option( 'exactmetrics_tracking_notice', 1 );
|
215 |
+
}
|
216 |
+
|
217 |
+
public function check_for_optout() {
|
218 |
+
if ( ! ( ! empty( $_REQUEST['mi_action'] ) && 'opt_out_of_tracking' === $_REQUEST['mi_action'] ) ) {
|
219 |
+
return;
|
220 |
+
}
|
221 |
+
|
222 |
+
if ( exactmetrics_get_option( 'anonymous_data', false ) ) {
|
223 |
+
return;
|
224 |
+
}
|
225 |
+
|
226 |
+
if ( ! current_user_can( 'exactmetrics_save_settings' ) ) {
|
227 |
+
return;
|
228 |
+
}
|
229 |
+
|
230 |
+
if ( exactmetrics_is_pro_version() ) {
|
231 |
+
return;
|
232 |
+
}
|
233 |
+
|
234 |
+
exactmetrics_update_option( 'anonymous_data', 0 );
|
235 |
+
update_option( 'exactmetrics_tracking_notice', 1 );
|
236 |
+
}
|
237 |
+
|
238 |
+
public function add_schedules( $schedules = array() ) {
|
239 |
+
// Adds once weekly to the existing schedules.
|
240 |
+
$schedules['weekly'] = array(
|
241 |
+
'interval' => 604800,
|
242 |
+
'display' => __( 'Once Weekly', 'google-analytics-dashboard-for-wp' )
|
243 |
+
);
|
244 |
+
return $schedules;
|
245 |
+
}
|
246 |
+
}
|
247 |
+
new ExactMetrics_Tracking();
|
includes/api-request.php
ADDED
@@ -0,0 +1,443 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* API Request class.
|
4 |
+
*
|
5 |
+
* @since 7.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @author Chris Christoff
|
9 |
+
*/
|
10 |
+
final class ExactMetrics_API_Request {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Base API route.
|
14 |
+
*
|
15 |
+
* @since 7.0.0
|
16 |
+
*
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
+
public $base = 'api.exactmetrics.com/v2/';
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Current API route.
|
23 |
+
*
|
24 |
+
* @since 7.0.0
|
25 |
+
*
|
26 |
+
* @var bool|string
|
27 |
+
*/
|
28 |
+
public $route = false;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Full API URL endpoint.
|
32 |
+
*
|
33 |
+
* @since 7.0.0
|
34 |
+
*
|
35 |
+
* @var bool|string
|
36 |
+
*/
|
37 |
+
public $url = false;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Current API method.
|
41 |
+
*
|
42 |
+
* @since 7.0.0
|
43 |
+
*
|
44 |
+
* @var bool|string
|
45 |
+
*/
|
46 |
+
public $method = false;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Is a network request.
|
50 |
+
*
|
51 |
+
* @since 7.2.0
|
52 |
+
*
|
53 |
+
* @var bool
|
54 |
+
*/
|
55 |
+
public $network = false;
|
56 |
+
|
57 |
+
/**
|
58 |
+
* API token.
|
59 |
+
*
|
60 |
+
* @since 7.0.0
|
61 |
+
*
|
62 |
+
* @var bool|string
|
63 |
+
*/
|
64 |
+
public $token = false;
|
65 |
+
|
66 |
+
/**
|
67 |
+
* API Key.
|
68 |
+
*
|
69 |
+
* @since 7.0.0
|
70 |
+
*
|
71 |
+
* @var bool|string
|
72 |
+
*/
|
73 |
+
public $key = false;
|
74 |
+
|
75 |
+
/**
|
76 |
+
* API tt.
|
77 |
+
*
|
78 |
+
* @since 7.0.0
|
79 |
+
*
|
80 |
+
* @var bool|string
|
81 |
+
*/
|
82 |
+
public $tt = false;
|
83 |
+
|
84 |
+
/**
|
85 |
+
* API return.
|
86 |
+
*
|
87 |
+
* @since 7.0.0
|
88 |
+
*
|
89 |
+
* @var bool|string
|
90 |
+
*/
|
91 |
+
public $return = false;
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Start date.
|
95 |
+
*
|
96 |
+
* @since 7.0.0
|
97 |
+
*
|
98 |
+
* @var string
|
99 |
+
*/
|
100 |
+
public $start = '';
|
101 |
+
|
102 |
+
/**
|
103 |
+
* End Date.
|
104 |
+
*
|
105 |
+
* @since 7.0.0
|
106 |
+
*
|
107 |
+
* @var string
|
108 |
+
*/
|
109 |
+
public $end = '';
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Plugin slug.
|
113 |
+
*
|
114 |
+
* @since 7.0.0
|
115 |
+
*
|
116 |
+
* @var bool|string
|
117 |
+
*/
|
118 |
+
public $plugin = false;
|
119 |
+
|
120 |
+
/**
|
121 |
+
* URL to test connection with.
|
122 |
+
*
|
123 |
+
* @since 7.3.2
|
124 |
+
*
|
125 |
+
* @var string
|
126 |
+
*/
|
127 |
+
public $testurl = '';
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Additional data to add to request body
|
131 |
+
*
|
132 |
+
* @since 7.0.0
|
133 |
+
*
|
134 |
+
* @var array
|
135 |
+
*/
|
136 |
+
protected $additional_data = array();
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Primary class constructor.
|
140 |
+
*
|
141 |
+
* @since 7.0.0
|
142 |
+
*
|
143 |
+
* @param string $route The API route to target.
|
144 |
+
* @param array $args Array of API credentials.
|
145 |
+
* @param string $method The API method.
|
146 |
+
*/
|
147 |
+
public function __construct( $route, $args, $method = 'POST' ) {
|
148 |
+
|
149 |
+
// Set class properties.
|
150 |
+
$this->base = trailingslashit( exactmetrics_get_api_url() );
|
151 |
+
$this->route = $route;
|
152 |
+
$this->protocol = 'https://';
|
153 |
+
$this->url = trailingslashit( $this->protocol . $this->base . $this->route );
|
154 |
+
$this->method = $method;
|
155 |
+
$this->network = is_network_admin() || ! empty( $args['network'] );
|
156 |
+
|
157 |
+
$default_token = $this->network ? ExactMetrics()->auth->get_network_token() : ExactMetrics()->auth->get_token();
|
158 |
+
$default_key = $this->network ? ExactMetrics()->auth->get_network_key() : ExactMetrics()->auth->get_key();
|
159 |
+
|
160 |
+
$this->token = ! empty( $args['token'] ) ? $args['token'] : $default_token;
|
161 |
+
$this->key = ! empty( $args['key'] ) ? $args['key'] : $default_key;
|
162 |
+
$this->tt = ! empty( $args['tt'] ) ? $args['tt'] : '';
|
163 |
+
$this->return = ! empty( $args['return'] ) ? $args['return'] : '';
|
164 |
+
$this->start = ! empty( $args['start'] ) ? $args['start'] : '';
|
165 |
+
$this->end = ! empty( $args['end'] ) ? $args['end'] : '';
|
166 |
+
|
167 |
+
// We need to do this hack so that the network panel + the site_url of the main site are distinct
|
168 |
+
$this->site_url = is_network_admin() ? network_admin_url() : site_url();
|
169 |
+
|
170 |
+
if ( exactmetrics_is_pro_version() ) {
|
171 |
+
$this->license = $this->network ? ExactMetrics()->license->get_network_license_key() : ExactMetrics()->license->get_site_license_key();
|
172 |
+
}
|
173 |
+
$this->plugin = ExactMetrics()->plugin_slug;
|
174 |
+
$this->miversion = EXACTMETRICS_VERSION;
|
175 |
+
$this->sitei = ! empty( $args['sitei'] ) ? $args['sitei'] : '';
|
176 |
+
$this->testurl = ! empty( $args['testurl'] ) ? $args['testurl'] : '';
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Processes the API request.
|
181 |
+
*
|
182 |
+
* @since 7.0.0
|
183 |
+
*
|
184 |
+
* @return mixed $value The response to the API call.
|
185 |
+
*/
|
186 |
+
public function request() {
|
187 |
+
// Make sure we're not blocked
|
188 |
+
$blocked = $this->is_blocked( $this->url );
|
189 |
+
if ( $blocked || is_wp_error( $blocked ) ) {
|
190 |
+
if ( is_wp_error( $blocked ) ) {
|
191 |
+
// Translators: Placeholder gets replaced with the error message.
|
192 |
+
return new WP_Error( 'api-error', sprintf( __( 'The firewall of your server is blocking outbound calls. Please contact your hosting provider to fix this issue. %s', 'google-analytics-dashboard-for-wp' ), $blocked->get_error_message() ) );
|
193 |
+
} else {
|
194 |
+
return new WP_Error( 'api-error', __( 'The firewall of your server is blocking outbound calls. Please contact your hosting provider to fix this issue.', 'google-analytics-dashboard-for-wp' ) );
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
// Build the body of the request.
|
199 |
+
$body = array();
|
200 |
+
|
201 |
+
if ( ! empty( $this->token ) ) {
|
202 |
+
$body['token'] = $this->token;
|
203 |
+
}
|
204 |
+
|
205 |
+
if ( ! empty( $this->key ) ) {
|
206 |
+
$body['key'] = $this->key;
|
207 |
+
}
|
208 |
+
|
209 |
+
if ( ! empty( $this->tt ) ) {
|
210 |
+
$body['tt'] = $this->tt;
|
211 |
+
}
|
212 |
+
|
213 |
+
if ( ! empty( $this->return ) ) {
|
214 |
+
$body['return'] = $this->return;
|
215 |
+
}
|
216 |
+
|
217 |
+
if ( exactmetrics_is_pro_version() && ! empty( $this->license ) ) {
|
218 |
+
$body['license'] = $this->license;
|
219 |
+
}
|
220 |
+
|
221 |
+
if ( ! empty( $this->start ) ) {
|
222 |
+
$body['start'] = $this->start;
|
223 |
+
}
|
224 |
+
|
225 |
+
if ( ! empty( $this->end ) ) {
|
226 |
+
$body['end'] = $this->end;
|
227 |
+
}
|
228 |
+
|
229 |
+
if ( ! empty( $this->sitei ) ) {
|
230 |
+
$body['sitei'] = $this->sitei;
|
231 |
+
}
|
232 |
+
|
233 |
+
$body['siteurl'] = $this->site_url;
|
234 |
+
$body['miversion'] = $this->miversion;
|
235 |
+
|
236 |
+
// If a plugin API request, add the data.
|
237 |
+
if ( 'info' == $this->route || 'update' == $this->route ) {
|
238 |
+
$body['miapi-plugin'] = $this->plugin;
|
239 |
+
}
|
240 |
+
|
241 |
+
// Add in additional data if needed.
|
242 |
+
if ( ! empty( $this->additional_data ) ) {
|
243 |
+
$body['miapi-data'] = maybe_serialize( $this->additional_data );
|
244 |
+
}
|
245 |
+
|
246 |
+
if ( 'GET' == $this->method ) {
|
247 |
+
$body['time'] = time(); // just to avoid caching
|
248 |
+
}
|
249 |
+
|
250 |
+
$body['timezone'] = date('e');
|
251 |
+
|
252 |
+
$body['network'] = $this->network ? 'network' : 'site';
|
253 |
+
|
254 |
+
$body['ip'] = ! empty( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : '';
|
255 |
+
|
256 |
+
// This filter will be removed in the future.
|
257 |
+
$body = apply_filters( 'exactmetrics_api_request_body', $body );
|
258 |
+
|
259 |
+
$string = http_build_query( $body, '', '&' );
|
260 |
+
|
261 |
+
// Build the headers of the request.
|
262 |
+
$headers = array(
|
263 |
+
'Content-Type' => 'application/x-www-form-urlencoded',
|
264 |
+
'Cache-Control' => 'no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0',
|
265 |
+
'Pragma' => 'no-cache',
|
266 |
+
'Expires' => 0,
|
267 |
+
'MIAPI-Referer' => is_network_admin() ? network_admin_url() : site_url(),
|
268 |
+
'MIAPI-Sender' => 'WordPress',
|
269 |
+
);
|
270 |
+
|
271 |
+
//if ( $this->apikey ) {
|
272 |
+
// $headers['X-ExactMetrics-ApiKey'] = $this->apikey;
|
273 |
+
//}
|
274 |
+
|
275 |
+
// Setup data to be sent to the API.
|
276 |
+
$data = array(
|
277 |
+
'headers' => $headers,
|
278 |
+
'body' => $body,
|
279 |
+
'timeout' => 3000,
|
280 |
+
'user-agent' => 'MI/' . EXACTMETRICS_VERSION . '; ' . $this->site_url,
|
281 |
+
'sslverify' => false
|
282 |
+
);
|
283 |
+
|
284 |
+
// Perform the query and retrieve the response.
|
285 |
+
$response = 'GET' == $this->method ? wp_remote_get( esc_url_raw( $this->url ) . '?' . $string, $data ) : wp_remote_post( esc_url_raw( $this->url ), $data );
|
286 |
+
|
287 |
+
//return new WP_Error( 'debug', '<pre>' . var_export( $response, true ) . '</pre>' );
|
288 |
+
|
289 |
+
if ( is_wp_error( $response ) ) {
|
290 |
+
return $response;
|
291 |
+
}
|
292 |
+
|
293 |
+
$response_code = wp_remote_retrieve_response_code( $response );
|
294 |
+
$response_body = json_decode( wp_remote_retrieve_body( $response ), true );
|
295 |
+
//return new WP_Error( 'debug', '<pre>' . var_export( $response_body, true ) . '</pre>' );
|
296 |
+
//var_dump( $response_body );
|
297 |
+
// Bail out early if there are any errors.
|
298 |
+
if ( is_wp_error( $response_body ) ) {
|
299 |
+
return $response_body;
|
300 |
+
}
|
301 |
+
|
302 |
+
// If not a 200 status header, send back error.
|
303 |
+
if ( 200 != $response_code ) {
|
304 |
+
$type = ! empty( $response_body['type'] ) ? $response_body['type'] : 'api-error';
|
305 |
+
|
306 |
+
if ( empty( $response_code ) ) {
|
307 |
+
return new WP_Error( $type, __( 'The API was unreachable.', 'google-analytics-dashboard-for-wp' ) );
|
308 |
+
}
|
309 |
+
|
310 |
+
if ( empty( $response_body ) || ( empty( $response_body['message'] ) && empty( $response_body['error'] ) ) ) {
|
311 |
+
// Translators: placeholder adds the response code.
|
312 |
+
return new WP_Error( $type, sprintf( __( 'The API returned a <strong>%s</strong> response', 'google-analytics-dashboard-for-wp' ), $response_code ) );
|
313 |
+
}
|
314 |
+
|
315 |
+
if ( ! empty( $response_body['message'] ) ) {
|
316 |
+
// Translators: placeholder adds the response code and response message.
|
317 |
+
return new WP_Error( $type, sprintf( __( 'The API returned a <strong>%1$d</strong> response with this message: <strong>%2$s</strong>', 'google-analytics-dashboard-for-wp' ), $response_code, stripslashes( $response_body['message'] ) ) );
|
318 |
+
}
|
319 |
+
|
320 |
+
if ( ! empty( $response_body['error'] ) ) {
|
321 |
+
// Translators: placeholder adds the response code and response message.
|
322 |
+
return new WP_Error( $type, sprintf( __( 'The API returned a <strong>%1$d</strong> response with this message: <strong>%2$s</strong>', 'google-analytics-dashboard-for-wp' ), $response_code, stripslashes( $response_body['error'] ) ) );
|
323 |
+
}
|
324 |
+
}
|
325 |
+
|
326 |
+
// If TT required
|
327 |
+
if ( ! empty( $this->tt ) ) {
|
328 |
+
if ( empty( $response_body['tt'] ) || ! hash_equals( $this->tt, $response_body['tt'] ) ) {
|
329 |
+
// TT isn't set on return or doesn't match
|
330 |
+
return new WP_Error( 'validation-error', sprintf( __( 'Improper API request.', 'google-analytics-dashboard-for-wp' ) ) );
|
331 |
+
}
|
332 |
+
}
|
333 |
+
|
334 |
+
// Return the json decoded content.
|
335 |
+
return $response_body;
|
336 |
+
}
|
337 |
+
|
338 |
+
/**
|
339 |
+
* Sets a class property.
|
340 |
+
*
|
341 |
+
* @since 7.0.0
|
342 |
+
*
|
343 |
+
* @param string $key The property to set.
|
344 |
+
* @param string $val The value to set for the property.
|
345 |
+
* @return mixed $value The response to the API call.
|
346 |
+
*/
|
347 |
+
public function set( $key, $val ) {
|
348 |
+
$this->{$key} = $val;
|
349 |
+
}
|
350 |
+
|
351 |
+
/**
|
352 |
+
* Allow additional data to be passed in the request
|
353 |
+
*
|
354 |
+
* @since 7.0.0
|
355 |
+
*
|
356 |
+
* @param array $data
|
357 |
+
* return void
|
358 |
+
*/
|
359 |
+
public function set_additional_data( array $data ) {
|
360 |
+
$this->additional_data = array_merge( $this->additional_data, $data );
|
361 |
+
}
|
362 |
+
|
363 |
+
/**
|
364 |
+
* Checks for SSL for making API requests.
|
365 |
+
*
|
366 |
+
* @since 7.0.0
|
367 |
+
*
|
368 |
+
* return bool True if SSL is enabled, false otherwise.
|
369 |
+
*/
|
370 |
+
public function is_ssl() {
|
371 |
+
// Use the base is_ssl check first.
|
372 |
+
if ( is_ssl() ) {
|
373 |
+
return true;
|
374 |
+
} else if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
|
375 |
+
// Also catch proxies and load balancers.
|
376 |
+
return true;
|
377 |
+
} else if ( defined( 'FORCE_SSL_ADMIN' ) && FORCE_SSL_ADMIN ) {
|
378 |
+
return true;
|
379 |
+
}
|
380 |
+
|
381 |
+
// Otherwise, return false.
|
382 |
+
return false;
|
383 |
+
}
|
384 |
+
|
385 |
+
private function is_blocked( $url = '' ) {
|
386 |
+
global $Airplane_Mode_Core;
|
387 |
+
if ( defined( 'AIRMDE_VER' ) && ! empty( $Airplane_Mode_Core ) && $Airplane_Mode_Core->enabled() ) {
|
388 |
+
return new WP_Error( 'api-error', __( 'Reason: The API was unreachable because the Airplane Mode plugin is active.', 'google-analytics-dashboard-for-wp' ) );
|
389 |
+
}
|
390 |
+
|
391 |
+
// The below page is a testing empty content HTML page used for firewall/router login detection
|
392 |
+
// and for image linking purposes in Google Images. We use it to test outbound connections since it is run on google.com
|
393 |
+
// and is only a few bytes large. Plus on Google's main CDN so it loads in most places in 0.07 seconds or less. Perfect for our
|
394 |
+
// use case of quickly testing outbound connections.
|
395 |
+
$testurl = ! empty( $this->testurl ) ? $this->testurl :'http://www.google.com/blank.html';
|
396 |
+
if ( defined( 'WP_HTTP_BLOCK_EXTERNAL' ) && WP_HTTP_BLOCK_EXTERNAL ) {
|
397 |
+
if ( defined( 'WP_ACCESSIBLE_HOSTS' ) ) {
|
398 |
+
$wp_http = new WP_Http();
|
399 |
+
$on_blacklist = $wp_http->block_request( $url );
|
400 |
+
if ( $on_blacklist ) {
|
401 |
+
return new WP_Error( 'api-error', __( 'Reason: The API was unreachable because the API url is on the WP HTTP blocklist.', 'google-analytics-dashboard-for-wp' ) );
|
402 |
+
} else {
|
403 |
+
$params = array(
|
404 |
+
'sslverify' => false,
|
405 |
+
'timeout' => 2,
|
406 |
+
'user-agent' => 'ExactMetrics/' . EXACTMETRICS_VERSION,
|
407 |
+
'body' => ''
|
408 |
+
);
|
409 |
+
$response = wp_remote_get( $testurl, $params );
|
410 |
+
if( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
|
411 |
+
return false;
|
412 |
+
} else {
|
413 |
+
if ( is_wp_error( $response ) ) {
|
414 |
+
return $response;
|
415 |
+
} else {
|
416 |
+
return new WP_Error( 'api-error', __( 'Reason: The API was unreachable because the call to Google failed.', 'google-analytics-dashboard-for-wp' ) );
|
417 |
+
}
|
418 |
+
}
|
419 |
+
}
|
420 |
+
} else {
|
421 |
+
return new WP_Error( 'api-error', __( 'Reason: The API was unreachable because no external hosts are allowed on this site.', 'google-analytics-dashboard-for-wp' ) );
|
422 |
+
}
|
423 |
+
} else {
|
424 |
+
$params = array(
|
425 |
+
'sslverify' => false,
|
426 |
+
'timeout' => 2,
|
427 |
+
'user-agent' => 'ExactMetrics/' . EXACTMETRICS_VERSION,
|
428 |
+
'body' => ''
|
429 |
+
);
|
430 |
+
$response = wp_remote_get( $testurl, $params );
|
431 |
+
|
432 |
+
if( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
|
433 |
+
return false;
|
434 |
+
} else {
|
435 |
+
if ( is_wp_error( $response ) ) {
|
436 |
+
return $response;
|
437 |
+
} else {
|
438 |
+
return new WP_Error( 'api-error', __( 'Reason: The API was unreachable because the call to Google failed.', 'google-analytics-dashboard-for-wp' ) );
|
439 |
+
}
|
440 |
+
}
|
441 |
+
}
|
442 |
+
}
|
443 |
+
}
|
includes/auth.php
ADDED
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Auth class.
|
4 |
+
*
|
5 |
+
* Helper for auth.
|
6 |
+
*
|
7 |
+
* @since 7.0.0
|
8 |
+
*
|
9 |
+
* @package ExactMetrics
|
10 |
+
* @subpackage Auth
|
11 |
+
* @author Chris Christoff
|
12 |
+
*/
|
13 |
+
|
14 |
+
// Exit if accessed directly
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit;
|
17 |
+
}
|
18 |
+
|
19 |
+
final class ExactMetrics_Auth {
|
20 |
+
|
21 |
+
private $profile = array();
|
22 |
+
private $network = array();
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Primary class constructor.
|
26 |
+
*
|
27 |
+
* @access public
|
28 |
+
* @since 7.0.0
|
29 |
+
*/
|
30 |
+
public function __construct() {
|
31 |
+
$this->profile = $this->get_analytics_profile();
|
32 |
+
$this->network = $this->get_network_analytics_profile();
|
33 |
+
}
|
34 |
+
|
35 |
+
public function is_manual() {
|
36 |
+
return ! empty( $this->profile['manual'] );
|
37 |
+
}
|
38 |
+
public function is_network_manual() {
|
39 |
+
return ! empty( $this->network['manual'] );
|
40 |
+
}
|
41 |
+
|
42 |
+
public function is_authed() {
|
43 |
+
return ! empty( $this->profile['key'] );
|
44 |
+
}
|
45 |
+
|
46 |
+
public function is_network_authed() {
|
47 |
+
return ! empty( $this->network['key'] );
|
48 |
+
}
|
49 |
+
|
50 |
+
public function get_analytics_profile( $force = false ) {
|
51 |
+
if ( ! empty( $this->profile ) && ! $force ) {
|
52 |
+
return $this->profile;
|
53 |
+
} else {
|
54 |
+
$profile = get_option( 'exactmetrics_site_profile', array() );
|
55 |
+
$this->profile = $profile;
|
56 |
+
return $profile;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
public function get_network_analytics_profile( $force = false ) {
|
61 |
+
if ( ! empty( $this->network ) && ! $force ) {
|
62 |
+
return $this->network;
|
63 |
+
} else {
|
64 |
+
$profile = get_site_option( 'exactmetrics_network_profile', array() );
|
65 |
+
$this->network = $profile;
|
66 |
+
return $profile;
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
public function set_analytics_profile( $data = array() ){
|
71 |
+
update_option( 'exactmetrics_site_profile', $data );
|
72 |
+
$this->profile = $data;
|
73 |
+
|
74 |
+
// If this is the first time, save the date when they connected.
|
75 |
+
$over_time = get_option( 'exactmetrics_over_time', array() );
|
76 |
+
if ( empty( $over_time['connected_date'] ) ) {
|
77 |
+
$over_time['connected_date'] = time();
|
78 |
+
update_option( 'exactmetrics_over_time', $over_time );
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
public function set_network_analytics_profile( $data = array() ){
|
83 |
+
update_site_option( 'exactmetrics_network_profile', $data );
|
84 |
+
$this->network = $data;
|
85 |
+
}
|
86 |
+
|
87 |
+
public function delete_analytics_profile( $migrate = true ){
|
88 |
+
if ( $migrate ) {
|
89 |
+
$newdata = array();
|
90 |
+
if ( isset( $this->profile['ua'] ) ) {
|
91 |
+
$newdata['manual'] = $this->profile['ua'];
|
92 |
+
}
|
93 |
+
$this->profile = $newdata;
|
94 |
+
$this->set_analytics_profile( $newdata );
|
95 |
+
} else {
|
96 |
+
$this->profile = array();
|
97 |
+
delete_option( 'exactmetrics_site_profile' );
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
public function delete_network_analytics_profile( $migrate = true ){
|
102 |
+
if ( $migrate ) {
|
103 |
+
$newdata = array();
|
104 |
+
if ( isset( $this->network['ua'] ) ) {
|
105 |
+
$newdata['manual'] = $this->network['ua'];
|
106 |
+
}
|
107 |
+
$this->network = $newdata;
|
108 |
+
$this->set_network_analytics_profile( $newdata );
|
109 |
+
} else {
|
110 |
+
$this->network = array();
|
111 |
+
delete_site_option( 'exactmetrics_network_profile' );
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
public function set_manual_ua( $ua = '' ) {
|
116 |
+
if ( empty( $ua ) ) {
|
117 |
+
return;
|
118 |
+
}
|
119 |
+
|
120 |
+
if ( $this->is_authed() ) {
|
121 |
+
ExactMetrics()->api_auth->delete_auth();
|
122 |
+
}
|
123 |
+
|
124 |
+
$data = array();
|
125 |
+
if ( empty( $this->profile ) ) {
|
126 |
+
$data['manual'] = $ua;
|
127 |
+
} else {
|
128 |
+
$data = $this->profile;
|
129 |
+
$data['manual'] = $ua;
|
130 |
+
}
|
131 |
+
|
132 |
+
do_action( 'exactmetrics_reports_delete_aggregate_data' );
|
133 |
+
|
134 |
+
$this->profile = $data;
|
135 |
+
$this->set_analytics_profile( $data );
|
136 |
+
}
|
137 |
+
|
138 |
+
public function set_network_manual_ua( $ua = '' ) {
|
139 |
+
if ( empty( $ua ) ) {
|
140 |
+
return;
|
141 |
+
}
|
142 |
+
|
143 |
+
if ( $this->is_network_authed() ) {
|
144 |
+
ExactMetrics()->api_auth->delete_auth();
|
145 |
+
}
|
146 |
+
|
147 |
+
$data = array();
|
148 |
+
if ( empty( $this->network ) ) {
|
149 |
+
$data['manual'] = $ua;
|
150 |
+
} else {
|
151 |
+
$data = $this->network;
|
152 |
+
$data['manual'] = $ua;
|
153 |
+
}
|
154 |
+
|
155 |
+
do_action( 'exactmetrics_reports_delete_network_aggregate_data' );
|
156 |
+
|
157 |
+
$this->network = $data;
|
158 |
+
$this->set_network_analytics_profile( $data );
|
159 |
+
}
|
160 |
+
|
161 |
+
public function delete_manual_ua() {
|
162 |
+
if ( ! empty( $this->profile ) && ! empty( $this->profile['manual'] ) ) {
|
163 |
+
unset( $this->profile['manual'] );
|
164 |
+
$this->set_analytics_profile( $this->profile );
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
public function delete_network_manual_ua() {
|
169 |
+
if ( ! empty( $this->network ) && ! empty( $this->network['manual'] ) ) {
|
170 |
+
unset( $this->network['manual'] );
|
171 |
+
$this->set_network_analytics_profile( $this->network );
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
public function get_manual_ua() {
|
176 |
+
return ! empty( $this->profile['manual'] ) ? exactmetrics_is_valid_ua( $this->profile['manual'] ) : '';
|
177 |
+
}
|
178 |
+
|
179 |
+
public function get_network_manual_ua() {
|
180 |
+
return ! empty( $this->network['manual'] ) ? exactmetrics_is_valid_ua( $this->network['manual'] ) : '';
|
181 |
+
}
|
182 |
+
|
183 |
+
public function get_ua() {
|
184 |
+
return ! empty( $this->profile['ua'] ) ? exactmetrics_is_valid_ua( $this->profile['ua'] ) : '';
|
185 |
+
}
|
186 |
+
|
187 |
+
public function get_network_ua() {
|
188 |
+
return ! empty( $this->network['ua'] ) ? exactmetrics_is_valid_ua( $this->network['ua'] ) : '';
|
189 |
+
}
|
190 |
+
|
191 |
+
public function get_viewname(){
|
192 |
+
return ! empty( $this->profile['viewname'] ) ? $this->profile['viewname'] : '';
|
193 |
+
}
|
194 |
+
|
195 |
+
public function get_network_viewname(){
|
196 |
+
return ! empty( $this->network['viewname'] ) ? $this->network['viewname'] : '';
|
197 |
+
}
|
198 |
+
|
199 |
+
public function get_accountid(){
|
200 |
+
return ! empty( $this->profile['a'] ) ? $this->profile['a'] : '';
|
201 |
+
}
|
202 |
+
|
203 |
+
public function get_network_accountid(){
|
204 |
+
return ! empty( $this->network['a'] ) ? $this->network['a'] : '';
|
205 |
+
}
|
206 |
+
|
207 |
+
public function get_propertyid(){
|
208 |
+
return ! empty( $this->profile['w'] ) ? $this->profile['w'] : '';
|
209 |
+
}
|
210 |
+
|
211 |
+
public function get_network_propertyid(){
|
212 |
+
return ! empty( $this->network['w'] ) ? $this->network['w'] : '';
|
213 |
+
}
|
214 |
+
|
215 |
+
public function get_viewid(){ // also known as profileID
|
216 |
+
return ! empty( $this->profile['p'] ) ? $this->profile['p'] : '';
|
217 |
+
}
|
218 |
+
|
219 |
+
public function get_network_viewid(){ // also known as profileID
|
220 |
+
return ! empty( $this->network['p'] ) ? $this->network['p'] : '';
|
221 |
+
}
|
222 |
+
|
223 |
+
public function get_key(){
|
224 |
+
return ! empty( $this->profile['key'] ) ? $this->profile['key'] : '';
|
225 |
+
}
|
226 |
+
|
227 |
+
public function get_network_key(){
|
228 |
+
return ! empty( $this->network['key'] ) ? $this->network['key'] : '';
|
229 |
+
}
|
230 |
+
|
231 |
+
public function get_token(){
|
232 |
+
return ! empty( $this->profile['token'] ) ? $this->profile['token'] : '';
|
233 |
+
}
|
234 |
+
|
235 |
+
public function get_network_token(){
|
236 |
+
return ! empty( $this->network['token'] ) ? $this->network['token'] : '';
|
237 |
+
}
|
238 |
+
|
239 |
+
public function get_referral_url(){
|
240 |
+
$url = '';
|
241 |
+
|
242 |
+
if ( $this->is_authed() ) {
|
243 |
+
$url .= 'a' . ExactMetrics()->auth->get_accountid() . 'w' . ExactMetrics()->auth->get_propertyid() . 'p' . ExactMetrics()->auth->get_viewid() . '/';
|
244 |
+
} else if ( $this->is_network_authed() ) {
|
245 |
+
$url .= 'a' . ExactMetrics()->auth->get_network_accountid() . 'w' . ExactMetrics()->auth->get_network_propertyid() . 'p' . ExactMetrics()->auth->get_network_viewid() . '/';
|
246 |
+
}
|
247 |
+
|
248 |
+
return $url;
|
249 |
+
}
|
250 |
+
}
|
includes/capabilities.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Capabilities class.
|
4 |
+
*
|
5 |
+
* @access public
|
6 |
+
* @since 6.0.0
|
7 |
+
*
|
8 |
+
* @package ExactMetrics
|
9 |
+
* @subpackage Capabilities
|
10 |
+
* @author Chris Christoff
|
11 |
+
*/
|
12 |
+
|
13 |
+
// Exit if accessed directly
|
14 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
15 |
+
exit;
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Map ExactMetrics Capabilities.
|
20 |
+
*
|
21 |
+
* Using meta caps, we're creating virtual capabilities that are
|
22 |
+
* for backwards compatibility reasons given to users with manage_options, and to
|
23 |
+
* users who have at least of the roles selected in the options on the permissions
|
24 |
+
* tab of the ExactMetrics settings.
|
25 |
+
*
|
26 |
+
* @access public
|
27 |
+
* @since 6.0.0
|
28 |
+
*
|
29 |
+
* @param array $caps Array of capabilities the user has.
|
30 |
+
* @param string $cap The current cap being filtered.
|
31 |
+
* @param int $user_id User to check permissions for.
|
32 |
+
* @param array $args Extra parameters. Unused.
|
33 |
+
* @return array Array of caps needed to have this meta cap. If returned array is empty, user has the capability.
|
34 |
+
*/
|
35 |
+
function exactmetrics_add_capabilities( $caps, $cap, $user_id, $args ) {
|
36 |
+
|
37 |
+
switch( $cap ) {
|
38 |
+
case 'exactmetrics_view_dashboard' :
|
39 |
+
$roles = exactmetrics_get_option( 'view_reports', array() );
|
40 |
+
|
41 |
+
$user_can_via_settings = false;
|
42 |
+
if ( ! empty( $roles ) && is_array( $roles ) ) {
|
43 |
+
foreach ( $roles as $role ) {
|
44 |
+
if ( is_string( $role ) ) {
|
45 |
+
if ( user_can( $user_id, $role ) ) {
|
46 |
+
$user_can_via_settings = true;
|
47 |
+
break;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
}
|
51 |
+
} else if ( ! empty( $roles ) && is_string( $roles ) ) {
|
52 |
+
if ( user_can( $user_id, $roles ) ) {
|
53 |
+
$user_can_via_settings = true;
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
if ( user_can( $user_id, 'manage_options' ) || $user_can_via_settings ) {
|
58 |
+
$caps = array();
|
59 |
+
}
|
60 |
+
|
61 |
+
break;
|
62 |
+
case 'exactmetrics_save_settings' :
|
63 |
+
$roles = exactmetrics_get_option( 'save_settings', array() );
|
64 |
+
|
65 |
+
$user_can_via_settings = false;
|
66 |
+
if ( ! empty( $roles ) && is_array( $roles ) ) {
|
67 |
+
foreach ( $roles as $role ) {
|
68 |
+
if ( is_string( $role ) ) {
|
69 |
+
if ( user_can( $user_id, $role ) ) {
|
70 |
+
$user_can_via_settings = true;
|
71 |
+
break;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
75 |
+
} else if ( ! empty( $roles ) && is_string( $roles ) ) {
|
76 |
+
if ( user_can( $user_id, $roles ) ) {
|
77 |
+
$user_can_via_settings = true;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
if ( user_can( $user_id, 'manage_options' ) || $user_can_via_settings ) {
|
82 |
+
$caps = array();
|
83 |
+
}
|
84 |
+
|
85 |
+
break;
|
86 |
+
}
|
87 |
+
return $caps;
|
88 |
+
}
|
89 |
+
add_filter( 'map_meta_cap','exactmetrics_add_capabilities', 10, 4 );
|
includes/deprecated.php
ADDED
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Deprecated functions.
|
4 |
+
*
|
5 |
+
* Contains the functions used to deprecate functions and
|
6 |
+
* hooks in ExactMetrics, as well as the deprecated functions
|
7 |
+
* and hooks themselves, where possible.
|
8 |
+
*
|
9 |
+
* @since 6.0.0
|
10 |
+
*
|
11 |
+
* @package ExactMetrics
|
12 |
+
* @subpackage Deprecated
|
13 |
+
* @author Chris Christoff
|
14 |
+
*/
|
15 |
+
|
16 |
+
// Exit if accessed directly
|
17 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
18 |
+
exit;
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Fires functions attached to a deprecated filter hook.
|
23 |
+
*
|
24 |
+
* When a filter hook is deprecated, the apply_filters() call is replaced with
|
25 |
+
* apply_filters_deprecated(), which triggers a deprecation notice and then fires
|
26 |
+
* the original filter hook. Note, this is a copy of WordPress core's _apply_filters_deprecated
|
27 |
+
* function, that we've copied into ExactMetrics so that we can use it on WordPress
|
28 |
+
* versions older than 6.0.0 (when it was introduced to core). If we ever bump our
|
29 |
+
* minimum WP version requirements above 6.0.0, we'll remove this function.
|
30 |
+
*
|
31 |
+
* @since 6.0.0
|
32 |
+
* @access private
|
33 |
+
*
|
34 |
+
* @see _apply_filters_deprecated()
|
35 |
+
*
|
36 |
+
* @param string $tag The name of the filter hook.
|
37 |
+
* @param array $args Array of additional function arguments to be passed to apply_filters().
|
38 |
+
* @param string $version The version of WordPress that deprecated the hook.
|
39 |
+
* @param string $message Optional. A message regarding the change. Default null.
|
40 |
+
*/
|
41 |
+
function _exactmetrics_apply_filters_deprecated( $tag, $args, $version, $message = null ) {
|
42 |
+
if ( ! has_filter( $tag ) ) {
|
43 |
+
return $args[0];
|
44 |
+
}
|
45 |
+
|
46 |
+
_exactmetrics_deprecated_hook( $tag, $version, $message );
|
47 |
+
|
48 |
+
return apply_filters_ref_array( $tag, $args );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Fires functions attached to a deprecated action hook.
|
53 |
+
*
|
54 |
+
* When an action hook is deprecated, the do_action() call is replaced with
|
55 |
+
* do_action_deprecated(), which triggers a deprecation notice and then fires
|
56 |
+
* the original hook. Note, this is a copy of WordPress core's _do_action_deprecated
|
57 |
+
* function, that we've copied into ExactMetrics so that we can use it on WordPress
|
58 |
+
* versions older than 6.0.0 (when it was introduced to core). If we ever bump our
|
59 |
+
* minimum WP version requirements above 6.0.0, we'll remove this function.
|
60 |
+
*
|
61 |
+
* @since 6.0.0
|
62 |
+
* @access private
|
63 |
+
*
|
64 |
+
* @see _do_action_deprecated()
|
65 |
+
*
|
66 |
+
* @param string $tag The name of the action hook.
|
67 |
+
* @param array $args Array of additional function arguments to be passed to do_action().
|
68 |
+
* @param string $version The version of WordPress that deprecated the hook.
|
69 |
+
* @param string $message Optional. A message regarding the change.
|
70 |
+
*/
|
71 |
+
function _exactmetrics_do_action_deprecated( $tag, $args, $version, $message = null ) {
|
72 |
+
if ( ! has_action( $tag ) ) {
|
73 |
+
return;
|
74 |
+
}
|
75 |
+
|
76 |
+
_exactmetrics_deprecated_hook( $tag, $version, $message );
|
77 |
+
|
78 |
+
do_action_ref_array( $tag, $args );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Marks a deprecated action or filter hook as deprecated and throws a notice.
|
83 |
+
*
|
84 |
+
* Use the {@see 'deprecated_hook_run'} action to get the backtrace describing where
|
85 |
+
* the deprecated hook was called.
|
86 |
+
*
|
87 |
+
* Default behavior is to trigger a user error if `WP_DEBUG` is true.
|
88 |
+
*
|
89 |
+
* This function is called by the do_action_deprecated() and apply_filters_deprecated()
|
90 |
+
* functions, and so generally does not need to be called directly.
|
91 |
+
*
|
92 |
+
* Note, this is a copy of WordPress core's _deprecated_hook
|
93 |
+
* function, that we've copied into ExactMetrics so that we can use it on WordPress
|
94 |
+
* versions older than 6.0.0 (when it was introduced to core). If we ever bump our
|
95 |
+
* minimum WP version requirements above 6.0.0, we'll remove this function.
|
96 |
+
*
|
97 |
+
* @since 6.0.0
|
98 |
+
* @access private
|
99 |
+
*
|
100 |
+
* @param string $hook The hook that was used.
|
101 |
+
* @param string $version The version of WordPress that deprecated the hook.
|
102 |
+
* @param string $message Optional. A message regarding the change.
|
103 |
+
*/
|
104 |
+
function _exactmetrics_deprecated_hook( $hook, $version, $message = null ) {
|
105 |
+
/**
|
106 |
+
* Fires when a deprecated hook is called.
|
107 |
+
*
|
108 |
+
* @since 6.0.0
|
109 |
+
*
|
110 |
+
* @param string $hook The hook that was called.
|
111 |
+
* @param string $version The version of ExactMetrics that deprecated the hook used.
|
112 |
+
* @param string $message A message regarding the change.
|
113 |
+
*/
|
114 |
+
do_action( 'deprecated_hook_run', $hook, $version, $message );
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Filters whether to trigger deprecated hook errors.
|
118 |
+
*
|
119 |
+
* @since 6.0.0
|
120 |
+
*
|
121 |
+
* @param bool $trigger Whether to trigger deprecated hook errors. Requires
|
122 |
+
* `WP_DEBUG` to be defined true.
|
123 |
+
*/
|
124 |
+
if ( ( WP_DEBUG && apply_filters( 'deprecated_hook_trigger_error', true ) ) || exactmetrics_is_debug_mode() ) {
|
125 |
+
$message = empty( $message ) ? '' : ' ' . $message;
|
126 |
+
// Translators: Placeholders add the hook name, plugin version and bold text.
|
127 |
+
trigger_error( sprintf( esc_html__( '%1$s is %3$sdeprecated%4$s since ExactMetrics version %2$s!', 'google-analytics-dashboard-for-wp' ), $hook, $version, '<strong>', '</strong>' ) . esc_html ( $message ) );
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Marks a function as deprecated and informs when it has been used.
|
133 |
+
*
|
134 |
+
* There is a hook exactmetrics_deprecated_function_run that will be called that can be used
|
135 |
+
* to get the backtrace up to what file and function called the deprecated
|
136 |
+
* function. Based on the one in EDD core.
|
137 |
+
*
|
138 |
+
* The current behavior is to trigger a user error if WP_DEBUG is true.
|
139 |
+
*
|
140 |
+
* This function is to be used in every function that is deprecated.
|
141 |
+
*
|
142 |
+
* @since 6.0.0
|
143 |
+
* @access private
|
144 |
+
*
|
145 |
+
* @uses do_action() Calls 'exactmetrics_deprecated_function_run' and passes the function name, what to use instead,
|
146 |
+
* and the version the function was deprecated in.
|
147 |
+
* @uses apply_filters() Calls 'exactmetrics_deprecated_function_trigger_error' and expects boolean value of true to do
|
148 |
+
* trigger or false to not trigger error.
|
149 |
+
*
|
150 |
+
* @param string $function The function that was called
|
151 |
+
* @param string $version The version of WordPress that deprecated the function
|
152 |
+
* @param array $backtrace Optional. Contains stack backtrace of deprecated function
|
153 |
+
* @return void
|
154 |
+
*/
|
155 |
+
function _exactmetrics_deprecated_function( $function, $version, $backtrace = null ) {
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Deprecated Function Action.
|
159 |
+
*
|
160 |
+
* Allow plugin run an action on the use of a
|
161 |
+
* deprecated function. This could be used to
|
162 |
+
* feed into an error logging program or file.
|
163 |
+
*
|
164 |
+
* @since 6.0.0
|
165 |
+
*
|
166 |
+
* @param string $function The function that was called.
|
167 |
+
* @param string $version The version of WordPress that deprecated the function.
|
168 |
+
* @param array $backtrace Optional. Contains stack backtrace of deprecated function.
|
169 |
+
*/
|
170 |
+
do_action( 'deprecated_function_run', $function, $version, $backtrace );
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Filters whether to trigger an error for deprecated functions.
|
174 |
+
*
|
175 |
+
* @since 6.0.0
|
176 |
+
*
|
177 |
+
* @param bool $trigger Whether to trigger the error for deprecated functions. Default true.
|
178 |
+
*/
|
179 |
+
if ( ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) || exactmetrics_is_debug_mode() ) {
|
180 |
+
// Translators: Placeholders add the hook name, plugin version and bold text.
|
181 |
+
trigger_error( sprintf( esc_html__( '%1$s is %3$sdeprecated%4$s since ExactMetrics version %2$s.', 'google-analytics-dashboard-for-wp' ), $function, $version, '<strong>', '</strong>' ) );
|
182 |
+
trigger_error( print_r( $backtrace, 1 ) );// Limited to previous 1028 characters, but since we only need to move back 1 in stack that should be fine.
|
183 |
+
// Alternatively we could dump this to a file.
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Marks something as deprecated.
|
189 |
+
*
|
190 |
+
* The current behavior is to trigger a user error if WP_DEBUG is true.
|
191 |
+
*
|
192 |
+
* @since 6.0.0
|
193 |
+
* @access private
|
194 |
+
*
|
195 |
+
* @uses apply_filters() Calls 'exactmetrics_deprecated_trigger_error' and expects boolean value of true to do
|
196 |
+
* trigger or false to not trigger error.
|
197 |
+
*
|
198 |
+
* @param string $message Deprecation message shown.
|
199 |
+
* @return void
|
200 |
+
*/
|
201 |
+
function _exactmetrics_deprecated( $message ) {
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Deprecated Message Filter.
|
205 |
+
*
|
206 |
+
* Allow plugin to filter the deprecated message.
|
207 |
+
*
|
208 |
+
* @since 6.0.0
|
209 |
+
*
|
210 |
+
* @param string $message Error message.
|
211 |
+
*/
|
212 |
+
do_action( 'exactmetrics_deprecated_run', $message );
|
213 |
+
|
214 |
+
$show_errors = current_user_can( 'manage_options' );
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Deprecated Error Trigger.
|
218 |
+
*
|
219 |
+
* Allow plugin to filter the output error trigger.
|
220 |
+
*
|
221 |
+
* @since 6.0.0
|
222 |
+
*
|
223 |
+
* @param bool $show_errors Whether to show errors.
|
224 |
+
*/
|
225 |
+
$show_errors = apply_filters( 'exactmetrics_deprecated_trigger_error', $show_errors );
|
226 |
+
if ( ( WP_DEBUG && $show_errors ) || exactmetrics_is_debug_mode() ) {
|
227 |
+
trigger_error( esc_html( $message ) );
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
|
232 |
+
/**
|
233 |
+
* Start Deprecated Actions & Filters.
|
234 |
+
*
|
235 |
+
* These backwards compatibility fixes may be removed at any time.
|
236 |
+
* Users/Developers are encouraged to update their code as soon as possible.
|
237 |
+
*/
|
238 |
+
|
includes/em-install.php
ADDED
@@ -0,0 +1,453 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ExactMetrics Installation and Automatic Upgrades.
|
4 |
+
*
|
5 |
+
* This file handles setting up new
|
6 |
+
* ExactMetrics installs as well as performing
|
7 |
+
* behind the scene upgrades between
|
8 |
+
* ExactMetrics versions.
|
9 |
+
*
|
10 |
+
* @package ExactMetrics
|
11 |
+
* @subpackage Install/Upgrade
|
12 |
+
* @since 1.0.0
|
13 |
+
*/
|
14 |
+
|
15 |
+
// Exit if accessed directly
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
17 |
+
exit;
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* ExactMetrics Install.
|
22 |
+
*
|
23 |
+
* This class handles a new MI install
|
24 |
+
* as well as automatic (non-user initiated)
|
25 |
+
* upgrade routines.
|
26 |
+
*
|
27 |
+
* @since 1.0.0
|
28 |
+
* @access public
|
29 |
+
*/
|
30 |
+
class ExactMetrics_Install {
|
31 |
+
|
32 |
+
/**
|
33 |
+
* MI Settings.
|
34 |
+
*
|
35 |
+
* @since 6.0.0
|
36 |
+
* @access public
|
37 |
+
* @var array $new_settings When the init() function starts, initially
|
38 |
+
* contains the original settings. At the end
|
39 |
+
* of init() contains the settings to save.
|
40 |
+
*/
|
41 |
+
public $new_settings = array();
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Install/Upgrade routine.
|
45 |
+
*
|
46 |
+
* This function is what is called to actually install MI data on new installs and to do
|
47 |
+
* behind the scenes upgrades on MI upgrades. If this function contains a bug, the results
|
48 |
+
* can be catastrophic. This function gets the highest priority in all of MI for unit tests.
|
49 |
+
*
|
50 |
+
* @since 6.0.0
|
51 |
+
* @access public
|
52 |
+
*
|
53 |
+
* @return void
|
54 |
+
*/
|
55 |
+
public function init() {
|
56 |
+
|
57 |
+
// Get a copy of the current MI settings.
|
58 |
+
$this->new_settings = get_option( exactmetrics_get_option_name() );
|
59 |
+
|
60 |
+
$version = get_option( 'exactmetrics_current_version', false );
|
61 |
+
$cachec = false; // have we forced an object cache to be cleared already (so we don't clear it unnecessarily)
|
62 |
+
|
63 |
+
if ( ! $version ) {
|
64 |
+
|
65 |
+
$this->new_install();
|
66 |
+
|
67 |
+
// set db version (Do not increment! See below large comment)
|
68 |
+
update_option( 'exactmetrics_db_version', '1.0.0' );
|
69 |
+
|
70 |
+
} else { // if existing install
|
71 |
+
|
72 |
+
// Do not use. See exactmetrics_after_install_routine comment below.
|
73 |
+
do_action( 'exactmetrics_after_existing_upgrade_routine', $version );
|
74 |
+
$version = get_option( 'exactmetrics_current_version', $version );
|
75 |
+
update_option( 'exactmetrics_version_upgraded_from', $version );
|
76 |
+
}
|
77 |
+
|
78 |
+
// This hook is used primarily by the Pro version to run some Pro
|
79 |
+
// specific install stuff. Please do not use this hook. It is not
|
80 |
+
// considered a public hook by MI's dev team and can/will be removed,
|
81 |
+
// relocated, and/or altered without warning at any time. You've been warned.
|
82 |
+
// As this hook is not for public use, we've intentionally not docbloc'd this
|
83 |
+
// hook to avoid developers seeing it future public dev docs.
|
84 |
+
do_action( 'exactmetrics_after_install_routine', $version );
|
85 |
+
|
86 |
+
// This is the version of MI installed
|
87 |
+
update_option( 'exactmetrics_current_version', EXACTMETRICS_VERSION );
|
88 |
+
|
89 |
+
// This is where we save MI settings
|
90 |
+
update_option( exactmetrics_get_option_name(), $this->new_settings );
|
91 |
+
|
92 |
+
// There's no code for this function below this. Just an explanation
|
93 |
+
// of the MI core options.
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Explanation of ExactMetrics core options
|
97 |
+
*
|
98 |
+
* By now your head is probably spinning trying to figure
|
99 |
+
* out what all of these version options are for. Note, I've abbreviated
|
100 |
+
* "exactmetrics" to "mi" in the options names to make this table easier
|
101 |
+
* to read.
|
102 |
+
*
|
103 |
+
* Here's a basic rundown:
|
104 |
+
*
|
105 |
+
* mi_current_version: This starts with the actual version MI was
|
106 |
+
* installed on. We use this version to
|
107 |
+
* determine whether or not a site needs
|
108 |
+
* to run one of the behind the scenes
|
109 |
+
* MI upgrade routines. This version is updated
|
110 |
+
* every time a minor or major background upgrade
|
111 |
+
* routine is run. Generally lags behind the
|
112 |
+
* EXACTMETRICS_VERSION constant by at most a couple minor
|
113 |
+
* versions. Never lags behind by 1 major version
|
114 |
+
* or more generally.
|
115 |
+
*
|
116 |
+
* mi_db_version: This is different from mi_current_version.
|
117 |
+
* Unlike the former, this is used to determine
|
118 |
+
* if a site needs to run a *user* initiated
|
119 |
+
* upgrade routine (incremented in MI_Upgrade class). This
|
120 |
+
* value is only update when a user initiated
|
121 |
+
* upgrade routine is done. Because we do very
|
122 |
+
* few user initiated upgrades compared to
|
123 |
+
* automatic ones, this version can lag behind by
|
124 |
+
* 2 or even 3 major versions. Generally contains
|
125 |
+
* the current major version.
|
126 |
+
*
|
127 |
+
* mi_settings: Returned by exactmetrics_get_option_name(), this
|
128 |
+
* is actually "exactmetrics_settings" for both pro
|
129 |
+
* and lite version. However we use a helper function to
|
130 |
+
* retrieve the option name in case we ever decide down the
|
131 |
+
* road to maintain seperate options for the Lite and Pro versions.
|
132 |
+
* If you need to access MI's settings directly, (as opposed to our
|
133 |
+
* exactmetrics_get_option helper which uses the option name helper
|
134 |
+
* automatically), you should use this function to get the
|
135 |
+
* name of the option to retrieve.
|
136 |
+
*
|
137 |
+
* Therefore you should never increment exactmetrics_db_version in this file and always increment exactmetrics_current_version.
|
138 |
+
*/
|
139 |
+
}
|
140 |
+
|
141 |
+
|
142 |
+
/**
|
143 |
+
* New ExactMetrics Install routine.
|
144 |
+
*
|
145 |
+
* This function installs all of the default
|
146 |
+
* things on new MI installs. Flight 5476 with
|
147 |
+
* non-stop service to a whole world of
|
148 |
+
* possibilities is now boarding.
|
149 |
+
*
|
150 |
+
* @since 6.0.0
|
151 |
+
* @access public
|
152 |
+
*
|
153 |
+
* @return void
|
154 |
+
*/
|
155 |
+
public function new_install() {
|
156 |
+
|
157 |
+
// Check if ExactMetrics Legacy settings exist and convert those as defaults.
|
158 |
+
$em_legacy_options = get_option( 'gadwp_options', false );
|
159 |
+
if ( $em_legacy_options ) {
|
160 |
+
$this->new_settings = $this->get_settings_from_gadwp();
|
161 |
+
} else {
|
162 |
+
// Add default settings values.
|
163 |
+
$this->new_settings = $this->get_exactmetrics_default_values();
|
164 |
+
}
|
165 |
+
|
166 |
+
$this->maybe_import_thirstyaffiliates_options();
|
167 |
+
|
168 |
+
$data = array(
|
169 |
+
'installed_version' => EXACTMETRICS_VERSION,
|
170 |
+
'installed_date' => time(),
|
171 |
+
'installed_pro' => exactmetrics_is_pro_version(),
|
172 |
+
);
|
173 |
+
|
174 |
+
update_option( 'exactmetrics_over_time', $data );
|
175 |
+
|
176 |
+
// Let addons + MI Pro/Lite hook in here. @todo: doc as nonpublic
|
177 |
+
do_action( 'exactmetrics_after_new_install_routine', EXACTMETRICS_VERSION );
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Convert existing settings from ExactMetrics legacy version.
|
182 |
+
*
|
183 |
+
* @return array
|
184 |
+
*/
|
185 |
+
public function get_settings_from_gadwp() {
|
186 |
+
$em_legacy_options = get_option( 'gadwp_options', '' );
|
187 |
+
$em_legacy_options = json_decode( $em_legacy_options, true );
|
188 |
+
$settings = $this->get_exactmetrics_default_values();
|
189 |
+
|
190 |
+
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
|
191 |
+
require_once ABSPATH . '/wp-admin/includes/plugin.php';
|
192 |
+
}
|
193 |
+
// If set to use network wide auth, update the manual UA for all sites.
|
194 |
+
$plugin = plugin_basename( EXACTMETRICS_PLUGIN_FILE );
|
195 |
+
if ( is_multisite() && is_plugin_active_for_network( $plugin ) ) {
|
196 |
+
$network_routine_ran = get_site_option( 'gadwp_network_import', false );
|
197 |
+
if ( false === $network_routine_ran ) {
|
198 |
+
$em_legacy_network_options = get_site_option( 'gadwp_network_options', '' );
|
199 |
+
$em_legacy_network_options = json_decode( $em_legacy_network_options, true );
|
200 |
+
|
201 |
+
if ( ! empty( $em_legacy_network_options['network_mode'] ) && $em_legacy_network_options['network_mode'] && ! empty( $em_legacy_network_options['network_tableid'] ) && is_array( $em_legacy_network_options['network_tableid'] ) ) {
|
202 |
+
foreach ( $em_legacy_network_options['network_tableid'] as $site_id => $network_profile ) {
|
203 |
+
switch_to_blog( $site_id );
|
204 |
+
|
205 |
+
$profile_data = array();
|
206 |
+
foreach ( $em_legacy_network_options['ga_profiles_list'] as $profile ) {
|
207 |
+
if ( ! empty( $profile[1] ) && $network_profile === $profile[1] ) {
|
208 |
+
$profile_data = $profile;
|
209 |
+
break;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
if ( ! empty( $profile_data ) && is_array( $profile_data ) && ! empty( $profile_data[2] ) ) {
|
213 |
+
ExactMetrics()->auth->set_manual_ua( $profile_data[2] );
|
214 |
+
}
|
215 |
+
|
216 |
+
restore_current_blog();
|
217 |
+
}
|
218 |
+
}
|
219 |
+
|
220 |
+
update_site_option( 'gadwp_network_import', EXACTMETRICS_VERSION );
|
221 |
+
}
|
222 |
+
}
|
223 |
+
// Save the manual UA to make sure tracking keeps working.
|
224 |
+
if ( ! empty( $em_legacy_options['tableid_jail'] ) && is_array( $em_legacy_options['ga_profiles_list'] ) && ! empty( $em_legacy_options['ga_profiles_list'] ) ) {
|
225 |
+
$profile_data = array();
|
226 |
+
foreach ( $em_legacy_options['ga_profiles_list'] as $profile ) {
|
227 |
+
if ( ! empty( $profile[1] ) && $em_legacy_options['tableid_jail'] === $profile[1] ) {
|
228 |
+
$profile_data = $profile;
|
229 |
+
break;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
if ( ! empty( $profile_data ) && is_array( $profile_data ) && ! empty( $profile_data[2] ) ) {
|
233 |
+
ExactMetrics()->auth->set_manual_ua( $profile_data[2] );
|
234 |
+
}
|
235 |
+
}
|
236 |
+
|
237 |
+
// Process download tracking options.
|
238 |
+
if ( ! empty( $em_legacy_options['ga_event_downloads'] ) ) {
|
239 |
+
$downloads = str_replace( '*', '', $em_legacy_options['ga_event_downloads'] );
|
240 |
+
$downloads = str_replace( '|', ',', $downloads );
|
241 |
+
$settings['extensions_of_files'] = $downloads;
|
242 |
+
}
|
243 |
+
|
244 |
+
// Process affiliate tracking settings.
|
245 |
+
if ( ! empty( $em_legacy_options['ga_aff_tracking'] ) && 0 !== $em_legacy_options['ga_aff_tracking'] && ! empty( $em_legacy_options['ga_event_affiliates'] ) ) {
|
246 |
+
$settings['affiliate_links'][] = array(
|
247 |
+
'path' => $em_legacy_options['ga_event_affiliates'],
|
248 |
+
'label' => 'Affiliate',
|
249 |
+
);
|
250 |
+
}
|
251 |
+
|
252 |
+
// Process Hash Tracking.
|
253 |
+
if ( ! empty( $em_legacy_options['ga_hash_tracking'] ) && 0 !== $em_legacy_options['ga_hash_tracking'] ) {
|
254 |
+
$settings['hash_tracking'] = 1;
|
255 |
+
}
|
256 |
+
|
257 |
+
// Sample rate for Performance addon.
|
258 |
+
if ( ! empty( $em_legacy_options['ga_speed_samplerate'] ) ) {
|
259 |
+
$settings['speedsamplerate'] = $em_legacy_options['ga_speed_samplerate'];
|
260 |
+
}
|
261 |
+
|
262 |
+
// Speed Sample rate for Performance addon.
|
263 |
+
if ( ! empty( $em_legacy_options['ga_user_samplerate'] ) ) {
|
264 |
+
$settings['samplerate'] = $em_legacy_options['ga_user_samplerate'];
|
265 |
+
}
|
266 |
+
|
267 |
+
// Process anonymize ip.
|
268 |
+
if ( ! empty( $em_legacy_options['ga_anonymize_ip'] ) ) {
|
269 |
+
$settings['anonymize_ips'] = $em_legacy_options['ga_anonymize_ip'] ? 1 : 0;
|
270 |
+
}
|
271 |
+
|
272 |
+
// Process Enhanced Link Attribution.
|
273 |
+
$settings['link_attribution'] = ! empty( $em_legacy_options['ga_enhanced_links'] ) ? true : false;
|
274 |
+
|
275 |
+
// Process AM notices option.
|
276 |
+
if ( ! empty( $em_legacy_options['hide_am_notices'] ) ) {
|
277 |
+
$settings['hide_am_notices'] = $em_legacy_options['hide_am_notices'] ? 1 : 0;
|
278 |
+
}
|
279 |
+
|
280 |
+
// Process Automatic updates.
|
281 |
+
if ( ! empty( $em_legacy_options['automatic_updates_minorversion'] ) ) {
|
282 |
+
$settings['automatic_updates'] = $em_legacy_options['automatic_updates_minorversion'] ? 'minor' : 'none';
|
283 |
+
}
|
284 |
+
|
285 |
+
// Process Usage Tracking.
|
286 |
+
if ( ! empty( $em_legacy_options['usage_tracking'] ) && 1 === $em_legacy_options['usage_tracking'] ) {
|
287 |
+
$settings['anonymous_data'] = 1;
|
288 |
+
}
|
289 |
+
|
290 |
+
// Process Cross Domain Tracking.
|
291 |
+
if ( ! empty( $em_legacy_options['ga_crossdomain_list'] ) ) {
|
292 |
+
$cross_domains = explode( ',', $em_legacy_options['ga_crossdomain_list'] );
|
293 |
+
$settings['cross_domains'] = array();
|
294 |
+
foreach ( $cross_domains as $cross_domain ) {
|
295 |
+
$settings['cross_domains'][] = array(
|
296 |
+
'domain' => $cross_domain,
|
297 |
+
);
|
298 |
+
}
|
299 |
+
}
|
300 |
+
|
301 |
+
// Process not tracked roles.
|
302 |
+
if ( ! empty( $em_legacy_options['track_exclude'] ) && is_array( $em_legacy_options['track_exclude'] ) ) {
|
303 |
+
foreach ( $em_legacy_options['track_exclude'] as $role ) {
|
304 |
+
if ( ! in_array( $role, $settings['ignore_users'], true ) ) {
|
305 |
+
$settings['ignore_users'][] = $role;
|
306 |
+
}
|
307 |
+
}
|
308 |
+
}
|
309 |
+
|
310 |
+
// Process roles that are allowed to view dashboard.
|
311 |
+
if ( ! empty( $em_legacy_options['access_back'] ) && is_array( $em_legacy_options['access_back'] ) ) {
|
312 |
+
foreach ( $em_legacy_options['access_back'] as $role ) {
|
313 |
+
if ( ! in_array( $role, $settings['view_reports'], true ) ) {
|
314 |
+
$settings['view_reports'][] = $role;
|
315 |
+
}
|
316 |
+
}
|
317 |
+
}
|
318 |
+
|
319 |
+
// Convert custom dimensions.
|
320 |
+
$settings['custom_dimensions'] = array();
|
321 |
+
|
322 |
+
// Author custom dimension.
|
323 |
+
if ( ! empty( $em_legacy_options['ga_author_dimindex'] ) && 0 !== $em_legacy_options['ga_author_dimindex'] ) {
|
324 |
+
$settings['custom_dimensions'][] = array(
|
325 |
+
'id' => intval( $em_legacy_options['ga_author_dimindex'] ),
|
326 |
+
'type' => 'author',
|
327 |
+
);
|
328 |
+
}
|
329 |
+
|
330 |
+
// Category custom dimension.
|
331 |
+
if ( ! empty( $em_legacy_options['ga_category_dimindex'] ) && 0 !== $em_legacy_options['ga_category_dimindex'] ) {
|
332 |
+
$settings['custom_dimensions'][] = array(
|
333 |
+
'id' => intval( $em_legacy_options['ga_category_dimindex'] ),
|
334 |
+
'type' => 'category',
|
335 |
+
);
|
336 |
+
}
|
337 |
+
|
338 |
+
// Tags custom dimension.
|
339 |
+
if ( ! empty( $em_legacy_options['ga_tag_dimindex'] ) && 0 !== $em_legacy_options['ga_tag_dimindex'] ) {
|
340 |
+
$settings['custom_dimensions'][] = array(
|
341 |
+
'id' => intval( $em_legacy_options['ga_tag_dimindex'] ),
|
342 |
+
'type' => 'tags',
|
343 |
+
);
|
344 |
+
}
|
345 |
+
|
346 |
+
// Convert "User Type" to "Logged in" custom dimension.
|
347 |
+
if ( ! empty( $em_legacy_options['ga_user_dimindex'] ) && 0 !== $em_legacy_options['ga_user_dimindex'] ) {
|
348 |
+
$settings['custom_dimensions'][] = array(
|
349 |
+
'id' => intval( $em_legacy_options['ga_tag_dimindex'] ),
|
350 |
+
'type' => 'logged_in',
|
351 |
+
);
|
352 |
+
}
|
353 |
+
|
354 |
+
// Transfer Google Optimize
|
355 |
+
if ( ! empty( $em_legacy_options['optimize_tracking'] ) && 1 === $em_legacy_options['optimize_tracking'] ) {
|
356 |
+
if ( ! empty( $em_legacy_options['optimize_containerid'] ) ) {
|
357 |
+
$settings['goptimize_container'] = $em_legacy_options['optimize_containerid'];
|
358 |
+
// Maybe also page hide
|
359 |
+
if ( ! empty( $em_legacy_options['optimize_pagehiding'] ) ) {
|
360 |
+
$settings['goptimize_pagehide'] = true;
|
361 |
+
}
|
362 |
+
}
|
363 |
+
}
|
364 |
+
|
365 |
+
// Transfer enhanced eCommerce
|
366 |
+
if ( ! empty( $em_legacy_options['ecommerce_mode'] ) && 'enhanced' === $em_legacy_options['ecommerce_mode'] ) {
|
367 |
+
$settings['enhanced_ecommerce'] = true;
|
368 |
+
}
|
369 |
+
|
370 |
+
// Transfer Demographics
|
371 |
+
$settings['demographics'] = ! empty( $em_legacy_options['ga_dash_remarketing'] ) ? 1 : 0;
|
372 |
+
|
373 |
+
// Enable compat mode
|
374 |
+
$settings['gatracker_compatibility_mode'] = true;
|
375 |
+
|
376 |
+
|
377 |
+
$settings['gadwp_migrated'] = time();
|
378 |
+
|
379 |
+
// Add transient to trigger redirect.
|
380 |
+
set_transient( '_exactmetrics_activation_redirect', 1, 60 );
|
381 |
+
|
382 |
+
return $settings;
|
383 |
+
}
|
384 |
+
|
385 |
+
public function get_exactmetrics_default_values() {
|
386 |
+
return array(
|
387 |
+
'enable_affiliate_links' => true,
|
388 |
+
'affiliate_links' => array(
|
389 |
+
array(
|
390 |
+
'path' => '/go/',
|
391 |
+
'label' => 'affiliate',
|
392 |
+
),
|
393 |
+
array(
|
394 |
+
'path' => '/recommend/',
|
395 |
+
'label' => 'affiliate',
|
396 |
+
)
|
397 |
+
),
|
398 |
+
'demographics' => 1,
|
399 |
+
'ignore_users' => array( 'administrator', 'editor' ),
|
400 |
+
'dashboards_disabled' => 0,
|
401 |
+
'anonymize_ips' => 0,
|
402 |
+
'extensions_of_files' => 'doc,pdf,ppt,zip,xls,docx,pptx,xlsx',
|
403 |
+
'subdomain_tracking' => '',
|
404 |
+
'link_attribution' => true,
|
405 |
+
'tag_links_in_rss' => true,
|
406 |
+
'allow_anchor' => 0,
|
407 |
+
'add_allow_linker' => 0,
|
408 |
+
'custom_code' => '',
|
409 |
+
'save_settings' => array( 'administrator' ),
|
410 |
+
'view_reports' => array( 'administrator', 'editor' ),
|
411 |
+
'events_mode' => 'js',
|
412 |
+
'tracking_mode' => 'analytics',
|
413 |
+
);
|
414 |
+
}
|
415 |
+
|
416 |
+
/**
|
417 |
+
* Check if ThirstyAffiliates plugin is installed and use the link prefix value in the affiliate settings.
|
418 |
+
*
|
419 |
+
* @return void
|
420 |
+
*/
|
421 |
+
public function maybe_import_thirstyaffiliates_options() {
|
422 |
+
|
423 |
+
// Check if ThirstyAffiliates is installed.
|
424 |
+
if ( ! function_exists( 'ThirstyAffiliates' ) ) {
|
425 |
+
return;
|
426 |
+
}
|
427 |
+
|
428 |
+
$link_prefix = get_option( 'ta_link_prefix', 'recommends' );
|
429 |
+
|
430 |
+
if ( $link_prefix === 'custom' ) {
|
431 |
+
$link_prefix = get_option( 'ta_link_prefix_custom', 'recommends' );
|
432 |
+
}
|
433 |
+
|
434 |
+
if ( ! empty( $link_prefix ) ) {
|
435 |
+
|
436 |
+
// Check if prefix exists.
|
437 |
+
$prefix_set = false;
|
438 |
+
foreach ( $this->new_settings['affiliate_links'] as $affiliate_link ) {
|
439 |
+
if ( $link_prefix === trim( $affiliate_link['path'], '/' ) ) {
|
440 |
+
$prefix_set = true;
|
441 |
+
break;
|
442 |
+
}
|
443 |
+
}
|
444 |
+
|
445 |
+
if ( ! $prefix_set ) {
|
446 |
+
$this->new_settings['affiliate_links'][] = array(
|
447 |
+
'path' => '/' . $link_prefix . '/',
|
448 |
+
'label' => 'affiliate',
|
449 |
+
);
|
450 |
+
}
|
451 |
+
}
|
452 |
+
}
|
453 |
+
}
|
includes/frontend/class-tracking-abstract.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tracking abstract class.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @author Chris Christoff
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
class ExactMetrics_Tracking_Abstract {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Holds the name of the tracking type.
|
20 |
+
*
|
21 |
+
* @since 6.0.0
|
22 |
+
* @access public
|
23 |
+
*
|
24 |
+
* @var string $name Name of the tracking type.
|
25 |
+
*/
|
26 |
+
public $name = 'abstract';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Version of the tracking class.
|
30 |
+
*
|
31 |
+
* @since 6.0.0
|
32 |
+
* @access public
|
33 |
+
*
|
34 |
+
* @var string $version Version of the tracking class.
|
35 |
+
*/
|
36 |
+
public $version = '1.0.0';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Primary class constructor.
|
40 |
+
*
|
41 |
+
* @since 6.0.0
|
42 |
+
* @access public
|
43 |
+
*/
|
44 |
+
public function __construct() {
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get frontend tracking options.
|
50 |
+
*
|
51 |
+
* This function is used to return an array of parameters
|
52 |
+
* for the frontend_output() function to output. These are
|
53 |
+
* generally dimensions and turned on GA features.
|
54 |
+
*
|
55 |
+
* @since 6.0.0
|
56 |
+
* @access public
|
57 |
+
*
|
58 |
+
* @return array Array of the options to use.
|
59 |
+
*/
|
60 |
+
public function frontend_tracking_options( ) {
|
61 |
+
return array();
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Get frontend output.
|
66 |
+
*
|
67 |
+
* This function is used to return the Javascript
|
68 |
+
* to output in the head of the page for the given
|
69 |
+
* tracking method.
|
70 |
+
*
|
71 |
+
* @since 6.0.0
|
72 |
+
* @access public
|
73 |
+
*
|
74 |
+
* @return string Javascript to output.
|
75 |
+
*/
|
76 |
+
public function frontend_output( ) {
|
77 |
+
return "<!-- ExactMetrics Abstract Tracking class -->";
|
78 |
+
}
|
79 |
+
}
|
includes/frontend/events/class-analytics-events.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Events JS class.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @subpackage Events
|
9 |
+
* @author Chris Christoff
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
class ExactMetrics_Analytics_Events {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Holds the name of the events type.
|
21 |
+
*
|
22 |
+
* @since 6.0.0
|
23 |
+
* @access public
|
24 |
+
*
|
25 |
+
* @var string $name Name of the events type.
|
26 |
+
*/
|
27 |
+
public $name = 'js';
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Version of the events class.
|
31 |
+
*
|
32 |
+
* @since 6.0.0
|
33 |
+
* @access public
|
34 |
+
*
|
35 |
+
* @var string $version Version of the events class.
|
36 |
+
*/
|
37 |
+
public $version = '1.0.0';
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Primary class constructor.
|
41 |
+
*
|
42 |
+
* @since 6.0.0
|
43 |
+
* @access public
|
44 |
+
*/
|
45 |
+
public function __construct() {
|
46 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'output_javascript' ), 9 );
|
47 |
+
//add_action( 'login_head', array( $this, 'output_javascript' ), 9 );
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Outputs the Javascript for JS tracking on the page.
|
52 |
+
*
|
53 |
+
* @since 6.0.0
|
54 |
+
* @access public
|
55 |
+
*
|
56 |
+
* @return string
|
57 |
+
*/
|
58 |
+
public function output_javascript() {
|
59 |
+
// Affiliate Links
|
60 |
+
$inbound_paths = exactmetrics_get_option( 'affiliate_links', array() );
|
61 |
+
if ( ! is_array( $inbound_paths ) ) {
|
62 |
+
$inbound_paths = array();
|
63 |
+
} else {
|
64 |
+
foreach( $inbound_paths as $index => $pair ) {
|
65 |
+
// if empty pair, unset and continue
|
66 |
+
if ( empty( $pair['path'] ) ) {
|
67 |
+
unset( $inbound_paths[$index] );
|
68 |
+
continue;
|
69 |
+
}
|
70 |
+
|
71 |
+
// if path does not start with a /, start it with that
|
72 |
+
$path = ! empty( $pair['path'] ) ? $pair['path'] : 'aff';
|
73 |
+
$inbound_paths[$index]['path'] = trim( $path );
|
74 |
+
|
75 |
+
// js escape the link label
|
76 |
+
$label = ! empty( $pair['label'] ) ? $pair['label'] : 'aff';
|
77 |
+
$inbound_paths[$index]['label'] = esc_js( trim( $label ) );
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
$inbound_paths = wp_json_encode( $inbound_paths );
|
82 |
+
|
83 |
+
// Get download extensions to track
|
84 |
+
$download_extensions = exactmetrics_get_option( 'extensions_of_files', '' );
|
85 |
+
$download_extensions = explode( ',', str_replace( '.', '', $download_extensions ) );
|
86 |
+
if ( ! is_array( $download_extensions ) ) {
|
87 |
+
$download_extensions = array( $download_extensions );
|
88 |
+
}
|
89 |
+
$i = 0;
|
90 |
+
foreach( $download_extensions as $extension ){
|
91 |
+
$download_extensions[ $i ] = esc_js( trim( $extension ) );
|
92 |
+
$i++;
|
93 |
+
}
|
94 |
+
|
95 |
+
$download_extensions = implode( ",", $download_extensions );
|
96 |
+
|
97 |
+
$hash_tracking = exactmetrics_get_option( 'hash_tracking', false ) ? 'true' : 'false';
|
98 |
+
|
99 |
+
$suffix = ( defined( 'WP_DEBUG' ) && WP_DEBUG ) || ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
100 |
+
if ( ! file_exists( EXACTMETRICS_PLUGIN_DIR . 'assets/js/frontend.min.js' ) ) {
|
101 |
+
$suffix = '';
|
102 |
+
}
|
103 |
+
wp_enqueue_script( 'exactmetrics-frontend-script', plugins_url( 'assets/js/frontend' . $suffix . '.js', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version(), false );
|
104 |
+
wp_localize_script(
|
105 |
+
'exactmetrics-frontend-script',
|
106 |
+
'exactmetrics_frontend',
|
107 |
+
array(
|
108 |
+
'js_events_tracking' => 'true',
|
109 |
+
'download_extensions' => $download_extensions, /* Let's get the extensions to track */
|
110 |
+
'inbound_paths' => $inbound_paths, /* Let's get the internal paths to track */
|
111 |
+
'home_url' => home_url(), /* Let's get the url to compare for external/internal use */
|
112 |
+
'hash_tracking' => $hash_tracking, /* Should hash track */
|
113 |
+
)
|
114 |
+
);
|
115 |
+
}
|
116 |
+
}
|
includes/frontend/events/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
includes/frontend/frontend.php
ADDED
@@ -0,0 +1,396 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Frontend events tracking.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @author Chris Christoff
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Get frontend tracking options.
|
19 |
+
*
|
20 |
+
* This function is used to return an array of parameters
|
21 |
+
* for the frontend_output() function to output. These are
|
22 |
+
* generally dimensions and turned on GA features.
|
23 |
+
*
|
24 |
+
* @since 7.0.0
|
25 |
+
* @access public
|
26 |
+
*
|
27 |
+
* @return array Array of the options to use.
|
28 |
+
*/
|
29 |
+
function exactmetrics_tracking_script( ) {
|
30 |
+
require_once plugin_dir_path( EXACTMETRICS_PLUGIN_FILE ) . 'includes/frontend/class-tracking-abstract.php';
|
31 |
+
|
32 |
+
$mode = is_preview() ? 'preview' : 'analytics';
|
33 |
+
|
34 |
+
do_action( 'exactmetrics_tracking_before_' . $mode );
|
35 |
+
do_action( 'exactmetrics_tracking_before', $mode );
|
36 |
+
if ( $mode === 'preview' ) {
|
37 |
+
require_once plugin_dir_path( EXACTMETRICS_PLUGIN_FILE ) . 'includes/frontend/tracking/class-tracking-preview.php';
|
38 |
+
$tracking = new ExactMetrics_Tracking_Preview();
|
39 |
+
echo $tracking->frontend_output();
|
40 |
+
} else {
|
41 |
+
require_once plugin_dir_path( EXACTMETRICS_PLUGIN_FILE ) . 'includes/frontend/tracking/class-tracking-analytics.php';
|
42 |
+
$tracking = new ExactMetrics_Tracking_Analytics();
|
43 |
+
echo $tracking->frontend_output();
|
44 |
+
}
|
45 |
+
|
46 |
+
do_action( 'exactmetrics_tracking_after_' . $mode );
|
47 |
+
do_action( 'exactmetrics_tracking_after', $mode );
|
48 |
+
}
|
49 |
+
add_action( 'wp_head', 'exactmetrics_tracking_script', 6 );
|
50 |
+
//add_action( 'login_head', 'exactmetrics_tracking_script', 6 );
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Get frontend tracking options.
|
54 |
+
*
|
55 |
+
* This function is used to return an array of parameters
|
56 |
+
* for the frontend_output() function to output. These are
|
57 |
+
* generally dimensions and turned on GA features.
|
58 |
+
*
|
59 |
+
* @since 6.0.0
|
60 |
+
* @access public
|
61 |
+
*
|
62 |
+
* @return array Array of the options to use.
|
63 |
+
*/
|
64 |
+
function exactmetrics_events_tracking( ) {
|
65 |
+
$track_user = exactmetrics_track_user();
|
66 |
+
|
67 |
+
if ( $track_user ) {
|
68 |
+
require_once plugin_dir_path( EXACTMETRICS_PLUGIN_FILE ) . 'includes/frontend/events/class-analytics-events.php';
|
69 |
+
new ExactMetrics_Analytics_Events();
|
70 |
+
} else {
|
71 |
+
// User is in the disabled group or events mode is off
|
72 |
+
}
|
73 |
+
}
|
74 |
+
add_action( 'template_redirect', 'exactmetrics_events_tracking', 9 );
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Add the UTM source parameters in the RSS feeds to track traffic.
|
78 |
+
*
|
79 |
+
* @since 6.0.0
|
80 |
+
* @access public
|
81 |
+
*
|
82 |
+
* @param string $guid The link for the RSS feed.
|
83 |
+
*
|
84 |
+
* @return string The new link for the RSS feed.
|
85 |
+
*/
|
86 |
+
function exactmetrics_rss_link_tagger( $guid ) {
|
87 |
+
global $post;
|
88 |
+
|
89 |
+
if ( exactmetrics_get_option( 'tag_links_in_rss', false ) ){
|
90 |
+
if ( is_feed() ) {
|
91 |
+
if ( exactmetrics_get_option( 'allow_anchor', false ) ) {
|
92 |
+
$delimiter = '#';
|
93 |
+
} else {
|
94 |
+
$delimiter = '?';
|
95 |
+
if ( strpos( $guid, $delimiter ) > 0 ) {
|
96 |
+
$delimiter = '&';
|
97 |
+
}
|
98 |
+
}
|
99 |
+
return $guid . $delimiter . 'utm_source=rss&utm_medium=rss&utm_campaign=' . urlencode( $post->post_name );
|
100 |
+
}
|
101 |
+
}
|
102 |
+
return $guid;
|
103 |
+
}
|
104 |
+
add_filter( 'the_permalink_rss', 'exactmetrics_rss_link_tagger', 99 );
|
105 |
+
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Checks used for loading the frontend scripts/admin bar button.
|
109 |
+
*/
|
110 |
+
function exactmetrics_prevent_loading_frontend_reports() {
|
111 |
+
return ! current_user_can( 'exactmetrics_view_dashboard' ) || exactmetrics_get_option( 'hide_admin_bar_reports' ) || function_exists( 'exactmetrics_is_reports_page' ) && exactmetrics_is_reports_page();
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Add an admin bar menu item on the frontend.
|
116 |
+
*
|
117 |
+
* @since 7.5.0
|
118 |
+
*
|
119 |
+
* @return void
|
120 |
+
*/
|
121 |
+
function exactmetrics_add_admin_bar_menu() {
|
122 |
+
if ( exactmetrics_prevent_loading_frontend_reports() ) {
|
123 |
+
return;
|
124 |
+
}
|
125 |
+
|
126 |
+
global $wp_admin_bar;
|
127 |
+
|
128 |
+
$args = array(
|
129 |
+
'id' => 'exactmetrics_frontend_button',
|
130 |
+
'title' => '<span class="ab-icon dashicons-before dashicons-chart-bar"></span> ExactMetrics', // Maybe allow translation?
|
131 |
+
'href' => '#',
|
132 |
+
);
|
133 |
+
|
134 |
+
if ( method_exists( $wp_admin_bar, 'add_menu' ) ) {
|
135 |
+
$wp_admin_bar->add_menu( $args );
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
add_action( 'admin_bar_menu', 'exactmetrics_add_admin_bar_menu', 999 );
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Load the scripts needed for the admin bar.
|
143 |
+
*
|
144 |
+
* @since 7.5.0
|
145 |
+
*
|
146 |
+
* @return void
|
147 |
+
*/
|
148 |
+
function exactmetrics_frontend_admin_bar_scripts() {
|
149 |
+
if ( exactmetrics_prevent_loading_frontend_reports() ) {
|
150 |
+
return;
|
151 |
+
}
|
152 |
+
|
153 |
+
$version_path = exactmetrics_is_pro_version() ? 'pro' : 'lite';
|
154 |
+
$rtl = is_rtl() ? '.rtl' : '';
|
155 |
+
$frontend_js_url = defined( 'EXACTMETRICS_LOCAL_FRONTEND_JS_URL' ) && EXACTMETRICS_LOCAL_FRONTEND_JS_URL ? EXACTMETRICS_LOCAL_FRONTEND_JS_URL : plugins_url( $version_path . '/assets/vue/js/frontend.js', EXACTMETRICS_PLUGIN_FILE );
|
156 |
+
|
157 |
+
if ( ! defined( 'EXACTMETRICS_LOCAL_FRONTEND_JS_URL' ) ) {
|
158 |
+
wp_enqueue_style( 'exactmetrics-vue-frontend-style', plugins_url( $version_path . '/assets/vue/css/frontend' . $rtl . '.css', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version() );
|
159 |
+
wp_enqueue_script( 'exactmetrics-vue-vendors', plugins_url( $version_path . '/assets/vue/js/chunk-frontend-vendors.js', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version(), true );
|
160 |
+
wp_enqueue_script( 'exactmetrics-vue-common', plugins_url( $version_path . '/assets/vue/js/chunk-common.js', EXACTMETRICS_PLUGIN_FILE ), array(), exactmetrics_get_asset_version(), true );
|
161 |
+
} else {
|
162 |
+
wp_enqueue_script( 'exactmetrics-vue-vendors', EXACTMETRICS_LOCAL_VENDORS_JS_URL, array(), exactmetrics_get_asset_version(), true );
|
163 |
+
wp_enqueue_script( 'exactmetrics-vue-common', EXACTMETRICS_LOCAL_COMMON_JS_URL, array(), exactmetrics_get_asset_version(), true );
|
164 |
+
}
|
165 |
+
|
166 |
+
wp_register_script( 'exactmetrics-vue-frontend', $frontend_js_url, array(), exactmetrics_get_asset_version(), true );
|
167 |
+
wp_enqueue_script( 'exactmetrics-vue-frontend' );
|
168 |
+
|
169 |
+
$page_title = is_singular() ? get_the_title() : exactmetrics_get_page_title();
|
170 |
+
// We do not have a current auth.
|
171 |
+
$site_auth = ExactMetrics()->auth->get_viewname();
|
172 |
+
$ms_auth = is_multisite() && ExactMetrics()->auth->get_network_viewname();
|
173 |
+
|
174 |
+
// Check if any of the other admin scripts are enqueued, if so, use their object.
|
175 |
+
if ( ! wp_script_is( 'exactmetrics-vue-script' ) && ! wp_script_is( 'exactmetrics-vue-reports' ) && ! wp_script_is( 'exactmetrics-vue-widget' ) ) {
|
176 |
+
wp_localize_script(
|
177 |
+
'exactmetrics-vue-frontend',
|
178 |
+
'exactmetrics',
|
179 |
+
array(
|
180 |
+
'ajax' => admin_url( 'admin-ajax.php' ),
|
181 |
+
'nonce' => wp_create_nonce( 'mi-admin-nonce' ),
|
182 |
+
'network' => is_network_admin(),
|
183 |
+
'translations' => wp_get_jed_locale_data( exactmetrics_is_pro_version() ? 'exactmetrics-premium' : 'google-analytics-dashboard-for-wp' ),
|
184 |
+
'assets' => plugins_url( $version_path . '/assets/vue', EXACTMETRICS_PLUGIN_FILE ),
|
185 |
+
'addons_url' => is_multisite() ? network_admin_url( 'admin.php?page=exactmetrics_network#/addons' ) : admin_url( 'admin.php?page=exactmetrics_settings#/addons' ),
|
186 |
+
'page_id' => is_singular() ? get_the_ID() : false,
|
187 |
+
'page_title' => $page_title,
|
188 |
+
'plugin_version' => EXACTMETRICS_VERSION,
|
189 |
+
'shareasale_id' => exactmetrics_get_shareasale_id(),
|
190 |
+
'shareasale_url' => exactmetrics_get_shareasale_url( exactmetrics_get_shareasale_id(), '' ),
|
191 |
+
'is_admin' => is_admin(),
|
192 |
+
'reports_url' => add_query_arg( 'page', 'exactmetrics_reports', admin_url( 'admin.php' ) ),
|
193 |
+
'authed' => $site_auth || $ms_auth,
|
194 |
+
'getting_started_url' => is_multisite() ? network_admin_url( 'admin.php?page=exactmetrics_network#/about/getting-started' ) : admin_url( 'admin.php?page=exactmetrics_settings#/about/getting-started' ),
|
195 |
+
'wizard_url' => admin_url( 'index.php?page=exactmetrics-onboarding' ),
|
196 |
+
)
|
197 |
+
);
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
add_action( 'wp_enqueue_scripts', 'exactmetrics_frontend_admin_bar_scripts' );
|
202 |
+
add_action( 'admin_enqueue_scripts', 'exactmetrics_frontend_admin_bar_scripts', 1005 );
|
203 |
+
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Load the tracking notice for logged in users.
|
207 |
+
*/
|
208 |
+
function exactmetrics_administrator_tracking_notice() {
|
209 |
+
// Don't do anything for guests.
|
210 |
+
if ( ! is_user_logged_in() ) {
|
211 |
+
return;
|
212 |
+
}
|
213 |
+
|
214 |
+
// Only show this to users who are not tracked.
|
215 |
+
if ( exactmetrics_track_user() ) {
|
216 |
+
return;
|
217 |
+
}
|
218 |
+
|
219 |
+
// Only show when tracking.
|
220 |
+
$ua = exactmetrics_get_ua();
|
221 |
+
if ( empty( $ua ) ) {
|
222 |
+
return;
|
223 |
+
}
|
224 |
+
|
225 |
+
// Don't show if already dismissed.
|
226 |
+
if ( get_option( 'exactmetrics_frontend_tracking_notice_viewed', false ) ) {
|
227 |
+
return;
|
228 |
+
}
|
229 |
+
|
230 |
+
?>
|
231 |
+
<div class="exactmetrics-tracking-notice exactmetrics-tracking-notice-hide">
|
232 |
+
<div class="exactmetrics-tracking-notice-icon">
|
233 |
+
<img src="<?php echo esc_url( plugins_url( 'assets/images/em-mascot.png', EXACTMETRICS_PLUGIN_FILE ) ); ?>" width="40" alt="ExactMetrics Mascot" />
|
234 |
+
</div>
|
235 |
+
<div class="exactmetrics-tracking-notice-text">
|
236 |
+
<h3><?php esc_html_e( 'Tracking is Disabled for Administrators', 'exactmetrics-premium' ); ?></h3>
|
237 |
+
<p>
|
238 |
+
<?php
|
239 |
+
$doc_url = 'https://exactmetrics.com/docs/tracking-disabled-administrators-editors';
|
240 |
+
$doc_url = add_query_arg( array(
|
241 |
+
'utm_source' => exactmetrics_is_pro_version() ? 'proplugin' : 'liteplugin',
|
242 |
+
'utm_medium' => 'frontend-notice',
|
243 |
+
'utm_campaign' => 'admin-tracking-doc',
|
244 |
+
), $doc_url );
|
245 |
+
// Translators: %s is the link to the article where more details about tracking are listed.
|
246 |
+
printf( esc_html__( 'To keep stats accurate, we do not load Google Analytics scripts for admin users. %1$sLearn More »%2$s', 'exactmetrics-premium' ), '<a href="' . esc_url( $doc_url ) . '" target="_blank">', '</a>' );
|
247 |
+
?>
|
248 |
+
</p>
|
249 |
+
</div>
|
250 |
+
<div class="exactmetrics-tracking-notice-close">×</div>
|
251 |
+
</div>
|
252 |
+
<style type="text/css">
|
253 |
+
.exactmetrics-tracking-notice {
|
254 |
+
position: fixed;
|
255 |
+
bottom: 20px;
|
256 |
+
right: 15px;
|
257 |
+
font-family: Arial, Helvetica, "Trebuchet MS", sans-serif;
|
258 |
+
background: #fff;
|
259 |
+
box-shadow: 0 0 10px 0 #dedede;
|
260 |
+
padding: 6px 5px;
|
261 |
+
display: flex;
|
262 |
+
align-items: center;
|
263 |
+
justify-content: center;
|
264 |
+
width: 380px;
|
265 |
+
max-width: calc( 100% - 30px );
|
266 |
+
border-radius: 6px;
|
267 |
+
transition: bottom 700ms ease;
|
268 |
+
z-index: 10000;
|
269 |
+
}
|
270 |
+
|
271 |
+
.exactmetrics-tracking-notice h3 {
|
272 |
+
font-size: 13px;
|
273 |
+
color: #222;
|
274 |
+
font-weight: 700;
|
275 |
+
margin: 0 0 8px;
|
276 |
+
padding: 0;
|
277 |
+
line-height: 1;
|
278 |
+
border: none;
|
279 |
+
}
|
280 |
+
|
281 |
+
.exactmetrics-tracking-notice p {
|
282 |
+
font-size: 13px;
|
283 |
+
color: #7f7f7f;
|
284 |
+
font-weight: 400;
|
285 |
+
margin: 0;
|
286 |
+
padding: 0;
|
287 |
+
line-height: 1.2;
|
288 |
+
border: none;
|
289 |
+
}
|
290 |
+
|
291 |
+
.exactmetrics-tracking-notice p a {
|
292 |
+
color: #7f7f7f;
|
293 |
+
font-size: 13px;
|
294 |
+
line-height: 1.2;
|
295 |
+
margin: 0;
|
296 |
+
padding: 0;
|
297 |
+
text-decoration: underline;
|
298 |
+
font-weight: 400;
|
299 |
+
}
|
300 |
+
|
301 |
+
.exactmetrics-tracking-notice p a:hover {
|
302 |
+
color: #7f7f7f;
|
303 |
+
text-decoration: none;
|
304 |
+
}
|
305 |
+
|
306 |
+
.exactmetrics-tracking-notice-icon img {
|
307 |
+
height: auto;
|
308 |
+
display: block;
|
309 |
+
margin: 0;
|
310 |
+
}
|
311 |
+
|
312 |
+
.exactmetrics-tracking-notice-icon {
|
313 |
+
padding: 14px;
|
314 |
+
background-color: #f4f3f7;
|
315 |
+
border-radius: 6px;
|
316 |
+
flex-grow: 0;
|
317 |
+
flex-shrink: 0;
|
318 |
+
margin-right: 12px;
|
319 |
+
}
|
320 |
+
|
321 |
+
.exactmetrics-tracking-notice-close {
|
322 |
+
padding: 0;
|
323 |
+
margin: 0 3px 0 0;
|
324 |
+
border: none;
|
325 |
+
box-shadow: none;
|
326 |
+
border-radius: 0;
|
327 |
+
color: #7f7f7f;
|
328 |
+
background: transparent;
|
329 |
+
line-height: 1;
|
330 |
+
align-self: flex-start;
|
331 |
+
cursor: pointer;
|
332 |
+
font-weight: 400;
|
333 |
+
}
|
334 |
+
|
335 |
+
.exactmetrics-tracking-notice.exactmetrics-tracking-notice-hide {
|
336 |
+
bottom: -200px;
|
337 |
+
}
|
338 |
+
</style>
|
339 |
+
<?php
|
340 |
+
|
341 |
+
if ( ! wp_script_is( 'jquery', 'queue' ) ) {
|
342 |
+
wp_enqueue_script( 'jquery' );
|
343 |
+
}
|
344 |
+
?>
|
345 |
+
<script>
|
346 |
+
if ( 'undefined' !== typeof jQuery ) {
|
347 |
+
jQuery( document ).ready( function ( $ ) {
|
348 |
+
/* Don't show the notice if we don't have a way to hide it (no js, no jQuery). */
|
349 |
+
$( document.querySelector( '.exactmetrics-tracking-notice' ) ).removeClass( 'exactmetrics-tracking-notice-hide' );
|
350 |
+
$( document.querySelector( '.exactmetrics-tracking-notice-close' ) ).on( 'click', function ( e ) {
|
351 |
+
e.preventDefault();
|
352 |
+
$( this ).closest( '.exactmetrics-tracking-notice' ).addClass( 'exactmetrics-tracking-notice-hide' );
|
353 |
+
$.ajax( {
|
354 |
+
url: '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>',
|
355 |
+
method: 'POST',
|
356 |
+
data: {
|
357 |
+
action: 'exactmetrics_dismiss_tracking_notice',
|
358 |
+
nonce: '<?php echo esc_js( wp_create_nonce( 'exactmetrics-tracking-notice' ) ); ?>',
|
359 |
+
}
|
360 |
+
} );
|
361 |
+
} );
|
362 |
+
} );
|
363 |
+
}
|
364 |
+
</script>
|
365 |
+
<?php
|
366 |
+
}
|
367 |
+
|
368 |
+
add_action( 'wp_footer', 'exactmetrics_administrator_tracking_notice', 300 );
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Ajax handler to hide the tracking notice.
|
372 |
+
*/
|
373 |
+
function exactmetrics_dismiss_tracking_notice() {
|
374 |
+
|
375 |
+
check_ajax_referer( 'exactmetrics-tracking-notice', 'nonce' );
|
376 |
+
|
377 |
+
update_option( 'exactmetrics_frontend_tracking_notice_viewed', 1 );
|
378 |
+
|
379 |
+
wp_die();
|
380 |
+
|
381 |
+
}
|
382 |
+
|
383 |
+
add_action( 'wp_ajax_exactmetrics_dismiss_tracking_notice', 'exactmetrics_dismiss_tracking_notice' );
|
384 |
+
|
385 |
+
/**
|
386 |
+
* If the legacy shortcodes are not registered, make sure they don't output.
|
387 |
+
*/
|
388 |
+
function exactmetrics_maybe_handle_legacy_shortcodes() {
|
389 |
+
|
390 |
+
if ( ! shortcode_exists( 'gadwp_useroptout' ) ) {
|
391 |
+
add_shortcode( 'gadwp_useroptout', '__return_empty_string' );
|
392 |
+
}
|
393 |
+
|
394 |
+
}
|
395 |
+
|
396 |
+
add_action( 'init', 'exactmetrics_maybe_handle_legacy_shortcodes', 1000 );
|
includes/frontend/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
includes/frontend/seedprod.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* SeedProd Tracking for 404 and Coming Soon.
|
4 |
+
*
|
5 |
+
* @since 7.3.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @author Chris Christoff
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
// 1. Disable SeedProd settings (done in seedprod)
|
17 |
+
// 2. Output tracking code, if settings is not set to use wp_head() (done in seedprod and below)
|
18 |
+
// 3. Disable ga_tracking in their setting (done in seedprod)
|
19 |
+
function exactmetrics_seedprod_tracking( $settings ) {
|
20 |
+
require_once plugin_dir_path( EXACTMETRICS_PLUGIN_FILE ) . 'includes/frontend/class-tracking-abstract.php';
|
21 |
+
|
22 |
+
|
23 |
+
do_action( 'exactmetrics_tracking_before_analytics' );
|
24 |
+
do_action( 'exactmetrics_tracking_before', 'analytics' );
|
25 |
+
|
26 |
+
require_once plugin_dir_path( EXACTMETRICS_PLUGIN_FILE ) . 'includes/frontend/tracking/class-tracking-analytics.php';
|
27 |
+
$tracking = new ExactMetrics_Tracking_Analytics();
|
28 |
+
echo $tracking->frontend_output();
|
29 |
+
|
30 |
+
do_action( 'exactmetrics_tracking_after_analytics' );
|
31 |
+
do_action( 'exactmetrics_tracking_after', 'analytics' );
|
32 |
+
|
33 |
+
$track_user = exactmetrics_track_user();
|
34 |
+
|
35 |
+
if ( $track_user ) {
|
36 |
+
require_once plugin_dir_path( EXACTMETRICS_PLUGIN_FILE ) . 'includes/frontend/events/class-analytics-events.php';
|
37 |
+
new ExactMetrics_Analytics_Events();
|
38 |
+
|
39 |
+
// Let's run form tracking if we find it
|
40 |
+
if ( function_exists( 'exactmetrics_forms_output_after_script' ) ) {
|
41 |
+
exactmetrics_forms_output_after_script( array() );
|
42 |
+
}
|
43 |
+
}
|
44 |
+
}
|
45 |
+
add_action( 'seedprod_exactmetrics_output_tracking', 'exactmetrics_seedprod_tracking', 6, 1 );
|
includes/frontend/tracking/class-tracking-analytics.php
ADDED
@@ -0,0 +1,346 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tracking analytics.js class.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @author Chris Christoff
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
class ExactMetrics_Tracking_Analytics extends ExactMetrics_Tracking_Abstract {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Holds the name of the tracking type.
|
20 |
+
*
|
21 |
+
* @since 6.0.0
|
22 |
+
* @access public
|
23 |
+
*
|
24 |
+
* @var string $name Name of the tracking type.
|
25 |
+
*/
|
26 |
+
public $name = 'analytics';
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Version of the tracking class.
|
30 |
+
*
|
31 |
+
* @since 6.0.0
|
32 |
+
* @access public
|
33 |
+
*
|
34 |
+
* @var string $version Version of the tracking class.
|
35 |
+
*/
|
36 |
+
public $version = '1.0.0';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Primary class constructor.
|
40 |
+
*
|
41 |
+
* @since 6.0.0
|
42 |
+
* @access public
|
43 |
+
*/
|
44 |
+
public function __construct() {
|
45 |
+
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get frontend tracking options.
|
50 |
+
*
|
51 |
+
* This function is used to return an array of parameters
|
52 |
+
* for the frontend_output() function to output. These are
|
53 |
+
* generally dimensions and turned on GA features.
|
54 |
+
*
|
55 |
+
* @since 6.0.0
|
56 |
+
* @access public
|
57 |
+
*
|
58 |
+
* @return array Array of the options to use.
|
59 |
+
*/
|
60 |
+
public function frontend_tracking_options( ) {
|
61 |
+
global $wp_query;
|
62 |
+
$options = array();
|
63 |
+
|
64 |
+
$ua_code = exactmetrics_get_ua_to_output();
|
65 |
+
if ( empty( $ua_code ) ) {
|
66 |
+
return $options;
|
67 |
+
}
|
68 |
+
|
69 |
+
$track_user = exactmetrics_track_user();
|
70 |
+
|
71 |
+
if ( ! $track_user ) {
|
72 |
+
$options['create'] = "'create', '" . esc_js( $ua_code ) . "', '" . esc_js( 'auto' ) . "'";
|
73 |
+
$options['forceSSL'] = "'set', 'forceSSL', true";
|
74 |
+
$options['send'] = "'send','pageview'";
|
75 |
+
return $options;
|
76 |
+
}
|
77 |
+
|
78 |
+
$domain = esc_attr( exactmetrics_get_option( 'subdomain_tracking', 'auto' ) );
|
79 |
+
|
80 |
+
$cross_domains = exactmetrics_get_option( 'cross_domains', array() );
|
81 |
+
$allow_anchor = exactmetrics_get_option( 'allow_anchor', false );
|
82 |
+
|
83 |
+
|
84 |
+
$create = array();
|
85 |
+
if ( $allow_anchor ) {
|
86 |
+
$create['allowAnchor'] = true;
|
87 |
+
}
|
88 |
+
|
89 |
+
if ( is_array( $cross_domains ) && ! empty( $cross_domains ) ) {
|
90 |
+
$create['allowLinker'] = true;
|
91 |
+
}
|
92 |
+
|
93 |
+
if ( class_exists( 'ExactMetrics_AMP' ) ) {
|
94 |
+
$create['useAmpClientId'] = true;
|
95 |
+
}
|
96 |
+
|
97 |
+
$create = apply_filters( 'exactmetrics_frontend_tracking_options_analytics_create', $create );
|
98 |
+
|
99 |
+
if ( $create && ! empty( $create ) && is_array( $create ) ) {
|
100 |
+
$create = json_encode( $create );
|
101 |
+
$create = str_replace( '"', "'", $create );
|
102 |
+
$options['create'] = "'create', '" . esc_js( $ua_code ). "', '" . esc_js( $domain ) . "', " . $create;
|
103 |
+
} else {
|
104 |
+
$options['create'] = "'create', '" . esc_js( $ua_code ) . "', '" . esc_js( $domain ) . "'";
|
105 |
+
}
|
106 |
+
|
107 |
+
$options['forceSSL'] = "'set', 'forceSSL', true";
|
108 |
+
|
109 |
+
$code = exactmetrics_get_option( 'custom_code', false );
|
110 |
+
if ( ! empty( $code ) ) {
|
111 |
+
// Add custom code to the view
|
112 |
+
$options['custom_code'] = array(
|
113 |
+
'type' => 'custom_code',
|
114 |
+
'value' => stripslashes( $code ),
|
115 |
+
);
|
116 |
+
}
|
117 |
+
|
118 |
+
// Anonymous data
|
119 |
+
if ( exactmetrics_get_option( 'anonymize_ips', false ) ) {
|
120 |
+
$options['anonymize_ips'] = "'set', 'anonymizeIp', true";
|
121 |
+
}
|
122 |
+
|
123 |
+
$options = apply_filters( 'exactmetrics_frontend_tracking_options_analytics_before_scripts', $options );
|
124 |
+
|
125 |
+
// add demographics
|
126 |
+
if ( exactmetrics_get_option( 'demographics', false ) ) {
|
127 |
+
$options['demographics'] = "'require', 'displayfeatures'";
|
128 |
+
}
|
129 |
+
|
130 |
+
// Add Enhanced link attribution.
|
131 |
+
if ( exactmetrics_get_option( 'enhanced_link_attribution', false ) ) {
|
132 |
+
$options['enhanced_link_attribution'] = "'require', 'linkid', 'linkid.js'";
|
133 |
+
}
|
134 |
+
|
135 |
+
// Add cross-domain tracking.
|
136 |
+
if ( is_array( $cross_domains ) && ! empty( $cross_domains ) ) {
|
137 |
+
$options['cross_domain_tracking'] = "'require', 'linker'";
|
138 |
+
$cross_domains_strings = array();
|
139 |
+
foreach ( $cross_domains as $cross_domain ) {
|
140 |
+
if ( ! isset( $cross_domain['domain'] ) ) {
|
141 |
+
continue;
|
142 |
+
}
|
143 |
+
$cross_domains_strings[] = '\'' . $cross_domain['domain'] . '\'';
|
144 |
+
}
|
145 |
+
if ( ! empty( $cross_domains_strings ) ) {
|
146 |
+
$cross_domains_strings = implode( ',', $cross_domains_strings );
|
147 |
+
$options['cross_domains'] = "'linker:autoLink', [$cross_domains_strings]";
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
$options = apply_filters( 'exactmetrics_frontend_tracking_options_analytics_before_pageview', $options );
|
152 |
+
$options = apply_filters( 'exactmetrics_frontend_tracking_options_before_pageview', $options, $this->name, $this->version );
|
153 |
+
|
154 |
+
if ( is_404() ) {
|
155 |
+
if ( exactmetrics_get_option( 'hash_tracking', false ) ) {
|
156 |
+
$options['send'] = "'send','pageview','/404.html?page=' + document.location.pathname + document.location.search + location.hash + '&from=' + document.referrer";
|
157 |
+
} else {
|
158 |
+
$options['send'] = "'send','pageview','/404.html?page=' + document.location.pathname + document.location.search + '&from=' + document.referrer";
|
159 |
+
}
|
160 |
+
} else if ( $wp_query->is_search ) {
|
161 |
+
$pushstr = "'send','pageview','/?s=";
|
162 |
+
if ( (int) $wp_query->found_posts === 0 ) {
|
163 |
+
$options['send'] = $pushstr . 'no-results:' . rawurlencode( $wp_query->query_vars['s'] ) . "&cat=no-results'";
|
164 |
+
} else if ( (int) $wp_query->found_posts === 1 ) {
|
165 |
+
$options['send'] = $pushstr . rawurlencode( $wp_query->query_vars['s'] ) . "&cat=1-result'";
|
166 |
+
} else if ( $wp_query->found_posts > 1 && $wp_query->found_posts < 6 ) {
|
167 |
+
$options['send'] = $pushstr . rawurlencode( $wp_query->query_vars['s'] ) . "&cat=2-5-results'";
|
168 |
+
} else {
|
169 |
+
$options['send'] = $pushstr . rawurlencode( $wp_query->query_vars['s'] ) . "&cat=plus-5-results'";
|
170 |
+
}
|
171 |
+
} else if ( exactmetrics_get_option( 'hash_tracking', false ) ) {
|
172 |
+
$options['send'] = "'send','pageview', location.pathname + location.search + location.hash";
|
173 |
+
} else {
|
174 |
+
$options['send'] = "'send','pageview'";
|
175 |
+
}
|
176 |
+
|
177 |
+
$options = apply_filters( 'exactmetrics_frontend_tracking_options_analytics_end', $options );
|
178 |
+
return $options;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Get frontend output.
|
183 |
+
*
|
184 |
+
* This function is used to return the Javascript
|
185 |
+
* to output in the head of the page for the given
|
186 |
+
* tracking method.
|
187 |
+
*
|
188 |
+
* @since 6.0.0
|
189 |
+
* @access public
|
190 |
+
*
|
191 |
+
* @return string Javascript to output.
|
192 |
+
*/
|
193 |
+
public function frontend_output( ) {
|
194 |
+
$options = $this->frontend_tracking_options();
|
195 |
+
$src = apply_filters( 'exactmetrics_frontend_output_analytics_src', '//www.google-analytics.com/analytics.js' );
|
196 |
+
$compat_mode = exactmetrics_get_option( 'gatracker_compatibility_mode', false );
|
197 |
+
$compat = $compat_mode ? 'window.ga = __gaTracker;' : '';
|
198 |
+
$track_user = exactmetrics_track_user();
|
199 |
+
$ua = exactmetrics_get_ua();
|
200 |
+
$output = '';
|
201 |
+
$reason = '';
|
202 |
+
$attributes = apply_filters( 'exactmetrics_tracking_analytics_script_attributes', array( 'type' => "text/javascript", 'data-cfasync' => 'false' ) );
|
203 |
+
$attr_string = '';
|
204 |
+
if ( ! empty( $attributes ) ) {
|
205 |
+
foreach( $attributes as $attr_name => $attr_value ) {
|
206 |
+
if ( ! empty( $attr_name ) ) {
|
207 |
+
$attr_string .= ' ' . sanitize_key( $attr_name ) . '="' . esc_attr( $attr_value ) . '"';
|
208 |
+
} else {
|
209 |
+
$attr_string .= ' ' . sanitize_key( $attr_value );
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
213 |
+
ob_start();
|
214 |
+
?>
|
215 |
+
<!-- This site uses the Google Analytics by ExactMetrics plugin v<?php echo EXACTMETRICS_VERSION; ?> - Using Analytics tracking - https://www.exactmetrics.com/ -->
|
216 |
+
<?php if ( ! $track_user ) {
|
217 |
+
if ( empty( $ua ) ) {
|
218 |
+
$reason = __( 'Note: ExactMetrics is not currently configured on this site. The site owner needs to authenticate with Google Analytics in the ExactMetrics settings panel.', 'google-analytics-dashboard-for-wp' );
|
219 |
+
$output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL;
|
220 |
+
} else if ( current_user_can( 'exactmetrics_save_settings' ) ) {
|
221 |
+
$reason = __( 'Note: ExactMetrics does not track you as a logged-in site administrator to prevent site owners from accidentally skewing their own Google Analytics data.'. PHP_EOL . 'If you are testing Google Analytics code, please do so either logged out or in the private browsing/incognito mode of your web browser.', 'google-analytics-dashboard-for-wp' );
|
222 |
+
$output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL;
|
223 |
+
} else {
|
224 |
+
$reason = __( 'Note: The site owner has disabled Google Analytics tracking for your user role.', 'google-analytics-dashboard-for-wp' );
|
225 |
+
$output .= '<!-- ' . esc_html( $reason ) . ' -->' . PHP_EOL;
|
226 |
+
}
|
227 |
+
echo $output;
|
228 |
+
} ?>
|
229 |
+
<?php if ( $ua ) { ?>
|
230 |
+
<script<?php echo $attr_string;?>>
|
231 |
+
var mi_version = '<?php echo EXACTMETRICS_VERSION; ?>';
|
232 |
+
var mi_track_user = <?php echo ( $track_user ? 'true' : 'false' ); ?>;
|
233 |
+
var mi_no_track_reason = <?php echo ( $reason ? "'" . esc_js( $reason) . "'": "''" ); ?>;
|
234 |
+
<?php do_action( 'exactmetrics_tracking_analytics_frontend_output_after_mi_track_user' ); ?>
|
235 |
+
|
236 |
+
<?php if ( $this->should_do_optout() ) { ?>
|
237 |
+
var disableStr = 'ga-disable-<?php echo exactmetrics_get_ua(); ?>';
|
238 |
+
|
239 |
+
/* Function to detect opted out users */
|
240 |
+
function __gaTrackerIsOptedOut() {
|
241 |
+
return document.cookie.indexOf(disableStr + '=true') > -1;
|
242 |
+
}
|
243 |
+
|
244 |
+
/* Disable tracking if the opt-out cookie exists. */
|
245 |
+
if ( __gaTrackerIsOptedOut() ) {
|
246 |
+
window[disableStr] = true;
|
247 |
+
}
|
248 |
+
|
249 |
+
/* Opt-out function */
|
250 |
+
function __gaTrackerOptout() {
|
251 |
+
document.cookie = disableStr + '=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
|
252 |
+
window[disableStr] = true;
|
253 |
+
}
|
254 |
+
|
255 |
+
if ( 'undefined' === typeof gaOptout ) {
|
256 |
+
function gaOptout() {
|
257 |
+
__gaTrackerOptout();
|
258 |
+
}
|
259 |
+
}
|
260 |
+
<?php } ?>
|
261 |
+
|
262 |
+
if ( mi_track_user ) {
|
263 |
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
264 |
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
265 |
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
266 |
+
})(window,document,'script','<?php echo $src; ?>','__gaTracker');
|
267 |
+
|
268 |
+
<?php
|
269 |
+
echo $compat;
|
270 |
+
|
271 |
+
if ( count( $options ) >= 1 ) {
|
272 |
+
foreach ( $options as $item ) {
|
273 |
+
if ( ! is_array( $item ) ) {
|
274 |
+
echo ' __gaTracker(' . $item . ");\n";
|
275 |
+
} else if ( ! empty ( $item['value'] ) ) {
|
276 |
+
echo ' ' . $item['value'] . "\n";
|
277 |
+
}
|
278 |
+
}
|
279 |
+
}
|
280 |
+
if ( $compat_mode ) {
|
281 |
+
// Ensure that GA is fully loaded and assign to ga.
|
282 |
+
echo " __gaTracker( function() { window.ga = __gaTracker; } );\n";
|
283 |
+
}
|
284 |
+
?>
|
285 |
+
} else {
|
286 |
+
<?php if ( $this->should_do_optout() ) { ?>
|
287 |
+
console.log( "<?php echo esc_js( $reason );?>" );
|
288 |
+
(function() {
|
289 |
+
/* https://developers.google.com/analytics/devguides/collection/analyticsjs/ */
|
290 |
+
var noopfn = function() {
|
291 |
+
return null;
|
292 |
+
};
|
293 |
+
var noopnullfn = function() {
|
294 |
+
return null;
|
295 |
+
};
|
296 |
+
var Tracker = function() {
|
297 |
+
return null;
|
298 |
+
};
|
299 |
+
var p = Tracker.prototype;
|
300 |
+
p.get = noopfn;
|
301 |
+
p.set = noopfn;
|
302 |
+
p.send = noopfn;
|
303 |
+
var __gaTracker = function() {
|
304 |
+
var len = arguments.length;
|
305 |
+
if ( len === 0 ) {
|
306 |
+
return;
|
307 |
+
}
|
308 |
+
var f = arguments[len-1];
|
309 |
+
if ( typeof f !== 'object' || f === null || typeof f.hitCallback !== 'function' ) {
|
310 |
+
console.log( '<?php echo esc_js( __("Not running function", "google-analytics-dashboard-for-wp" ) );?> __gaTracker(' + arguments[0] + " ....) <?php echo esc_js( __( "because you are not being tracked.", 'google-analytics-dashboard-for-wp' ) );?> " + mi_no_track_reason );
|
311 |
+
return;
|
312 |
+
}
|
313 |
+
try {
|
314 |
+
f.hitCallback();
|
315 |
+
} catch (ex) {
|
316 |
+
|
317 |
+
}
|
318 |
+
};
|
319 |
+
__gaTracker.create = function() {
|
320 |
+
return new Tracker();
|
321 |
+
};
|
322 |
+
__gaTracker.getByName = noopnullfn;
|
323 |
+
__gaTracker.getAll = function() {
|
324 |
+
return [];
|
325 |
+
};
|
326 |
+
__gaTracker.remove = noopfn;
|
327 |
+
window['__gaTracker'] = __gaTracker;
|
328 |
+
<?php echo $compat; ?>
|
329 |
+
})();
|
330 |
+
<?php } ?>
|
331 |
+
}
|
332 |
+
</script>
|
333 |
+
<?php } else { ?>
|
334 |
+
<!-- No UA code set -->
|
335 |
+
<?php } ?>
|
336 |
+
<!-- / Google Analytics by ExactMetrics -->
|
337 |
+
<?php
|
338 |
+
$output = ob_get_contents();
|
339 |
+
ob_end_clean();
|
340 |
+
return $output;
|
341 |
+
}
|
342 |
+
|
343 |
+
public function should_do_optout() {
|
344 |
+
return ! ( defined( 'MI_NO_TRACKING_OPTOUT' ) && MI_NO_TRACKING_OPTOUT );
|
345 |
+
}
|
346 |
+
}
|
includes/frontend/tracking/class-tracking-preview.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tracking debug class.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @author Chris Christoff
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
class ExactMetrics_Tracking_Preview extends ExactMetrics_Tracking_Abstract {
|
17 |
+
/**
|
18 |
+
* Holds the name of the tracking type.
|
19 |
+
*
|
20 |
+
* @since 6.0.0
|
21 |
+
* @access public
|
22 |
+
*
|
23 |
+
* @var string $name Name of the tracking type.
|
24 |
+
*/
|
25 |
+
public $name = 'preview';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Version of the tracking class.
|
29 |
+
*
|
30 |
+
* @since 6.0.0
|
31 |
+
* @access public
|
32 |
+
*
|
33 |
+
* @var string $version Version of the tracking class.
|
34 |
+
*/
|
35 |
+
public $version = '1.0.0';
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Primary class constructor.
|
39 |
+
*
|
40 |
+
* @since 6.0.0
|
41 |
+
* @access public
|
42 |
+
*/
|
43 |
+
public function __construct() {
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get frontend tracking options.
|
49 |
+
*
|
50 |
+
* This function is used to return an array of parameters
|
51 |
+
* for the frontend_output() function to output. These are
|
52 |
+
* generally dimensions and turned on GA features.
|
53 |
+
*
|
54 |
+
* @since 6.0.0
|
55 |
+
* @access public
|
56 |
+
*
|
57 |
+
* @return array Array of the options to use.
|
58 |
+
*/
|
59 |
+
public function frontend_tracking_options( ) {
|
60 |
+
return array();
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Get frontend output.
|
65 |
+
*
|
66 |
+
* This function is used to return the Javascript
|
67 |
+
* to output in the head of the page for the given
|
68 |
+
* tracking method.
|
69 |
+
*
|
70 |
+
* @since 6.0.0
|
71 |
+
* @access public
|
72 |
+
*
|
73 |
+
* @return string Javascript to output.
|
74 |
+
*/
|
75 |
+
public function frontend_output( ) {
|
76 |
+
$output = '<!-- This site uses the Google Analytics by ExactMetrics plugin v ' . EXACTMETRICS_VERSION .' - https://www.exactmetrics.com/ -->';
|
77 |
+
$output .= '<!-- ' . esc_html__( "You are currently in a preview window. ExactMetrics doesn't track preview window traffic to avoid false visit reports.", 'google-analytics-dashboard-for-wp' ) . ' -->';
|
78 |
+
$output .= '<!-- / Google Analytics by ExactMetrics -->';
|
79 |
+
return $output;
|
80 |
+
}
|
81 |
+
}
|
includes/frontend/tracking/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
includes/helpers.php
ADDED
@@ -0,0 +1,1297 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Helper functions.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @subpackage Helper
|
9 |
+
* @author Chris Christoff
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
function exactmetrics_is_page_reload() {
|
18 |
+
// Can't be a refresh without having a referrer
|
19 |
+
if ( ! isset( $_SERVER['HTTP_REFERER'] ) ) {
|
20 |
+
return false;
|
21 |
+
}
|
22 |
+
|
23 |
+
// IF the referrer is identical to the current page request, then it's a refresh
|
24 |
+
return ( parse_url( $_SERVER['HTTP_REFERER'], PHP_URL_PATH ) === parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH ) );
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
function exactmetrics_track_user( $user_id = -1 ) {
|
29 |
+
if ( $user_id === -1 ) {
|
30 |
+
$user = wp_get_current_user();
|
31 |
+
} else {
|
32 |
+
$user = new WP_User( $user_id );
|
33 |
+
}
|
34 |
+
|
35 |
+
$track_user = true;
|
36 |
+
$roles = exactmetrics_get_option( 'ignore_users', array() );
|
37 |
+
|
38 |
+
if ( ! empty( $roles ) && is_array( $roles ) ) {
|
39 |
+
foreach ( $roles as $role ) {
|
40 |
+
if ( is_string( $role ) ) {
|
41 |
+
if ( user_can( $user, $role ) ) {
|
42 |
+
$track_user = false;
|
43 |
+
break;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
$track_super_admin = apply_filters( 'exactmetrics_track_super_admins', false );
|
50 |
+
if ( $track_super_admin === false && is_multisite() && is_super_admin() ) {
|
51 |
+
$track_user = false;
|
52 |
+
}
|
53 |
+
|
54 |
+
// or if UA code is not entered
|
55 |
+
$ua_code = exactmetrics_get_ua();
|
56 |
+
if ( empty( $ua_code ) ) {
|
57 |
+
$track_user = false;
|
58 |
+
}
|
59 |
+
|
60 |
+
return apply_filters( 'exactmetrics_track_user', $track_user, $user );
|
61 |
+
}
|
62 |
+
|
63 |
+
function exactmetrics_get_client_id( $payment_id = false ) {
|
64 |
+
if ( is_object( $payment_id ) ) {
|
65 |
+
$payment_id = $payment_id->ID;
|
66 |
+
}
|
67 |
+
$user_cid = exactmetrics_get_uuid();
|
68 |
+
$saved_cid = ! empty( $payment_id ) ? get_post_meta( $payment_id, '_yoast_gau_uuid', true ) : false;
|
69 |
+
|
70 |
+
if ( ! empty( $payment_id ) && ! empty( $saved_cid ) ) {
|
71 |
+
return $saved_cid;
|
72 |
+
} else if ( ! empty( $user_cid ) ) {
|
73 |
+
return $user_cid;
|
74 |
+
} else {
|
75 |
+
return exactmetrics_generate_uuid();
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Returns the Google Analytics clientId to store for later use
|
81 |
+
*
|
82 |
+
* @since 6.0.0
|
83 |
+
*
|
84 |
+
* @link https://developers.google.com/analytics/devguides/collection/analyticsjs/domains#getClientId
|
85 |
+
*
|
86 |
+
* @return bool|string False if cookie isn't set, GA UUID otherwise
|
87 |
+
*/
|
88 |
+
function exactmetrics_get_uuid() {
|
89 |
+
if ( empty( $_COOKIE['_ga'] ) ) {
|
90 |
+
return false;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Example cookie formats:
|
95 |
+
*
|
96 |
+
* GA1.2.XXXXXXX.YYYYY
|
97 |
+
* _ga=1.2.XXXXXXX.YYYYYY -- We want the XXXXXXX.YYYYYY part
|
98 |
+
*
|
99 |
+
*/
|
100 |
+
|
101 |
+
$ga_cookie = $_COOKIE['_ga'];
|
102 |
+
$cookie_parts = explode('.', $ga_cookie );
|
103 |
+
if ( is_array( $cookie_parts ) && ! empty( $cookie_parts[2] ) && ! empty( $cookie_parts[3] ) ) {
|
104 |
+
$uuid = (string) $cookie_parts[2] . '.' . (string) $cookie_parts[3];
|
105 |
+
if ( is_string( $uuid ) ) {
|
106 |
+
return $uuid;
|
107 |
+
} else {
|
108 |
+
return false;
|
109 |
+
}
|
110 |
+
} else {
|
111 |
+
return false;
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Generate UUID v4 function - needed to generate a CID when one isn't available
|
118 |
+
*
|
119 |
+
* @link http://www.stumiller.me/implementing-google-analytics-measurement-protocol-in-php-and-wordpress/
|
120 |
+
*
|
121 |
+
* @since 6.1.8
|
122 |
+
* @return string
|
123 |
+
*/
|
124 |
+
function exactmetrics_generate_uuid() {
|
125 |
+
|
126 |
+
return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
|
127 |
+
|
128 |
+
// 32 bits for "time_low"
|
129 |
+
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),
|
130 |
+
|
131 |
+
// 16 bits for "time_mid"
|
132 |
+
mt_rand( 0, 0xffff ),
|
133 |
+
|
134 |
+
// 16 bits for "time_hi_and_version",
|
135 |
+
// four most significant bits holds version number 4
|
136 |
+
mt_rand( 0, 0x0fff ) | 0x4000,
|
137 |
+
|
138 |
+
// 16 bits, 8 bits for "clk_seq_hi_res",
|
139 |
+
// 8 bits for "clk_seq_low",
|
140 |
+
// two most significant bits holds zero and one for variant DCE1.1
|
141 |
+
mt_rand( 0, 0x3fff ) | 0x8000,
|
142 |
+
|
143 |
+
// 48 bits for "node"
|
144 |
+
mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )
|
145 |
+
);
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Returns the Google Analytics clientId to store for later use
|
150 |
+
*
|
151 |
+
* @since 6.0.0
|
152 |
+
*
|
153 |
+
* @return GA UUID or error code.
|
154 |
+
*/
|
155 |
+
function exactmetrics_get_cookie( $debug = false ) {
|
156 |
+
if ( empty( $_COOKIE['_ga'] ) ) {
|
157 |
+
return ( $debug ) ? 'FCE' : false;
|
158 |
+
}
|
159 |
+
|
160 |
+
$ga_cookie = $_COOKIE['_ga'];
|
161 |
+
$cookie_parts = explode('.', $ga_cookie );
|
162 |
+
if ( is_array( $cookie_parts ) && ! empty( $cookie_parts[2] ) && ! empty( $cookie_parts[3] ) ) {
|
163 |
+
$uuid = (string) $cookie_parts[2] . '.' . (string) $cookie_parts[3];
|
164 |
+
if ( is_string( $uuid ) ) {
|
165 |
+
return $ga_cookie;
|
166 |
+
} else {
|
167 |
+
return ( $debug ) ? 'FA' : false;
|
168 |
+
}
|
169 |
+
} else {
|
170 |
+
return ( $debug ) ? 'FAE' : false;
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
|
175 |
+
function exactmetrics_generate_ga_client_id() {
|
176 |
+
return rand(100000000,999999999) . '.' . time();
|
177 |
+
}
|
178 |
+
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Hours between two timestamps.
|
182 |
+
*
|
183 |
+
* @access public
|
184 |
+
* @since 6.0.0
|
185 |
+
*
|
186 |
+
* @param string $start Timestamp of start time (in seconds since Unix).
|
187 |
+
* @param string $stop Timestamp of stop time (in seconds since Unix). Optional. If not used, current_time (in UTC 0 / GMT ) is used.
|
188 |
+
*
|
189 |
+
* @return int Hours between the two timestamps, rounded.
|
190 |
+
*/
|
191 |
+
function exactmetrics_hours_between( $start, $stop = false ) {
|
192 |
+
if ( $stop === false ) {
|
193 |
+
$stop = time();
|
194 |
+
}
|
195 |
+
|
196 |
+
$diff = (int) abs( $stop - $start );
|
197 |
+
$hours = round( $diff / HOUR_IN_SECONDS );
|
198 |
+
return $hours;
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Is This ExactMetrics Pro?
|
203 |
+
*
|
204 |
+
* We use this function exactmetrics_to determine if the install is a pro version or a lite version install of ExactMetrics.
|
205 |
+
* If the install is a lite version we disable the install from admin functionality[1] for addons as WordPress.org requires us to,
|
206 |
+
* we change the links for where to get support (wp.org forum for free; our site for pro), we use this determine what class to load as
|
207 |
+
* the base class in addons (to avoid fatal errors) and we use this on the system info page to know what constants to display values for
|
208 |
+
* as the lite and pro versions of our plugin have different constants (and names for those constants) you can declare and use.
|
209 |
+
*
|
210 |
+
* [1] Note: This is not "feature-locking" under GPL guidelines but rather something WordPress.org requires us to do to stay
|
211 |
+
* in compliance with their rules. We wish we didn't have to do this, as in our oppinion this diminishes the user experience
|
212 |
+
* of users installing our free and premium addons, and we'd love to turn this on for non-Pro installs, but we're not allowed to.
|
213 |
+
* If WordPress.org ever changes their mind on this subject, we'd totally turn on that feature for Lite installs in a heartbeat.
|
214 |
+
*
|
215 |
+
* @todo Are we allowed to turn on admin installing if the user has to manually declare a PHP constant (and thus would not be on
|
216 |
+
* either by default or via any sort of user interface)? If so, we could add a constant for forcing Pro version so that users can see
|
217 |
+
* for themselves that we're not feature locking anything inside the plugin + it would make it easier for our team to test stuff (both via
|
218 |
+
* Travis-CI but also when installing addons to test with the Lite version). Also this would allow for a better user experience for users
|
219 |
+
* who want that feature.
|
220 |
+
*
|
221 |
+
* @since 6.0.0
|
222 |
+
* @access public
|
223 |
+
*
|
224 |
+
* @return bool True if pro version.
|
225 |
+
*/
|
226 |
+
function exactmetrics_is_pro_version() {
|
227 |
+
if ( class_exists( 'ExactMetrics' ) ) {
|
228 |
+
return true;
|
229 |
+
} else {
|
230 |
+
return false;
|
231 |
+
}
|
232 |
+
}
|
233 |
+
|
234 |
+
|
235 |
+
/**
|
236 |
+
* Get the user roles of this WordPress blog
|
237 |
+
*
|
238 |
+
* @return array
|
239 |
+
*/
|
240 |
+
function exactmetrics_get_roles() {
|
241 |
+
global $wp_roles;
|
242 |
+
|
243 |
+
$all_roles = $wp_roles->roles;
|
244 |
+
$roles = array();
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Filter: 'editable_roles' - Allows filtering of the roles shown within the plugin (and elsewhere in WP as it's a WP filter)
|
248 |
+
*
|
249 |
+
* @api array $all_roles
|
250 |
+
*/
|
251 |
+
$editable_roles = apply_filters( 'editable_roles', $all_roles );
|
252 |
+
|
253 |
+
foreach ( $editable_roles as $id => $name ) {
|
254 |
+
$roles[ $id ] = translate_user_role( $name['name'] );
|
255 |
+
}
|
256 |
+
|
257 |
+
return $roles;
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* Get the user roles which can manage options. Used to prevent these roles from getting unselected in the settings.
|
262 |
+
*
|
263 |
+
* @return array
|
264 |
+
*/
|
265 |
+
function exactmetrics_get_manage_options_roles() {
|
266 |
+
global $wp_roles;
|
267 |
+
|
268 |
+
$all_roles = $wp_roles->roles;
|
269 |
+
$roles = array();
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Filter: 'editable_roles' - Allows filtering of the roles shown within the plugin (and elsewhere in WP as it's a WP filter)
|
273 |
+
*
|
274 |
+
* @api array $all_roles
|
275 |
+
*/
|
276 |
+
$editable_roles = apply_filters( 'editable_roles', $all_roles );
|
277 |
+
|
278 |
+
foreach ( $editable_roles as $id => $role ) {
|
279 |
+
if ( isset( $role['capabilities']['manage_options'] ) && $role['capabilities']['manage_options'] ) {
|
280 |
+
$roles[ $id ] = translate_user_role( $role['name'] );
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
284 |
+
return $roles;
|
285 |
+
}
|
286 |
+
|
287 |
+
/** Need to escape in advance of passing in $text. */
|
288 |
+
function exactmetrics_get_message( $type = 'error', $text = '' ) {
|
289 |
+
$div = '';
|
290 |
+
if ( $type === 'error' || $type === 'alert' || $type === 'success' || $type === 'info' ) {
|
291 |
+
$base = ExactMetrics();
|
292 |
+
return $base->notices->display_inline_notice( 'exactmetrics_standard_notice', '', $text, $type, false, array( 'skip_message_escape' => true ) );
|
293 |
+
} else {
|
294 |
+
return '';
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
function exactmetrics_is_dev_url( $url = '' ) {
|
299 |
+
$is_local_url = false;
|
300 |
+
// Trim it up
|
301 |
+
$url = strtolower( trim( $url ) );
|
302 |
+
// Need to get the host...so let's add the scheme so we can use parse_url
|
303 |
+
if ( false === strpos( $url, 'http://' ) && false === strpos( $url, 'https://' ) ) {
|
304 |
+
$url = 'http://' . $url;
|
305 |
+
}
|
306 |
+
$url_parts = parse_url( $url );
|
307 |
+
$host = ! empty( $url_parts['host'] ) ? $url_parts['host'] : false;
|
308 |
+
if ( ! empty( $url ) && ! empty( $host ) ) {
|
309 |
+
if ( false !== ip2long( $host ) ) {
|
310 |
+
if ( ! filter_var( $host, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) ) {
|
311 |
+
$is_local_url = true;
|
312 |
+
}
|
313 |
+
} else if ( 'localhost' === $host ) {
|
314 |
+
$is_local_url = true;
|
315 |
+
}
|
316 |
+
|
317 |
+
$tlds_to_check = array( '.local', ':8888', ':8080', ':8081', '.invalid', '.example', '.test' );
|
318 |
+
foreach ( $tlds_to_check as $tld ) {
|
319 |
+
if ( false !== strpos( $host, $tld ) ) {
|
320 |
+
$is_local_url = true;
|
321 |
+
break;
|
322 |
+
}
|
323 |
+
|
324 |
+
}
|
325 |
+
if ( substr_count( $host, '.' ) > 1 ) {
|
326 |
+
$subdomains_to_check = array( 'dev.', '*.staging.', 'beta.', 'test.' );
|
327 |
+
foreach ( $subdomains_to_check as $subdomain ) {
|
328 |
+
$subdomain = str_replace( '.', '(.)', $subdomain );
|
329 |
+
$subdomain = str_replace( array( '*', '(.)' ), '(.*)', $subdomain );
|
330 |
+
if ( preg_match( '/^(' . $subdomain . ')/', $host ) ) {
|
331 |
+
$is_local_url = true;
|
332 |
+
break;
|
333 |
+
}
|
334 |
+
}
|
335 |
+
}
|
336 |
+
}
|
337 |
+
return $is_local_url;
|
338 |
+
}
|
339 |
+
|
340 |
+
// Set cookie to expire in 2 years
|
341 |
+
function exactmetrics_get_cookie_expiration_date( $time ) {
|
342 |
+
return date('D, j F Y H:i:s', time() + $time );
|
343 |
+
}
|
344 |
+
|
345 |
+
function exactmetrics_string_ends_with( $string, $ending ) {
|
346 |
+
$strlen = strlen($string);
|
347 |
+
$endinglen = strlen($ending);
|
348 |
+
if ( $endinglen > $strlen ) {
|
349 |
+
return false;
|
350 |
+
}
|
351 |
+
return substr_compare( $string, $ending, $strlen - $endinglen, $endinglen) === 0;
|
352 |
+
}
|
353 |
+
|
354 |
+
function exactmetrics_string_starts_with( $string, $start ) {
|
355 |
+
if ( ! is_string( $string ) || ! is_string( $start ) ) {
|
356 |
+
return false;
|
357 |
+
}
|
358 |
+
|
359 |
+
return substr( $string, 0, strlen( $start ) ) === $start;
|
360 |
+
}
|
361 |
+
|
362 |
+
function exactmetrics_get_country_list( $translated = false ) {
|
363 |
+
if ( $translated ) {
|
364 |
+
$countries = array(
|
365 |
+
'' => '',
|
366 |
+
'US' => __( 'United States', 'google-analytics-dashboard-for-wp' ),
|
367 |
+
'CA' => __( 'Canada', 'google-analytics-dashboard-for-wp' ),
|
368 |
+
'GB' => __( 'United Kingdom', 'google-analytics-dashboard-for-wp' ),
|
369 |
+
'AF' => __( 'Afghanistan', 'google-analytics-dashboard-for-wp' ),
|
370 |
+
'AX' => __( 'Åland Islands', 'google-analytics-dashboard-for-wp' ),
|
371 |
+
'AL' => __( 'Albania', 'google-analytics-dashboard-for-wp' ),
|
372 |
+
'DZ' => __( 'Algeria', 'google-analytics-dashboard-for-wp' ),
|
373 |
+
'AS' => __( 'American Samoa', 'google-analytics-dashboard-for-wp' ),
|
374 |
+
'AD' => __( 'Andorra', 'google-analytics-dashboard-for-wp' ),
|
375 |
+
'AO' => __( 'Angola', 'google-analytics-dashboard-for-wp' ),
|
376 |
+
'AI' => __( 'Anguilla', 'google-analytics-dashboard-for-wp' ),
|
377 |
+
'AQ' => __( 'Antarctica', 'google-analytics-dashboard-for-wp' ),
|
378 |
+
'AG' => __( 'Antigua and Barbuda', 'google-analytics-dashboard-for-wp' ),
|
379 |
+
'AR' => __( 'Argentina', 'google-analytics-dashboard-for-wp' ),
|
380 |
+
'AM' => __( 'Armenia', 'google-analytics-dashboard-for-wp' ),
|
381 |
+
'AW' => __( 'Aruba', 'google-analytics-dashboard-for-wp' ),
|
382 |
+
'AU' => __( 'Australia', 'google-analytics-dashboard-for-wp' ),
|
383 |
+
'AT' => __( 'Austria', 'google-analytics-dashboard-for-wp' ),
|
384 |
+
'AZ' => __( 'Azerbaijan', 'google-analytics-dashboard-for-wp' ),
|
385 |
+
'BS' => __( 'Bahamas', 'google-analytics-dashboard-for-wp' ),
|
386 |
+
'BH' => __( 'Bahrain', 'google-analytics-dashboard-for-wp' ),
|
387 |
+
'BD' => __( 'Bangladesh', 'google-analytics-dashboard-for-wp' ),
|
388 |
+
'BB' => __( 'Barbados', 'google-analytics-dashboard-for-wp' ),
|
389 |
+
'BY' => __( 'Belarus', 'google-analytics-dashboard-for-wp' ),
|
390 |
+
'BE' => __( 'Belgium', 'google-analytics-dashboard-for-wp' ),
|
391 |
+
'BZ' => __( 'Belize', 'google-analytics-dashboard-for-wp' ),
|
392 |
+
'BJ' => __( 'Benin', 'google-analytics-dashboard-for-wp' ),
|
393 |
+
'BM' => __( 'Bermuda', 'google-analytics-dashboard-for-wp' ),
|
394 |
+
'BT' => __( 'Bhutan', 'google-analytics-dashboard-for-wp' ),
|
395 |
+
'BO' => __( 'Bolivia', 'google-analytics-dashboard-for-wp' ),
|
396 |
+
'BQ' => __( 'Bonaire, Saint Eustatius and Saba', 'google-analytics-dashboard-for-wp' ),
|
397 |
+
'BA' => __( 'Bosnia and Herzegovina', 'google-analytics-dashboard-for-wp' ),
|
398 |
+
'BW' => __( 'Botswana', 'google-analytics-dashboard-for-wp' ),
|
399 |
+
'BV' => __( 'Bouvet Island', 'google-analytics-dashboard-for-wp' ),
|
400 |
+
'BR' => __( 'Brazil', 'google-analytics-dashboard-for-wp' ),
|
401 |
+
'IO' => __( 'British Indian Ocean Territory', 'google-analytics-dashboard-for-wp' ),
|
402 |
+
'BN' => __( 'Brunei Darrussalam', 'google-analytics-dashboard-for-wp' ),
|
403 |
+
'BG' => __( 'Bulgaria', 'google-analytics-dashboard-for-wp' ),
|
404 |
+
'BF' => __( 'Burkina Faso', 'google-analytics-dashboard-for-wp' ),
|
405 |
+
'BI' => __( 'Burundi', 'google-analytics-dashboard-for-wp' ),
|
406 |
+
'KH' => __( 'Cambodia', 'google-analytics-dashboard-for-wp' ),
|
407 |
+
'CM' => __( 'Cameroon', 'google-analytics-dashboard-for-wp' ),
|
408 |
+
'CV' => __( 'Cape Verde', 'google-analytics-dashboard-for-wp' ),
|
409 |
+
'KY' => __( 'Cayman Islands', 'google-analytics-dashboard-for-wp' ),
|
410 |
+
'CF' => __( 'Central African Republic', 'google-analytics-dashboard-for-wp' ),
|
411 |
+
'TD' => __( 'Chad', 'google-analytics-dashboard-for-wp' ),
|
412 |
+
'CL' => __( 'Chile', 'google-analytics-dashboard-for-wp' ),
|
413 |
+
'CN' => __( 'China', 'google-analytics-dashboard-for-wp' ),
|
414 |
+
'CX' => __( 'Christmas Island', 'google-analytics-dashboard-for-wp' ),
|
415 |
+
'CC' => __( 'Cocos Islands', 'google-analytics-dashboard-for-wp' ),
|
416 |
+
'CO' => __( 'Colombia', 'google-analytics-dashboard-for-wp' ),
|
417 |
+
'KM' => __( 'Comoros', 'google-analytics-dashboard-for-wp' ),
|
418 |
+
'CD' => __( 'Congo, Democratic People\'s Republic', 'google-analytics-dashboard-for-wp' ),
|
419 |
+
'CG' => __( 'Congo, Republic of', 'google-analytics-dashboard-for-wp' ),
|
420 |
+
'CK' => __( 'Cook Islands', 'google-analytics-dashboard-for-wp' ),
|
421 |
+
'CR' => __( 'Costa Rica', 'google-analytics-dashboard-for-wp' ),
|
422 |
+
'CI' => __( 'Cote d\'Ivoire', 'google-analytics-dashboard-for-wp' ),
|
423 |
+
'HR' => __( 'Croatia/Hrvatska', 'google-analytics-dashboard-for-wp' ),
|
424 |
+
'CU' => __( 'Cuba', 'google-analytics-dashboard-for-wp' ),
|
425 |
+
'CW' => __( 'CuraÇao', 'google-analytics-dashboard-for-wp' ),
|
426 |
+
'CY' => __( 'Cyprus', 'google-analytics-dashboard-for-wp' ),
|
427 |
+
'CZ' => __( 'Czechia', 'google-analytics-dashboard-for-wp' ),
|
428 |
+
'DK' => __( 'Denmark', 'google-analytics-dashboard-for-wp' ),
|
429 |
+
'DJ' => __( 'Djibouti', 'google-analytics-dashboard-for-wp' ),
|
430 |
+
'DM' => __( 'Dominica', 'google-analytics-dashboard-for-wp' ),
|
431 |
+
'DO' => __( 'Dominican Republic', 'google-analytics-dashboard-for-wp' ),
|
432 |
+
'TP' => __( 'East Timor', 'google-analytics-dashboard-for-wp' ),
|
433 |
+
'EC' => __( 'Ecuador', 'google-analytics-dashboard-for-wp' ),
|
434 |
+
'EG' => __( 'Egypt', 'google-analytics-dashboard-for-wp' ),
|
435 |
+
'GQ' => __( 'Equatorial Guinea', 'google-analytics-dashboard-for-wp' ),
|
436 |
+
'SV' => __( 'El Salvador', 'google-analytics-dashboard-for-wp' ),
|
437 |
+
'ER' => __( 'Eritrea', 'google-analytics-dashboard-for-wp' ),
|
438 |
+
'EE' => __( 'Estonia', 'google-analytics-dashboard-for-wp' ),
|
439 |
+
'ET' => __( 'Ethiopia', 'google-analytics-dashboard-for-wp' ),
|
440 |
+
'FK' => __( 'Falkland Islands', 'google-analytics-dashboard-for-wp' ),
|
441 |
+
'FO' => __( 'Faroe Islands', 'google-analytics-dashboard-for-wp' ),
|
442 |
+
'FJ' => __( 'Fiji', 'google-analytics-dashboard-for-wp' ),
|
443 |
+
'FI' => __( 'Finland', 'google-analytics-dashboard-for-wp' ),
|
444 |
+
'FR' => __( 'France', 'google-analytics-dashboard-for-wp' ),
|
445 |
+
'GF' => __( 'French Guiana', 'google-analytics-dashboard-for-wp' ),
|
446 |
+
'PF' => __( 'French Polynesia', 'google-analytics-dashboard-for-wp' ),
|
447 |
+
'TF' => __( 'French Southern Territories', 'google-analytics-dashboard-for-wp' ),
|
448 |
+
'GA' => __( 'Gabon', 'google-analytics-dashboard-for-wp' ),
|
449 |
+
'GM' => __( 'Gambia', 'google-analytics-dashboard-for-wp' ),
|
450 |
+
'GE' => __( 'Georgia', 'google-analytics-dashboard-for-wp' ),
|
451 |
+
'DE' => __( 'Germany', 'google-analytics-dashboard-for-wp' ),
|
452 |
+
'GR' => __( 'Greece', 'google-analytics-dashboard-for-wp' ),
|
453 |
+
'GH' => __( 'Ghana', 'google-analytics-dashboard-for-wp' ),
|
454 |
+
'GI' => __( 'Gibraltar', 'google-analytics-dashboard-for-wp' ),
|
455 |
+
'GL' => __( 'Greenland', 'google-analytics-dashboard-for-wp' ),
|
456 |
+
'GD' => __( 'Grenada', 'google-analytics-dashboard-for-wp' ),
|
457 |
+
'GP' => __( 'Guadeloupe', 'google-analytics-dashboard-for-wp' ),
|
458 |
+
'GU' => __( 'Guam', 'google-analytics-dashboard-for-wp' ),
|
459 |
+
'GT' => __( 'Guatemala', 'google-analytics-dashboard-for-wp' ),
|
460 |
+
'GG' => __( 'Guernsey', 'google-analytics-dashboard-for-wp' ),
|
461 |
+
'GN' => __( 'Guinea', 'google-analytics-dashboard-for-wp' ),
|
462 |
+
'GW' => __( 'Guinea-Bissau', 'google-analytics-dashboard-for-wp' ),
|
463 |
+
'GY' => __( 'Guyana', 'google-analytics-dashboard-for-wp' ),
|
464 |
+
'HT' => __( 'Haiti', 'google-analytics-dashboard-for-wp' ),
|
465 |
+
'HM' => __( 'Heard and McDonald Islands', 'google-analytics-dashboard-for-wp' ),
|
466 |
+
'VA' => __( 'Holy See (City Vatican State)', 'google-analytics-dashboard-for-wp' ),
|
467 |
+
'HN' => __( 'Honduras', 'google-analytics-dashboard-for-wp' ),
|
468 |
+
'HK' => __( 'Hong Kong', 'google-analytics-dashboard-for-wp' ),
|
469 |
+
'HU' => __( 'Hungary', 'google-analytics-dashboard-for-wp' ),
|
470 |
+
'IS' => __( 'Iceland', 'google-analytics-dashboard-for-wp' ),
|
471 |
+
'IN' => __( 'India', 'google-analytics-dashboard-for-wp' ),
|
472 |
+
'ID' => __( 'Indonesia', 'google-analytics-dashboard-for-wp' ),
|
473 |
+
'IR' => __( 'Iran', 'google-analytics-dashboard-for-wp' ),
|
474 |
+
'IQ' => __( 'Iraq', 'google-analytics-dashboard-for-wp' ),
|
475 |
+
'IE' => __( 'Ireland', 'google-analytics-dashboard-for-wp' ),
|
476 |
+
'IM' => __( 'Isle of Man', 'google-analytics-dashboard-for-wp' ),
|
477 |
+
'IL' => __( 'Israel', 'google-analytics-dashboard-for-wp' ),
|
478 |
+
'IT' => __( 'Italy', 'google-analytics-dashboard-for-wp' ),
|
479 |
+
'JM' => __( 'Jamaica', 'google-analytics-dashboard-for-wp' ),
|
480 |
+
'JP' => __( 'Japan', 'google-analytics-dashboard-for-wp' ),
|
481 |
+
'JE' => __( 'Jersey', 'google-analytics-dashboard-for-wp' ),
|
482 |
+
'JO' => __( 'Jordan', 'google-analytics-dashboard-for-wp' ),
|
483 |
+
'KZ' => __( 'Kazakhstan', 'google-analytics-dashboard-for-wp' ),
|
484 |
+
'KE' => __( 'Kenya', 'google-analytics-dashboard-for-wp' ),
|
485 |
+
'KI' => __( 'Kiribati', 'google-analytics-dashboard-for-wp' ),
|
486 |
+
'KW' => __( 'Kuwait', 'google-analytics-dashboard-for-wp' ),
|
487 |
+
'KG' => __( 'Kyrgyzstan', 'google-analytics-dashboard-for-wp' ),
|
488 |
+
'LA' => __( 'Lao People\'s Democratic Republic', 'google-analytics-dashboard-for-wp' ),
|
489 |
+
'LV' => __( 'Latvia', 'google-analytics-dashboard-for-wp' ),
|
490 |
+
'LB' => __( 'Lebanon', 'google-analytics-dashboard-for-wp' ),
|
491 |
+
'LS' => __( 'Lesotho', 'google-analytics-dashboard-for-wp' ),
|
492 |
+
'LR' => __( 'Liberia', 'google-analytics-dashboard-for-wp' ),
|
493 |
+
'LY' => __( 'Libyan Arab Jamahiriya', 'google-analytics-dashboard-for-wp' ),
|
494 |
+
'LI' => __( 'Liechtenstein', 'google-analytics-dashboard-for-wp' ),
|
495 |
+
'LT' => __( 'Lithuania', 'google-analytics-dashboard-for-wp' ),
|
496 |
+
'LU' => __( 'Luxembourg', 'google-analytics-dashboard-for-wp' ),
|
497 |
+
'MO' => __( 'Macau', 'google-analytics-dashboard-for-wp' ),
|
498 |
+
'MK' => __( 'Macedonia (FYROM)', 'google-analytics-dashboard-for-wp' ),
|
499 |
+
'MG' => __( 'Madagascar', 'google-analytics-dashboard-for-wp' ),
|
500 |
+
'MW' => __( 'Malawi', 'google-analytics-dashboard-for-wp' ),
|
501 |
+
'MY' => __( 'Malaysia', 'google-analytics-dashboard-for-wp' ),
|
502 |
+
'MV' => __( 'Maldives', 'google-analytics-dashboard-for-wp' ),
|
503 |
+
'ML' => __( 'Mali', 'google-analytics-dashboard-for-wp' ),
|
504 |
+
'MT' => __( 'Malta', 'google-analytics-dashboard-for-wp' ),
|
505 |
+
'MH' => __( 'Marshall Islands', 'google-analytics-dashboard-for-wp' ),
|
506 |
+
'MQ' => __( 'Martinique', 'google-analytics-dashboard-for-wp' ),
|
507 |
+
'MR' => __( 'Mauritania', 'google-analytics-dashboard-for-wp' ),
|
508 |
+
'MU' => __( 'Mauritius', 'google-analytics-dashboard-for-wp' ),
|
509 |
+
'YT' => __( 'Mayotte', 'google-analytics-dashboard-for-wp' ),
|
510 |
+
'MX' => __( 'Mexico', 'google-analytics-dashboard-for-wp' ),
|
511 |
+
'FM' => __( 'Micronesia', 'google-analytics-dashboard-for-wp' ),
|
512 |
+
'MD' => __( 'Moldova, Republic of', 'google-analytics-dashboard-for-wp' ),
|
513 |
+
'MC' => __( 'Monaco', 'google-analytics-dashboard-for-wp' ),
|
514 |
+
'MN' => __( 'Mongolia', 'google-analytics-dashboard-for-wp' ),
|
515 |
+
'ME' => __( 'Montenegro', 'google-analytics-dashboard-for-wp' ),
|
516 |
+
'MS' => __( 'Montserrat', 'google-analytics-dashboard-for-wp' ),
|
517 |
+
'MA' => __( 'Morocco', 'google-analytics-dashboard-for-wp' ),
|
518 |
+
'MZ' => __( 'Mozambique', 'google-analytics-dashboard-for-wp' ),
|
519 |
+
'MM' => __( 'Myanmar', 'google-analytics-dashboard-for-wp' ),
|
520 |
+
'NA' => __( 'Namibia', 'google-analytics-dashboard-for-wp' ),
|
521 |
+
'NR' => __( 'Nauru', 'google-analytics-dashboard-for-wp' ),
|
522 |
+
'NP' => __( 'Nepal', 'google-analytics-dashboard-for-wp' ),
|
523 |
+
'NL' => __( 'Netherlands', 'google-analytics-dashboard-for-wp' ),
|
524 |
+
'AN' => __( 'Netherlands Antilles', 'google-analytics-dashboard-for-wp' ),
|
525 |
+
'NC' => __( 'New Caledonia', 'google-analytics-dashboard-for-wp' ),
|
526 |
+
'NZ' => __( 'New Zealand', 'google-analytics-dashboard-for-wp' ),
|
527 |
+
'NI' => __( 'Nicaragua', 'google-analytics-dashboard-for-wp' ),
|
528 |
+
'NE' => __( 'Niger', 'google-analytics-dashboard-for-wp' ),
|
529 |
+
'NG' => __( 'Nigeria', 'google-analytics-dashboard-for-wp' ),
|
530 |
+
'NU' => __( 'Niue', 'google-analytics-dashboard-for-wp' ),
|
531 |
+
'NF' => __( 'Norfolk Island', 'google-analytics-dashboard-for-wp' ),
|
532 |
+
'KP' => __( 'North Korea', 'google-analytics-dashboard-for-wp' ),
|
533 |
+
'MP' => __( 'Northern Mariana Islands', 'google-analytics-dashboard-for-wp' ),
|
534 |
+
'NO' => __( 'Norway', 'google-analytics-dashboard-for-wp' ),
|
535 |
+
'OM' => __( 'Oman', 'google-analytics-dashboard-for-wp' ),
|
536 |
+
'PK' => __( 'Pakistan', 'google-analytics-dashboard-for-wp' ),
|
537 |
+
'PW' => __( 'Palau', 'google-analytics-dashboard-for-wp' ),
|
538 |
+
'PS' => __( 'Palestinian Territories', 'google-analytics-dashboard-for-wp' ),
|
539 |
+
'PA' => __( 'Panama', 'google-analytics-dashboard-for-wp' ),
|
540 |
+
'PG' => __( 'Papua New Guinea', 'google-analytics-dashboard-for-wp' ),
|
541 |
+
'PY' => __( 'Paraguay', 'google-analytics-dashboard-for-wp' ),
|
542 |
+
'PE' => __( 'Peru', 'google-analytics-dashboard-for-wp' ),
|
543 |
+
'PH' => __( 'Philippines', 'google-analytics-dashboard-for-wp' ),
|
544 |
+
'PN' => __( 'Pitcairn Island', 'google-analytics-dashboard-for-wp' ),
|
545 |
+
'PL' => __( 'Poland', 'google-analytics-dashboard-for-wp' ),
|
546 |
+
'PT' => __( 'Portugal', 'google-analytics-dashboard-for-wp' ),
|
547 |
+
'PR' => __( 'Puerto Rico', 'google-analytics-dashboard-for-wp' ),
|
548 |
+
'QA' => __( 'Qatar', 'google-analytics-dashboard-for-wp' ),
|
549 |
+
'XK' => __( 'Republic of Kosovo', 'google-analytics-dashboard-for-wp' ),
|
550 |
+
'RE' => __( 'Reunion Island', 'google-analytics-dashboard-for-wp' ),
|
551 |
+
'RO' => __( 'Romania', 'google-analytics-dashboard-for-wp' ),
|
552 |
+
'RU' => __( 'Russian Federation', 'google-analytics-dashboard-for-wp' ),
|
553 |
+
'RW' => __( 'Rwanda', 'google-analytics-dashboard-for-wp' ),
|
554 |
+
'BL' => __( 'Saint Barthélemy', 'google-analytics-dashboard-for-wp' ),
|
555 |
+
'SH' => __( 'Saint Helena', 'google-analytics-dashboard-for-wp' ),
|
556 |
+
'KN' => __( 'Saint Kitts and Nevis', 'google-analytics-dashboard-for-wp' ),
|
557 |
+
'LC' => __( 'Saint Lucia', 'google-analytics-dashboard-for-wp' ),
|
558 |
+
'MF' => __( 'Saint Martin (French)', 'google-analytics-dashboard-for-wp' ),
|
559 |
+
'SX' => __( 'Saint Martin (Dutch)', 'google-analytics-dashboard-for-wp' ),
|
560 |
+
'PM' => __( 'Saint Pierre and Miquelon', 'google-analytics-dashboard-for-wp' ),
|
561 |
+
'VC' => __( 'Saint Vincent and the Grenadines', 'google-analytics-dashboard-for-wp' ),
|
562 |
+
'SM' => __( 'San Marino', 'google-analytics-dashboard-for-wp' ),
|
563 |
+
'ST' => __( 'São Tomé and Príncipe', 'google-analytics-dashboard-for-wp' ),
|
564 |
+
'SA' => __( 'Saudi Arabia', 'google-analytics-dashboard-for-wp' ),
|
565 |
+
'SN' => __( 'Senegal', 'google-analytics-dashboard-for-wp' ),
|
566 |
+
'RS' => __( 'Serbia', 'google-analytics-dashboard-for-wp' ),
|
567 |
+
'SC' => __( 'Seychelles', 'google-analytics-dashboard-for-wp' ),
|
568 |
+
'SL' => __( 'Sierra Leone', 'google-analytics-dashboard-for-wp' ),
|
569 |
+
'SG' => __( 'Singapore', 'google-analytics-dashboard-for-wp' ),
|
570 |
+
'SK' => __( 'Slovak Republic', 'google-analytics-dashboard-for-wp' ),
|
571 |
+
'SI' => __( 'Slovenia', 'google-analytics-dashboard-for-wp' ),
|
572 |
+
'SB' => __( 'Solomon Islands', 'google-analytics-dashboard-for-wp' ),
|
573 |
+
'SO' => __( 'Somalia', 'google-analytics-dashboard-for-wp' ),
|
574 |
+
'ZA' => __( 'South Africa', 'google-analytics-dashboard-for-wp' ),
|
575 |
+
'GS' => __( 'South Georgia', 'google-analytics-dashboard-for-wp' ),
|
576 |
+
'KR' => __( 'South Korea', 'google-analytics-dashboard-for-wp' ),
|
577 |
+
'SS' => __( 'South Sudan', 'google-analytics-dashboard-for-wp' ),
|
578 |
+
'ES' => __( 'Spain', 'google-analytics-dashboard-for-wp' ),
|
579 |
+
'LK' => __( 'Sri Lanka', 'google-analytics-dashboard-for-wp' ),
|
580 |
+
'SD' => __( 'Sudan', 'google-analytics-dashboard-for-wp' ),
|
581 |
+
'SR' => __( 'Suriname', 'google-analytics-dashboard-for-wp' ),
|
582 |
+
'SJ' => __( 'Svalbard and Jan Mayen Islands', 'google-analytics-dashboard-for-wp' ),
|
583 |
+
'SZ' => __( 'Swaziland', 'google-analytics-dashboard-for-wp' ),
|
584 |
+
'SE' => __( 'Sweden', 'google-analytics-dashboard-for-wp' ),
|
585 |
+
'CH' => __( 'Switzerland', 'google-analytics-dashboard-for-wp' ),
|
586 |
+
'SY' => __( 'Syrian Arab Republic', 'google-analytics-dashboard-for-wp' ),
|
587 |
+
'TW' => __( 'Taiwan', 'google-analytics-dashboard-for-wp' ),
|
588 |
+
'TJ' => __( 'Tajikistan', 'google-analytics-dashboard-for-wp' ),
|
589 |
+
'TZ' => __( 'Tanzania', 'google-analytics-dashboard-for-wp' ),
|
590 |
+
'TH' => __( 'Thailand', 'google-analytics-dashboard-for-wp' ),
|
591 |
+
'TL' => __( 'Timor-Leste', 'google-analytics-dashboard-for-wp' ),
|
592 |
+
'TG' => __( 'Togo', 'google-analytics-dashboard-for-wp' ),
|
593 |
+
'TK' => __( 'Tokelau', 'google-analytics-dashboard-for-wp' ),
|
594 |
+
'TO' => __( 'Tonga', 'google-analytics-dashboard-for-wp' ),
|
595 |
+
'TT' => __( 'Trinidad and Tobago', 'google-analytics-dashboard-for-wp' ),
|
596 |
+
'TN' => __( 'Tunisia', 'google-analytics-dashboard-for-wp' ),
|
597 |
+
'TR' => __( 'Turkey', 'google-analytics-dashboard-for-wp' ),
|
598 |
+
'TM' => __( 'Turkmenistan', 'google-analytics-dashboard-for-wp' ),
|
599 |
+
'TC' => __( 'Turks and Caicos Islands', 'google-analytics-dashboard-for-wp' ),
|
600 |
+
'TV' => __( 'Tuvalu', 'google-analytics-dashboard-for-wp' ),
|
601 |
+
'UG' => __( 'Uganda', 'google-analytics-dashboard-for-wp' ),
|
602 |
+
'UA' => __( 'Ukraine', 'google-analytics-dashboard-for-wp' ),
|
603 |
+
'AE' => __( 'United Arab Emirates', 'google-analytics-dashboard-for-wp' ),
|
604 |
+
'UY' => __( 'Uruguay', 'google-analytics-dashboard-for-wp' ),
|
605 |
+
'UM' => __( 'US Minor Outlying Islands', 'google-analytics-dashboard-for-wp' ),
|
606 |
+
'UZ' => __( 'Uzbekistan', 'google-analytics-dashboard-for-wp' ),
|
607 |
+
'VU' => __( 'Vanuatu', 'google-analytics-dashboard-for-wp' ),
|
608 |
+
'VE' => __( 'Venezuela', 'google-analytics-dashboard-for-wp' ),
|
609 |
+
'VN' => __( 'Vietnam', 'google-analytics-dashboard-for-wp' ),
|
610 |
+
'VG' => __( 'Virgin Islands (British)', 'google-analytics-dashboard-for-wp' ),
|
611 |
+
'VI' => __( 'Virgin Islands (USA)', 'google-analytics-dashboard-for-wp' ),
|
612 |
+
'WF' => __( 'Wallis and Futuna Islands', 'google-analytics-dashboard-for-wp' ),
|
613 |
+
'EH' => __( 'Western Sahara', 'google-analytics-dashboard-for-wp' ),
|
614 |
+
'WS' => __( 'Western Samoa', 'google-analytics-dashboard-for-wp' ),
|
615 |
+
'YE' => __( 'Yemen', 'google-analytics-dashboard-for-wp' ),
|
616 |
+
'ZM' => __( 'Zambia', 'google-analytics-dashboard-for-wp' ),
|
617 |
+
'ZW' => __( 'Zimbabwe', 'google-analytics-dashboard-for-wp' ),
|
618 |
+
);
|
619 |
+
} else {
|
620 |
+
$countries = array(
|
621 |
+
'' => '',
|
622 |
+
'US' => 'United States',
|
623 |
+
'CA' => 'Canada',
|
624 |
+
'GB' => 'United Kingdom',
|
625 |
+
'AF' => 'Afghanistan',
|
626 |
+
'AX' => 'Åland Islands',
|
627 |
+
'AL' => 'Albania',
|
628 |
+
'DZ' => 'Algeria',
|
629 |
+
'AS' => 'American Samoa',
|
630 |
+
'AD' => 'Andorra',
|
631 |
+
'AO' => 'Angola',
|
632 |
+
'AI' => 'Anguilla',
|
633 |
+
'AQ' => 'Antarctica',
|
634 |
+
'AG' => 'Antigua and Barbuda',
|
635 |
+
'AR' => 'Argentina',
|
636 |
+
'AM' => 'Armenia',
|
637 |
+
'AW' => 'Aruba',
|
638 |
+
'AU' => 'Australia',
|
639 |
+
'AT' => 'Austria',
|
640 |
+
'AZ' => 'Azerbaijan',
|
641 |
+
'BS' => 'Bahamas',
|
642 |
+
'BH' => 'Bahrain',
|
643 |
+
'BD' => 'Bangladesh',
|
644 |
+
'BB' => 'Barbados',
|
645 |
+
'BY' => 'Belarus',
|
646 |
+
'BE' => 'Belgium',
|
647 |
+
'BZ' => 'Belize',
|
648 |
+
'BJ' => 'Benin',
|
649 |
+
'BM' => 'Bermuda',
|
650 |
+
'BT' => 'Bhutan',
|
651 |
+
'BO' => 'Bolivia',
|
652 |
+
'BQ' => 'Bonaire, Saint Eustatius and Saba',
|
653 |
+
'BA' => 'Bosnia and Herzegovina',
|
654 |
+
'BW' => 'Botswana',
|
655 |
+
'BV' => 'Bouvet Island',
|
656 |
+
'BR' => 'Brazil',
|
657 |
+
'IO' => 'British Indian Ocean Territory',
|
658 |
+
'BN' => 'Brunei Darrussalam',
|
659 |
+
'BG' => 'Bulgaria',
|
660 |
+
'BF' => 'Burkina Faso',
|
661 |
+
'BI' => 'Burundi',
|
662 |
+
'KH' => 'Cambodia',
|
663 |
+
'CM' => 'Cameroon',
|
664 |
+
'CV' => 'Cape Verde',
|
665 |
+
'KY' => 'Cayman Islands',
|
666 |
+
'CF' => 'Central African Republic',
|
667 |
+
'TD' => 'Chad',
|
668 |
+
'CL' => 'Chile',
|
669 |
+
'CN' => 'China',
|
670 |
+
'CX' => 'Christmas Island',
|
671 |
+
'CC' => 'Cocos Islands',
|
672 |
+
'CO' => 'Colombia',
|
673 |
+
'KM' => 'Comoros',
|
674 |
+
'CD' => 'Congo, Democratic People\'s Republic',
|
675 |
+
'CG' => 'Congo, Republic of',
|
676 |
+
'CK' => 'Cook Islands',
|
677 |
+
'CR' => 'Costa Rica',
|
678 |
+
'CI' => 'Cote d\'Ivoire',
|
679 |
+
'HR' => 'Croatia/Hrvatska',
|
680 |
+
'CU' => 'Cuba',
|
681 |
+
'CW' => 'CuraÇao',
|
682 |
+
'CY' => 'Cyprus',
|
683 |
+
'CZ' => 'Czechia',
|
684 |
+
'DK' => 'Denmark',
|
685 |
+
'DJ' => 'Djibouti',
|
686 |
+
'DM' => 'Dominica',
|
687 |
+
'DO' => 'Dominican Republic',
|
688 |
+
'TP' => 'East Timor',
|
689 |
+
'EC' => 'Ecuador',
|
690 |
+
'EG' => 'Egypt',
|
691 |
+
'GQ' => 'Equatorial Guinea',
|
692 |
+
'SV' => 'El Salvador',
|
693 |
+
'ER' => 'Eritrea',
|
694 |
+
'EE' => 'Estonia',
|
695 |
+
'ET' => 'Ethiopia',
|
696 |
+
'FK' => 'Falkland Islands',
|
697 |
+
'FO' => 'Faroe Islands',
|
698 |
+
'FJ' => 'Fiji',
|
699 |
+
'FI' => 'Finland',
|
700 |
+
'FR' => 'France',
|
701 |
+
'GF' => 'French Guiana',
|
702 |
+
'PF' => 'French Polynesia',
|
703 |
+
'TF' => 'French Southern Territories',
|
704 |
+
'GA' => 'Gabon',
|
705 |
+
'GM' => 'Gambia',
|
706 |
+
'GE' => 'Georgia',
|
707 |
+
'DE' => 'Germany',
|
708 |
+
'GR' => 'Greece',
|
709 |
+
'GH' => 'Ghana',
|
710 |
+
'GI' => 'Gibraltar',
|
711 |
+
'GL' => 'Greenland',
|
712 |
+
'GD' => 'Grenada',
|
713 |
+
'GP' => 'Guadeloupe',
|
714 |
+
'GU' => 'Guam',
|
715 |
+
'GT' => 'Guatemala',
|
716 |
+
'GG' => 'Guernsey',
|
717 |
+
'GN' => 'Guinea',
|
718 |
+
'GW' => 'Guinea-Bissau',
|
719 |
+
'GY' => 'Guyana',
|
720 |
+
'HT' => 'Haiti',
|
721 |
+
'HM' => 'Heard and McDonald Islands',
|
722 |
+
'VA' => 'Holy See (City Vatican State)',
|
723 |
+
'HN' => 'Honduras',
|
724 |
+
'HK' => 'Hong Kong',
|
725 |
+
'HU' => 'Hungary',
|
726 |
+
'IS' => 'Iceland',
|
727 |
+
'IN' => 'India',
|
728 |
+
'ID' => 'Indonesia',
|
729 |
+
'IR' => 'Iran',
|
730 |
+
'IQ' => 'Iraq',
|
731 |
+
'IE' => 'Ireland',
|
732 |
+
'IM' => 'Isle of Man',
|
733 |
+
'IL' => 'Israel',
|
734 |
+
'IT' => 'Italy',
|
735 |
+
'JM' => 'Jamaica',
|
736 |
+
'JP' => 'Japan',
|
737 |
+
'JE' => 'Jersey',
|
738 |
+
'JO' => 'Jordan',
|
739 |
+
'KZ' => 'Kazakhstan',
|
740 |
+
'KE' => 'Kenya',
|
741 |
+
'KI' => 'Kiribati',
|
742 |
+
'KW' => 'Kuwait',
|
743 |
+
'KG' => 'Kyrgyzstan',
|
744 |
+
'LA' => 'Lao People\'s Democratic Republic',
|
745 |
+
'LV' => 'Latvia',
|
746 |
+
'LB' => 'Lebanon',
|
747 |
+
'LS' => 'Lesotho',
|
748 |
+
'LR' => 'Liberia',
|
749 |
+
'LY' => 'Libyan Arab Jamahiriya',
|
750 |
+
'LI' => 'Liechtenstein',
|
751 |
+
'LT' => 'Lithuania',
|
752 |
+
'LU' => 'Luxembourg',
|
753 |
+
'MO' => 'Macau',
|
754 |
+
'MK' => 'Macedonia',
|
755 |
+
'MG' => 'Madagascar',
|
756 |
+
'MW' => 'Malawi',
|
757 |
+
'MY' => 'Malaysia',
|
758 |
+
'MV' => 'Maldives',
|
759 |
+
'ML' => 'Mali',
|
760 |
+
'MT' => 'Malta',
|
761 |
+
'MH' => 'Marshall Islands',
|
762 |
+
'MQ' => 'Martinique',
|
763 |
+
'MR' => 'Mauritania',
|
764 |
+
'MU' => 'Mauritius',
|
765 |
+
'YT' => 'Mayotte',
|
766 |
+
'MX' => 'Mexico',
|
767 |
+
'FM' => 'Micronesia',
|
768 |
+
'MD' => 'Moldova, Republic of',
|
769 |
+
'MC' => 'Monaco',
|
770 |
+
'MN' => 'Mongolia',
|
771 |
+
'ME' => 'Montenegro',
|
772 |
+
'MS' => 'Montserrat',
|
773 |
+
'MA' => 'Morocco',
|
774 |
+
'MZ' => 'Mozambique',
|
775 |
+
'MM' => 'Myanmar (Burma)',
|
776 |
+
'NA' => 'Namibia',
|
777 |
+
'NR' => 'Nauru',
|
778 |
+
'NP' => 'Nepal',
|
779 |
+
'NL' => 'Netherlands',
|
780 |
+
'AN' => 'Netherlands Antilles',
|
781 |
+
'NC' => 'New Caledonia',
|
782 |
+
'NZ' => 'New Zealand',
|
783 |
+
'NI' => 'Nicaragua',
|
784 |
+
'NE' => 'Niger',
|
785 |
+
'NG' => 'Nigeria',
|
786 |
+
'NU' => 'Niue',
|
787 |
+
'NF' => 'Norfolk Island',
|
788 |
+
'KP' => 'North Korea',
|
789 |
+
'MP' => 'Northern Mariana Islands',
|
790 |
+
'NO' => 'Norway',
|
791 |
+
'OM' => 'Oman',
|
792 |
+
'PK' => 'Pakistan',
|
793 |
+
'PW' => 'Palau',
|
794 |
+
'PS' => 'Palestinian Territories',
|
795 |
+
'PA' => 'Panama',
|
796 |
+
'PG' => 'Papua New Guinea',
|
797 |
+
'PY' => 'Paraguay',
|
798 |
+
'PE' => 'Peru',
|
799 |
+
'PH' => 'Philippines',
|
800 |
+
'PN' => 'Pitcairn Island',
|
801 |
+
'PL' => 'Poland',
|
802 |
+
'PT' => 'Portugal',
|
803 |
+
'PR' => 'Puerto Rico',
|
804 |
+
'QA' => 'Qatar',
|
805 |
+
'XK' => 'Republic of Kosovo',
|
806 |
+
'RE' => 'Reunion Island',
|
807 |
+
'RO' => 'Romania',
|
808 |
+
'RU' => 'Russia',
|
809 |
+
'RW' => 'Rwanda',
|
810 |
+
'BL' => 'Saint Barthélemy',
|
811 |
+
'SH' => 'Saint Helena',
|
812 |
+
'KN' => 'Saint Kitts and Nevis',
|
813 |
+
'LC' => 'Saint Lucia',
|
814 |
+
'MF' => 'Saint Martin (French)',
|
815 |
+
'SX' => 'Saint Martin (Dutch)',
|
816 |
+
'PM' => 'Saint Pierre and Miquelon',
|
817 |
+
'VC' => 'Saint Vincent and the Grenadines',
|
818 |
+
'SM' => 'San Marino',
|
819 |
+
'ST' => 'São Tomé and Príncipe',
|
820 |
+
'SA' => 'Saudi Arabia',
|
821 |
+
'SN' => 'Senegal',
|
822 |
+
'RS' => 'Serbia',
|
823 |
+
'SC' => 'Seychelles',
|
824 |
+
'SL' => 'Sierra Leone',
|
825 |
+
'SG' => 'Singapore',
|
826 |
+
'SK' => 'Slovak Republic',
|
827 |
+
'SI' => 'Slovenia',
|
828 |
+
'SB' => 'Solomon Islands',
|
829 |
+
'SO' => 'Somalia',
|
830 |
+
'ZA' => 'South Africa',
|
831 |
+
'GS' => 'South Georgia',
|
832 |
+
'KR' => 'South Korea',
|
833 |
+
'SS' => 'South Sudan',
|
834 |
+
'ES' => 'Spain',
|
835 |
+
'LK' => 'Sri Lanka',
|
836 |
+
'SD' => 'Sudan',
|
837 |
+
'SR' => 'Suriname',
|
838 |
+
'SJ' => 'Svalbard and Jan Mayen Islands',
|
839 |
+
'SZ' => 'Swaziland',
|
840 |
+
'SE' => 'Sweden',
|
841 |
+
'CH' => 'Switzerland',
|
842 |
+
'SY' => 'Syrian Arab Republic',
|
843 |
+
'TW' => 'Taiwan',
|
844 |
+
'TJ' => 'Tajikistan',
|
845 |
+
'TZ' => 'Tanzania',
|
846 |
+
'TH' => 'Thailand',
|
847 |
+
'TL' => 'Timor-Leste',
|
848 |
+
'TG' => 'Togo',
|
849 |
+
'TK' => 'Tokelau',
|
850 |
+
'TO' => 'Tonga',
|
851 |
+
'TT' => 'Trinidad and Tobago',
|
852 |
+
'TN' => 'Tunisia',
|
853 |
+
'TR' => 'Turkey',
|
854 |
+
'TM' => 'Turkmenistan',
|
855 |
+
'TC' => 'Turks and Caicos Islands',
|
856 |
+
'TV' => 'Tuvalu',
|
857 |
+
'UG' => 'Uganda',
|
858 |
+
'UA' => 'Ukraine',
|
859 |
+
'AE' => 'United Arab Emirates',
|
860 |
+
'UY' => 'Uruguay',
|
861 |
+
'UM' => 'US Minor Outlying Islands',
|
862 |
+
'UZ' => 'Uzbekistan',
|
863 |
+
'VU' => 'Vanuatu',
|
864 |
+
'VE' => 'Venezuela',
|
865 |
+
'VN' => 'Vietnam',
|
866 |
+
'VG' => 'Virgin Islands (British)',
|
867 |
+
'VI' => 'Virgin Islands (USA)',
|
868 |
+
'WF' => 'Wallis and Futuna Islands',
|
869 |
+
'EH' => 'Western Sahara',
|
870 |
+
'WS' => 'Western Samoa',
|
871 |
+
'YE' => 'Yemen',
|
872 |
+
'ZM' => 'Zambia',
|
873 |
+
'ZW' => 'Zimbabwe',
|
874 |
+
);
|
875 |
+
}
|
876 |
+
return $countries;
|
877 |
+
}
|
878 |
+
|
879 |
+
function exactmetrics_get_api_url(){
|
880 |
+
return apply_filters( 'exactmetrics_get_api_url', 'api.exactmetrics.com/v2/' );
|
881 |
+
}
|
882 |
+
|
883 |
+
function exactmetrics_get_licensing_url(){
|
884 |
+
return apply_filters( 'exactmetrics_get_licensing_url', 'https://www.exactmetrics.com' );
|
885 |
+
}
|
886 |
+
|
887 |
+
function exactmetrics_is_wp_seo_active( ) {
|
888 |
+
$wp_seo_active = false; // @todo: improve this check. This is from old Yoast code.
|
889 |
+
|
890 |
+
// Makes sure is_plugin_active is available when called from front end
|
891 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
892 |
+
if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' ) ) {
|
893 |
+
$wp_seo_active = true;
|
894 |
+
}
|
895 |
+
return $wp_seo_active;
|
896 |
+
}
|
897 |
+
|
898 |
+
function exactmetrics_get_asset_version() {
|
899 |
+
if ( exactmetrics_is_debug_mode() || ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ) {
|
900 |
+
return time();
|
901 |
+
} else {
|
902 |
+
return EXACTMETRICS_VERSION;
|
903 |
+
}
|
904 |
+
}
|
905 |
+
|
906 |
+
function exactmetrics_is_debug_mode() {
|
907 |
+
$debug_mode = false;
|
908 |
+
if ( defined( 'EXACTMETRICS_DEBUG_MODE' ) && EXACTMETRICS_DEBUG_MODE ) {
|
909 |
+
$debug_mode = true;
|
910 |
+
}
|
911 |
+
|
912 |
+
return apply_filters( 'exactmetrics_is_debug_mode', $debug_mode );
|
913 |
+
}
|
914 |
+
|
915 |
+
function exactmetrics_is_network_active() {
|
916 |
+
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
|
917 |
+
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
918 |
+
}
|
919 |
+
|
920 |
+
if ( is_multisite() && is_plugin_active_for_network( plugin_basename( EXACTMETRICS_PLUGIN_FILE ) ) ) {
|
921 |
+
return true;
|
922 |
+
} else {
|
923 |
+
return false;
|
924 |
+
}
|
925 |
+
}
|
926 |
+
|
927 |
+
if ( ! function_exists ( 'remove_class_filter' ) ) {
|
928 |
+
/**
|
929 |
+
* Remove Class Filter Without Access to Class Object
|
930 |
+
*
|
931 |
+
* In order to use the core WordPress remove_filter() on a filter added with the callback
|
932 |
+
* to a class, you either have to have access to that class object, or it has to be a call
|
933 |
+
* to a static method. This method allows you to remove filters with a callback to a class
|
934 |
+
* you don't have access to.
|
935 |
+
*
|
936 |
+
* Works with WordPress 1.2 - 4.7+
|
937 |
+
*
|
938 |
+
* @param string $tag Filter to remove
|
939 |
+
* @param string $class_name Class name for the filter's callback
|
940 |
+
* @param string $method_name Method name for the filter's callback
|
941 |
+
* @param int $priority Priority of the filter (default 10)
|
942 |
+
*
|
943 |
+
* @return bool Whether the function is removed.
|
944 |
+
*/
|
945 |
+
function remove_class_filter( $tag, $class_name = '', $method_name = '', $priority = 10 ) {
|
946 |
+
global $wp_filter;
|
947 |
+
// Check that filter actually exists first
|
948 |
+
if ( ! isset( $wp_filter[ $tag ] ) ) return FALSE;
|
949 |
+
/**
|
950 |
+
* If filter config is an object, means we're using WordPress 4.7+ and the config is no longer
|
951 |
+
* a simple array, rather it is an object that implements the ArrayAccess interface.
|
952 |
+
*
|
953 |
+
* To be backwards compatible, we set $callbacks equal to the correct array as a reference (so $wp_filter is updated)
|
954 |
+
*
|
955 |
+
* @see https://make.wordpress.org/core/2016/09/08/wp_hook-next-generation-actions-and-filters/
|
956 |
+
*/
|
957 |
+
if ( is_object( $wp_filter[ $tag ] ) && isset( $wp_filter[ $tag ]->callbacks ) ) {
|
958 |
+
$callbacks = &$wp_filter[ $tag ]->callbacks;
|
959 |
+
} else {
|
960 |
+
$callbacks = &$wp_filter[ $tag ];
|
961 |
+
}
|
962 |
+
// Exit if there aren't any callbacks for specified priority
|
963 |
+
if ( ! isset( $callbacks[ $priority ] ) || empty( $callbacks[ $priority ] ) ) return FALSE;
|
964 |
+
// Loop through each filter for the specified priority, looking for our class & method
|
965 |
+
foreach( (array) $callbacks[ $priority ] as $filter_id => $filter ) {
|
966 |
+
// Filter should always be an array - array( $this, 'method' ), if not goto next
|
967 |
+
if ( ! isset( $filter[ 'function' ] ) || ! is_array( $filter[ 'function' ] ) ) continue;
|
968 |
+
// If first value in array is not an object, it can't be a class
|
969 |
+
if ( ! is_object( $filter[ 'function' ][ 0 ] ) ) continue;
|
970 |
+
// Method doesn't match the one we're looking for, goto next
|
971 |
+
if ( $filter[ 'function' ][ 1 ] !== $method_name ) continue;
|
972 |
+
// Method matched, now let's check the Class
|
973 |
+
if ( get_class( $filter[ 'function' ][ 0 ] ) === $class_name ) {
|
974 |
+
// Now let's remove it from the array
|
975 |
+
unset( $callbacks[ $priority ][ $filter_id ] );
|
976 |
+
// and if it was the only filter in that priority, unset that priority
|
977 |
+
if ( empty( $callbacks[ $priority ] ) ) unset( $callbacks[ $priority ] );
|
978 |
+
// and if the only filter for that tag, set the tag to an empty array
|
979 |
+
if ( empty( $callbacks ) ) $callbacks = array();
|
980 |
+
// If using WordPress older than 4.7
|
981 |
+
if ( ! is_object( $wp_filter[ $tag ] ) ) {
|
982 |
+
// Remove this filter from merged_filters, which specifies if filters have been sorted
|
983 |
+
unset( $GLOBALS[ 'merged_filters' ][ $tag ] );
|
984 |
+
}
|
985 |
+
return TRUE;
|
986 |
+
}
|
987 |
+
}
|
988 |
+
return FALSE;
|
989 |
+
}
|
990 |
+
} // End function exists
|
991 |
+
|
992 |
+
if ( ! function_exists ( 'remove_class_action' ) ) {
|
993 |
+
/**
|
994 |
+
* Remove Class Action Without Access to Class Object
|
995 |
+
*
|
996 |
+
* In order to use the core WordPress remove_action() on an action added with the callback
|
997 |
+
* to a class, you either have to have access to that class object, or it has to be a call
|
998 |
+
* to a static method. This method allows you to remove actions with a callback to a class
|
999 |
+
* you don't have access to.
|
1000 |
+
*
|
1001 |
+
* Works with WordPress 1.2 - 4.7+
|
1002 |
+
*
|
1003 |
+
* @param string $tag Action to remove
|
1004 |
+
* @param string $class_name Class name for the action's callback
|
1005 |
+
* @param string $method_name Method name for the action's callback
|
1006 |
+
* @param int $priority Priority of the action (default 10)
|
1007 |
+
*
|
1008 |
+
* @return bool Whether the function is removed.
|
1009 |
+
*/
|
1010 |
+
function remove_class_action( $tag, $class_name = '', $method_name = '', $priority = 10 ) {
|
1011 |
+
remove_class_filter( $tag, $class_name, $method_name, $priority );
|
1012 |
+
}
|
1013 |
+
} // End function exists
|
1014 |
+
|
1015 |
+
/**
|
1016 |
+
* Format a big number, instead of 1000000 you get 1.0M, works with billions also.
|
1017 |
+
*
|
1018 |
+
* @param int $number
|
1019 |
+
* @param int $precision
|
1020 |
+
*
|
1021 |
+
* @return string
|
1022 |
+
*/
|
1023 |
+
function exactmetrics_round_number( $number, $precision = 2 ) {
|
1024 |
+
|
1025 |
+
if ( $number < 1000000 ) {
|
1026 |
+
// Anything less than a million
|
1027 |
+
$number = number_format_i18n( $number );
|
1028 |
+
} else if ( $number < 1000000000 ) {
|
1029 |
+
// Anything less than a billion
|
1030 |
+
$number = number_format_i18n( $number / 1000000, $precision ) . 'M';
|
1031 |
+
} else {
|
1032 |
+
// At least a billion
|
1033 |
+
$number = number_format_i18n( $number / 1000000000, $precision ) . 'B';
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
return $number;
|
1037 |
+
}
|
1038 |
+
|
1039 |
+
if ( ! function_exists( 'wp_get_jed_locale_data' ) ) {
|
1040 |
+
/**
|
1041 |
+
* Returns Jed-formatted localization data. Added for backwards-compatibility.
|
1042 |
+
*
|
1043 |
+
* @param string $domain Translation domain.
|
1044 |
+
*
|
1045 |
+
* @return array
|
1046 |
+
*/
|
1047 |
+
function wp_get_jed_locale_data( $domain ) {
|
1048 |
+
$translations = get_translations_for_domain( $domain );
|
1049 |
+
|
1050 |
+
$locale = array(
|
1051 |
+
'' => array(
|
1052 |
+
'domain' => $domain,
|
1053 |
+
'lang' => is_admin() && function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale(),
|
1054 |
+
),
|
1055 |
+
);
|
1056 |
+
|
1057 |
+
if ( ! empty( $translations->headers['Plural-Forms'] ) ) {
|
1058 |
+
$locale['']['plural_forms'] = $translations->headers['Plural-Forms'];
|
1059 |
+
}
|
1060 |
+
|
1061 |
+
foreach ( $translations->entries as $msgid => $entry ) {
|
1062 |
+
$locale[ $msgid ] = $entry->translations;
|
1063 |
+
}
|
1064 |
+
|
1065 |
+
return $locale;
|
1066 |
+
}
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
function exactmetrics_get_inline_menu_icon() {
|
1070 |
+
$scheme = get_user_option( 'admin_color', get_current_user_id() );
|
1071 |
+
$use_dark_scheme = $scheme === 'light';
|
1072 |
+
if ( $use_dark_scheme ) {
|
1073 |
+
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMbSURBVHgBzZhbSFRBGMdnrbTsooaI0cUtEHso6MUgA4seSgjqqcKMSJBICHqtIEgregmJEovIh8DAegoiiEhTupAPQtBDVmRGFlFWdLNA8es3nFkZZ4/HPe5u2x9+zOxcvvnO3GeV+k8VUWmSiJQSbIa58CgSiTxQmRQO5UIj/JGJaoOoyoRoeDsMyOQahSMwQ/0L0VA5dDlO/IAG2AevnTz9e7dKlzBeCBdgzGm4E5ZY5RbACfjtlLsLK1SqhLEI1MFHp6EXsCWgXhRuSLwuQolKRhiohMeO4a9m7uQkaKNa/Ie3NlYm1HZBRb381zvJQ9DKdjCsQgp7ewkaIGolD0CNyrRwLhuOml4fH4GIU2gZQZZKjVZBGcyGPuihVwfV5A5GCVphk5vRJKlVD1yC83AHRuAyFAQ4Vx+rbCd+kNToJWz0abTEONoHRVM5NtNKPw0HYJaanvR+9AoqGLJPbiZpbwj202YzYZvyztH0Srz96bNYZyHxOeIdUTthqZP+BHb52PHtMbuAXhTaWKILQff0LXplwNTPJeiFlSb/PWlV5D8FvfufI60OrqkwouJtCa9aq36NT36HlV8CQz7tjvdYlk+mvj9NZ/y/W/FSn/yoFf8JeSpAcUNJV//CuZNE9RzIVokpH4qt390+ZR5a8eXwTqVbfMhBe6hM2hlrGLudBXAI2n3sxO9jAY1GzKoLYo14R0qFUzcfFjtpi8Q7sDck61inJC69SZcF2JoHvWaqqGk7Jt4FL6yG4RgUWnZyoAqeQVNAe+OOTXntoUyjCrcQYtIXv+fKu1rp26w+yM+yuNomaUcH9dCi0inT2+tgLRQHlIvN4x1indcqU7IcWi3e3d9Wf1hjW6ED7llclxDvReOQZqF4W8qI5ZB+1NwU6yETxjm9PTQ7X6gNXp3KQeNQARyXiTfWMfPBlSpZGQfvOw6Oml4o8nFID9s2eOvUGYRqlWrJ5A/aPSZfO1Ruht3WN9Nz81W6hPE8OCXx/1d0QYtMfBDreLs4J0JaZYb3isS/zGMO9aVkHiXhYAX0G2c0X+CwJPgg1voLGs+nF3NfjMgAAAAASUVORK5CYII=';
|
1074 |
+
} else {
|
1075 |
+
return 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAhCAYAAAC1ONkWAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMbSURBVHgBzZhbSFRBGMdnrbTsooaI0cUtEHso6MUgA4seSgjqqcKMSJBICHqtIEgregmJEovIh8DAegoiiEhTupAPQtBDVmRGFlFWdLNA8es3nFkZZ4/HPe5u2x9+zOxcvvnO3GeV+k8VUWmSiJQSbIa58CgSiTxQmRQO5UIj/JGJaoOoyoRoeDsMyOQahSMwQ/0L0VA5dDlO/IAG2AevnTz9e7dKlzBeCBdgzGm4E5ZY5RbACfjtlLsLK1SqhLEI1MFHp6EXsCWgXhRuSLwuQolKRhiohMeO4a9m7uQkaKNa/Ie3NlYm1HZBRb381zvJQ9DKdjCsQgp7ewkaIGolD0CNyrRwLhuOml4fH4GIU2gZQZZKjVZBGcyGPuihVwfV5A5GCVphk5vRJKlVD1yC83AHRuAyFAQ4Vx+rbCd+kNToJWz0abTEONoHRVM5NtNKPw0HYJaanvR+9AoqGLJPbiZpbwj202YzYZvyztH0Srz96bNYZyHxOeIdUTthqZP+BHb52PHtMbuAXhTaWKILQff0LXplwNTPJeiFlSb/PWlV5D8FvfufI60OrqkwouJtCa9aq36NT36HlV8CQz7tjvdYlk+mvj9NZ/y/W/FSn/yoFf8JeSpAcUNJV//CuZNE9RzIVokpH4qt390+ZR5a8eXwTqVbfMhBe6hM2hlrGLudBXAI2n3sxO9jAY1GzKoLYo14R0qFUzcfFjtpi8Q7sDck61inJC69SZcF2JoHvWaqqGk7Jt4FL6yG4RgUWnZyoAqeQVNAe+OOTXntoUyjCrcQYtIXv+fKu1rp26w+yM+yuNomaUcH9dCi0inT2+tgLRQHlIvN4x1indcqU7IcWi3e3d9Wf1hjW6ED7llclxDvReOQZqF4W8qI5ZB+1NwU6yETxjm9PTQ7X6gNXp3KQeNQARyXiTfWMfPBlSpZGQfvOw6Oml4o8nFID9s2eOvUGYRqlWrJ5A/aPSZfO1Ruht3WN9Nz81W6hPE8OCXx/1d0QYtMfBDreLs4J0JaZYb3isS/zGMO9aVkHiXhYAX0G2c0X+CwJPgg1voLGs+nF3NfjMgAAAAASUVORK5CYII=';
|
1076 |
+
}
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
|
1080 |
+
function exactmetrics_get_shareasale_id() {
|
1081 |
+
// Check if there's a constant.
|
1082 |
+
$shareasale_id = '';
|
1083 |
+
if ( defined( 'EXACTMETRICS_SHAREASALE_ID' ) ) {
|
1084 |
+
$shareasale_id = EXACTMETRICS_SHAREASALE_ID;
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
// If there's no constant, check if there's an option.
|
1088 |
+
if ( empty( $shareasale_id ) ) {
|
1089 |
+
$shareasale_id = get_option( 'exactmetrics_shareasale_id', '' );
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
// Whether we have an ID or not, filter the ID.
|
1093 |
+
$shareasale_id = apply_filters( 'exactmetrics_shareasale_id', $shareasale_id );
|
1094 |
+
|
1095 |
+
// Ensure it's a number
|
1096 |
+
$shareasale_id = absint( $shareasale_id );
|
1097 |
+
|
1098 |
+
return $shareasale_id;
|
1099 |
+
}
|
1100 |
+
|
1101 |
+
// Passed in with mandatory default redirect and shareasaleid from exactmetrics_get_upgrade_link
|
1102 |
+
function exactmetrics_get_shareasale_url( $shareasale_id, $shareasale_redirect ) {
|
1103 |
+
// Check if there's a constant.
|
1104 |
+
$custom = false;
|
1105 |
+
if ( defined( 'EXACTMETRICS_SHAREASALE_REDIRECT_URL' ) ) {
|
1106 |
+
$shareasale_redirect = EXACTMETRICS_SHAREASALE_REDIRECT_URL;
|
1107 |
+
$custom = true;
|
1108 |
+
}
|
1109 |
+
|
1110 |
+
// If there's no constant, check if there's an option.
|
1111 |
+
if ( empty( $custom ) ) {
|
1112 |
+
$shareasale_redirect = get_option( 'exactmetrics_shareasale_redirect_url', '' );
|
1113 |
+
$custom = true;
|
1114 |
+
}
|
1115 |
+
|
1116 |
+
// Whether we have an ID or not, filter the ID.
|
1117 |
+
$shareasale_redirect = apply_filters( 'exactmetrics_shareasale_redirect_url', $shareasale_redirect, $custom );
|
1118 |
+
$shareasale_url = sprintf( 'https://www.shareasale.com/r.cfm?B=971799&U=%s&M=69975&urllink=%s', $shareasale_id, $shareasale_redirect );
|
1119 |
+
$shareasale_url = apply_filters( 'exactmetrics_shareasale_redirect_entire_url', $shareasale_url, $shareasale_id, $shareasale_redirect );
|
1120 |
+
return $shareasale_url;
|
1121 |
+
}
|
1122 |
+
|
1123 |
+
/**
|
1124 |
+
* Get a clean page title for archives.
|
1125 |
+
*/
|
1126 |
+
function exactmetrics_get_page_title() {
|
1127 |
+
|
1128 |
+
$title = __( 'Archives' );
|
1129 |
+
|
1130 |
+
if ( is_category() ) {
|
1131 |
+
/* translators: Category archive title. %s: Category name */
|
1132 |
+
$title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) );
|
1133 |
+
} elseif ( is_tag() ) {
|
1134 |
+
/* translators: Tag archive title. %s: Tag name */
|
1135 |
+
$title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) );
|
1136 |
+
} elseif ( is_author() ) {
|
1137 |
+
/* translators: Author archive title. %s: Author name */
|
1138 |
+
$title = sprintf( __( 'Author: %s' ), '<span class="vcard">' . get_the_author() . '</span>' );
|
1139 |
+
} elseif ( is_year() ) {
|
1140 |
+
/* translators: Yearly archive title. %s: Year */
|
1141 |
+
$title = sprintf( __( 'Year: %s' ), get_the_date( _x( 'Y', 'yearly archives date format' ) ) );
|
1142 |
+
} elseif ( is_month() ) {
|
1143 |
+
/* translators: Monthly archive title. %s: Month name and year */
|
1144 |
+
$title = sprintf( __( 'Month: %s' ), get_the_date( _x( 'F Y', 'monthly archives date format' ) ) );
|
1145 |
+
} elseif ( is_day() ) {
|
1146 |
+
/* translators: Daily archive title. %s: Date */
|
1147 |
+
$title = sprintf( __( 'Day: %s' ), get_the_date( _x( 'F j, Y', 'daily archives date format' ) ) );
|
1148 |
+
} elseif ( is_tax( 'post_format' ) ) {
|
1149 |
+
if ( is_tax( 'post_format', 'post-format-aside' ) ) {
|
1150 |
+
$title = _x( 'Asides', 'post format archive title' );
|
1151 |
+
} elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) {
|
1152 |
+
$title = _x( 'Galleries', 'post format archive title' );
|
1153 |
+
} elseif ( is_tax( 'post_format', 'post-format-image' ) ) {
|
1154 |
+
$title = _x( 'Images', 'post format archive title' );
|
1155 |
+
} elseif ( is_tax( 'post_format', 'post-format-video' ) ) {
|
1156 |
+
$title = _x( 'Videos', 'post format archive title' );
|
1157 |
+
} elseif ( is_tax( 'post_format', 'post-format-quote' ) ) {
|
1158 |
+
$title = _x( 'Quotes', 'post format archive title' );
|
1159 |
+
} elseif ( is_tax( 'post_format', 'post-format-link' ) ) {
|
1160 |
+
$title = _x( 'Links', 'post format archive title' );
|
1161 |
+
} elseif ( is_tax( 'post_format', 'post-format-status' ) ) {
|
1162 |
+
$title = _x( 'Statuses', 'post format archive title' );
|
1163 |
+
} elseif ( is_tax( 'post_format', 'post-format-audio' ) ) {
|
1164 |
+
$title = _x( 'Audio', 'post format archive title' );
|
1165 |
+
} elseif ( is_tax( 'post_format', 'post-format-chat' ) ) {
|
1166 |
+
$title = _x( 'Chats', 'post format archive title' );
|
1167 |
+
}
|
1168 |
+
} elseif ( is_post_type_archive() ) {
|
1169 |
+
/* translators: Post type archive title. %s: Post type name */
|
1170 |
+
$title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) );
|
1171 |
+
} elseif ( is_tax() ) {
|
1172 |
+
$tax = get_taxonomy( get_queried_object()->taxonomy );
|
1173 |
+
/* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term */
|
1174 |
+
$title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) );
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
return $title;
|
1178 |
+
|
1179 |
+
}
|
1180 |
+
|
1181 |
+
/**
|
1182 |
+
* Make a request to the front page and check if the tracking code is present. Moved here from onboarding wizard
|
1183 |
+
* to be used in the site health check.
|
1184 |
+
*
|
1185 |
+
* @return array
|
1186 |
+
*/
|
1187 |
+
function exactmetrics_is_code_installed_frontend() {
|
1188 |
+
// Grab the front page html.
|
1189 |
+
$request = wp_remote_request( home_url(), array(
|
1190 |
+
'sslverify' => false,
|
1191 |
+
) );
|
1192 |
+
$errors = array();
|
1193 |
+
|
1194 |
+
if ( 200 === wp_remote_retrieve_response_code( $request ) ) {
|
1195 |
+
|
1196 |
+
$body = wp_remote_retrieve_body( $request );
|
1197 |
+
$current_ua_code = exactmetrics_get_ua_to_output();
|
1198 |
+
$ua_limit = 2;
|
1199 |
+
// If the ads addon is installed another UA is added to the page.
|
1200 |
+
if ( class_exists( 'ExactMetrics_Ads' ) ) {
|
1201 |
+
$ua_limit = 3;
|
1202 |
+
}
|
1203 |
+
// Translators: The placeholders are for making the "We noticed you're using a caching plugin" text bold.
|
1204 |
+
$cache_error = sprintf( esc_html__( '%1$sWe noticed you\'re using a caching plugin or caching from your hosting provider.%2$s Be sure to clear the cache to ensure the tracking appears on all pages and posts. %3$s(See this guide on how to clear cache)%4$s.', 'google-analytics-dashboard-for-wp' ), '<b>', '</b>', ' <a href="https://www.wpbeginner.com/beginners-guide/how-to-clear-your-cache-in-wordpress/" target="_blank">', '</a>' );
|
1205 |
+
// Translators: The placeholders are for making the "We have detected multiple tracking codes" text bold & adding a link to support.
|
1206 |
+
$multiple_ua_error = sprintf( esc_html__( '%1$sWe have detected multiple tracking codes%2$s! You should remove non-ExactMetrics ones. If you need help finding them please %3$sread this article%4$s.', 'google-analytics-dashboard-for-wp' ), '<b>', '</b>', '<a href="https://www.exactmetrics.com/docs/how-to-find-duplicate-google-analytics-tracking-codes-in-wordpress/" target="_blank">', '</a>' );
|
1207 |
+
|
1208 |
+
// First, check if the tracking frontend code is present.
|
1209 |
+
if ( false === strpos( $body, '__gaTracker' ) ) {
|
1210 |
+
$errors[] = $cache_error;
|
1211 |
+
} else {
|
1212 |
+
// Check if the current UA code is actually present.
|
1213 |
+
if ( $current_ua_code && false === strpos( $body, $current_ua_code ) ) {
|
1214 |
+
// We have the tracking code but using another UA, so it's cached.
|
1215 |
+
$errors[] = $cache_error;
|
1216 |
+
}
|
1217 |
+
// Grab all the UA codes from the page.
|
1218 |
+
$pattern = '/UA-[0-9]+/m';
|
1219 |
+
preg_match_all( $pattern, $body, $matches );
|
1220 |
+
// If more than twice ( because MI has a ga-disable-UA also ), let them know to remove the others.
|
1221 |
+
if ( ! empty( $matches[0] ) && is_array( $matches[0] ) && count( $matches[0] ) > $ua_limit ) {
|
1222 |
+
$errors[] = $multiple_ua_error;
|
1223 |
+
}
|
1224 |
+
}
|
1225 |
+
}
|
1226 |
+
|
1227 |
+
return $errors;
|
1228 |
+
}
|
1229 |
+
|
1230 |
+
/**
|
1231 |
+
* Returns a HEX color to highlight menu items based on the admin color scheme.
|
1232 |
+
*/
|
1233 |
+
function exactmetrics_menu_highlight_color() {
|
1234 |
+
|
1235 |
+
$color_scheme = get_user_option( 'admin_color' );
|
1236 |
+
$color = '#7cc048';
|
1237 |
+
if ( 'light' === $color_scheme || 'blue' === $color_scheme ) {
|
1238 |
+
$color = '#5f3ea7';
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
return $color;
|
1242 |
+
}
|
1243 |
+
|
1244 |
+
/**
|
1245 |
+
* Track Pretty Links redirects with ExactMetrics.
|
1246 |
+
*
|
1247 |
+
* @param string $url The url to which users get redirected.
|
1248 |
+
*/
|
1249 |
+
function exactmetrics_custom_track_pretty_links_redirect( $url ) {
|
1250 |
+
if ( ! function_exists( 'exactmetrics_mp_track_event_call' ) ) {
|
1251 |
+
return;
|
1252 |
+
}
|
1253 |
+
// Try to determine if click originated on the same site.
|
1254 |
+
$referer = ! empty( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '';
|
1255 |
+
if ( ! empty( $referer ) ) {
|
1256 |
+
$current_site_url = get_bloginfo( 'url' );
|
1257 |
+
$current_site_parsed = wp_parse_url( $current_site_url );
|
1258 |
+
$parsed_referer = wp_parse_url( $referer );
|
1259 |
+
if ( ! empty( $parsed_referer['host'] ) && ! empty( $current_site_parsed['host'] ) && $current_site_parsed['host'] === $parsed_referer['host'] ) {
|
1260 |
+
// Don't track clicks originating from same site as those are tracked with JS.
|
1261 |
+
return;
|
1262 |
+
}
|
1263 |
+
}
|
1264 |
+
// Check if this is an affiliate link and use the appropriate category.
|
1265 |
+
$ec = 'outbound-link';
|
1266 |
+
$inbound_paths = exactmetrics_get_option( 'affiliate_links', array() );
|
1267 |
+
$path = empty( $_SERVER['REQUEST_URI'] ) ? '' : $_SERVER['REQUEST_URI'];
|
1268 |
+
if ( ! empty( $inbound_paths ) && is_array( $inbound_paths ) && ! empty( $path ) ) {
|
1269 |
+
$found = false;
|
1270 |
+
foreach ( $inbound_paths as $inbound_path ) {
|
1271 |
+
if ( empty( $inbound_path['path'] ) ) {
|
1272 |
+
continue;
|
1273 |
+
}
|
1274 |
+
if ( 0 === strpos( $path, trim( $inbound_path['path'] ) ) ) {
|
1275 |
+
$label = ! empty( $inbound_path['label'] ) ? trim( $inbound_path['label'] ) : 'aff';
|
1276 |
+
$ec .= '-' . $label;
|
1277 |
+
$found = true;
|
1278 |
+
break;
|
1279 |
+
}
|
1280 |
+
}
|
1281 |
+
if ( ! $found ) {
|
1282 |
+
return;
|
1283 |
+
}
|
1284 |
+
} else {
|
1285 |
+
// no paths setup in ExactMetrics settings
|
1286 |
+
return;
|
1287 |
+
}
|
1288 |
+
|
1289 |
+
$track_args = array(
|
1290 |
+
't' => 'event',
|
1291 |
+
'ec' => $ec,
|
1292 |
+
'ea' => $url,
|
1293 |
+
'el' => 'external-redirect',
|
1294 |
+
);
|
1295 |
+
exactmetrics_mp_track_event_call( $track_args );
|
1296 |
+
}
|
1297 |
+
add_action( 'prli_before_redirect', 'exactmetrics_custom_track_pretty_links_redirect' );
|
includes/index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
includes/measurement-protocol.php
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
+
|
6 |
+
function exactmetrics_get_mp_api_url( ) {
|
7 |
+
return 'https://www.google-analytics.com/collect';
|
8 |
+
}
|
9 |
+
|
10 |
+
function exactmetrics_mp_api_call( $args = array() ) {
|
11 |
+
$user_agent = '';
|
12 |
+
if ( ! empty( $args['user-agent'] ) ) {
|
13 |
+
$user_agent = $args['user-agent'];
|
14 |
+
unset( $args['user-agent'] );
|
15 |
+
}
|
16 |
+
|
17 |
+
$payment_id = 0;
|
18 |
+
if ( ! empty( $args['payment_id'] ) ) {
|
19 |
+
$payment_id = $args['payment_id'];
|
20 |
+
unset( $args['payment_id'] );
|
21 |
+
}
|
22 |
+
|
23 |
+
$defaults = array(
|
24 |
+
't' => 'event', // Required: Hit type
|
25 |
+
'ec' => '', // Optional: Event category
|
26 |
+
'ea' => '', // Optional: Event Action
|
27 |
+
'el' => '', // Optional: Event Label
|
28 |
+
'ev' => null, // Optional: Event Value
|
29 |
+
);
|
30 |
+
|
31 |
+
$body = array_merge( $defaults , $args );
|
32 |
+
|
33 |
+
// We want to get the user's IP address when possible
|
34 |
+
$ip = '';
|
35 |
+
if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) && ! filter_var( $_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP ) === false ) {
|
36 |
+
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
37 |
+
} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) && ! filter_var( $_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP ) === false ) {
|
38 |
+
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
39 |
+
} else {
|
40 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
41 |
+
}
|
42 |
+
|
43 |
+
$ip = apply_filters( 'exactmetrics_mp_api_call_ip', $ip );
|
44 |
+
|
45 |
+
// If possible, let's get the user's language
|
46 |
+
$user_language = isset( $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) ? explode( ',', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ) : array();
|
47 |
+
$user_language = reset( $user_language );
|
48 |
+
$user_language = sanitize_text_field( $user_language );
|
49 |
+
|
50 |
+
$default_body = array(
|
51 |
+
// Required: Version
|
52 |
+
'v' => '1',
|
53 |
+
|
54 |
+
// Required: UA code
|
55 |
+
'tid' => exactmetrics_get_ua_to_output( array( 'ecommerce' => $args ) ),
|
56 |
+
|
57 |
+
// Required: User visitor ID
|
58 |
+
'cid' => exactmetrics_get_client_id( $payment_id ),
|
59 |
+
|
60 |
+
// Required: Type of hit (either pageview or event)
|
61 |
+
't' => 'pageview', // Required - Hit type
|
62 |
+
|
63 |
+
// Optional: Was the event a non-interaction event (for bounce purposes)
|
64 |
+
'ni' => true,
|
65 |
+
|
66 |
+
// Optional: Document Host Name
|
67 |
+
'dh' => str_replace( array( 'http://', 'https://' ), '', site_url() ),
|
68 |
+
|
69 |
+
// Optional: Requested URI
|
70 |
+
'dp' => $_SERVER['REQUEST_URI'],
|
71 |
+
|
72 |
+
// Optional: Page Title
|
73 |
+
'dt' => get_the_title(),
|
74 |
+
|
75 |
+
// Optional: User language
|
76 |
+
'ul' => $user_language,
|
77 |
+
|
78 |
+
// Optional: User IP address
|
79 |
+
'uip' => $ip,
|
80 |
+
|
81 |
+
// Optional: User Agent
|
82 |
+
'ua' => ! empty( $user_agent ) ? $user_agent : $_SERVER['HTTP_USER_AGENT'],
|
83 |
+
|
84 |
+
// Optional: Time of the event
|
85 |
+
'z' => time()
|
86 |
+
);
|
87 |
+
|
88 |
+
$body = wp_parse_args( $body, $default_body );
|
89 |
+
$body = apply_filters( 'exactmetrics_mp_api_call', $body );
|
90 |
+
|
91 |
+
|
92 |
+
// Ensure that the CID is not empty
|
93 |
+
if ( empty( $body['cid'] ) ) {
|
94 |
+
$body['cid'] = exactmetrics_generate_uuid();
|
95 |
+
}
|
96 |
+
|
97 |
+
// Unset empty values to reduce request size
|
98 |
+
foreach ( $body as $key => $value ) {
|
99 |
+
if ( empty( $value ) ) {
|
100 |
+
unset( $body[ $key ] );
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
$debug_mode = exactmetrics_is_debug_mode();
|
105 |
+
$args = array(
|
106 |
+
'method' => 'POST',
|
107 |
+
'timeout' => '5',
|
108 |
+
'blocking' => ( $debug_mode ) ? true : false,
|
109 |
+
'body' => $body,
|
110 |
+
);
|
111 |
+
|
112 |
+
if ( ! empty( $user_agent ) ) {
|
113 |
+
$args['user-agent'] = $user_agent;
|
114 |
+
}
|
115 |
+
|
116 |
+
$response = wp_remote_post( exactmetrics_get_mp_api_url(), $args );
|
117 |
+
|
118 |
+
return $response;
|
119 |
+
}
|
120 |
+
|
121 |
+
function exactmetrics_mp_track_event_call( $args = array() ) {
|
122 |
+
$default_args = array(
|
123 |
+
// Change the default type to event
|
124 |
+
't' => 'event',
|
125 |
+
|
126 |
+
// Required: Event Category
|
127 |
+
'ec' => '',
|
128 |
+
|
129 |
+
// Required: Event Action
|
130 |
+
'ea' => '',
|
131 |
+
|
132 |
+
// Required: Event Label
|
133 |
+
'el' => '',
|
134 |
+
|
135 |
+
// Optional: Event Value
|
136 |
+
'ev' => null,
|
137 |
+
);
|
138 |
+
$args = wp_parse_args( $args, $default_args );
|
139 |
+
//$args = apply_filters( 'exactmetrics_mp_track_event_call', $args );
|
140 |
+
|
141 |
+
return exactmetrics_mp_api_call( $args );
|
142 |
+
}
|
includes/options.php
ADDED
@@ -0,0 +1,419 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Option functions.
|
4 |
+
*
|
5 |
+
* @since 6.0.0
|
6 |
+
*
|
7 |
+
* @package ExactMetrics
|
8 |
+
* @subpackage Options
|
9 |
+
* @author Chris Christoff
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
function exactmetrics_get_options() {
|
18 |
+
$settings = array();
|
19 |
+
$option_name = exactmetrics_get_option_name();
|
20 |
+
//$settings = get_site_option( $option_name );
|
21 |
+
//$use_network_settings = ! empty( $use_network_settings['use_network_settings'] ) ? true : false;
|
22 |
+
//$is_network = is_multisite();
|
23 |
+
|
24 |
+
//if ( $is_network && $use_network_settings ) {
|
25 |
+
// return $settings;
|
26 |
+
//} else if ( $is_network ) {
|
27 |
+
$settings = get_option( $option_name );
|
28 |
+
//} else {
|
29 |
+
// return $settings;
|
30 |
+
//}
|
31 |
+
if ( empty( $settings ) || ! is_array( $settings ) ) {
|
32 |
+
$settings = array();
|
33 |
+
}
|
34 |
+
return $settings;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Helper method for getting a setting's value. Falls back to the default
|
39 |
+
* setting value if none exists in the options table.
|
40 |
+
*
|
41 |
+
* @since 6.0.0
|
42 |
+
* @access public
|
43 |
+
*
|
44 |
+
* @param string $key The setting key to retrieve.
|
45 |
+
* @param mixed $default The default value of the setting key to retrieve.
|
46 |
+
* @return string The value of the setting.
|
47 |
+
*/
|
48 |
+
function exactmetrics_get_option( $key = '', $default = false ) {
|
49 |
+
global $exactmetrics_settings;
|
50 |
+
$value = ! empty( $exactmetrics_settings[ $key ] ) ? $exactmetrics_settings[ $key ] : $default;
|
51 |
+
$value = apply_filters( 'exactmetrics_get_option', $value, $key, $default );
|
52 |
+
return apply_filters( 'exactmetrics_get_option_' . $key, $value, $key, $default );
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Helper method for getting the UA string.
|
57 |
+
*
|
58 |
+
* @since 6.0.0
|
59 |
+
* @access public
|
60 |
+
*
|
61 |
+
* @return string The UA to use.
|
62 |
+
*/
|
63 |
+
function exactmetrics_get_ua() {
|
64 |
+
// Allow short circuiting (for staging sites)
|
65 |
+
if ( defined( 'EXACTMETRICS_DISABLE_TRACKING' ) && EXACTMETRICS_DISABLE_TRACKING ) {
|
66 |
+
return '';
|
67 |
+
}
|
68 |
+
|
69 |
+
// Try getting it from the auth UA
|
70 |
+
$ua = ExactMetrics()->auth->get_ua();
|
71 |
+
|
72 |
+
// If that didn't work, try the manual UA at the site level
|
73 |
+
if ( empty( $ua ) ) {
|
74 |
+
$ua = ExactMetrics()->auth->get_manual_ua();
|
75 |
+
// If that didn't work try getting it from the network
|
76 |
+
if ( empty( $ua ) ) {
|
77 |
+
$ua = exactmetrics_get_network_ua();
|
78 |
+
// If that didn't work, try getting it from the overall constant. If it's not there, leave it blank
|
79 |
+
if ( empty( $ua ) ) {
|
80 |
+
$ua = defined( 'EXACTMETRICS_GA_UA' ) && EXACTMETRICS_GA_UA ? exactmetrics_is_valid_ua( EXACTMETRICS_GA_UA ) : '';
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
// Feed through the filter
|
86 |
+
$pre_filter = $ua;
|
87 |
+
$ua = apply_filters( 'exactmetrics_get_ua', $ua );
|
88 |
+
|
89 |
+
// Only run through exactmetrics_is_valid_ua if it's different than pre-filter
|
90 |
+
return $pre_filter === $ua ? $ua : exactmetrics_is_valid_ua( $ua );
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Helper method for getting the network UA string.
|
95 |
+
*
|
96 |
+
* @since 6.0.0
|
97 |
+
* @access public
|
98 |
+
*
|
99 |
+
* @return string The UA to use.
|
100 |
+
*/
|
101 |
+
function exactmetrics_get_network_ua() {
|
102 |
+
if ( ! is_multisite() ) {
|
103 |
+
return '';
|
104 |
+
}
|
105 |
+
|
106 |
+
// First try network auth UA
|
107 |
+
$ua = ExactMetrics()->auth->get_network_ua();
|
108 |
+
if ( ! empty( $ua ) ) {
|
109 |
+
return $ua;
|
110 |
+
}
|
111 |
+
|
112 |
+
// Then try manual network UA
|
113 |
+
$ua = ExactMetrics()->auth->get_network_manual_ua();
|
114 |
+
if ( ! empty( $ua ) ) {
|
115 |
+
return $ua;
|
116 |
+
}
|
117 |
+
|
118 |
+
// See if the constant is defined
|
119 |
+
if ( defined( 'EXACTMETRICS_MS_GA_UA' ) && exactmetrics_is_valid_ua( EXACTMETRICS_MS_GA_UA ) ) {
|
120 |
+
return EXACTMETRICS_MS_GA_UA;
|
121 |
+
}
|
122 |
+
|
123 |
+
return '';
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Helper method for getting the UA string that's output on the frontend.
|
128 |
+
*
|
129 |
+
* @since 6.0.0
|
130 |
+
* @access public
|
131 |
+
*
|
132 |
+
* @param array $args Allow calling functions to give args to use in future applications.
|
133 |
+
* @return string The UA to use on frontend.
|
134 |
+
*/
|
135 |
+
function exactmetrics_get_ua_to_output( $args = array() ) {
|
136 |
+
$ua = exactmetrics_get_ua();
|
137 |
+
$ua = apply_filters( 'exactmetrics_get_ua_to_output', $ua, $args );
|
138 |
+
return exactmetrics_is_valid_ua( $ua );
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Helper method for updating a setting's value.
|
143 |
+
*
|
144 |
+
* @since 6.0.0
|
145 |
+
* @access public
|
146 |
+
*
|
147 |
+
* @param string $key The setting key.
|
148 |
+
* @param string $value The value to set for the key.
|
149 |
+
* @return boolean True if updated, false if not.
|
150 |
+
*/
|
151 |
+
function exactmetrics_update_option( $key = '', $value = false ) {
|
152 |
+
|
153 |
+
// If no key, exit
|
154 |
+
if ( empty( $key ) ){
|
155 |
+
return false;
|
156 |
+
}
|
157 |
+
|
158 |
+
if ( empty( $value ) ) {
|
159 |
+
$remove_option = exactmetrics_delete_option( $key );
|
160 |
+
return $remove_option;
|
161 |
+
}
|
162 |
+
|
163 |
+
$option_name = exactmetrics_get_option_name();
|
164 |
+
|
165 |
+
// First let's grab the current settings
|
166 |
+
|
167 |
+
// if on network panel or if on single site using network settings
|
168 |
+
//$settings = get_site_option( $option_name );
|
169 |
+
//$use_network_settings = ! empty( $use_network_settings['use_network_settings'] ) ? true : false;
|
170 |
+
//$is_network = is_multisite();
|
171 |
+
//$update_network_option = true;
|
172 |
+
//if ( ! is_network_admin() && ! ( $is_network && $use_network_settings ) ) {
|
173 |
+
$settings = get_option( $option_name );
|
174 |
+
// $update_network_option = false;
|
175 |
+
//}
|
176 |
+
|
177 |
+
if ( ! is_array( $settings ) ) {
|
178 |
+
$settings = array();
|
179 |
+
}
|
180 |
+
|
181 |
+
// Let's let devs alter that value coming in
|
182 |
+
$value = apply_filters( 'exactmetrics_update_option', $value, $key );
|
183 |
+
|
184 |
+
// Next let's try to update the value
|
185 |
+
$settings[ $key ] = $value;
|
186 |
+
$did_update = false;
|
187 |
+
//if ( $update_network_option ) {
|
188 |
+
// $did_update = update_site_option( $option_name, $settings );
|
189 |
+
//} else {
|
190 |
+
$did_update = update_option( $option_name, $settings );
|
191 |
+
//}
|
192 |
+
|
193 |
+
// If it updated, let's update the global variable
|
194 |
+
if ( $did_update ){
|
195 |
+
global $exactmetrics_settings;
|
196 |
+
$exactmetrics_settings[ $key ] = $value;
|
197 |
+
}
|
198 |
+
|
199 |
+
return $did_update;
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Helper method for deleting a setting's value.
|
204 |
+
*
|
205 |
+
* @since 6.0.0
|
206 |
+
* @access public
|
207 |
+
*
|
208 |
+
* @param string $key The setting key.
|
209 |
+
* @return boolean True if removed, false if not.
|
210 |
+
*/
|
211 |
+
function exactmetrics_delete_option( $key = '' ) {
|
212 |
+
// If no key, exit
|
213 |
+
if ( empty( $key ) ){
|
214 |
+
return false;
|
215 |
+
}
|
216 |
+
|
217 |
+
$option_name = exactmetrics_get_option_name();
|
218 |
+
|
219 |
+
// First let's grab the current settings
|
220 |
+
|
221 |
+
// if on network panel or if on single site using network settings
|
222 |
+
//$settings = get_site_option( $option_name );
|
223 |
+
//$use_network_settings = ! empty( $use_network_settings['use_network_settings'] ) ? true : false;
|
224 |
+
//$is_network = is_multisite();
|
225 |
+
//$update_network_option = true;
|
226 |
+
//if ( ! is_network_admin() && ! ( $is_network && $use_network_settings ) ) {
|
227 |
+
$settings = get_option( $option_name );
|
228 |
+
// $update_network_option = false;
|
229 |
+
//}
|
230 |
+
|
231 |
+
// Next let's try to remove the key
|
232 |
+
if( isset( $settings[ $key ] ) ) {
|
233 |
+
unset( $settings[ $key ] );
|
234 |
+
}
|
235 |
+
|
236 |
+
$did_update = false;
|
237 |
+
//if ( $update_network_option ) {
|
238 |
+
// $did_update = update_site_option( 'exactmetrics_settings', $settings );
|
239 |
+
//} else {
|
240 |
+
$did_update = update_option( $option_name, $settings );
|
241 |
+
//}
|
242 |
+
|
243 |
+
// If it updated, let's update the global variable
|
244 |
+
if ( $did_update ){
|
245 |
+
global $exactmetrics_settings;
|
246 |
+
$exactmetrics_settings = $settings;
|
247 |
+
}
|
248 |
+
|
249 |
+
return $did_update;
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Helper method for deleting multiple settings value.
|
254 |
+
*
|
255 |
+
* @since 6.0.0
|
256 |
+
* @access public
|
257 |
+
*
|
258 |
+
* @param string $key The setting key.
|
259 |
+
* @return boolean True if removed, false if not.
|
260 |
+
*/
|
261 |
+
function exactmetrics_delete_options( $keys = array() ) {
|
262 |
+
// If no keys, exit
|
263 |
+
if ( empty( $keys ) || ! is_array( $keys ) ){
|
264 |
+
return false;
|
265 |
+
}
|
266 |
+
|
267 |
+
$option_name = exactmetrics_get_option_name();
|
268 |
+
|
269 |
+
// First let's grab the current settings
|
270 |
+
|
271 |
+
// if on network panel or if on single site using network settings
|
272 |
+
//$settings = get_site_option( $option_name );
|
273 |
+
//$use_network_settings = ! empty( $use_network_settings['use_network_settings'] ) ? true : false;
|
274 |
+
//$is_network = is_multisite();
|
275 |
+
//$update_network_option = true;
|
276 |
+
//if ( ! is_network_admin() && ! ( $is_network && $use_network_settings ) ) {
|
277 |
+
$settings = get_option( $option_name );
|
278 |
+
// $update_network_option = false;
|
279 |
+
//}
|
280 |
+
|
281 |
+
// Next let's try to remove the keys
|
282 |
+
foreach ( $keys as $key ) {
|
283 |
+
if( isset( $settings[ $key ] ) ) {
|
284 |
+
unset( $settings[ $key ] );
|
285 |
+
}
|
286 |
+
}
|
287 |
+
|
288 |
+
$did_update = false;
|
289 |
+
//if ( $update_network_option ) {
|
290 |
+
// $did_update = update_site_option( 'exactmetrics_settings', $settings );
|
291 |
+
//} else {
|
292 |
+
$did_update = update_option( $option_name, $settings );
|
293 |
+
//}
|
294 |
+
|
295 |
+
// If it updated, let's update the global variable
|
296 |
+
if ( $did_update ){
|
297 |
+
global $exactmetrics_settings;
|
298 |
+
$exactmetrics_settings = $settings;
|
299 |
+
}
|
300 |
+
|
301 |
+
return $did_update;
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Is valid ua code.
|
306 |
+
*
|
307 |
+
* @access public
|
308 |
+
* @since 6.0.0
|
309 |
+
*
|
310 |
+
* @param string $ua_code UA code to check validity for.
|
311 |
+
*
|
312 |
+
* @return string|false Return cleaned ua string if valid, else returns false.
|
313 |
+
*/
|
314 |
+
function exactmetrics_is_valid_ua( $ua_code = '' ) {
|
315 |
+
$ua_code = (string) $ua_code; // Rare case, but let's make sure it never happens.
|
316 |
+
$ua_code = trim( $ua_code );
|
317 |
+
|
318 |
+
if ( empty( $ua_code ) ) {
|
319 |
+
return '';
|
320 |
+
}
|
321 |
+
|
322 |
+
// Replace all type of dashes (n-dash, m-dash, minus) with normal dashes.
|
323 |
+
$ua_code = str_replace( array( '–', '—', '−' ), '-', $ua_code );
|
324 |
+
|
325 |
+
if ( preg_match( "/^(UA|YT|MO)-\d{4,}-\d+$/", strval( $ua_code ) ) ) {
|
326 |
+
return $ua_code;
|
327 |
+
} else {
|
328 |
+
return '';
|
329 |
+
}
|
330 |
+
}
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Helper method for getting the license information.
|
334 |
+
*
|
335 |
+
* @since 6.0.0
|
336 |
+
* @access public
|
337 |
+
*
|
338 |
+
* @param string $key The setting key to retrieve.
|
339 |
+
* @param mixed $default_value The default value of the setting key to retrieve.
|
340 |
+
* @return string The value of the setting.
|
341 |
+
*/
|
342 |
+
function exactmetrics_get_license() {
|
343 |
+
$license = ExactMetrics()->license->get_site_license();
|
344 |
+
$license = $license ? $license : ExactMetrics()->license->get_network_license();
|
345 |
+
$default = ExactMetrics()->license->get_default_license_key();
|
346 |
+
if ( empty( $license ) && ! empty( $default ) ) {
|
347 |
+
$license = array();
|
348 |
+
$license['key'] = ExactMetrics()->license->get_default_license_key();
|
349 |
+
}
|
350 |
+
return $license;
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Helper method for getting the license key.
|
355 |
+
*
|
356 |
+
* @since 6.0.0
|
357 |
+
* @access public
|
358 |
+
*
|
359 |
+
* @param string $key The setting key to retrieve.
|
360 |
+
* @param mixed $default_value The default value of the setting key to retrieve.
|
361 |
+
* @return string The value of the setting.
|
362 |
+
*/
|
363 |
+
function exactmetrics_get_license_key() {
|
364 |
+
if ( exactmetrics_is_pro_version() ) {
|
365 |
+
return ExactMetrics()->license->get_license_key();
|
366 |
+
}
|
367 |
+
return '';
|
368 |
+
}
|
369 |
+
|
370 |
+
function exactmetrics_get_option_name() {
|
371 |
+
//if ( exactmetrics_is_pro_version() ) {
|
372 |
+
return 'exactmetrics_settings';
|
373 |
+
//} else {
|
374 |
+
// return 'exactmetrics_settings';
|
375 |
+
//}
|
376 |
+
}
|
377 |
+
|
378 |
+
function exactmetrics_export_settings() {
|
379 |
+
$settings = exactmetrics_get_options();
|
380 |
+
$exclude = array(
|
381 |
+
'analytics_profile',
|
382 |
+
'analytics_profile_code',
|
383 |
+
'analytics_profile_name',
|
384 |
+
'oauth_version',
|
385 |
+
'cron_last_run',
|
386 |
+
'exactmetrics_oauth_status',
|
387 |
+
);
|
388 |
+
|
389 |
+
foreach ( $exclude as $e ) {
|
390 |
+
if ( ! empty( $settings[ $e ] ) ) {
|
391 |
+
unset( $settings[ $e ] );
|
392 |
+
}
|
393 |
+
}
|
394 |
+
return wp_json_encode( $settings );
|
395 |
+
}
|
396 |
+
|
397 |
+
/**
|
398 |
+
* Always return 'analytics' when grabbing the tracking mode.
|
399 |
+
*
|
400 |
+
* @param string $value The value to override.
|
401 |
+
*
|
402 |
+
* @return string
|
403 |
+
*/
|
404 |
+
function exactmetrics_force_tracking_mode( $value ) {
|
405 |
+
return 'analytics';
|
406 |
+
}
|
407 |
+
add_filter( 'exactmetrics_get_option_tracking_mode', 'exactmetrics_force_tracking_mode' );
|
408 |
+
|
409 |
+
/**
|
410 |
+
* Always return 'js' when grabbing the events mode.
|
411 |
+
*
|
412 |
+
* @param string $value The value to override.
|
413 |
+
*
|
414 |
+
* @return string
|
415 |
+
*/
|
416 |
+
function exactmetrics_force_events_mode( $value ) {
|
417 |
+
return 'js';
|
418 |
+
}
|
419 |
+
add_filter( 'exactmetrics_get_option_events_mode', 'exactmetrics_force_events_mode' );
|
index.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Nothing to see here
|
3 |
+
|
4 |
+
header( 'HTTP/1.0 403 Forbidden' );
|
install/install.php
DELETED
@@ -1,199 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
class GADWP_Install {
|
15 |
-
|
16 |
-
public static function install() {
|
17 |
-
if ( ! get_option( 'ga_dash_token' ) ) {
|
18 |
-
$options = array();
|
19 |
-
$options['client_id'] = '';
|
20 |
-
$options['client_secret'] = '';
|
21 |
-
$options['access_front'][] = 'administrator';
|
22 |
-
$options['access_back'][] = 'administrator';
|
23 |
-
$options['tableid_jail'] = '';
|
24 |
-
$options['theme_color'] = '#1e73be';
|
25 |
-
$options['switch_profile'] = 0;
|
26 |
-
$options['tracking_type'] = 'universal';
|
27 |
-
$options['ga_anonymize_ip'] = 0;
|
28 |
-
$options['user_api'] = 0;
|
29 |
-
$options['ga_event_tracking'] = 0;
|
30 |
-
$options['ga_event_downloads'] = 'zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*';
|
31 |
-
$options['track_exclude'] = array();
|
32 |
-
$options['ga_target_geomap'] = '';
|
33 |
-
$options['ga_realtime_pages'] = 10;
|
34 |
-
$options['token'] = '';
|
35 |
-
$options['ga_profiles_list'] = array();
|
36 |
-
$options['ga_tracking_code'] = '';
|
37 |
-
$options['ga_enhanced_links'] = 0;
|
38 |
-
$options['ga_remarketing'] = 0;
|
39 |
-
$options['network_mode'] = 0;
|
40 |
-
$options['ga_speed_samplerate'] = 1;
|
41 |
-
$options['ga_user_samplerate'] = 100;
|
42 |
-
$options['ga_event_bouncerate'] = 0;
|
43 |
-
$options['ga_crossdomain_tracking'] = 0;
|
44 |
-
$options['ga_crossdomain_list'] = '';
|
45 |
-
$options['ga_author_dimindex'] = 0;
|
46 |
-
$options['ga_category_dimindex'] = 0;
|
47 |
-
$options['ga_tag_dimindex'] = 0;
|
48 |
-
$options['ga_user_dimindex'] = 0;
|
49 |
-
$options['ga_pubyear_dimindex'] = 0;
|
50 |
-
$options['ga_pubyearmonth_dimindex'] = 0;
|
51 |
-
$options['ga_aff_tracking'] = 0;
|
52 |
-
$options['ga_event_affiliates'] = '/out/';
|
53 |
-
$options['automatic_updates_minorversion'] = 1;
|
54 |
-
$options['backend_item_reports'] = 1;
|
55 |
-
$options['backend_realtime_report'] = 0;
|
56 |
-
$options['frontend_item_reports'] = 0;
|
57 |
-
$options['dashboard_widget'] = 1;
|
58 |
-
$options['api_backoff'] = 0;
|
59 |
-
$options['ga_cookiedomain'] = '';
|
60 |
-
$options['ga_cookiename'] = '';
|
61 |
-
$options['ga_cookieexpires'] = '';
|
62 |
-
$options['pagetitle_404'] = 'Page Not Found';
|
63 |
-
$options['maps_api_key'] = '';
|
64 |
-
$options['tm_author_var'] = 0;
|
65 |
-
$options['tm_category_var'] = 0;
|
66 |
-
$options['tm_tag_var'] = 0;
|
67 |
-
$options['tm_user_var'] = 0;
|
68 |
-
$options['tm_pubyear_var'] = 0;
|
69 |
-
$options['tm_pubyearmonth_var'] = 0;
|
70 |
-
$options['web_containerid'] = '';
|
71 |
-
$options['amp_containerid'] = '';
|
72 |
-
$options['amp_tracking_tagmanager'] = 0;
|
73 |
-
$options['amp_tracking_analytics'] = 0;
|
74 |
-
$options['amp_tracking_clientidapi'] = 0;
|
75 |
-
$options['trackingcode_infooter'] = 0;
|
76 |
-
$options['trackingevents_infooter'] = 0;
|
77 |
-
$options['ecommerce_mode'] = 'disabled';
|
78 |
-
$options['ga_formsubmit_tracking'] = 0;
|
79 |
-
$options['optimize_tracking'] = 0;
|
80 |
-
$options['optimize_containerid'] = '';
|
81 |
-
$options['optimize_pagehiding'] = '';
|
82 |
-
$options['superadmin_tracking'] = 0;
|
83 |
-
$options['ga_pagescrolldepth_tracking'] = 0;
|
84 |
-
$options['tm_pagescrolldepth_tracking'] = 0;
|
85 |
-
$options['ga_event_precision'] = 0;
|
86 |
-
$options['ga_force_ssl'] = 0;
|
87 |
-
$options['with_endpoint'] = 1;
|
88 |
-
$options['ga_optout'] = 0;
|
89 |
-
$options['ga_dnt_optout'] = 0;
|
90 |
-
$options['tm_optout'] = 0;
|
91 |
-
$options['tm_dnt_optout'] = 0;
|
92 |
-
$options['ga_with_gtag'] = 0;
|
93 |
-
$options['usage_tracking'] = 0;
|
94 |
-
$options['hide_am_notices'] = 0;
|
95 |
-
$options['network_hide_am_notices'] = 0;
|
96 |
-
} else {
|
97 |
-
$options = array();
|
98 |
-
$options['client_id'] = get_option( 'ga_dash_clientid' );
|
99 |
-
$options['client_secret'] = get_option( 'ga_dash_clientsecret' );
|
100 |
-
$options['access_front'][] = 'administrator';
|
101 |
-
$options['access_back'][] = 'administrator';
|
102 |
-
$options['tableid_jail'] = get_option( 'ga_dash_tableid_jail' );
|
103 |
-
$options['frontend_item_reports'] = get_option( 'ga_dash_frontend' );
|
104 |
-
$options['theme_color'] = '#1e73be';
|
105 |
-
$options['switch_profile'] = get_option( 'ga_dash_jailadmins' );
|
106 |
-
$options['tracking_type'] = get_option( 'ga_dash_tracking_type' );
|
107 |
-
$options['ga_anonymize_ip'] = get_option( 'ga_dash_anonim' );
|
108 |
-
$options['user_api'] = get_option( 'ga_dash_userapi' );
|
109 |
-
$options['ga_event_tracking'] = get_option( 'ga_event_tracking' );
|
110 |
-
$options['ga_event_downloads'] = get_option( 'ga_event_downloads' );
|
111 |
-
$options['track_exclude'] = array();
|
112 |
-
$options['ga_target_geomap'] = get_option( 'ga_target_geomap' );
|
113 |
-
$options['ga_realtime_pages'] = get_option( 'ga_realtime_pages' );
|
114 |
-
$options['token'] = get_option( 'ga_dash_token' );
|
115 |
-
$options['ga_profiles_list'] = get_option( 'ga_dash_profile_list' );
|
116 |
-
$options['ga_enhanced_links'] = 0;
|
117 |
-
$options['ga_remarketing'] = 0;
|
118 |
-
$options['network_mode'] = 0;
|
119 |
-
$options['ga_event_bouncerate'] = 0;
|
120 |
-
$options['ga_crossdomain_tracking'] = 0;
|
121 |
-
$options['ga_crossdomain_list'] = '';
|
122 |
-
$options['ga_author_dimindex'] = 0;
|
123 |
-
$options['ga_category_dimindex'] = 0;
|
124 |
-
$options['ga_tag_dimindex'] = 0;
|
125 |
-
$options['ga_user_dimindex'] = 0;
|
126 |
-
$options['ga_pubyear_dimindex'] = 0;
|
127 |
-
$options['ga_pubyearmonth_dimindex'] = 0;
|
128 |
-
$options['ga_event_affiliates'] = '/out/';
|
129 |
-
$options['ga_aff_tracking'] = 0;
|
130 |
-
$options['automatic_updates_minorversion'] = 1;
|
131 |
-
$options['backend_item_reports'] = 1;
|
132 |
-
$options['backend_realtime_report'] = 0;
|
133 |
-
$options['dashboard_widget'] = 1;
|
134 |
-
$options['api_backoff'] = 0;
|
135 |
-
$options['ga_cookiedomain'] = '';
|
136 |
-
$options['ga_cookiename'] = '';
|
137 |
-
$options['ga_cookieexpires'] = '';
|
138 |
-
$options['pagetitle_404'] = 'Page Not Found';
|
139 |
-
$options['maps_api_key'] = '';
|
140 |
-
$options['tm_author_var'] = 0;
|
141 |
-
$options['tm_category_var'] = 0;
|
142 |
-
$options['tm_tag_var'] = 0;
|
143 |
-
$options['tm_user_var'] = 0;
|
144 |
-
$options['tm_pubyear_var'] = 0;
|
145 |
-
$options['tm_pubyearmonth_var'] = 0;
|
146 |
-
$options['web_containerid'] = '';
|
147 |
-
$options['amp_containerid'] = '';
|
148 |
-
$options['amp_tracking_tagmanager'] = 0;
|
149 |
-
$options['amp_tracking_analytics'] = 0;
|
150 |
-
$options['amp_tracking_clientidapi'] = 0;
|
151 |
-
$options['trackingcode_infooter'] = 0;
|
152 |
-
$options['trackingevents_infooter'] = 0;
|
153 |
-
$options['ecommerce_mode'] = 'disabled';
|
154 |
-
$options['ga_formsubmit_tracking'] = 0;
|
155 |
-
$options['optimize_tracking'] = 0;
|
156 |
-
$options['optimize_containerid'] = '';
|
157 |
-
$options['optimize_pagehiding'] = '';
|
158 |
-
$options['superadmin_tracking'] = 0;
|
159 |
-
$options['ga_pagescrolldepth_tracking'] = 0;
|
160 |
-
$options['tm_pagescrolldepth_tracking'] = 0;
|
161 |
-
$options['ga_speed_samplerate'] = 1;
|
162 |
-
$options['ga_user_samplerate'] = 100;
|
163 |
-
$options['ga_event_precision'] = 0;
|
164 |
-
$options['ga_force_ssl'] = 0;
|
165 |
-
$options['with_endpoint'] = 1;
|
166 |
-
$options['ga_optout'] = 0;
|
167 |
-
$options['ga_dnt_optout'] = 0;
|
168 |
-
$options['tm_optout'] = 0;
|
169 |
-
$options['tm_dnt_optout'] = 0;
|
170 |
-
$options['ga_with_gtag'] = 0;
|
171 |
-
$options['usage_tracking'] = 0;
|
172 |
-
$options['hide_am_notices'] = 0;
|
173 |
-
$options['network_hide_am_notices'] = 0;
|
174 |
-
delete_option( 'ga_dash_clientid' );
|
175 |
-
delete_option( 'ga_dash_clientsecret' );
|
176 |
-
delete_option( 'ga_dash_access' );
|
177 |
-
delete_option( 'ga_dash_access_front' );
|
178 |
-
delete_option( 'ga_dash_access_back' );
|
179 |
-
delete_option( 'ga_dash_tableid_jail' );
|
180 |
-
delete_option( 'ga_dash_frontend' );
|
181 |
-
delete_option( 'ga_dash_style' );
|
182 |
-
delete_option( 'ga_dash_jailadmins' );
|
183 |
-
|
184 |
-
delete_option( 'ga_dash_tracking' );
|
185 |
-
delete_option( 'ga_dash_tracking_type' );
|
186 |
-
delete_option( 'ga_dash_anonim' );
|
187 |
-
delete_option( 'ga_dash_userapi' );
|
188 |
-
delete_option( 'ga_event_tracking' );
|
189 |
-
delete_option( 'ga_event_downloads' );
|
190 |
-
delete_option( 'track_exclude' );
|
191 |
-
delete_option( 'ga_target_geomap' );
|
192 |
-
delete_option( 'ga_realtime_pages' );
|
193 |
-
delete_option( 'ga_dash_token' );
|
194 |
-
delete_option( 'ga_dash_refresh_token' );
|
195 |
-
delete_option( 'ga_dash_profile_list' );
|
196 |
-
}
|
197 |
-
add_option( 'gadwp_options', json_encode( $options ) );
|
198 |
-
}
|
199 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
install/uninstall.php
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Author: ExactMetrics team
|
4 |
-
* Author URI: https://exactmetrics.com
|
5 |
-
* Copyright 2018 ExactMetrics team
|
6 |
-
* License: GPLv2 or later
|
7 |
-
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
*/
|
9 |
-
|
10 |
-
// Exit if accessed directly
|
11 |
-
if ( ! defined( 'ABSPATH' ) )
|
12 |
-
exit();
|
13 |
-
|
14 |
-
class GADWP_Uninstall {
|
15 |
-
|
16 |
-
public static function uninstall() {
|
17 |
-
global $wpdb;
|
18 |
-
if ( is_multisite() ) { // Cleanup Network install
|
19 |
-
foreach ( GADWP_Tools::get_sites( array( 'number' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
|
20 |
-
switch_to_blog( $blog['blog_id'] );
|
21 |
-
$sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'gadwp_cache_%%'" );
|
22 |
-
delete_option( 'gadwp_options' );
|
23 |
-
delete_option( 'exactmetrics_tracking_notice');
|
24 |
-
delete_option( 'exactmetrics_usage_tracking_last_checkin');
|
25 |
-
delete_option( 'exactmetrics_usage_tracking_config');
|
26 |
-
wp_clear_scheduled_hook( 'exactmetrics_usage_tracking_cron' );
|
27 |
-
restore_current_blog();
|
28 |
-
}
|
29 |
-
delete_site_option( 'gadwp_network_options' );
|
30 |
-
} else { // Cleanup Single install
|
31 |
-
$sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'gadwp_cache_%%'" );
|
32 |
-
delete_option( 'gadwp_options' );
|
33 |
-
delete_option( 'exactmetrics_tracking_notice');
|
34 |
-
delete_option( 'exactmetrics_usage_tracking_last_checkin');
|
35 |
-
delete_option( 'exactmetrics_usage_tracking_config');
|
36 |
-
wp_clear_scheduled_hook( 'exactmetrics_usage_tracking_cron' );
|
37 |
-
}
|
38 |
-
GADWP_Tools::unset_cookie( 'default_metric' );
|
39 |
-
GADWP_Tools::unset_cookie( 'default_dimension' );
|
40 |
-
GADWP_Tools::unset_cookie( 'default_view' );
|
41 |
-
}
|
42 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/google-analytics-dashboard-for-wp.pot
ADDED
@@ -0,0 +1,4726 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2020 ExactMetrics
|
2 |
+
# This file is distributed under the same license as the ExactMetrics Pro plugin.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: ExactMetrics Pro 6.0.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/monsterinsights-temp\n"
|
7 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
8 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2020-02-12T15:03:44+00:00\n"
|
13 |
+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
+
"X-Generator: WP-CLI 2.2.0\n"
|
15 |
+
"X-Domain: google-analytics-dashboard-for-wp\n"
|
16 |
+
|
17 |
+
#. Plugin Name of the plugin
|
18 |
+
msgid "ExactMetrics Pro"
|
19 |
+
msgstr ""
|
20 |
+
|
21 |
+
#. Plugin URI of the plugin
|
22 |
+
#. Author URI of the plugin
|
23 |
+
msgid "https://exactmetrics.com"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#. Description of the plugin
|
27 |
+
msgid "Displays Google Analytics Reports and Real-Time Statistics in your Dashboard. Automatically inserts the tracking code in every page of your website."
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#. Author of the plugin
|
31 |
+
#: lite/includes/admin/wp-site-health.php:172
|
32 |
+
#: lite/includes/admin/wp-site-health.php:224
|
33 |
+
#: lite/includes/admin/wp-site-health.php:251
|
34 |
+
#: lite/includes/admin/wp-site-health.php:289
|
35 |
+
#: lite/includes/admin/wp-site-health.php:316
|
36 |
+
#: lite/includes/admin/wp-site-health.php:343
|
37 |
+
#: lite/includes/admin/wp-site-health.php:368
|
38 |
+
#: lite/includes/admin/wp-site-health.php:407
|
39 |
+
#: lite/includes/admin/dashboard-widget.php:96
|
40 |
+
#: includes/admin/admin.php:31
|
41 |
+
#: includes/admin/admin.php:34
|
42 |
+
#: includes/admin/admin.php:42
|
43 |
+
msgid "ExactMetrics"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: lite/includes/admin/wp-site-health.php:53
|
47 |
+
msgid "ExactMetrics Authentication"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: lite/includes/admin/wp-site-health.php:58
|
51 |
+
msgid "ExactMetrics Automatic Updates"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: lite/includes/admin/wp-site-health.php:64
|
55 |
+
msgid "ExactMetrics eCommerce"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: lite/includes/admin/wp-site-health.php:71
|
59 |
+
msgid "ExactMetrics AMP"
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: lite/includes/admin/wp-site-health.php:78
|
63 |
+
msgid "ExactMetrics FBIA"
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: lite/includes/admin/wp-site-health.php:84
|
67 |
+
msgid "ExactMetrics Connection"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: lite/includes/admin/wp-site-health.php:169
|
71 |
+
msgid "Your website is authenticated with ExactMetrics"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: lite/includes/admin/wp-site-health.php:175
|
75 |
+
msgid "ExactMetrics integrates your WordPress website with Google Analytics."
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: lite/includes/admin/wp-site-health.php:179
|
79 |
+
msgid "View Reports"
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: lite/includes/admin/wp-site-health.php:190
|
83 |
+
msgid "You are using Manual UA code output"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: lite/includes/admin/wp-site-health.php:191
|
87 |
+
msgid "We highly recommend authenticating with ExactMetrics so that you can access our new reporting area and take advantage of new ExactMetrics features."
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: lite/includes/admin/wp-site-health.php:195
|
91 |
+
#: lite/includes/admin/wp-site-health.php:206
|
92 |
+
msgid "Authenticate now"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: lite/includes/admin/wp-site-health.php:201
|
96 |
+
msgid "Please configure your Google Analytics settings"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: lite/includes/admin/wp-site-health.php:202
|
100 |
+
msgid "Your traffic is not being tracked by ExactMetrics at the moment and you are losing data. Authenticate and get access to the reporting area and advanced tracking features."
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: lite/includes/admin/wp-site-health.php:228
|
104 |
+
msgid "ExactMetrics Upgrade not applied"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: lite/includes/admin/wp-site-health.php:229
|
108 |
+
msgid "A valid license has been added to ExactMetrics but you are still using the Lite version."
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: lite/includes/admin/wp-site-health.php:233
|
112 |
+
msgid "Go to License Settings"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: lite/includes/admin/wp-site-health.php:248
|
116 |
+
msgid "Your website is receiving automatic updates"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: lite/includes/admin/wp-site-health.php:254
|
120 |
+
msgid "ExactMetrics automatic updates are enabled and you are getting the latest features, bugfixes, and security updates as they are released."
|
121 |
+
msgstr ""
|
122 |
+
|
123 |
+
#: lite/includes/admin/wp-site-health.php:261
|
124 |
+
msgid "Your website is receiving minor updates"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
#: lite/includes/admin/wp-site-health.php:262
|
128 |
+
msgid "ExactMetrics minor updates are enabled and you are getting the latest bugfixes and security updates, but not major features."
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: lite/includes/admin/wp-site-health.php:266
|
132 |
+
msgid "Automatic updates are disabled"
|
133 |
+
msgstr ""
|
134 |
+
|
135 |
+
#: lite/includes/admin/wp-site-health.php:267
|
136 |
+
msgid "ExactMetrics automatic updates are disabled. We recommend enabling automatic updates so you can get access to the latest features, bugfixes, and security updates as they are released."
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
#: lite/includes/admin/wp-site-health.php:271
|
140 |
+
msgid "Update Settings"
|
141 |
+
msgstr ""
|
142 |
+
|
143 |
+
#: lite/includes/admin/wp-site-health.php:286
|
144 |
+
msgid "eCommerce data is not being tracked"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#. Translators: The eCommerce store currently active.
|
148 |
+
#: lite/includes/admin/wp-site-health.php:293
|
149 |
+
msgid "You are using %s but the ExactMetrics eCommerce addon is not active, please Install & Activate it to start tracking eCommerce data."
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: lite/includes/admin/wp-site-health.php:298
|
153 |
+
#: lite/includes/admin/wp-site-health.php:324
|
154 |
+
#: lite/includes/admin/wp-site-health.php:351
|
155 |
+
#: languages/vue.php:1261
|
156 |
+
msgid "View Addons"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: lite/includes/admin/wp-site-health.php:313
|
160 |
+
msgid "AMP pages are not being tracked"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: lite/includes/admin/wp-site-health.php:319
|
164 |
+
msgid "Your website has Google AMP-enabled pages set up but they are not tracked by Google Analytics at the moment. You need to Install & Activate the ExactMetrics AMP Addon."
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: lite/includes/admin/wp-site-health.php:340
|
168 |
+
msgid "Facebook Instant Articles pages are not being tracked"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: lite/includes/admin/wp-site-health.php:346
|
172 |
+
msgid "Your website has Facebook Instant Articles pages set up but they are not tracked by Google Analytics at the moment. You need to Install & Activate the ExactMetrics Facebook Instant Articles Addon."
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: lite/includes/admin/wp-site-health.php:365
|
176 |
+
msgid "Can connect to ExactMetrics.com correctly"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: lite/includes/admin/wp-site-health.php:371
|
180 |
+
msgid "The ExactMetrics API is reachable and no connection issues have been detected."
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: lite/includes/admin/wp-site-health.php:386
|
184 |
+
msgid "The ExactMetrics server is not reachable."
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: lite/includes/admin/wp-site-health.php:387
|
188 |
+
msgid "Your server is blocking external requests to exactmetrics.com, please check your firewall settings or contact your host for more details."
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#. Translators: The error message received.
|
192 |
+
#: lite/includes/admin/wp-site-health.php:391
|
193 |
+
msgid "Error message: %s"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: lite/includes/admin/wp-site-health.php:404
|
197 |
+
msgid "Tracking code is properly being output."
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: lite/includes/admin/wp-site-health.php:410
|
201 |
+
msgid "The Google Analytics tracking code is being output correctly, and no duplicate Google Analytics scripts have been detected."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: lite/includes/admin/wp-site-health.php:418
|
205 |
+
msgid "ExactMetrics has automatically detected an issue with your tracking setup"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: lite/includes/admin/tools.php:10
|
209 |
+
msgid "Want even more fine tuned control over your website analytics?"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: lite/includes/admin/tools.php:11
|
213 |
+
msgid "By upgrading to ExactMetrics Pro, you can unlock the ExactMetrics URL builder that helps you better track your advertising and email marketing campaigns."
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: lite/includes/admin/tools.php:12
|
217 |
+
msgid "Click here to Upgrade"
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: lite/includes/admin/connect.php:42
|
221 |
+
msgid "You are not allowed to install plugins."
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: lite/includes/admin/connect.php:56
|
225 |
+
msgid "Please enter your license key to connect."
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: lite/includes/admin/connect.php:67
|
229 |
+
msgid "Pro version is already installed."
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: lite/includes/admin/connect.php:104
|
233 |
+
msgid "Could not install upgrade. Please download from exactmetrics.com and install manually."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: lite/includes/admin/connect.php:135
|
237 |
+
#: lite/includes/admin/connect.php:141
|
238 |
+
#: lite/includes/admin/connect.php:182
|
239 |
+
msgid "Plugin installed & activated."
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: lite/includes/admin/connect.php:166
|
243 |
+
msgid "You are not licensed."
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: lite/includes/admin/connect.php:186
|
247 |
+
msgid "Pro version installed but needs to be activated from the Plugins page inside your WordPress admin."
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: lite/includes/admin/dashboard-widget.php:131
|
251 |
+
msgid "Website Analytics is not Setup"
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#: lite/includes/admin/dashboard-widget.php:133
|
255 |
+
msgid "To see your website stats, please connect ExactMetrics to Google Analytics."
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: lite/includes/admin/dashboard-widget.php:134
|
259 |
+
msgid "Setup Website Analytics"
|
260 |
+
msgstr ""
|
261 |
+
|
262 |
+
#: lite/includes/admin/dashboard-widget.php:136
|
263 |
+
msgid "To see your website stats, please ask your webmaster to connect ExactMetrics to Google Analytics."
|
264 |
+
msgstr ""
|
265 |
+
|
266 |
+
#: lite/includes/admin/helpers.php:67
|
267 |
+
msgid "Get Better Insights. Grow FASTER!"
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: lite/includes/admin/helpers.php:72
|
271 |
+
msgid "Grow Your Business with ExactMetrics Pro"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: lite/includes/admin/helpers.php:73
|
275 |
+
msgid "It's easy to double your traffic and sales when you know exactly how people find and use your website."
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: lite/includes/admin/helpers.php:74
|
279 |
+
msgid "ExactMetrics Pro shows you the stats that matter, so you can boost your business growth!"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#. Translators: makes text bold.
|
283 |
+
#: lite/includes/admin/helpers.php:78
|
284 |
+
msgid "%1$sBonus:%2$s You also get 50%% off discount for being a loyal ExactMetrics Lite user."
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: lite/includes/admin/helpers.php:83
|
288 |
+
msgid "Upgrade to ExactMetrics Pro"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: lite/includes/admin/onboarding-wizard.php:168
|
292 |
+
msgid "ExactMetrics › Onboarding Wizard"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: lite/includes/admin/onboarding-wizard.php:181
|
296 |
+
msgid "Return to Dashboard"
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: lite/includes/admin/onboarding-wizard.php:247
|
300 |
+
msgid "You are not allowed to install plugins"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: lite/includes/admin/reports/report-queries.php:22
|
304 |
+
#: languages/vue.php:145
|
305 |
+
msgid "Search Console"
|
306 |
+
msgstr ""
|
307 |
+
|
308 |
+
#: lite/includes/admin/reports/report-ecommerce.php:22
|
309 |
+
#: languages/vue.php:141
|
310 |
+
msgid "eCommerce"
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: lite/includes/admin/reports/report-year-in-review.php:22
|
314 |
+
msgid "Year in Review"
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: lite/includes/admin/reports/report-realtime.php:22
|
318 |
+
msgid "Real Time"
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: lite/includes/admin/reports/report-publisher.php:22
|
322 |
+
#: languages/vue.php:137
|
323 |
+
msgid "Publishers"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: lite/includes/admin/reports/report-dimensions.php:22
|
327 |
+
#: languages/vue.php:236
|
328 |
+
msgid "Dimensions"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: lite/includes/admin/reports/report-forms.php:22
|
332 |
+
#: languages/vue.php:151
|
333 |
+
msgid "Forms"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: lite/includes/admin/welcome.php:52
|
337 |
+
#: lite/includes/admin/welcome.php:53
|
338 |
+
msgid "Welcome to ExactMetrics"
|
339 |
+
msgstr ""
|
340 |
+
|
341 |
+
#: includes/frontend/tracking/class-tracking-preview.php:77
|
342 |
+
msgid "You are currently in a preview window. ExactMetrics doesn't track preview window traffic to avoid false visit reports."
|
343 |
+
msgstr ""
|
344 |
+
|
345 |
+
#: includes/frontend/tracking/class-tracking-analytics.php:218
|
346 |
+
msgid "Note: ExactMetrics is not currently configured on this site. The site owner needs to authenticate with Google Analytics in the ExactMetrics settings panel."
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
#: includes/frontend/tracking/class-tracking-analytics.php:221
|
350 |
+
msgid "Note: ExactMetrics does not track you as a logged-in site administrator to prevent site owners from accidentally skewing their own Google Analytics data."
|
351 |
+
msgstr ""
|
352 |
+
|
353 |
+
#: includes/frontend/tracking/class-tracking-analytics.php:224
|
354 |
+
msgid "Note: The site owner has disabled Google Analytics tracking for your user role."
|
355 |
+
msgstr ""
|
356 |
+
|
357 |
+
#: includes/frontend/tracking/class-tracking-analytics.php:310
|
358 |
+
msgid "Not running function"
|
359 |
+
msgstr ""
|
360 |
+
|
361 |
+
#: includes/frontend/tracking/class-tracking-analytics.php:310
|
362 |
+
msgid "because you are not being tracked."
|
363 |
+
msgstr ""
|
364 |
+
|
365 |
+
#: includes/admin/review.php:114
|
366 |
+
msgid "Are you enjoying ExactMetrics?"
|
367 |
+
msgstr ""
|
368 |
+
|
369 |
+
#: includes/admin/review.php:116
|
370 |
+
msgid "Yes"
|
371 |
+
msgstr ""
|
372 |
+
|
373 |
+
#: includes/admin/review.php:117
|
374 |
+
msgid "Not Really"
|
375 |
+
msgstr ""
|
376 |
+
|
377 |
+
#: includes/admin/review.php:121
|
378 |
+
msgid "We're sorry to hear you aren't enjoying ExactMetrics. We would love a chance to improve. Could you take a minute and let us know what we can do better?"
|
379 |
+
msgstr ""
|
380 |
+
|
381 |
+
#: includes/admin/review.php:123
|
382 |
+
msgid "Give Feedback"
|
383 |
+
msgstr ""
|
384 |
+
|
385 |
+
#: includes/admin/review.php:124
|
386 |
+
msgid "No thanks"
|
387 |
+
msgstr ""
|
388 |
+
|
389 |
+
#: includes/admin/review.php:128
|
390 |
+
msgid "That’s awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?"
|
391 |
+
msgstr ""
|
392 |
+
|
393 |
+
#: includes/admin/review.php:129
|
394 |
+
msgid "~ Syed Balkhi<br>Co-Founder of ExactMetrics"
|
395 |
+
msgstr ""
|
396 |
+
|
397 |
+
#: includes/admin/review.php:131
|
398 |
+
msgid "Ok, you deserve it"
|
399 |
+
msgstr ""
|
400 |
+
|
401 |
+
#: includes/admin/review.php:132
|
402 |
+
msgid "Nope, maybe later"
|
403 |
+
msgstr ""
|
404 |
+
|
405 |
+
#: includes/admin/review.php:133
|
406 |
+
msgid "I already did"
|
407 |
+
msgstr ""
|
408 |
+
|
409 |
+
#: includes/admin/tracking.php:242
|
410 |
+
msgid "Once Weekly"
|
411 |
+
msgstr ""
|
412 |
+
|
413 |
+
#: includes/admin/routes.php:274
|
414 |
+
msgid "The most beginner friendly drag & drop WordPress forms plugin allowing you to create beautiful contact forms, subscription forms, payment forms, and more in minutes, not hours!"
|
415 |
+
msgstr ""
|
416 |
+
|
417 |
+
#: includes/admin/routes.php:284
|
418 |
+
msgid "Our high-converting optin forms like Exit-Intent® popups, Fullscreen Welcome Mats, and Scroll boxes help you dramatically boost conversions and get more email subscribers."
|
419 |
+
msgstr ""
|
420 |
+
|
421 |
+
#: includes/admin/routes.php:294
|
422 |
+
msgid "SMTP (Simple Mail Transfer Protocol) is an industry standard for sending emails. SMTP helps increase email deliverability by using proper authentication."
|
423 |
+
msgstr ""
|
424 |
+
|
425 |
+
#: includes/admin/routes.php:304
|
426 |
+
msgid "Better Coming Soon & Maintenance Mode Pages"
|
427 |
+
msgstr ""
|
428 |
+
|
429 |
+
#: includes/admin/routes.php:313
|
430 |
+
msgid "Get More Traffic with Viral Giveaways"
|
431 |
+
msgstr ""
|
432 |
+
|
433 |
+
#: includes/admin/routes.php:322
|
434 |
+
msgid "Social Proof Notifications that Boost Sales"
|
435 |
+
msgstr ""
|
436 |
+
|
437 |
+
#: includes/admin/routes.php:440
|
438 |
+
msgid "Invalid UA code"
|
439 |
+
msgstr ""
|
440 |
+
|
441 |
+
#: includes/admin/routes.php:467
|
442 |
+
msgid "Please upload a valid .json file"
|
443 |
+
msgstr ""
|
444 |
+
|
445 |
+
#: includes/admin/routes.php:476
|
446 |
+
msgid "Please upload a file to import"
|
447 |
+
msgstr ""
|
448 |
+
|
449 |
+
#: includes/admin/routes.php:527
|
450 |
+
msgid "You don't have permission to view ExactMetrics reports."
|
451 |
+
msgstr ""
|
452 |
+
|
453 |
+
#: includes/admin/routes.php:539
|
454 |
+
msgid "You can't view ExactMetrics reports because you are not licensed."
|
455 |
+
msgstr ""
|
456 |
+
|
457 |
+
#: includes/admin/routes.php:540
|
458 |
+
msgid "Add your license"
|
459 |
+
msgstr ""
|
460 |
+
|
461 |
+
#: includes/admin/routes.php:547
|
462 |
+
msgid "You can't view ExactMetrics reports due to license key errors."
|
463 |
+
msgstr ""
|
464 |
+
|
465 |
+
#: includes/admin/routes.php:555
|
466 |
+
msgid "You must authenticate with ExactMetrics before you can view reports."
|
467 |
+
msgstr ""
|
468 |
+
|
469 |
+
#: includes/admin/routes.php:561
|
470 |
+
msgid "Unknown report. Try refreshing and retrying. Contact support if this issue persists."
|
471 |
+
msgstr ""
|
472 |
+
|
473 |
+
#: includes/admin/routes.php:609
|
474 |
+
msgid "We encountered an error when fetching the report data."
|
475 |
+
msgstr ""
|
476 |
+
|
477 |
+
#: includes/admin/api-auth.php:85
|
478 |
+
msgid "You don't have permission to authenticate ExactMetrics."
|
479 |
+
msgstr ""
|
480 |
+
|
481 |
+
#: includes/admin/api-auth.php:96
|
482 |
+
msgid "Cannot authenticate. Please enter a valid, active license key for ExactMetrics Pro into the settings."
|
483 |
+
msgstr ""
|
484 |
+
|
485 |
+
#: includes/admin/api-auth.php:102
|
486 |
+
msgid "Cannot authenticate. Please re-authenticate."
|
487 |
+
msgstr ""
|
488 |
+
|
489 |
+
#: includes/admin/api-auth.php:104
|
490 |
+
msgid "Cannot network authenticate. Please re-authenticate on the network settings panel."
|
491 |
+
msgstr ""
|
492 |
+
|
493 |
+
#: includes/admin/api-auth.php:240
|
494 |
+
msgid "You don't have permission to re-authenticate ExactMetrics."
|
495 |
+
msgstr ""
|
496 |
+
|
497 |
+
#: includes/admin/api-auth.php:251
|
498 |
+
msgid "Cannot re-authenticate. Please enter a valid, active license key for ExactMetrics Pro into the settings."
|
499 |
+
msgstr ""
|
500 |
+
|
501 |
+
#: includes/admin/api-auth.php:257
|
502 |
+
msgid "Cannot re-authenticate. Please authenticate."
|
503 |
+
msgstr ""
|
504 |
+
|
505 |
+
#: includes/admin/api-auth.php:259
|
506 |
+
msgid "Cannot re-authenticate the network. Please authenticate on the network settings panel."
|
507 |
+
msgstr ""
|
508 |
+
|
509 |
+
#: includes/admin/api-auth.php:361
|
510 |
+
msgid "You don't have permission to verify ExactMetrics."
|
511 |
+
msgstr ""
|
512 |
+
|
513 |
+
#: includes/admin/api-auth.php:370
|
514 |
+
#: includes/admin/api-auth.php:372
|
515 |
+
msgid "Cannot verify. Please authenticate."
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: includes/admin/api-auth.php:378
|
519 |
+
msgid "Cannot verify. Please enter a valid, active license key for ExactMetrics Pro into the settings."
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: includes/admin/api-auth.php:384
|
523 |
+
msgid "Successfully verified."
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
#: includes/admin/api-auth.php:386
|
527 |
+
msgid "Could not verify."
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: includes/admin/api-auth.php:394
|
531 |
+
msgid "Verify auth key not passed"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: includes/admin/api-auth.php:416
|
535 |
+
msgid "You don't have permission to deauthenticate ExactMetrics."
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: includes/admin/api-auth.php:425
|
539 |
+
#: includes/admin/api-auth.php:427
|
540 |
+
msgid "Cannot deauthenticate. You are not currently authed."
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: includes/admin/api-auth.php:433
|
544 |
+
msgid "Cannot deauthenticate. Please enter a valid, active license key for ExactMetrics Pro into the settings."
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
#: includes/admin/api-auth.php:441
|
548 |
+
msgid "Successfully deauthenticated."
|
549 |
+
msgstr ""
|
550 |
+
|
551 |
+
#: includes/admin/api-auth.php:444
|
552 |
+
msgid "Successfully force deauthenticated."
|
553 |
+
msgstr ""
|
554 |
+
|
555 |
+
#: includes/admin/api-auth.php:446
|
556 |
+
msgid "Could not deauthenticate."
|
557 |
+
msgstr ""
|
558 |
+
|
559 |
+
#: includes/admin/licensing/skin.php:86
|
560 |
+
msgid "There was an error installing the addon. Please try again."
|
561 |
+
msgstr ""
|
562 |
+
|
563 |
+
#. Translators: The name of the addon that can't be installed.
|
564 |
+
#: includes/admin/licensing/skin.php:95
|
565 |
+
msgid "There was an error installing the addon: %s"
|
566 |
+
msgstr ""
|
567 |
+
|
568 |
+
#. Translators: Placeholders are for links to fix the issue.
|
569 |
+
#: includes/admin/common.php:751
|
570 |
+
msgid "ExactMetrics has detected that it's files are being blocked. This is usually caused by a adblock browser plugin (particularly uBlock Origin), or a conflicting WordPress theme or plugin. This issue only affects the admin side of ExactMetrics. To solve this, ensure ExactMetrics is whitelisted for your website URL in any adblock browser plugin you use. For step by step directions on how to do this, %1$sclick here%2$s. If this doesn't solve the issue (rare), send us a ticket %3$shere%2$s and we'll be happy to help diagnose the issue."
|
571 |
+
msgstr ""
|
572 |
+
|
573 |
+
#: includes/admin/common.php:871
|
574 |
+
msgid "Your 2019 Analytics Report"
|
575 |
+
msgstr ""
|
576 |
+
|
577 |
+
#: includes/admin/common.php:877
|
578 |
+
msgid "See how your website performed this year and find tips along the way to help grow even more in 2020!"
|
579 |
+
msgstr ""
|
580 |
+
|
581 |
+
#: includes/admin/common.php:879
|
582 |
+
msgid "View 2019 Year in Review report!"
|
583 |
+
msgstr ""
|
584 |
+
|
585 |
+
#: includes/admin/admin.php:34
|
586 |
+
#: includes/admin/admin.php:42
|
587 |
+
#: includes/admin/admin.php:182
|
588 |
+
msgid "Settings"
|
589 |
+
msgstr ""
|
590 |
+
|
591 |
+
#: includes/admin/admin.php:37
|
592 |
+
msgid "General:"
|
593 |
+
msgstr ""
|
594 |
+
|
595 |
+
#: includes/admin/admin.php:39
|
596 |
+
#: includes/admin/admin.php:45
|
597 |
+
#: includes/admin/admin.php:95
|
598 |
+
msgid "General Reports:"
|
599 |
+
msgstr ""
|
600 |
+
|
601 |
+
#: includes/admin/admin.php:39
|
602 |
+
#: includes/admin/admin.php:95
|
603 |
+
#: languages/vue.php:1728
|
604 |
+
msgid "Reports"
|
605 |
+
msgstr ""
|
606 |
+
|
607 |
+
#: includes/admin/admin.php:51
|
608 |
+
msgid "Tools:"
|
609 |
+
msgstr ""
|
610 |
+
|
611 |
+
#: includes/admin/admin.php:51
|
612 |
+
msgid "Tools"
|
613 |
+
msgstr ""
|
614 |
+
|
615 |
+
#: includes/admin/admin.php:56
|
616 |
+
#: includes/admin/admin.php:98
|
617 |
+
msgid "Addons:"
|
618 |
+
msgstr ""
|
619 |
+
|
620 |
+
#: includes/admin/admin.php:56
|
621 |
+
#: includes/admin/admin.php:98
|
622 |
+
msgid "Addons"
|
623 |
+
msgstr ""
|
624 |
+
|
625 |
+
#: includes/admin/admin.php:60
|
626 |
+
#: includes/admin/admin.php:103
|
627 |
+
msgid "About Us:"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: includes/admin/admin.php:60
|
631 |
+
#: includes/admin/admin.php:103
|
632 |
+
#: languages/vue.php:159
|
633 |
+
msgid "About Us"
|
634 |
+
msgstr ""
|
635 |
+
|
636 |
+
#: includes/admin/admin.php:91
|
637 |
+
#: includes/admin/admin.php:93
|
638 |
+
msgid "Network Settings:"
|
639 |
+
msgstr ""
|
640 |
+
|
641 |
+
#: includes/admin/admin.php:93
|
642 |
+
msgid "Network Settings"
|
643 |
+
msgstr ""
|
644 |
+
|
645 |
+
#: includes/admin/admin.php:164
|
646 |
+
msgid "ExactMetrics Knowledge Base"
|
647 |
+
msgstr ""
|
648 |
+
|
649 |
+
#: includes/admin/admin.php:164
|
650 |
+
msgid "Documentation"
|
651 |
+
msgstr ""
|
652 |
+
|
653 |
+
#: includes/admin/admin.php:169
|
654 |
+
#: includes/admin/reports/abstract-report.php:378
|
655 |
+
msgid "Get ExactMetrics Pro"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: includes/admin/admin.php:175
|
659 |
+
#: includes/admin/admin.php:178
|
660 |
+
#: languages/vue.php:1027
|
661 |
+
msgid "Support"
|
662 |
+
msgstr ""
|
663 |
+
|
664 |
+
#. Translators: Placeholders add a link to the wordpress.org repository.
|
665 |
+
#: includes/admin/admin.php:242
|
666 |
+
msgid "Please rate %1$sExactMetrics%2$s on %3$s %4$sWordPress.org%5$s to help us spread the word. Thank you from the ExactMetrics team!"
|
667 |
+
msgstr ""
|
668 |
+
|
669 |
+
#: includes/admin/admin.php:277
|
670 |
+
#: languages/vue.php:397
|
671 |
+
msgid "Please Setup Website Analytics to See Audience Insights"
|
672 |
+
msgstr ""
|
673 |
+
|
674 |
+
#: includes/admin/admin.php:278
|
675 |
+
#: languages/vue.php:403
|
676 |
+
msgid "Connect ExactMetrics and Setup Website Analytics"
|
677 |
+
msgstr ""
|
678 |
+
|
679 |
+
#: includes/admin/admin.php:280
|
680 |
+
#: languages/vue.php:280
|
681 |
+
msgid "Learn More"
|
682 |
+
msgstr ""
|
683 |
+
|
684 |
+
#: includes/admin/admin.php:282
|
685 |
+
#: languages/vue.php:400
|
686 |
+
msgid "ExactMetrics, WordPress analytics plugin, helps you connect your website with Google Analytics, so you can see how people find and use your website. Over 2 million website owners use ExactMetrics to see the stats that matter and grow their business."
|
687 |
+
msgstr ""
|
688 |
+
|
689 |
+
#. Translators: Adds a link to retrieve the license.
|
690 |
+
#: includes/admin/admin.php:292
|
691 |
+
msgid "Warning: No valid license key has been entered for ExactMetrics. You are currently not getting updates, and are not able to view reports. %1$sPlease click here to enter your license key and begin receiving updates and reports.%2$s"
|
692 |
+
msgstr ""
|
693 |
+
|
694 |
+
#. Translators: Adds a link to the license renewal.
|
695 |
+
#: includes/admin/admin.php:303
|
696 |
+
#: languages/vue.php:306
|
697 |
+
msgid "Your license key for ExactMetrics has expired. %1$sPlease click here to renew your license key.%2$s"
|
698 |
+
msgstr ""
|
699 |
+
|
700 |
+
#: includes/admin/admin.php:305
|
701 |
+
#: languages/vue.php:309
|
702 |
+
msgid "Your license key for ExactMetrics has been disabled. Please use a different key."
|
703 |
+
msgstr ""
|
704 |
+
|
705 |
+
#: includes/admin/admin.php:307
|
706 |
+
#: languages/vue.php:312
|
707 |
+
msgid "Your license key for ExactMetrics is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key."
|
708 |
+
msgstr ""
|
709 |
+
|
710 |
+
#. Translators: Adds a link to renew license.
|
711 |
+
#: includes/admin/admin.php:312
|
712 |
+
msgid "Your network license key for ExactMetrics has expired. %1$sPlease click here to renew your license key.%2$s"
|
713 |
+
msgstr ""
|
714 |
+
|
715 |
+
#: includes/admin/admin.php:314
|
716 |
+
msgid "Your network license key for ExactMetrics has been disabled. Please use a different key."
|
717 |
+
msgstr ""
|
718 |
+
|
719 |
+
#: includes/admin/admin.php:316
|
720 |
+
msgid "Your network license key for ExactMetrics is invalid. The key no longer exists or the user associated with the key has been deleted. Please use a different key."
|
721 |
+
msgstr ""
|
722 |
+
|
723 |
+
#. Translators: Placeholders add the PHP version, a link to the ExactMetrics blog and a line break.
|
724 |
+
#: includes/admin/admin.php:333
|
725 |
+
msgid "Your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked.%4$sWordPress will stop supporting your PHP version in April, 2019.%4$sUpdating PHP only takes a few minutes and will make your website significantly faster and more secure.%4$s%2$sLearn more about updating PHP%3$s"
|
726 |
+
msgstr ""
|
727 |
+
|
728 |
+
#. Translators: Placeholders add the current WordPress version and links to the ExactMetrics blog
|
729 |
+
#: includes/admin/admin.php:341
|
730 |
+
msgid "Your site is running an outdated version of WordPress (%1$s).%4$sExactMetrics will stop supporting WordPress versions lower than 4.6 in April, 2019.%4$sUpdating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install.%4$s%2$sLearn more about updating WordPress%3$s"
|
731 |
+
msgstr ""
|
732 |
+
|
733 |
+
#. Translators: Placeholders add links to the settings panel.
|
734 |
+
#: includes/admin/admin.php:399
|
735 |
+
msgid "Important: You are currently using manual UA code output. We highly recommend %1$sauthenticating with ExactMetrics%2$s so that you can access our new reporting area and take advantage of new ExactMetrics features."
|
736 |
+
msgstr ""
|
737 |
+
|
738 |
+
#. Translators: Placeholders add a link to the ExactMetrics website.
|
739 |
+
#: includes/admin/admin.php:442
|
740 |
+
#: includes/admin/admin.php:473
|
741 |
+
msgid "%1$sGet ExactMetrics Pro%2$s"
|
742 |
+
msgstr ""
|
743 |
+
|
744 |
+
#. Translators: Adds a link to the settings panel.
|
745 |
+
#: includes/admin/admin.php:487
|
746 |
+
msgid "Warning: ExactMetrics found cross-domain settings in the custom code field and converted them to the new settings structure. %1$sPlease click here to review and remove the code no longer needed.%2$s"
|
747 |
+
msgstr ""
|
748 |
+
|
749 |
+
#: includes/admin/notice.php:225
|
750 |
+
msgid "Dismiss this notice"
|
751 |
+
msgstr ""
|
752 |
+
|
753 |
+
#: includes/admin/pages/settings.php:89
|
754 |
+
msgid "Ooops! It Appears JavaScript Didn’t Load"
|
755 |
+
msgstr ""
|
756 |
+
|
757 |
+
#: includes/admin/pages/settings.php:90
|
758 |
+
msgid "There seems to be an issue running JavaScript on your website, which ExactMetrics is crafted in to give you the best experience possible."
|
759 |
+
msgstr ""
|
760 |
+
|
761 |
+
#. Translators: Placeholders make the text bold.
|
762 |
+
#: includes/admin/pages/settings.php:94
|
763 |
+
msgid "If you are using an %1$sad blocker%2$s, please disable or whitelist the current page to load ExactMetrics correctly."
|
764 |
+
msgstr ""
|
765 |
+
|
766 |
+
#: includes/admin/pages/settings.php:108
|
767 |
+
msgid "Copy the error message above and paste it in a message to the ExactMetrics support team."
|
768 |
+
msgstr ""
|
769 |
+
|
770 |
+
#: includes/admin/pages/settings.php:111
|
771 |
+
msgid "Resolve This Issue"
|
772 |
+
msgstr ""
|
773 |
+
|
774 |
+
#: includes/admin/pages/settings.php:115
|
775 |
+
msgid "Your browser version is not supported"
|
776 |
+
msgstr ""
|
777 |
+
|
778 |
+
#: includes/admin/pages/settings.php:116
|
779 |
+
msgid "You are using a browser which is no longer supported by ExactMetrics. Please update or use another browser in order to access the plugin settings."
|
780 |
+
msgstr ""
|
781 |
+
|
782 |
+
#: includes/admin/pages/settings.php:118
|
783 |
+
msgid "View supported browsers"
|
784 |
+
msgstr ""
|
785 |
+
|
786 |
+
#: includes/admin/reports/overview.php:34
|
787 |
+
#: languages/vue.php:133
|
788 |
+
msgid "Overview"
|
789 |
+
msgstr ""
|
790 |
+
|
791 |
+
#: includes/admin/reports/abstract-report.php:54
|
792 |
+
msgid "Access denied"
|
793 |
+
msgstr ""
|
794 |
+
|
795 |
+
#. Translators: Placeholders add a link to the settings panel.
|
796 |
+
#: includes/admin/reports/abstract-report.php:61
|
797 |
+
msgid "Please %1$senable the dashboard%2$s to see report data."
|
798 |
+
msgstr ""
|
799 |
+
|
800 |
+
#: includes/admin/reports/abstract-report.php:63
|
801 |
+
msgid "The dashboard is disabled."
|
802 |
+
msgstr ""
|
803 |
+
|
804 |
+
#. Translators: Placeholders add a link to the settings panel.
|
805 |
+
#: includes/admin/reports/abstract-report.php:71
|
806 |
+
msgid "You do not have an active license. Please %1$scheck your license configuration.%2$s"
|
807 |
+
msgstr ""
|
808 |
+
|
809 |
+
#. Translators: Placeholders add a link to the settings panel.
|
810 |
+
#: includes/admin/reports/abstract-report.php:81
|
811 |
+
msgid "Please %1$sauthenticate %2$swith Google Analytics to allow the plugin to fetch data."
|
812 |
+
msgstr ""
|
813 |
+
|
814 |
+
#: includes/admin/reports/abstract-report.php:83
|
815 |
+
msgid "The Google oAuth authentication needs to be re-authenticated to view data."
|
816 |
+
msgstr ""
|
817 |
+
|
818 |
+
#: includes/admin/reports/abstract-report.php:110
|
819 |
+
msgid "No data found"
|
820 |
+
msgstr ""
|
821 |
+
|
822 |
+
#: includes/admin/reports/abstract-report.php:156
|
823 |
+
msgid "Invalid date range."
|
824 |
+
msgstr ""
|
825 |
+
|
826 |
+
#: includes/admin/reports/abstract-report.php:258
|
827 |
+
msgid "You must authenticate with ExactMetrics to use reports."
|
828 |
+
msgstr ""
|
829 |
+
|
830 |
+
#. Translators: Placeholders add the license level and the report title.
|
831 |
+
#: includes/admin/reports/abstract-report.php:308
|
832 |
+
msgid "You currently have a %1$s level license, but this report requires at least a %2$s level license to view the %3$s. Please upgrade to view this report."
|
833 |
+
msgstr ""
|
834 |
+
|
835 |
+
#: includes/admin/reports/abstract-report.php:320
|
836 |
+
msgid "Ready to Get Analytics Super-Powers?"
|
837 |
+
msgstr ""
|
838 |
+
|
839 |
+
#: includes/admin/reports/abstract-report.php:322
|
840 |
+
msgid "(And Crush Your Competition?)"
|
841 |
+
msgstr ""
|
842 |
+
|
843 |
+
#. Translators: License level and smiley.
|
844 |
+
#: includes/admin/reports/abstract-report.php:328
|
845 |
+
msgid "Hey there! It looks like you've got the %1$s license installed on your site. That's awesome! %s"
|
846 |
+
msgstr ""
|
847 |
+
|
848 |
+
#. Translators: Placeholders add the report title and license level.
|
849 |
+
#: includes/admin/reports/abstract-report.php:335
|
850 |
+
msgid "Do you want to access to %1$s reporting right now%2$s in your WordPress Dashboard? That comes with the %3$s level%4$s of our paid packages. You'll need to upgrade your license to get instant access."
|
851 |
+
msgstr ""
|
852 |
+
|
853 |
+
#. Translators: Placeholdes add links to the account area and a guide.
|
854 |
+
#: includes/admin/reports/abstract-report.php:342
|
855 |
+
msgid "It's easy! To upgrade, navigate to %1$sMy Account%2$s on ExactMetrics.com, go to the licenses tab, and click upgrade. We also have a %3$sstep by step guide%4$s with pictures of this process."
|
856 |
+
msgstr ""
|
857 |
+
|
858 |
+
#: includes/admin/reports/abstract-report.php:346
|
859 |
+
#: includes/admin/reports/abstract-report.php:369
|
860 |
+
msgid "If you have any questions, don't hesitate to reach out. We're here to help."
|
861 |
+
msgstr ""
|
862 |
+
|
863 |
+
#. Translators: Placeholder adds a smiley face.
|
864 |
+
#: includes/admin/reports/abstract-report.php:351
|
865 |
+
msgid "Hey there! %s It looks like you've got the free version of ExactMetrics installed on your site. That's awesome!"
|
866 |
+
msgstr ""
|
867 |
+
|
868 |
+
#. Translators: Placeholders make the text bold, add the license level and add a link to upgrade.
|
869 |
+
#: includes/admin/reports/abstract-report.php:358
|
870 |
+
msgid "Do you you want to access to %1$s reporting right now%2$s in your WordPress Dashboard? That comes with %3$s level%4$s of our paid packages. To get instant access, you'll want to buy a ExactMetrics license, which also gives you access to powerful addons, expanded reporting (including the ability to use custom date ranges), comprehensive tracking features (like UserID tracking) and access to our world-class support team."
|
871 |
+
msgstr ""
|
872 |
+
|
873 |
+
#. Translators: Placeholders make the text bold, add the license level and add a link to upgrade.
|
874 |
+
#: includes/admin/reports/abstract-report.php:365
|
875 |
+
msgid "Upgrading is easy! To upgrade, navigate to %1$ssour pricing page%2$s, purchase the required license, and then follow the %3$sinstructions in the email receipt%4$s to upgrade. It only takes a few minutes to unlock the most powerful, yet easy to use analytics tracking system for WordPress."
|
876 |
+
msgstr ""
|
877 |
+
|
878 |
+
#: includes/admin/reports/abstract-report.php:375
|
879 |
+
#: languages/vue.php:325
|
880 |
+
msgid "Upgrade Now"
|
881 |
+
msgstr ""
|
882 |
+
|
883 |
+
#: includes/admin/reports/abstract-report.php:412
|
884 |
+
msgid "Please ask your webmaster to enable this addon."
|
885 |
+
msgstr ""
|
886 |
+
|
887 |
+
#. Translators: Placeholder gets replaced with the error message.
|
888 |
+
#: includes/api-request.php:192
|
889 |
+
msgid "The firewall of your server is blocking outbound calls. Please contact your hosting provider to fix this issue. %s"
|
890 |
+
msgstr ""
|
891 |
+
|
892 |
+
#: includes/api-request.php:194
|
893 |
+
msgid "The firewall of your server is blocking outbound calls. Please contact your hosting provider to fix this issue."
|
894 |
+
msgstr ""
|
895 |
+
|
896 |
+
#: includes/api-request.php:307
|
897 |
+
msgid "The API was unreachable."
|
898 |
+
msgstr ""
|
899 |
+
|
900 |
+
#. Translators: placeholder adds the response code.
|
901 |
+
#: includes/api-request.php:312
|
902 |
+
msgid "The API returned a <strong>%s</strong> response"
|
903 |
+
msgstr ""
|
904 |
+
|
905 |
+
#. Translators: placeholder adds the response code and response message.
|
906 |
+
#: includes/api-request.php:317
|
907 |
+
#: includes/api-request.php:322
|
908 |
+
msgid "The API returned a <strong>%1$d</strong> response with this message: <strong>%2$s</strong>"
|
909 |
+
msgstr ""
|
910 |
+
|
911 |
+
#: includes/api-request.php:330
|
912 |
+
msgid "Improper API request."
|
913 |
+
msgstr ""
|
914 |
+
|
915 |
+
#: includes/api-request.php:388
|
916 |
+
msgid "Reason: The API was unreachable because the Airplane Mode plugin is active."
|
917 |
+
msgstr ""
|
918 |
+
|
919 |
+
#: includes/api-request.php:401
|
920 |
+
msgid "Reason: The API was unreachable because the API url is on the WP HTTP blocklist."
|
921 |
+
msgstr ""
|
922 |
+
|
923 |
+
#: includes/api-request.php:416
|
924 |
+
#: includes/api-request.php:438
|
925 |
+
msgid "Reason: The API was unreachable because the call to Google failed."
|
926 |
+
msgstr ""
|
927 |
+
|
928 |
+
#: includes/api-request.php:421
|
929 |
+
msgid "Reason: The API was unreachable because no external hosts are allowed on this site."
|
930 |
+
msgstr ""
|
931 |
+
|
932 |
+
#: includes/helpers.php:366
|
933 |
+
msgid "United States"
|
934 |
+
msgstr ""
|
935 |
+
|
936 |
+
#: includes/helpers.php:367
|
937 |
+
msgid "Canada"
|
938 |
+
msgstr ""
|
939 |
+
|
940 |
+
#: includes/helpers.php:368
|
941 |
+
msgid "United Kingdom"
|
942 |
+
msgstr ""
|
943 |
+
|
944 |
+
#: includes/helpers.php:369
|
945 |
+
msgid "Afghanistan"
|
946 |
+
msgstr ""
|
947 |
+
|
948 |
+
#: includes/helpers.php:370
|
949 |
+
msgid "Åland Islands"
|
950 |
+
msgstr ""
|
951 |
+
|
952 |
+
#: includes/helpers.php:371
|
953 |
+
msgid "Albania"
|
954 |
+
msgstr ""
|
955 |
+
|
956 |
+
#: includes/helpers.php:372
|
957 |
+
msgid "Algeria"
|
958 |
+
msgstr ""
|
959 |
+
|
960 |
+
#: includes/helpers.php:373
|
961 |
+
msgid "American Samoa"
|
962 |
+
msgstr ""
|
963 |
+
|
964 |
+
#: includes/helpers.php:374
|
965 |
+
msgid "Andorra"
|
966 |
+
msgstr ""
|
967 |
+
|
968 |
+
#: includes/helpers.php:375
|
969 |
+
msgid "Angola"
|
970 |
+
msgstr ""
|
971 |
+
|
972 |
+
#: includes/helpers.php:376
|
973 |
+
msgid "Anguilla"
|
974 |
+
msgstr ""
|
975 |
+
|
976 |
+
#: includes/helpers.php:377
|
977 |
+
msgid "Antarctica"
|
978 |
+
msgstr ""
|
979 |
+
|
980 |
+
#: includes/helpers.php:378
|
981 |
+
msgid "Antigua and Barbuda"
|
982 |
+
msgstr ""
|
983 |
+
|
984 |
+
#: includes/helpers.php:379
|
985 |
+
msgid "Argentina"
|
986 |
+
msgstr ""
|
987 |
+
|
988 |
+
#: includes/helpers.php:380
|
989 |
+
msgid "Armenia"
|
990 |
+
msgstr ""
|
991 |
+
|
992 |
+
#: includes/helpers.php:381
|
993 |
+
msgid "Aruba"
|
994 |
+
msgstr ""
|
995 |
+
|
996 |
+
#: includes/helpers.php:382
|
997 |
+
msgid "Australia"
|
998 |
+
msgstr ""
|
999 |
+
|
1000 |
+
#: includes/helpers.php:383
|
1001 |
+
msgid "Austria"
|
1002 |
+
msgstr ""
|
1003 |
+
|
1004 |
+
#: includes/helpers.php:384
|
1005 |
+
msgid "Azerbaijan"
|
1006 |
+
msgstr ""
|
1007 |
+
|
1008 |
+
#: includes/helpers.php:385
|
1009 |
+
msgid "Bahamas"
|
1010 |
+
msgstr ""
|
1011 |
+
|
1012 |
+
#: includes/helpers.php:386
|
1013 |
+
msgid "Bahrain"
|
1014 |
+
msgstr ""
|
1015 |
+
|
1016 |
+
#: includes/helpers.php:387
|
1017 |
+
msgid "Bangladesh"
|
1018 |
+
msgstr ""
|
1019 |
+
|
1020 |
+
#: includes/helpers.php:388
|
1021 |
+
msgid "Barbados"
|
1022 |
+
msgstr ""
|
1023 |
+
|
1024 |
+
#: includes/helpers.php:389
|
1025 |
+
msgid "Belarus"
|
1026 |
+
msgstr ""
|
1027 |
+
|
1028 |
+
#: includes/helpers.php:390
|
1029 |
+
msgid "Belgium"
|
1030 |
+
msgstr ""
|
1031 |
+
|
1032 |
+
#: includes/helpers.php:391
|
1033 |
+
msgid "Belize"
|
1034 |
+
msgstr ""
|
1035 |
+
|
1036 |
+
#: includes/helpers.php:392
|
1037 |
+
msgid "Benin"
|
1038 |
+
msgstr ""
|
1039 |
+
|
1040 |
+
#: includes/helpers.php:393
|
1041 |
+
msgid "Bermuda"
|
1042 |
+
msgstr ""
|
1043 |
+
|
1044 |
+
#: includes/helpers.php:394
|
1045 |
+
msgid "Bhutan"
|
1046 |
+
msgstr ""
|
1047 |
+
|
1048 |
+
#: includes/helpers.php:395
|
1049 |
+
msgid "Bolivia"
|
1050 |
+
msgstr ""
|
1051 |
+
|
1052 |
+
#: includes/helpers.php:396
|
1053 |
+
msgid "Bonaire, Saint Eustatius and Saba"
|
1054 |
+
msgstr ""
|
1055 |
+
|
1056 |
+
#: includes/helpers.php:397
|
1057 |
+
msgid "Bosnia and Herzegovina"
|
1058 |
+
msgstr ""
|
1059 |
+
|
1060 |
+
#: includes/helpers.php:398
|
1061 |
+
msgid "Botswana"
|
1062 |
+
msgstr ""
|
1063 |
+
|
1064 |
+
#: includes/helpers.php:399
|
1065 |
+
msgid "Bouvet Island"
|
1066 |
+
msgstr ""
|
1067 |
+
|
1068 |
+
#: includes/helpers.php:400
|
1069 |
+
msgid "Brazil"
|
1070 |
+
msgstr ""
|
1071 |
+
|
1072 |
+
#: includes/helpers.php:401
|
1073 |
+
msgid "British Indian Ocean Territory"
|
1074 |
+
msgstr ""
|
1075 |
+
|
1076 |
+
#: includes/helpers.php:402
|
1077 |
+
msgid "Brunei Darrussalam"
|
1078 |
+
msgstr ""
|
1079 |
+
|
1080 |
+
#: includes/helpers.php:403
|
1081 |
+
msgid "Bulgaria"
|
1082 |
+
msgstr ""
|
1083 |
+
|
1084 |
+
#: includes/helpers.php:404
|
1085 |
+
msgid "Burkina Faso"
|
1086 |
+
msgstr ""
|
1087 |
+
|
1088 |
+
#: includes/helpers.php:405
|
1089 |
+
msgid "Burundi"
|
1090 |
+
msgstr ""
|
1091 |
+
|
1092 |
+
#: includes/helpers.php:406
|
1093 |
+
msgid "Cambodia"
|
1094 |
+
msgstr ""
|
1095 |
+
|
1096 |
+
#: includes/helpers.php:407
|
1097 |
+
msgid "Cameroon"
|
1098 |
+
msgstr ""
|
1099 |
+
|
1100 |
+
#: includes/helpers.php:408
|
1101 |
+
msgid "Cape Verde"
|
1102 |
+
msgstr ""
|
1103 |
+
|
1104 |
+
#: includes/helpers.php:409
|
1105 |
+
msgid "Cayman Islands"
|
1106 |
+
msgstr ""
|
1107 |
+
|
1108 |
+
#: includes/helpers.php:410
|
1109 |
+
msgid "Central African Republic"
|
1110 |
+
msgstr ""
|
1111 |
+
|
1112 |
+
#: includes/helpers.php:411
|
1113 |
+
msgid "Chad"
|
1114 |
+
msgstr ""
|
1115 |
+
|
1116 |
+
#: includes/helpers.php:412
|
1117 |
+
msgid "Chile"
|
1118 |
+
msgstr ""
|
1119 |
+
|
1120 |
+
#: includes/helpers.php:413
|
1121 |
+
msgid "China"
|
1122 |
+
msgstr ""
|
1123 |
+
|
1124 |
+
#: includes/helpers.php:414
|
1125 |
+
msgid "Christmas Island"
|
1126 |
+
msgstr ""
|
1127 |
+
|
1128 |
+
#: includes/helpers.php:415
|
1129 |
+
msgid "Cocos Islands"
|
1130 |
+
msgstr ""
|
1131 |
+
|
1132 |
+
#: includes/helpers.php:416
|
1133 |
+
msgid "Colombia"
|
1134 |
+
msgstr ""
|
1135 |
+
|
1136 |
+
#: includes/helpers.php:417
|
1137 |
+
msgid "Comoros"
|
1138 |
+
msgstr ""
|
1139 |
+
|
1140 |
+
#: includes/helpers.php:418
|
1141 |
+
msgid "Congo, Democratic People's Republic"
|
1142 |
+
msgstr ""
|
1143 |
+
|
1144 |
+
#: includes/helpers.php:419
|
1145 |
+
msgid "Congo, Republic of"
|
1146 |
+
msgstr ""
|
1147 |
+
|
1148 |
+
#: includes/helpers.php:420
|
1149 |
+
msgid "Cook Islands"
|
1150 |
+
msgstr ""
|
1151 |
+
|
1152 |
+
#: includes/helpers.php:421
|
1153 |
+
msgid "Costa Rica"
|
1154 |
+
msgstr ""
|
1155 |
+
|
1156 |
+
#: includes/helpers.php:422
|
1157 |
+
msgid "Cote d'Ivoire"
|
1158 |
+
msgstr ""
|
1159 |
+
|
1160 |
+
#: includes/helpers.php:423
|
1161 |
+
msgid "Croatia/Hrvatska"
|
1162 |
+
msgstr ""
|
1163 |
+
|
1164 |
+
#: includes/helpers.php:424
|
1165 |
+
msgid "Cuba"
|
1166 |
+
msgstr ""
|
1167 |
+
|
1168 |
+
#: includes/helpers.php:425
|
1169 |
+
msgid "CuraÇao"
|
1170 |
+
msgstr ""
|
1171 |
+
|
1172 |
+
#: includes/helpers.php:426
|
1173 |
+
msgid "Cyprus"
|
1174 |
+
msgstr ""
|
1175 |
+
|
1176 |
+
#: includes/helpers.php:427
|
1177 |
+
msgid "Czechia"
|
1178 |
+
msgstr ""
|
1179 |
+
|
1180 |
+
#: includes/helpers.php:428
|
1181 |
+
msgid "Denmark"
|
1182 |
+
msgstr ""
|
1183 |
+
|
1184 |
+
#: includes/helpers.php:429
|
1185 |
+
msgid "Djibouti"
|
1186 |
+
msgstr ""
|
1187 |
+
|
1188 |
+
#: includes/helpers.php:430
|
1189 |
+
msgid "Dominica"
|
1190 |
+
msgstr ""
|
1191 |
+
|
1192 |
+
#: includes/helpers.php:431
|
1193 |
+
msgid "Dominican Republic"
|
1194 |
+
msgstr ""
|
1195 |
+
|
1196 |
+
#: includes/helpers.php:432
|
1197 |
+
msgid "East Timor"
|
1198 |
+
msgstr ""
|
1199 |
+
|
1200 |
+
#: includes/helpers.php:433
|
1201 |
+
msgid "Ecuador"
|
1202 |
+
msgstr ""
|
1203 |
+
|
1204 |
+
#: includes/helpers.php:434
|
1205 |
+
msgid "Egypt"
|
1206 |
+
msgstr ""
|
1207 |
+
|
1208 |
+
#: includes/helpers.php:435
|
1209 |
+
msgid "Equatorial Guinea"
|
1210 |
+
msgstr ""
|
1211 |
+
|
1212 |
+
#: includes/helpers.php:436
|
1213 |
+
msgid "El Salvador"
|
1214 |
+
msgstr ""
|
1215 |
+
|
1216 |
+
#: includes/helpers.php:437
|
1217 |
+
msgid "Eritrea"
|
1218 |
+
msgstr ""
|
1219 |
+
|
1220 |
+
#: includes/helpers.php:438
|
1221 |
+
msgid "Estonia"
|
1222 |
+
msgstr ""
|
1223 |
+
|
1224 |
+
#: includes/helpers.php:439
|
1225 |
+
msgid "Ethiopia"
|
1226 |
+
msgstr ""
|
1227 |
+
|
1228 |
+
#: includes/helpers.php:440
|
1229 |
+
msgid "Falkland Islands"
|
1230 |
+
msgstr ""
|
1231 |
+
|
1232 |
+
#: includes/helpers.php:441
|
1233 |
+
msgid "Faroe Islands"
|
1234 |
+
msgstr ""
|
1235 |
+
|
1236 |
+
#: includes/helpers.php:442
|
1237 |
+
msgid "Fiji"
|
1238 |
+
msgstr ""
|
1239 |
+
|
1240 |
+
#: includes/helpers.php:443
|
1241 |
+
msgid "Finland"
|
1242 |
+
msgstr ""
|
1243 |
+
|
1244 |
+
#: includes/helpers.php:444
|
1245 |
+
msgid "France"
|
1246 |
+
msgstr ""
|
1247 |
+
|
1248 |
+
#: includes/helpers.php:445
|
1249 |
+
msgid "French Guiana"
|
1250 |
+
msgstr ""
|
1251 |
+
|
1252 |
+
#: includes/helpers.php:446
|
1253 |
+
msgid "French Polynesia"
|
1254 |
+
msgstr ""
|
1255 |
+
|
1256 |
+
#: includes/helpers.php:447
|
1257 |
+
msgid "French Southern Territories"
|
1258 |
+
msgstr ""
|
1259 |
+
|
1260 |
+
#: includes/helpers.php:448
|
1261 |
+
msgid "Gabon"
|
1262 |
+
msgstr ""
|
1263 |
+
|
1264 |
+
#: includes/helpers.php:449
|
1265 |
+
msgid "Gambia"
|
1266 |
+
msgstr ""
|
1267 |
+
|
1268 |
+
#: includes/helpers.php:450
|
1269 |
+
msgid "Georgia"
|
1270 |
+
msgstr ""
|
1271 |
+
|
1272 |
+
#: includes/helpers.php:451
|
1273 |
+
msgid "Germany"
|
1274 |
+
msgstr ""
|
1275 |
+
|
1276 |
+
#: includes/helpers.php:452
|
1277 |
+
msgid "Greece"
|
1278 |
+
msgstr ""
|
1279 |
+
|
1280 |
+
#: includes/helpers.php:453
|
1281 |
+
msgid "Ghana"
|
1282 |
+
msgstr ""
|
1283 |
+
|
1284 |
+
#: includes/helpers.php:454
|
1285 |
+
msgid "Gibraltar"
|
1286 |
+
msgstr ""
|
1287 |
+
|
1288 |
+
#: includes/helpers.php:455
|
1289 |
+
msgid "Greenland"
|
1290 |
+
msgstr ""
|
1291 |
+
|
1292 |
+
#: includes/helpers.php:456
|
1293 |
+
msgid "Grenada"
|
1294 |
+
msgstr ""
|
1295 |
+
|
1296 |
+
#: includes/helpers.php:457
|
1297 |
+
msgid "Guadeloupe"
|
1298 |
+
msgstr ""
|
1299 |
+
|
1300 |
+
#: includes/helpers.php:458
|
1301 |
+
msgid "Guam"
|
1302 |
+
msgstr ""
|
1303 |
+
|
1304 |
+
#: includes/helpers.php:459
|
1305 |
+
msgid "Guatemala"
|
1306 |
+
msgstr ""
|
1307 |
+
|
1308 |
+
#: includes/helpers.php:460
|
1309 |
+
msgid "Guernsey"
|
1310 |
+
msgstr ""
|
1311 |
+
|
1312 |
+
#: includes/helpers.php:461
|
1313 |
+
msgid "Guinea"
|
1314 |
+
msgstr ""
|
1315 |
+
|
1316 |
+
#: includes/helpers.php:462
|
1317 |
+
msgid "Guinea-Bissau"
|
1318 |
+
msgstr ""
|
1319 |
+
|
1320 |
+
#: includes/helpers.php:463
|
1321 |
+
msgid "Guyana"
|
1322 |
+
msgstr ""
|
1323 |
+
|
1324 |
+
#: includes/helpers.php:464
|
1325 |
+
msgid "Haiti"
|
1326 |
+
msgstr ""
|
1327 |
+
|
1328 |
+
#: includes/helpers.php:465
|
1329 |
+
msgid "Heard and McDonald Islands"
|
1330 |
+
msgstr ""
|
1331 |
+
|
1332 |
+
#: includes/helpers.php:466
|
1333 |
+
msgid "Holy See (City Vatican State)"
|
1334 |
+
msgstr ""
|
1335 |
+
|
1336 |
+
#: includes/helpers.php:467
|
1337 |
+
msgid "Honduras"
|
1338 |
+
msgstr ""
|
1339 |
+
|
1340 |
+
#: includes/helpers.php:468
|
1341 |
+
msgid "Hong Kong"
|
1342 |
+
msgstr ""
|
1343 |
+
|
1344 |
+
#: includes/helpers.php:469
|
1345 |
+
msgid "Hungary"
|
1346 |
+
msgstr ""
|
1347 |
+
|
1348 |
+
#: includes/helpers.php:470
|
1349 |
+
msgid "Iceland"
|
1350 |
+
msgstr ""
|
1351 |
+
|
1352 |
+
#: includes/helpers.php:471
|
1353 |
+
msgid "India"
|
1354 |
+
msgstr ""
|
1355 |
+
|
1356 |
+
#: includes/helpers.php:472
|
1357 |
+
msgid "Indonesia"
|
1358 |
+
msgstr ""
|
1359 |
+
|
1360 |
+
#: includes/helpers.php:473
|
1361 |
+
msgid "Iran"
|
1362 |
+
msgstr ""
|
1363 |
+
|
1364 |
+
#: includes/helpers.php:474
|
1365 |
+
msgid "Iraq"
|
1366 |
+
msgstr ""
|
1367 |
+
|
1368 |
+
#: includes/helpers.php:475
|
1369 |
+
msgid "Ireland"
|
1370 |
+
msgstr ""
|
1371 |
+
|
1372 |
+
#: includes/helpers.php:476
|
1373 |
+
msgid "Isle of Man"
|
1374 |
+
msgstr ""
|
1375 |
+
|
1376 |
+
#: includes/helpers.php:477
|
1377 |
+
msgid "Israel"
|
1378 |
+
msgstr ""
|
1379 |
+
|
1380 |
+
#: includes/helpers.php:478
|
1381 |
+
msgid "Italy"
|
1382 |
+
msgstr ""
|
1383 |
+
|
1384 |
+
#: includes/helpers.php:479
|
1385 |
+
msgid "Jamaica"
|
1386 |
+
msgstr ""
|
1387 |
+
|
1388 |
+
#: includes/helpers.php:480
|
1389 |
+
msgid "Japan"
|
1390 |
+
msgstr ""
|
1391 |
+
|
1392 |
+
#: includes/helpers.php:481
|
1393 |
+
msgid "Jersey"
|
1394 |
+
msgstr ""
|
1395 |
+
|
1396 |
+
#: includes/helpers.php:482
|
1397 |
+
msgid "Jordan"
|
1398 |
+
msgstr ""
|
1399 |
+
|
1400 |
+
#: includes/helpers.php:483
|
1401 |
+
msgid "Kazakhstan"
|
1402 |
+
msgstr ""
|
1403 |
+
|
1404 |
+
#: includes/helpers.php:484
|
1405 |
+
msgid "Kenya"
|
1406 |
+
msgstr ""
|
1407 |
+
|
1408 |
+
#: includes/helpers.php:485
|
1409 |
+
msgid "Kiribati"
|
1410 |
+
msgstr ""
|
1411 |
+
|
1412 |
+
#: includes/helpers.php:486
|
1413 |
+
msgid "Kuwait"
|
1414 |
+
msgstr ""
|
1415 |
+
|
1416 |
+
#: includes/helpers.php:487
|
1417 |
+
msgid "Kyrgyzstan"
|
1418 |
+
msgstr ""
|
1419 |
+
|
1420 |
+
#: includes/helpers.php:488
|
1421 |
+
msgid "Lao People's Democratic Republic"
|
1422 |
+
msgstr ""
|
1423 |
+
|
1424 |
+
#: includes/helpers.php:489
|
1425 |
+
msgid "Latvia"
|
1426 |
+
msgstr ""
|
1427 |
+
|
1428 |
+
#: includes/helpers.php:490
|
1429 |
+
msgid "Lebanon"
|
1430 |
+
msgstr ""
|
1431 |
+
|
1432 |
+
#: includes/helpers.php:491
|
1433 |
+
msgid "Lesotho"
|
1434 |
+
msgstr ""
|
1435 |
+
|
1436 |
+
#: includes/helpers.php:492
|
1437 |
+
msgid "Liberia"
|
1438 |
+
msgstr ""
|
1439 |
+
|
1440 |
+
#: includes/helpers.php:493
|
1441 |
+
msgid "Libyan Arab Jamahiriya"
|
1442 |
+
msgstr ""
|
1443 |
+
|
1444 |
+
#: includes/helpers.php:494
|
1445 |
+
msgid "Liechtenstein"
|
1446 |
+
msgstr ""
|
1447 |
+
|
1448 |
+
#: includes/helpers.php:495
|
1449 |
+
msgid "Lithuania"
|
1450 |
+
msgstr ""
|
1451 |
+
|
1452 |
+
#: includes/helpers.php:496
|
1453 |
+
msgid "Luxembourg"
|
1454 |
+
msgstr ""
|
1455 |
+
|
1456 |
+
#: includes/helpers.php:497
|
1457 |
+
msgid "Macau"
|
1458 |
+
msgstr ""
|
1459 |
+
|
1460 |
+
#: includes/helpers.php:498
|
1461 |
+
msgid "Macedonia (FYROM)"
|
1462 |
+
msgstr ""
|
1463 |
+
|
1464 |
+
#: includes/helpers.php:499
|
1465 |
+
msgid "Madagascar"
|
1466 |
+
msgstr ""
|
1467 |
+
|
1468 |
+
#: includes/helpers.php:500
|
1469 |
+
msgid "Malawi"
|
1470 |
+
msgstr ""
|
1471 |
+
|
1472 |
+
#: includes/helpers.php:501
|
1473 |
+
msgid "Malaysia"
|
1474 |
+
msgstr ""
|
1475 |
+
|
1476 |
+
#: includes/helpers.php:502
|
1477 |
+
msgid "Maldives"
|
1478 |
+
msgstr ""
|
1479 |
+
|
1480 |
+
#: includes/helpers.php:503
|
1481 |
+
msgid "Mali"
|
1482 |
+
msgstr ""
|
1483 |
+
|
1484 |
+
#: includes/helpers.php:504
|
1485 |
+
msgid "Malta"
|
1486 |
+
msgstr ""
|
1487 |
+
|
1488 |
+
#: includes/helpers.php:505
|
1489 |
+
msgid "Marshall Islands"
|
1490 |
+
msgstr ""
|
1491 |
+
|
1492 |
+
#: includes/helpers.php:506
|
1493 |
+
msgid "Martinique"
|
1494 |
+
msgstr ""
|
1495 |
+
|
1496 |
+
#: includes/helpers.php:507
|
1497 |
+
msgid "Mauritania"
|
1498 |
+
msgstr ""
|
1499 |
+
|
1500 |
+
#: includes/helpers.php:508
|
1501 |
+
msgid "Mauritius"
|
1502 |
+
msgstr ""
|
1503 |
+
|
1504 |
+
#: includes/helpers.php:509
|
1505 |
+
msgid "Mayotte"
|
1506 |
+
msgstr ""
|
1507 |
+
|
1508 |
+
#: includes/helpers.php:510
|
1509 |
+
msgid "Mexico"
|
1510 |
+
msgstr ""
|
1511 |
+
|
1512 |
+
#: includes/helpers.php:511
|
1513 |
+
msgid "Micronesia"
|
1514 |
+
msgstr ""
|
1515 |
+
|
1516 |
+
#: includes/helpers.php:512
|
1517 |
+
msgid "Moldova, Republic of"
|
1518 |
+
msgstr ""
|
1519 |
+
|
1520 |
+
#: includes/helpers.php:513
|
1521 |
+
msgid "Monaco"
|
1522 |
+
msgstr ""
|
1523 |
+
|
1524 |
+
#: includes/helpers.php:514
|
1525 |
+
msgid "Mongolia"
|
1526 |
+
msgstr ""
|
1527 |
+
|
1528 |
+
#: includes/helpers.php:515
|
1529 |
+
msgid "Montenegro"
|
1530 |
+
msgstr ""
|
1531 |
+
|
1532 |
+
#: includes/helpers.php:516
|
1533 |
+
msgid "Montserrat"
|
1534 |
+
msgstr ""
|
1535 |
+
|
1536 |
+
#: includes/helpers.php:517
|
1537 |
+
msgid "Morocco"
|
1538 |
+
msgstr ""
|
1539 |
+
|
1540 |
+
#: includes/helpers.php:518
|
1541 |
+
msgid "Mozambique"
|
1542 |
+
msgstr ""
|
1543 |
+
|
1544 |
+
#: includes/helpers.php:519
|
1545 |
+
msgid "Myanmar"
|
1546 |
+
msgstr ""
|
1547 |
+
|
1548 |
+
#: includes/helpers.php:520
|
1549 |
+
msgid "Namibia"
|
1550 |
+
msgstr ""
|
1551 |
+
|
1552 |
+
#: includes/helpers.php:521
|
1553 |
+
msgid "Nauru"
|
1554 |
+
msgstr ""
|
1555 |
+
|
1556 |
+
#: includes/helpers.php:522
|
1557 |
+
msgid "Nepal"
|
1558 |
+
msgstr ""
|
1559 |
+
|
1560 |
+
#: includes/helpers.php:523
|
1561 |
+
msgid "Netherlands"
|
1562 |
+
msgstr ""
|
1563 |
+
|
1564 |
+
#: includes/helpers.php:524
|
1565 |
+
msgid "Netherlands Antilles"
|
1566 |
+
msgstr ""
|
1567 |
+
|
1568 |
+
#: includes/helpers.php:525
|
1569 |
+
msgid "New Caledonia"
|
1570 |
+
msgstr ""
|
1571 |
+
|
1572 |
+
#: includes/helpers.php:526
|
1573 |
+
msgid "New Zealand"
|
1574 |
+
msgstr ""
|
1575 |
+
|
1576 |
+
#: includes/helpers.php:527
|
1577 |
+
msgid "Nicaragua"
|
1578 |
+
msgstr ""
|
1579 |
+
|
1580 |
+
#: includes/helpers.php:528
|
1581 |
+
msgid "Niger"
|
1582 |
+
msgstr ""
|
1583 |
+
|
1584 |
+
#: includes/helpers.php:529
|
1585 |
+
msgid "Nigeria"
|
1586 |
+
msgstr ""
|
1587 |
+
|
1588 |
+
#: includes/helpers.php:530
|
1589 |
+
msgid "Niue"
|
1590 |
+
msgstr ""
|
1591 |
+
|
1592 |
+
#: includes/helpers.php:531
|
1593 |
+
msgid "Norfolk Island"
|
1594 |
+
msgstr ""
|
1595 |
+
|
1596 |
+
#: includes/helpers.php:532
|
1597 |
+
msgid "North Korea"
|
1598 |
+
msgstr ""
|
1599 |
+
|
1600 |
+
#: includes/helpers.php:533
|
1601 |
+
msgid "Northern Mariana Islands"
|
1602 |
+
msgstr ""
|
1603 |
+
|
1604 |
+
#: includes/helpers.php:534
|
1605 |
+
msgid "Norway"
|
1606 |
+
msgstr ""
|
1607 |
+
|
1608 |
+
#: includes/helpers.php:535
|
1609 |
+
msgid "Oman"
|
1610 |
+
msgstr ""
|
1611 |
+
|
1612 |
+
#: includes/helpers.php:536
|
1613 |
+
msgid "Pakistan"
|
1614 |
+
msgstr ""
|
1615 |
+
|
1616 |
+
#: includes/helpers.php:537
|
1617 |
+
msgid "Palau"
|
1618 |
+
msgstr ""
|
1619 |
+
|
1620 |
+
#: includes/helpers.php:538
|
1621 |
+
msgid "Palestinian Territories"
|
1622 |
+
msgstr ""
|
1623 |
+
|
1624 |
+
#: includes/helpers.php:539
|
1625 |
+
msgid "Panama"
|
1626 |
+
msgstr ""
|
1627 |
+
|
1628 |
+
#: includes/helpers.php:540
|
1629 |
+
msgid "Papua New Guinea"
|
1630 |
+
msgstr ""
|
1631 |
+
|
1632 |
+
#: includes/helpers.php:541
|
1633 |
+
msgid "Paraguay"
|
1634 |
+
msgstr ""
|
1635 |
+
|
1636 |
+
#: includes/helpers.php:542
|
1637 |
+
msgid "Peru"
|
1638 |
+
msgstr ""
|
1639 |
+
|
1640 |
+
#: includes/helpers.php:543
|
1641 |
+
msgid "Philippines"
|
1642 |
+
msgstr ""
|
1643 |
+
|
1644 |
+
#: includes/helpers.php:544
|
1645 |
+
msgid "Pitcairn Island"
|
1646 |
+
msgstr ""
|
1647 |
+
|
1648 |
+
#: includes/helpers.php:545
|
1649 |
+
msgid "Poland"
|
1650 |
+
msgstr ""
|
1651 |
+
|
1652 |
+
#: includes/helpers.php:546
|
1653 |
+
msgid "Portugal"
|
1654 |
+
msgstr ""
|
1655 |
+
|
1656 |
+
#: includes/helpers.php:547
|
1657 |
+
msgid "Puerto Rico"
|
1658 |
+
msgstr ""
|
1659 |
+
|
1660 |
+
#: includes/helpers.php:548
|
1661 |
+
msgid "Qatar"
|
1662 |
+
msgstr ""
|
1663 |
+
|
1664 |
+
#: includes/helpers.php:549
|
1665 |
+
msgid "Republic of Kosovo"
|
1666 |
+
msgstr ""
|
1667 |
+
|
1668 |
+
#: includes/helpers.php:550
|
1669 |
+
msgid "Reunion Island"
|
1670 |
+
msgstr ""
|
1671 |
+
|
1672 |
+
#: includes/helpers.php:551
|
1673 |
+
msgid "Romania"
|
1674 |
+
msgstr ""
|
1675 |
+
|
1676 |
+
#: includes/helpers.php:552
|
1677 |
+
msgid "Russian Federation"
|
1678 |
+
msgstr ""
|
1679 |
+
|
1680 |
+
#: includes/helpers.php:553
|
1681 |
+
msgid "Rwanda"
|
1682 |
+
msgstr ""
|
1683 |
+
|
1684 |
+
#: includes/helpers.php:554
|
1685 |
+
msgid "Saint Barthélemy"
|
1686 |
+
msgstr ""
|
1687 |
+
|
1688 |
+
#: includes/helpers.php:555
|
1689 |
+
msgid "Saint Helena"
|
1690 |
+
msgstr ""
|
1691 |
+
|
1692 |
+
#: includes/helpers.php:556
|
1693 |
+
msgid "Saint Kitts and Nevis"
|
1694 |
+
msgstr ""
|
1695 |
+
|
1696 |
+
#: includes/helpers.php:557
|
1697 |
+
msgid "Saint Lucia"
|
1698 |
+
msgstr ""
|
1699 |
+
|
1700 |
+
#: includes/helpers.php:558
|
1701 |
+
msgid "Saint Martin (French)"
|
1702 |
+
msgstr ""
|
1703 |
+
|
1704 |
+
#: includes/helpers.php:559
|
1705 |
+
msgid "Saint Martin (Dutch)"
|
1706 |
+
msgstr ""
|
1707 |
+
|
1708 |
+
#: includes/helpers.php:560
|
1709 |
+
msgid "Saint Pierre and Miquelon"
|
1710 |
+
msgstr ""
|
1711 |
+
|
1712 |
+
#: includes/helpers.php:561
|
1713 |
+
msgid "Saint Vincent and the Grenadines"
|
1714 |
+
msgstr ""
|
1715 |
+
|
1716 |
+
#: includes/helpers.php:562
|
1717 |
+
msgid "San Marino"
|
1718 |
+
msgstr ""
|
1719 |
+
|
1720 |
+
#: includes/helpers.php:563
|
1721 |
+
msgid "São Tomé and Príncipe"
|
1722 |
+
msgstr ""
|
1723 |
+
|
1724 |
+
#: includes/helpers.php:564
|
1725 |
+
msgid "Saudi Arabia"
|
1726 |
+
msgstr ""
|
1727 |
+
|
1728 |
+
#: includes/helpers.php:565
|
1729 |
+
msgid "Senegal"
|
1730 |
+
msgstr ""
|
1731 |
+
|
1732 |
+
#: includes/helpers.php:566
|
1733 |
+
msgid "Serbia"
|
1734 |
+
msgstr ""
|
1735 |
+
|
1736 |
+
#: includes/helpers.php:567
|
1737 |
+
msgid "Seychelles"
|
1738 |
+
msgstr ""
|
1739 |
+
|
1740 |
+
#: includes/helpers.php:568
|
1741 |
+
msgid "Sierra Leone"
|
1742 |
+
msgstr ""
|
1743 |
+
|
1744 |
+
#: includes/helpers.php:569
|
1745 |
+
msgid "Singapore"
|
1746 |
+
msgstr ""
|
1747 |
+
|
1748 |
+
#: includes/helpers.php:570
|
1749 |
+
msgid "Slovak Republic"
|
1750 |
+
msgstr ""
|
1751 |
+
|
1752 |
+
#: includes/helpers.php:571
|
1753 |
+
msgid "Slovenia"
|
1754 |
+
msgstr ""
|
1755 |
+
|
1756 |
+
#: includes/helpers.php:572
|
1757 |
+
msgid "Solomon Islands"
|
1758 |
+
msgstr ""
|
1759 |
+
|
1760 |
+
#: includes/helpers.php:573
|
1761 |
+
msgid "Somalia"
|
1762 |
+
msgstr ""
|
1763 |
+
|
1764 |
+
#: includes/helpers.php:574
|
1765 |
+
msgid "South Africa"
|
1766 |
+
msgstr ""
|
1767 |
+
|
1768 |
+
#: includes/helpers.php:575
|
1769 |
+
msgid "South Georgia"
|
1770 |
+
msgstr ""
|
1771 |
+
|
1772 |
+
#: includes/helpers.php:576
|
1773 |
+
msgid "South Korea"
|
1774 |
+
msgstr ""
|
1775 |
+
|
1776 |
+
#: includes/helpers.php:577
|
1777 |
+
msgid "South Sudan"
|
1778 |
+
msgstr ""
|
1779 |
+
|
1780 |
+
#: includes/helpers.php:578
|
1781 |
+
msgid "Spain"
|
1782 |
+
msgstr ""
|
1783 |
+
|
1784 |
+
#: includes/helpers.php:579
|
1785 |
+
msgid "Sri Lanka"
|
1786 |
+
msgstr ""
|
1787 |
+
|
1788 |
+
#: includes/helpers.php:580
|
1789 |
+
msgid "Sudan"
|
1790 |
+
msgstr ""
|
1791 |
+
|
1792 |
+
#: includes/helpers.php:581
|
1793 |
+
msgid "Suriname"
|
1794 |
+
msgstr ""
|
1795 |
+
|
1796 |
+
#: includes/helpers.php:582
|
1797 |
+
msgid "Svalbard and Jan Mayen Islands"
|
1798 |
+
msgstr ""
|
1799 |
+
|
1800 |
+
#: includes/helpers.php:583
|
1801 |
+
msgid "Swaziland"
|
1802 |
+
msgstr ""
|
1803 |
+
|
1804 |
+
#: includes/helpers.php:584
|
1805 |
+
msgid "Sweden"
|
1806 |
+
msgstr ""
|
1807 |
+
|
1808 |
+
#: includes/helpers.php:585
|
1809 |
+
msgid "Switzerland"
|
1810 |
+
msgstr ""
|
1811 |
+
|
1812 |
+
#: includes/helpers.php:586
|
1813 |
+
msgid "Syrian Arab Republic"
|
1814 |
+
msgstr ""
|
1815 |
+
|
1816 |
+
#: includes/helpers.php:587
|
1817 |
+
msgid "Taiwan"
|
1818 |
+
msgstr ""
|
1819 |
+
|
1820 |
+
#: includes/helpers.php:588
|
1821 |
+
msgid "Tajikistan"
|
1822 |
+
msgstr ""
|
1823 |
+
|
1824 |
+
#: includes/helpers.php:589
|
1825 |
+
msgid "Tanzania"
|
1826 |
+
msgstr ""
|
1827 |
+
|
1828 |
+
#: includes/helpers.php:590
|
1829 |
+
msgid "Thailand"
|
1830 |
+
msgstr ""
|
1831 |
+
|
1832 |
+
#: includes/helpers.php:591
|
1833 |
+
msgid "Timor-Leste"
|
1834 |
+
msgstr ""
|
1835 |
+
|
1836 |
+
#: includes/helpers.php:592
|
1837 |
+
msgid "Togo"
|
1838 |
+
msgstr ""
|
1839 |
+
|
1840 |
+
#: includes/helpers.php:593
|
1841 |
+
msgid "Tokelau"
|
1842 |
+
msgstr ""
|
1843 |
+
|
1844 |
+
#: includes/helpers.php:594
|
1845 |
+
msgid "Tonga"
|
1846 |
+
msgstr ""
|
1847 |
+
|
1848 |
+
#: includes/helpers.php:595
|
1849 |
+
msgid "Trinidad and Tobago"
|
1850 |
+
msgstr ""
|
1851 |
+
|
1852 |
+
#: includes/helpers.php:596
|
1853 |
+
msgid "Tunisia"
|
1854 |
+
msgstr ""
|
1855 |
+
|
1856 |
+
#: includes/helpers.php:597
|
1857 |
+
msgid "Turkey"
|
1858 |
+
msgstr ""
|
1859 |
+
|
1860 |
+
#: includes/helpers.php:598
|
1861 |
+
msgid "Turkmenistan"
|
1862 |
+
msgstr ""
|
1863 |
+
|
1864 |
+
#: includes/helpers.php:599
|
1865 |
+
msgid "Turks and Caicos Islands"
|
1866 |
+
msgstr ""
|
1867 |
+
|
1868 |
+
#: includes/helpers.php:600
|
1869 |
+
msgid "Tuvalu"
|
1870 |
+
msgstr ""
|
1871 |
+
|
1872 |
+
#: includes/helpers.php:601
|
1873 |
+
msgid "Uganda"
|
1874 |
+
msgstr ""
|
1875 |
+
|
1876 |
+
#: includes/helpers.php:602
|
1877 |
+
msgid "Ukraine"
|
1878 |
+
msgstr ""
|
1879 |
+
|
1880 |
+
#: includes/helpers.php:603
|
1881 |
+
msgid "United Arab Emirates"
|
1882 |
+
msgstr ""
|
1883 |
+
|
1884 |
+
#: includes/helpers.php:604
|
1885 |
+
msgid "Uruguay"
|
1886 |
+
msgstr ""
|
1887 |
+
|
1888 |
+
#: includes/helpers.php:605
|
1889 |
+
msgid "US Minor Outlying Islands"
|
1890 |
+
msgstr ""
|
1891 |
+
|
1892 |
+
#: includes/helpers.php:606
|
1893 |
+
msgid "Uzbekistan"
|
1894 |
+
msgstr ""
|
1895 |
+
|
1896 |
+
#: includes/helpers.php:607
|
1897 |
+
msgid "Vanuatu"
|
1898 |
+
msgstr ""
|
1899 |
+
|
1900 |
+
#: includes/helpers.php:608
|
1901 |
+
msgid "Venezuela"
|
1902 |
+
msgstr ""
|
1903 |
+
|
1904 |
+
#: includes/helpers.php:609
|
1905 |
+
msgid "Vietnam"
|
1906 |
+
msgstr ""
|
1907 |
+
|
1908 |
+
#: includes/helpers.php:610
|
1909 |
+
msgid "Virgin Islands (British)"
|
1910 |
+
msgstr ""
|
1911 |
+
|
1912 |
+
#: includes/helpers.php:611
|
1913 |
+
msgid "Virgin Islands (USA)"
|
1914 |
+
msgstr ""
|
1915 |
+
|
1916 |
+
#: includes/helpers.php:612
|
1917 |
+
msgid "Wallis and Futuna Islands"
|
1918 |
+
msgstr ""
|
1919 |
+
|
1920 |
+
#: includes/helpers.php:613
|
1921 |
+
msgid "Western Sahara"
|
1922 |
+
msgstr ""
|
1923 |
+
|
1924 |
+
#: includes/helpers.php:614
|
1925 |
+
msgid "Western Samoa"
|
1926 |
+
msgstr ""
|
1927 |
+
|
1928 |
+
#: includes/helpers.php:615
|
1929 |
+
msgid "Yemen"
|
1930 |
+
msgstr ""
|
1931 |
+
|
1932 |
+
#: includes/helpers.php:616
|
1933 |
+
msgid "Zambia"
|
1934 |
+
msgstr ""
|
1935 |
+
|
1936 |
+
#: includes/helpers.php:617
|
1937 |
+
msgid "Zimbabwe"
|
1938 |
+
msgstr ""
|
1939 |
+
|
1940 |
+
#. Translators: The placeholders are for making the "We noticed you're using a caching plugin" text bold.
|
1941 |
+
#: includes/helpers.php:1204
|
1942 |
+
msgid "%1$sWe noticed you're using a caching plugin or caching from your hosting provider.%2$s Be sure to clear the cache to ensure the tracking appears on all pages and posts. %3$s(See this guide on how to clear cache)%4$s."
|
1943 |
+
msgstr ""
|
1944 |
+
|
1945 |
+
#. Translators: The placeholders are for making the "We have detected multiple tracking codes" text bold & adding a link to support.
|
1946 |
+
#: includes/helpers.php:1206
|
1947 |
+
msgid "%1$sWe have detected multiple tracking codes%2$s! You should remove non-ExactMetrics ones. If you need help finding them please %3$sread this article%4$s."
|
1948 |
+
msgstr ""
|
1949 |
+
|
1950 |
+
#. Translators: Placeholders add the hook name, plugin version and bold text.
|
1951 |
+
#: includes/deprecated.php:127
|
1952 |
+
msgid "%1$s is %3$sdeprecated%4$s since ExactMetrics version %2$s!"
|
1953 |
+
msgstr ""
|
1954 |
+
|
1955 |
+
#. Translators: Placeholders add the hook name, plugin version and bold text.
|
1956 |
+
#: includes/deprecated.php:181
|
1957 |
+
msgid "%1$s is %3$sdeprecated%4$s since ExactMetrics version %2$s."
|
1958 |
+
msgstr ""
|
1959 |
+
|
1960 |
+
#: languages/vue.php:5
|
1961 |
+
msgid "Error"
|
1962 |
+
msgstr ""
|
1963 |
+
|
1964 |
+
#: languages/vue.php:8
|
1965 |
+
msgid "Please try again."
|
1966 |
+
msgstr ""
|
1967 |
+
|
1968 |
+
#: languages/vue.php:11
|
1969 |
+
msgid "Loading settings"
|
1970 |
+
msgstr ""
|
1971 |
+
|
1972 |
+
#: languages/vue.php:14
|
1973 |
+
msgid "Loading Settings"
|
1974 |
+
msgstr ""
|
1975 |
+
|
1976 |
+
#: languages/vue.php:17
|
1977 |
+
msgid "Please wait..."
|
1978 |
+
msgstr ""
|
1979 |
+
|
1980 |
+
#: languages/vue.php:20
|
1981 |
+
msgid "Saving Changes..."
|
1982 |
+
msgstr ""
|
1983 |
+
|
1984 |
+
#: languages/vue.php:23
|
1985 |
+
msgid "Settings Updated"
|
1986 |
+
msgstr ""
|
1987 |
+
|
1988 |
+
#. Translators: Add a link to the onboarding wizard.
|
1989 |
+
#: languages/vue.php:27
|
1990 |
+
msgid "You need to %1$sconnect ExactMetrics%2$s first"
|
1991 |
+
msgstr ""
|
1992 |
+
|
1993 |
+
#: languages/vue.php:30
|
1994 |
+
msgid "Could Not Save Changes"
|
1995 |
+
msgstr ""
|
1996 |
+
|
1997 |
+
#: languages/vue.php:33
|
1998 |
+
msgid "Loading new report data"
|
1999 |
+
msgstr ""
|
2000 |
+
|
2001 |
+
#. Translators: Placeholder gets replaced with an arrow icon.
|
2002 |
+
#: languages/vue.php:37
|
2003 |
+
msgid "Continue %s"
|
2004 |
+
msgstr ""
|
2005 |
+
|
2006 |
+
#: languages/vue.php:40
|
2007 |
+
msgid "Unlock the Publishers Report and Focus on the Content that Matters"
|
2008 |
+
msgstr ""
|
2009 |
+
|
2010 |
+
#: languages/vue.php:43
|
2011 |
+
msgid "Stop guessing about what content your visitors are interested in. ExactMetrics Publisher Report shows you exactly which content gets the most visits, so you can analyze and optimize it for higher conversions."
|
2012 |
+
msgstr ""
|
2013 |
+
|
2014 |
+
#: languages/vue.php:46
|
2015 |
+
msgid "Unlock the Publishers Report and Focus on the Content That Matters"
|
2016 |
+
msgstr ""
|
2017 |
+
|
2018 |
+
#: languages/vue.php:49
|
2019 |
+
msgid "Stop guessing about what content your visitors are interested in. The Publisher Report shows you exactly which content gets the most traffic, so you can analyze and optimize it for higher conversions."
|
2020 |
+
msgstr ""
|
2021 |
+
|
2022 |
+
#: languages/vue.php:52
|
2023 |
+
msgid "Unlock the eCommerce Report and See Your Important Store Metrics"
|
2024 |
+
msgstr ""
|
2025 |
+
|
2026 |
+
#: languages/vue.php:55
|
2027 |
+
msgid "Increase your sales & revenue with insights. ExactMetrics answers all your top eCommerce questions using metrics like total revenue, conversion rate, average order value, top products, top referral sources and more."
|
2028 |
+
msgstr ""
|
2029 |
+
|
2030 |
+
#: languages/vue.php:58
|
2031 |
+
msgid "Unlock the Dimensions Report and Track Your Own Custom Data"
|
2032 |
+
msgstr ""
|
2033 |
+
|
2034 |
+
#: languages/vue.php:61
|
2035 |
+
msgid "Decide what data is important using your own custom tracking parameters. The Dimensions report allows you to easily see what's working right inside your WordPress dashboard."
|
2036 |
+
msgstr ""
|
2037 |
+
|
2038 |
+
#: languages/vue.php:64
|
2039 |
+
msgid "Unlock the Forms Report and Improve Conversions"
|
2040 |
+
msgstr ""
|
2041 |
+
|
2042 |
+
#: languages/vue.php:67
|
2043 |
+
msgid "Easily track your form views and conversions. The Forms Report allows you to see which forms are performing better and which forms have lower conversion rates so you can optimize using real data."
|
2044 |
+
msgstr ""
|
2045 |
+
|
2046 |
+
#: languages/vue.php:70
|
2047 |
+
msgid "Unlock the Search Console Report and See How People Find Your Website"
|
2048 |
+
msgstr ""
|
2049 |
+
|
2050 |
+
#: languages/vue.php:73
|
2051 |
+
msgid "See exactly how people find your website, which keywords they searched for, how many times the results were viewed, and more."
|
2052 |
+
msgstr ""
|
2053 |
+
|
2054 |
+
#: languages/vue.php:76
|
2055 |
+
msgid "Unlock the Real-Time Report and Track the Visitors on Your Site in Real-Time"
|
2056 |
+
msgstr ""
|
2057 |
+
|
2058 |
+
#: languages/vue.php:79
|
2059 |
+
msgid "Track the results of your marketing efforts and product launches as-it-happens right from your WordPress site. The Real-Time report allows you to view your traffic sources and visitors activity when you need it."
|
2060 |
+
msgstr ""
|
2061 |
+
|
2062 |
+
#: languages/vue.php:84
|
2063 |
+
msgid "Overview Report"
|
2064 |
+
msgstr ""
|
2065 |
+
|
2066 |
+
#. Translators: Number of visitors.
|
2067 |
+
#: languages/vue.php:88
|
2068 |
+
msgid "See how %s visitors found your site!"
|
2069 |
+
msgstr ""
|
2070 |
+
|
2071 |
+
#. Translators: Number of visitors.
|
2072 |
+
#: languages/vue.php:92
|
2073 |
+
msgid "Your website was visited by %s users in the last 30 days."
|
2074 |
+
msgstr ""
|
2075 |
+
|
2076 |
+
#: languages/vue.php:95
|
2077 |
+
msgid "See the full analytics report!"
|
2078 |
+
msgstr ""
|
2079 |
+
|
2080 |
+
#: languages/vue.php:98
|
2081 |
+
msgid "Success! "
|
2082 |
+
msgstr ""
|
2083 |
+
|
2084 |
+
#: languages/vue.php:101
|
2085 |
+
msgid "You're now using ExactMetrics Pro with all the features."
|
2086 |
+
msgstr ""
|
2087 |
+
|
2088 |
+
#. Translators: Placeholder gets replaced with an arrow icon.
|
2089 |
+
#: languages/vue.php:105
|
2090 |
+
msgid "Get Started %s"
|
2091 |
+
msgstr ""
|
2092 |
+
|
2093 |
+
#. Translators: Current WordPress version.
|
2094 |
+
#: languages/vue.php:109
|
2095 |
+
msgid "ExactMetrics has detected that your site is running an outdated version of WordPress (%s). ExactMetrics will stop supporting WordPress versions lower than 4.6 in April, 2019. Updating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install."
|
2096 |
+
msgstr ""
|
2097 |
+
|
2098 |
+
#: languages/vue.php:112
|
2099 |
+
msgid "Yikes! PHP Update Required"
|
2100 |
+
msgstr ""
|
2101 |
+
|
2102 |
+
#. Translators: Current PHP version and recommended PHP version.
|
2103 |
+
#: languages/vue.php:116
|
2104 |
+
msgid "ExactMetrics has detected that your site is running an outdated, insecure version of PHP (%1$s), which could be putting your site at risk for being hacked. WordPress stopped supporting your PHP version in April, 2019. Updating to the recommended version (PHP %2$s) only takes a few minutes and will make your website significantly faster and more secure."
|
2105 |
+
msgstr ""
|
2106 |
+
|
2107 |
+
#: languages/vue.php:119
|
2108 |
+
msgid "Learn more about updating PHP"
|
2109 |
+
msgstr ""
|
2110 |
+
|
2111 |
+
#: languages/vue.php:122
|
2112 |
+
msgid "Yikes! WordPress Update Required"
|
2113 |
+
msgstr ""
|
2114 |
+
|
2115 |
+
#. Translators: Current WordPress version.
|
2116 |
+
#: languages/vue.php:126
|
2117 |
+
msgid "ExactMetrics has detected that your site is running an outdated version of WordPress (%s). ExactMetrics will stop supporting WordPress versions lower than 4.9 in October, 2019. Updating WordPress takes just a few minutes and will also solve many bugs that exist in your WordPress install."
|
2118 |
+
msgstr ""
|
2119 |
+
|
2120 |
+
#: languages/vue.php:129
|
2121 |
+
msgid "Learn more about updating WordPress"
|
2122 |
+
msgstr ""
|
2123 |
+
|
2124 |
+
#: languages/vue.php:148
|
2125 |
+
msgid "Dimensions Report"
|
2126 |
+
msgstr ""
|
2127 |
+
|
2128 |
+
#: languages/vue.php:154
|
2129 |
+
msgid "Real-Time"
|
2130 |
+
msgstr ""
|
2131 |
+
|
2132 |
+
#: languages/vue.php:163
|
2133 |
+
msgid "Getting Started"
|
2134 |
+
msgstr ""
|
2135 |
+
|
2136 |
+
#: languages/vue.php:167
|
2137 |
+
msgid "Lite vs Pro"
|
2138 |
+
msgstr ""
|
2139 |
+
|
2140 |
+
#: languages/vue.php:170
|
2141 |
+
msgid "General"
|
2142 |
+
msgstr ""
|
2143 |
+
|
2144 |
+
#: languages/vue.php:173
|
2145 |
+
msgid "Engagement"
|
2146 |
+
msgstr ""
|
2147 |
+
|
2148 |
+
#: languages/vue.php:176
|
2149 |
+
msgid "Publisher"
|
2150 |
+
msgstr ""
|
2151 |
+
|
2152 |
+
#: languages/vue.php:179
|
2153 |
+
msgid "Conversions"
|
2154 |
+
msgstr ""
|
2155 |
+
|
2156 |
+
#: languages/vue.php:182
|
2157 |
+
msgid "Advanced"
|
2158 |
+
msgstr ""
|
2159 |
+
|
2160 |
+
#: languages/vue.php:185
|
2161 |
+
msgid "URL Builder"
|
2162 |
+
msgstr ""
|
2163 |
+
|
2164 |
+
#: languages/vue.php:188
|
2165 |
+
msgid "Import Export"
|
2166 |
+
msgstr ""
|
2167 |
+
|
2168 |
+
#: languages/vue.php:191
|
2169 |
+
msgid "Go back"
|
2170 |
+
msgstr ""
|
2171 |
+
|
2172 |
+
#. Translators: Placeholders are replaced with the current step number out of the total number of steps.
|
2173 |
+
#: languages/vue.php:195
|
2174 |
+
msgid "Step %1$s of %2$s"
|
2175 |
+
msgstr ""
|
2176 |
+
|
2177 |
+
#: languages/vue.php:198
|
2178 |
+
msgid "Exit Setup"
|
2179 |
+
msgstr ""
|
2180 |
+
|
2181 |
+
#. Translators: Error status and error text.
|
2182 |
+
#: languages/vue.php:202
|
2183 |
+
msgid "Can't load report data. Error: %1$s, %2$s"
|
2184 |
+
msgstr ""
|
2185 |
+
|
2186 |
+
#: languages/vue.php:205
|
2187 |
+
msgid "Error loading report data"
|
2188 |
+
msgstr ""
|
2189 |
+
|
2190 |
+
#: languages/vue.php:208
|
2191 |
+
msgid "ExactMetrics encountered an error loading your report data"
|
2192 |
+
msgstr ""
|
2193 |
+
|
2194 |
+
#: languages/vue.php:211
|
2195 |
+
msgid "There is an issue with your Google Account authentication. Please use the button below to fix it by re-authenticating."
|
2196 |
+
msgstr ""
|
2197 |
+
|
2198 |
+
#: languages/vue.php:214
|
2199 |
+
#: languages/vue.php:2176
|
2200 |
+
msgid "Reconnect ExactMetrics"
|
2201 |
+
msgstr ""
|
2202 |
+
|
2203 |
+
#: languages/vue.php:218
|
2204 |
+
msgid "Re-Authenticating"
|
2205 |
+
msgstr ""
|
2206 |
+
|
2207 |
+
#: languages/vue.php:221
|
2208 |
+
msgid "Ok"
|
2209 |
+
msgstr ""
|
2210 |
+
|
2211 |
+
#: languages/vue.php:224
|
2212 |
+
msgid "You must connect with ExactMetrics before you can view reports."
|
2213 |
+
msgstr ""
|
2214 |
+
|
2215 |
+
#: languages/vue.php:227
|
2216 |
+
msgid "ExactMetrics makes it \"effortless\" for you to connect your site with Google Analytics and see reports right here in the WordPress dashboard."
|
2217 |
+
msgstr ""
|
2218 |
+
|
2219 |
+
#: languages/vue.php:230
|
2220 |
+
msgid "Launch Setup Wizard"
|
2221 |
+
msgstr ""
|
2222 |
+
|
2223 |
+
#: languages/vue.php:233
|
2224 |
+
msgid "Please ask your webmaster to connect ExactMetrics to Google Analytics."
|
2225 |
+
msgstr ""
|
2226 |
+
|
2227 |
+
#: languages/vue.php:239
|
2228 |
+
msgid "Save Changes"
|
2229 |
+
msgstr ""
|
2230 |
+
|
2231 |
+
#. Translators: Adds a link to documentation.
|
2232 |
+
#: languages/vue.php:243
|
2233 |
+
msgid "In order for the ExactMetrics Google AMP addon to work properly, please ask your webmaster to install the WordPress AMP plugin by Automattic. %1$sLearn More%2$s"
|
2234 |
+
msgstr ""
|
2235 |
+
|
2236 |
+
#. Translators: Adds link to activate/install plugin and documentation.
|
2237 |
+
#: languages/vue.php:247
|
2238 |
+
msgid "In order for the ExactMetrics Google AMP addon to work properly, you need to install the WordPress AMP plugin by Automattic. %1$s%2$s Plugin%3$s | %4$sLearn More%5$s"
|
2239 |
+
msgstr ""
|
2240 |
+
|
2241 |
+
#: languages/vue.php:251
|
2242 |
+
msgid "Activate"
|
2243 |
+
msgstr ""
|
2244 |
+
|
2245 |
+
#: languages/vue.php:255
|
2246 |
+
msgid "Install"
|
2247 |
+
msgstr ""
|
2248 |
+
|
2249 |
+
#. Translators: Adds a link to documentation.
|
2250 |
+
#: languages/vue.php:259
|
2251 |
+
msgid "In order for the ExactMetrics Instant Articles addon to work properly, please ask your webmaster to install the Instant Articles for WP plugin by Automattic version 3.3.5 or newer. %1$sLearn More%2$s"
|
2252 |
+
msgstr ""
|
2253 |
+
|
2254 |
+
#. Translators: Adds link to activate/install plugin and documentation.
|
2255 |
+
#: languages/vue.php:263
|
2256 |
+
msgid "In order for the ExactMetrics Instant Articles addon to work properly, you need to install the Instant Articles for WP plugin by Automattic version 3.3.5 or newer. %1$s%2$s Plugin%3$s | %4$sLearn More%5$s"
|
2257 |
+
msgstr ""
|
2258 |
+
|
2259 |
+
#: languages/vue.php:266
|
2260 |
+
#: languages/vue.php:951
|
2261 |
+
msgid "ExactMetrics Addons"
|
2262 |
+
msgstr ""
|
2263 |
+
|
2264 |
+
#: languages/vue.php:269
|
2265 |
+
msgid "Search Addons"
|
2266 |
+
msgstr ""
|
2267 |
+
|
2268 |
+
#. Translators: Number of days.
|
2269 |
+
#: languages/vue.php:273
|
2270 |
+
msgid "Last %s days"
|
2271 |
+
msgstr ""
|
2272 |
+
|
2273 |
+
#. Translators: Placeholder is replaced with WPForms.
|
2274 |
+
#: languages/vue.php:277
|
2275 |
+
msgid "Recommended Plugin: %s"
|
2276 |
+
msgstr ""
|
2277 |
+
|
2278 |
+
#: languages/vue.php:283
|
2279 |
+
msgid "See Quick Links"
|
2280 |
+
msgstr ""
|
2281 |
+
|
2282 |
+
#: languages/vue.php:286
|
2283 |
+
msgid "Suggest a Feature"
|
2284 |
+
msgstr ""
|
2285 |
+
|
2286 |
+
#: languages/vue.php:289
|
2287 |
+
msgid "Join Our Community"
|
2288 |
+
msgstr ""
|
2289 |
+
|
2290 |
+
#: languages/vue.php:292
|
2291 |
+
msgid "Support & Docs"
|
2292 |
+
msgstr ""
|
2293 |
+
|
2294 |
+
#: languages/vue.php:295
|
2295 |
+
msgid "Upgrade to Pro »"
|
2296 |
+
msgstr ""
|
2297 |
+
|
2298 |
+
#: languages/vue.php:298
|
2299 |
+
msgid "Analytics"
|
2300 |
+
msgstr ""
|
2301 |
+
|
2302 |
+
#. Translators: Adds an arrow icon.
|
2303 |
+
#: languages/vue.php:302
|
2304 |
+
msgid "View All Reports %s"
|
2305 |
+
msgstr ""
|
2306 |
+
|
2307 |
+
#: languages/vue.php:316
|
2308 |
+
msgid "Pro Plan"
|
2309 |
+
msgstr ""
|
2310 |
+
|
2311 |
+
#: languages/vue.php:320
|
2312 |
+
msgid "per year"
|
2313 |
+
msgstr ""
|
2314 |
+
|
2315 |
+
#: languages/vue.php:332
|
2316 |
+
msgid "Upgrade to PRO"
|
2317 |
+
msgstr ""
|
2318 |
+
|
2319 |
+
#: languages/vue.php:336
|
2320 |
+
msgid "eCommerce Tracking"
|
2321 |
+
msgstr ""
|
2322 |
+
|
2323 |
+
#: languages/vue.php:341
|
2324 |
+
msgid "Custom Dimensions"
|
2325 |
+
msgstr ""
|
2326 |
+
|
2327 |
+
#: languages/vue.php:345
|
2328 |
+
msgid "Form Tracking"
|
2329 |
+
msgstr ""
|
2330 |
+
|
2331 |
+
#: languages/vue.php:349
|
2332 |
+
msgid "AMP Support"
|
2333 |
+
msgstr ""
|
2334 |
+
|
2335 |
+
#: languages/vue.php:353
|
2336 |
+
msgid "Author Tracking"
|
2337 |
+
msgstr ""
|
2338 |
+
|
2339 |
+
#: languages/vue.php:357
|
2340 |
+
msgid "EU Compliance Addon"
|
2341 |
+
msgstr ""
|
2342 |
+
|
2343 |
+
#: languages/vue.php:361
|
2344 |
+
msgid "Real Time Report"
|
2345 |
+
msgstr ""
|
2346 |
+
|
2347 |
+
#: languages/vue.php:366
|
2348 |
+
msgid "Google Optimize"
|
2349 |
+
msgstr ""
|
2350 |
+
|
2351 |
+
#: languages/vue.php:370
|
2352 |
+
msgid "Custom Date Ranges"
|
2353 |
+
msgstr ""
|
2354 |
+
|
2355 |
+
#: languages/vue.php:374
|
2356 |
+
msgid "This is absolutely, positively, one of the TOP plugins to install on your WP site. There is no better way to quickly gauge traffic for spikes, surges, and consistency. I installed this on over a dozen WordPress installations and counting, thank you for an outstanding app!"
|
2357 |
+
msgstr ""
|
2358 |
+
|
2359 |
+
#: languages/vue.php:378
|
2360 |
+
msgid "Daniel Monaghan - Experienced"
|
2361 |
+
msgstr ""
|
2362 |
+
|
2363 |
+
#: languages/vue.php:382
|
2364 |
+
msgid "Very simple to configure and the results are very clearly displayed. So much easier for clients to view than in their own analytics account! Delighted with it."
|
2365 |
+
msgstr ""
|
2366 |
+
|
2367 |
+
#: languages/vue.php:386
|
2368 |
+
msgid "Naomi Spirit - From This Day"
|
2369 |
+
msgstr ""
|
2370 |
+
|
2371 |
+
#: languages/vue.php:390
|
2372 |
+
msgid "Love this plugin! It’s got powerful customization options, it’s easy to use, there’s good documentation, and if all that’s not enough, ExactMetrics is quick to provide support. Thanks for this wonderful plugin!"
|
2373 |
+
msgstr ""
|
2374 |
+
|
2375 |
+
#: languages/vue.php:394
|
2376 |
+
msgid "Julie Dupuis - Faraway Land Travel"
|
2377 |
+
msgstr ""
|
2378 |
+
|
2379 |
+
#: languages/vue.php:406
|
2380 |
+
msgid "Welcome to the all-new ExactMetrics"
|
2381 |
+
msgstr ""
|
2382 |
+
|
2383 |
+
#: languages/vue.php:409
|
2384 |
+
msgid "Redesigned from the ground up, ExactMetrics is built to bring a world-class analytics and reporting experience to WordPress."
|
2385 |
+
msgstr ""
|
2386 |
+
|
2387 |
+
#: languages/vue.php:412
|
2388 |
+
msgid "The New & Improved ExactMetrics includes:"
|
2389 |
+
msgstr ""
|
2390 |
+
|
2391 |
+
#: languages/vue.php:415
|
2392 |
+
msgid "All-New Design"
|
2393 |
+
msgstr ""
|
2394 |
+
|
2395 |
+
#: languages/vue.php:418
|
2396 |
+
msgid "Better Reporting"
|
2397 |
+
msgstr ""
|
2398 |
+
|
2399 |
+
#: languages/vue.php:421
|
2400 |
+
msgid "Better Tracking"
|
2401 |
+
msgstr ""
|
2402 |
+
|
2403 |
+
#: languages/vue.php:424
|
2404 |
+
msgid "Better Support"
|
2405 |
+
msgstr ""
|
2406 |
+
|
2407 |
+
#: languages/vue.php:427
|
2408 |
+
msgid "Continue"
|
2409 |
+
msgstr ""
|
2410 |
+
|
2411 |
+
#: languages/vue.php:430
|
2412 |
+
msgid "Your settings have been automatically transferred."
|
2413 |
+
msgstr ""
|
2414 |
+
|
2415 |
+
#: languages/vue.php:434
|
2416 |
+
msgid "Ecommerce"
|
2417 |
+
msgstr ""
|
2418 |
+
|
2419 |
+
#. Translators: Add line break.
|
2420 |
+
#: languages/vue.php:438
|
2421 |
+
msgid "See All Your Important Store%s Metrics in One Place"
|
2422 |
+
msgstr ""
|
2423 |
+
|
2424 |
+
#: languages/vue.php:441
|
2425 |
+
msgid "Get an Answer to All Your Top Ecommerce Questions From a Single Report"
|
2426 |
+
msgstr ""
|
2427 |
+
|
2428 |
+
#: languages/vue.php:444
|
2429 |
+
msgid "Here's what you get:"
|
2430 |
+
msgstr ""
|
2431 |
+
|
2432 |
+
#: languages/vue.php:447
|
2433 |
+
msgid "See Your Conversion Rate to Improve Funnel"
|
2434 |
+
msgstr ""
|
2435 |
+
|
2436 |
+
#: languages/vue.php:450
|
2437 |
+
msgid "See The Number of Transactions and Make Data-Driven Decisions"
|
2438 |
+
msgstr ""
|
2439 |
+
|
2440 |
+
#: languages/vue.php:453
|
2441 |
+
msgid "See The Total Revenue to Track Growth"
|
2442 |
+
msgstr ""
|
2443 |
+
|
2444 |
+
#: languages/vue.php:456
|
2445 |
+
msgid "See Average Order Value to Find Offer Opportunities"
|
2446 |
+
msgstr ""
|
2447 |
+
|
2448 |
+
#: languages/vue.php:459
|
2449 |
+
msgid "See Your Top Products to See Individual Performance"
|
2450 |
+
msgstr ""
|
2451 |
+
|
2452 |
+
#: languages/vue.php:462
|
2453 |
+
msgid "See your Top Conversion Sources and Focus on what's Working"
|
2454 |
+
msgstr ""
|
2455 |
+
|
2456 |
+
#: languages/vue.php:465
|
2457 |
+
msgid "See The Time it Takes for Customers to Purchase"
|
2458 |
+
msgstr ""
|
2459 |
+
|
2460 |
+
#: languages/vue.php:468
|
2461 |
+
msgid "See How Many Sessions are Needed for a Purchase"
|
2462 |
+
msgstr ""
|
2463 |
+
|
2464 |
+
#. Translators: Example path (/go/).
|
2465 |
+
#: languages/vue.php:473
|
2466 |
+
msgid "Path (example: %s)"
|
2467 |
+
msgstr ""
|
2468 |
+
|
2469 |
+
#: languages/vue.php:477
|
2470 |
+
msgid "Path has to start with a / and have no spaces"
|
2471 |
+
msgstr ""
|
2472 |
+
|
2473 |
+
#. Translators: Example label (aff).
|
2474 |
+
#: languages/vue.php:482
|
2475 |
+
msgid "Label (example: %s)"
|
2476 |
+
msgstr ""
|
2477 |
+
|
2478 |
+
#: languages/vue.php:486
|
2479 |
+
msgid "Label can't contain any spaces"
|
2480 |
+
msgstr ""
|
2481 |
+
|
2482 |
+
#: languages/vue.php:489
|
2483 |
+
msgid "Affiliate Links"
|
2484 |
+
msgstr ""
|
2485 |
+
|
2486 |
+
#. Translators: Add links to documentation.
|
2487 |
+
#: languages/vue.php:493
|
2488 |
+
msgid "This allows you to track custom affiliate links. A path of /go/ would match urls that start with that. The label is appended onto the end of the string \"outbound-link-\", to provide unique labels for these links in Google Analytics. Complete documentation on affiliate links is available %1$shere%2$s."
|
2489 |
+
msgstr ""
|
2490 |
+
|
2491 |
+
#: languages/vue.php:496
|
2492 |
+
msgid "Our affiliate link tracking works by setting path for internal links to track as outbound links."
|
2493 |
+
msgstr ""
|
2494 |
+
|
2495 |
+
#: languages/vue.php:499
|
2496 |
+
msgid "Connect ExactMetrics to Your Website"
|
2497 |
+
msgstr ""
|
2498 |
+
|
2499 |
+
#: languages/vue.php:502
|
2500 |
+
msgid "ExactMetrics connects Google Analytics to WordPress and shows you stats that matter."
|
2501 |
+
msgstr ""
|
2502 |
+
|
2503 |
+
#: languages/vue.php:506
|
2504 |
+
msgid "Connect Google Analytics + WordPress"
|
2505 |
+
msgstr ""
|
2506 |
+
|
2507 |
+
#: languages/vue.php:510
|
2508 |
+
msgid "You will be taken to the ExactMetrics website where you'll need to connect your Analytics account."
|
2509 |
+
msgstr ""
|
2510 |
+
|
2511 |
+
#: languages/vue.php:513
|
2512 |
+
msgid "Whoops, something went wrong and we weren't able to connect to ExactMetrics. Please enter your Google UA code manually."
|
2513 |
+
msgstr ""
|
2514 |
+
|
2515 |
+
#: languages/vue.php:516
|
2516 |
+
msgid "Manually enter your UA code"
|
2517 |
+
msgstr ""
|
2518 |
+
|
2519 |
+
#: languages/vue.php:519
|
2520 |
+
msgid "Warning: If you use a manual UA code, you won't be able to use any of the reporting and some of the tracking features. Your UA code should look like UA-XXXXXX-XX where the X's are numbers."
|
2521 |
+
msgstr ""
|
2522 |
+
|
2523 |
+
#: languages/vue.php:523
|
2524 |
+
msgid "Save and Continue"
|
2525 |
+
msgstr ""
|
2526 |
+
|
2527 |
+
#: languages/vue.php:526
|
2528 |
+
msgid "UA code can't be empty"
|
2529 |
+
msgstr ""
|
2530 |
+
|
2531 |
+
#: languages/vue.php:529
|
2532 |
+
msgid "Saving UA code..."
|
2533 |
+
msgstr ""
|
2534 |
+
|
2535 |
+
#: languages/vue.php:532
|
2536 |
+
msgid "Cross Domain Tracking"
|
2537 |
+
msgstr ""
|
2538 |
+
|
2539 |
+
#. Translators: Add links to documentation.
|
2540 |
+
#: languages/vue.php:536
|
2541 |
+
msgid "Cross domain tracking makes it possible for Analytics to see sessions on two related sites as a single session. More info on specific setup steps can be found in our %1$sknowledge base%2$s."
|
2542 |
+
msgstr ""
|
2543 |
+
|
2544 |
+
#: languages/vue.php:539
|
2545 |
+
msgid "Demographics"
|
2546 |
+
msgstr ""
|
2547 |
+
|
2548 |
+
#: languages/vue.php:542
|
2549 |
+
msgid "Enable Demographics and Interests Reports for Remarketing and Advertising"
|
2550 |
+
msgstr ""
|
2551 |
+
|
2552 |
+
#: languages/vue.php:545
|
2553 |
+
msgid "Anonymize IP Addresses"
|
2554 |
+
msgstr ""
|
2555 |
+
|
2556 |
+
#: languages/vue.php:548
|
2557 |
+
msgid "Link Attribution"
|
2558 |
+
msgstr ""
|
2559 |
+
|
2560 |
+
#: languages/vue.php:551
|
2561 |
+
msgid "Enable Enhanced Link Attribution"
|
2562 |
+
msgstr ""
|
2563 |
+
|
2564 |
+
#: languages/vue.php:554
|
2565 |
+
msgid "Enable Anchor Tracking"
|
2566 |
+
msgstr ""
|
2567 |
+
|
2568 |
+
#: languages/vue.php:557
|
2569 |
+
msgid "Enable allowAnchor"
|
2570 |
+
msgstr ""
|
2571 |
+
|
2572 |
+
#: languages/vue.php:560
|
2573 |
+
msgid "Enable allowLinker"
|
2574 |
+
msgstr ""
|
2575 |
+
|
2576 |
+
#: languages/vue.php:563
|
2577 |
+
msgid "Enable Tag Links in RSS"
|
2578 |
+
msgstr ""
|
2579 |
+
|
2580 |
+
#: languages/vue.php:566
|
2581 |
+
msgid "File Downloads"
|
2582 |
+
msgstr ""
|
2583 |
+
|
2584 |
+
#: languages/vue.php:569
|
2585 |
+
msgid "Extensions of Files to Track as Downloads"
|
2586 |
+
msgstr ""
|
2587 |
+
|
2588 |
+
#: languages/vue.php:572
|
2589 |
+
msgid "ExactMetrics will send an event to Google Analytics if a link to a file has one of the above extensions."
|
2590 |
+
msgstr ""
|
2591 |
+
|
2592 |
+
#. Translators: Add links to documentation.
|
2593 |
+
#: languages/vue.php:576
|
2594 |
+
msgid "Enable this setting to add the Demographics and Remarketing features to your Google Analytics tracking code. Make sure to enable Demographics and Remarketing in your Google Analytics account. We have a guide for how to do that in our %1$sknowledge base%2$s. For more information about Remarketing, we refer you to %3$sGoogle's documentation%4$s. Note that usage of this function is affected by privacy and cookie laws around the world. Be sure to follow the laws that affect your target audience."
|
2595 |
+
msgstr ""
|
2596 |
+
|
2597 |
+
#. Translators: Add links to documentation.
|
2598 |
+
#: languages/vue.php:580
|
2599 |
+
msgid "This adds %1$sanonymizeIp%2$s, telling Google Analytics to anonymize the information sent by the tracker objects by removing the last octet of the IP address prior to its storage."
|
2600 |
+
msgstr ""
|
2601 |
+
|
2602 |
+
#. Translators: Add links to documentation.
|
2603 |
+
#: languages/vue.php:584
|
2604 |
+
msgid "Add %1$sEnhanced Link Attribution%2$s to your tracking code."
|
2605 |
+
msgstr ""
|
2606 |
+
|
2607 |
+
#: languages/vue.php:587
|
2608 |
+
msgid "Many WordPress \"1-page\" style themes rely on anchor tags for navigation to show virtual pages. The problem is that to Google Analytics, these are all just a single page, and it makes it hard to get meaningful statistics about pages viewed. This feature allows proper tracking in those themes."
|
2609 |
+
msgstr ""
|
2610 |
+
|
2611 |
+
#. Translators: Add links to documentation.
|
2612 |
+
#: languages/vue.php:591
|
2613 |
+
msgid "This adds %1$sallowAnchor%2$s to the create command of the pageview hit tracking code, and makes RSS link tagging use a # as well."
|
2614 |
+
msgstr ""
|
2615 |
+
|
2616 |
+
#. Translators: Add links to documentation.
|
2617 |
+
#: languages/vue.php:595
|
2618 |
+
msgid "Enabling %1$scross-domain tracking (additional setup required)%2$s allows you to track users across multiple properties you own (such as example-1.com and example-2.com as a single session. It also allows you fix an issue so that when a user has to go to an off-site hosted payment gateway to finish a purchase it doesn't count it as referral traffic from that gateway but maintains the visit as part of the same session.) It is required that the other site includes a Google Analytics tracker with the same UA Code."
|
2619 |
+
msgstr ""
|
2620 |
+
|
2621 |
+
#. Translators: Add links to documentation.
|
2622 |
+
#: languages/vue.php:599
|
2623 |
+
msgid "Do not use this feature if you use FeedBurner, as FeedBurner can do this automatically and better than this plugin can. Check this %1$shelp page%2$s for info on how to enable this feature in FeedBurner."
|
2624 |
+
msgstr ""
|
2625 |
+
|
2626 |
+
#: languages/vue.php:602
|
2627 |
+
msgid "Add domain"
|
2628 |
+
msgstr ""
|
2629 |
+
|
2630 |
+
#. Translators: Domain name example.
|
2631 |
+
#: languages/vue.php:606
|
2632 |
+
msgid "Domain (example: %s)"
|
2633 |
+
msgstr ""
|
2634 |
+
|
2635 |
+
#. Translators: Current domain name that should not be used.
|
2636 |
+
#: languages/vue.php:610
|
2637 |
+
msgid "Please enter domain names only ( example: example.com not http://example.com ) and not current site domain ( %s )."
|
2638 |
+
msgstr ""
|
2639 |
+
|
2640 |
+
#: languages/vue.php:613
|
2641 |
+
msgid "Time to Purchase"
|
2642 |
+
msgstr ""
|
2643 |
+
|
2644 |
+
#: languages/vue.php:616
|
2645 |
+
msgid "This list shows how many days from first visit it took users to purchase products from your site."
|
2646 |
+
msgstr ""
|
2647 |
+
|
2648 |
+
#: languages/vue.php:619
|
2649 |
+
msgid "Sessions to Purchase"
|
2650 |
+
msgstr ""
|
2651 |
+
|
2652 |
+
#: languages/vue.php:622
|
2653 |
+
msgid "This list shows the number of sessions it took users before they purchased a product from your website."
|
2654 |
+
msgstr ""
|
2655 |
+
|
2656 |
+
#: languages/vue.php:626
|
2657 |
+
msgid "Top Posts/Pages"
|
2658 |
+
msgstr ""
|
2659 |
+
|
2660 |
+
#: languages/vue.php:630
|
2661 |
+
msgid "This list shows the most viewed posts and pages on your website."
|
2662 |
+
msgstr ""
|
2663 |
+
|
2664 |
+
#: languages/vue.php:634
|
2665 |
+
msgid "New vs. Returning Visitors"
|
2666 |
+
msgstr ""
|
2667 |
+
|
2668 |
+
#: languages/vue.php:638
|
2669 |
+
msgid "This graph shows what percent of your user sessions come from new versus repeat visitors."
|
2670 |
+
msgstr ""
|
2671 |
+
|
2672 |
+
#: languages/vue.php:642
|
2673 |
+
msgid "Device Breakdown"
|
2674 |
+
msgstr ""
|
2675 |
+
|
2676 |
+
#: languages/vue.php:646
|
2677 |
+
msgid "This graph shows what percent of your visitor sessions are done using a traditional computer or laptop, tablet or mobile device to view your site."
|
2678 |
+
msgstr ""
|
2679 |
+
|
2680 |
+
#: languages/vue.php:649
|
2681 |
+
msgid "Top Landing Pages"
|
2682 |
+
msgstr ""
|
2683 |
+
|
2684 |
+
#: languages/vue.php:652
|
2685 |
+
msgid "This list shows the top pages users first land on when visiting your website."
|
2686 |
+
msgstr ""
|
2687 |
+
|
2688 |
+
#: languages/vue.php:655
|
2689 |
+
msgid "Top Exit Pages"
|
2690 |
+
msgstr ""
|
2691 |
+
|
2692 |
+
#: languages/vue.php:658
|
2693 |
+
msgid "This list shows the top pages users exit your website from."
|
2694 |
+
msgstr ""
|
2695 |
+
|
2696 |
+
#: languages/vue.php:661
|
2697 |
+
msgid "Top Outbound Links"
|
2698 |
+
msgstr ""
|
2699 |
+
|
2700 |
+
#: languages/vue.php:664
|
2701 |
+
msgid "This list shows the top links clicked on your website that go to another website."
|
2702 |
+
msgstr ""
|
2703 |
+
|
2704 |
+
#: languages/vue.php:667
|
2705 |
+
msgid "Top Affiliate Links"
|
2706 |
+
msgstr ""
|
2707 |
+
|
2708 |
+
#: languages/vue.php:670
|
2709 |
+
msgid "This list shows the top affiliate links your visitors clicked on."
|
2710 |
+
msgstr ""
|
2711 |
+
|
2712 |
+
#: languages/vue.php:673
|
2713 |
+
msgid "Top Download Links"
|
2714 |
+
msgstr ""
|
2715 |
+
|
2716 |
+
#: languages/vue.php:676
|
2717 |
+
msgid "This list shows the download links your visitors clicked the most."
|
2718 |
+
msgstr ""
|
2719 |
+
|
2720 |
+
#: languages/vue.php:679
|
2721 |
+
msgid "Top Products"
|
2722 |
+
msgstr ""
|
2723 |
+
|
2724 |
+
#: languages/vue.php:682
|
2725 |
+
msgid "This list shows the top selling products on your website."
|
2726 |
+
msgstr ""
|
2727 |
+
|
2728 |
+
#: languages/vue.php:685
|
2729 |
+
msgid "Top Conversion Sources"
|
2730 |
+
msgstr ""
|
2731 |
+
|
2732 |
+
#: languages/vue.php:688
|
2733 |
+
msgid "This list shows the top referral websites in terms of product revenue."
|
2734 |
+
msgstr ""
|
2735 |
+
|
2736 |
+
#: languages/vue.php:691
|
2737 |
+
msgid "Total Add/Remove"
|
2738 |
+
msgstr ""
|
2739 |
+
|
2740 |
+
#: languages/vue.php:694
|
2741 |
+
msgid "Forms Report"
|
2742 |
+
msgstr ""
|
2743 |
+
|
2744 |
+
#: languages/vue.php:697
|
2745 |
+
msgid "See Reports for Any Contact Form Plugin or Sign-up Form"
|
2746 |
+
msgstr ""
|
2747 |
+
|
2748 |
+
#: languages/vue.php:700
|
2749 |
+
msgid "See Your Top Converting Forms and Optimize"
|
2750 |
+
msgstr ""
|
2751 |
+
|
2752 |
+
#: languages/vue.php:703
|
2753 |
+
msgid "See Your Forms Impressions Count to Find the Best Placement"
|
2754 |
+
msgstr ""
|
2755 |
+
|
2756 |
+
#: languages/vue.php:706
|
2757 |
+
msgid "Real-Time Report"
|
2758 |
+
msgstr ""
|
2759 |
+
|
2760 |
+
#: languages/vue.php:709
|
2761 |
+
msgid "Track the results of your marketing efforts and product launches as-it-happens right from your WordPress site. The Real-Time report allows you to view your traffic sources and visitor's activity when you need it."
|
2762 |
+
msgstr ""
|
2763 |
+
|
2764 |
+
#: languages/vue.php:712
|
2765 |
+
msgid "See Your Active Visitors and Track Their Behaviour to Optimize"
|
2766 |
+
msgstr ""
|
2767 |
+
|
2768 |
+
#: languages/vue.php:715
|
2769 |
+
msgid "See Your Top Pages Immediately After Making Changes"
|
2770 |
+
msgstr ""
|
2771 |
+
|
2772 |
+
#: languages/vue.php:718
|
2773 |
+
msgid "See Your Top Referral Sources and Adapt Faster"
|
2774 |
+
msgstr ""
|
2775 |
+
|
2776 |
+
#: languages/vue.php:721
|
2777 |
+
msgid "See Your Traffic Demographics"
|
2778 |
+
msgstr ""
|
2779 |
+
|
2780 |
+
#: languages/vue.php:724
|
2781 |
+
msgid "Get Fresh Reports Data Every 60 Seconds"
|
2782 |
+
msgstr ""
|
2783 |
+
|
2784 |
+
#: languages/vue.php:727
|
2785 |
+
msgid "See Where Your Visitors are Connecting From (country & city)"
|
2786 |
+
msgstr ""
|
2787 |
+
|
2788 |
+
#: languages/vue.php:730
|
2789 |
+
msgid "Search Console Report"
|
2790 |
+
msgstr ""
|
2791 |
+
|
2792 |
+
#: languages/vue.php:733
|
2793 |
+
msgid "See exactly how people find tour website, which keywords they searched for, how many times the results were viewed, and more."
|
2794 |
+
msgstr ""
|
2795 |
+
|
2796 |
+
#: languages/vue.php:736
|
2797 |
+
msgid "See Your Top Google Search Terms and Optimize Content"
|
2798 |
+
msgstr ""
|
2799 |
+
|
2800 |
+
#: languages/vue.php:739
|
2801 |
+
msgid "See The Number of Clicks and Track Interests"
|
2802 |
+
msgstr ""
|
2803 |
+
|
2804 |
+
#: languages/vue.php:742
|
2805 |
+
msgid "See The Click-Through-Ratio and Improve SEO"
|
2806 |
+
msgstr ""
|
2807 |
+
|
2808 |
+
#: languages/vue.php:745
|
2809 |
+
msgid "See The Average Results Position and Focus on what works."
|
2810 |
+
msgstr ""
|
2811 |
+
|
2812 |
+
#: languages/vue.php:748
|
2813 |
+
msgid "Recommended Settings"
|
2814 |
+
msgstr ""
|
2815 |
+
|
2816 |
+
#: languages/vue.php:751
|
2817 |
+
msgid "ExactMetrics recommends the following settings based on your configuration."
|
2818 |
+
msgstr ""
|
2819 |
+
|
2820 |
+
#: languages/vue.php:754
|
2821 |
+
msgid "Events Tracking"
|
2822 |
+
msgstr ""
|
2823 |
+
|
2824 |
+
#: languages/vue.php:757
|
2825 |
+
msgid "Must have for all click tracking on site."
|
2826 |
+
msgstr ""
|
2827 |
+
|
2828 |
+
#: languages/vue.php:760
|
2829 |
+
msgid "ExactMetrics uses an advanced system to automatically detect all outbound links, download links, affiliate links, telephone links, mail links, and more automatically. We do all the work for you so you don't have to write any code."
|
2830 |
+
msgstr ""
|
2831 |
+
|
2832 |
+
#: languages/vue.php:763
|
2833 |
+
msgid "Enhanced Link Attribution"
|
2834 |
+
msgstr ""
|
2835 |
+
|
2836 |
+
#: languages/vue.php:766
|
2837 |
+
msgid "Improves the accuracy of your In-Page Analytics."
|
2838 |
+
msgstr ""
|
2839 |
+
|
2840 |
+
#: languages/vue.php:769
|
2841 |
+
msgid "ExactMetrics will automatically help Google determine which links are unique and where they are on your site so that your In-Page Analytics reporting will be more accurate."
|
2842 |
+
msgstr ""
|
2843 |
+
|
2844 |
+
#: languages/vue.php:772
|
2845 |
+
msgid "Install Updates Automatically"
|
2846 |
+
msgstr ""
|
2847 |
+
|
2848 |
+
#: languages/vue.php:775
|
2849 |
+
msgid "Get the latest features, bug fixes, and security updates as they are released."
|
2850 |
+
msgstr ""
|
2851 |
+
|
2852 |
+
#: languages/vue.php:778
|
2853 |
+
msgid "To ensure you get the latest bugfixes and security updates and avoid needing to spend time logging into your WordPress site to update ExactMetrics, we offer the ability to automatically have ExactMetrics update itself."
|
2854 |
+
msgstr ""
|
2855 |
+
|
2856 |
+
#: languages/vue.php:781
|
2857 |
+
msgid "File Download Tracking"
|
2858 |
+
msgstr ""
|
2859 |
+
|
2860 |
+
#: languages/vue.php:784
|
2861 |
+
msgid "Helps you see file downloads data."
|
2862 |
+
msgstr ""
|
2863 |
+
|
2864 |
+
#: languages/vue.php:787
|
2865 |
+
msgid "ExactMetrics will automatically track downloads of common file types from links you have inserted onto your website. For example: want to know how many of your site's visitors have downloaded a PDF or other file you offer your visitors to download on your site? ExactMetrics makes this both easy, and code-free! You can customize the file types to track at any time from our settings panel."
|
2866 |
+
msgstr ""
|
2867 |
+
|
2868 |
+
#: languages/vue.php:790
|
2869 |
+
msgid "Helps you increase affiliate revenue."
|
2870 |
+
msgstr ""
|
2871 |
+
|
2872 |
+
#: languages/vue.php:793
|
2873 |
+
msgid "ExactMetrics will automatically help you track affiliate links that use internal looking urls like example.com/go/ or example.com/refer/. You can add custom affiliate patterns on our settings panel when you finish the onboarding wizard."
|
2874 |
+
msgstr ""
|
2875 |
+
|
2876 |
+
#: languages/vue.php:796
|
2877 |
+
msgid "Affiliate Link Tracking"
|
2878 |
+
msgstr ""
|
2879 |
+
|
2880 |
+
#: languages/vue.php:799
|
2881 |
+
msgid "Who Can See Reports"
|
2882 |
+
msgstr ""
|
2883 |
+
|
2884 |
+
#: languages/vue.php:802
|
2885 |
+
msgid "These user roles will be able to access ExactMetrics's reports in the WordPress admin area."
|
2886 |
+
msgstr ""
|
2887 |
+
|
2888 |
+
#: languages/vue.php:806
|
2889 |
+
msgid "Users that have at least one of these roles will be able to view the reports, along with any user with the manage_options capability."
|
2890 |
+
msgstr ""
|
2891 |
+
|
2892 |
+
#: languages/vue.php:809
|
2893 |
+
msgid "Save and continue"
|
2894 |
+
msgstr ""
|
2895 |
+
|
2896 |
+
#: languages/vue.php:812
|
2897 |
+
msgid "Events Tracking is enabled the moment you set up ExactMetrics"
|
2898 |
+
msgstr ""
|
2899 |
+
|
2900 |
+
#: languages/vue.php:815
|
2901 |
+
msgid "Enhanced Link Attribution is enabled the moment you set up ExactMetrics"
|
2902 |
+
msgstr ""
|
2903 |
+
|
2904 |
+
#: languages/vue.php:819
|
2905 |
+
msgid "+ Add Role"
|
2906 |
+
msgstr ""
|
2907 |
+
|
2908 |
+
#: languages/vue.php:822
|
2909 |
+
msgid "Unlock the Publisher Report and Focus on the Content That Matters"
|
2910 |
+
msgstr ""
|
2911 |
+
|
2912 |
+
#: languages/vue.php:825
|
2913 |
+
msgid "See Your Top Landing Pages to Improve Engagement"
|
2914 |
+
msgstr ""
|
2915 |
+
|
2916 |
+
#: languages/vue.php:828
|
2917 |
+
msgid "See Your Top Exit Pages to Reduce Abandonment"
|
2918 |
+
msgstr ""
|
2919 |
+
|
2920 |
+
#: languages/vue.php:831
|
2921 |
+
msgid "See Your Top Outbound Links to Find New Revenue Opportunities"
|
2922 |
+
msgstr ""
|
2923 |
+
|
2924 |
+
#: languages/vue.php:834
|
2925 |
+
msgid "See Your Top Affiliate Links and Focus on what’s working"
|
2926 |
+
msgstr ""
|
2927 |
+
|
2928 |
+
#: languages/vue.php:837
|
2929 |
+
msgid "See Your Top Downloads and Improve Conversions"
|
2930 |
+
msgstr ""
|
2931 |
+
|
2932 |
+
#: languages/vue.php:840
|
2933 |
+
msgid "See Audience Demographic Report (Age / Gender / Interests)"
|
2934 |
+
msgstr ""
|
2935 |
+
|
2936 |
+
#: languages/vue.php:843
|
2937 |
+
msgid "Ecommerce Report"
|
2938 |
+
msgstr ""
|
2939 |
+
|
2940 |
+
#: languages/vue.php:846
|
2941 |
+
msgid "Increase your sales & revenue with insights. ExactMetrics answers all your top eCommerce questions using metrics like total revenue, conversion rate, average order value top products, top referral sources and more."
|
2942 |
+
msgstr ""
|
2943 |
+
|
2944 |
+
#: languages/vue.php:849
|
2945 |
+
msgid "See Your Top Conversion Sources and Focus on what's Working"
|
2946 |
+
msgstr ""
|
2947 |
+
|
2948 |
+
#: languages/vue.php:852
|
2949 |
+
msgid "New"
|
2950 |
+
msgstr ""
|
2951 |
+
|
2952 |
+
#: languages/vue.php:855
|
2953 |
+
msgid "Returning"
|
2954 |
+
msgstr ""
|
2955 |
+
|
2956 |
+
#: languages/vue.php:858
|
2957 |
+
msgid "Desktop"
|
2958 |
+
msgstr ""
|
2959 |
+
|
2960 |
+
#: languages/vue.php:861
|
2961 |
+
msgid "Tablet"
|
2962 |
+
msgstr ""
|
2963 |
+
|
2964 |
+
#: languages/vue.php:864
|
2965 |
+
msgid "Mobile"
|
2966 |
+
msgstr ""
|
2967 |
+
|
2968 |
+
#: languages/vue.php:868
|
2969 |
+
msgid "Sessions"
|
2970 |
+
msgstr ""
|
2971 |
+
|
2972 |
+
#: languages/vue.php:872
|
2973 |
+
msgid "Pageviews"
|
2974 |
+
msgstr ""
|
2975 |
+
|
2976 |
+
#: languages/vue.php:875
|
2977 |
+
msgid "Avg. Session Duration"
|
2978 |
+
msgstr ""
|
2979 |
+
|
2980 |
+
#: languages/vue.php:879
|
2981 |
+
msgid "Bounce Rate"
|
2982 |
+
msgstr ""
|
2983 |
+
|
2984 |
+
#: languages/vue.php:882
|
2985 |
+
msgid "Top 10 Countries"
|
2986 |
+
msgstr ""
|
2987 |
+
|
2988 |
+
#: languages/vue.php:885
|
2989 |
+
msgid "View Countries Report"
|
2990 |
+
msgstr ""
|
2991 |
+
|
2992 |
+
#: languages/vue.php:888
|
2993 |
+
msgid "Top 10 Referrals"
|
2994 |
+
msgstr ""
|
2995 |
+
|
2996 |
+
#: languages/vue.php:891
|
2997 |
+
msgid "View All Referral Sources"
|
2998 |
+
msgstr ""
|
2999 |
+
|
3000 |
+
#: languages/vue.php:894
|
3001 |
+
msgid "View Full Posts/Pages Report"
|
3002 |
+
msgstr ""
|
3003 |
+
|
3004 |
+
#: languages/vue.php:897
|
3005 |
+
msgid "A session is the browsing session of a single user to your site."
|
3006 |
+
msgstr ""
|
3007 |
+
|
3008 |
+
#: languages/vue.php:900
|
3009 |
+
msgid "A pageview is defined as a view of a page on your site that is being tracked by the Analytics tracking code. Each refresh of a page is also a new pageview."
|
3010 |
+
msgstr ""
|
3011 |
+
|
3012 |
+
#: languages/vue.php:903
|
3013 |
+
msgid "Total duration of all sessions (in seconds) / number of sessions."
|
3014 |
+
msgstr ""
|
3015 |
+
|
3016 |
+
#: languages/vue.php:906
|
3017 |
+
msgid "Percentage of single-page visits (or web sessions). It is the number of visits in which a person leaves your website from the landing page without browsing any further."
|
3018 |
+
msgstr ""
|
3019 |
+
|
3020 |
+
#: languages/vue.php:909
|
3021 |
+
msgid "This list shows the top countries your website visitors are from."
|
3022 |
+
msgstr ""
|
3023 |
+
|
3024 |
+
#: languages/vue.php:912
|
3025 |
+
msgid "This list shows the top websites that send your website traffic, known as referral traffic."
|
3026 |
+
msgstr ""
|
3027 |
+
|
3028 |
+
#: languages/vue.php:915
|
3029 |
+
msgid "Custom Dimensions Report"
|
3030 |
+
msgstr ""
|
3031 |
+
|
3032 |
+
#: languages/vue.php:918
|
3033 |
+
msgid "Unlock the Dimensions Report and decide what data is important using your own custom tracking parameters"
|
3034 |
+
msgstr ""
|
3035 |
+
|
3036 |
+
#: languages/vue.php:921
|
3037 |
+
msgid "The Dimensions report allows you to easily see what's working right inside your WordPress dashboard."
|
3038 |
+
msgstr ""
|
3039 |
+
|
3040 |
+
#: languages/vue.php:924
|
3041 |
+
msgid "Author tracking to see which author’s posts generate the most traffic"
|
3042 |
+
msgstr ""
|
3043 |
+
|
3044 |
+
#: languages/vue.php:927
|
3045 |
+
msgid "Post Type tracking to see which WordPress post types perform better"
|
3046 |
+
msgstr ""
|
3047 |
+
|
3048 |
+
#: languages/vue.php:930
|
3049 |
+
msgid "Category tracking to see which sections of your sites are the most popular"
|
3050 |
+
msgstr ""
|
3051 |
+
|
3052 |
+
#: languages/vue.php:933
|
3053 |
+
msgid "SEO score tracking to see which blog SEO scores are the most popular"
|
3054 |
+
msgstr ""
|
3055 |
+
|
3056 |
+
#: languages/vue.php:936
|
3057 |
+
msgid "Focus Keyword tracking to see which of your content is doing well in search engines."
|
3058 |
+
msgstr ""
|
3059 |
+
|
3060 |
+
#: languages/vue.php:939
|
3061 |
+
msgid "Tag tracking to determine which topics are the most engaging to for your website visitors."
|
3062 |
+
msgstr ""
|
3063 |
+
|
3064 |
+
#: languages/vue.php:942
|
3065 |
+
msgid "There was an issue retrieving the addons for this site. Please click on the button below the refresh the addons data."
|
3066 |
+
msgstr ""
|
3067 |
+
|
3068 |
+
#: languages/vue.php:945
|
3069 |
+
msgid "No addons found."
|
3070 |
+
msgstr ""
|
3071 |
+
|
3072 |
+
#: languages/vue.php:948
|
3073 |
+
msgid "Refresh Addons"
|
3074 |
+
msgstr ""
|
3075 |
+
|
3076 |
+
#. Translators: Adds a line break.
|
3077 |
+
#: languages/vue.php:955
|
3078 |
+
msgid "Upgrade to Pro to unlock addons and other great features."
|
3079 |
+
msgstr ""
|
3080 |
+
|
3081 |
+
#: languages/vue.php:958
|
3082 |
+
msgid "As a valued ExactMetrics Lite user you receive 50% off, automaticaly applied at checkout!"
|
3083 |
+
msgstr ""
|
3084 |
+
|
3085 |
+
#: languages/vue.php:961
|
3086 |
+
msgid "Refreshing Addons"
|
3087 |
+
msgstr ""
|
3088 |
+
|
3089 |
+
#: languages/vue.php:964
|
3090 |
+
msgid "One-click Complete eCommerce tracking"
|
3091 |
+
msgstr ""
|
3092 |
+
|
3093 |
+
#: languages/vue.php:967
|
3094 |
+
msgid "Complete eCommerce tracking for WooCommerce, Easy Digital Downloads and MemberPress stores with no code or settings required"
|
3095 |
+
msgstr ""
|
3096 |
+
|
3097 |
+
#: languages/vue.php:970
|
3098 |
+
msgid "Forms Tracking"
|
3099 |
+
msgstr ""
|
3100 |
+
|
3101 |
+
#: languages/vue.php:973
|
3102 |
+
msgid "One-click Form Events Tracking"
|
3103 |
+
msgstr ""
|
3104 |
+
|
3105 |
+
#: languages/vue.php:976
|
3106 |
+
msgid "WPForms, Ninja Forms, Contact Form 7, Gravity Forms and any other WordPress form plugin"
|
3107 |
+
msgstr ""
|
3108 |
+
|
3109 |
+
#: languages/vue.php:979
|
3110 |
+
msgid "WordPress Admin Area Reports"
|
3111 |
+
msgstr ""
|
3112 |
+
|
3113 |
+
#: languages/vue.php:982
|
3114 |
+
msgid "Standard Reports"
|
3115 |
+
msgstr ""
|
3116 |
+
|
3117 |
+
#: languages/vue.php:985
|
3118 |
+
msgid "Overview Reports for the last 30 days."
|
3119 |
+
msgstr ""
|
3120 |
+
|
3121 |
+
#: languages/vue.php:988
|
3122 |
+
msgid "Advanced Reports"
|
3123 |
+
msgstr ""
|
3124 |
+
|
3125 |
+
#: languages/vue.php:991
|
3126 |
+
msgid "Publisher, eCommerce, Search Console, Custom Dimensions, Forms and Real-Time with custom date period selection"
|
3127 |
+
msgstr ""
|
3128 |
+
|
3129 |
+
#: languages/vue.php:994
|
3130 |
+
msgid "Dashboard Widget"
|
3131 |
+
msgstr ""
|
3132 |
+
|
3133 |
+
#: languages/vue.php:997
|
3134 |
+
msgid "Basic Widget"
|
3135 |
+
msgstr ""
|
3136 |
+
|
3137 |
+
#: languages/vue.php:1000
|
3138 |
+
msgid "Overview Report Synopsis"
|
3139 |
+
msgstr ""
|
3140 |
+
|
3141 |
+
#: languages/vue.php:1003
|
3142 |
+
msgid "Advanced Dashboard Widget"
|
3143 |
+
msgstr ""
|
3144 |
+
|
3145 |
+
#: languages/vue.php:1006
|
3146 |
+
msgid "Includes the complete Overview report, Publisher reports and 6 different eCommerce reports"
|
3147 |
+
msgstr ""
|
3148 |
+
|
3149 |
+
#: languages/vue.php:1009
|
3150 |
+
msgid "Publisher Reports"
|
3151 |
+
msgstr ""
|
3152 |
+
|
3153 |
+
#: languages/vue.php:1012
|
3154 |
+
msgid "Advanced Publisher Reports & Tracking"
|
3155 |
+
msgstr ""
|
3156 |
+
|
3157 |
+
#: languages/vue.php:1015
|
3158 |
+
msgid "View Top Landing/Exit Pages, Top Links, Demographics & Interests data and more"
|
3159 |
+
msgstr ""
|
3160 |
+
|
3161 |
+
#: languages/vue.php:1018
|
3162 |
+
msgid "Not Available"
|
3163 |
+
msgstr ""
|
3164 |
+
|
3165 |
+
#: languages/vue.php:1021
|
3166 |
+
msgid "Complete Custom Dimensions Tracking"
|
3167 |
+
msgstr ""
|
3168 |
+
|
3169 |
+
#: languages/vue.php:1024
|
3170 |
+
msgid "Track and measure by the Author, Post Type, Category, Tag, SEO Score, Focus Keyword, Logged-in User, User ID and Published Time of each post and page"
|
3171 |
+
msgstr ""
|
3172 |
+
|
3173 |
+
#: languages/vue.php:1030
|
3174 |
+
msgid "Limited Support"
|
3175 |
+
msgstr ""
|
3176 |
+
|
3177 |
+
#: languages/vue.php:1033
|
3178 |
+
msgid "Priority Support"
|
3179 |
+
msgstr ""
|
3180 |
+
|
3181 |
+
#: languages/vue.php:1036
|
3182 |
+
msgid "Get the most out of ExactMetrics by upgrading to Pro and unlocking all of the powerful features."
|
3183 |
+
msgstr ""
|
3184 |
+
|
3185 |
+
#: languages/vue.php:1039
|
3186 |
+
msgid "Feature"
|
3187 |
+
msgstr ""
|
3188 |
+
|
3189 |
+
#: languages/vue.php:1042
|
3190 |
+
msgid "Lite"
|
3191 |
+
msgstr ""
|
3192 |
+
|
3193 |
+
#: languages/vue.php:1045
|
3194 |
+
msgid "Pro"
|
3195 |
+
msgstr ""
|
3196 |
+
|
3197 |
+
#: languages/vue.php:1048
|
3198 |
+
msgid "Get ExactMetrics Pro Today and Unlock all the Powerful Features"
|
3199 |
+
msgstr ""
|
3200 |
+
|
3201 |
+
#: languages/vue.php:1051
|
3202 |
+
msgid "Bonus: ExactMetrics Lite users get 50% off regular price, automatically applied at checkout."
|
3203 |
+
msgstr ""
|
3204 |
+
|
3205 |
+
#: languages/vue.php:1054
|
3206 |
+
msgid "Upgrade to Pro"
|
3207 |
+
msgstr ""
|
3208 |
+
|
3209 |
+
#: languages/vue.php:1057
|
3210 |
+
msgid "Universal Tracking"
|
3211 |
+
msgstr ""
|
3212 |
+
|
3213 |
+
#: languages/vue.php:1060
|
3214 |
+
msgid "Included"
|
3215 |
+
msgstr ""
|
3216 |
+
|
3217 |
+
#: languages/vue.php:1063
|
3218 |
+
msgid "Custom Google Analytics Link Tracking"
|
3219 |
+
msgstr ""
|
3220 |
+
|
3221 |
+
#: languages/vue.php:1066
|
3222 |
+
msgid "Standard Tracking"
|
3223 |
+
msgstr ""
|
3224 |
+
|
3225 |
+
#: languages/vue.php:1069
|
3226 |
+
msgid "Advanced Tracking"
|
3227 |
+
msgstr ""
|
3228 |
+
|
3229 |
+
#: languages/vue.php:1072
|
3230 |
+
msgid "Automatic tracking of outbound/external, file download, affiliate, email and telephone links and our simple Custom Link Attribution markup for custom link tracking"
|
3231 |
+
msgstr ""
|
3232 |
+
|
3233 |
+
#: languages/vue.php:1075
|
3234 |
+
msgid "Scroll tracking as well as tracking on Google Accelerated Mobile Pages (AMP) and Facebook Instant Articles for Publishers"
|
3235 |
+
msgstr ""
|
3236 |
+
|
3237 |
+
#: languages/vue.php:1078
|
3238 |
+
msgid "No-Code-Needed Tracking Features"
|
3239 |
+
msgstr ""
|
3240 |
+
|
3241 |
+
#: languages/vue.php:1081
|
3242 |
+
msgid "Basic Tracking Options"
|
3243 |
+
msgstr ""
|
3244 |
+
|
3245 |
+
#: languages/vue.php:1084
|
3246 |
+
msgid "Cross-domain tracking, anonymization of IP addresses, and automatic exclusion of administrators from tracking"
|
3247 |
+
msgstr ""
|
3248 |
+
|
3249 |
+
#: languages/vue.php:1087
|
3250 |
+
msgid "Advanced Tracking Options"
|
3251 |
+
msgstr ""
|
3252 |
+
|
3253 |
+
#: languages/vue.php:1090
|
3254 |
+
msgid "Easily integrate Google Optimize as well as adjust recordings of site speed and the sample rate of visitors"
|
3255 |
+
msgstr ""
|
3256 |
+
|
3257 |
+
#. Translators: Placeholders make the text green.
|
3258 |
+
#: languages/vue.php:1094
|
3259 |
+
msgid "Bonus: ExactMetrics Lite users get %1$s50%% off regular price%2$s, automatically applied at checkout."
|
3260 |
+
msgstr ""
|
3261 |
+
|
3262 |
+
#: languages/vue.php:1097
|
3263 |
+
msgid "How to Connect to Google Analytics"
|
3264 |
+
msgstr ""
|
3265 |
+
|
3266 |
+
#: languages/vue.php:1100
|
3267 |
+
msgid "After you install ExactMetrics, you’ll need to connect your WordPress site with your Google Analytics account. ExactMetrics makes the process easy, with no coding required."
|
3268 |
+
msgstr ""
|
3269 |
+
|
3270 |
+
#: languages/vue.php:1103
|
3271 |
+
msgid "Guide and Checklist for Advanced Insights"
|
3272 |
+
msgstr ""
|
3273 |
+
|
3274 |
+
#: languages/vue.php:1106
|
3275 |
+
msgid "Our goal is to make it as easy as possible for you to measure and track your stats so you can grow your business. This easy-to-follow guide and checklist will get you set up with ExactMetrics’ advanced tracking."
|
3276 |
+
msgstr ""
|
3277 |
+
|
3278 |
+
#: languages/vue.php:1109
|
3279 |
+
msgid "GDPR Guide"
|
3280 |
+
msgstr ""
|
3281 |
+
|
3282 |
+
#: languages/vue.php:1112
|
3283 |
+
msgid "Compliance with European data laws including GDPR can be confusing and time-consuming. In order to help ExactMetrics users comply with these laws, we’ve created an addon that automates a lot of the necessary configuration changes for you. "
|
3284 |
+
msgstr ""
|
3285 |
+
|
3286 |
+
#: languages/vue.php:1115
|
3287 |
+
msgid "How to Install and Activate ExactMetrics Addons"
|
3288 |
+
msgstr ""
|
3289 |
+
|
3290 |
+
#: languages/vue.php:1118
|
3291 |
+
msgid "The process for installing and activating addons is quick and easy after you install the ExactMetrics plugin. In this guide we’ll walk you through the process, step by step."
|
3292 |
+
msgstr ""
|
3293 |
+
|
3294 |
+
#: languages/vue.php:1121
|
3295 |
+
msgid "Enabling eCommerce Tracking and Reports"
|
3296 |
+
msgstr ""
|
3297 |
+
|
3298 |
+
#: languages/vue.php:1124
|
3299 |
+
msgid "Want to track your eCommerce sales data for your WooCommerce, MemberPress, or Easy Digital Downloads store with ExactMetrics? In this guide, we’ll show you how to enable eCommerce tracking in Google Analytics in just a few clicks."
|
3300 |
+
msgstr ""
|
3301 |
+
|
3302 |
+
#: languages/vue.php:1127
|
3303 |
+
msgid "Read Documentation"
|
3304 |
+
msgstr ""
|
3305 |
+
|
3306 |
+
#: languages/vue.php:1131
|
3307 |
+
msgid "Welcome to"
|
3308 |
+
msgstr ""
|
3309 |
+
|
3310 |
+
#. Translators: Adds a line break.
|
3311 |
+
#: languages/vue.php:1136
|
3312 |
+
msgid "Thank you for choosing ExactMetrics -%s The Most Powerful WordPress Analytics Plugin"
|
3313 |
+
msgstr ""
|
3314 |
+
|
3315 |
+
#. Translators: Makes text bold.
|
3316 |
+
#: languages/vue.php:1141
|
3317 |
+
msgid "%1$sExactMetrics%2$s makes it “effortless” to setup Google Analytics in WordPress, the RIGHT Way. You can watch the video tutorial or use our 3 minute setup wizard."
|
3318 |
+
msgstr ""
|
3319 |
+
|
3320 |
+
#: languages/vue.php:1145
|
3321 |
+
msgid "ExactMetrics Features & Addons"
|
3322 |
+
msgstr ""
|
3323 |
+
|
3324 |
+
#: languages/vue.php:1149
|
3325 |
+
msgid "Here are the features that make ExactMetrics the most powerful and user-friendly WordPress analytics plugin in the market."
|
3326 |
+
msgstr ""
|
3327 |
+
|
3328 |
+
#. Translators: Makes text bold.
|
3329 |
+
#: languages/vue.php:1154
|
3330 |
+
msgid "%1$sUniversal Tracking%2$s – Setup universal website tracking across devices and campaigns with just a few clicks (without any code)."
|
3331 |
+
msgstr ""
|
3332 |
+
|
3333 |
+
#. Translators: Makes text bold.
|
3334 |
+
#: languages/vue.php:1159
|
3335 |
+
msgid "%1$sGoogle Analytics Dashboard%2$s - See your website analytics report right inside your WordPress dashboard with actionable insights."
|
3336 |
+
msgstr ""
|
3337 |
+
|
3338 |
+
#. Translators: Makes text bold.
|
3339 |
+
#: languages/vue.php:1164
|
3340 |
+
msgid "%1$sReal-time Stats%2$s - Get real-time stats inside WordPress to see who is online, what are they doing and more."
|
3341 |
+
msgstr ""
|
3342 |
+
|
3343 |
+
#. Translators: Makes the text bold.
|
3344 |
+
#: languages/vue.php:1168
|
3345 |
+
msgid "%1$sEnhanced eCommerce Tracking%2$s - 1-click Google Analyticks Enhanced Ecommerce trackin for WooCommerce, Easy Digital Download & MemberPress."
|
3346 |
+
msgstr ""
|
3347 |
+
|
3348 |
+
#. Translators: Makes text bold.
|
3349 |
+
#: languages/vue.php:1173
|
3350 |
+
msgid "%1$sPage Level Analytics%2$s - Get detailed stats for each post and page, so you can see the most popular posts, pages, and sections of your site."
|
3351 |
+
msgstr ""
|
3352 |
+
|
3353 |
+
#. Translators: Makes text bold.
|
3354 |
+
#: languages/vue.php:1178
|
3355 |
+
msgid "%1$sAffiliate Link & Ads Tracking%2$s - Automatically track clicks on your affiliate links, banner ads, and other outbound links with our link tracking."
|
3356 |
+
msgstr ""
|
3357 |
+
|
3358 |
+
#. Translators: Makes text bold.
|
3359 |
+
#: languages/vue.php:1183
|
3360 |
+
msgid "%1$sEU Compilance (GDPR Friendly)%2$s - Make Google Analytics compliant with GDPR and other privacy regulations automatically."
|
3361 |
+
msgstr ""
|
3362 |
+
|
3363 |
+
#. Translators: Makes the text bold.
|
3364 |
+
#: languages/vue.php:1187
|
3365 |
+
msgid "%1$sCustom Dimensions%2$s - Setup tracking for authors, tags, searches, custom post type, users, and other events with 1-click."
|
3366 |
+
msgstr ""
|
3367 |
+
|
3368 |
+
#. Translators: Adds link to the features page.
|
3369 |
+
#: languages/vue.php:1192
|
3370 |
+
msgid "%1$sSee All Features%2$s"
|
3371 |
+
msgstr ""
|
3372 |
+
|
3373 |
+
#: languages/vue.php:1196
|
3374 |
+
msgid "Guides and Documentation:"
|
3375 |
+
msgstr ""
|
3376 |
+
|
3377 |
+
#: languages/vue.php:1200
|
3378 |
+
msgid "Getting Started with ExactMetrics"
|
3379 |
+
msgstr ""
|
3380 |
+
|
3381 |
+
#: languages/vue.php:1204
|
3382 |
+
msgid "ExactMetrics is the easiest analytics solution on the market to get started with, as we walk you through exactly what you need to do, in plain english, using our 3 minute setup wizard."
|
3383 |
+
msgstr ""
|
3384 |
+
|
3385 |
+
#: languages/vue.php:1208
|
3386 |
+
msgid "To begin with, we’ll get your site authorized with Google Analytics, so we can start tracking and generating reports for you right away."
|
3387 |
+
msgstr ""
|
3388 |
+
|
3389 |
+
#: languages/vue.php:1212
|
3390 |
+
msgid "In no time at all, and after just a few clicks, you'll have setup the most powerful Google Analytics tracking available for WordPress. It's easy to double your traffic and sales when you know exactly how people find and use your website. Let's get started!."
|
3391 |
+
msgstr ""
|
3392 |
+
|
3393 |
+
#: languages/vue.php:1216
|
3394 |
+
msgid "Launch the wizard!"
|
3395 |
+
msgstr ""
|
3396 |
+
|
3397 |
+
#: languages/vue.php:1219
|
3398 |
+
msgid "License Key"
|
3399 |
+
msgstr ""
|
3400 |
+
|
3401 |
+
#. Translators: Add link to retrieve license key from account.
|
3402 |
+
#: languages/vue.php:1223
|
3403 |
+
msgid "Add your ExactMetrics license key from the email receipt or account area. %1$sRetrieve your license key%2$s."
|
3404 |
+
msgstr ""
|
3405 |
+
|
3406 |
+
#: languages/vue.php:1227
|
3407 |
+
msgid "Google Authentication"
|
3408 |
+
msgstr ""
|
3409 |
+
|
3410 |
+
#: languages/vue.php:1230
|
3411 |
+
msgid "Miscellaneous"
|
3412 |
+
msgstr ""
|
3413 |
+
|
3414 |
+
#: languages/vue.php:1233
|
3415 |
+
msgid "Hides plugin announcements and update details. This includes critical notices we use to inform about deprecations and important required configuration changes."
|
3416 |
+
msgstr ""
|
3417 |
+
|
3418 |
+
#: languages/vue.php:1236
|
3419 |
+
msgid "Hide Announcements"
|
3420 |
+
msgstr ""
|
3421 |
+
|
3422 |
+
#: languages/vue.php:1239
|
3423 |
+
msgid "Installing Addon"
|
3424 |
+
msgstr ""
|
3425 |
+
|
3426 |
+
#: languages/vue.php:1242
|
3427 |
+
msgid "Activating Addon"
|
3428 |
+
msgstr ""
|
3429 |
+
|
3430 |
+
#: languages/vue.php:1245
|
3431 |
+
msgid "Addon Activated"
|
3432 |
+
msgstr ""
|
3433 |
+
|
3434 |
+
#: languages/vue.php:1248
|
3435 |
+
msgid "Loading report data"
|
3436 |
+
msgstr ""
|
3437 |
+
|
3438 |
+
#: languages/vue.php:1251
|
3439 |
+
msgid "Please activate manually"
|
3440 |
+
msgstr ""
|
3441 |
+
|
3442 |
+
#. Translators: Adds the error status and status text.
|
3443 |
+
#: languages/vue.php:1255
|
3444 |
+
msgid "Error: %1$s, %2$s"
|
3445 |
+
msgstr ""
|
3446 |
+
|
3447 |
+
#: languages/vue.php:1258
|
3448 |
+
msgid "Error Activating Addon"
|
3449 |
+
msgstr ""
|
3450 |
+
|
3451 |
+
#: languages/vue.php:1264
|
3452 |
+
msgid "Dismiss"
|
3453 |
+
msgstr ""
|
3454 |
+
|
3455 |
+
#: languages/vue.php:1267
|
3456 |
+
msgid "Redirecting"
|
3457 |
+
msgstr ""
|
3458 |
+
|
3459 |
+
#: languages/vue.php:1270
|
3460 |
+
msgid "Please wait"
|
3461 |
+
msgstr ""
|
3462 |
+
|
3463 |
+
#: languages/vue.php:1273
|
3464 |
+
msgid "activate"
|
3465 |
+
msgstr ""
|
3466 |
+
|
3467 |
+
#: languages/vue.php:1276
|
3468 |
+
msgid "install"
|
3469 |
+
msgstr ""
|
3470 |
+
|
3471 |
+
#: languages/vue.php:1279
|
3472 |
+
msgid "Visit addons page"
|
3473 |
+
msgstr ""
|
3474 |
+
|
3475 |
+
#: languages/vue.php:1282
|
3476 |
+
msgid "Report Unavailable"
|
3477 |
+
msgstr ""
|
3478 |
+
|
3479 |
+
#. Translators: Install/Activate the addon.
|
3480 |
+
#: languages/vue.php:1286
|
3481 |
+
msgid "%s Addon"
|
3482 |
+
msgstr ""
|
3483 |
+
|
3484 |
+
#: languages/vue.php:1289
|
3485 |
+
msgid "Go Back To Reports"
|
3486 |
+
msgstr ""
|
3487 |
+
|
3488 |
+
#: languages/vue.php:1292
|
3489 |
+
msgid "Enable Enhanced eCommerce"
|
3490 |
+
msgstr ""
|
3491 |
+
|
3492 |
+
#: languages/vue.php:1295
|
3493 |
+
msgid "Hello and Welcome to ExactMetrics, the Best Google Analytics Plugin for WordPress."
|
3494 |
+
msgstr ""
|
3495 |
+
|
3496 |
+
#: languages/vue.php:1298
|
3497 |
+
msgid "Ready to take your website to the next level? ExactMetrics gives you the accurate insights you need to make data-driven decisions to grow your traffic and conversions faster than ever before. Now you can easily enable advanced tracking on your website without having to know any code."
|
3498 |
+
msgstr ""
|
3499 |
+
|
3500 |
+
#: languages/vue.php:1301
|
3501 |
+
msgid "The ExactMetrics Team"
|
3502 |
+
msgstr ""
|
3503 |
+
|
3504 |
+
#. Translators: Placeholders make the text highlighted.
|
3505 |
+
#: languages/vue.php:1305
|
3506 |
+
msgid "%1$sNeed%2$s to Grow FASTER??"
|
3507 |
+
msgstr ""
|
3508 |
+
|
3509 |
+
#: languages/vue.php:1308
|
3510 |
+
msgid "Get additional, actionable insights by going Pro."
|
3511 |
+
msgstr ""
|
3512 |
+
|
3513 |
+
#: languages/vue.php:1311
|
3514 |
+
msgid "Skip"
|
3515 |
+
msgstr ""
|
3516 |
+
|
3517 |
+
#: languages/vue.php:1314
|
3518 |
+
msgid "See All Features"
|
3519 |
+
msgstr ""
|
3520 |
+
|
3521 |
+
#: languages/vue.php:1317
|
3522 |
+
msgid "Upgrade to Pro to get the complete ExactMetrics experience including 1 click tracking integrations for your favorite WordPress plugins and insightful reports backed by our legendary support team."
|
3523 |
+
msgstr ""
|
3524 |
+
|
3525 |
+
#: languages/vue.php:1320
|
3526 |
+
msgid "Our Pro plan includes:"
|
3527 |
+
msgstr ""
|
3528 |
+
|
3529 |
+
#: languages/vue.php:1323
|
3530 |
+
msgid "Awesome, You're All Set!"
|
3531 |
+
msgstr ""
|
3532 |
+
|
3533 |
+
#: languages/vue.php:1326
|
3534 |
+
msgid "ExactMetrics is all set up and ready to use. We've verified that the tracking code is deployed properly and collecting data."
|
3535 |
+
msgstr ""
|
3536 |
+
|
3537 |
+
#. Translators: Make the text bold.
|
3538 |
+
#: languages/vue.php:1330
|
3539 |
+
msgid "%1$sPlease Note:%2$s While Google Analytics is properly setup and tracking everything, it does not send the data back to WordPress immediately. Depending on the size of your website, it can take between a few hours to 24 hours for reports to populate."
|
3540 |
+
msgstr ""
|
3541 |
+
|
3542 |
+
#. Translators: Add link to blog.
|
3543 |
+
#: languages/vue.php:1334
|
3544 |
+
msgid "%1$sSubscribe to the ExactMetrics blog%2$s for tips on how to get more traffic and grow your business."
|
3545 |
+
msgstr ""
|
3546 |
+
|
3547 |
+
#: languages/vue.php:1337
|
3548 |
+
msgid "Finish Setup & Exit Wizard"
|
3549 |
+
msgstr ""
|
3550 |
+
|
3551 |
+
#: languages/vue.php:1340
|
3552 |
+
msgid "Google Analytics"
|
3553 |
+
msgstr ""
|
3554 |
+
|
3555 |
+
#: languages/vue.php:1343
|
3556 |
+
msgid "Subscribe"
|
3557 |
+
msgstr ""
|
3558 |
+
|
3559 |
+
#: languages/vue.php:1346
|
3560 |
+
msgid "Checking your website..."
|
3561 |
+
msgstr ""
|
3562 |
+
|
3563 |
+
#: languages/vue.php:1349
|
3564 |
+
msgid "Recommended Addons"
|
3565 |
+
msgstr ""
|
3566 |
+
|
3567 |
+
#. Translators: Add a link to upgrade and make the text green.
|
3568 |
+
#: languages/vue.php:1353
|
3569 |
+
msgid "To unlock more features consider %1$supgrading to PRO%2$s.%3$s As a valued ExactMetrics Lite user you %4$sreceive 50%% off%5$s, automatically applied at checkout!"
|
3570 |
+
msgstr ""
|
3571 |
+
|
3572 |
+
#: languages/vue.php:1356
|
3573 |
+
msgid "Upgrade to PRO Now"
|
3574 |
+
msgstr ""
|
3575 |
+
|
3576 |
+
#: languages/vue.php:1359
|
3577 |
+
msgid "See who’s viewing and submitting your forms, so you can increase your converion rate. Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
3578 |
+
msgstr ""
|
3579 |
+
|
3580 |
+
#: languages/vue.php:1362
|
3581 |
+
msgid "See All Your Important Store Metrics in One Place. Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
3582 |
+
msgstr ""
|
3583 |
+
|
3584 |
+
#: languages/vue.php:1365
|
3585 |
+
msgid "... and more:"
|
3586 |
+
msgstr ""
|
3587 |
+
|
3588 |
+
#: languages/vue.php:1368
|
3589 |
+
msgid "Dimensions- Track authors, categories, trags, searches, users and more."
|
3590 |
+
msgstr ""
|
3591 |
+
|
3592 |
+
#: languages/vue.php:1371
|
3593 |
+
msgid "EU Compliance- Improve compliance with GDPR and other privacy regulations."
|
3594 |
+
msgstr ""
|
3595 |
+
|
3596 |
+
#: languages/vue.php:1374
|
3597 |
+
msgid "AMP- ExactMetrics Google AMP Addon enables accurate tracking of all mobile visitors to your AMP-enabled pages."
|
3598 |
+
msgstr ""
|
3599 |
+
|
3600 |
+
#: languages/vue.php:1377
|
3601 |
+
msgid "Facebook Instant Articles- Integrate Google Analytics and Facebook Instant Articles with just one click."
|
3602 |
+
msgstr ""
|
3603 |
+
|
3604 |
+
#: languages/vue.php:1380
|
3605 |
+
msgid "eCommerce- Sales tracking for your WooCommerce, Easy Digital Downloads, LifterLMS or MemberPress stores."
|
3606 |
+
msgstr ""
|
3607 |
+
|
3608 |
+
#: languages/vue.php:1383
|
3609 |
+
msgid "Google Optimize- Easily enable Google Optimize on your WordPress site."
|
3610 |
+
msgstr ""
|
3611 |
+
|
3612 |
+
#: languages/vue.php:1386
|
3613 |
+
msgid "Forms- Enable tracking of your form views, submissions and conversion rates."
|
3614 |
+
msgstr ""
|
3615 |
+
|
3616 |
+
#: languages/vue.php:1389
|
3617 |
+
msgid "Ads- See who’s clicking on your Google Adsense banner ads."
|
3618 |
+
msgstr ""
|
3619 |
+
|
3620 |
+
#: languages/vue.php:1392
|
3621 |
+
msgid "Show Overview Reports"
|
3622 |
+
msgstr ""
|
3623 |
+
|
3624 |
+
#: languages/vue.php:1395
|
3625 |
+
msgid "Show Publishers Reports"
|
3626 |
+
msgstr ""
|
3627 |
+
|
3628 |
+
#: languages/vue.php:1398
|
3629 |
+
msgid "Show eCommerce Reports"
|
3630 |
+
msgstr ""
|
3631 |
+
|
3632 |
+
#: languages/vue.php:1401
|
3633 |
+
msgid "Available in PRO version"
|
3634 |
+
msgstr ""
|
3635 |
+
|
3636 |
+
#: languages/vue.php:1404
|
3637 |
+
msgid "Show in widget mode"
|
3638 |
+
msgstr ""
|
3639 |
+
|
3640 |
+
#: languages/vue.php:1407
|
3641 |
+
msgid "Show in full-width mode"
|
3642 |
+
msgstr ""
|
3643 |
+
|
3644 |
+
#: languages/vue.php:1410
|
3645 |
+
msgid "File imported"
|
3646 |
+
msgstr ""
|
3647 |
+
|
3648 |
+
#: languages/vue.php:1413
|
3649 |
+
msgid "Settings successfully updated!"
|
3650 |
+
msgstr ""
|
3651 |
+
|
3652 |
+
#: languages/vue.php:1416
|
3653 |
+
msgid "Error importing settings"
|
3654 |
+
msgstr ""
|
3655 |
+
|
3656 |
+
#: languages/vue.php:1419
|
3657 |
+
msgid "Please choose a .json file generated by a ExactMetrics settings export."
|
3658 |
+
msgstr ""
|
3659 |
+
|
3660 |
+
#: languages/vue.php:1422
|
3661 |
+
msgid "Import/Export"
|
3662 |
+
msgstr ""
|
3663 |
+
|
3664 |
+
#: languages/vue.php:1425
|
3665 |
+
msgid "Import"
|
3666 |
+
msgstr ""
|
3667 |
+
|
3668 |
+
#: languages/vue.php:1428
|
3669 |
+
msgid "Import settings from another ExactMetrics website."
|
3670 |
+
msgstr ""
|
3671 |
+
|
3672 |
+
#: languages/vue.php:1431
|
3673 |
+
msgid "Export"
|
3674 |
+
msgstr ""
|
3675 |
+
|
3676 |
+
#: languages/vue.php:1434
|
3677 |
+
msgid "Export settings to import into another ExactMetrics install."
|
3678 |
+
msgstr ""
|
3679 |
+
|
3680 |
+
#: languages/vue.php:1437
|
3681 |
+
msgid "Import Settings"
|
3682 |
+
msgstr ""
|
3683 |
+
|
3684 |
+
#: languages/vue.php:1440
|
3685 |
+
msgid "Export Settings"
|
3686 |
+
msgstr ""
|
3687 |
+
|
3688 |
+
#: languages/vue.php:1443
|
3689 |
+
msgid "Please choose a file to import"
|
3690 |
+
msgstr ""
|
3691 |
+
|
3692 |
+
#: languages/vue.php:1446
|
3693 |
+
msgid "Use the filepicker below to select the settings export file from another site."
|
3694 |
+
msgstr ""
|
3695 |
+
|
3696 |
+
#: languages/vue.php:1449
|
3697 |
+
msgid "Use the button below to export a file with your ExactMetrics settings."
|
3698 |
+
msgstr ""
|
3699 |
+
|
3700 |
+
#: languages/vue.php:1452
|
3701 |
+
msgid "Choose file"
|
3702 |
+
msgstr ""
|
3703 |
+
|
3704 |
+
#: languages/vue.php:1455
|
3705 |
+
msgid "No file chosen"
|
3706 |
+
msgstr ""
|
3707 |
+
|
3708 |
+
#: languages/vue.php:1458
|
3709 |
+
msgid "Uploading file..."
|
3710 |
+
msgstr ""
|
3711 |
+
|
3712 |
+
#: languages/vue.php:1461
|
3713 |
+
msgid "Custom Campaign Parameters"
|
3714 |
+
msgstr ""
|
3715 |
+
|
3716 |
+
#: languages/vue.php:1464
|
3717 |
+
msgid "The URL builder helps you add parameters to your URLs you use in custom web or email ad campaigns."
|
3718 |
+
msgstr ""
|
3719 |
+
|
3720 |
+
#: languages/vue.php:1467
|
3721 |
+
msgid "A custom campaign is any ad campaign not using the AdWords auto-tagging feature. When users click one of the custom links, the unique parameters are sent to your Analytics account, so you can identify the URLs that are the most effective in attracting users to your content."
|
3722 |
+
msgstr ""
|
3723 |
+
|
3724 |
+
#. Translators: Marks the field as required.
|
3725 |
+
#: languages/vue.php:1471
|
3726 |
+
msgid "Website URL %s"
|
3727 |
+
msgstr ""
|
3728 |
+
|
3729 |
+
#. Translators: Display the current website url in italic.
|
3730 |
+
#: languages/vue.php:1475
|
3731 |
+
msgid "The full website URL (e.g. %1$s %2$s%3$s)"
|
3732 |
+
msgstr ""
|
3733 |
+
|
3734 |
+
#. Translators: Marks the field as required.
|
3735 |
+
#: languages/vue.php:1479
|
3736 |
+
msgid "Campaign Source %s"
|
3737 |
+
msgstr ""
|
3738 |
+
|
3739 |
+
#. Translators: Make the text italic.
|
3740 |
+
#: languages/vue.php:1483
|
3741 |
+
msgid "Enter a referrer (e.g. %1$sfacebook, newsletter, google%2$s)"
|
3742 |
+
msgstr ""
|
3743 |
+
|
3744 |
+
#. Translators: Make the text italic.
|
3745 |
+
#: languages/vue.php:1487
|
3746 |
+
msgid "Enter a marketing medium (e.g. %1$scpc, banner, email%2$s)"
|
3747 |
+
msgstr ""
|
3748 |
+
|
3749 |
+
#. Translators: Make the text italic.
|
3750 |
+
#: languages/vue.php:1491
|
3751 |
+
msgid "Enter a name to easily identify (e.g. %1$sspring_sale%2$s)"
|
3752 |
+
msgstr ""
|
3753 |
+
|
3754 |
+
#: languages/vue.php:1494
|
3755 |
+
msgid "Enter the paid keyword"
|
3756 |
+
msgstr ""
|
3757 |
+
|
3758 |
+
#: languages/vue.php:1497
|
3759 |
+
msgid "Enter something to differentiate ads"
|
3760 |
+
msgstr ""
|
3761 |
+
|
3762 |
+
#: languages/vue.php:1500
|
3763 |
+
msgid "Use Fragment"
|
3764 |
+
msgstr ""
|
3765 |
+
|
3766 |
+
#. Translators: Make the text bold.
|
3767 |
+
#: languages/vue.php:1504
|
3768 |
+
msgid "Set the parameters in the fragment portion of the URL %1$s(not recommended)%2$s"
|
3769 |
+
msgstr ""
|
3770 |
+
|
3771 |
+
#: languages/vue.php:1507
|
3772 |
+
msgid "URL to use"
|
3773 |
+
msgstr ""
|
3774 |
+
|
3775 |
+
#: languages/vue.php:1510
|
3776 |
+
msgid "(Updates automatically)"
|
3777 |
+
msgstr ""
|
3778 |
+
|
3779 |
+
#: languages/vue.php:1513
|
3780 |
+
msgid "Copy to Clipboard"
|
3781 |
+
msgstr ""
|
3782 |
+
|
3783 |
+
#: languages/vue.php:1516
|
3784 |
+
msgid "More Information & Examples"
|
3785 |
+
msgstr ""
|
3786 |
+
|
3787 |
+
#: languages/vue.php:1519
|
3788 |
+
msgid "The following table gives a detailed explanation and example of each of the campaign parameters."
|
3789 |
+
msgstr ""
|
3790 |
+
|
3791 |
+
#: languages/vue.php:1522
|
3792 |
+
msgid "Campaign Source"
|
3793 |
+
msgstr ""
|
3794 |
+
|
3795 |
+
#: languages/vue.php:1525
|
3796 |
+
msgid "Required. Use utm_source to identify a search engine, newsletter name, or other source."
|
3797 |
+
msgstr ""
|
3798 |
+
|
3799 |
+
#: languages/vue.php:1528
|
3800 |
+
msgid "Campaign Medium"
|
3801 |
+
msgstr ""
|
3802 |
+
|
3803 |
+
#: languages/vue.php:1531
|
3804 |
+
msgid "Use utm_medium to identify a medium such as email or cost-per-click."
|
3805 |
+
msgstr ""
|
3806 |
+
|
3807 |
+
#: languages/vue.php:1534
|
3808 |
+
msgid "Campaign Name"
|
3809 |
+
msgstr ""
|
3810 |
+
|
3811 |
+
#: languages/vue.php:1537
|
3812 |
+
msgid "Used for keyword analysis. Use utm_campaign to identify a specific product promotion or strategic campaign."
|
3813 |
+
msgstr ""
|
3814 |
+
|
3815 |
+
#: languages/vue.php:1540
|
3816 |
+
msgid "Campaign Term"
|
3817 |
+
msgstr ""
|
3818 |
+
|
3819 |
+
#: languages/vue.php:1543
|
3820 |
+
msgid "Used for paid search. Use utm_term to note the keywords for this ad."
|
3821 |
+
msgstr ""
|
3822 |
+
|
3823 |
+
#: languages/vue.php:1546
|
3824 |
+
msgid "Campaign Content"
|
3825 |
+
msgstr ""
|
3826 |
+
|
3827 |
+
#: languages/vue.php:1549
|
3828 |
+
msgid "Used for A/B testing and content-targeted ads. Use utm_content to differentiate ads or links that point to the same URL."
|
3829 |
+
msgstr ""
|
3830 |
+
|
3831 |
+
#. Translators: Example.
|
3832 |
+
#: languages/vue.php:1553
|
3833 |
+
msgid "Example: %s"
|
3834 |
+
msgstr ""
|
3835 |
+
|
3836 |
+
#. Translators: Examples.
|
3837 |
+
#: languages/vue.php:1557
|
3838 |
+
msgid "Examples: %s"
|
3839 |
+
msgstr ""
|
3840 |
+
|
3841 |
+
#: languages/vue.php:1560
|
3842 |
+
msgid "About Campaigns"
|
3843 |
+
msgstr ""
|
3844 |
+
|
3845 |
+
#: languages/vue.php:1563
|
3846 |
+
msgid "About Custom Campaigns"
|
3847 |
+
msgstr ""
|
3848 |
+
|
3849 |
+
#: languages
|