Google Analytics Dashboard for WP (GADWP) - Version 4.8.2

Version Description

  • Bug Fix: use only unique CSS selectors to avoid conflicts with other plugins
  • Bug Fix: don't load unneeded CSS styles on frontend
  • Bug Fix: switch to a new custom made cache system to avoid issues with broken transients
  • Enhancement: rebuild and roll-back to a bearer token
  • Enhancement: Greek translation updated
Download this release

Release Info

Developer deconf
Plugin Icon 128x128 Google Analytics Dashboard for WP (GADWP)
Version 4.8.2
Comparing to
See all releases

Code changes from version 4.8.1.3 to 4.8.2

admin/css/gadwp.css CHANGED
@@ -5,21 +5,21 @@
5
  }
6
 
7
  /* Options pages */
8
- table.options {
9
  padding-left: 10px;
10
  width: 100%;
11
  }
12
 
13
- .options td {
14
  padding: 0px 5px 5px 5px;
15
  }
16
 
17
- td.title, td.info {
18
  width: 130px;
19
  padding-left: 20px;
20
  }
21
 
22
- td.title-select {
23
  width: 300px;
24
  }
25
 
@@ -27,15 +27,11 @@ td.title-select {
27
  padding-left: 15px;
28
  }
29
 
30
- td.debugging {
31
- width: 300px;
32
- }
33
-
34
- td.info {
35
  padding-bottom: 15px;
36
  }
37
 
38
- td.title label {
39
  font-weight: bold;
40
  }
41
 
@@ -54,15 +50,11 @@ td.title label {
54
  vertical-align: top;
55
  }
56
 
57
- pre.gadash {
58
-
59
- }
60
-
61
- pre.log_data {
62
  white-space: pre-wrap;
63
  }
64
 
65
- td.roles {
66
  padding-bottom: 15px;
67
  }
68
 
@@ -70,20 +62,16 @@ td.roles {
70
  width: 50px;
71
  }
72
 
73
- .event-option, .event-option-desc {
74
- float: left;
75
- }
76
-
77
  #gapi-access-code {
78
  color: red !important;
79
  }
80
 
81
- #poststuff h2 {
82
  padding-bottom: 0;
83
  }
84
 
85
  /* Options pages ON/OFF Switch */
86
- .onoffswitch {
87
  position: relative;
88
  width: 50px;
89
  float: left;
@@ -99,11 +87,11 @@ td.roles {
99
  -ms-user-select: none;
100
  }
101
 
102
- .onoffswitch-checkbox {
103
  display: none !important;
104
  }
105
 
106
- .onoffswitch-label {
107
  display: block;
108
  overflow: hidden;
109
  cursor: pointer;
@@ -112,7 +100,7 @@ td.roles {
112
  border-radius: 2px;
113
  }
114
 
115
- .onoffswitch-inner {
116
  width: 200%;
117
  margin-left: -100%;
118
  border-radius: 2px;
@@ -122,7 +110,7 @@ td.roles {
122
  transition: margin 0.2s ease-in 0s;
123
  }
124
 
125
- .onoffswitch-inner:before, .onoffswitch-inner:after {
126
  float: left;
127
  width: 50%;
128
  font-weight: normal;
@@ -135,7 +123,7 @@ td.roles {
135
  font-size: 12px;
136
  }
137
 
138
- .onoffswitch-inner:before {
139
  content: "On";
140
  padding-left: 5px;
141
  border-bottom: none;
@@ -143,14 +131,14 @@ td.roles {
143
  color: #fff; /* inherit from button props */
144
  }
145
 
146
- .onoffswitch-inner:after {
147
  content: "Off";
148
  padding-right: 5px;
149
  background-color: #ddd;
150
  text-align: right;
151
  }
152
 
153
- .onoffswitch-switch {
154
  width: 22px;
155
  height: 22px;
156
  background: #fff;
@@ -167,12 +155,12 @@ td.roles {
167
  transition: all 0.2s ease-in 0s;
168
  }
169
 
170
- .onoffswitch-switch:hover {
171
  color: #aaa;
172
  border-color: #aaa;
173
  }
174
 
175
- .onoffswitch-switch:after {
176
  margin: 0;
177
  outline: 0;
178
  display: inline-block;
@@ -185,11 +173,11 @@ td.roles {
185
  -moz-osx-font-smoothing: grayscale;
186
  }
187
 
188
- .onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner {
189
  margin-left: 0;
190
  }
191
 
192
- .onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch {
193
  right: 0px;
194
  }
195
 
5
  }
6
 
7
  /* Options pages */
8
+ table.gadwp-settings-options {
9
  padding-left: 10px;
10
  width: 100%;
11
  }
12
 
13
+ .gadwp-settings-options td {
14
  padding: 0px 5px 5px 5px;
15
  }
16
 
17
+ td.gadwp-settings-title, td.info {
18
  width: 130px;
19
  padding-left: 20px;
20
  }
21
 
22
+ td.gadwp-settings-title-s {
23
  width: 300px;
24
  }
25
 
27
  padding-left: 15px;
28
  }
29
 
30
+ td.gadwp-settings-info {
 
 
 
 
31
  padding-bottom: 15px;
32
  }
33
 
34
+ td.gadwp-settings-title label {
35
  font-weight: bold;
36
  }
37
 
50
  vertical-align: top;
51
  }
52
 
53
+ pre.gadwp-settings-logdata {
 
 
 
 
54
  white-space: pre-wrap;
55
  }
56
 
57
+ td.gadwp-settings-roles {
58
  padding-bottom: 15px;
59
  }
60
 
62
  width: 50px;
63
  }
64
 
 
 
 
 
65
  #gapi-access-code {
66
  color: red !important;
67
  }
68
 
69
+ #poststuff.gadwp h2 {
70
  padding-bottom: 0;
71
  }
72
 
73
  /* Options pages ON/OFF Switch */
74
+ .gadwp-settings-switchoo {
75
  position: relative;
76
  width: 50px;
77
  float: left;
87
  -ms-user-select: none;
88
  }
89
 
90
+ .gadwp-settings-switchoo-checkbox {
91
  display: none !important;
92
  }
93
 
94
+ .gadwp-settings-switchoo-label {
95
  display: block;
96
  overflow: hidden;
97
  cursor: pointer;
100
  border-radius: 2px;
101
  }
102
 
103
+ .gadwp-settings-switchoo-inner {
104
  width: 200%;
105
  margin-left: -100%;
106
  border-radius: 2px;
110
  transition: margin 0.2s ease-in 0s;
111
  }
112
 
113
+ .gadwp-settings-switchoo-inner:before, .gadwp-settings-switchoo-inner:after {
114
  float: left;
115
  width: 50%;
116
  font-weight: normal;
123
  font-size: 12px;
124
  }
125
 
126
+ .gadwp-settings-switchoo-inner:before {
127
  content: "On";
128
  padding-left: 5px;
129
  border-bottom: none;
131
  color: #fff; /* inherit from button props */
132
  }
133
 
134
+ .gadwp-settings-switchoo-inner:after {
135
  content: "Off";
136
  padding-right: 5px;
137
  background-color: #ddd;
138
  text-align: right;
139
  }
140
 
141
+ .gadwp-settings-switchoo-switch {
142
  width: 22px;
143
  height: 22px;
144
  background: #fff;
155
  transition: all 0.2s ease-in 0s;
156
  }
157
 
158
+ .gadwp-settings-switchoo-switch:hover {
159
  color: #aaa;
160
  border-color: #aaa;
161
  }
162
 
163
+ .gadwp-settings-switchoo-switch:after {
164
  margin: 0;
165
  outline: 0;
166
  display: inline-block;
173
  -moz-osx-font-smoothing: grayscale;
174
  }
175
 
176
+ .gadwp-settings-switchoo-checkbox:checked+.gadwp-settings-switchoo-label .gadwp-settings-switchoo-inner {
177
  margin-left: 0;
178
  }
179
 
180
+ .gadwp-settings-switchoo-checkbox:checked+.gadwp-settings-switchoo-label .gadwp-settings-switchoo-switch {
181
  right: 0px;
182
  }
183
 
admin/settings.php CHANGED
@@ -99,19 +99,19 @@ final class GADWP_Settings {
99
  <div class="wrap">
100
  <?php echo "<h2>" . __( "Google Analytics Frontend Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?><hr>
101
  </div>
102
- <div id="poststuff">
103
  <div id="post-body" class="metabox-holder columns-2">
104
  <div id="post-body-content">
105
  <div class="settings-wrapper">
106
  <div class="inside">
107
  <?php if (isset($message)) echo $message; ?>
108
- <table class="options">
109
  <tr>
110
  <td colspan="2"><?php echo "<h2>" . __( "Permissions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
111
  </tr>
112
  <tr>
113
- <td class="roles title"><label for="ga_dash_access_front"><?php _e("Show stats to:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
114
- <td class="roles">
115
  <?php
116
  if ( ! isset( $wp_roles ) ) {
117
  $wp_roles = new WP_Roles();
@@ -144,11 +144,11 @@ final class GADWP_Settings {
144
  </td>
145
  </tr>
146
  <tr>
147
- <td colspan="2" class="title">
148
- <div class="button-primary onoffswitch">
149
- <input type="checkbox" name="options[frontend_item_reports]" value="1" class="onoffswitch-checkbox" id="frontend_item_reports" <?php checked( $options['frontend_item_reports'], 1 ); ?>> <label class="onoffswitch-label" for="frontend_item_reports">
150
- <div class="onoffswitch-inner"></div>
151
- <div class="onoffswitch-switch"></div>
152
  </label>
153
  </div>
154
  <div class="switch-desc"><?php echo " ".__("enable web page reports on frontend", 'google-analytics-dashboard-for-wp' );?></div>
@@ -194,19 +194,19 @@ final class GADWP_Settings {
194
  <div class="wrap">
195
  <?php echo "<h2>" . __( "Google Analytics Backend Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?><hr>
196
  </div>
197
- <div id="poststuff">
198
  <div id="post-body" class="metabox-holder columns-2">
199
  <div id="post-body-content">
200
  <div class="settings-wrapper">
201
  <div class="inside">
202
  <?php if (isset($message)) echo $message; ?>
203
- <table class="options">
204
  <tr>
205
  <td colspan="2"><?php echo "<h2>" . __( "Permissions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
206
  </tr>
207
  <tr>
208
- <td class="roles title"><label for="ga_dash_access_back"><?php _e("Show stats to:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
209
- <td class="roles">
210
  <?php
211
  if ( ! isset( $wp_roles ) ) {
212
  $wp_roles = new WP_Roles();
@@ -241,33 +241,33 @@ final class GADWP_Settings {
241
  </td>
242
  </tr>
243
  <tr>
244
- <td colspan="2" class="title">
245
- <div class="button-primary onoffswitch">
246
- <input type="checkbox" name="options[switch_profile]" value="1" class="onoffswitch-checkbox" id="switch_profile" <?php checked( $options['switch_profile'], 1 ); ?>> <label class="onoffswitch-label" for="switch_profile">
247
- <div class="onoffswitch-inner"></div>
248
- <div class="onoffswitch-switch"></div>
249
  </label>
250
  </div>
251
  <div class="switch-desc"><?php _e ( "enable Switch View functionality", 'google-analytics-dashboard-for-wp' );?></div>
252
  </td>
253
  </tr>
254
  <tr>
255
- <td colspan="2" class="title">
256
- <div class="button-primary onoffswitch">
257
- <input type="checkbox" name="options[backend_item_reports]" value="1" class="onoffswitch-checkbox" id="backend_item_reports" <?php checked( $options['backend_item_reports'], 1 ); ?>> <label class="onoffswitch-label" for="backend_item_reports">
258
- <div class="onoffswitch-inner"></div>
259
- <div class="onoffswitch-switch"></div>
260
  </label>
261
  </div>
262
  <div class="switch-desc"><?php _e ( "enable reports on Posts List and Pages List", 'google-analytics-dashboard-for-wp' );?></div>
263
  </td>
264
  </tr>
265
  <tr>
266
- <td colspan="2" class="title">
267
- <div class="button-primary onoffswitch">
268
- <input type="checkbox" name="options[dashboard_widget]" value="1" class="onoffswitch-checkbox" id="dashboard_widget" <?php checked( $options['dashboard_widget'], 1 ); ?>> <label class="onoffswitch-label" for="dashboard_widget">
269
- <div class="onoffswitch-inner"></div>
270
- <div class="onoffswitch-switch"></div>
271
  </label>
272
  </div>
273
  <div class="switch-desc"><?php _e ( "enable the main Dashboard Widget", 'google-analytics-dashboard-for-wp' );?></div>
@@ -277,7 +277,7 @@ final class GADWP_Settings {
277
  <td colspan="2"><hr><?php echo "<h2>" . __( "Real-Time Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
278
  </tr>
279
  <tr>
280
- <td colspan="2" class="title"> <?php _e("Maximum number of pages to display on real-time tab:", 'google-analytics-dashboard-for-wp'); ?>
281
  <input type="number" name="options[ga_realtime_pages]" id="ga_realtime_pages" value="<?php echo (int)$options['ga_realtime_pages']; ?>" size="3">
282
  </td>
283
  </tr>
@@ -285,7 +285,7 @@ final class GADWP_Settings {
285
  <td colspan="2"><hr><?php echo "<h2>" . __( "Location Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
286
  </tr>
287
  <tr>
288
- <td colspan="2" class="title">
289
  <?php echo __("Target Geo Map to country:", 'google-analytics-dashboard-for-wp'); ?>
290
  <input type="text" style="text-align: center;" name="options[ga_target_geomap]" value="<?php echo esc_attr($options['ga_target_geomap']); ?>" size="3">
291
  </td>
@@ -331,7 +331,7 @@ final class GADWP_Settings {
331
  <div class="wrap">
332
  <?php echo "<h2>" . __( "Google Analytics Tracking Code", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
333
  </div>
334
- <div id="poststuff">
335
  <div id="post-body" class="metabox-holder columns-2">
336
  <div id="post-body-content">
337
  <div class="settings-wrapper">
@@ -348,12 +348,12 @@ final class GADWP_Settings {
348
  echo $message;
349
  ?>
350
  <div id="gadwp-basic">
351
- <table class="options">
352
  <tr>
353
  <td colspan="2"><?php echo "<h2>" . __( "Tracking Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
354
  </tr>
355
  <tr>
356
- <td class="title"><label for="ga_dash_tracking"><?php _e("Tracking Options:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
357
  <td><select id="ga_dash_tracking" name="options[ga_dash_tracking]" onchange="this.form.submit()">
358
  <option value="0" <?php selected( $options['ga_dash_tracking'], 0 ); ?>><?php _e("Disabled", 'google-analytics-dashboard-for-wp');?></option>
359
  <option value="1" <?php selected( $options['ga_dash_tracking'], 1 ); ?>><?php _e("Enabled", 'google-analytics-dashboard-for-wp');?></option>
@@ -361,7 +361,7 @@ final class GADWP_Settings {
361
  </tr>
362
  <?php if ($options['ga_dash_tracking']) {?>
363
  <tr>
364
- <td class="title"></td>
365
  <td>
366
  <?php $profile_info = GADWP_Tools::get_selected_profile($gadwp->config->options['ga_dash_profile_list'], $gadwp->config->options['ga_dash_tableid_jail']); ?>
367
  <?php echo '<pre>' . __("View Name:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[0]) . "<br />" . __("Tracking ID:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[2]) . "<br />" . __("Default URL:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[3]) . "<br />" . __("Time Zone:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[5]) . '</pre>';?>
@@ -372,29 +372,29 @@ final class GADWP_Settings {
372
  <td colspan="2"><hr><?php echo "<h2>" . __( "Basic Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
373
  </tr>
374
  <tr>
375
- <td class="title"><label for="ga_dash_tracking_type"><?php _e("Tracking Type:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
376
  <td><select id="ga_dash_tracking_type" name="options[ga_dash_tracking_type]">
377
  <option value="classic" <?php selected( $options['ga_dash_tracking_type'], 'classic' ); ?>><?php _e("Classic Analytics", 'google-analytics-dashboard-for-wp');?></option>
378
  <option value="universal" <?php selected( $options['ga_dash_tracking_type'], 'universal' ); ?>><?php _e("Universal Analytics", 'google-analytics-dashboard-for-wp');?></option>
379
  </select></td>
380
  </tr>
381
  <tr>
382
- <td colspan="2" class="title">
383
- <div class="button-primary onoffswitch">
384
- <input type="checkbox" name="options[ga_dash_anonim]" value="1" class="onoffswitch-checkbox" id="ga_dash_anonim" <?php checked( $options['ga_dash_anonim'], 1 ); ?>> <label class="onoffswitch-label" for="ga_dash_anonim">
385
- <div class="onoffswitch-inner"></div>
386
- <div class="onoffswitch-switch"></div>
387
  </label>
388
  </div>
389
  <div class="switch-desc"><?php echo " ".__("anonymize IPs while tracking", 'google-analytics-dashboard-for-wp' );?></div>
390
  </td>
391
  </tr>
392
  <tr>
393
- <td colspan="2" class="title">
394
- <div class="button-primary onoffswitch">
395
- <input type="checkbox" name="options[ga_dash_remarketing]" value="1" class="onoffswitch-checkbox" id="ga_dash_remarketing" <?php checked( $options['ga_dash_remarketing'], 1 ); ?>> <label class="onoffswitch-label" for="ga_dash_remarketing">
396
- <div class="onoffswitch-inner"></div>
397
- <div class="onoffswitch-switch"></div>
398
  </label>
399
  </div>
400
  <div class="switch-desc"><?php echo " ".__("enable remarketing, demographics and interests reports", 'google-analytics-dashboard-for-wp' );?></div>
@@ -403,46 +403,46 @@ final class GADWP_Settings {
403
  </table>
404
  </div>
405
  <div id="gadwp-events">
406
- <table class="options">
407
  <tr>
408
  <td colspan="2"><?php echo "<h2>" . __( "Events Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
409
  </tr>
410
  <tr>
411
- <td colspan="2" class="title">
412
- <div class="button-primary onoffswitch">
413
- <input type="checkbox" name="options[ga_event_tracking]" value="1" class="onoffswitch-checkbox" id="ga_event_tracking" <?php checked( $options['ga_event_tracking'], 1 ); ?>> <label class="onoffswitch-label" for="ga_event_tracking">
414
- <div class="onoffswitch-inner"></div>
415
- <div class="onoffswitch-switch"></div>
416
  </label>
417
  </div>
418
  <div class="switch-desc"><?php echo " ".__("track downloads, mailto and outbound links", 'google-analytics-dashboard-for-wp' ); ?></div>
419
  </td>
420
  </tr>
421
  <tr>
422
- <td class="title"><label for="ga_event_downloads"><?php _e("Downloads Regex:", 'google-analytics-dashboard-for-wp'); ?></label></td>
423
  <td><input type="text" id="ga_event_downloads" name="options[ga_event_downloads]" value="<?php echo esc_attr($options['ga_event_downloads']); ?>" size="50"></td>
424
  </tr>
425
  <tr>
426
- <td colspan="2" class="title">
427
- <div class="button-primary onoffswitch">
428
- <input type="checkbox" name="options[ga_aff_tracking]" value="1" class="onoffswitch-checkbox" id="ga_aff_tracking" <?php checked( $options['ga_aff_tracking'], 1 ); ?>> <label class="onoffswitch-label" for="ga_aff_tracking">
429
- <div class="onoffswitch-inner"></div>
430
- <div class="onoffswitch-switch"></div>
431
  </label>
432
  </div>
433
  <div class="switch-desc"><?php echo " ".__("track affiliate links matching this regex", 'google-analytics-dashboard-for-wp' ); ?></div>
434
  </td>
435
  </tr>
436
  <tr>
437
- <td class="title"><label for="ga_event_affiliates"><?php _e("Affiliates Regex:", 'google-analytics-dashboard-for-wp'); ?></label></td>
438
  <td><input type="text" id="ga_event_affiliates" name="options[ga_event_affiliates]" value="<?php echo esc_attr($options['ga_event_affiliates']); ?>" size="50"></td>
439
  </tr>
440
  <tr>
441
- <td colspan="2" class="title">
442
- <div class="button-primary onoffswitch">
443
- <input type="checkbox" name="options[ga_hash_tracking]" value="1" class="onoffswitch-checkbox" id="ga_hash_tracking" <?php checked( $options['ga_hash_tracking'], 1 ); ?>> <label class="onoffswitch-label" for="ga_hash_tracking">
444
- <div class="onoffswitch-inner"></div>
445
- <div class="onoffswitch-switch"></div>
446
  </label>
447
  </div>
448
  <div class="switch-desc"><?php echo " ".__("track fragment identifiers, hashmarks (#) in URI links", 'google-analytics-dashboard-for-wp' ); ?></div>
@@ -451,12 +451,12 @@ final class GADWP_Settings {
451
  </table>
452
  </div>
453
  <div id="gadwp-custom">
454
- <table class="options">
455
  <tr>
456
  <td colspan="2"><?php echo "<h2>" . __( "Custom Definitions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
457
  </tr>
458
  <tr>
459
- <td class="title"><label for="ga_author_dimindex"><?php _e("Authors:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
460
  <td><select id="ga_author_dimindex" name="options[ga_author_dimindex]">
461
  <?php for ($i=0;$i<21;$i++){?>
462
  <option value="<?php echo $i;?>" <?php selected( $options['ga_author_dimindex'], $i ); ?>><?php echo $i==0?'Disabled':'dimension '.$i; ?></option>
@@ -464,7 +464,7 @@ final class GADWP_Settings {
464
  </select></td>
465
  </tr>
466
  <tr>
467
- <td class="title"><label for="ga_pubyear_dimindex"><?php _e("Publication Year:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
468
  <td><select id="ga_pubyear_dimindex" name="options[ga_pubyear_dimindex]">
469
  <?php for ($i=0;$i<21;$i++){?>
470
  <option value="<?php echo $i;?>" <?php selected( $options['ga_pubyear_dimindex'], $i ); ?>><?php echo $i==0?'Disabled':'dimension '.$i; ?></option>
@@ -472,7 +472,7 @@ final class GADWP_Settings {
472
  </select></td>
473
  </tr>
474
  <tr>
475
- <td class="title"><label for="ga_category_dimindex"><?php _e("Categories:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
476
  <td><select id="ga_category_dimindex" name="options[ga_category_dimindex]">
477
  <?php for ($i=0;$i<21;$i++){?>
478
  <option value="<?php echo $i;?>" <?php selected( $options['ga_category_dimindex'], $i ); ?>><?php echo $i==0?'Disabled':'dimension '.$i; ?></option>
@@ -480,7 +480,7 @@ final class GADWP_Settings {
480
  </select></td>
481
  </tr>
482
  <tr>
483
- <td class="title"><label for="ga_user_dimindex"><?php _e("User Type:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
484
  <td><select id="ga_user_dimindex" name="options[ga_user_dimindex]">
485
  <?php for ($i=0;$i<21;$i++){?>
486
  <option value="<?php echo $i;?>" <?php selected( $options['ga_user_dimindex'], $i ); ?>><?php echo $i==0?'Disabled':'dimension '.$i; ?></option>
@@ -490,72 +490,72 @@ final class GADWP_Settings {
490
  </table>
491
  </div>
492
  <div id="gadwp-advanced">
493
- <table class="options">
494
  <tr>
495
  <td colspan="2"><?php echo "<h2>" . __( "Advanced Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
496
  </tr>
497
  <tr>
498
- <td class="title"><label for="ga_speed_samplerate"><?php _e("Page Speed SR:", 'google-analytics-dashboard-for-wp'); ?></label></td>
499
  <td><input type="number" id="ga_speed_samplerate" name="options[ga_speed_samplerate]" value="<?php echo (int)($options['ga_speed_samplerate']); ?>" max="100" min="1"> %</td>
500
  </tr>
501
  <tr>
502
- <td colspan="2" class="title">
503
- <div class="button-primary onoffswitch">
504
- <input type="checkbox" name="options[ga_event_bouncerate]" value="1" class="onoffswitch-checkbox" id="ga_event_bouncerate" <?php checked( $options['ga_event_bouncerate'], 1 ); ?>> <label class="onoffswitch-label" for="ga_event_bouncerate">
505
- <div class="onoffswitch-inner"></div>
506
- <div class="onoffswitch-switch"></div>
507
  </label>
508
  </div>
509
  <div class="switch-desc"><?php echo " ".__("exclude events from bounce-rate calculation", 'google-analytics-dashboard-for-wp' );?></div>
510
  </td>
511
  </tr>
512
  <tr>
513
- <td colspan="2" class="title">
514
- <div class="button-primary onoffswitch">
515
- <input type="checkbox" name="options[ga_enhanced_links]" value="1" class="onoffswitch-checkbox" id="ga_enhanced_links" <?php checked( $options['ga_enhanced_links'], 1 ); ?>> <label class="onoffswitch-label" for="ga_enhanced_links">
516
- <div class="onoffswitch-inner"></div>
517
- <div class="onoffswitch-switch"></div>
518
  </label>
519
  </div>
520
  <div class="switch-desc"><?php echo " ".__("enable enhanced link attribution", 'google-analytics-dashboard-for-wp' );?></div>
521
  </td>
522
  </tr>
523
  <tr>
524
- <td colspan="2" class="title">
525
- <div class="button-primary onoffswitch">
526
- <input type="checkbox" name="options[ga_dash_adsense]" value="1" class="onoffswitch-checkbox" id="ga_dash_adsense" <?php checked( $options['ga_dash_adsense'], 1 ); ?>> <label class="onoffswitch-label" for="ga_dash_adsense">
527
- <div class="onoffswitch-inner"></div>
528
- <div class="onoffswitch-switch"></div>
529
  </label>
530
  </div>
531
  <div class="switch-desc"><?php echo " ".__("enable AdSense account linking", 'google-analytics-dashboard-for-wp' );?></div>
532
  </td>
533
  </tr>
534
  <tr>
535
- <td colspan="2" class="title">
536
- <div class="button-primary onoffswitch">
537
- <input type="checkbox" name="options[ga_crossdomain_tracking]" value="1" class="onoffswitch-checkbox" id="ga_crossdomain_tracking" <?php checked( $options['ga_crossdomain_tracking'], 1 ); ?>> <label class="onoffswitch-label" for="ga_crossdomain_tracking">
538
- <div class="onoffswitch-inner"></div>
539
- <div class="onoffswitch-switch"></div>
540
  </label>
541
  </div>
542
  <div class="switch-desc"><?php echo " ".__("enable cross domain tracking", 'google-analytics-dashboard-for-wp' ); ?></div>
543
  </td>
544
  </tr>
545
  <tr>
546
- <td class="title"><label for="ga_crossdomain_list"><?php _e("Cross Domains:", 'google-analytics-dashboard-for-wp'); ?></label></td>
547
  <td><input type="text" id="ga_crossdomain_list" name="options[ga_crossdomain_list]" value="<?php echo esc_attr($options['ga_crossdomain_list']); ?>" size="50"></td>
548
  </tr>
549
  </table>
550
  </div>
551
  <div id="gadwp-exclude">
552
- <table class="options">
553
  <tr>
554
  <td colspan="2"><?php echo "<h2>" . __( "Exclude Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
555
  </tr>
556
  <tr>
557
- <td class="roles title"><label for="ga_track_exclude"><?php _e("Exclude tracking for:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
558
- <td class="roles">
559
  <?php
560
  if ( ! isset( $wp_roles ) ) {
561
  $wp_roles = new WP_Roles();
@@ -590,7 +590,7 @@ final class GADWP_Settings {
590
  </tr>
591
  </table>
592
  </div>
593
- <table class="options">
594
  <tr>
595
  <td colspan="2"><hr></td>
596
  </tr>
@@ -623,9 +623,6 @@ final class GADWP_Settings {
623
  if ( $anonim['ga_dash_token'] ) {
624
  $anonim['ga_dash_token'] = 'HIDDEN';
625
  }
626
- if ( $anonim['ga_dash_refresh_token'] ) {
627
- $anonim['ga_dash_refresh_token'] = 'HIDDEN';
628
- }
629
  if ( $anonim['ga_dash_clientid'] ) {
630
  $anonim['ga_dash_clientid'] = 'HIDDEN';
631
  }
@@ -644,7 +641,7 @@ final class GADWP_Settings {
644
  <div class="wrap">
645
  <?php echo "<h2>" . __( "Google Analytics Errors & Debugging", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
646
  </div>
647
- <div id="poststuff">
648
  <div id="post-body" class="metabox-holder columns-2">
649
  <div id="post-body-content">
650
  <div class="settings-wrapper">
@@ -657,7 +654,7 @@ final class GADWP_Settings {
657
  self::navigation_tabs( $tabs );
658
  ?>
659
  <div id="gadwp-errors">
660
- <table class="options">
661
  <tr>
662
  <td>
663
  <?php echo "<h2>" . __( "Last Error detected", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
@@ -666,8 +663,8 @@ final class GADWP_Settings {
666
  <tr>
667
  <td>
668
  <?php
669
- $errors = esc_html( print_r( get_transient( 'ga_dash_lasterror' ), true ) ) ? esc_html( print_r( get_transient( 'ga_dash_lasterror' ), true ) ) : __( "None", 'google-analytics-dashboard-for-wp' );
670
- echo '<pre class="log_data">Last Error: ';
671
  echo $errors;
672
  ?></pre>
673
  </td>
@@ -678,8 +675,8 @@ final class GADWP_Settings {
678
  <tr>
679
  <td>
680
  <?php
681
- echo '<pre class="log_data">Error Details: ';
682
- $error_details = esc_html( print_r( get_transient( 'ga_dash_gapi_errors' ), true ) ) ? "\n" . esc_html( print_r( get_transient( 'ga_dash_gapi_errors' ), true ) ) : __( "None", 'google-analytics-dashboard-for-wp' );
683
  echo $error_details;
684
  ?></pre><br />
685
  <hr>
@@ -691,12 +688,12 @@ final class GADWP_Settings {
691
  </table>
692
  </div>
693
  <div id="gadwp-config">
694
- <table class="options">
695
  <tr>
696
  <td><?php echo "<h2>" . __( "Plugin Configuration", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
697
  </tr>
698
  <tr>
699
- <td><pre class="log_data"><?php echo esc_html(print_r($anonim, true));?></pre><br />
700
  <hr></td>
701
  </tr>
702
  </table>
@@ -724,14 +721,12 @@ final class GADWP_Settings {
724
  try {
725
  $gadwp->gapi_controller->client->authenticate( $_POST['ga_dash_code'] );
726
  $gadwp->config->options['ga_dash_token'] = $gadwp->gapi_controller->client->getAccessToken();
727
- $google_token = json_decode( $gadwp->gapi_controller->client->getAccessToken() );
728
- $gadwp->config->options['ga_dash_refresh_token'] = $google_token->refresh_token;
729
  $gadwp->config->options['automatic_updates_minorversion'] = 1;
730
  $gadwp->config->set_plugin_options();
731
  $options = self::update_options( 'general' );
732
  $message = "<div class='updated'><p>" . __( "Plugin authorization succeeded.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
733
- delete_transient( 'ga_dash_gapi_errors' );
734
- delete_transient( 'ga_dash_lasterror' );
735
  if ( $gadwp->config->options['ga_dash_token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
736
  if ( ! empty( $gadwp->config->options['ga_dash_profile_list'] ) ) {
737
  $profiles = $gadwp->config->options['ga_dash_profile_list'];
@@ -750,14 +745,14 @@ final class GADWP_Settings {
750
  }
751
  }
752
  } catch ( Google_IO_Exception $e ) {
753
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $gadwp->gapi_controller->error_timeout );
754
  return false;
755
  } catch ( Google_Service_Exception $e ) {
756
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( "(" . $e->getCode() . ") " . $e->getMessage() ), $gadwp->gapi_controller->error_timeout );
757
- set_transient( 'ga_dash_gapi_errors', $e->getErrors(), $gadwp->gapi_controller->error_timeout );
758
  return $e->getCode();
759
  } catch ( Exception $e ) {
760
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ) . "\nResponseHttpCode:" . $e->getCode(), $gadwp->gapi_controller->error_timeout );
761
  $gadwp->gapi_controller->reset_token( false );
762
  }
763
  } else {
@@ -784,8 +779,8 @@ final class GADWP_Settings {
784
  }
785
  if ( isset( $_POST['Reset_Err'] ) ) {
786
  if ( isset( $_POST['gadash_security'] ) && wp_verify_nonce( $_POST['gadash_security'], 'gadash_form' ) ) {
787
- delete_transient( 'ga_dash_lasterror' );
788
- delete_transient( 'ga_dash_gapi_errors' );
789
  $message = "<div class='updated'><p>" . __( "All errors reseted.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
790
  } else {
791
  $message = "<div class='error'><p>" . __( "Cheating Huh?", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
@@ -813,13 +808,13 @@ final class GADWP_Settings {
813
  <?php echo "<h2>" . __( "Google Analytics Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
814
  <hr>
815
  </div>
816
- <div id="poststuff">
817
  <div id="post-body" class="metabox-holder columns-2">
818
  <div id="post-body-content">
819
  <div class="settings-wrapper">
820
  <div class="inside">
821
  <?php
822
- if ( $gadwp->gapi_controller->gapi_errors_handler() || get_transient('ga_dash_lasterror') ) {
823
  $message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadash_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadash_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
824
  }
825
  if ( isset( $_POST['Authorize'] ) ) {
@@ -834,33 +829,33 @@ final class GADWP_Settings {
834
  <form name="ga_dash_form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
835
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
836
  <?php wp_nonce_field('gadash_form','gadash_security'); ?>
837
- <table class="options">
838
  <tr>
839
  <td colspan="2">
840
  <?php echo "<h2>" . __( "Plugin Authorization", 'google-analytics-dashboard-for-wp' ) . "</h2>";?>
841
  </td>
842
  </tr>
843
  <tr>
844
- <td colspan="2" class="info">
845
  <?php printf(__('You should watch the %1$s and read this %2$s before proceeding to authorization. This plugin requires a properly configured Google Analytics account!', 'google-analytics-dashboard-for-wp'), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=top_video&utm_campaign=gadwp', __("video", 'google-analytics-dashboard-for-wp')), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=top_tutorial&utm_campaign=gadwp', __("tutorial", 'google-analytics-dashboard-for-wp')));?>
846
  </td>
847
  </tr>
848
  <?php if (! $options['ga_dash_token'] || $options['ga_dash_userapi']) {?>
849
  <tr>
850
- <td colspan="2" class="info"><input name="options[ga_dash_userapi]" type="checkbox" id="ga_dash_userapi" value="1" <?php checked( $options['ga_dash_userapi'], 1 ); ?> onchange="this.form.submit()" <?php echo ($options['ga_dash_network'])?'disabled="disabled"':''; ?> /><?php echo " ".__("use your own API Project credentials", 'google-analytics-dashboard-for-wp' );?>
851
  </td>
852
  </tr>
853
  <?php } if ($options['ga_dash_userapi']) { ?>
854
  <tr>
855
- <td class="title"><label for="options[ga_dash_apikey]"><?php _e("API Key:", 'google-analytics-dashboard-for-wp'); ?></label></td>
856
  <td><input type="text" name="options[ga_dash_apikey]" value="<?php echo esc_attr($options['ga_dash_apikey']); ?>" size="40" required="required"></td>
857
  </tr>
858
  <tr>
859
- <td class="title"><label for="options[ga_dash_clientid]"><?php _e("Client ID:", 'google-analytics-dashboard-for-wp'); ?></label></td>
860
  <td><input type="text" name="options[ga_dash_clientid]" value="<?php echo esc_attr($options['ga_dash_clientid']); ?>" size="40" required="required"></td>
861
  </tr>
862
  <tr>
863
- <td class="title"><label for="options[ga_dash_clientsecret]"><?php _e("Client Secret:", 'google-analytics-dashboard-for-wp'); ?></label></td>
864
  <td><input type="text" name="options[ga_dash_clientsecret]" value="<?php echo esc_attr($options['ga_dash_clientsecret']); ?>" size="40" required="required"> <input type="hidden" name="options[ga_dash_hidden]" value="Y">
865
  <?php wp_nonce_field('gadash_form','gadash_security'); ?>
866
  </td>
@@ -879,7 +874,7 @@ final class GADWP_Settings {
879
  <td colspan="2"><?php echo "<h2>" . __( "General Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
880
  </tr>
881
  <tr>
882
- <td class="title"><label for="ga_dash_tableid_jail"><?php _e("Select View:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
883
  <td><select id="ga_dash_tableid_jail" <?php disabled(empty($options['ga_dash_profile_list']) || 1 == count($options['ga_dash_profile_list']), true); ?> name="options[ga_dash_tableid_jail]">
884
  <?php
885
  if ( ! empty( $options['ga_dash_profile_list'] ) ) {
@@ -905,7 +900,7 @@ final class GADWP_Settings {
905
  if ( $options['ga_dash_tableid_jail'] ) {
906
  ?>
907
  <tr>
908
- <td class="title"></td>
909
  <td><?php
910
  $profile_info = GADWP_Tools::get_selected_profile( $gadwp->config->options['ga_dash_profile_list'], $gadwp->config->options['ga_dash_tableid_jail'] );
911
  echo '<pre>' . __( "View Name:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[0] ) . "<br />" . __( "Tracking ID:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[2] ) . "<br />" . __( "Default URL:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[3] ) . "<br />" . __( "Time Zone:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[5] ) . '</pre>';
@@ -915,7 +910,7 @@ final class GADWP_Settings {
915
  }
916
  ?>
917
  <tr>
918
- <td class="title"><label for="ga_dash_style"><?php _e("Theme Color:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
919
  <td><input type="text" id="ga_dash_style" class="ga_dash_style" name="options[ga_dash_style]" value="<?php echo esc_attr($options['ga_dash_style']); ?>" size="10"></td>
920
  </tr>
921
  <tr>
@@ -926,11 +921,11 @@ final class GADWP_Settings {
926
  <td colspan="2"><?php echo "<h2>" . __( "Automatic Updates", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
927
  </tr>
928
  <tr>
929
- <td colspan="2" class="title">
930
- <div class="button-primary onoffswitch">
931
- <input type="checkbox" name="options[automatic_updates_minorversion]" value="1" class="onoffswitch-checkbox" id="automatic_updates_minorversion" <?php checked( $options['automatic_updates_minorversion'], 1 ); ?>> <label class="onoffswitch-label" for="automatic_updates_minorversion">
932
- <div class="onoffswitch-inner"></div>
933
- <div class="onoffswitch-switch"></div>
934
  </label>
935
  </div>
936
  <div class="switch-desc"><?php echo " ".__( "automatic updates for minor versions (security and maintenance releases only)", 'google-analytics-dashboard-for-wp' );?></div>
@@ -990,8 +985,6 @@ final class GADWP_Settings {
990
  try {
991
  $gadwp->gapi_controller->client->authenticate( $_POST['ga_dash_code'] );
992
  $gadwp->config->options['ga_dash_token'] = $gadwp->gapi_controller->client->getAccessToken();
993
- $google_token = json_decode( $gadwp->gapi_controller->client->getAccessToken() );
994
- $gadwp->config->options['ga_dash_refresh_token'] = $google_token->refresh_token;
995
  $gadwp->config->options['automatic_updates_minorversion'] = 1;
996
  $gadwp->config->set_plugin_options( true );
997
  $options = self::update_options( 'network' );
@@ -1000,11 +993,11 @@ final class GADWP_Settings {
1000
  foreach ( wp_get_sites( array(
1001
  'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
1002
  switch_to_blog( $blog['blog_id'] );
1003
- delete_transient( 'ga_dash_gapi_errors' );
1004
  restore_current_blog();
1005
  }
1006
  } else {
1007
- delete_transient( 'ga_dash_gapi_errors' );
1008
  }
1009
  if ( $gadwp->config->options['ga_dash_token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
1010
  if ( ! empty( $gadwp->config->options['ga_dash_profile_list'] ) ) {
@@ -1024,14 +1017,14 @@ final class GADWP_Settings {
1024
  }
1025
  }
1026
  } catch ( Google_IO_Exception $e ) {
1027
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $gadwp->gapi_controller->error_timeout );
1028
  return false;
1029
  } catch ( Google_Service_Exception $e ) {
1030
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( "(" . $e->getCode() . ") " . $e->getMessage() ), $gadwp->gapi_controller->error_timeout );
1031
- set_transient( 'ga_dash_gapi_errors', $e->getErrors(), $gadwp->gapi_controller->error_timeout );
1032
  return $e->getCode();
1033
  } catch ( Exception $e ) {
1034
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ) . "\nResponseHttpCode:" . $e->getCode(), $gadwp->gapi_controller->error_timeout );
1035
  $gadwp->gapi_controller->reset_token( false );
1036
  }
1037
  } else {
@@ -1103,13 +1096,13 @@ final class GADWP_Settings {
1103
  <div class="wrap">
1104
  <?php echo "<h2>" . __( "Google Analytics Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?><hr>
1105
  </div>
1106
- <div id="poststuff">
1107
  <div id="post-body" class="metabox-holder columns-2">
1108
  <div id="post-body-content">
1109
  <div class="settings-wrapper">
1110
  <div class="inside">
1111
  <?php
1112
- if ( $gadwp->gapi_controller->gapi_errors_handler() || get_transient('ga_dash_lasterror')) {
1113
  $message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadash_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadash_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
1114
  }
1115
  if ( isset( $_POST['Authorize'] ) ) {
@@ -1124,16 +1117,16 @@ final class GADWP_Settings {
1124
  <form name="ga_dash_form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
1125
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
1126
  <?php wp_nonce_field('gadash_form','gadash_security'); ?>
1127
- <table class="options">
1128
  <tr>
1129
  <td colspan="2"><?php echo "<h2>" . __( "Network Setup", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1130
  </tr>
1131
  <tr>
1132
- <td colspan="2" class="title">
1133
- <div class="button-primary onoffswitch">
1134
- <input type="checkbox" name="options[ga_dash_network]" value="1" class="onoffswitch-checkbox" id="ga_dash_network" <?php checked( $options['ga_dash_network'], 1); ?> onchange="this.form.submit()"> <label class="onoffswitch-label" for="ga_dash_network">
1135
- <div class="onoffswitch-inner"></div>
1136
- <div class="onoffswitch-switch"></div>
1137
  </label>
1138
  </div>
1139
  <div class="switch-desc"><?php echo " ".__("use a single Google Analytics account for the entire network", 'google-analytics-dashboard-for-wp' );?></div>
@@ -1147,7 +1140,7 @@ final class GADWP_Settings {
1147
  <td colspan="2"><?php echo "<h2>" . __( "Plugin Authorization", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1148
  </tr>
1149
  <tr>
1150
- <td colspan="2" class="info">
1151
  <?php printf(__('You should watch the %1$s and read this %2$s before proceeding to authorization. This plugin requires a properly configured Google Analytics account!', 'google-analytics-dashboard-for-wp'), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=top_video&utm_campaign=gadwp', __("video", 'google-analytics-dashboard-for-wp')), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=top_tutorial&utm_campaign=gadwp', __("tutorial", 'google-analytics-dashboard-for-wp')));?>
1152
  </td>
1153
  </tr>
@@ -1155,7 +1148,7 @@ final class GADWP_Settings {
1155
  if ( ! $options['ga_dash_token'] || $options['ga_dash_userapi'] ) {
1156
  ?>
1157
  <tr>
1158
- <td colspan="2" class="info"><input name="options[ga_dash_userapi]" type="checkbox" id="ga_dash_userapi" value="1" <?php checked( $options['ga_dash_userapi'], 1 ); ?> onchange="this.form.submit()" /><?php echo " ".__("use your own API Project credentials", 'google-analytics-dashboard-for-wp' );?>
1159
  </td>
1160
  </tr>
1161
  <?php
@@ -1163,15 +1156,15 @@ final class GADWP_Settings {
1163
  if ( $options['ga_dash_userapi'] ) {
1164
  ?>
1165
  <tr>
1166
- <td class="title"><label for="options[ga_dash_apikey]"><?php _e("API Key:", 'google-analytics-dashboard-for-wp'); ?></label></td>
1167
  <td><input type="text" name="options[ga_dash_apikey]" value="<?php echo esc_attr($options['ga_dash_apikey']); ?>" size="40" required="required"></td>
1168
  </tr>
1169
  <tr>
1170
- <td class="title"><label for="options[ga_dash_clientid]"><?php _e("Client ID:", 'google-analytics-dashboard-for-wp'); ?></label></td>
1171
  <td><input type="text" name="options[ga_dash_clientid]" value="<?php echo esc_attr($options['ga_dash_clientid']); ?>" size="40" required="required"></td>
1172
  </tr>
1173
  <tr>
1174
- <td class="title"><label for="options[ga_dash_clientsecret]"><?php _e("Client Secret:", 'google-analytics-dashboard-for-wp'); ?></label></td>
1175
  <td><input type="text" name="options[ga_dash_clientsecret]" value="<?php echo esc_attr($options['ga_dash_clientsecret']); ?>" size="40" required="required"> <input type="hidden" name="options[ga_dash_hidden]" value="Y">
1176
  <?php wp_nonce_field('gadash_form','gadash_security'); ?>
1177
  </td>
@@ -1197,7 +1190,7 @@ final class GADWP_Settings {
1197
  'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
1198
  ?>
1199
  <tr>
1200
- <td class="title-select"><label for="ga_dash_tableid_network"><?php echo '<strong>'.$blog['domain'].$blog['path'].'</strong>: ';?></label></td>
1201
  <td><select id="ga_dash_tableid_network" <?php disabled(!empty($options['ga_dash_profile_list']),false);?> name="options[ga_dash_tableid_network][<?php echo $blog['blog_id'];?>]">
1202
  <?php
1203
  if ( ! empty( $options['ga_dash_profile_list'] ) ) {
@@ -1220,11 +1213,11 @@ final class GADWP_Settings {
1220
  <td colspan="2"><?php echo "<h2>" . __( "Automatic Updates", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1221
  </tr>
1222
  <tr>
1223
- <td colspan="2" class="title">
1224
- <div class="button-primary onoffswitch">
1225
- <input type="checkbox" name="options[automatic_updates_minorversion]" value="1" class="onoffswitch-checkbox" id="automatic_updates_minorversion" <?php checked( $options['automatic_updates_minorversion'], 1 ); ?>> <label class="onoffswitch-label" for="automatic_updates_minorversion">
1226
- <div class="onoffswitch-inner"></div>
1227
- <div class="onoffswitch-switch"></div>
1228
  </label>
1229
  </div>
1230
  <div class="switch-desc"><?php echo " ".__( "automatic updates for minor versions (security and maintenance releases only)", 'google-analytics-dashboard-for-wp' );?></div>
@@ -1234,11 +1227,11 @@ final class GADWP_Settings {
1234
  <td colspan="2"><hr><?php echo "<h2>" . __( "Exclude Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1235
  </tr>
1236
  <tr>
1237
- <td colspan="2" class="title">
1238
- <div class="button-primary onoffswitch">
1239
- <input type="checkbox" name="options[ga_dash_excludesa]" value="1" class="onoffswitch-checkbox" id="ga_dash_excludesa"<?php checked( $options['ga_dash_excludesa'], 1); ?>"> <label class="onoffswitch-label" for="ga_dash_excludesa">
1240
- <div class="onoffswitch-inner"></div>
1241
- <div class="onoffswitch-switch"></div>
1242
  </label>
1243
  </div>
1244
  <div class="switch-desc"><?php echo " ".__("exclude Super Admin tracking for the entire network", 'google-analytics-dashboard-for-wp' );?></div>
99
  <div class="wrap">
100
  <?php echo "<h2>" . __( "Google Analytics Frontend Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?><hr>
101
  </div>
102
+ <div id="poststuff" class="gadwp">
103
  <div id="post-body" class="metabox-holder columns-2">
104
  <div id="post-body-content">
105
  <div class="settings-wrapper">
106
  <div class="inside">
107
  <?php if (isset($message)) echo $message; ?>
108
+ <table class="gadwp-settings-options">
109
  <tr>
110
  <td colspan="2"><?php echo "<h2>" . __( "Permissions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
111
  </tr>
112
  <tr>
113
+ <td class="roles gadwp-settings-title"><label for="ga_dash_access_front"><?php _e("Show stats to:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
114
+ <td class="gadwp-settings-roles">
115
  <?php
116
  if ( ! isset( $wp_roles ) ) {
117
  $wp_roles = new WP_Roles();
144
  </td>
145
  </tr>
146
  <tr>
147
+ <td colspan="2" class="gadwp-settings-title">
148
+ <div class="button-primary gadwp-settings-switchoo">
149
+ <input type="checkbox" name="options[frontend_item_reports]" value="1" class="gadwp-settings-switchoo-checkbox" id="frontend_item_reports" <?php checked( $options['frontend_item_reports'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="frontend_item_reports">
150
+ <div class="gadwp-settings-switchoo-inner"></div>
151
+ <div class="gadwp-settings-switchoo-switch"></div>
152
  </label>
153
  </div>
154
  <div class="switch-desc"><?php echo " ".__("enable web page reports on frontend", 'google-analytics-dashboard-for-wp' );?></div>
194
  <div class="wrap">
195
  <?php echo "<h2>" . __( "Google Analytics Backend Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?><hr>
196
  </div>
197
+ <div id="poststuff" class="gadwp">
198
  <div id="post-body" class="metabox-holder columns-2">
199
  <div id="post-body-content">
200
  <div class="settings-wrapper">
201
  <div class="inside">
202
  <?php if (isset($message)) echo $message; ?>
203
+ <table class="gadwp-settings-options">
204
  <tr>
205
  <td colspan="2"><?php echo "<h2>" . __( "Permissions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
206
  </tr>
207
  <tr>
208
+ <td class="roles gadwp-settings-title"><label for="ga_dash_access_back"><?php _e("Show stats to:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
209
+ <td class="gadwp-settings-roles">
210
  <?php
211
  if ( ! isset( $wp_roles ) ) {
212
  $wp_roles = new WP_Roles();
241
  </td>
242
  </tr>
243
  <tr>
244
+ <td colspan="2" class="gadwp-settings-title">
245
+ <div class="button-primary gadwp-settings-switchoo">
246
+ <input type="checkbox" name="options[switch_profile]" value="1" class="gadwp-settings-switchoo-checkbox" id="switch_profile" <?php checked( $options['switch_profile'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="switch_profile">
247
+ <div class="gadwp-settings-switchoo-inner"></div>
248
+ <div class="gadwp-settings-switchoo-switch"></div>
249
  </label>
250
  </div>
251
  <div class="switch-desc"><?php _e ( "enable Switch View functionality", 'google-analytics-dashboard-for-wp' );?></div>
252
  </td>
253
  </tr>
254
  <tr>
255
+ <td colspan="2" class="gadwp-settings-title">
256
+ <div class="button-primary gadwp-settings-switchoo">
257
+ <input type="checkbox" name="options[backend_item_reports]" value="1" class="gadwp-settings-switchoo-checkbox" id="backend_item_reports" <?php checked( $options['backend_item_reports'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="backend_item_reports">
258
+ <div class="gadwp-settings-switchoo-inner"></div>
259
+ <div class="gadwp-settings-switchoo-switch"></div>
260
  </label>
261
  </div>
262
  <div class="switch-desc"><?php _e ( "enable reports on Posts List and Pages List", 'google-analytics-dashboard-for-wp' );?></div>
263
  </td>
264
  </tr>
265
  <tr>
266
+ <td colspan="2" class="gadwp-settings-title">
267
+ <div class="button-primary gadwp-settings-switchoo">
268
+ <input type="checkbox" name="options[dashboard_widget]" value="1" class="gadwp-settings-switchoo-checkbox" id="dashboard_widget" <?php checked( $options['dashboard_widget'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="dashboard_widget">
269
+ <div class="gadwp-settings-switchoo-inner"></div>
270
+ <div class="gadwp-settings-switchoo-switch"></div>
271
  </label>
272
  </div>
273
  <div class="switch-desc"><?php _e ( "enable the main Dashboard Widget", 'google-analytics-dashboard-for-wp' );?></div>
277
  <td colspan="2"><hr><?php echo "<h2>" . __( "Real-Time Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
278
  </tr>
279
  <tr>
280
+ <td colspan="2" class="gadwp-settings-title"> <?php _e("Maximum number of pages to display on real-time tab:", 'google-analytics-dashboard-for-wp'); ?>
281
  <input type="number" name="options[ga_realtime_pages]" id="ga_realtime_pages" value="<?php echo (int)$options['ga_realtime_pages']; ?>" size="3">
282
  </td>
283
  </tr>
285
  <td colspan="2"><hr><?php echo "<h2>" . __( "Location Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
286
  </tr>
287
  <tr>
288
+ <td colspan="2" class="gadwp-settings-title">
289
  <?php echo __("Target Geo Map to country:", 'google-analytics-dashboard-for-wp'); ?>
290
  <input type="text" style="text-align: center;" name="options[ga_target_geomap]" value="<?php echo esc_attr($options['ga_target_geomap']); ?>" size="3">
291
  </td>
331
  <div class="wrap">
332
  <?php echo "<h2>" . __( "Google Analytics Tracking Code", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
333
  </div>
334
+ <div id="poststuff" class="gadwp">
335
  <div id="post-body" class="metabox-holder columns-2">
336
  <div id="post-body-content">
337
  <div class="settings-wrapper">
348
  echo $message;
349
  ?>
350
  <div id="gadwp-basic">
351
+ <table class="gadwp-settings-options">
352
  <tr>
353
  <td colspan="2"><?php echo "<h2>" . __( "Tracking Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
354
  </tr>
355
  <tr>
356
+ <td class="gadwp-settings-title"><label for="ga_dash_tracking"><?php _e("Tracking Options:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
357
  <td><select id="ga_dash_tracking" name="options[ga_dash_tracking]" onchange="this.form.submit()">
358
  <option value="0" <?php selected( $options['ga_dash_tracking'], 0 ); ?>><?php _e("Disabled", 'google-analytics-dashboard-for-wp');?></option>
359
  <option value="1" <?php selected( $options['ga_dash_tracking'], 1 ); ?>><?php _e("Enabled", 'google-analytics-dashboard-for-wp');?></option>
361
  </tr>
362
  <?php if ($options['ga_dash_tracking']) {?>
363
  <tr>
364
+ <td class="gadwp-settings-title"></td>
365
  <td>
366
  <?php $profile_info = GADWP_Tools::get_selected_profile($gadwp->config->options['ga_dash_profile_list'], $gadwp->config->options['ga_dash_tableid_jail']); ?>
367
  <?php echo '<pre>' . __("View Name:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[0]) . "<br />" . __("Tracking ID:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[2]) . "<br />" . __("Default URL:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[3]) . "<br />" . __("Time Zone:", 'google-analytics-dashboard-for-wp') . "\t" . esc_html($profile_info[5]) . '</pre>';?>
372
  <td colspan="2"><hr><?php echo "<h2>" . __( "Basic Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
373
  </tr>
374
  <tr>
375
+ <td class="gadwp-settings-title"><label for="ga_dash_tracking_type"><?php _e("Tracking Type:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
376
  <td><select id="ga_dash_tracking_type" name="options[ga_dash_tracking_type]">
377
  <option value="classic" <?php selected( $options['ga_dash_tracking_type'], 'classic' ); ?>><?php _e("Classic Analytics", 'google-analytics-dashboard-for-wp');?></option>
378
  <option value="universal" <?php selected( $options['ga_dash_tracking_type'], 'universal' ); ?>><?php _e("Universal Analytics", 'google-analytics-dashboard-for-wp');?></option>
379
  </select></td>
380
  </tr>
381
  <tr>
382
+ <td colspan="2" class="gadwp-settings-title">
383
+ <div class="button-primary gadwp-settings-switchoo">
384
+ <input type="checkbox" name="options[ga_dash_anonim]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_dash_anonim" <?php checked( $options['ga_dash_anonim'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="ga_dash_anonim">
385
+ <div class="gadwp-settings-switchoo-inner"></div>
386
+ <div class="gadwp-settings-switchoo-switch"></div>
387
  </label>
388
  </div>
389
  <div class="switch-desc"><?php echo " ".__("anonymize IPs while tracking", 'google-analytics-dashboard-for-wp' );?></div>
390
  </td>
391
  </tr>
392
  <tr>
393
+ <td colspan="2" class="gadwp-settings-title">
394
+ <div class="button-primary gadwp-settings-switchoo">
395
+ <input type="checkbox" name="options[ga_dash_remarketing]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_dash_remarketing" <?php checked( $options['ga_dash_remarketing'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="ga_dash_remarketing">
396
+ <div class="gadwp-settings-switchoo-inner"></div>
397
+ <div class="gadwp-settings-switchoo-switch"></div>
398
  </label>
399
  </div>
400
  <div class="switch-desc"><?php echo " ".__("enable remarketing, demographics and interests reports", 'google-analytics-dashboard-for-wp' );?></div>
403
  </table>
404
  </div>
405
  <div id="gadwp-events">
406
+ <table class="gadwp-settings-options">
407
  <tr>
408
  <td colspan="2"><?php echo "<h2>" . __( "Events Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
409
  </tr>
410
  <tr>
411
+ <td colspan="2" class="gadwp-settings-title">
412
+ <div class="button-primary gadwp-settings-switchoo">
413
+ <input type="checkbox" name="options[ga_event_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_event_tracking" <?php checked( $options['ga_event_tracking'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="ga_event_tracking">
414
+ <div class="gadwp-settings-switchoo-inner"></div>
415
+ <div class="gadwp-settings-switchoo-switch"></div>
416
  </label>
417
  </div>
418
  <div class="switch-desc"><?php echo " ".__("track downloads, mailto and outbound links", 'google-analytics-dashboard-for-wp' ); ?></div>
419
  </td>
420
  </tr>
421
  <tr>
422
+ <td class="gadwp-settings-title"><label for="ga_event_downloads"><?php _e("Downloads Regex:", 'google-analytics-dashboard-for-wp'); ?></label></td>
423
  <td><input type="text" id="ga_event_downloads" name="options[ga_event_downloads]" value="<?php echo esc_attr($options['ga_event_downloads']); ?>" size="50"></td>
424
  </tr>
425
  <tr>
426
+ <td colspan="2" class="gadwp-settings-title">
427
+ <div class="button-primary gadwp-settings-switchoo">
428
+ <input type="checkbox" name="options[ga_aff_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_aff_tracking" <?php checked( $options['ga_aff_tracking'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="ga_aff_tracking">
429
+ <div class="gadwp-settings-switchoo-inner"></div>
430
+ <div class="gadwp-settings-switchoo-switch"></div>
431
  </label>
432
  </div>
433
  <div class="switch-desc"><?php echo " ".__("track affiliate links matching this regex", 'google-analytics-dashboard-for-wp' ); ?></div>
434
  </td>
435
  </tr>
436
  <tr>
437
+ <td class="gadwp-settings-title"><label for="ga_event_affiliates"><?php _e("Affiliates Regex:", 'google-analytics-dashboard-for-wp'); ?></label></td>
438
  <td><input type="text" id="ga_event_affiliates" name="options[ga_event_affiliates]" value="<?php echo esc_attr($options['ga_event_affiliates']); ?>" size="50"></td>
439
  </tr>
440
  <tr>
441
+ <td colspan="2" class="gadwp-settings-title">
442
+ <div class="button-primary gadwp-settings-switchoo">
443
+ <input type="checkbox" name="options[ga_hash_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_hash_tracking" <?php checked( $options['ga_hash_tracking'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="ga_hash_tracking">
444
+ <div class="gadwp-settings-switchoo-inner"></div>
445
+ <div class="gadwp-settings-switchoo-switch"></div>
446
  </label>
447
  </div>
448
  <div class="switch-desc"><?php echo " ".__("track fragment identifiers, hashmarks (#) in URI links", 'google-analytics-dashboard-for-wp' ); ?></div>
451
  </table>
452
  </div>
453
  <div id="gadwp-custom">
454
+ <table class="gadwp-settings-options">
455
  <tr>
456
  <td colspan="2"><?php echo "<h2>" . __( "Custom Definitions", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
457
  </tr>
458
  <tr>
459
+ <td class="gadwp-settings-title"><label for="ga_author_dimindex"><?php _e("Authors:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
460
  <td><select id="ga_author_dimindex" name="options[ga_author_dimindex]">
461
  <?php for ($i=0;$i<21;$i++){?>
462
  <option value="<?php echo $i;?>" <?php selected( $options['ga_author_dimindex'], $i ); ?>><?php echo $i==0?'Disabled':'dimension '.$i; ?></option>
464
  </select></td>
465
  </tr>
466
  <tr>
467
+ <td class="gadwp-settings-title"><label for="ga_pubyear_dimindex"><?php _e("Publication Year:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
468
  <td><select id="ga_pubyear_dimindex" name="options[ga_pubyear_dimindex]">
469
  <?php for ($i=0;$i<21;$i++){?>
470
  <option value="<?php echo $i;?>" <?php selected( $options['ga_pubyear_dimindex'], $i ); ?>><?php echo $i==0?'Disabled':'dimension '.$i; ?></option>
472
  </select></td>
473
  </tr>
474
  <tr>
475
+ <td class="gadwp-settings-title"><label for="ga_category_dimindex"><?php _e("Categories:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
476
  <td><select id="ga_category_dimindex" name="options[ga_category_dimindex]">
477
  <?php for ($i=0;$i<21;$i++){?>
478
  <option value="<?php echo $i;?>" <?php selected( $options['ga_category_dimindex'], $i ); ?>><?php echo $i==0?'Disabled':'dimension '.$i; ?></option>
480
  </select></td>
481
  </tr>
482
  <tr>
483
+ <td class="gadwp-settings-title"><label for="ga_user_dimindex"><?php _e("User Type:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
484
  <td><select id="ga_user_dimindex" name="options[ga_user_dimindex]">
485
  <?php for ($i=0;$i<21;$i++){?>
486
  <option value="<?php echo $i;?>" <?php selected( $options['ga_user_dimindex'], $i ); ?>><?php echo $i==0?'Disabled':'dimension '.$i; ?></option>
490
  </table>
491
  </div>
492
  <div id="gadwp-advanced">
493
+ <table class="gadwp-settings-options">
494
  <tr>
495
  <td colspan="2"><?php echo "<h2>" . __( "Advanced Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
496
  </tr>
497
  <tr>
498
+ <td class="gadwp-settings-title"><label for="ga_speed_samplerate"><?php _e("Page Speed SR:", 'google-analytics-dashboard-for-wp'); ?></label></td>
499
  <td><input type="number" id="ga_speed_samplerate" name="options[ga_speed_samplerate]" value="<?php echo (int)($options['ga_speed_samplerate']); ?>" max="100" min="1"> %</td>
500
  </tr>
501
  <tr>
502
+ <td colspan="2" class="gadwp-settings-title">
503
+ <div class="button-primary gadwp-settings-switchoo">
504
+ <input type="checkbox" name="options[ga_event_bouncerate]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_event_bouncerate" <?php checked( $options['ga_event_bouncerate'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="ga_event_bouncerate">
505
+ <div class="gadwp-settings-switchoo-inner"></div>
506
+ <div class="gadwp-settings-switchoo-switch"></div>
507
  </label>
508
  </div>
509
  <div class="switch-desc"><?php echo " ".__("exclude events from bounce-rate calculation", 'google-analytics-dashboard-for-wp' );?></div>
510
  </td>
511
  </tr>
512
  <tr>
513
+ <td colspan="2" class="gadwp-settings-title">
514
+ <div class="button-primary gadwp-settings-switchoo">
515
+ <input type="checkbox" name="options[ga_enhanced_links]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_enhanced_links" <?php checked( $options['ga_enhanced_links'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="ga_enhanced_links">
516
+ <div class="gadwp-settings-switchoo-inner"></div>
517
+ <div class="gadwp-settings-switchoo-switch"></div>
518
  </label>
519
  </div>
520
  <div class="switch-desc"><?php echo " ".__("enable enhanced link attribution", 'google-analytics-dashboard-for-wp' );?></div>
521
  </td>
522
  </tr>
523
  <tr>
524
+ <td colspan="2" class="gadwp-settings-title">
525
+ <div class="button-primary gadwp-settings-switchoo">
526
+ <input type="checkbox" name="options[ga_dash_adsense]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_dash_adsense" <?php checked( $options['ga_dash_adsense'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="ga_dash_adsense">
527
+ <div class="gadwp-settings-switchoo-inner"></div>
528
+ <div class="gadwp-settings-switchoo-switch"></div>
529
  </label>
530
  </div>
531
  <div class="switch-desc"><?php echo " ".__("enable AdSense account linking", 'google-analytics-dashboard-for-wp' );?></div>
532
  </td>
533
  </tr>
534
  <tr>
535
+ <td colspan="2" class="gadwp-settings-title">
536
+ <div class="button-primary gadwp-settings-switchoo">
537
+ <input type="checkbox" name="options[ga_crossdomain_tracking]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_crossdomain_tracking" <?php checked( $options['ga_crossdomain_tracking'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="ga_crossdomain_tracking">
538
+ <div class="gadwp-settings-switchoo-inner"></div>
539
+ <div class="gadwp-settings-switchoo-switch"></div>
540
  </label>
541
  </div>
542
  <div class="switch-desc"><?php echo " ".__("enable cross domain tracking", 'google-analytics-dashboard-for-wp' ); ?></div>
543
  </td>
544
  </tr>
545
  <tr>
546
+ <td class="gadwp-settings-title"><label for="ga_crossdomain_list"><?php _e("Cross Domains:", 'google-analytics-dashboard-for-wp'); ?></label></td>
547
  <td><input type="text" id="ga_crossdomain_list" name="options[ga_crossdomain_list]" value="<?php echo esc_attr($options['ga_crossdomain_list']); ?>" size="50"></td>
548
  </tr>
549
  </table>
550
  </div>
551
  <div id="gadwp-exclude">
552
+ <table class="gadwp-settings-options">
553
  <tr>
554
  <td colspan="2"><?php echo "<h2>" . __( "Exclude Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
555
  </tr>
556
  <tr>
557
+ <td class="roles gadwp-settings-title"><label for="ga_track_exclude"><?php _e("Exclude tracking for:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
558
+ <td class="gadwp-settings-roles">
559
  <?php
560
  if ( ! isset( $wp_roles ) ) {
561
  $wp_roles = new WP_Roles();
590
  </tr>
591
  </table>
592
  </div>
593
+ <table class="gadwp-settings-options">
594
  <tr>
595
  <td colspan="2"><hr></td>
596
  </tr>
623
  if ( $anonim['ga_dash_token'] ) {
624
  $anonim['ga_dash_token'] = 'HIDDEN';
625
  }
 
 
 
626
  if ( $anonim['ga_dash_clientid'] ) {
627
  $anonim['ga_dash_clientid'] = 'HIDDEN';
628
  }
641
  <div class="wrap">
642
  <?php echo "<h2>" . __( "Google Analytics Errors & Debugging", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
643
  </div>
644
+ <div id="poststuff" class="gadwp">
645
  <div id="post-body" class="metabox-holder columns-2">
646
  <div id="post-body-content">
647
  <div class="settings-wrapper">
654
  self::navigation_tabs( $tabs );
655
  ?>
656
  <div id="gadwp-errors">
657
+ <table class="gadwp-settings-options">
658
  <tr>
659
  <td>
660
  <?php echo "<h2>" . __( "Last Error detected", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
663
  <tr>
664
  <td>
665
  <?php
666
+ $errors = print_r( GADWP_Tools::get_cache( 'last_error' ), true ) ? esc_html( str_replace( $gadwp->config->access[2], '' , print_r( GADWP_Tools::get_cache( 'last_error' ), true ) ) ) : __( "None", 'google-analytics-dashboard-for-wp' );
667
+ echo '<pre class="gadwp-settings-logdata">Last Error: ';
668
  echo $errors;
669
  ?></pre>
670
  </td>
675
  <tr>
676
  <td>
677
  <?php
678
+ echo '<pre class="gadwp-settings-logdata">Error Details: ';
679
+ $error_details = print_r( GADWP_Tools::get_cache( 'gapi_errors' ), true ) ? "\n" . esc_html( str_replace( $gadwp->config->access[2], '' , print_r( GADWP_Tools::get_cache( 'last_error' ), true ) ) ) : __( "None", 'google-analytics-dashboard-for-wp' );
680
  echo $error_details;
681
  ?></pre><br />
682
  <hr>
688
  </table>
689
  </div>
690
  <div id="gadwp-config">
691
+ <table class="gadwp-settings-options">
692
  <tr>
693
  <td><?php echo "<h2>" . __( "Plugin Configuration", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
694
  </tr>
695
  <tr>
696
+ <td><pre class="gadwp-settings-logdata"><?php echo esc_html(print_r($anonim, true));?></pre><br />
697
  <hr></td>
698
  </tr>
699
  </table>
721
  try {
722
  $gadwp->gapi_controller->client->authenticate( $_POST['ga_dash_code'] );
723
  $gadwp->config->options['ga_dash_token'] = $gadwp->gapi_controller->client->getAccessToken();
 
 
724
  $gadwp->config->options['automatic_updates_minorversion'] = 1;
725
  $gadwp->config->set_plugin_options();
726
  $options = self::update_options( 'general' );
727
  $message = "<div class='updated'><p>" . __( "Plugin authorization succeeded.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
728
+ GADWP_Tools::delete_cache( 'gapi_errors' );
729
+ GADWP_Tools::delete_cache( 'last_error' );
730
  if ( $gadwp->config->options['ga_dash_token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
731
  if ( ! empty( $gadwp->config->options['ga_dash_profile_list'] ) ) {
732
  $profiles = $gadwp->config->options['ga_dash_profile_list'];
745
  }
746
  }
747
  } catch ( Google_IO_Exception $e ) {
748
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $gadwp->gapi_controller->error_timeout );
749
  return false;
750
  } catch ( Google_Service_Exception $e ) {
751
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( "(" . $e->getCode() . ") " . $e->getMessage() ), $gadwp->gapi_controller->error_timeout );
752
+ GADWP_Tools::set_cache( 'gapi_errors', $e->getErrors(), $gadwp->gapi_controller->error_timeout );
753
  return $e->getCode();
754
  } catch ( Exception $e ) {
755
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ) . "\nResponseHttpCode:" . $e->getCode(), $gadwp->gapi_controller->error_timeout );
756
  $gadwp->gapi_controller->reset_token( false );
757
  }
758
  } else {
779
  }
780
  if ( isset( $_POST['Reset_Err'] ) ) {
781
  if ( isset( $_POST['gadash_security'] ) && wp_verify_nonce( $_POST['gadash_security'], 'gadash_form' ) ) {
782
+ GADWP_Tools::delete_cache( 'last_error' );
783
+ GADWP_Tools::delete_cache( 'gapi_errors' );
784
  $message = "<div class='updated'><p>" . __( "All errors reseted.", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
785
  } else {
786
  $message = "<div class='error'><p>" . __( "Cheating Huh?", 'google-analytics-dashboard-for-wp' ) . "</p></div>";
808
  <?php echo "<h2>" . __( "Google Analytics Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?>
809
  <hr>
810
  </div>
811
+ <div id="poststuff" class="gadwp">
812
  <div id="post-body" class="metabox-holder columns-2">
813
  <div id="post-body-content">
814
  <div class="settings-wrapper">
815
  <div class="inside">
816
  <?php
817
+ if ( $gadwp->gapi_controller->gapi_errors_handler() || GADWP_Tools::get_cache('last_error') ) {
818
  $message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadash_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadash_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
819
  }
820
  if ( isset( $_POST['Authorize'] ) ) {
829
  <form name="ga_dash_form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
830
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
831
  <?php wp_nonce_field('gadash_form','gadash_security'); ?>
832
+ <table class="gadwp-settings-options">
833
  <tr>
834
  <td colspan="2">
835
  <?php echo "<h2>" . __( "Plugin Authorization", 'google-analytics-dashboard-for-wp' ) . "</h2>";?>
836
  </td>
837
  </tr>
838
  <tr>
839
+ <td colspan="2" class="gadwp-settings-info">
840
  <?php printf(__('You should watch the %1$s and read this %2$s before proceeding to authorization. This plugin requires a properly configured Google Analytics account!', 'google-analytics-dashboard-for-wp'), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=top_video&utm_campaign=gadwp', __("video", 'google-analytics-dashboard-for-wp')), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=top_tutorial&utm_campaign=gadwp', __("tutorial", 'google-analytics-dashboard-for-wp')));?>
841
  </td>
842
  </tr>
843
  <?php if (! $options['ga_dash_token'] || $options['ga_dash_userapi']) {?>
844
  <tr>
845
+ <td colspan="2" class="gadwp-settings-info"><input name="options[ga_dash_userapi]" type="checkbox" id="ga_dash_userapi" value="1" <?php checked( $options['ga_dash_userapi'], 1 ); ?> onchange="this.form.submit()" <?php echo ($options['ga_dash_network'])?'disabled="disabled"':''; ?> /><?php echo " ".__("use your own API Project credentials", 'google-analytics-dashboard-for-wp' );?>
846
  </td>
847
  </tr>
848
  <?php } if ($options['ga_dash_userapi']) { ?>
849
  <tr>
850
+ <td class="gadwp-settings-title"><label for="options[ga_dash_apikey]"><?php _e("API Key:", 'google-analytics-dashboard-for-wp'); ?></label></td>
851
  <td><input type="text" name="options[ga_dash_apikey]" value="<?php echo esc_attr($options['ga_dash_apikey']); ?>" size="40" required="required"></td>
852
  </tr>
853
  <tr>
854
+ <td class="gadwp-settings-title"><label for="options[ga_dash_clientid]"><?php _e("Client ID:", 'google-analytics-dashboard-for-wp'); ?></label></td>
855
  <td><input type="text" name="options[ga_dash_clientid]" value="<?php echo esc_attr($options['ga_dash_clientid']); ?>" size="40" required="required"></td>
856
  </tr>
857
  <tr>
858
+ <td class="gadwp-settings-title"><label for="options[ga_dash_clientsecret]"><?php _e("Client Secret:", 'google-analytics-dashboard-for-wp'); ?></label></td>
859
  <td><input type="text" name="options[ga_dash_clientsecret]" value="<?php echo esc_attr($options['ga_dash_clientsecret']); ?>" size="40" required="required"> <input type="hidden" name="options[ga_dash_hidden]" value="Y">
860
  <?php wp_nonce_field('gadash_form','gadash_security'); ?>
861
  </td>
874
  <td colspan="2"><?php echo "<h2>" . __( "General Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
875
  </tr>
876
  <tr>
877
+ <td class="gadwp-settings-title"><label for="ga_dash_tableid_jail"><?php _e("Select View:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
878
  <td><select id="ga_dash_tableid_jail" <?php disabled(empty($options['ga_dash_profile_list']) || 1 == count($options['ga_dash_profile_list']), true); ?> name="options[ga_dash_tableid_jail]">
879
  <?php
880
  if ( ! empty( $options['ga_dash_profile_list'] ) ) {
900
  if ( $options['ga_dash_tableid_jail'] ) {
901
  ?>
902
  <tr>
903
+ <td class="gadwp-settings-title"></td>
904
  <td><?php
905
  $profile_info = GADWP_Tools::get_selected_profile( $gadwp->config->options['ga_dash_profile_list'], $gadwp->config->options['ga_dash_tableid_jail'] );
906
  echo '<pre>' . __( "View Name:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[0] ) . "<br />" . __( "Tracking ID:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[2] ) . "<br />" . __( "Default URL:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[3] ) . "<br />" . __( "Time Zone:", 'google-analytics-dashboard-for-wp' ) . "\t" . esc_html( $profile_info[5] ) . '</pre>';
910
  }
911
  ?>
912
  <tr>
913
+ <td class="gadwp-settings-title"><label for="ga_dash_style"><?php _e("Theme Color:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
914
  <td><input type="text" id="ga_dash_style" class="ga_dash_style" name="options[ga_dash_style]" value="<?php echo esc_attr($options['ga_dash_style']); ?>" size="10"></td>
915
  </tr>
916
  <tr>
921
  <td colspan="2"><?php echo "<h2>" . __( "Automatic Updates", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
922
  </tr>
923
  <tr>
924
+ <td colspan="2" class="gadwp-settings-title">
925
+ <div class="button-primary gadwp-settings-switchoo">
926
+ <input type="checkbox" name="options[automatic_updates_minorversion]" value="1" class="gadwp-settings-switchoo-checkbox" id="automatic_updates_minorversion" <?php checked( $options['automatic_updates_minorversion'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="automatic_updates_minorversion">
927
+ <div class="gadwp-settings-switchoo-inner"></div>
928
+ <div class="gadwp-settings-switchoo-switch"></div>
929
  </label>
930
  </div>
931
  <div class="switch-desc"><?php echo " ".__( "automatic updates for minor versions (security and maintenance releases only)", 'google-analytics-dashboard-for-wp' );?></div>
985
  try {
986
  $gadwp->gapi_controller->client->authenticate( $_POST['ga_dash_code'] );
987
  $gadwp->config->options['ga_dash_token'] = $gadwp->gapi_controller->client->getAccessToken();
 
 
988
  $gadwp->config->options['automatic_updates_minorversion'] = 1;
989
  $gadwp->config->set_plugin_options( true );
990
  $options = self::update_options( 'network' );
993
  foreach ( wp_get_sites( array(
994
  'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
995
  switch_to_blog( $blog['blog_id'] );
996
+ GADWP_Tools::delete_cache( 'gapi_errors' );
997
  restore_current_blog();
998
  }
999
  } else {
1000
+ GADWP_Tools::delete_cache( 'gapi_errors' );
1001
  }
1002
  if ( $gadwp->config->options['ga_dash_token'] && $gadwp->gapi_controller->client->getAccessToken() ) {
1003
  if ( ! empty( $gadwp->config->options['ga_dash_profile_list'] ) ) {
1017
  }
1018
  }
1019
  } catch ( Google_IO_Exception $e ) {
1020
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $gadwp->gapi_controller->error_timeout );
1021
  return false;
1022
  } catch ( Google_Service_Exception $e ) {
1023
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( "(" . $e->getCode() . ") " . $e->getMessage() ), $gadwp->gapi_controller->error_timeout );
1024
+ GADWP_Tools::set_cache( 'gapi_errors', $e->getErrors(), $gadwp->gapi_controller->error_timeout );
1025
  return $e->getCode();
1026
  } catch ( Exception $e ) {
1027
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ) . "\nResponseHttpCode:" . $e->getCode(), $gadwp->gapi_controller->error_timeout );
1028
  $gadwp->gapi_controller->reset_token( false );
1029
  }
1030
  } else {
1096
  <div class="wrap">
1097
  <?php echo "<h2>" . __( "Google Analytics Settings", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?><hr>
1098
  </div>
1099
+ <div id="poststuff" class="gadwp">
1100
  <div id="post-body" class="metabox-holder columns-2">
1101
  <div id="post-body-content">
1102
  <div class="settings-wrapper">
1103
  <div class="inside">
1104
  <?php
1105
+ if ( $gadwp->gapi_controller->gapi_errors_handler() || GADWP_Tools::get_cache('last_error')) {
1106
  $message = sprintf( '<div class="error"><p>%s</p></div>', sprintf( __( 'Something went wrong, check %1$s or %2$s.', 'google-analytics-dashboard-for-wp' ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadash_errors_debugging', false ), __( 'Errors & Debug', 'google-analytics-dashboard-for-wp' ) ), sprintf( '<a href="%1$s">%2$s</a>', menu_page_url( 'gadash_settings', false ), __( 'authorize the plugin', 'google-analytics-dashboard-for-wp' ) ) ) );
1107
  }
1108
  if ( isset( $_POST['Authorize'] ) ) {
1117
  <form name="ga_dash_form" method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
1118
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
1119
  <?php wp_nonce_field('gadash_form','gadash_security'); ?>
1120
+ <table class="gadwp-settings-options">
1121
  <tr>
1122
  <td colspan="2"><?php echo "<h2>" . __( "Network Setup", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1123
  </tr>
1124
  <tr>
1125
+ <td colspan="2" class="gadwp-settings-title">
1126
+ <div class="button-primary gadwp-settings-switchoo">
1127
+ <input type="checkbox" name="options[ga_dash_network]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_dash_network" <?php checked( $options['ga_dash_network'], 1); ?> onchange="this.form.submit()"> <label class="gadwp-settings-switchoo-label" for="ga_dash_network">
1128
+ <div class="gadwp-settings-switchoo-inner"></div>
1129
+ <div class="gadwp-settings-switchoo-switch"></div>
1130
  </label>
1131
  </div>
1132
  <div class="switch-desc"><?php echo " ".__("use a single Google Analytics account for the entire network", 'google-analytics-dashboard-for-wp' );?></div>
1140
  <td colspan="2"><?php echo "<h2>" . __( "Plugin Authorization", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1141
  </tr>
1142
  <tr>
1143
+ <td colspan="2" class="gadwp-settings-info">
1144
  <?php printf(__('You should watch the %1$s and read this %2$s before proceeding to authorization. This plugin requires a properly configured Google Analytics account!', 'google-analytics-dashboard-for-wp'), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=top_video&utm_campaign=gadwp', __("video", 'google-analytics-dashboard-for-wp')), sprintf('<a href="%1$s" target="_blank">%2$s</a>', 'https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=top_tutorial&utm_campaign=gadwp', __("tutorial", 'google-analytics-dashboard-for-wp')));?>
1145
  </td>
1146
  </tr>
1148
  if ( ! $options['ga_dash_token'] || $options['ga_dash_userapi'] ) {
1149
  ?>
1150
  <tr>
1151
+ <td colspan="2" class="gadwp-settings-info"><input name="options[ga_dash_userapi]" type="checkbox" id="ga_dash_userapi" value="1" <?php checked( $options['ga_dash_userapi'], 1 ); ?> onchange="this.form.submit()" /><?php echo " ".__("use your own API Project credentials", 'google-analytics-dashboard-for-wp' );?>
1152
  </td>
1153
  </tr>
1154
  <?php
1156
  if ( $options['ga_dash_userapi'] ) {
1157
  ?>
1158
  <tr>
1159
+ <td class="gadwp-settings-title"><label for="options[ga_dash_apikey]"><?php _e("API Key:", 'google-analytics-dashboard-for-wp'); ?></label></td>
1160
  <td><input type="text" name="options[ga_dash_apikey]" value="<?php echo esc_attr($options['ga_dash_apikey']); ?>" size="40" required="required"></td>
1161
  </tr>
1162
  <tr>
1163
+ <td class="gadwp-settings-title"><label for="options[ga_dash_clientid]"><?php _e("Client ID:", 'google-analytics-dashboard-for-wp'); ?></label></td>
1164
  <td><input type="text" name="options[ga_dash_clientid]" value="<?php echo esc_attr($options['ga_dash_clientid']); ?>" size="40" required="required"></td>
1165
  </tr>
1166
  <tr>
1167
+ <td class="gadwp-settings-title"><label for="options[ga_dash_clientsecret]"><?php _e("Client Secret:", 'google-analytics-dashboard-for-wp'); ?></label></td>
1168
  <td><input type="text" name="options[ga_dash_clientsecret]" value="<?php echo esc_attr($options['ga_dash_clientsecret']); ?>" size="40" required="required"> <input type="hidden" name="options[ga_dash_hidden]" value="Y">
1169
  <?php wp_nonce_field('gadash_form','gadash_security'); ?>
1170
  </td>
1190
  'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
1191
  ?>
1192
  <tr>
1193
+ <td class="gadwp-settings-title-s"><label for="ga_dash_tableid_network"><?php echo '<strong>'.$blog['domain'].$blog['path'].'</strong>: ';?></label></td>
1194
  <td><select id="ga_dash_tableid_network" <?php disabled(!empty($options['ga_dash_profile_list']),false);?> name="options[ga_dash_tableid_network][<?php echo $blog['blog_id'];?>]">
1195
  <?php
1196
  if ( ! empty( $options['ga_dash_profile_list'] ) ) {
1213
  <td colspan="2"><?php echo "<h2>" . __( "Automatic Updates", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1214
  </tr>
1215
  <tr>
1216
+ <td colspan="2" class="gadwp-settings-title">
1217
+ <div class="button-primary gadwp-settings-switchoo">
1218
+ <input type="checkbox" name="options[automatic_updates_minorversion]" value="1" class="gadwp-settings-switchoo-checkbox" id="automatic_updates_minorversion" <?php checked( $options['automatic_updates_minorversion'], 1 ); ?>> <label class="gadwp-settings-switchoo-label" for="automatic_updates_minorversion">
1219
+ <div class="gadwp-settings-switchoo-inner"></div>
1220
+ <div class="gadwp-settings-switchoo-switch"></div>
1221
  </label>
1222
  </div>
1223
  <div class="switch-desc"><?php echo " ".__( "automatic updates for minor versions (security and maintenance releases only)", 'google-analytics-dashboard-for-wp' );?></div>
1227
  <td colspan="2"><hr><?php echo "<h2>" . __( "Exclude Tracking", 'google-analytics-dashboard-for-wp' ) . "</h2>"; ?></td>
1228
  </tr>
1229
  <tr>
1230
+ <td colspan="2" class="gadwp-settings-title">
1231
+ <div class="button-primary gadwp-settings-switchoo">
1232
+ <input type="checkbox" name="options[ga_dash_excludesa]" value="1" class="gadwp-settings-switchoo-checkbox" id="ga_dash_excludesa"<?php checked( $options['ga_dash_excludesa'], 1); ?>"> <label class="gadwp-settings-switchoo-label" for="ga_dash_excludesa">
1233
+ <div class="gadwp-settings-switchoo-inner"></div>
1234
+ <div class="gadwp-settings-switchoo-switch"></div>
1235
  </label>
1236
  </div>
1237
  <div class="switch-desc"><?php echo " ".__("exclude Super Admin tracking for the entire network", 'google-analytics-dashboard-for-wp' );?></div>
admin/setup.php CHANGED
@@ -84,7 +84,7 @@ if ( ! class_exists( 'GADWP_Backend_Setup' ) ) {
84
  * GADWP UI
85
  */
86
 
87
- if ( get_transient( 'ga_dash_gapi_errors' ) ) {
88
  $ed_bubble = '!';
89
  } else {
90
  $ed_bubble = '';
@@ -197,7 +197,7 @@ if ( ! class_exists( 'GADWP_Backend_Setup' ) ) {
197
  'colorVariations' => GADWP_Tools::variations( $this->gadwp->config->options['ga_dash_style'] ),
198
  'region' => $region,
199
  'language' => get_bloginfo( 'language' ),
200
- 'scope' => 'admin',
201
  )
202
  );
203
  /* @formatter:on */
84
  * GADWP UI
85
  */
86
 
87
+ if ( GADWP_Tools::get_cache( 'gapi_errors' ) ) {
88
  $ed_bubble = '!';
89
  } else {
90
  $ed_bubble = '';
197
  'colorVariations' => GADWP_Tools::variations( $this->gadwp->config->options['ga_dash_style'] ),
198
  'region' => $region,
199
  'language' => get_bloginfo( 'language' ),
200
+ 'scope' => 'admin-item',
201
  )
202
  );
203
  /* @formatter:on */
admin/widgets.php CHANGED
@@ -14,7 +14,7 @@ if ( ! class_exists( 'GADWP_Backend_Widgets' ) ) {
14
 
15
  class GADWP_Backend_Widgets {
16
 
17
- private $gawp;
18
 
19
  public function __construct() {
20
  $this->gadwp = GADWP();
14
 
15
  class GADWP_Backend_Widgets {
16
 
17
+ private $gadwp;
18
 
19
  public function __construct() {
20
  $this->gadwp = GADWP();
config.php CHANGED
@@ -16,13 +16,10 @@ if ( ! class_exists( 'GADWP_Config' ) ) {
16
 
17
  public $options;
18
 
19
- public $access = array( '65556128781.apps.googleusercontent.com', 'Kc7888wgbc_JbeCpbFjnYpwE', 'AIzaSymApG7LlUoHc29ZeC_dsShVaBEX15SfRl_WY' );
20
-
21
  public function __construct() {
22
  // get plugin options
23
  $this->get_plugin_options();
24
  $this->last_requested_report();
25
- $this->access = array_map( array( $this, 'map' ), $this->access );
26
  add_filter( 'auto_update_plugin', array( $this, 'automatic_update' ), 10, 2 );
27
  }
28
 
@@ -123,6 +120,12 @@ if ( ! class_exists( 'GADWP_Config' ) ) {
123
  }
124
  $options['ga_event_affiliates'] = sanitize_text_field( $options['ga_event_affiliates'] );
125
  }
 
 
 
 
 
 
126
  return $options;
127
  }
128
 
@@ -135,8 +138,6 @@ if ( ! class_exists( 'GADWP_Config' ) ) {
135
  if ( $network_settings ) { // Retrieve network options, clear blog options, store both to db
136
  $network_options['ga_dash_token'] = $this->options['ga_dash_token'];
137
  $options['ga_dash_token'] = '';
138
- $network_options['ga_dash_refresh_token'] = $this->options['ga_dash_refresh_token'];
139
- $options['ga_dash_refresh_token'] = '';
140
  if ( is_network_admin() ) {
141
  $network_options['ga_dash_profile_list'] = $this->options['ga_dash_profile_list'];
142
  $options['ga_dash_profile_list'] = array();
@@ -163,10 +164,6 @@ if ( ! class_exists( 'GADWP_Config' ) ) {
163
  update_option( 'gadash_options', json_encode( $this->validate_data( $options ) ) );
164
  }
165
 
166
- private function map( $map ) {
167
- return str_ireplace( 'map', chr( 66 ), $map );
168
- }
169
-
170
  private function get_plugin_options() {
171
  /*
172
  * Get plugin options
@@ -198,19 +195,34 @@ if ( ! class_exists( 'GADWP_Config' ) ) {
198
  $flag = false;
199
 
200
  if ( GADWP_CURRENT_VERSION != get_option( 'gadwp_version' ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  GADWP_Tools::clear_cache();
 
202
  $flag = true;
203
- delete_transient( 'ga_dash_lasterror' );
204
  update_option( 'gadwp_version', GADWP_CURRENT_VERSION );
205
  update_option( 'gadwp_got_updated', true );
206
  if ( is_multisite() ) { // Cleanup errors and cookies on the entire network
207
  foreach ( wp_get_sites( array( 'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
208
  switch_to_blog( $blog['blog_id'] );
209
- delete_transient( 'ga_dash_gapi_errors' );
210
  restore_current_blog();
211
  }
212
  } else {
213
- delete_transient( 'ga_dash_gapi_errors' );
214
  }
215
  GADWP_Tools::unset_cookie( 'default_metric' );
216
  GADWP_Tools::unset_cookie( 'default_dimension' );
@@ -219,7 +231,7 @@ if ( ! class_exists( 'GADWP_Config' ) ) {
219
  $this->options['ga_enhanced_links'] = 0;
220
  $flag = true;
221
  }
222
- if ( ! isset( $this->options['ga_enhanced_network'] ) ) {
223
  $this->options['ga_dash_network'] = 0;
224
  $flag = true;
225
  }
16
 
17
  public $options;
18
 
 
 
19
  public function __construct() {
20
  // get plugin options
21
  $this->get_plugin_options();
22
  $this->last_requested_report();
 
23
  add_filter( 'auto_update_plugin', array( $this, 'automatic_update' ), 10, 2 );
24
  }
25
 
120
  }
121
  $options['ga_event_affiliates'] = sanitize_text_field( $options['ga_event_affiliates'] );
122
  }
123
+
124
+ $token = json_decode( $options['ga_dash_token'] ); // v4.8.2
125
+ if ( isset( $token->token_type ) ) {
126
+ unset( $options['ga_dash_refresh_token'] );
127
+ }
128
+
129
  return $options;
130
  }
131
 
138
  if ( $network_settings ) { // Retrieve network options, clear blog options, store both to db
139
  $network_options['ga_dash_token'] = $this->options['ga_dash_token'];
140
  $options['ga_dash_token'] = '';
 
 
141
  if ( is_network_admin() ) {
142
  $network_options['ga_dash_profile_list'] = $this->options['ga_dash_profile_list'];
143
  $options['ga_dash_profile_list'] = array();
164
  update_option( 'gadash_options', json_encode( $this->validate_data( $options ) ) );
165
  }
166
 
 
 
 
 
167
  private function get_plugin_options() {
168
  /*
169
  * Get plugin options
195
  $flag = false;
196
 
197
  if ( GADWP_CURRENT_VERSION != get_option( 'gadwp_version' ) ) {
198
+
199
+ $rebuild_token = json_decode( $this->options['ga_dash_token'] ); // v4.8.2
200
+ if ( is_object( $rebuild_token ) && ! isset( $rebuild_token->token_type ) ) {
201
+ if ( isset( $this->options['ga_dash_refresh_token'] ) ) {
202
+ $rebuild_token->refresh_token = $this->options['ga_dash_refresh_token'];
203
+ }
204
+ $rebuild_token->token_type = "Bearer";
205
+ $this->options['ga_dash_token'] = json_encode( $rebuild_token );
206
+ unset( $this->options['ga_dash_refresh_token'] );
207
+ $this->set_plugin_options( true );
208
+ } else {
209
+ unset( $this->options['ga_dash_refresh_token'] );
210
+ }
211
+
212
  GADWP_Tools::clear_cache();
213
+ GADWP_Tools::clear_transients(); // 4.8.3 to be removed after a few months
214
  $flag = true;
215
+ GADWP_Tools::delete_cache( 'last_error' );
216
  update_option( 'gadwp_version', GADWP_CURRENT_VERSION );
217
  update_option( 'gadwp_got_updated', true );
218
  if ( is_multisite() ) { // Cleanup errors and cookies on the entire network
219
  foreach ( wp_get_sites( array( 'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
220
  switch_to_blog( $blog['blog_id'] );
221
+ GADWP_Tools::delete_cache( 'gapi_errors' );
222
  restore_current_blog();
223
  }
224
  } else {
225
+ GADWP_Tools::delete_cache( 'gapi_errors' );
226
  }
227
  GADWP_Tools::unset_cookie( 'default_metric' );
228
  GADWP_Tools::unset_cookie( 'default_dimension' );
231
  $this->options['ga_enhanced_links'] = 0;
232
  $flag = true;
233
  }
234
+ if ( ! isset( $this->options['ga_dash_network'] ) ) {
235
  $this->options['ga_dash_network'] = 0;
236
  $flag = true;
237
  }
front/setup.php CHANGED
@@ -31,11 +31,6 @@ if ( ! class_exists( 'GADWP_Frontend_Setup' ) ) {
31
  */
32
  public function load_styles_scripts() {
33
 
34
- /*
35
- * GADWP main stylesheet
36
- */
37
- wp_enqueue_style( 'ga_dash-front', GADWP_URL . 'front/css/item-reports.css', null, GADWP_CURRENT_VERSION );
38
-
39
  /*
40
  * Item reports Styles & Scripts
41
  */
@@ -110,7 +105,7 @@ if ( ! class_exists( 'GADWP_Frontend_Setup' ) ) {
110
  'region' => $region,
111
  'language' => get_bloginfo( 'language' ),
112
  'filter' => $_SERVER["REQUEST_URI"],
113
- 'scope' => 'front',
114
  )
115
  );
116
  /* @formatter:on */
31
  */
32
  public function load_styles_scripts() {
33
 
 
 
 
 
 
34
  /*
35
  * Item reports Styles & Scripts
36
  */
105
  'region' => $region,
106
  'language' => get_bloginfo( 'language' ),
107
  'filter' => $_SERVER["REQUEST_URI"],
108
+ 'scope' => 'front-item',
109
  )
110
  );
111
  /* @formatter:on */
gadwp.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://deconf.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: Alin Marcu
7
- * Version: 4.8.1.3
8
  * Author URI: https://deconf.com
9
  * Text Domain: google-analytics-dashboard-for-wp
10
  * Domain Path: /languages
@@ -14,6 +14,11 @@
14
  if ( ! defined( 'ABSPATH' ) )
15
  exit();
16
 
 
 
 
 
 
17
  if ( ! class_exists( 'GADWP_Manager' ) ) {
18
 
19
  final class GADWP_Manager {
@@ -82,11 +87,6 @@ if ( ! class_exists( 'GADWP_Manager' ) ) {
82
  */
83
  private function setup() {
84
 
85
- // Plugin Version
86
- if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) {
87
- define( 'GADWP_CURRENT_VERSION', '4.8.1.3' );
88
- }
89
-
90
  // Plugin Path
91
  if ( ! defined( 'GADWP_DIR' ) ) {
92
  define( 'GADWP_DIR', plugin_dir_path( __FILE__ ) );
4
  * Plugin URI: https://deconf.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: Alin Marcu
7
+ * Version: 4.8.2
8
  * Author URI: https://deconf.com
9
  * Text Domain: google-analytics-dashboard-for-wp
10
  * Domain Path: /languages
14
  if ( ! defined( 'ABSPATH' ) )
15
  exit();
16
 
17
+ // Plugin Version
18
+ if ( ! defined( 'GADWP_CURRENT_VERSION' ) ) {
19
+ define( 'GADWP_CURRENT_VERSION', '4.8.2' );
20
+ }
21
+
22
  if ( ! class_exists( 'GADWP_Manager' ) ) {
23
 
24
  final class GADWP_Manager {
87
  */
88
  private function setup() {
89
 
 
 
 
 
 
90
  // Plugin Path
91
  if ( ! defined( 'GADWP_DIR' ) ) {
92
  define( 'GADWP_DIR', plugin_dir_path( __FILE__ ) );
install/install.php CHANGED
@@ -36,7 +36,6 @@ class GADWP_Install {
36
  $options['ga_target_geomap'] = '';
37
  $options['ga_realtime_pages'] = 10;
38
  $options['ga_dash_token'] = '';
39
- $options['ga_dash_refresh_token'] = '';
40
  $options['ga_dash_profile_list'] = array();
41
  $options['ga_dash_tableid'] = '';
42
  $options['ga_dash_frontend_keywords'] = 0;
@@ -89,7 +88,6 @@ class GADWP_Install {
89
  $options['ga_target_geomap'] = get_option( 'ga_target_geomap' );
90
  $options['ga_realtime_pages'] = get_option( 'ga_realtime_pages' );
91
  $options['ga_dash_token'] = get_option( 'ga_dash_token' );
92
- $options['ga_dash_refresh_token'] = get_option( 'ga_dash_refresh_token' );
93
  $options['ga_dash_profile_list'] = get_option( 'ga_dash_profile_list' );
94
  $options['ga_dash_tableid'] = get_option( 'ga_dash_tableid' );
95
  $options['ga_dash_frontend_keywords'] = 0;
36
  $options['ga_target_geomap'] = '';
37
  $options['ga_realtime_pages'] = 10;
38
  $options['ga_dash_token'] = '';
 
39
  $options['ga_dash_profile_list'] = array();
40
  $options['ga_dash_tableid'] = '';
41
  $options['ga_dash_frontend_keywords'] = 0;
88
  $options['ga_target_geomap'] = get_option( 'ga_target_geomap' );
89
  $options['ga_realtime_pages'] = get_option( 'ga_realtime_pages' );
90
  $options['ga_dash_token'] = get_option( 'ga_dash_token' );
 
91
  $options['ga_dash_profile_list'] = get_option( 'ga_dash_profile_list' );
92
  $options['ga_dash_tableid'] = get_option( 'ga_dash_tableid' );
93
  $options['ga_dash_frontend_keywords'] = 0;
install/uninstall.php CHANGED
@@ -16,30 +16,16 @@ class GADWP_Uninstall {
16
  public static function uninstall() {
17
  global $wpdb;
18
  if ( is_multisite() ) { // Cleanup Network install
19
- foreach ( wp_get_sites( array(
20
- 'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
21
  switch_to_blog( $blog['blog_id'] );
22
- $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_gadash%%'" );
23
- $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_gadash%%'" );
24
- $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_ga_dash%%'" );
25
- $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_ga_dash%%'" );
26
  delete_option( 'gadash_options' );
27
- delete_transient( 'ga_dash_lasterror' );
28
- delete_transient( 'ga_dash_refresh_token' );
29
- delete_transient( 'ga_dash_gapi_errors' );
30
  restore_current_blog();
31
  }
32
  delete_site_option( 'gadash_network_options' );
33
- delete_site_transient( 'ga_dash_refresh_token' );
34
  } else { // Cleanup Single install
35
- $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_gadash%%'" );
36
- $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_gadash%%'" );
37
- $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_ga_dash%%'" );
38
- $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_ga_dash%%'" );
39
  delete_option( 'gadash_options' );
40
- delete_transient( 'ga_dash_lasterror' );
41
- delete_transient( 'ga_dash_refresh_token' );
42
- delete_transient( 'ga_dash_gapi_errors' );
43
  }
44
  }
45
  }
16
  public static function uninstall() {
17
  global $wpdb;
18
  if ( is_multisite() ) { // Cleanup Network install
19
+ foreach ( wp_get_sites( array( 'limit' => apply_filters( 'gadwp_sites_limit', 100 ) ) ) as $blog ) {
 
20
  switch_to_blog( $blog['blog_id'] );
21
+ $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'gadwp_cache_%%'" );
 
 
 
22
  delete_option( 'gadash_options' );
 
 
 
23
  restore_current_blog();
24
  }
25
  delete_site_option( 'gadash_network_options' );
 
26
  } else { // Cleanup Single install
27
+ $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'gadwp_cache_%%'" );
 
 
 
28
  delete_option( 'gadash_options' );
 
 
 
29
  }
30
  }
31
  }
languages/google-analytics-dashboard-for-wp-el_GR.mo CHANGED
Binary file
languages/google-analytics-dashboard-for-wp-el_GR.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/google-analytics-dashboard-for-wp\n"
7
- "POT-Creation-Date: 2015-08-04 16:53+0300\n"
8
- "PO-Revision-Date: 2015-08-04 16:53+0300\n"
9
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
10
  "Language-Team: Alin Marcu\n"
11
  "Language: el_GR\n"
@@ -13,7 +13,7 @@ msgstr ""
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
- "X-Generator: Poedit 1.8.4\n"
17
  "X-Poedit-SourceCharset: UTF-8\n"
18
  "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;__:1;_e:1;_c:1;_n:1,2;"
19
  "_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;_x:1,2c;_ex:1,2c;_nx:1,2,4c;"
@@ -27,35 +27,35 @@ msgid "Analytics"
27
  msgstr "Αναλυτικά Δεδομένα"
28
 
29
  #: .././admin/settings.php:89 .././admin/settings.php:184 .././admin/settings.php:318
30
- #: .././admin/settings.php:795 .././admin/settings.php:1069
31
  msgid "Settings saved."
32
- msgstr "Οι ρυθμίσεις αποθηκεύθηκαν"
33
 
34
  #: .././admin/settings.php:91 .././admin/settings.php:186 .././admin/settings.php:320
35
  #: .././admin/settings.php:772 .././admin/settings.php:782 .././admin/settings.php:791
36
- #: .././admin/settings.php:797 .././admin/settings.php:808 .././admin/settings.php:1030
37
- #: .././admin/settings.php:1055 .././admin/settings.php:1065 .././admin/settings.php:1071
38
- #: .././admin/settings.php:1082
39
  msgid "Cheating Huh?"
40
- msgstr "Εξαπάτηση ?"
41
 
42
  #: .././admin/settings.php:95 .././admin/settings.php:190 .././admin/settings.php:324
43
- #: .././admin/settings.php:641 .././admin/settings.php:823 .././admin/settings.php:1096
44
  #, php-format
45
  msgid "Something went wrong, check %1$s or %2$s."
46
- msgstr "Κάτι πήγε στραβά, ελέγξτε %1$s ή %2$s.."
47
 
48
  #: .././admin/settings.php:95 .././admin/settings.php:190 .././admin/settings.php:324
49
- #: .././admin/settings.php:641 .././admin/settings.php:823 .././admin/settings.php:1096
50
  #: .././admin/setup.php:46 .././admin/setup.php:59
51
  msgid "Errors & Debug"
52
- msgstr "Σφάλματα & εντοπισμού σφαλμάτων"
53
 
54
  #: .././admin/settings.php:95 .././admin/settings.php:190 .././admin/settings.php:324
55
- #: .././admin/settings.php:641 .././admin/settings.php:823 .././admin/settings.php:1096
56
  #: .././admin/setup.php:195 .././front/setup.php:107
57
  msgid "authorize the plugin"
58
- msgstr "να εγκρίθει το plugin"
59
 
60
  #: .././admin/settings.php:100
61
  msgid "Google Analytics Frontend Settings"
@@ -74,25 +74,25 @@ msgid "enable web page reports on frontend"
74
  msgstr "ενεργοποίηση των αναφορών στο frontend της ιστοσελίδας"
75
 
76
  #: .././admin/settings.php:161 .././admin/settings.php:297 .././admin/settings.php:598
77
- #: .././admin/settings.php:944 .././admin/settings.php:1234
78
  msgid "Save Changes"
79
  msgstr "Αποθήκευση Αλλαγών"
80
 
81
  #: .././admin/settings.php:195
82
  msgid "Google Analytics Backend Settings"
83
- msgstr "Google Analytics Backend ρυθμίσεις"
84
 
85
  #: .././admin/settings.php:251
86
  msgid "enable Switch View functionality"
87
- msgstr "ενεργοποίηση λειτουργίας Εναλλαγη Όψης"
88
 
89
  #: .././admin/settings.php:262
90
  msgid "enable reports on Posts List and Pages List"
91
- msgstr "ενεργοποίηση αναφορών στην Λίστα Δημοσιεύσεων και Λίστα Σελίδων"
92
 
93
  #: .././admin/settings.php:273
94
  msgid "enable the main Dashboard Widget"
95
- msgstr "ενεργοποίηση του κύριου widget στο Ταμπλό"
96
 
97
  #: .././admin/settings.php:277
98
  msgid "Real-Time Settings"
@@ -108,15 +108,15 @@ msgstr "Ρυθμίσεις Τοποθεσίας"
108
 
109
  #: .././admin/settings.php:289
110
  msgid "Target Geo Map to country:"
111
- msgstr "Στοχεύστε το Geo Map στην χώρα:"
112
 
113
  #: .././admin/settings.php:327
114
  msgid ""
115
  "The tracking component is disabled. You should set <strong>Tracking Options</strong> to "
116
  "<strong>Enabled</strong>"
117
  msgstr ""
118
- "Το αντικείμενο παρακολούθησης είναι απενεργοποιημένο. Πρέπει να θέσετε το <strong>Επιλογές "
119
- "Εντοπισμού</strong> σε <strong>Ενεργό</strong>"
120
 
121
  #: .././admin/settings.php:332
122
  msgid "Google Analytics Tracking Code"
@@ -134,9 +134,9 @@ msgstr "Παρακολούθηση Συμβάντων"
134
  msgid "Custom Definitions"
135
  msgstr "Προσαρμοσμένοι Ορισμοί"
136
 
137
- #: .././admin/settings.php:344 .././admin/settings.php:554 .././admin/settings.php:1217
138
  msgid "Exclude Tracking"
139
- msgstr "Αποκλεισμός Εντοπισμού"
140
 
141
  #: .././admin/settings.php:345
142
  msgid "Advanced Settings"
@@ -144,22 +144,22 @@ msgstr "Προχωρημένες Ρυθμίσεις"
144
 
145
  #: .././admin/settings.php:353
146
  msgid "Tracking Settings"
147
- msgstr "Ρυθμίσεις Εντοπισμού"
148
 
149
  #: .././admin/settings.php:356
150
  msgid "Tracking Options:"
151
- msgstr "Επιλογές Εντοπισμού:"
152
 
153
  #: .././admin/settings.php:358
154
  msgid "Disabled"
155
- msgstr "Απενεργοποιημένο"
156
 
157
  #: .././admin/settings.php:359
158
  msgid "Enabled"
159
- msgstr "Ενεργοποιημένο"
160
 
161
  #: .././admin/settings.php:367 .././admin/settings.php:889 .././admin/settings.php:911
162
- #: .././admin/settings.php:1190 .././admin/widgets.php:61
163
  msgid "View Name:"
164
  msgstr "Προβολή Ονόματος:"
165
 
@@ -173,7 +173,7 @@ msgstr "Προκαθορισμένο URL:"
173
 
174
  #: .././admin/settings.php:367 .././admin/settings.php:911
175
  msgid "Time Zone:"
176
- msgstr "Ζώνη Ώρας"
177
 
178
  #: .././admin/settings.php:372
179
  msgid "Basic Tracking"
@@ -193,7 +193,7 @@ msgstr "Γενικά Αναλυτικά Δεδομένα"
193
 
194
  #: .././admin/settings.php:389
195
  msgid "anonymize IPs while tracking"
196
- msgstr "ανωνυμοποίηση ΙΡs κατά τη διάρκεια παρακολούθησης"
197
 
198
  #: .././admin/settings.php:400
199
  msgid "enable remarketing, demographics and interests reports"
@@ -209,15 +209,15 @@ msgstr "Λήψεις Regex:"
209
 
210
  #: .././admin/settings.php:433
211
  msgid "track affiliate links matching this regex"
212
- msgstr "παρακολούθηση θυγατρικών συνδέσμων που ταιριάζουν σε αυτο το regex"
213
 
214
  #: .././admin/settings.php:437
215
  msgid "Affiliates Regex:"
216
- msgstr "Θυγατρικό Regex:"
217
 
218
  #: .././admin/settings.php:448
219
  msgid "track fragment identifiers, hashmarks (#) in URI links"
220
- msgstr "παρακολούθηση μέρους αναγνωριστικών, δίεσεων (#) σε συνδέσμους URI"
221
 
222
  #: .././admin/settings.php:459
223
  msgid "Authors:"
@@ -225,7 +225,7 @@ msgstr "Συγγραφείς:"
225
 
226
  #: .././admin/settings.php:467
227
  msgid "Publication Year:"
228
- msgstr "Χρονιά Δημοσίευσης:"
229
 
230
  #: .././admin/settings.php:475
231
  msgid "Categories:"
@@ -245,7 +245,7 @@ msgstr "Ταχύτητα Σελίδας SR:"
245
 
246
  #: .././admin/settings.php:509
247
  msgid "exclude events from bounce-rate calculation"
248
- msgstr "αποκελισμός συμβάντων απο υπολογισμούς bounce-rate"
249
 
250
  #: .././admin/settings.php:520
251
  msgid "enable enhanced link attribution"
@@ -253,11 +253,11 @@ msgstr "ενεργοποίηση απόδοσης ενισχυμένου συν
253
 
254
  #: .././admin/settings.php:531
255
  msgid "enable AdSense account linking"
256
- msgstr "ενεργοποίηση λογαριασμού σύνδεσης AdSense "
257
 
258
  #: .././admin/settings.php:542
259
  msgid "enable cross domain tracking"
260
- msgstr "ενεργοποίηση παρακολούθησης cross domain "
261
 
262
  #: .././admin/settings.php:546
263
  msgid "Cross Domains:"
@@ -277,11 +277,11 @@ msgstr "Σφάλματα & Λεπτομέρειες"
277
 
278
  #: .././admin/settings.php:656
279
  msgid "Plugin Settings"
280
- msgstr "Ρυθμίσεις Plugin:"
281
 
282
  #: .././admin/settings.php:663
283
  msgid "Last Error detected"
284
- msgstr "Τελευταίο Σφάλμα που εντοπίστηκε"
285
 
286
  #: .././admin/settings.php:669 .././admin/settings.php:682
287
  msgid "None"
@@ -289,122 +289,122 @@ msgstr "Κανένα"
289
 
290
  #: .././admin/settings.php:676
291
  msgid "Error Details"
292
- msgstr "Λεπτομέρεις Σφάλματος"
293
 
294
  #: .././admin/settings.php:696
295
  msgid "Plugin Configuration"
296
- msgstr "Προσομοίωωση Plugin"
297
 
298
  #: .././admin/settings.php:717 .././admin/settings.php:981
299
  msgid ""
300
  "Loading the required libraries. If this results in a blank screen or a fatal error, try this "
301
  "solution:"
302
  msgstr ""
303
- "Φόρτωση των απαιτούμενων βιβλιοθηκών. Εαν αυτό καταλήξει σε μια κενή οθόνη ή σε σοβαρό σφάλμα, "
304
- "δοκιμάστε αυτήν τη λύση:"
305
 
306
  #: .././admin/settings.php:717
307
  msgid "Library conflicts between WordPress plugins"
308
- msgstr "Η βιβλιοθήκη αντιτίθεται με plugins του WordPress"
309
 
310
  #: .././admin/settings.php:732 .././admin/settings.php:998
311
  msgid "Plugin authorization succeeded."
312
- msgstr "Η επικύρωση του Plugin πέτυχε."
313
 
314
- #: .././admin/settings.php:747 .././admin/settings.php:1021
315
  msgid ""
316
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> (UA-XXXXX-X). Try "
317
  "again, and use the red link to get your access code"
318
  msgstr ""
319
- "Ο κωδικός πρόσβασης <strong>ΔΕΝ ΕΙΝΑΙ</strong> το δικό σας <strong>Tracking ID</strong> (UA-"
320
- "XXXXX-X). Προσπαθήστε ξανά, και χρησιμοποιήστε τον κόκκινο σύνδεσμο για να πάρετε τον κωδικό "
321
- "πρόσβασής σας."
322
 
323
- #: .././admin/settings.php:770 .././admin/settings.php:1053
324
  msgid "Cleared Cache."
325
- msgstr "Η Cache εκκαθαρίστηκε."
326
 
327
- #: .././admin/settings.php:779 .././admin/settings.php:1062
328
  msgid "Token Reseted and Revoked."
329
- msgstr "Το Token Επαναπροσδιορίστηκε και Ανακλήθηκε."
330
 
331
  #: .././admin/settings.php:789
332
  msgid "All errors reseted."
333
- msgstr "Όλα τα σφάλματα επαναπροσδιορίστηκαν."
334
 
335
- #: .././admin/settings.php:802 .././admin/settings.php:1076
336
  msgid "All other domains/properties were removed."
337
- msgstr "Όλα τα άλλα domains/ιδιότητες έχουν απομακρυνθεί."
338
 
339
- #: .././admin/settings.php:813 .././admin/settings.php:1087
340
  msgid "Google Analytics Settings"
341
  msgstr "Ρυθμίσεις Google Analytics "
342
 
343
- #: .././admin/settings.php:828 .././admin/settings.php:1101
344
  msgid "Use the red link (see below) to generate and get your access code!"
345
  msgstr ""
346
- "Χρησιμοποιήστε τον κόκκινο σύνδεσμο (βλέπετε παρακάτω) για να δημιουργήσετε και να αποκτήσετε "
347
- "τον δικό σας κωδικό πρόσβασης!"
348
 
349
- #: .././admin/settings.php:840 .././admin/settings.php:1130
350
  msgid "Plugin Authorization"
351
- msgstr "Εξουσιοδότηση Plugin"
352
 
353
- #: .././admin/settings.php:845 .././admin/settings.php:1134
354
  #, php-format
355
  msgid ""
356
  "You should watch the %1$s and read this %2$s before proceeding to authorization. This plugin "
357
  "requires a properly configured Google Analytics account!"
358
  msgstr ""
359
  "Πρέπει να δείτε το the %1$s και να διαβάσετε αυτό το%2$s πρίν προχωρήσετε στην εξουσιοδότηση. "
360
- "Αυτό το plugin απαιτεί ένα λογαριασμό Google Analytics κατάλληλα ρυθμισμένο!"
361
 
362
- #: .././admin/settings.php:845 .././admin/settings.php:1134
363
  msgid "video"
364
- msgstr "video"
365
 
366
- #: .././admin/settings.php:845 .././admin/settings.php:1134
367
  msgid "tutorial"
368
  msgstr "οδηγός"
369
 
370
- #: .././admin/settings.php:850 .././admin/settings.php:1141
371
  msgid "use your own API Project credentials"
372
- msgstr "χρησιμοποιήστε το δικό σας εργό πιστοποιητικών API"
373
 
374
- #: .././admin/settings.php:855 .././admin/settings.php:1149
375
  msgid "API Key:"
376
  msgstr "Κλειδί ΑΡΙ :"
377
 
378
- #: .././admin/settings.php:859 .././admin/settings.php:1153
379
  msgid "Client ID:"
380
  msgstr "ΙD πελάτη:"
381
 
382
- #: .././admin/settings.php:863 .././admin/settings.php:1157
383
  msgid "Client Secret:"
384
  msgstr "Κρυφό Πελάτη:"
385
 
386
- #: .././admin/settings.php:873 .././admin/settings.php:1167
387
  msgid "Clear Authorization"
388
  msgstr "Εκκαθάριση Εξουσιοδότησης"
389
 
390
- #: .././admin/settings.php:873 .././admin/settings.php:951 .././admin/settings.php:1167
391
- #: .././admin/settings.php:1243
392
  msgid "Clear Cache"
393
- msgstr "Εκκαθάριση Cache"
394
 
395
  #: .././admin/settings.php:873
396
  msgid "Reset Errors"
397
- msgstr "Επαναπροσδιορισμός Σφαλμάτων"
398
 
399
  #: .././admin/settings.php:879 .././admin/setup.php:42 .././admin/setup.php:58
400
  msgid "General Settings"
401
- msgstr "Γεινκές Ρυθμίσεις"
402
 
403
  #: .././admin/settings.php:882
404
  msgid "Select View:"
405
- msgstr "Επιλέξτε Όψη:"
406
 
407
- #: .././admin/settings.php:893 .././admin/settings.php:1194
408
  msgid "Property not found"
409
  msgstr "Η ιδιότητα δεν βρέθηκε"
410
 
@@ -416,100 +416,100 @@ msgstr "Κλείδωμα Επιλογής"
416
  msgid "Theme Color:"
417
  msgstr "Χρώμα Θέματος:"
418
 
419
- #: .././admin/settings.php:926 .././admin/settings.php:1203
420
  msgid "Automatic Updates"
421
- msgstr "Αυτόματη Αναβάθμιση"
422
 
423
- #: .././admin/settings.php:936 .././admin/settings.php:1213
424
  msgid "automatic updates for minor versions (security and maintenance releases only)"
425
- msgstr "αυτόματη αναβαθμιση για μερικές εκδόσεις (ασφάλειας και συντήρησης εκδόσεις μόνο)"
426
 
427
- #: .././admin/settings.php:951 .././admin/settings.php:1243 .././admin/widgets.php:32
428
  msgid "Authorize Plugin"
429
- msgstr "Εξουσιοδότηση Plugin"
430
 
431
- #: .././admin/settings.php:1027
432
  msgid "Properties refreshed."
433
  msgstr "Οι ιδιότητες ανανεώθηκαν."
434
 
435
- #: .././admin/settings.php:1112
436
  msgid "Network Setup"
437
  msgstr "Ρύθμιση Δικτύου"
438
 
439
- #: .././admin/settings.php:1122
440
  msgid "use a single Google Analytics account for the entire network"
441
- msgstr "χρησιμοποιήστε ένα μόνο λογαριασμό Google Analytics για το υπόλοιπο δίκτυο"
442
 
443
- #: .././admin/settings.php:1167
444
  msgid "Refresh Properties"
445
- msgstr "Ανανεώστε τις Ιδιότητες"
446
 
447
- #: .././admin/settings.php:1173
448
  msgid "Properties/Views Settings"
449
  msgstr "Ρυθμίσεις Ιδιοτήτων/Προβολών"
450
 
451
- #: .././admin/settings.php:1227
452
  msgid "exclude Super Admin tracking for the entire network"
453
- msgstr "αποκλεισμός παρακολούθησης Υπερ Διαχειριστή για το υπόλοιπο δίκτυο"
454
 
455
- #: .././admin/settings.php:1275
456
  msgid "Setup Tutorial & Demo"
457
- msgstr "Ρύθμιση Οδηγού & Demo "
458
 
459
- #: .././admin/settings.php:1283
460
  msgid "Follow & Review"
461
- msgstr "Ακολουθήστε & Αναθεωρήστε"
462
 
463
- #: .././admin/settings.php:1309
464
  #, php-format
465
  msgid "Your feedback and review are both important, %s!"
466
- msgstr "Η ανατροφοδότηση και η αναθεώρηση είναι εξίσου σημαντικές, %s!"
467
 
468
- #: .././admin/settings.php:1309
469
  msgid "rate this plugin"
470
- msgstr "βαθμολογήστε αυτο το plugin"
471
 
472
- #: .././admin/settings.php:1315
473
  msgid "Further Reading"
474
  msgstr "Περαιτέρω Διάβασμα"
475
 
476
- #: .././admin/settings.php:1322
477
  #, php-format
478
  msgid "%s by moving your website to HTTPS/SSL."
479
- msgstr "%s μεταφέροντας τον διαδικτυακό σας τόπο σε ΗΤΤΡ/SSL."
480
 
481
- #: .././admin/settings.php:1322
482
  msgid "Improve search rankings"
483
- msgstr "Βελτιώστε τις βαθμολογίες αναζήτησες"
484
 
485
- #: .././admin/settings.php:1329
486
  #, php-format
487
  msgid "Other %s written by the same author"
488
- msgstr "Υπάρχει %s γραμμένο απο τον ίδιο συγγραφέα"
489
 
490
- #: .././admin/settings.php:1329
491
  msgid "WordPress Plugins"
492
- msgstr "WordPress Plugins"
493
 
494
- #: .././admin/settings.php:1335
495
  msgid "Other Services"
496
  msgstr "Άλλες Υπηρεσίες"
497
 
498
- #: .././admin/settings.php:1342
499
  #, php-format
500
  msgid "Speed up your website and plug into a whole %s"
501
- msgstr "Αυξήστε την συνολική ταχύτητα του διαδικτυακού σας τόπου συνδέωντας το σε %s"
502
 
503
- #: .././admin/settings.php:1342
504
  msgid "new level of site speed"
505
- msgstr "νέο επίπεδο ταχύτητας site "
506
 
507
- #: .././admin/settings.php:1349
508
  #, php-format
509
  msgid "%s service with users tracking at IP level."
510
- msgstr " %s υπηρεσία με χρήστες που παρακολουθούν σε επίπεδο ΙΡ."
511
 
512
- #: .././admin/settings.php:1349
513
  msgid "Web Analytics"
514
  msgstr "Web Analytics"
515
 
@@ -535,7 +535,7 @@ msgstr "Σήμερα"
535
 
536
  #: .././admin/setup.php:160 .././admin/widgets.php:115 .././front/setup.php:72
537
  msgid "Yesterday"
538
- msgstr "Χθές"
539
 
540
  #: .././admin/setup.php:161 .././admin/setup.php:162 .././admin/setup.php:163
541
  #: .././admin/setup.php:164 .././admin/widgets.php:116 .././admin/widgets.php:117
@@ -570,23 +570,23 @@ msgstr "Μοναδικές προβολές"
570
 
571
  #: .././admin/setup.php:170 .././admin/setup.php:186 .././admin/widgets.php:127
572
  #: .././admin/widgets.php:827 .././front/setup.php:82 .././front/setup.php:98
573
- #: .././tools/gapi.php:357
574
  msgid "Users"
575
  msgstr "Χρήστες"
576
 
577
  #: .././admin/setup.php:171 .././admin/widgets.php:128 .././front/setup.php:83
578
  msgid "Organic"
579
- msgstr "Οργανικό"
580
 
581
  #: .././admin/setup.php:172 .././admin/setup.php:187 .././admin/widgets.php:129
582
  #: .././admin/widgets.php:831 .././front/setup.php:84 .././front/setup.php:99
583
- #: .././tools/gapi.php:360
584
  msgid "Page Views"
585
  msgstr "Προβολές Σελίδας"
586
 
587
  #: .././admin/setup.php:173 .././admin/setup.php:188 .././admin/widgets.php:130
588
  #: .././admin/widgets.php:835 .././front/setup.php:85 .././front/setup.php:100
589
- #: .././tools/gapi.php:363
590
  msgid "Bounce Rate"
591
  msgstr "Bounce Rate"
592
 
@@ -595,14 +595,14 @@ msgid "Location"
595
  msgstr "Τοποθεσία"
596
 
597
  #: .././admin/setup.php:175 .././admin/widgets.php:133 .././front/setup.php:87
598
- #: .././tools/gapi.php:502
599
  msgid "Referrers"
600
- msgstr "Αναφέρεται"
601
 
602
  #: .././admin/setup.php:176 .././admin/widgets.php:134 .././front/setup.php:88
603
- #: .././tools/gapi.php:535
604
  msgid "Searches"
605
- msgstr "Αναζητά"
606
 
607
  #: .././admin/setup.php:177 .././admin/widgets.php:135 .././front/setup.php:89
608
  msgid "Traffic Details"
@@ -611,11 +611,11 @@ msgstr "Λεπτομέρειες Κίνησης"
611
  #: .././admin/setup.php:180 .././admin/widgets.php:502 .././admin/widgets.php:587
612
  #: .././admin/widgets.php:754 .././admin/widgets.php:858 .././front/setup.php:92
613
  msgid "A JavaScript Error is blocking plugin resources!"
614
- msgstr "Ένα JavaScript Σφάλμα εμποδίζει τους πόρους του plugin!"
615
 
616
  #: .././admin/setup.php:181 .././admin/widgets.php:678 .././front/setup.php:93
617
  msgid "Traffic Mediums"
618
- msgstr "Traffic Mediums"
619
 
620
  #: .././admin/setup.php:182 .././admin/widgets.php:693 .././front/setup.php:94
621
  msgid "Visitor Type"
@@ -635,7 +635,7 @@ msgstr "Οργανική Αναζήτηση"
635
 
636
  #: .././admin/setup.php:190 .././admin/widgets.php:843 .././front/setup.php:102
637
  msgid "Pages/Session"
638
- msgstr "Σελίδες/Τομείς"
639
 
640
  #: .././admin/setup.php:191 .././admin/widgets.php:514 .././admin/widgets.php:528
641
  #: .././admin/widgets.php:538 .././admin/widgets.php:599 .././admin/widgets.php:613
@@ -644,7 +644,7 @@ msgstr "Σελίδες/Τομείς"
644
  #: .././admin/widgets.php:870 .././admin/widgets.php:884 .././admin/widgets.php:894
645
  #: .././front/setup.php:103
646
  msgid "Invalid response, more details in JavaScript Console (F12)."
647
- msgstr "Μη έγκυρη απάντηση. περισσότερες λεπτομέρειες στην Κονσόλα JavaScript (F12)."
648
 
649
  #: .././admin/setup.php:192 .././front/setup.php:104
650
  msgid "Not enough data collected"
@@ -660,37 +660,37 @@ msgstr "Αυτή η αναφορά δεν είναι διαθέσιμη"
660
 
661
  #: .././admin/setup.php:194 .././front/setup.php:106
662
  msgid "report generated by"
663
- msgstr "η αναφορά δημιουργήθηκε απο"
664
 
665
  #: .././admin/setup.php:195 .././admin/widgets.php:32 .././front/setup.php:107
666
  msgid "This plugin needs an authorization:"
667
- msgstr "Το plugin χρειάζεται εξουσιοδότηση:"
668
 
669
- #: .././admin/setup.php:227
670
  msgid "Settings"
671
  msgstr "Ρυθμίσεις"
672
 
673
- #: .././admin/setup.php:239
674
  #, php-format
675
  msgid "Google Analytics Dashboard for WP has been updated to version %s."
676
- msgstr "Το Ταμπλό του Google Analytics για το WP έχει αναβαθμιστεί στην έκδοση %s."
677
 
678
- #: .././admin/setup.php:239
679
  #, php-format
680
  msgid "For details, check out %1$s and %2$s."
681
- msgstr "Για λεπτομέρειες, ελέγξτε %1$s και %2$s."
682
 
683
- #: .././admin/setup.php:239
684
  msgid "the documentation page"
685
- msgstr "η σελίδα τεκμηρίωσης"
686
 
687
- #: .././admin/setup.php:239
688
  msgid "the plugin&#39;s settings page"
689
- msgstr "η σελίδα ρυθμίσεων του plugin &#39"
690
 
691
  #: .././admin/widgets.php:27 .././front/widgets.php:21
692
  msgid "Google Analytics Dashboard"
693
- msgstr "Ταμπλό Google Analytics"
694
 
695
  #: .././admin/widgets.php:66
696
  msgid "Something went wrong while retrieving profiles list."
@@ -702,7 +702,7 @@ msgstr "Περισσότερες λεπτομέρειες"
702
 
703
  #: .././admin/widgets.php:79 .././admin/widgets.php:90
704
  msgid "An admin should asign a default Google Analytics Profile."
705
- msgstr "Ένας διαχειριστής θα έπρεπε να εκχωρήση ένα προκαθορισμένο προφίλ Google Analytics."
706
 
707
  #: .././admin/widgets.php:79 .././admin/widgets.php:90
708
  msgid "Select Domain"
@@ -713,7 +713,7 @@ msgid ""
713
  "Something went wrong while retrieving property data. You need to create and properly configure a "
714
  "Google Analytics account:"
715
  msgstr ""
716
- "Κάτι πήγε στραβά καθώς γινόταν ανάκτηση δεδομένων. Χρειάζεται να δημιουργήσετε και να "
717
  "διαμορφώσετε καταλλήλως ένα λογαριασμό Google Analytics:"
718
 
719
  #: .././admin/widgets.php:95
@@ -725,26 +725,26 @@ msgid "Real-Time"
725
  msgstr "Πραγματικός- Χρόνος"
726
 
727
  #: .././admin/widgets.php:126 .././admin/widgets.php:823 .././front/widgets.php:36
728
- #: .././tools/gapi.php:372 .././tools/gapi.php:502 .././tools/gapi.php:535 .././tools/gapi.php:585
729
- #: .././tools/gapi.php:665 .././tools/gapi.php:694
730
  msgid "Sessions"
731
- msgstr "Τομείς"
732
 
733
- #: .././admin/widgets.php:132 .././tools/gapi.php:470
734
  msgid "Pages"
735
  msgstr "Σελίδες"
736
 
737
  #: .././admin/widgets.php:233 .././admin/widgets.php:475
738
  msgid "REFERRAL"
739
- msgstr "ΠΑΡΑΠΟΜΠΗΣ"
740
 
741
  #: .././admin/widgets.php:237 .././admin/widgets.php:476
742
  msgid "ORGANIC"
743
- msgstr "ΟΡΓΑΝΙΚΟ"
744
 
745
  #: .././admin/widgets.php:241 .././admin/widgets.php:361 .././admin/widgets.php:477
746
  msgid "SOCIAL"
747
- msgstr "ΚΟΙΝΩΝΙΚΟ"
748
 
749
  #: .././admin/widgets.php:245 .././admin/widgets.php:364 .././admin/widgets.php:478
750
  msgid "CAMPAIGN"
@@ -752,7 +752,7 @@ msgstr "ΚΑΜΠΑΝΙΑ"
752
 
753
  #: .././admin/widgets.php:249 .././admin/widgets.php:367 .././admin/widgets.php:481
754
  msgid "DIRECT"
755
- msgstr "ΑΜΕΣΟ"
756
 
757
  #: .././admin/widgets.php:253 .././admin/widgets.php:482
758
  msgid "NEW"
@@ -768,7 +768,7 @@ msgstr "ΛΕΞΕΙΣ ΚΛΕΙΔΙΑ"
768
 
769
  #: .././front/widgets.php:21
770
  msgid "Will display your google analytics stats in a widget"
771
- msgstr "Θα προβάλει τα στατιστικά του google analytics σε ένα widget"
772
 
773
  #: .././front/widgets.php:123
774
  msgid "Period:"
@@ -776,7 +776,7 @@ msgstr "Περίοδος:"
776
 
777
  #: .././front/widgets.php:123
778
  msgid "Sessions:"
779
- msgstr "Τομείς:"
780
 
781
  #: .././front/widgets.php:127
782
  msgid "generated by"
@@ -808,7 +808,7 @@ msgstr "Σύνολα"
808
 
809
  #: .././front/widgets.php:154
810
  msgid "Anonymize stats:"
811
- msgstr "Ανώνυμα στατιστικά"
812
 
813
  #: .././front/widgets.php:157
814
  msgid "Stats for:"
@@ -816,65 +816,69 @@ msgstr "Στατιστικά για:"
816
 
817
  #: .././front/widgets.php:164
818
  msgid "Give credits:"
819
- msgstr "Δώστε πιστώσεις:"
820
 
821
  #: .././gadwp.php:48 .././gadwp.php:56 .././gadwp.php:63
822
  msgid "This is not allowed, read the documentation!"
823
  msgstr "Αυτό δεν επιτρέπεται, διαβάστε την τεκμηρίωση!"
824
 
825
- #: .././tools/gapi.php:128
826
  msgid "Use this link to get your access code:"
827
  msgstr "Χρησιμοποιήστε αυτόν τον σύνδεσμο για να αποκτήσετε τον κωδικό πρόσβασής σας:"
828
 
829
- #: .././tools/gapi.php:128
830
  msgid "Get Access Code"
831
- msgstr "Αποκτήστε τον Κωδικό Πρόσβασης"
832
 
833
- #: .././tools/gapi.php:132 .././tools/gapi.php:133
834
  msgid "Use the red link to get your access code!"
835
- msgstr "Χρησιμοποιήστε τον κόκκινο σύνδεσμο για να αποκτήσετε τον κωδικό πρόσβασής σας"
836
 
837
- #: .././tools/gapi.php:132
838
  msgid "Access Code:"
839
  msgstr "Κωδικός Πρόσβασης:"
840
 
841
- #: .././tools/gapi.php:139
842
  msgid "Save Access Code"
843
- msgstr "Αποθηκεύστε τον Κωδικό Πρόσβασης"
844
 
845
- #: .././tools/gapi.php:366
846
  msgid "Organic Searches"
847
  msgstr "Οργανικές Αναζητήσεις"
848
 
849
- #: .././tools/gapi.php:369
850
  msgid "Unique Page Views"
851
  msgstr "Μοναδικές προβολές σελίδας"
852
 
853
- #: .././tools/gapi.php:377
854
  msgid "Hour"
855
  msgstr "Ώρα"
856
 
857
- #: .././tools/gapi.php:381 .././tools/gapi.php:384 .././tools/gapi.php:694
858
  msgid "Date"
859
  msgstr "Ημερομηνία"
860
 
861
- #: .././tools/gapi.php:470
 
 
 
 
862
  msgid "Views"
863
  msgstr "Προβολές"
864
 
865
- #: .././tools/gapi.php:556
866
  msgid "Countries"
867
  msgstr "Χώρες"
868
 
869
- #: .././tools/gapi.php:566
870
  msgid "Cities from"
871
- msgstr "Πόλεις απο"
872
 
873
- #: .././tools/gapi.php:619
874
  msgid "Channels"
875
  msgstr "Κανάλια"
876
 
877
- #: .././tools/gapi.php:665
878
  msgid "Type"
879
  msgstr "Τύπος"
880
 
4
  msgstr ""
5
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/google-analytics-dashboard-for-wp\n"
7
+ "POT-Creation-Date: 2015-08-27 21:06+0200\n"
8
+ "PO-Revision-Date: 2015-08-27 21:07+0200\n"
9
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
10
  "Language-Team: Alin Marcu\n"
11
  "Language: el_GR\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
+ "X-Generator: Poedit 1.7.5\n"
17
  "X-Poedit-SourceCharset: UTF-8\n"
18
  "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;__:1;_e:1;_c:1;_n:1,2;"
19
  "_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;_x:1,2c;_ex:1,2c;_nx:1,2,4c;"
27
  msgstr "Αναλυτικά Δεδομένα"
28
 
29
  #: .././admin/settings.php:89 .././admin/settings.php:184 .././admin/settings.php:318
30
+ #: .././admin/settings.php:795 .././admin/settings.php:1086
31
  msgid "Settings saved."
32
+ msgstr "Οι ρυθμίσεις αποθηκεύτηκαν."
33
 
34
  #: .././admin/settings.php:91 .././admin/settings.php:186 .././admin/settings.php:320
35
  #: .././admin/settings.php:772 .././admin/settings.php:782 .././admin/settings.php:791
36
+ #: .././admin/settings.php:797 .././admin/settings.php:808 .././admin/settings.php:1064
37
+ #: .././admin/settings.php:1072 .././admin/settings.php:1082 .././admin/settings.php:1088
38
+ #: .././admin/settings.php:1099
39
  msgid "Cheating Huh?"
40
+ msgstr "Κλέβουμε, ε;"
41
 
42
  #: .././admin/settings.php:95 .././admin/settings.php:190 .././admin/settings.php:324
43
+ #: .././admin/settings.php:641 .././admin/settings.php:823 .././admin/settings.php:1113
44
  #, php-format
45
  msgid "Something went wrong, check %1$s or %2$s."
46
+ msgstr "Κάτι πήγε στραβά, ελέγξτε %1$s ή %2$s."
47
 
48
  #: .././admin/settings.php:95 .././admin/settings.php:190 .././admin/settings.php:324
49
+ #: .././admin/settings.php:641 .././admin/settings.php:823 .././admin/settings.php:1113
50
  #: .././admin/setup.php:46 .././admin/setup.php:59
51
  msgid "Errors & Debug"
52
+ msgstr "Σφάλματα & εντοπισμός σφαλμάτων"
53
 
54
  #: .././admin/settings.php:95 .././admin/settings.php:190 .././admin/settings.php:324
55
+ #: .././admin/settings.php:641 .././admin/settings.php:823 .././admin/settings.php:1113
56
  #: .././admin/setup.php:195 .././front/setup.php:107
57
  msgid "authorize the plugin"
58
+ msgstr "να εγκριθεί το πρόσθετο"
59
 
60
  #: .././admin/settings.php:100
61
  msgid "Google Analytics Frontend Settings"
74
  msgstr "ενεργοποίηση των αναφορών στο frontend της ιστοσελίδας"
75
 
76
  #: .././admin/settings.php:161 .././admin/settings.php:297 .././admin/settings.php:598
77
+ #: .././admin/settings.php:944 .././admin/settings.php:1251
78
  msgid "Save Changes"
79
  msgstr "Αποθήκευση Αλλαγών"
80
 
81
  #: .././admin/settings.php:195
82
  msgid "Google Analytics Backend Settings"
83
+ msgstr "Ρυθμίσεις Google Analytics Backend"
84
 
85
  #: .././admin/settings.php:251
86
  msgid "enable Switch View functionality"
87
+ msgstr "ενεργοποίηση λειτουργίας Εναλλαγή Προβολής"
88
 
89
  #: .././admin/settings.php:262
90
  msgid "enable reports on Posts List and Pages List"
91
+ msgstr "ενεργοποίηση αναφορών στην Λίστα Άρθρων και Λίστα Σελίδων"
92
 
93
  #: .././admin/settings.php:273
94
  msgid "enable the main Dashboard Widget"
95
+ msgstr "ενεργοποίηση της μικροεφαρμογής στον κύριο Πίνακα Ελέγχου"
96
 
97
  #: .././admin/settings.php:277
98
  msgid "Real-Time Settings"
108
 
109
  #: .././admin/settings.php:289
110
  msgid "Target Geo Map to country:"
111
+ msgstr "Στοχεύστε το Geo Map στη χώρα:"
112
 
113
  #: .././admin/settings.php:327
114
  msgid ""
115
  "The tracking component is disabled. You should set <strong>Tracking Options</strong> to "
116
  "<strong>Enabled</strong>"
117
  msgstr ""
118
+ "Το σύστημα παρακολούθησης είναι απενεργοποιημένο. Πρέπει να θέσετε τις <strong>Επιλογές "
119
+ "Εντοπισμού</strong> σε <strong>Ενεργές</strong>"
120
 
121
  #: .././admin/settings.php:332
122
  msgid "Google Analytics Tracking Code"
134
  msgid "Custom Definitions"
135
  msgstr "Προσαρμοσμένοι Ορισμοί"
136
 
137
+ #: .././admin/settings.php:344 .././admin/settings.php:554 .././admin/settings.php:1234
138
  msgid "Exclude Tracking"
139
+ msgstr "Αποκλεισμός Παρακολούθησης"
140
 
141
  #: .././admin/settings.php:345
142
  msgid "Advanced Settings"
144
 
145
  #: .././admin/settings.php:353
146
  msgid "Tracking Settings"
147
+ msgstr "Ρυθμίσεις Παρακολούθησης"
148
 
149
  #: .././admin/settings.php:356
150
  msgid "Tracking Options:"
151
+ msgstr "Επιλογές Παρακολούθησης:"
152
 
153
  #: .././admin/settings.php:358
154
  msgid "Disabled"
155
+ msgstr "Απενεργοποιημένες"
156
 
157
  #: .././admin/settings.php:359
158
  msgid "Enabled"
159
+ msgstr "Ενεργές"
160
 
161
  #: .././admin/settings.php:367 .././admin/settings.php:889 .././admin/settings.php:911
162
+ #: .././admin/settings.php:1207 .././admin/widgets.php:61
163
  msgid "View Name:"
164
  msgstr "Προβολή Ονόματος:"
165
 
173
 
174
  #: .././admin/settings.php:367 .././admin/settings.php:911
175
  msgid "Time Zone:"
176
+ msgstr "Ζώνη Ώρας:"
177
 
178
  #: .././admin/settings.php:372
179
  msgid "Basic Tracking"
193
 
194
  #: .././admin/settings.php:389
195
  msgid "anonymize IPs while tracking"
196
+ msgstr "ανωνυμοποίηση των ΙΡ κατά την παρακολούθηση"
197
 
198
  #: .././admin/settings.php:400
199
  msgid "enable remarketing, demographics and interests reports"
209
 
210
  #: .././admin/settings.php:433
211
  msgid "track affiliate links matching this regex"
212
+ msgstr "παρακολούθηση θυγατρικών συνδέσμων που ταιριάζουν σε αυτό το regex"
213
 
214
  #: .././admin/settings.php:437
215
  msgid "Affiliates Regex:"
216
+ msgstr "Θυγατρικά Regex:"
217
 
218
  #: .././admin/settings.php:448
219
  msgid "track fragment identifiers, hashmarks (#) in URI links"
220
+ msgstr "παρακολούθηση αναγνωριστικών τμημάτων, hashmarks (#) σε συνδέσμους URI"
221
 
222
  #: .././admin/settings.php:459
223
  msgid "Authors:"
225
 
226
  #: .././admin/settings.php:467
227
  msgid "Publication Year:"
228
+ msgstr "Έτος Δημοσίευσης:"
229
 
230
  #: .././admin/settings.php:475
231
  msgid "Categories:"
245
 
246
  #: .././admin/settings.php:509
247
  msgid "exclude events from bounce-rate calculation"
248
+ msgstr "αποκλεισμός συμβάντων από υπολογισμό bounce-rate"
249
 
250
  #: .././admin/settings.php:520
251
  msgid "enable enhanced link attribution"
253
 
254
  #: .././admin/settings.php:531
255
  msgid "enable AdSense account linking"
256
+ msgstr "ενεργοποίηση σύνδεσης λογαριασμού AdSense"
257
 
258
  #: .././admin/settings.php:542
259
  msgid "enable cross domain tracking"
260
+ msgstr "ενεργοποίηση παρακολούθησης μεταξύ domain"
261
 
262
  #: .././admin/settings.php:546
263
  msgid "Cross Domains:"
277
 
278
  #: .././admin/settings.php:656
279
  msgid "Plugin Settings"
280
+ msgstr "Ρυθμίσεις Προσθέτου:"
281
 
282
  #: .././admin/settings.php:663
283
  msgid "Last Error detected"
284
+ msgstr "Τελευταίο σφάλμα που εντοπίστηκε"
285
 
286
  #: .././admin/settings.php:669 .././admin/settings.php:682
287
  msgid "None"
289
 
290
  #: .././admin/settings.php:676
291
  msgid "Error Details"
292
+ msgstr "Λεπτομέρειες Σφάλματος"
293
 
294
  #: .././admin/settings.php:696
295
  msgid "Plugin Configuration"
296
+ msgstr "Διαμόρφωση Πρόσθετου"
297
 
298
  #: .././admin/settings.php:717 .././admin/settings.php:981
299
  msgid ""
300
  "Loading the required libraries. If this results in a blank screen or a fatal error, try this "
301
  "solution:"
302
  msgstr ""
303
+ "Φόρτωση των απαιτούμενων βιβλιοθηκών. Αν αυτό καταλήξει σε μια κενή οθόνη ή σε κρίσιμο σφάλμα, "
304
+ "δοκιμάστε αυτή τη λύση:"
305
 
306
  #: .././admin/settings.php:717
307
  msgid "Library conflicts between WordPress plugins"
308
+ msgstr "Ασυμβατότητες βιβλιοθήκης μεταξύ προσθέτων του WordPress"
309
 
310
  #: .././admin/settings.php:732 .././admin/settings.php:998
311
  msgid "Plugin authorization succeeded."
312
+ msgstr "Η πιστοποίηση του πρόσθετου πέτυχε."
313
 
314
+ #: .././admin/settings.php:764 .././admin/settings.php:1038
315
  msgid ""
316
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> (UA-XXXXX-X). Try "
317
  "again, and use the red link to get your access code"
318
  msgstr ""
319
+ "Ο κωδικός πρόσβασης <strong>ΔΕΝ ΕΙΝΑΙ</strong> το <strong>Tracking ID</strong> σας (UA-XXXXX-"
320
+ "X). Προσπαθήστε ξανά, και χρησιμοποιήστε τον κόκκινο σύνδεσμο για να πάρετε τον κωδικό πρόσβασής "
321
+ "σας."
322
 
323
+ #: .././admin/settings.php:770 .././admin/settings.php:1070
324
  msgid "Cleared Cache."
325
+ msgstr "Η προσωρινή μνήμη εκκαθαρίστηκε."
326
 
327
+ #: .././admin/settings.php:779 .././admin/settings.php:1079
328
  msgid "Token Reseted and Revoked."
329
+ msgstr "Έγινε επαναφορά και ανάκληση του token."
330
 
331
  #: .././admin/settings.php:789
332
  msgid "All errors reseted."
333
+ msgstr "Έγινε επαναφορά σε όλα τα σφάλματα."
334
 
335
+ #: .././admin/settings.php:802 .././admin/settings.php:1093
336
  msgid "All other domains/properties were removed."
337
+ msgstr "Όλα τα άλλα domains/ιδιότητες αφαιρέθηκαν."
338
 
339
+ #: .././admin/settings.php:813 .././admin/settings.php:1104
340
  msgid "Google Analytics Settings"
341
  msgstr "Ρυθμίσεις Google Analytics "
342
 
343
+ #: .././admin/settings.php:828 .././admin/settings.php:1118
344
  msgid "Use the red link (see below) to generate and get your access code!"
345
  msgstr ""
346
+ "Χρησιμοποιήστε τον κόκκινο σύνδεσμο (βλέπε παρακάτω) για να δημιουργήσετε και να αποκτήσετε τον "
347
+ "δικό σας κωδικό πρόσβασης!"
348
 
349
+ #: .././admin/settings.php:840 .././admin/settings.php:1147
350
  msgid "Plugin Authorization"
351
+ msgstr "Εξουσιοδότηση Πρόσθετου"
352
 
353
+ #: .././admin/settings.php:845 .././admin/settings.php:1151
354
  #, php-format
355
  msgid ""
356
  "You should watch the %1$s and read this %2$s before proceeding to authorization. This plugin "
357
  "requires a properly configured Google Analytics account!"
358
  msgstr ""
359
  "Πρέπει να δείτε το the %1$s και να διαβάσετε αυτό το%2$s πρίν προχωρήσετε στην εξουσιοδότηση. "
360
+ "Αυτό το πρόσθετο προϋποθέτει ένα λογαριασμό Google Analytics κατάλληλα ρυθμισμένο!"
361
 
362
+ #: .././admin/settings.php:845 .././admin/settings.php:1151
363
  msgid "video"
364
+ msgstr "βίντεο"
365
 
366
+ #: .././admin/settings.php:845 .././admin/settings.php:1151
367
  msgid "tutorial"
368
  msgstr "οδηγός"
369
 
370
+ #: .././admin/settings.php:850 .././admin/settings.php:1158
371
  msgid "use your own API Project credentials"
372
+ msgstr "χρησιμοποιήστε την πιστοποίηση του δικού σας Έργου API"
373
 
374
+ #: .././admin/settings.php:855 .././admin/settings.php:1166
375
  msgid "API Key:"
376
  msgstr "Κλειδί ΑΡΙ :"
377
 
378
+ #: .././admin/settings.php:859 .././admin/settings.php:1170
379
  msgid "Client ID:"
380
  msgstr "ΙD πελάτη:"
381
 
382
+ #: .././admin/settings.php:863 .././admin/settings.php:1174
383
  msgid "Client Secret:"
384
  msgstr "Κρυφό Πελάτη:"
385
 
386
+ #: .././admin/settings.php:873 .././admin/settings.php:1184
387
  msgid "Clear Authorization"
388
  msgstr "Εκκαθάριση Εξουσιοδότησης"
389
 
390
+ #: .././admin/settings.php:873 .././admin/settings.php:951 .././admin/settings.php:1184
391
+ #: .././admin/settings.php:1260
392
  msgid "Clear Cache"
393
+ msgstr "Εκκαθάριση Προσωρινής Μνήμης"
394
 
395
  #: .././admin/settings.php:873
396
  msgid "Reset Errors"
397
+ msgstr "Επαναφορά Σφαλμάτων"
398
 
399
  #: .././admin/settings.php:879 .././admin/setup.php:42 .././admin/setup.php:58
400
  msgid "General Settings"
401
+ msgstr "Γενικές Ρυθμίσεις"
402
 
403
  #: .././admin/settings.php:882
404
  msgid "Select View:"
405
+ msgstr "Επιλέξτε Προβολή:"
406
 
407
+ #: .././admin/settings.php:893 .././admin/settings.php:1211
408
  msgid "Property not found"
409
  msgstr "Η ιδιότητα δεν βρέθηκε"
410
 
416
  msgid "Theme Color:"
417
  msgstr "Χρώμα Θέματος:"
418
 
419
+ #: .././admin/settings.php:926 .././admin/settings.php:1220
420
  msgid "Automatic Updates"
421
+ msgstr "Αυτόματες Ενημερώσεις"
422
 
423
+ #: .././admin/settings.php:936 .././admin/settings.php:1230
424
  msgid "automatic updates for minor versions (security and maintenance releases only)"
425
+ msgstr "αυτόματες ενημερώσεις για μικρές εκδόσεις (εκδόσεις ασφάλειας και συντήρησης μόνο)"
426
 
427
+ #: .././admin/settings.php:951 .././admin/settings.php:1260 .././admin/widgets.php:32
428
  msgid "Authorize Plugin"
429
+ msgstr "Εξουσιοδότηση Προσθέτου"
430
 
431
+ #: .././admin/settings.php:1044
432
  msgid "Properties refreshed."
433
  msgstr "Οι ιδιότητες ανανεώθηκαν."
434
 
435
+ #: .././admin/settings.php:1129
436
  msgid "Network Setup"
437
  msgstr "Ρύθμιση Δικτύου"
438
 
439
+ #: .././admin/settings.php:1139
440
  msgid "use a single Google Analytics account for the entire network"
441
+ msgstr "χρησιμοποιήστε ένα μόνο λογαριασμό Google Analytics για όλο το δίκτυο"
442
 
443
+ #: .././admin/settings.php:1184
444
  msgid "Refresh Properties"
445
+ msgstr "Ανανέωση Ιδιοτήτων"
446
 
447
+ #: .././admin/settings.php:1190
448
  msgid "Properties/Views Settings"
449
  msgstr "Ρυθμίσεις Ιδιοτήτων/Προβολών"
450
 
451
+ #: .././admin/settings.php:1244
452
  msgid "exclude Super Admin tracking for the entire network"
453
+ msgstr "αποκλεισμός παρακολούθησης Υπερ Διαχειριστή για ολόκληρο το δίκτυο"
454
 
455
+ #: .././admin/settings.php:1292
456
  msgid "Setup Tutorial & Demo"
457
+ msgstr "Οδηγός Ρύθμισης & Επίδειξη"
458
 
459
+ #: .././admin/settings.php:1300
460
  msgid "Follow & Review"
461
+ msgstr "Ακολουθήστε & Κάντε κριτική"
462
 
463
+ #: .././admin/settings.php:1326
464
  #, php-format
465
  msgid "Your feedback and review are both important, %s!"
466
+ msgstr "Οι παρατηρήσεις σας και η κριτική σας είναι εξίσου σημαντικές, %s!"
467
 
468
+ #: .././admin/settings.php:1326
469
  msgid "rate this plugin"
470
+ msgstr "βαθμολογήστε αυτό το πρόσθετο"
471
 
472
+ #: .././admin/settings.php:1332
473
  msgid "Further Reading"
474
  msgstr "Περαιτέρω Διάβασμα"
475
 
476
+ #: .././admin/settings.php:1339
477
  #, php-format
478
  msgid "%s by moving your website to HTTPS/SSL."
479
+ msgstr "%s μεταφέροντας τον διαδικτυακό σας τόπο σε ΗΤΤΡS/SSL."
480
 
481
+ #: .././admin/settings.php:1339
482
  msgid "Improve search rankings"
483
+ msgstr "Βελτιώστε την κατάταξη στις αναζητήσεις"
484
 
485
+ #: .././admin/settings.php:1346
486
  #, php-format
487
  msgid "Other %s written by the same author"
488
+ msgstr "Άλλα %s γραμμένα από τον ίδιο συγγραφέα"
489
 
490
+ #: .././admin/settings.php:1346
491
  msgid "WordPress Plugins"
492
+ msgstr "Πρόσθετα WordPress"
493
 
494
+ #: .././admin/settings.php:1352
495
  msgid "Other Services"
496
  msgstr "Άλλες Υπηρεσίες"
497
 
498
+ #: .././admin/settings.php:1359
499
  #, php-format
500
  msgid "Speed up your website and plug into a whole %s"
501
+ msgstr "Αυξήστε την συνολική ταχύτητα του ιστοτόπου σας και συνδεθείτε σε ένα εντελώς %s"
502
 
503
+ #: .././admin/settings.php:1359
504
  msgid "new level of site speed"
505
+ msgstr "νέο επίπεδο ταχύτητας ιστοτόπου"
506
 
507
+ #: .././admin/settings.php:1366
508
  #, php-format
509
  msgid "%s service with users tracking at IP level."
510
+ msgstr " %s υπηρεσία με παρακολούθηση χρηστών σε επίπεδο ΙΡ."
511
 
512
+ #: .././admin/settings.php:1366
513
  msgid "Web Analytics"
514
  msgstr "Web Analytics"
515
 
535
 
536
  #: .././admin/setup.php:160 .././admin/widgets.php:115 .././front/setup.php:72
537
  msgid "Yesterday"
538
+ msgstr "Χθες"
539
 
540
  #: .././admin/setup.php:161 .././admin/setup.php:162 .././admin/setup.php:163
541
  #: .././admin/setup.php:164 .././admin/widgets.php:116 .././admin/widgets.php:117
570
 
571
  #: .././admin/setup.php:170 .././admin/setup.php:186 .././admin/widgets.php:127
572
  #: .././admin/widgets.php:827 .././front/setup.php:82 .././front/setup.php:98
573
+ #: .././tools/gapi.php:362
574
  msgid "Users"
575
  msgstr "Χρήστες"
576
 
577
  #: .././admin/setup.php:171 .././admin/widgets.php:128 .././front/setup.php:83
578
  msgid "Organic"
579
+ msgstr "Οργανική"
580
 
581
  #: .././admin/setup.php:172 .././admin/setup.php:187 .././admin/widgets.php:129
582
  #: .././admin/widgets.php:831 .././front/setup.php:84 .././front/setup.php:99
583
+ #: .././tools/gapi.php:365
584
  msgid "Page Views"
585
  msgstr "Προβολές Σελίδας"
586
 
587
  #: .././admin/setup.php:173 .././admin/setup.php:188 .././admin/widgets.php:130
588
  #: .././admin/widgets.php:835 .././front/setup.php:85 .././front/setup.php:100
589
+ #: .././tools/gapi.php:368
590
  msgid "Bounce Rate"
591
  msgstr "Bounce Rate"
592
 
595
  msgstr "Τοποθεσία"
596
 
597
  #: .././admin/setup.php:175 .././admin/widgets.php:133 .././front/setup.php:87
598
+ #: .././tools/gapi.php:518
599
  msgid "Referrers"
600
+ msgstr "Αναφέρουν"
601
 
602
  #: .././admin/setup.php:176 .././admin/widgets.php:134 .././front/setup.php:88
603
+ #: .././tools/gapi.php:551
604
  msgid "Searches"
605
+ msgstr "Αναζητήσεις"
606
 
607
  #: .././admin/setup.php:177 .././admin/widgets.php:135 .././front/setup.php:89
608
  msgid "Traffic Details"
611
  #: .././admin/setup.php:180 .././admin/widgets.php:502 .././admin/widgets.php:587
612
  #: .././admin/widgets.php:754 .././admin/widgets.php:858 .././front/setup.php:92
613
  msgid "A JavaScript Error is blocking plugin resources!"
614
+ msgstr "Ένα Σφάλμα JavaScript εμποδίζει τους πόρους του πρόσθετου!"
615
 
616
  #: .././admin/setup.php:181 .././admin/widgets.php:678 .././front/setup.php:93
617
  msgid "Traffic Mediums"
618
+ msgstr "Μέσα Κίνησης"
619
 
620
  #: .././admin/setup.php:182 .././admin/widgets.php:693 .././front/setup.php:94
621
  msgid "Visitor Type"
635
 
636
  #: .././admin/setup.php:190 .././admin/widgets.php:843 .././front/setup.php:102
637
  msgid "Pages/Session"
638
+ msgstr "Σελίδες/Συνεδρία"
639
 
640
  #: .././admin/setup.php:191 .././admin/widgets.php:514 .././admin/widgets.php:528
641
  #: .././admin/widgets.php:538 .././admin/widgets.php:599 .././admin/widgets.php:613
644
  #: .././admin/widgets.php:870 .././admin/widgets.php:884 .././admin/widgets.php:894
645
  #: .././front/setup.php:103
646
  msgid "Invalid response, more details in JavaScript Console (F12)."
647
+ msgstr "Μη έγκυρη απόκριση, περισσότερες λεπτομέρειες στην Κονσόλα JavaScript (F12)."
648
 
649
  #: .././admin/setup.php:192 .././front/setup.php:104
650
  msgid "Not enough data collected"
660
 
661
  #: .././admin/setup.php:194 .././front/setup.php:106
662
  msgid "report generated by"
663
+ msgstr "η αναφορά δημιουργήθηκε από"
664
 
665
  #: .././admin/setup.php:195 .././admin/widgets.php:32 .././front/setup.php:107
666
  msgid "This plugin needs an authorization:"
667
+ msgstr "Το πρόσθετο χρειάζεται εξουσιοδότηση:"
668
 
669
+ #: .././admin/setup.php:228
670
  msgid "Settings"
671
  msgstr "Ρυθμίσεις"
672
 
673
+ #: .././admin/setup.php:240
674
  #, php-format
675
  msgid "Google Analytics Dashboard for WP has been updated to version %s."
676
+ msgstr "Ο πίνακας ελέγχου του Google Analytics για το WP έχει αναβαθμιστεί στην έκδοση %s."
677
 
678
+ #: .././admin/setup.php:240
679
  #, php-format
680
  msgid "For details, check out %1$s and %2$s."
681
+ msgstr "Για λεπτομέρειες, δείτε %1$s και %2$s."
682
 
683
+ #: .././admin/setup.php:240
684
  msgid "the documentation page"
685
+ msgstr "τη σελίδα τεκμηρίωσης"
686
 
687
+ #: .././admin/setup.php:240
688
  msgid "the plugin&#39;s settings page"
689
+ msgstr "τη σελίδα ρυθμίσεων του πρόσθετου"
690
 
691
  #: .././admin/widgets.php:27 .././front/widgets.php:21
692
  msgid "Google Analytics Dashboard"
693
+ msgstr "Πίνακας Ελέγχου Google Analytics"
694
 
695
  #: .././admin/widgets.php:66
696
  msgid "Something went wrong while retrieving profiles list."
702
 
703
  #: .././admin/widgets.php:79 .././admin/widgets.php:90
704
  msgid "An admin should asign a default Google Analytics Profile."
705
+ msgstr "Ένας διαχειριστής θα έπρεπε να ορίσει ένα προκαθορισμένο προφίλ Google Analytics."
706
 
707
  #: .././admin/widgets.php:79 .././admin/widgets.php:90
708
  msgid "Select Domain"
713
  "Something went wrong while retrieving property data. You need to create and properly configure a "
714
  "Google Analytics account:"
715
  msgstr ""
716
+ "Κάτι πήγε στραβά καθώς γινόταν ανάκτηση δεδομένων ιδιοτήτων. Χρειάζεται να δημιουργήσετε και να "
717
  "διαμορφώσετε καταλλήλως ένα λογαριασμό Google Analytics:"
718
 
719
  #: .././admin/widgets.php:95
725
  msgstr "Πραγματικός- Χρόνος"
726
 
727
  #: .././admin/widgets.php:126 .././admin/widgets.php:823 .././front/widgets.php:36
728
+ #: .././tools/gapi.php:377 .././tools/gapi.php:518 .././tools/gapi.php:551 .././tools/gapi.php:601
729
+ #: .././tools/gapi.php:681 .././tools/gapi.php:710
730
  msgid "Sessions"
731
+ msgstr "Συνεδρίες"
732
 
733
+ #: .././admin/widgets.php:132 .././tools/gapi.php:486
734
  msgid "Pages"
735
  msgstr "Σελίδες"
736
 
737
  #: .././admin/widgets.php:233 .././admin/widgets.php:475
738
  msgid "REFERRAL"
739
+ msgstr "ΠΑΡΑΠΟΜΠΗ"
740
 
741
  #: .././admin/widgets.php:237 .././admin/widgets.php:476
742
  msgid "ORGANIC"
743
+ msgstr "ΟΡΓΑΝΙΚΗ"
744
 
745
  #: .././admin/widgets.php:241 .././admin/widgets.php:361 .././admin/widgets.php:477
746
  msgid "SOCIAL"
747
+ msgstr "ΚΟΙΝΩΝΙΚΑ"
748
 
749
  #: .././admin/widgets.php:245 .././admin/widgets.php:364 .././admin/widgets.php:478
750
  msgid "CAMPAIGN"
752
 
753
  #: .././admin/widgets.php:249 .././admin/widgets.php:367 .././admin/widgets.php:481
754
  msgid "DIRECT"
755
+ msgstr "ΑΜΕΣΑ"
756
 
757
  #: .././admin/widgets.php:253 .././admin/widgets.php:482
758
  msgid "NEW"
768
 
769
  #: .././front/widgets.php:21
770
  msgid "Will display your google analytics stats in a widget"
771
+ msgstr "Θα προβάλει τα στατιστικά του google analytics σε μια μικροεφαρμογή"
772
 
773
  #: .././front/widgets.php:123
774
  msgid "Period:"
776
 
777
  #: .././front/widgets.php:123
778
  msgid "Sessions:"
779
+ msgstr "Συνεδρίες:"
780
 
781
  #: .././front/widgets.php:127
782
  msgid "generated by"
808
 
809
  #: .././front/widgets.php:154
810
  msgid "Anonymize stats:"
811
+ msgstr "Ανωνυμοποίηση στατιστικών:"
812
 
813
  #: .././front/widgets.php:157
814
  msgid "Stats for:"
816
 
817
  #: .././front/widgets.php:164
818
  msgid "Give credits:"
819
+ msgstr "Δώστε ευχαριστίες:"
820
 
821
  #: .././gadwp.php:48 .././gadwp.php:56 .././gadwp.php:63
822
  msgid "This is not allowed, read the documentation!"
823
  msgstr "Αυτό δεν επιτρέπεται, διαβάστε την τεκμηρίωση!"
824
 
825
+ #: .././tools/gapi.php:134
826
  msgid "Use this link to get your access code:"
827
  msgstr "Χρησιμοποιήστε αυτόν τον σύνδεσμο για να αποκτήσετε τον κωδικό πρόσβασής σας:"
828
 
829
+ #: .././tools/gapi.php:134
830
  msgid "Get Access Code"
831
+ msgstr "Αποκτήστε Κωδικό Πρόσβασης"
832
 
833
+ #: .././tools/gapi.php:138 .././tools/gapi.php:139
834
  msgid "Use the red link to get your access code!"
835
+ msgstr "Χρησιμοποιήστε τον κόκκινο σύνδεσμο για να αποκτήσετε τον κωδικό πρόσβασής σας!"
836
 
837
+ #: .././tools/gapi.php:138
838
  msgid "Access Code:"
839
  msgstr "Κωδικός Πρόσβασης:"
840
 
841
+ #: .././tools/gapi.php:145
842
  msgid "Save Access Code"
843
+ msgstr "Αποθήκευση Κωδικού Πρόσβασης"
844
 
845
+ #: .././tools/gapi.php:371
846
  msgid "Organic Searches"
847
  msgstr "Οργανικές Αναζητήσεις"
848
 
849
+ #: .././tools/gapi.php:374
850
  msgid "Unique Page Views"
851
  msgstr "Μοναδικές προβολές σελίδας"
852
 
853
+ #: .././tools/gapi.php:382
854
  msgid "Hour"
855
  msgstr "Ώρα"
856
 
857
+ #: .././tools/gapi.php:386 .././tools/gapi.php:389 .././tools/gapi.php:710
858
  msgid "Date"
859
  msgstr "Ημερομηνία"
860
 
861
+ #: .././tools/gapi.php:413 .././tools/gapi.php:719
862
+ msgid "F j, Y"
863
+ msgstr "F j, Y"
864
+
865
+ #: .././tools/gapi.php:486
866
  msgid "Views"
867
  msgstr "Προβολές"
868
 
869
+ #: .././tools/gapi.php:572
870
  msgid "Countries"
871
  msgstr "Χώρες"
872
 
873
+ #: .././tools/gapi.php:582
874
  msgid "Cities from"
875
+ msgstr "Πόλεις από"
876
 
877
+ #: .././tools/gapi.php:635
878
  msgid "Channels"
879
  msgstr "Κανάλια"
880
 
881
+ #: .././tools/gapi.php:681
882
  msgid "Type"
883
  msgstr "Τύπος"
884
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://deconf.com/donate/
4
  Tags: google,analytics,google analytics,dashboard,analytics dashboard,google analytics dashboard,google analytics plugin,google analytics widget,tracking,universal google analytics,realtime,multisite,gadwp
5
  Requires at least: 3.5
6
  Tested up to: 4.3
7
- Stable tag: 4.8.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -128,6 +128,13 @@ Google Analytics Dashboard for WP it's released under the GPLv2, you can use it
128
 
129
  == Changelog ==
130
 
 
 
 
 
 
 
 
131
  = 4.8.1.3 =
132
  - Bug Fix: truncate long translation strings in google analytics reports
133
  - Bug Fix: rename query args to something more unique to avoid conflicts with other plugins
4
  Tags: google,analytics,google analytics,dashboard,analytics dashboard,google analytics dashboard,google analytics plugin,google analytics widget,tracking,universal google analytics,realtime,multisite,gadwp
5
  Requires at least: 3.5
6
  Tested up to: 4.3
7
+ Stable tag: 4.8.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
128
 
129
  == Changelog ==
130
 
131
+ = 4.8.2 =
132
+ - Bug Fix: use only unique CSS selectors to avoid conflicts with other plugins
133
+ - Bug Fix: don't load unneeded CSS styles on frontend
134
+ - Bug Fix: switch to a new custom made cache system to avoid issues with broken transients
135
+ - Enhancement: rebuild and roll-back to a bearer token
136
+ - Enhancement: Greek translation updated
137
+
138
  = 4.8.1.3 =
139
  - Bug Fix: truncate long translation strings in google analytics reports
140
  - Bug Fix: rename query args to something more unique to avoid conflicts with other plugins
tools/gapi.php CHANGED
@@ -26,6 +26,8 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
26
 
27
  private $gadwp;
28
 
 
 
29
  public function __construct() {
30
  $this->gadwp = GADWP();
31
 
@@ -35,10 +37,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
35
  if ( function_exists( 'curl_version' ) ) {
36
  $curlversion = curl_version();
37
  if ( isset( $curlversion['version'] ) && ( version_compare( PHP_VERSION, '5.3.0' ) >= 0 ) && version_compare( $curlversion['version'], '7.10.8' ) >= 0 && defined( 'GADWP_IP_VERSION' ) && GADWP_IP_VERSION ) {
38
- $config->setClassConfig( 'Google_IO_Curl', array( 'options' => array( CURLOPT_IPRESOLVE => GADWP_IP_VERSION ) ) ); // Force
39
- // CURL_IPRESOLVE_V4
40
- // or
41
- // CURL_IPRESOLVE_V6
42
  }
43
  }
44
  $this->client = new Google_Client( $config );
@@ -48,21 +47,26 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
48
  $this->client->setRedirectUri( 'urn:ietf:wg:oauth:2.0:oob' );
49
  $this->set_error_timeout();
50
  $this->managequota = 'u' . get_current_user_id() . 's' . get_current_blog_id();
 
51
  if ( $this->gadwp->config->options['ga_dash_userapi'] ) {
52
  $this->client->setClientId( $this->gadwp->config->options['ga_dash_clientid'] );
53
  $this->client->setClientSecret( $this->gadwp->config->options['ga_dash_clientsecret'] );
54
  $this->client->setDeveloperKey( $this->gadwp->config->options['ga_dash_apikey'] );
55
  } else {
56
- $this->client->setClientId( $this->gadwp->config->access[0] );
57
- $this->client->setClientSecret( $this->gadwp->config->access[1] );
58
- $this->client->setDeveloperKey( $this->gadwp->config->access[2] );
59
  }
60
  $this->service = new Google_Service_Analytics( $this->client );
61
  if ( $this->gadwp->config->options['ga_dash_token'] ) {
62
  $token = $this->gadwp->config->options['ga_dash_token'];
63
- $token = $this->refresh_token();
64
  if ( $token ) {
65
  $this->client->setAccessToken( $token );
 
 
 
 
 
 
66
  }
67
  }
68
  }
@@ -80,7 +84,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
80
  * @return boolean
81
  */
82
  public function gapi_errors_handler() {
83
- $errors = get_transient( 'ga_dash_gapi_errors' );
84
  if ( $errors === false || ! isset( $errors[0] ) ) { // invalid error
85
  return false;
86
  }
@@ -89,7 +93,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
89
  return true;
90
  }
91
  if ( isset( $errors[1][0]['reason'] ) && ( $errors[1][0]['reason'] == 'userRateLimitExceeded' || $errors[1][0]['reason'] == 'quotaExceeded' ) ) {
92
- if ($this->gadwp->config->options['api_backoff'] <= 5) {
93
  usleep( rand( 100000, 1500000 ) );
94
  $this->gadwp->config->options['api_backoff'] = $this->gadwp->config->options['api_backoff'] + 1;
95
  $this->gadwp->config->set_plugin_options();
@@ -128,14 +132,14 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
128
  $authUrl = $this->client->createAuthUrl();
129
  ?>
130
  <form name="input" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" method="post">
131
- <table class="options">
132
  <tr>
133
- <td colspan="2" class="info">
134
  <?php echo __( "Use this link to get your access code:", 'google-analytics-dashboard-for-wp' ) . ' <a href="' . $authUrl . '" id="gapi-access-code" target="_blank">' . __ ( "Get Access Code", 'google-analytics-dashboard-for-wp' ) . '</a>.'; ?>
135
  </td>
136
  </tr>
137
  <tr>
138
- <td class="title"><label for="ga_dash_code" title="<?php _e("Use the red link to get your access code!",'google-analytics-dashboard-for-wp')?>"><?php echo _e( "Access Code:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
139
  <td><input type="text" id="ga_dash_code" name="ga_dash_code" value="" size="61" required="required" title="<?php _e("Use the red link to get your access code!",'google-analytics-dashboard-for-wp')?>"></td>
140
  </tr>
141
  <tr>
@@ -182,70 +186,23 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
182
  }
183
 
184
  if ( empty( $ga_dash_profile_list ) ) {
185
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': No properties were found in this account!', $this->error_timeout );
186
  } else {
187
- delete_transient( 'ga_dash_lasterror' );
188
  }
189
  return $ga_dash_profile_list;
190
  } catch ( Google_IO_Exception $e ) {
191
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $this->error_timeout );
192
  return $ga_dash_profile_list;
193
  } catch ( Google_Service_Exception $e ) {
194
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( "(" . $e->getCode() . ") " . $e->getMessage() ), $this->error_timeout );
195
- set_transient( 'ga_dash_gapi_errors', array( $e->getCode(), (array) $e->getErrors() ), $this->error_timeout );
196
  } catch ( Exception $e ) {
197
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $this->error_timeout );
198
  return $ga_dash_profile_list;
199
  }
200
  }
201
 
202
- /**
203
- * Handles the token refresh process
204
- *
205
- * @return token|boolean
206
- */
207
- private function refresh_token() {
208
- try {
209
- if ( is_multisite() && $this->gadwp->config->options['ga_dash_network'] ) {
210
- $transient = get_site_transient( "ga_dash_refresh_token" );
211
- } else {
212
- $transient = get_transient( "ga_dash_refresh_token" );
213
- }
214
- if ( $transient === false ) {
215
- if ( ! $this->gadwp->config->options['ga_dash_refresh_token'] ) {
216
- $google_token = json_decode( $this->gadwp->config->options['ga_dash_token'] );
217
- $this->gadwp->config->options['ga_dash_refresh_token'] = $google_token->refresh_token;
218
- $this->client->refreshToken( $google_token->refresh_token );
219
- } else {
220
- $this->client->refreshToken( $this->gadwp->config->options['ga_dash_refresh_token'] );
221
- }
222
- $token = $this->client->getAccessToken();
223
- $google_token = json_decode( $token );
224
- $this->gadwp->config->options['ga_dash_token'] = $token;
225
- if ( is_multisite() && $this->gadwp->config->options['ga_dash_network'] ) {
226
- set_site_transient( "ga_dash_refresh_token", $token, $google_token->expires_in );
227
- $this->gadwp->config->set_plugin_options( true );
228
- } else {
229
- set_transient( "ga_dash_refresh_token", $token, $google_token->expires_in );
230
- $this->gadwp->config->set_plugin_options();
231
- }
232
- return $token;
233
- } else {
234
- return $transient;
235
- }
236
- } catch ( Google_IO_Exception $e ) {
237
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $this->error_timeout );
238
- return false;
239
- } catch ( Google_Service_Exception $e ) {
240
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( "(" . $e->getCode() . ") " . $e->getMessage() ), $this->error_timeout );
241
- set_transient( 'ga_dash_gapi_errors', array( $e->getCode(), (array) $e->getErrors() ), $this->error_timeout );
242
- return $e->getCode();
243
- } catch ( Exception $e ) {
244
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $this->error_timeout );
245
- return false;
246
- }
247
- }
248
-
249
  /**
250
  * Handles the token reset process
251
  *
@@ -253,13 +210,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
253
  * $all
254
  */
255
  public function reset_token( $all = true ) {
256
- if ( is_multisite() && $this->gadwp->config->options['ga_dash_network'] ) {
257
- delete_site_transient( 'ga_dash_refresh_token' );
258
- } else {
259
- delete_transient( 'ga_dash_refresh_token' );
260
- }
261
  $this->gadwp->config->options['ga_dash_token'] = "";
262
- $this->gadwp->config->options['ga_dash_refresh_token'] = "";
263
  if ( $all ) {
264
  $this->gadwp->config->options['ga_dash_tableid'] = "";
265
  $this->gadwp->config->options['ga_dash_tableid_jail'] = "";
@@ -305,24 +256,24 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
305
  } else {
306
  $timeouts = 1;
307
  }
308
- $transient = get_transient( $serial );
309
  if ( $transient === false ) {
310
  if ( $this->gapi_errors_handler() ) {
311
  return - 23;
312
  }
313
  $data = $this->service->data_ga->get( 'ga:' . $projectId, $from, $to, $metrics, $options );
314
- set_transient( $serial, $data, $this->get_timeouts( $timeouts ) );
315
  $this->gadwp->config->options['api_backoff'] = 0;
316
  $this->gadwp->config->set_plugin_options();
317
  } else {
318
  $data = $transient;
319
  }
320
  } catch ( Google_Service_Exception $e ) {
321
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( "(" . $e->getCode() . ") " . $e->getMessage() ), $this->error_timeout );
322
- set_transient( 'ga_dash_gapi_errors', array( $e->getCode(), (array) $e->getErrors() ), $this->error_timeout );
323
  return $e->getCode();
324
  } catch ( Exception $e ) {
325
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $this->error_timeout );
326
  return $e->getCode();
327
  }
328
  if ( $data->getRows() > 0 ) {
@@ -392,7 +343,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
392
  if ( $filter ) {
393
  $options['filters'] = 'ga:pagePath==' . $filter;
394
  }
395
- $serial = 'gadash_qr2_' . $this->get_serial( $projectId . $from . $metrics . $filter );
396
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
397
  if ( is_numeric( $data ) ) {
398
  return $data;
@@ -402,17 +353,18 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
402
  foreach ( $data->getRows() as $row ) {
403
  $gadwp_data[] = array( (int) $row[0] . ':00', round( $row[1], 2 ) );
404
  }
405
- } else if ( $from == "365daysAgo" || $from == "1095daysAgo" ) {
406
- foreach ( $data->getRows() as $row ) {
407
- //$row[0] contains 'yyyyMM', '01' is added to make it a valid date format
408
- $gadwp_data[] = array( date_i18n( 'F, Y', strtotime( $row[0] . '01' ) ), round( $row[2], 2 ) );
409
- }
410
- }else{
411
- foreach ( $data->getRows() as $row ) {
412
- // $row[0] contains 'yyyyMMdd'
413
- $gadwp_data[] = array( date_i18n( 'l, ' . __( 'F j, Y' ), strtotime( $row[0] ) ), round( $row[2], 2 ) );
 
 
414
  }
415
- }
416
  return $gadwp_data;
417
  }
418
 
@@ -435,7 +387,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
435
  } else {
436
  $metrics = 'ga:sessions,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession';
437
  }
438
- $serial = 'gadash_qr3_' . $this->get_serial( $projectId . $from . $filter );
439
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
440
  if ( is_numeric( $data ) ) {
441
  if ( $data == - 21 ) {
@@ -449,7 +401,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
449
  $gadwp_data = array_map( 'floatval', $row );
450
  }
451
 
452
- //i18n support
453
  $gadwp_data[0] = number_format_i18n( $gadwp_data[0] );
454
  $gadwp_data[1] = number_format_i18n( $gadwp_data[1] );
455
  $gadwp_data[2] = number_format_i18n( $gadwp_data[2] );
@@ -478,7 +430,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
478
  if ( $filter ) {
479
  $options['filters'] = 'ga:pagePath==' . $filter;
480
  }
481
- $serial = 'gadash_qr4_' . $this->get_serial( $projectId . $from . $filter );
482
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
483
  if ( is_numeric( $data ) ) {
484
  return $data;
@@ -510,7 +462,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
510
  } else {
511
  $options['filters'] = 'ga:medium==referral';
512
  }
513
- $serial = 'gadash_qr5_' . $this->get_serial( $projectId . $from . $filter );
514
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
515
  if ( is_numeric( $data ) ) {
516
  return $data;
@@ -542,7 +494,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
542
  } else {
543
  $options['filters'] = 'ga:keyword!=(not set)';
544
  }
545
- $serial = 'gadash_qr6_' . $this->get_serial( $projectId . $from . $filter );
546
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
547
  if ( is_numeric( $data ) ) {
548
  return $data;
@@ -570,7 +522,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
570
  $metrics = 'ga:sessions';
571
  $options = "";
572
  $title = __( "Countries", 'google-analytics-dashboard-for-wp' );
573
- $serial = 'gadash_qr7_' . $this->get_serial( $projectId . $from . $filter );
574
  $dimensions = 'ga:country';
575
  $local_filter = '';
576
  if ( $this->gadwp->config->options['ga_target_geomap'] ) {
@@ -580,7 +532,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
580
  if ( isset( $country_codes[$this->gadwp->config->options['ga_target_geomap']] ) ) {
581
  $local_filter = 'ga:country==' . ( $country_codes[$this->gadwp->config->options['ga_target_geomap']] );
582
  $title = __( "Cities from", 'google-analytics-dashboard-for-wp' ) . ' ' . __( $country_codes[$this->gadwp->config->options['ga_target_geomap']] );
583
- $serial = 'gadash_qr7_' . $this->get_serial( $projectId . $from . $this->gadwp->config->options['ga_target_geomap'] . $filter );
584
  }
585
  }
586
  $options = array( 'dimensions' => $dimensions, 'sort' => '-ga:sessions', 'quotaUser' => $this->managequota . 'p' . $projectId );
@@ -627,7 +579,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
627
  if ( $filter ) {
628
  $options['filters'] = 'ga:pagePath==' . $filter;
629
  }
630
- $serial = 'gadash_qr8_' . $this->get_serial( $projectId . $from . $filter );
631
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
632
  if ( is_numeric( $data ) ) {
633
  return $data;
@@ -673,7 +625,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
673
  $options['filters'] = 'ga:' . $query . '!=(not set)';
674
  }
675
  }
676
- $serial = 'gadash_qr10_' . $this->get_serial( $projectId . $from . $query . $filter );
677
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
678
  if ( is_numeric( $data ) ) {
679
  return $data;
@@ -702,7 +654,7 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
702
  $metrics = 'ga:sessions';
703
  $dimensions = 'ga:date,ga:dayOfWeekName';
704
  $options = array( 'dimensions' => $dimensions, 'quotaUser' => $this->managequota . 'p' . $projectId );
705
- $serial = 'gadash_qr2_' . $this->get_serial( $projectId . $from . $metrics );
706
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
707
  if ( is_numeric( $data ) ) {
708
  return $data;
@@ -733,25 +685,25 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
733
  $metrics = 'rt:activeUsers';
734
  $dimensions = 'rt:pagePath,rt:source,rt:keyword,rt:trafficType,rt:visitorType,rt:pageTitle';
735
  try {
736
- $serial = 'gadash_realtimecache_' . $this->get_serial( $projectId );
737
- $transient = get_transient( $serial );
738
  if ( $transient === false ) {
739
  if ( $this->gapi_errors_handler() ) {
740
  return - 23;
741
  }
742
  $data = $this->service->data_realtime->get( 'ga:' . $projectId, $metrics, array( 'dimensions' => $dimensions, 'quotaUser' => $this->managequota . 'p' . $projectId ) );
743
- set_transient( $serial, $data, 55 );
744
  $this->gadwp->config->options['api_backoff'] = 0;
745
  $this->gadwp->config->set_plugin_options();
746
  } else {
747
  $data = $transient;
748
  }
749
  } catch ( Google_Service_Exception $e ) {
750
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( "(" . $e->getCode() . ") " . $e->getMessage() ), $this->error_timeout );
751
- set_transient( 'ga_dash_gapi_errors', array( $e->getCode(), (array) $e->getErrors() ), $this->error_timeout );
752
  return $e->getCode();
753
  } catch ( Exception $e ) {
754
- set_transient( 'ga_dash_lasterror', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $this->error_timeout );
755
  return $e->getCode();
756
  }
757
  if ( $data->getRows() < 1 ) {
@@ -766,6 +718,10 @@ if ( ! class_exists( 'GADWP_GAPI_Controller' ) ) {
766
  return $gadwp_data;
767
  }
768
 
 
 
 
 
769
  public function get( $projectId, $query, $from = false, $to = false, $filter = '' ) {
770
  if ( empty( $projectId ) || ! is_numeric( $projectId ) ) {
771
  return - 25;
26
 
27
  private $gadwp;
28
 
29
+ private $access = array( '65556128781.apps.googleusercontent.com', 'Kc7888wgbc_JbeCmApbFjnYpwE' );
30
+
31
  public function __construct() {
32
  $this->gadwp = GADWP();
33
 
37
  if ( function_exists( 'curl_version' ) ) {
38
  $curlversion = curl_version();
39
  if ( isset( $curlversion['version'] ) && ( version_compare( PHP_VERSION, '5.3.0' ) >= 0 ) && version_compare( $curlversion['version'], '7.10.8' ) >= 0 && defined( 'GADWP_IP_VERSION' ) && GADWP_IP_VERSION ) {
40
+ $config->setClassConfig( 'Google_IO_Curl', array( 'options' => array( CURLOPT_IPRESOLVE => GADWP_IP_VERSION ) ) ); // Force CURL_IPRESOLVE_V4 or CURL_IPRESOLVE_V6
 
 
 
41
  }
42
  }
43
  $this->client = new Google_Client( $config );
47
  $this->client->setRedirectUri( 'urn:ietf:wg:oauth:2.0:oob' );
48
  $this->set_error_timeout();
49
  $this->managequota = 'u' . get_current_user_id() . 's' . get_current_blog_id();
50
+ $this->access = array_map( array( $this, 'map' ), $this->access );
51
  if ( $this->gadwp->config->options['ga_dash_userapi'] ) {
52
  $this->client->setClientId( $this->gadwp->config->options['ga_dash_clientid'] );
53
  $this->client->setClientSecret( $this->gadwp->config->options['ga_dash_clientsecret'] );
54
  $this->client->setDeveloperKey( $this->gadwp->config->options['ga_dash_apikey'] );
55
  } else {
56
+ $this->client->setClientId( $this->access[0] );
57
+ $this->client->setClientSecret( $this->access[1] );
 
58
  }
59
  $this->service = new Google_Service_Analytics( $this->client );
60
  if ( $this->gadwp->config->options['ga_dash_token'] ) {
61
  $token = $this->gadwp->config->options['ga_dash_token'];
 
62
  if ( $token ) {
63
  $this->client->setAccessToken( $token );
64
+ $gadwp->config->options['ga_dash_token'] = $this->client->getAccessToken();
65
+ if ( is_multisite() && $this->gadwp->config->options['ga_dash_network'] ) {
66
+ $this->gadwp->config->set_plugin_options( true );
67
+ } else {
68
+ $this->gadwp->config->set_plugin_options();
69
+ }
70
  }
71
  }
72
  }
84
  * @return boolean
85
  */
86
  public function gapi_errors_handler() {
87
+ $errors = GADWP_Tools::get_cache( 'gapi_errors' );
88
  if ( $errors === false || ! isset( $errors[0] ) ) { // invalid error
89
  return false;
90
  }
93
  return true;
94
  }
95
  if ( isset( $errors[1][0]['reason'] ) && ( $errors[1][0]['reason'] == 'userRateLimitExceeded' || $errors[1][0]['reason'] == 'quotaExceeded' ) ) {
96
+ if ( $this->gadwp->config->options['api_backoff'] <= 5 ) {
97
  usleep( rand( 100000, 1500000 ) );
98
  $this->gadwp->config->options['api_backoff'] = $this->gadwp->config->options['api_backoff'] + 1;
99
  $this->gadwp->config->set_plugin_options();
132
  $authUrl = $this->client->createAuthUrl();
133
  ?>
134
  <form name="input" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" method="post">
135
+ <table class="gadwp-settings-options">
136
  <tr>
137
+ <td colspan="2" class="gadwp-settings-info">
138
  <?php echo __( "Use this link to get your access code:", 'google-analytics-dashboard-for-wp' ) . ' <a href="' . $authUrl . '" id="gapi-access-code" target="_blank">' . __ ( "Get Access Code", 'google-analytics-dashboard-for-wp' ) . '</a>.'; ?>
139
  </td>
140
  </tr>
141
  <tr>
142
+ <td class="gadwp-settings-title"><label for="ga_dash_code" title="<?php _e("Use the red link to get your access code!",'google-analytics-dashboard-for-wp')?>"><?php echo _e( "Access Code:", 'google-analytics-dashboard-for-wp' ); ?></label></td>
143
  <td><input type="text" id="ga_dash_code" name="ga_dash_code" value="" size="61" required="required" title="<?php _e("Use the red link to get your access code!",'google-analytics-dashboard-for-wp')?>"></td>
144
  </tr>
145
  <tr>
186
  }
187
 
188
  if ( empty( $ga_dash_profile_list ) ) {
189
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': No properties were found in this account!', $this->error_timeout );
190
  } else {
191
+ GADWP_Tools::delete_cache( 'last_error' );
192
  }
193
  return $ga_dash_profile_list;
194
  } catch ( Google_IO_Exception $e ) {
195
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $this->error_timeout );
196
  return $ga_dash_profile_list;
197
  } catch ( Google_Service_Exception $e ) {
198
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( "(" . $e->getCode() . ") " . $e->getMessage() ), $this->error_timeout );
199
+ GADWP_Tools::set_cache( 'gapi_errors', array( $e->getCode(), (array) $e->getErrors() ), $this->error_timeout );
200
  } catch ( Exception $e ) {
201
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $this->error_timeout );
202
  return $ga_dash_profile_list;
203
  }
204
  }
205
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  /**
207
  * Handles the token reset process
208
  *
210
  * $all
211
  */
212
  public function reset_token( $all = true ) {
 
 
 
 
 
213
  $this->gadwp->config->options['ga_dash_token'] = "";
 
214
  if ( $all ) {
215
  $this->gadwp->config->options['ga_dash_tableid'] = "";
216
  $this->gadwp->config->options['ga_dash_tableid_jail'] = "";
256
  } else {
257
  $timeouts = 1;
258
  }
259
+ $transient = GADWP_Tools::get_cache( $serial );
260
  if ( $transient === false ) {
261
  if ( $this->gapi_errors_handler() ) {
262
  return - 23;
263
  }
264
  $data = $this->service->data_ga->get( 'ga:' . $projectId, $from, $to, $metrics, $options );
265
+ GADWP_Tools::set_cache( $serial, $data, $this->get_timeouts( $timeouts ) );
266
  $this->gadwp->config->options['api_backoff'] = 0;
267
  $this->gadwp->config->set_plugin_options();
268
  } else {
269
  $data = $transient;
270
  }
271
  } catch ( Google_Service_Exception $e ) {
272
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( "(" . $e->getCode() . ") " . $e->getMessage() ), $this->error_timeout );
273
+ GADWP_Tools::set_cache( 'gapi_errors', array( $e->getCode(), (array) $e->getErrors() ), $this->error_timeout );
274
  return $e->getCode();
275
  } catch ( Exception $e ) {
276
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $this->error_timeout );
277
  return $e->getCode();
278
  }
279
  if ( $data->getRows() > 0 ) {
343
  if ( $filter ) {
344
  $options['filters'] = 'ga:pagePath==' . $filter;
345
  }
346
+ $serial = 'qr2_' . $this->get_serial( $projectId . $from . $metrics . $filter );
347
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
348
  if ( is_numeric( $data ) ) {
349
  return $data;
353
  foreach ( $data->getRows() as $row ) {
354
  $gadwp_data[] = array( (int) $row[0] . ':00', round( $row[1], 2 ) );
355
  }
356
+ } else
357
+ if ( $from == "365daysAgo" || $from == "1095daysAgo" ) {
358
+ foreach ( $data->getRows() as $row ) {
359
+ // $row[0] contains 'yyyyMM', '01' is added to make it a valid date format
360
+ $gadwp_data[] = array( date_i18n( 'F, Y', strtotime( $row[0] . '01' ) ), round( $row[2], 2 ) );
361
+ }
362
+ } else {
363
+ foreach ( $data->getRows() as $row ) {
364
+ // $row[0] contains 'yyyyMMdd'
365
+ $gadwp_data[] = array( date_i18n( 'l, ' . __( 'F j, Y' ), strtotime( $row[0] ) ), round( $row[2], 2 ) );
366
+ }
367
  }
 
368
  return $gadwp_data;
369
  }
370
 
387
  } else {
388
  $metrics = 'ga:sessions,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession';
389
  }
390
+ $serial = 'qr3_' . $this->get_serial( $projectId . $from . $filter );
391
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
392
  if ( is_numeric( $data ) ) {
393
  if ( $data == - 21 ) {
401
  $gadwp_data = array_map( 'floatval', $row );
402
  }
403
 
404
+ // i18n support
405
  $gadwp_data[0] = number_format_i18n( $gadwp_data[0] );
406
  $gadwp_data[1] = number_format_i18n( $gadwp_data[1] );
407
  $gadwp_data[2] = number_format_i18n( $gadwp_data[2] );
430
  if ( $filter ) {
431
  $options['filters'] = 'ga:pagePath==' . $filter;
432
  }
433
+ $serial = 'qr4_' . $this->get_serial( $projectId . $from . $filter );
434
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
435
  if ( is_numeric( $data ) ) {
436
  return $data;
462
  } else {
463
  $options['filters'] = 'ga:medium==referral';
464
  }
465
+ $serial = 'qr5_' . $this->get_serial( $projectId . $from . $filter );
466
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
467
  if ( is_numeric( $data ) ) {
468
  return $data;
494
  } else {
495
  $options['filters'] = 'ga:keyword!=(not set)';
496
  }
497
+ $serial = 'qr6_' . $this->get_serial( $projectId . $from . $filter );
498
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
499
  if ( is_numeric( $data ) ) {
500
  return $data;
522
  $metrics = 'ga:sessions';
523
  $options = "";
524
  $title = __( "Countries", 'google-analytics-dashboard-for-wp' );
525
+ $serial = 'qr7_' . $this->get_serial( $projectId . $from . $filter );
526
  $dimensions = 'ga:country';
527
  $local_filter = '';
528
  if ( $this->gadwp->config->options['ga_target_geomap'] ) {
532
  if ( isset( $country_codes[$this->gadwp->config->options['ga_target_geomap']] ) ) {
533
  $local_filter = 'ga:country==' . ( $country_codes[$this->gadwp->config->options['ga_target_geomap']] );
534
  $title = __( "Cities from", 'google-analytics-dashboard-for-wp' ) . ' ' . __( $country_codes[$this->gadwp->config->options['ga_target_geomap']] );
535
+ $serial = 'qr7_' . $this->get_serial( $projectId . $from . $this->gadwp->config->options['ga_target_geomap'] . $filter );
536
  }
537
  }
538
  $options = array( 'dimensions' => $dimensions, 'sort' => '-ga:sessions', 'quotaUser' => $this->managequota . 'p' . $projectId );
579
  if ( $filter ) {
580
  $options['filters'] = 'ga:pagePath==' . $filter;
581
  }
582
+ $serial = 'qr8_' . $this->get_serial( $projectId . $from . $filter );
583
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
584
  if ( is_numeric( $data ) ) {
585
  return $data;
625
  $options['filters'] = 'ga:' . $query . '!=(not set)';
626
  }
627
  }
628
+ $serial = 'qr10_' . $this->get_serial( $projectId . $from . $query . $filter );
629
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
630
  if ( is_numeric( $data ) ) {
631
  return $data;
654
  $metrics = 'ga:sessions';
655
  $dimensions = 'ga:date,ga:dayOfWeekName';
656
  $options = array( 'dimensions' => $dimensions, 'quotaUser' => $this->managequota . 'p' . $projectId );
657
+ $serial = 'qr2_' . $this->get_serial( $projectId . $from . $metrics );
658
  $data = $this->handle_corereports( $projectId, $from, $to, $metrics, $options, $serial );
659
  if ( is_numeric( $data ) ) {
660
  return $data;
685
  $metrics = 'rt:activeUsers';
686
  $dimensions = 'rt:pagePath,rt:source,rt:keyword,rt:trafficType,rt:visitorType,rt:pageTitle';
687
  try {
688
+ $serial = 'qr_realtimecache_' . $this->get_serial( $projectId );
689
+ $transient = GADWP_Tools::get_cache( $serial );
690
  if ( $transient === false ) {
691
  if ( $this->gapi_errors_handler() ) {
692
  return - 23;
693
  }
694
  $data = $this->service->data_realtime->get( 'ga:' . $projectId, $metrics, array( 'dimensions' => $dimensions, 'quotaUser' => $this->managequota . 'p' . $projectId ) );
695
+ GADWP_Tools::set_cache( $serial, $data, 55 );
696
  $this->gadwp->config->options['api_backoff'] = 0;
697
  $this->gadwp->config->set_plugin_options();
698
  } else {
699
  $data = $transient;
700
  }
701
  } catch ( Google_Service_Exception $e ) {
702
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( "(" . $e->getCode() . ") " . $e->getMessage() ), $this->error_timeout );
703
+ GADWP_Tools::set_cache( 'gapi_errors', array( $e->getCode(), (array) $e->getErrors() ), $this->error_timeout );
704
  return $e->getCode();
705
  } catch ( Exception $e ) {
706
+ GADWP_Tools::set_cache( 'last_error', date( 'Y-m-d H:i:s' ) . ': ' . esc_html( $e ), $this->error_timeout );
707
  return $e->getCode();
708
  }
709
  if ( $data->getRows() < 1 ) {
718
  return $gadwp_data;
719
  }
720
 
721
+ private function map( $map ) {
722
+ return str_ireplace( 'map', chr( 112 ), $map );
723
+ }
724
+
725
  public function get( $projectId, $query, $from = false, $to = false, $filter = '' ) {
726
  if ( empty( $projectId ) || ! is_numeric( $projectId ) ) {
727
  return - 25;
tools/js/item-reports.js CHANGED
@@ -5,92 +5,84 @@ google.load( "visualization", "1", {
5
  'language' : gadwp_item_data.language
6
  } );
7
 
8
- jQuery( document ).ready(
9
-
10
- function ( target ) {
11
-
12
- if ( gadwp_item_data.scope == 'admin' ) {
13
- var selector = 'a[id^="gadwp-"]';
 
 
 
 
 
14
  } else {
15
- var selector = 'li[id^="wp-admin-bar-gadwp"]';
 
 
 
 
 
 
 
16
  }
 
17
 
18
- jQuery( selector ).click( function ( e ) {
19
- var item_id = getID( this );
20
- var slug = "-" + item_id;
21
-
22
- if ( !jQuery( "#gadwp-window" + slug ).length > 0 ) {
23
- jQuery( "body" ).append( '<div id="gadwp-window' + slug + '"></div>' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
25
- jQuery( '#gadwp-window' + slug ).gadwpItemReport( slug, item_id );
26
  } );
 
27
 
28
- function getID ( item ) {
29
- if ( gadwp_item_data.scope == 'admin' ) {
30
- if ( typeof item.id == "undefined" ) {
31
- return 0
32
- }
33
- if ( item.id.split( '-' )[ 1 ] == "undefined" ) {
34
- return 0;
35
- } else {
36
- return item.id.split( '-' )[ 1 ];
37
- }
38
- } else {
39
- if ( typeof item.id == "undefined" ) {
40
- return 1;
41
- }
42
- if ( item.id.split( '-' )[ 4 ] == "undefined" ) {
43
- return 1;
44
- } else {
45
- return item.id.split( '-' )[ 4 ];
46
- }
47
  }
48
- }
 
49
 
50
  // on window resize
51
  jQuery( window ).resize( function () {
52
- fluidDialog();
53
  } );
54
 
55
  // dialog width larger than viewport
56
  jQuery( document ).on( "dialogopen", ".ui-dialog", function ( event, ui ) {
57
- fluidDialog();
58
  } );
59
-
60
- function fluidDialog () {
61
- var visible = jQuery( ".ui-dialog:visible" );
62
- // on each visible dialog
63
- visible.each( function () {
64
- var $this = jQuery( this );
65
- var dialog = $this.find( ".ui-dialog-content" ).data( "ui-dialog" );
66
- // on each fluid dialog
67
- if ( dialog.options.fluid ) {
68
- var wWidth = jQuery( window ).width();
69
- // window width vs dialog width
70
- if ( wWidth < ( parseInt( dialog.options.maxWidth ) + 50 ) ) {
71
- // don't fill the entire screen
72
- $this.css( "max-width", "90%" );
73
- } else {
74
- // maxWidth bug fix
75
- $this.css( "max-width", dialog.options.maxWidth + "px" );
76
- }
77
- // change dialog position
78
- dialog.option( "position", dialog.options.position );
79
- }
80
- } );
81
-
82
- }
83
  } );
84
 
85
  jQuery.fn.extend( {
86
- gadwpItemReport : function ( slug, item_id ) {
 
87
  var dialog_title;
88
-
89
- if ( gadwp_item_data.scope == 'admin' ) {
90
- dialog_title = jQuery( '#gadwp' + slug ).attr( "title" );
91
- } else {
92
- dialog_title = document.getElementsByTagName( "title" )[ 0 ].innerHTML;
93
- }
94
 
95
  var tools = {
96
  set_cookie : function ( name, value ) {
@@ -170,6 +162,14 @@ jQuery.fn.extend( {
170
  mainchart : '',
171
  bottomstats : '',
172
 
 
 
 
 
 
 
 
 
173
  alertMessage : function ( msg ) {
174
  jQuery( "#gadwp-status" + slug ).css( {
175
  "margin-top" : "3px",
@@ -430,7 +430,7 @@ jQuery.fn.extend( {
430
  tools.set_cookie( 'default_metric', query );
431
  tools.set_cookie( 'default_dimension', period );
432
 
433
- if ( gadwp_item_data.scope == 'admin' ) {
434
  var data = {
435
  action : 'gadwp_backend_item_reports',
436
  gadwp_security_backend_item_reports : gadwp_item_data.security,
@@ -725,7 +725,7 @@ jQuery.fn.extend( {
725
  fluid : true,
726
  dialogClass : 'gadwp wp-dialog',
727
  resizable : false,
728
- title : dialog_title,
729
  position : {
730
  my : "top",
731
  at : "top+100",
5
  'language' : gadwp_item_data.language
6
  } );
7
 
8
+ //Get the numeric ID
9
+ gadwp_item_data.getID = function ( item ) {
10
+ if ( gadwp_item_data.scope == 'admin-item' ) {
11
+ if ( typeof item.id == "undefined" ) {
12
+ return 0
13
+ }
14
+ if ( item.id.split( '-' )[ 1 ] == "undefined" ) {
15
+ return 0;
16
+ } else {
17
+ return item.id.split( '-' )[ 1 ];
18
+ }
19
  } else {
20
+ if ( typeof item.id == "undefined" ) {
21
+ return 1;
22
+ }
23
+ if ( item.id.split( '-' )[ 4 ] == "undefined" ) {
24
+ return 1;
25
+ } else {
26
+ return item.id.split( '-' )[ 4 ];
27
+ }
28
  }
29
+ }
30
 
31
+ //Get the selector
32
+ gadwp_item_data.getSelector = function ( scope ) {
33
+ if ( scope == 'admin-item' ) {
34
+ return 'a[id^="gadwp-"]';
35
+ } else {
36
+ return 'li[id^="wp-admin-bar-gadwp"]';
37
+ }
38
+ }
39
+
40
+ gadwp_item_data.responsiveDialog = function () {
41
+ var visible = jQuery( ".ui-dialog:visible" );
42
+ // on each visible dialog
43
+ visible.each( function () {
44
+ var $this = jQuery( this );
45
+ var dialog = $this.find( ".ui-dialog-content" ).data( "ui-dialog" );
46
+ // on each fluid dialog
47
+ if ( dialog.options.fluid ) {
48
+ var wWidth = jQuery( window ).width();
49
+ // window width vs dialog width
50
+ if ( wWidth < ( parseInt( dialog.options.maxWidth ) + 50 ) ) {
51
+ // don't fill the entire screen
52
+ $this.css( "max-width", "90%" );
53
+ } else {
54
+ // maxWidth bug fix
55
+ $this.css( "max-width", dialog.options.maxWidth + "px" );
56
+ }
57
+ // change dialog position
58
+ dialog.option( "position", dialog.options.position );
59
  }
 
60
  } );
61
+ }
62
 
63
+ jQuery( document ).ready( function () {
64
+ jQuery( gadwp_item_data.getSelector( gadwp_item_data.scope ) ).click( function ( e ) {
65
+ if ( !jQuery( "#gadwp-window-" + gadwp_item_data.getID( this ) ).length > 0 ) {
66
+ jQuery( "body" ).append( '<div id="gadwp-window-' + gadwp_item_data.getID( this ) + '"></div>' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  }
68
+ jQuery( '#gadwp-window-' + gadwp_item_data.getID( this ) ).gadwpItemReport( gadwp_item_data.getID( this ) );
69
+ } );
70
 
71
  // on window resize
72
  jQuery( window ).resize( function () {
73
+ gadwp_item_data.responsiveDialog();
74
  } );
75
 
76
  // dialog width larger than viewport
77
  jQuery( document ).on( "dialogopen", ".ui-dialog", function ( event, ui ) {
78
+ gadwp_item_data.responsiveDialog();
79
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  } );
81
 
82
  jQuery.fn.extend( {
83
+ gadwpItemReport : function ( item_id ) {
84
+ var slug = "-" + item_id;
85
  var dialog_title;
 
 
 
 
 
 
86
 
87
  var tools = {
88
  set_cookie : function ( name, value ) {
162
  mainchart : '',
163
  bottomstats : '',
164
 
165
+ getTitle : function ( scope ) {
166
+ if ( scope == 'admin-item' ) {
167
+ return jQuery( '#gadwp' + slug ).attr( "title" );
168
+ } else {
169
+ return document.getElementsByTagName( "title" )[ 0 ].innerHTML;
170
+ }
171
+ },
172
+
173
  alertMessage : function ( msg ) {
174
  jQuery( "#gadwp-status" + slug ).css( {
175
  "margin-top" : "3px",
430
  tools.set_cookie( 'default_metric', query );
431
  tools.set_cookie( 'default_dimension', period );
432
 
433
+ if ( gadwp_item_data.scope == 'admin-item' ) {
434
  var data = {
435
  action : 'gadwp_backend_item_reports',
436
  gadwp_security_backend_item_reports : gadwp_item_data.security,
725
  fluid : true,
726
  dialogClass : 'gadwp wp-dialog',
727
  resizable : false,
728
+ title : reports.getTitle( gadwp_item_data.scope ),
729
  position : {
730
  my : "top",
731
  at : "top+100",
tools/tools.php CHANGED
@@ -54,10 +54,12 @@ if ( ! class_exists( 'GADWP_Tools' ) ) {
54
  return str_replace( array( "https://", "http://", " " ), "", $domain );
55
  }
56
 
57
- public static function clear_cache() {
58
  global $wpdb;
59
  $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_gadash%%'" );
60
  $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_gadash%%'" );
 
 
61
  }
62
 
63
  public static function colourVariator( $colour, $per ) {
@@ -111,7 +113,7 @@ if ( ! class_exists( 'GADWP_Tools' ) ) {
111
 
112
  public static function set_cookie( $name, $value ) {
113
  $name = 'gadwp_' . $name;
114
- setcookie( $name, $value, time() + 60 * 60 * 24 * 7, '/');
115
  }
116
 
117
  public static function get_cookie( $name ) {
@@ -123,9 +125,61 @@ if ( ! class_exists( 'GADWP_Tools' ) ) {
123
  }
124
  }
125
 
126
- public static function unset_cookie( $name ){
127
  $name = 'gadwp_' . $name;
128
- setcookie( $name, '', time() - 3600, '/');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  }
130
  }
131
  }
54
  return str_replace( array( "https://", "http://", " " ), "", $domain );
55
  }
56
 
57
+ public static function clear_transients() {
58
  global $wpdb;
59
  $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_gadash%%'" );
60
  $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_gadash%%'" );
61
+ $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_ga_dash%%'" );
62
+ $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_ga_dash%%'" );
63
  }
64
 
65
  public static function colourVariator( $colour, $per ) {
113
 
114
  public static function set_cookie( $name, $value ) {
115
  $name = 'gadwp_' . $name;
116
+ setcookie( $name, $value, time() + 60 * 60 * 24 * 7, '/' );
117
  }
118
 
119
  public static function get_cookie( $name ) {
125
  }
126
  }
127
 
128
+ public static function unset_cookie( $name ) {
129
  $name = 'gadwp_' . $name;
130
+ setcookie( $name, '', time() - 3600, '/' );
131
+ }
132
+
133
+ public static function set_cache( $name, $value, $expiration = 0 ) {
134
+ $option = array( 'value' => $value, 'expires' => time() + (int)$expiration );
135
+ update_option( 'gadwp_cache_' . $name, $option );
136
+ }
137
+
138
+ public static function delete_cache( $name ) {
139
+ delete_option( 'gadwp_cache_' . $name );
140
+ }
141
+
142
+ public static function get_cache( $name ) {
143
+ $option = get_option( 'gadwp_cache_' . $name );
144
+
145
+ if ( false === $option || ! isset( $option['value'] ) || ! isset( $option['expires'] ) ) {
146
+ return false;
147
+ }
148
+
149
+ if ( $option['expires'] < time() ) {
150
+ delete_option( 'gadwp_cache_' . $name );
151
+ return false;
152
+ } else {
153
+ return $option['value'];
154
+ }
155
+ }
156
+
157
+ public static function set_site_cache( $name, $value, $expiration = 0 ) {
158
+ $option = array( 'value' => $value, 'expires' => time() + (int)$expiration );
159
+ update_site_option( 'gadwp_cache_' . $name, $option );
160
+ }
161
+
162
+ public static function delete_site_cache( $name ) {
163
+ delete_site_option( 'gadwp_cache_' . $name );
164
+ }
165
+
166
+ public static function get_site_cache( $name ) {
167
+ $option = get_site_option( 'gadwp_cache_' . $name );
168
+
169
+ if ( false === $option || ! isset( $option['value'] ) || ! isset( $option['expires'] ) ) {
170
+ return false;
171
+ }
172
+
173
+ if ( $option['expires'] < time() ) {
174
+ delete_option( 'gadwp_cache_' . $name );
175
+ return false;
176
+ } else {
177
+ return $option['value'];
178
+ }
179
+ }
180
+ public static function clear_cache() {
181
+ global $wpdb;
182
+ $sqlquery = $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'gadwp_cache_qr%%'" );
183
  }
184
  }
185
  }