Version Description
- Bug Fixes:
- Updated endpoint for GA auth to use updated system.
- Fixed a bug where the opt-out and exclude DNT options were listed twice.
Download this release
Release Info
Developer | chriscct7 |
Plugin | Google Analytics Dashboard for WP (GADWP) |
Version | 5.3.3 |
Comparing to | |
See all releases |
Code changes from version 5.3.2 to 5.3.3
- SECURITY.md +0 -3
- admin/ajax-actions.php +3 -3
- admin/class-am-notification.php +456 -0
- admin/css/gadwp.css +221 -1
- admin/images/optinmonster.png +0 -0
- admin/images/wpforms.png +0 -0
- admin/item-reports.php +3 -3
- admin/settings.php +26 -26
- admin/setup.php +4 -4
- admin/views/access-code.php +3 -3
- admin/widgets.php +4 -4
- common/ajax-actions.php +3 -3
- common/js/reports5.js +1 -1
- common/realtime/jquery.ui.tooltip.html.css +1 -1
- config.php +3 -3
- front/ajax-actions.php +3 -3
- front/item-reports.php +3 -3
- front/setup.php +3 -3
- front/tracking-analytics.php +3 -3
- front/tracking-tagmanager.php +3 -3
- front/tracking.php +3 -3
- front/views/analytics-amp-clientidapi.php +3 -3
- front/views/analytics-amp-code.php +3 -3
- front/views/analytics-code.php +5 -5
- front/views/analytics-optout-code.php +3 -3
- front/views/optimize-code.php +3 -3
- front/views/tagmanager-amp-code.php +3 -3
- front/views/tagmanager-code.php +4 -4
- front/widgets.php +5 -5
- gadwp.php +16 -6
- install/install.php +3 -3
- install/uninstall.php +3 -3
- readme.txt +15 -16
- realtime/jquery/jquery.ui.tooltip.html.css +1 -1
- tools/gapi.php +3 -3
- tools/iso3166.php +3 -3
- tools/src/Deconf/Auth/Exception.php +1 -1
- tools/src/Deconf/Cache/Exception.php +1 -1
- tools/src/Deconf/Exception.php +1 -1
- tools/src/Deconf/IO/Abstract.php +1 -1
- tools/src/Deconf/IO/Exception.php +1 -1
- tools/src/Deconf/IO/Stream.php +1 -1
- tools/src/Deconf/Utils/URITemplate.php +1 -1
- tools/src/readme.txt +3 -3
- tools/tools.php +3 -3
SECURITY.md
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
Every day we do our best to make sure [Google Analytics Dashboard for WP (GADWP)](https://deconf.com/google-analytics-dashboard-wordpress/) is safe and secure. But we’re only human, and there’s always a chance that we missed something. That’s where you come in – find a security weakness in our plugin, report it on [HackerOne](https://hackerone.com/deconf_eb9eh), and get listed as a contributor!
|
2 |
-
|
3 |
-
To find out more about our security reports policy for the plugin [click here](https://deconf.com/security/).
|
|
|
|
|
|
admin/ajax-actions.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
admin/class-am-notification.php
ADDED
@@ -0,0 +1,456 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! class_exists( 'AM_Notification' ) ) {
|
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.4
|
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 |
+
) );
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Retrieve the remote notifications if the time has expired.
|
88 |
+
*
|
89 |
+
* @since 1.0.0
|
90 |
+
*/
|
91 |
+
public function get_remote_notifications() {
|
92 |
+
if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
|
93 |
+
return;
|
94 |
+
}
|
95 |
+
|
96 |
+
$last_checked = get_option( '_amn_' . $this->plugin . '_last_checked', strtotime( '-1 week' ) );
|
97 |
+
|
98 |
+
if ( $last_checked < strtotime( 'today midnight' ) ) {
|
99 |
+
$plugin_notifications = $this->get_plugin_notifications( 1 );
|
100 |
+
$notification_id = null;
|
101 |
+
|
102 |
+
if ( ! empty( $plugin_notifications ) ) {
|
103 |
+
// Unset it from the array.
|
104 |
+
$notification = $plugin_notifications[0];
|
105 |
+
$notification_id = get_post_meta( $notification->ID, 'notification_id', true );
|
106 |
+
}
|
107 |
+
|
108 |
+
$response = wp_remote_retrieve_body( wp_remote_post( $this->api_url, array(
|
109 |
+
'body' => array(
|
110 |
+
'slug' => $this->plugin,
|
111 |
+
'version' => $this->plugin_version,
|
112 |
+
'last_notification' => $notification_id,
|
113 |
+
),
|
114 |
+
) ) );
|
115 |
+
|
116 |
+
$data = json_decode( $response );
|
117 |
+
|
118 |
+
if ( ! empty( $data->id ) ) {
|
119 |
+
$notifications = array();
|
120 |
+
|
121 |
+
foreach ( (array) $data->slugs as $slug ) {
|
122 |
+
$notifications = array_merge(
|
123 |
+
$notifications,
|
124 |
+
(array) get_posts(
|
125 |
+
array(
|
126 |
+
'post_type' => 'amn_' . $slug,
|
127 |
+
'post_status' => 'all',
|
128 |
+
'meta_key' => 'notification_id',
|
129 |
+
'meta_value' => $data->id,
|
130 |
+
)
|
131 |
+
)
|
132 |
+
);
|
133 |
+
}
|
134 |
+
|
135 |
+
if ( empty( $notifications ) ) {
|
136 |
+
$new_notification_id = wp_insert_post(
|
137 |
+
array(
|
138 |
+
'post_content' => wp_kses_post( $data->content ),
|
139 |
+
'post_type' => 'amn_' . $this->plugin,
|
140 |
+
)
|
141 |
+
);
|
142 |
+
|
143 |
+
update_post_meta( $new_notification_id, 'notification_id', absint( $data->id ) );
|
144 |
+
update_post_meta( $new_notification_id, 'type', sanitize_text_field( trim( $data->type ) ) );
|
145 |
+
update_post_meta( $new_notification_id, 'dismissable', (bool) $data->dismissible ? 1 : 0 );
|
146 |
+
update_post_meta( $new_notification_id, 'location', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->location ) : json_encode( $data->location ) );
|
147 |
+
update_post_meta( $new_notification_id, 'version', sanitize_text_field( trim( $data->version ) ) );
|
148 |
+
update_post_meta( $new_notification_id, 'viewed', 0 );
|
149 |
+
update_post_meta( $new_notification_id, 'expiration', $data->expiration ? absint( $data->expiration ) : false );
|
150 |
+
update_post_meta( $new_notification_id, 'plans', function_exists( 'wp_json_encode' ) ? wp_json_encode( $data->plans ) : json_encode( $data->plans ) );
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
// Possibly revoke notifications.
|
155 |
+
if ( ! empty( $data->revoked ) ) {
|
156 |
+
$this->revoke_notifications( $data->revoked );
|
157 |
+
}
|
158 |
+
|
159 |
+
// Set the option now so we can't run this again until after 24 hours.
|
160 |
+
update_option( '_amn_' . $this->plugin . '_last_checked', strtotime( 'today midnight' ) );
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Get local plugin notifications that have already been set.
|
166 |
+
*
|
167 |
+
* @since 1.0.0
|
168 |
+
*
|
169 |
+
* @param integer $limit Set the limit for how many posts to retrieve.
|
170 |
+
* @param array $args Any top-level arguments to add to the array.
|
171 |
+
*
|
172 |
+
* @return WP_Post[] WP_Post that match the query.
|
173 |
+
*/
|
174 |
+
public function get_plugin_notifications( $limit = - 1, $args = array() ) {
|
175 |
+
return get_posts(
|
176 |
+
array(
|
177 |
+
'posts_per_page' => $limit,
|
178 |
+
'post_type' => 'amn_' . $this->plugin,
|
179 |
+
) + $args
|
180 |
+
);
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Display any notifications that should be displayed.
|
185 |
+
*
|
186 |
+
* @since 1.0.0
|
187 |
+
*/
|
188 |
+
public function display_notifications() {
|
189 |
+
if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
|
190 |
+
return;
|
191 |
+
}
|
192 |
+
|
193 |
+
$plugin_notifications = $this->get_plugin_notifications( - 1, array(
|
194 |
+
'post_status' => 'all',
|
195 |
+
'meta_key' => 'viewed',
|
196 |
+
'meta_value' => '0',
|
197 |
+
) );
|
198 |
+
|
199 |
+
$plugin_notifications = $this->validate_notifications( $plugin_notifications );
|
200 |
+
|
201 |
+
if ( ! empty( $plugin_notifications ) && ! self::$registered ) {
|
202 |
+
foreach ( $plugin_notifications as $notification ) {
|
203 |
+
$dismissable = get_post_meta( $notification->ID, 'dismissable', true );
|
204 |
+
$type = get_post_meta( $notification->ID, 'type', true );
|
205 |
+
?>
|
206 |
+
<div class="am-notification am-notification-<?php echo $notification->ID; ?> notice notice-<?php echo $type; ?><?php echo $dismissable ? ' is-dismissible' : ''; ?>">
|
207 |
+
<?php echo $notification->post_content; ?>
|
208 |
+
</div>
|
209 |
+
<script type="text/javascript">
|
210 |
+
jQuery( document ).ready( function ( $ ) {
|
211 |
+
$( document ).on( 'click', '.am-notification-<?php echo $notification->ID; ?> button.notice-dismiss', function ( event ) {
|
212 |
+
$.post( ajaxurl, {
|
213 |
+
action: 'am_notification_dismiss',
|
214 |
+
notification_id: '<?php echo $notification->ID; ?>'
|
215 |
+
} );
|
216 |
+
} );
|
217 |
+
} );
|
218 |
+
</script>
|
219 |
+
<?php
|
220 |
+
}
|
221 |
+
|
222 |
+
self::$registered = true;
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Validate the notifications before displaying them.
|
228 |
+
*
|
229 |
+
* @since 1.0.0
|
230 |
+
*
|
231 |
+
* @param array $plugin_notifications An array of plugin notifications.
|
232 |
+
*
|
233 |
+
* @return array A filtered array of plugin notifications.
|
234 |
+
*/
|
235 |
+
public function validate_notifications( $plugin_notifications ) {
|
236 |
+
global $pagenow;
|
237 |
+
|
238 |
+
foreach ( $plugin_notifications as $key => $notification ) {
|
239 |
+
// Location validation.
|
240 |
+
$location = (array) json_decode( get_post_meta( $notification->ID, 'location', true ) );
|
241 |
+
$continue = false;
|
242 |
+
if ( ! in_array( 'everywhere', $location, true ) ) {
|
243 |
+
if ( in_array( 'index.php', $location, true ) && 'index.php' === $pagenow ) {
|
244 |
+
$continue = true;
|
245 |
+
}
|
246 |
+
|
247 |
+
if ( in_array( 'plugins.php', $location, true ) && 'plugins.php' === $pagenow ) {
|
248 |
+
$continue = true;
|
249 |
+
}
|
250 |
+
|
251 |
+
if ( ! $continue ) {
|
252 |
+
unset( $plugin_notifications[ $key ] );
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
// Plugin validation (OR conditional).
|
257 |
+
$plugins = (array) json_decode( get_post_meta( $notification->ID, 'plugins', true ) );
|
258 |
+
$continue = false;
|
259 |
+
if ( ! empty( $plugins ) ) {
|
260 |
+
foreach ( $plugins as $plugin ) {
|
261 |
+
if ( is_plugin_active( $plugin ) ) {
|
262 |
+
$continue = true;
|
263 |
+
}
|
264 |
+
}
|
265 |
+
|
266 |
+
if ( ! $continue ) {
|
267 |
+
unset( $plugin_notifications[ $key ] );
|
268 |
+
}
|
269 |
+
}
|
270 |
+
|
271 |
+
// Theme validation.
|
272 |
+
$theme = get_post_meta( $notification->ID, 'theme', true );
|
273 |
+
$continue = (string) wp_get_theme() === $theme;
|
274 |
+
|
275 |
+
if ( ! empty( $theme ) && ! $continue ) {
|
276 |
+
unset( $plugin_notifications[ $key ] );
|
277 |
+
}
|
278 |
+
|
279 |
+
// Version validation.
|
280 |
+
$version = get_post_meta( $notification->ID, 'version', true );
|
281 |
+
$continue = false;
|
282 |
+
if ( ! empty( $version ) ) {
|
283 |
+
if ( version_compare( $this->plugin_version, $version, '<=' ) ) {
|
284 |
+
$continue = true;
|
285 |
+
}
|
286 |
+
|
287 |
+
if ( ! $continue ) {
|
288 |
+
unset( $plugin_notifications[ $key ] );
|
289 |
+
}
|
290 |
+
}
|
291 |
+
|
292 |
+
// Expiration validation.
|
293 |
+
$expiration = get_post_meta( $notification->ID, 'expiration', true );
|
294 |
+
$continue = false;
|
295 |
+
if ( ! empty( $expiration ) ) {
|
296 |
+
if ( $expiration > time() ) {
|
297 |
+
$continue = true;
|
298 |
+
}
|
299 |
+
|
300 |
+
if ( ! $continue ) {
|
301 |
+
unset( $plugin_notifications[ $key ] );
|
302 |
+
}
|
303 |
+
}
|
304 |
+
|
305 |
+
// Plan validation.
|
306 |
+
$plans = (array) json_decode( get_post_meta( $notification->ID, 'plans', true ) );
|
307 |
+
$continue = false;
|
308 |
+
if ( ! empty( $plans ) ) {
|
309 |
+
$level = $this->get_plan_level();
|
310 |
+
if ( in_array( $level, $plans, true ) ) {
|
311 |
+
$continue = true;
|
312 |
+
}
|
313 |
+
|
314 |
+
if ( ! $continue ) {
|
315 |
+
unset( $plugin_notifications[ $key ] );
|
316 |
+
}
|
317 |
+
}
|
318 |
+
}
|
319 |
+
|
320 |
+
return $plugin_notifications;
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Grab the current plan level.
|
325 |
+
*
|
326 |
+
* @since 1.0.0
|
327 |
+
*
|
328 |
+
* @return string The current plan level.
|
329 |
+
*/
|
330 |
+
public function get_plan_level() {
|
331 |
+
// Prepare variables.
|
332 |
+
$key = '';
|
333 |
+
$level = '';
|
334 |
+
|
335 |
+
switch ( $this->plugin ) {
|
336 |
+
case 'wpforms':
|
337 |
+
$option = get_option( 'wpforms_license' );
|
338 |
+
$key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
|
339 |
+
$level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
|
340 |
+
|
341 |
+
// Possibly check for a constant.
|
342 |
+
if ( empty( $key ) && defined( 'WPFORMS_LICENSE_KEY' ) ) {
|
343 |
+
$key = WPFORMS_LICENSE_KEY;
|
344 |
+
}
|
345 |
+
break;
|
346 |
+
case 'mi-lite':
|
347 |
+
case 'mi':
|
348 |
+
if ( version_compare( MONSTERINSIGHTS_VERSION, '6.9.0', '>=' ) ) {
|
349 |
+
if ( MonsterInsights()->license->get_site_license_type() ) {
|
350 |
+
$key = MonsterInsights()->license->get_site_license_key();
|
351 |
+
$type = MonsterInsights()->license->get_site_license_type();
|
352 |
+
} else if ( MonsterInsights()->license->get_network_license_type() ) {
|
353 |
+
$key = MonsterInsights()->license->get_network_license_key();
|
354 |
+
$type = MonsterInsights()->license->get_network_license_type();
|
355 |
+
}
|
356 |
+
|
357 |
+
// Check key fallbacks
|
358 |
+
if ( empty( $key ) ) {
|
359 |
+
$key = MonsterInsights()->license->get_license_key();
|
360 |
+
}
|
361 |
+
} else {
|
362 |
+
$option = get_option( 'monsterinsights_license' );
|
363 |
+
$key = is_array( $option ) && isset( $option['key'] ) ? $option['key'] : '';
|
364 |
+
$level = is_array( $option ) && isset( $option['type'] ) ? $option['type'] : '';
|
365 |
+
|
366 |
+
// Possibly check for a constant.
|
367 |
+
if ( empty( $key ) && defined( 'MONSTERINSIGHTS_LICENSE_KEY' ) && is_string( MONSTERINSIGHTS_LICENSE_KEY ) && strlen( MONSTERINSIGHTS_LICENSE_KEY ) > 10 ) {
|
368 |
+
$key = MONSTERINSIGHTS_LICENSE_KEY;
|
369 |
+
}
|
370 |
+
}
|
371 |
+
break;
|
372 |
+
case 'om':
|
373 |
+
$option = get_option( 'optin_monster_api' );
|
374 |
+
$key = is_array( $option ) && isset( $option['api']['apikey'] ) ? $option['api']['apikey'] : '';
|
375 |
+
|
376 |
+
// Possibly check for a constant.
|
377 |
+
if ( empty( $key ) && defined( 'OPTINMONSTER_REST_API_LICENSE_KEY' ) ) {
|
378 |
+
$key = OPTINMONSTER_REST_API_LICENSE_KEY;
|
379 |
+
}
|
380 |
+
|
381 |
+
// If the key is still empty, check for the old legacy key.
|
382 |
+
if ( empty( $key ) ) {
|
383 |
+
$key = is_array( $option ) && isset( $option['api']['key'] ) ? $option['api']['key'] : '';
|
384 |
+
}
|
385 |
+
break;
|
386 |
+
}
|
387 |
+
|
388 |
+
// Possibly set the level to 'none' if the key is empty and no level has been set.
|
389 |
+
if ( empty( $key ) && empty( $level ) ) {
|
390 |
+
$level = 'none';
|
391 |
+
}
|
392 |
+
|
393 |
+
// Possibly set the level to 'unknown' if a key is entered, but no level can be determined (such as manually entered key)
|
394 |
+
if ( ! empty( $key ) && empty( $level ) ) {
|
395 |
+
$level = 'unknown';
|
396 |
+
}
|
397 |
+
|
398 |
+
// Normalize the level.
|
399 |
+
switch ( $level ) {
|
400 |
+
case 'bronze':
|
401 |
+
case 'personal':
|
402 |
+
$level = 'basic';
|
403 |
+
break;
|
404 |
+
case 'silver':
|
405 |
+
case 'multi':
|
406 |
+
$level = 'plus';
|
407 |
+
break;
|
408 |
+
case 'gold':
|
409 |
+
case 'developer':
|
410 |
+
$level = 'pro';
|
411 |
+
break;
|
412 |
+
case 'platinum':
|
413 |
+
case 'master':
|
414 |
+
$level = 'ultimate';
|
415 |
+
break;
|
416 |
+
}
|
417 |
+
|
418 |
+
// Return the plan level.
|
419 |
+
return $level;
|
420 |
+
}
|
421 |
+
|
422 |
+
/**
|
423 |
+
* Dismiss the notification via AJAX.
|
424 |
+
*
|
425 |
+
* @since 1.0.0
|
426 |
+
*/
|
427 |
+
public function dismiss_notification() {
|
428 |
+
if ( ! apply_filters( 'am_notifications_display', is_super_admin() ) ) {
|
429 |
+
die;
|
430 |
+
}
|
431 |
+
|
432 |
+
$notification_id = intval( $_POST['notification_id'] );
|
433 |
+
update_post_meta( $notification_id, 'viewed', 1 );
|
434 |
+
die;
|
435 |
+
}
|
436 |
+
|
437 |
+
/**
|
438 |
+
* Revokes notifications.
|
439 |
+
*
|
440 |
+
* @since 1.0.0
|
441 |
+
*
|
442 |
+
* @param array $ids An array of notification IDs to revoke.
|
443 |
+
*/
|
444 |
+
public function revoke_notifications( $ids ) {
|
445 |
+
// Loop through each of the IDs and find the post that has it as meta.
|
446 |
+
foreach ( (array) $ids as $id ) {
|
447 |
+
$notifications = $this->get_plugin_notifications( - 1, array( 'post_status' => 'all', 'meta_key' => 'notification_id', 'meta_value' => $id ) );
|
448 |
+
if ( $notifications ) {
|
449 |
+
foreach ( $notifications as $notification ) {
|
450 |
+
update_post_meta( $notification->ID, 'viewed', 1 );
|
451 |
+
}
|
452 |
+
}
|
453 |
+
}
|
454 |
+
}
|
455 |
+
}
|
456 |
+
}
|
admin/css/gadwp.css
CHANGED
@@ -1 +1,221 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/images/optinmonster.png
ADDED
Binary file
|
admin/images/wpforms.png
ADDED
Binary file
|
admin/item-reports.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
admin/settings.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
@@ -1207,7 +1207,7 @@ final class GADWP_Settings {
|
|
1207 |
return;
|
1208 |
}
|
1209 |
$options = self::update_options( 'general' );
|
1210 |
-
printf( '<div id="gapi-warning" class="updated"><p>%1$s <a href="https://
|
1211 |
if ( null === $gadwp->gapi_controller ) {
|
1212 |
$gadwp->gapi_controller = new GADWP_GAPI_Controller();
|
1213 |
}
|
@@ -1364,7 +1364,7 @@ final class GADWP_Settings {
|
|
1364 |
</tr>
|
1365 |
<tr>
|
1366 |
<td colspan="2" class="gadwp-settings-info">
|
1367 |
-
<?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://
|
1368 |
</td>
|
1369 |
</tr>
|
1370 |
<?php if (! $options['token'] || ($options['user_api'] && ! $options['network_mode'])) : ?>
|
@@ -1523,7 +1523,7 @@ final class GADWP_Settings {
|
|
1523 |
/*
|
1524 |
* Include GAPI
|
1525 |
*/
|
1526 |
-
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://
|
1527 |
|
1528 |
if ( null === $gadwp->gapi_controller ) {
|
1529 |
$gadwp->gapi_controller = new GADWP_GAPI_Controller();
|
@@ -1697,7 +1697,7 @@ final class GADWP_Settings {
|
|
1697 |
</tr>
|
1698 |
<tr>
|
1699 |
<td colspan="2" class="gadwp-settings-info">
|
1700 |
-
<?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://
|
1701 |
</td>
|
1702 |
</tr>
|
1703 |
<?php if ( ! $options['token'] || $options['user_api'] ) : ?>
|
@@ -1865,53 +1865,53 @@ final class GADWP_Settings {
|
|
1865 |
<span><?php _e("Setup Tutorial & Demo",'google-analytics-dashboard-for-wp') ?></span>
|
1866 |
</h3>
|
1867 |
<div class="inside">
|
1868 |
-
<a href="https://
|
1869 |
</div>
|
1870 |
</div>
|
1871 |
<div class="postbox">
|
1872 |
<h3>
|
1873 |
-
<span><?php _e("
|
1874 |
</h3>
|
1875 |
<div class="inside">
|
|
|
|
|
|
|
1876 |
<div class="gadwp-desc">
|
1877 |
-
<
|
1878 |
</div>
|
1879 |
<br />
|
|
|
|
|
|
|
1880 |
<div class="gadwp-desc">
|
1881 |
-
|
1882 |
-
<script src="https://apis.google.com/js/platform.js" async defer></script>
|
1883 |
</div>
|
1884 |
<br />
|
|
|
|
|
|
|
1885 |
<div class="gadwp-desc">
|
1886 |
-
<a href="
|
1887 |
-
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
|
1888 |
</div>
|
1889 |
</div>
|
1890 |
</div>
|
1891 |
<div class="postbox">
|
1892 |
<h3>
|
1893 |
-
<span><?php _e("
|
1894 |
</h3>
|
1895 |
<div class="inside">
|
1896 |
<div class="gadwp-title">
|
1897 |
-
<a href="https://
|
1898 |
</div>
|
1899 |
<div class="gadwp-desc">
|
1900 |
-
<?php printf(__('%s
|
1901 |
</div>
|
1902 |
<br />
|
1903 |
<div class="gadwp-title">
|
1904 |
-
<a href="https://
|
1905 |
-
</div>
|
1906 |
-
<div class="gadwp-desc">
|
1907 |
-
<?php printf(__('%s by moving your website to HTTPS/SSL.', 'google-analytics-dashboard-for-wp'), sprintf('<a href="https://deconf.com/move-website-https-ssl/?utm_source=gadwp_config&utm_medium=link&utm_content=ssl&utm_campaign=gadwp">%s</a>', __('Improve search rankings', 'google-analytics-dashboard-for-wp')));?>
|
1908 |
-
</div>
|
1909 |
-
<br />
|
1910 |
-
<div class="gadwp-title">
|
1911 |
-
<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>
|
1912 |
</div>
|
1913 |
<div class="gadwp-desc">
|
1914 |
-
<?php printf(__('
|
1915 |
</div>
|
1916 |
</div>
|
1917 |
</div>
|
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 |
*/
|
1207 |
return;
|
1208 |
}
|
1209 |
$options = self::update_options( 'general' );
|
1210 |
+
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' ) );
|
1211 |
if ( null === $gadwp->gapi_controller ) {
|
1212 |
$gadwp->gapi_controller = new GADWP_GAPI_Controller();
|
1213 |
}
|
1364 |
</tr>
|
1365 |
<tr>
|
1366 |
<td colspan="2" class="gadwp-settings-info">
|
1367 |
+
<?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')));?>
|
1368 |
</td>
|
1369 |
</tr>
|
1370 |
<?php if (! $options['token'] || ($options['user_api'] && ! $options['network_mode'])) : ?>
|
1523 |
/*
|
1524 |
* Include GAPI
|
1525 |
*/
|
1526 |
+
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>';
|
1527 |
|
1528 |
if ( null === $gadwp->gapi_controller ) {
|
1529 |
$gadwp->gapi_controller = new GADWP_GAPI_Controller();
|
1697 |
</tr>
|
1698 |
<tr>
|
1699 |
<td colspan="2" class="gadwp-settings-info">
|
1700 |
+
<?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')));?>
|
1701 |
</td>
|
1702 |
</tr>
|
1703 |
<?php if ( ! $options['token'] || $options['user_api'] ) : ?>
|
1865 |
<span><?php _e("Setup Tutorial & Demo",'google-analytics-dashboard-for-wp') ?></span>
|
1866 |
</h3>
|
1867 |
<div class="inside">
|
1868 |
+
<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>
|
1869 |
</div>
|
1870 |
</div>
|
1871 |
<div class="postbox">
|
1872 |
<h3>
|
1873 |
+
<span><?php _e("Further Reading",'google-analytics-dashboard-for-wp')?></span>
|
1874 |
</h3>
|
1875 |
<div class="inside">
|
1876 |
+
<div class="gadwp-title">
|
1877 |
+
<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>
|
1878 |
+
</div>
|
1879 |
<div class="gadwp-desc">
|
1880 |
+
<?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')));?>
|
1881 |
</div>
|
1882 |
<br />
|
1883 |
+
<div class="gadwp-title">
|
1884 |
+
<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>
|
1885 |
+
</div>
|
1886 |
<div class="gadwp-desc">
|
1887 |
+
<?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')));?>
|
|
|
1888 |
</div>
|
1889 |
<br />
|
1890 |
+
<div class="gadwp-title">
|
1891 |
+
<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>
|
1892 |
+
</div>
|
1893 |
<div class="gadwp-desc">
|
1894 |
+
<?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')));?>
|
|
|
1895 |
</div>
|
1896 |
</div>
|
1897 |
</div>
|
1898 |
<div class="postbox">
|
1899 |
<h3>
|
1900 |
+
<span><?php _e("Recommended Plugins",'google-analytics-dashboard-for-wp')?></span>
|
1901 |
</h3>
|
1902 |
<div class="inside">
|
1903 |
<div class="gadwp-title">
|
1904 |
+
<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>
|
1905 |
</div>
|
1906 |
<div class="gadwp-desc">
|
1907 |
+
<?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')));?>
|
1908 |
</div>
|
1909 |
<br />
|
1910 |
<div class="gadwp-title">
|
1911 |
+
<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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1912 |
</div>
|
1913 |
<div class="gadwp-desc">
|
1914 |
+
<?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')));?>
|
1915 |
</div>
|
1916 |
</div>
|
1917 |
</div>
|
admin/setup.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
@@ -368,7 +368,7 @@ if ( ! class_exists( 'GADWP_Backend_Setup' ) ) {
|
|
368 |
if ( get_option( 'gadwp_got_updated' ) ) :
|
369 |
?>
|
370 |
<div id="gadwp-notice" class="notice is-dismissible">
|
371 |
-
<p><?php echo sprintf( __('Google Analytics Dashboard for WP has been updated to version %s.', 'google-analytics-dashboard-for-wp' ), GADWP_CURRENT_VERSION).' '.sprintf( __('For details, check out %1$s.', 'google-analytics-dashboard-for-wp' ), sprintf(' <a href="https://
|
372 |
</div>
|
373 |
|
374 |
<?php
|
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 |
*/
|
368 |
if ( get_option( 'gadwp_got_updated' ) ) :
|
369 |
?>
|
370 |
<div id="gadwp-notice" class="notice is-dismissible">
|
371 |
+
<p><?php echo sprintf( __('Google Analytics Dashboard for WP has been updated to version %s.', 'google-analytics-dashboard-for-wp' ), GADWP_CURRENT_VERSION).' '.sprintf( __('For details, check out %1$s.', 'google-analytics-dashboard-for-wp' ), sprintf(' <a href="https://exactmetrics.com/?utm_source=gadwp_notice&utm_medium=link&utm_content=release_notice&utm_campaign=gadwp">%s</a>', __('the plugin documentation', 'google-analytics-dashboard-for-wp') ) ); ?></p>
|
372 |
</div>
|
373 |
|
374 |
<?php
|
admin/views/access-code.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Copyright
|
5 |
-
* Author URI: https://
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
admin/widgets.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
@@ -53,7 +53,7 @@ if ( ! class_exists( 'GADWP_Backend_Widgets' ) ) {
|
|
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://
|
57 |
return;
|
58 |
}
|
59 |
|
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 |
*/
|
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 |
|
common/ajax-actions.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
common/js/reports5.js
CHANGED
@@ -1 +1 @@
|
|
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://deconf.com/google-analytics-dashboard-wordpress/?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()})};
|
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/realtime/jquery.ui.tooltip.html.css
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
/*! jQuery UI - v1.9.2 - 2013-09-22
|
2 |
* http://jqueryui.com
|
3 |
-
* Copyright
|
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}
|
config.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/ajax-actions.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/item-reports.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/setup.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/tracking-analytics.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/tracking-tagmanager.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/tracking.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/views/analytics-amp-clientidapi.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Copyright
|
5 |
-
* Author URI: https://
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/views/analytics-amp-code.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Copyright
|
5 |
-
* Author URI: https://
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/views/analytics-code.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Copyright
|
5 |
-
* Author URI: https://
|
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 GADWP v<?php echo GADWP_CURRENT_VERSION; ?> Universal Analytics - https://
|
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),
|
@@ -19,7 +19,7 @@
|
|
19 |
</script>
|
20 |
<!-- END GADWP Universal Analytics -->
|
21 |
<?php else:?>
|
22 |
-
<!-- BEGIN GADWP v<?php echo GADWP_CURRENT_VERSION; ?> Global Site Tag - https://
|
23 |
<script async src="<?php echo $data['tracking_script_path']?>?id=<?php echo $data['uaid']?>"></script>
|
24 |
<script>
|
25 |
window.dataLayer = window.dataLayer || [];
|
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 GADWP 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),
|
19 |
</script>
|
20 |
<!-- END GADWP Universal Analytics -->
|
21 |
<?php else:?>
|
22 |
+
<!-- BEGIN GADWP 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 || [];
|
front/views/analytics-optout-code.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Copyright 2018
|
5 |
-
* Author URI: https://
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/views/optimize-code.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Copyright
|
5 |
-
* Author URI: https://
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/views/tagmanager-amp-code.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Copyright 2018
|
5 |
-
* Author URI: https://
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
front/views/tagmanager-code.php
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Copyright
|
5 |
-
* Author URI: https://
|
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://
|
11 |
<script>
|
12 |
window.dataLayer = window.dataLayer || [];
|
13 |
window.dataLayer.push(<?php echo $data['vars']; ?>);
|
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']; ?>);
|
front/widgets.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
@@ -38,7 +38,7 @@ final class GADWP_Frontend_Widget extends WP_Widget {
|
|
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://
|
42 |
echo $args['before_widget'];
|
43 |
if ( ! empty( $widget_title ) ) {
|
44 |
echo $args['before_title'] . $widget_title . $args['after_title'];
|
@@ -134,7 +134,7 @@ final class GADWP_Frontend_Widget extends WP_Widget {
|
|
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://
|
138 |
</div>
|
139 |
|
140 |
<?php
|
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 |
*/
|
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'];
|
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
|
gadwp.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Google Analytics Dashboard for WP (GADWP)
|
4 |
-
* Plugin URI: https://
|
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:
|
7 |
-
* Version: 5.3.
|
8 |
-
* Author URI: https://
|
9 |
* Text Domain: google-analytics-dashboard-for-wp
|
10 |
* Domain Path: /languages
|
11 |
*/
|
@@ -16,11 +16,11 @@ if ( ! defined( 'ABSPATH' ) )
|
|
16 |
|
17 |
// Plugin Version
|
18 |
if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) {
|
19 |
-
define( 'GADWP_CURRENT_VERSION', '5.3.
|
20 |
}
|
21 |
|
22 |
if ( ! defined( 'GADWP_ENDPOINT_URL' ) ) {
|
23 |
-
define( 'GADWP_ENDPOINT_URL', 'https://gadwp.
|
24 |
}
|
25 |
|
26 |
|
@@ -85,6 +85,9 @@ if ( ! class_exists( 'GADWP_Manager' ) ) {
|
|
85 |
self::$instance = new self();
|
86 |
self::$instance->setup();
|
87 |
self::$instance->config = new GADWP_Config();
|
|
|
|
|
|
|
88 |
}
|
89 |
return self::$instance;
|
90 |
}
|
@@ -109,6 +112,13 @@ if ( ! class_exists( 'GADWP_Manager' ) ) {
|
|
109 |
define( 'GADWP_FILE', __FILE__ );
|
110 |
}
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
/*
|
113 |
* Load Tools class
|
114 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Google Analytics Dashboard for WP (GADWP)
|
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 team
|
7 |
+
* Version: 5.3.3
|
8 |
+
* Author URI: https://exactmetrics.com
|
9 |
* Text Domain: google-analytics-dashboard-for-wp
|
10 |
* Domain Path: /languages
|
11 |
*/
|
16 |
|
17 |
// Plugin Version
|
18 |
if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) {
|
19 |
+
define( 'GADWP_CURRENT_VERSION', '5.3.3' );
|
20 |
}
|
21 |
|
22 |
if ( ! defined( 'GADWP_ENDPOINT_URL' ) ) {
|
23 |
+
define( 'GADWP_ENDPOINT_URL', 'https://gadwp.exactmetrics.com/' );
|
24 |
}
|
25 |
|
26 |
|
85 |
self::$instance = new self();
|
86 |
self::$instance->setup();
|
87 |
self::$instance->config = new GADWP_Config();
|
88 |
+
if ( is_admin() && class_exists( 'AM_Notification' ) && defined( 'GADWP_CURRENT_VERSION' ) ) {
|
89 |
+
new AM_Notification( 'exact-metrics', GADWP_CURRENT_VERSION );
|
90 |
+
}
|
91 |
}
|
92 |
return self::$instance;
|
93 |
}
|
112 |
define( 'GADWP_FILE', __FILE__ );
|
113 |
}
|
114 |
|
115 |
+
/*
|
116 |
+
* Load notifications class
|
117 |
+
*/
|
118 |
+
if ( is_admin() ) {
|
119 |
+
include_once ( GADWP_DIR . 'admin/class-am-notification.php' );
|
120 |
+
}
|
121 |
+
|
122 |
/*
|
123 |
* Load Tools class
|
124 |
*/
|
install/install.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
install/uninstall.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Google Analytics Dashboard for WP (GADWP) ===
|
2 |
-
Contributors:
|
3 |
-
Donate link:
|
4 |
Tags: analytics,google analytics,google analytics dashboard,google analytics plugin,google analytics widget,gtag
|
5 |
Requires at least: 3.5
|
6 |
-
Tested up to: 4.9
|
7 |
-
Stable tag: 5.3.
|
8 |
Requires PHP: 5.2.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -112,13 +112,7 @@ This plugin is fully compatible with multisite network installs, allowing three
|
|
112 |
- Mode 3: network deactivated using multiple Google Analytics accounts
|
113 |
|
114 |
> <strong>Google Analytics Dashboard for WP on GitHub</strong><br>
|
115 |
-
> You can submit feature requests or bugs on [Google Analytics Dashboard for WP](https://github.com/
|
116 |
-
|
117 |
-
= Further reading =
|
118 |
-
|
119 |
-
* Homepage of [Google Analytics Dashboard for WP](https://deconf.com/google-analytics-dashboard-wordpress/)
|
120 |
-
* Other [WordPress Plugins](https://deconf.com/wordpress/) by same author
|
121 |
-
* [Google Analytics | Partners](https://www.google.com/analytics/partners/company/5127525902581760/gadp/5629499534213120/app/5707702298738688/listing/5639274879778816) Gallery
|
122 |
|
123 |
== Installation ==
|
124 |
|
@@ -141,11 +135,11 @@ We are constantly improving Google Analytics Dashboard for WP, sometimes the vid
|
|
141 |
|
142 |
= How can I suggest a new feature, contribute or report a bug? =
|
143 |
|
144 |
-
You can submit pull requests, feature requests and bug reports on [our GitHub repository](https://github.com/
|
145 |
|
146 |
= Documentation, Tutorials and FAQ =
|
147 |
|
148 |
-
For documentation, tutorials, FAQ and videos check out: [Google Analytics Dashboard for WP documentation](https://
|
149 |
|
150 |
== Screenshots ==
|
151 |
|
@@ -171,13 +165,18 @@ Google Analytics Dashboard for WP it's released under the GPLv2, you can use it
|
|
171 |
|
172 |
== Changelog ==
|
173 |
|
174 |
-
[GADWP v5.3 release notes](https://
|
|
|
|
|
|
|
|
|
|
|
175 |
|
176 |
= 5.3.2 =
|
177 |
* Bug Fixes:
|
178 |
* fixes for user opt-out feature
|
179 |
* Enhancements:
|
180 |
-
* use <em>gadwp_useroptout</em> shortcode to easily generate opt-out buttons and links, [more details](https://
|
181 |
* adding <em>gadwp_gtag_commands</em> and <em>gadwp_gtag_script_path</em> hooks to allow further gtag (Global Site Tag) code customization
|
182 |
* adds opt-out and DNT support for Google Tag Manager
|
183 |
|
@@ -245,4 +244,4 @@ Google Analytics Dashboard for WP it's released under the GPLv2, you can use it
|
|
245 |
* fix for inline SVG links, props by [Andrew Minion](https://github.com/macbookandrew)
|
246 |
* fixes a bug on affiliate events tracking
|
247 |
|
248 |
-
The full changelog is [available here](https://
|
1 |
=== Google Analytics Dashboard for WP (GADWP) ===
|
2 |
+
Contributors: chriscct7, smub
|
3 |
+
Donate link: http://www.wpbeginner.com/wpbeginner-needs-your-help/
|
4 |
Tags: analytics,google analytics,google analytics dashboard,google analytics plugin,google analytics widget,gtag
|
5 |
Requires at least: 3.5
|
6 |
+
Tested up to: 4.9
|
7 |
+
Stable tag: 5.3.3
|
8 |
Requires PHP: 5.2.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
112 |
- Mode 3: network deactivated using multiple Google Analytics accounts
|
113 |
|
114 |
> <strong>Google Analytics Dashboard for WP on GitHub</strong><br>
|
115 |
+
> You can submit feature requests or bugs on [Google Analytics Dashboard for WP](https://github.com/awesomemotive/Google-Analytics-Dashboard-for-WP) repository.
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
== Installation ==
|
118 |
|
135 |
|
136 |
= How can I suggest a new feature, contribute or report a bug? =
|
137 |
|
138 |
+
You can submit pull requests, feature requests and bug reports on [our GitHub repository](https://github.com/awesomemotive/Google-Analytics-Dashboard-for-WP).
|
139 |
|
140 |
= Documentation, Tutorials and FAQ =
|
141 |
|
142 |
+
For documentation, tutorials, FAQ and videos check out: [Google Analytics Dashboard for WP documentation](https://exactmetrics.com/).
|
143 |
|
144 |
== Screenshots ==
|
145 |
|
165 |
|
166 |
== Changelog ==
|
167 |
|
168 |
+
[GADWP v5.3 release notes](https://exactmetrics.com/adding-gtag-js-to-your-site/)
|
169 |
+
|
170 |
+
= 5.3.3 =
|
171 |
+
* Bug Fixes:
|
172 |
+
* Updated endpoint for GA auth to use updated system.
|
173 |
+
* Fixed a bug where the opt-out and exclude DNT options were listed twice.
|
174 |
|
175 |
= 5.3.2 =
|
176 |
* Bug Fixes:
|
177 |
* fixes for user opt-out feature
|
178 |
* Enhancements:
|
179 |
+
* use <em>gadwp_useroptout</em> shortcode to easily generate opt-out buttons and links, [more details](https://exactmetrics.com/google-analytics-gdpr-and-user-data-privacy-compliance)
|
180 |
* adding <em>gadwp_gtag_commands</em> and <em>gadwp_gtag_script_path</em> hooks to allow further gtag (Global Site Tag) code customization
|
181 |
* adds opt-out and DNT support for Google Tag Manager
|
182 |
|
244 |
* fix for inline SVG links, props by [Andrew Minion](https://github.com/macbookandrew)
|
245 |
* fixes a bug on affiliate events tracking
|
246 |
|
247 |
+
The full changelog is [available here](https://exactmetrics.com/changelog-google-analytics-dashboard-for-wp/).
|
realtime/jquery/jquery.ui.tooltip.html.css
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
/*! jQuery UI - v1.9.2 - 2013-09-22
|
2 |
* http://jqueryui.com
|
3 |
-
* Copyright
|
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{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{background-image:none}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.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}.ui-widget-header a{color:#222}
|
tools/gapi.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
tools/iso3166.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author:
|
4 |
-
* Author URI: https://
|
5 |
-
* Copyright
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
*/
|
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 |
*/
|
tools/src/Deconf/Auth/Exception.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
* Copyright
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Copyright 2018 Google Inc.
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
tools/src/Deconf/Cache/Exception.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
* Copyright
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Copyright 2018 Google Inc.
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
tools/src/Deconf/Exception.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
* Copyright
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Copyright 2018 Google Inc.
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
tools/src/Deconf/IO/Abstract.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
* Copyright
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Copyright 2018 Google Inc.
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
tools/src/Deconf/IO/Exception.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
* Copyright
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Copyright 2018 Google Inc.
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
tools/src/Deconf/IO/Stream.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
* Copyright
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Copyright 2018 Google Inc.
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
tools/src/Deconf/Utils/URITemplate.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
* Copyright
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
1 |
<?php
|
2 |
/*
|
3 |
+
* Copyright 2018 Google Inc.
|
4 |
*
|
5 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
6 |
* you may not use this file except in compliance with the License.
|
tools/src/readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
-
* Author:
|
3 |
-
* Author URI: https://
|
4 |
-
* Copyright
|
5 |
* License: GPLv2 or later
|
6 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
|