Google Analytics Dashboard for WP (GADWP) - Version 4.4.4

Version Description

  • Bug Fix: end tag missing on error message
  • Bug Fix: additional checks before making a View list request
  • Bug Fix: avoid deleting errors while clearing the cache
  • Bug Fix: PHP notices fix for some requests
  • Bug Fix: PHP notices fix when calling ob_clean on an empty buffer
  • Bug Fix: frontend stats not responsive
  • Enhancement: handle some additional API errors
  • Enhancement: set totals to zero when anonymize stats is enabled
  • Enhancement: auto-cleanup removed; all transients have static identifiers now
  • Enhancement: dump error details to JavaScript Console and throw an alert on invalid responses
  • Enhancement: Italian translation, updated by Leo
Download this release

Release Info

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

Code changes from version 4.4.3 to 4.4.4

Files changed (68) hide show
  1. admin/ajax-actions.php +117 -137
  2. admin/css/ga_dash.css +42 -41
  3. admin/dashboard_widgets.php +413 -391
  4. admin/ga_dash_settings.php +555 -582
  5. config.php +240 -257
  6. front/ajax-actions.php +127 -148
  7. front/css/content_stats.css +8 -8
  8. front/frontend.php +96 -99
  9. front/js/content_stats.js +1 -1
  10. front/tracking.php +53 -62
  11. front/tracking/code-universal.php +28 -37
  12. front/widgets.php +108 -128
  13. gadwp.php +39 -48
  14. install/install.php +119 -123
  15. install/uninstall.php +30 -24
  16. languages/ar.mo +0 -0
  17. languages/ar.po +379 -297
  18. languages/ga-dash-de_DE.mo +0 -0
  19. languages/ga-dash-de_DE.po +381 -299
  20. languages/ga-dash-es_ES.mo +0 -0
  21. languages/ga-dash-es_ES.po +338 -297
  22. languages/ga-dash-fr_FR.mo +0 -0
  23. languages/ga-dash-fr_FR.po +381 -299
  24. languages/ga-dash-hu_HU.mo +0 -0
  25. languages/ga-dash-hu_HU.po +381 -299
  26. languages/ga-dash-it_IT.mo +0 -0
  27. languages/ga-dash-it_IT.po +1104 -1013
  28. languages/ga-dash-pl_PL.mo +0 -0
  29. languages/ga-dash-pl_PL.po +380 -298
  30. languages/ga-dash-pt_BR.mo +0 -0
  31. languages/ga-dash-pt_BR.po +381 -299
  32. languages/ga-dash.pot +309 -283
  33. readme.txt +14 -1
  34. tools/autoload.php +32 -32
  35. tools/gapi.php +811 -896
  36. tools/nprogress/nprogress.css +0 -1
  37. tools/src/Google/Auth/Abstract.php +39 -35
  38. tools/src/Google/Auth/AppIdentity.php +95 -104
  39. tools/src/Google/Auth/AssertionCredentials.php +133 -135
  40. tools/src/Google/Auth/Exception.php +20 -21
  41. tools/src/Google/Auth/LoginTicket.php +74 -68
  42. tools/src/Google/Auth/OAuth2.php +538 -632
  43. tools/src/Google/Auth/Simple.php +62 -63
  44. tools/src/Google/Cache/Abstract.php +57 -52
  45. tools/src/Google/Cache/Apc.php +106 -110
  46. tools/src/Google/Cache/Exception.php +20 -21
  47. tools/src/Google/Cache/File.php +181 -189
  48. tools/src/Google/Cache/Memcache.php +172 -181
  49. tools/src/Google/Cache/Null.php +53 -54
  50. tools/src/Google/Client.php +751 -685
  51. tools/src/Google/Collection.php +91 -95
  52. tools/src/Google/Config.php +440 -413
  53. tools/src/Google/Exception.php +19 -19
  54. tools/src/Google/Http/Batch.php +132 -140
  55. tools/src/Google/Http/CacheParser.php +179 -183
  56. tools/src/Google/Http/MediaFileUpload.php +300 -299
  57. tools/src/Google/Http/REST.php +142 -146
  58. tools/src/Google/Http/Request.php +482 -475
  59. tools/src/Google/IO/Abstract.php +334 -328
  60. tools/src/Google/IO/Curl.php +151 -166
  61. tools/src/Google/IO/Exception.php +20 -21
  62. tools/src/Google/IO/Stream.php +194 -229
  63. tools/src/Google/Logger/Abstract.php +394 -405
  64. tools/src/Google/Logger/Exception.php +20 -21
  65. tools/src/Google/Logger/File.php +143 -155
  66. tools/src/Google/Logger/Null.php +39 -40
  67. tools/src/Google/Logger/Psr.php +91 -90
  68. tools/src/Google/Model.php +183 -280
admin/ajax-actions.php CHANGED
@@ -7,145 +7,125 @@
7
  */
8
  if (! class_exists('GADASH_Backend_Ajax')) {
9
 
10
- final class GADASH_Backend_Ajax
11
- {
12
-
13
- function __construct()
14
- {
15
- // Backend Widget Realtime action
16
- add_action('wp_ajax_gadashadmin_get_realtime', array(
17
- $this,
18
- 'ajax_adminwidget_realtime'
19
- ));
20
- // Admin Widget get Reports action
21
- add_action('wp_ajax_gadashadmin_get_widgetreports', array(
22
- $this,
23
- 'ajax_adminwidget_reports'
24
- ));
25
- }
26
 
27
- /**
28
- * Ajax handler for getting reports for Admin Widget
29
- *
30
- * @return string|int
31
- */
32
- function ajax_adminwidget_reports()
33
- {
34
- global $GADASH_Config;
35
-
36
- $projectId = $_REQUEST['projectId'];
37
- $from = $_REQUEST['from'];
38
- $to = $_REQUEST['to'];
39
- $query = $_REQUEST['query'];
40
-
41
- ob_clean();
42
-
43
- if (! isset($_REQUEST['gadashadmin_security_widget_reports']) or ! wp_verify_nonce($_REQUEST['gadashadmin_security_widget_reports'], 'gadashadmin_get_widgetreports')) {
44
- print(json_encode(- 30));
45
- die();
46
- }
47
-
48
- /*
49
- * Include Tools
50
- */
51
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
52
- $tools = new GADASH_Tools();
53
-
54
- if (! $tools->check_roles($GADASH_Config->options['ga_dash_access_back'])) {
55
- print(json_encode(- 31));
56
- die();
57
- }
58
-
59
- if ($GADASH_Config->options['ga_dash_token'] and $projectId and $from and $to) {
60
- include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
61
- global $GADASH_GAPI;
62
- } else {
63
- print(json_encode(- 24));
64
- die();
65
- }
66
-
67
- switch ($query) {
68
- case 'referrers':
69
- print($GADASH_GAPI->get_referrers($projectId, $from, $to));
70
- break;
71
- case 'contentpages':
72
- print($GADASH_GAPI->get_contentpages($projectId, $from, $to));
73
- break;
74
- case 'locations':
75
- print($GADASH_GAPI->get_locations($projectId, $from, $to));
76
- break;
77
- case 'bottomstats':
78
- print(json_encode($GADASH_GAPI->get_bottomstats($projectId, $from, $to)));
79
- break;
80
- case 'trafficchannels':
81
- print($GADASH_GAPI->get_trafficchannels($projectId, $from, $to));
82
- break;
83
- case 'medium':
84
- print($GADASH_GAPI->get_trafficdetails($projectId, $from, $to, 'medium'));
85
- break;
86
- case 'visitorType':
87
- print($GADASH_GAPI->get_trafficdetails($projectId, $from, $to, 'visitorType'));
88
- break;
89
- case 'socialNetwork':
90
- print($GADASH_GAPI->get_trafficdetails($projectId, $from, $to, 'socialNetwork'));
91
- break;
92
- case 'source':
93
- print($GADASH_GAPI->get_trafficdetails($projectId, $from, $to, 'source'));
94
- break;
95
- case 'searches':
96
- print($GADASH_GAPI->get_searches($projectId, $from, $to));
97
- break;
98
- default:
99
- print($GADASH_GAPI->get_mainreport($projectId, $from, $to, $query));
100
- break;
101
- }
102
 
103
- die();
104
- }
105
-
106
- // Real-Time Request
107
- /**
108
- * Ajax handler for getting realtime analytics data for Admin widget
109
- *
110
- * @return string|int
111
- */
112
- function ajax_adminwidget_realtime()
113
- {
114
- global $GADASH_Config;
115
-
116
- $projectId = $_REQUEST['projectId'];
117
-
118
- ob_clean();
119
-
120
- if (! isset($_REQUEST['gadashadmin_security_widgetrealtime']) or ! wp_verify_nonce($_REQUEST['gadashadmin_security_widgetrealtime'], 'gadashadmin_get_realtime')) {
121
- print(json_encode(- 30));
122
- die();
123
- }
124
-
125
- /*
126
- * Include Tools
127
- */
128
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
129
- $tools = new GADASH_Tools();
130
-
131
- if (! $tools->check_roles($GADASH_Config->options['ga_dash_access_back'])) {
132
- print(json_encode(- 31));
133
- die();
134
- }
135
-
136
- if ($GADASH_Config->options['ga_dash_token'] and $projectId) {
137
- include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
138
- global $GADASH_GAPI;
139
- } else {
140
- print(json_encode(- 24));
141
- die();
142
- }
143
-
144
- print($GADASH_GAPI->gadash_realtime_data($projectId));
145
-
146
- die();
147
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
 
149
  }
150
-
151
  $GADASH_Backend_Ajax = new GADASH_Backend_Ajax();
7
  */
8
  if (! class_exists('GADASH_Backend_Ajax')) {
9
 
10
+ final class GADASH_Backend_Ajax
11
+ {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
+ function __construct()
14
+ {
15
+ // Backend Widget Realtime action
16
+ add_action('wp_ajax_gadashadmin_get_realtime', array(
17
+ $this,
18
+ 'ajax_adminwidget_realtime'
19
+ ));
20
+ // Admin Widget get Reports action
21
+ add_action('wp_ajax_gadashadmin_get_widgetreports', array(
22
+ $this,
23
+ 'ajax_adminwidget_reports'
24
+ ));
25
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
+ /**
28
+ * Ajax handler for getting reports for Admin Widget
29
+ *
30
+ * @return string|int
31
+ */
32
+ function ajax_adminwidget_reports()
33
+ {
34
+ global $GADASH_Config;
35
+ if (! isset($_REQUEST['gadashadmin_security_widget_reports']) or ! wp_verify_nonce($_REQUEST['gadashadmin_security_widget_reports'], 'gadashadmin_get_widgetreports')) {
36
+ wp_die(- 30);
37
+ }
38
+ $projectId = $_REQUEST['projectId'];
39
+ $from = $_REQUEST['from'];
40
+ $to = $_REQUEST['to'];
41
+ $query = $_REQUEST['query'];
42
+ if (ob_get_length()) {
43
+ ob_clean();
44
+ }
45
+ /*
46
+ * Include Tools
47
+ */
48
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
49
+ $tools = new GADASH_Tools();
50
+ if (! $tools->check_roles($GADASH_Config->options['ga_dash_access_back'])) {
51
+ wp_die(- 31);
52
+ }
53
+ if ($GADASH_Config->options['ga_dash_token'] and $projectId and $from and $to) {
54
+ include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
55
+ global $GADASH_GAPI;
56
+ } else {
57
+ wp_die(- 24);
58
+ }
59
+ switch ($query) {
60
+ case 'referrers':
61
+ print($GADASH_GAPI->get_referrers($projectId, $from, $to));
62
+ break;
63
+ case 'contentpages':
64
+ print($GADASH_GAPI->get_contentpages($projectId, $from, $to));
65
+ break;
66
+ case 'locations':
67
+ print($GADASH_GAPI->get_locations($projectId, $from, $to));
68
+ break;
69
+ case 'bottomstats':
70
+ print(json_encode($GADASH_GAPI->get_bottomstats($projectId, $from, $to)));
71
+ break;
72
+ case 'trafficchannels':
73
+ print($GADASH_GAPI->get_trafficchannels($projectId, $from, $to));
74
+ break;
75
+ case 'medium':
76
+ print($GADASH_GAPI->get_trafficdetails($projectId, $from, $to, 'medium'));
77
+ break;
78
+ case 'visitorType':
79
+ print($GADASH_GAPI->get_trafficdetails($projectId, $from, $to, 'visitorType'));
80
+ break;
81
+ case 'socialNetwork':
82
+ print($GADASH_GAPI->get_trafficdetails($projectId, $from, $to, 'socialNetwork'));
83
+ break;
84
+ case 'source':
85
+ print($GADASH_GAPI->get_trafficdetails($projectId, $from, $to, 'source'));
86
+ break;
87
+ case 'searches':
88
+ print($GADASH_GAPI->get_searches($projectId, $from, $to));
89
+ break;
90
+ default:
91
+ print($GADASH_GAPI->get_mainreport($projectId, $from, $to, $query));
92
+ break;
93
+ }
94
+ wp_die();
95
+ }
96
+ // Real-Time Request
97
+ /**
98
+ * Ajax handler for getting realtime analytics data for Admin widget
99
+ *
100
+ * @return string|int
101
+ */
102
+ function ajax_adminwidget_realtime()
103
+ {
104
+ global $GADASH_Config;
105
+ if (! isset($_REQUEST['gadashadmin_security_widgetrealtime']) or ! wp_verify_nonce($_REQUEST['gadashadmin_security_widgetrealtime'], 'gadashadmin_get_realtime')) {
106
+ wp_die(- 30);
107
+ }
108
+ $projectId = $_REQUEST['projectId'];
109
+ if (ob_get_length()) {
110
+ ob_clean();
111
+ }
112
+ /*
113
+ * Include Tools
114
+ */
115
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
116
+ $tools = new GADASH_Tools();
117
+ if (! $tools->check_roles($GADASH_Config->options['ga_dash_access_back'])) {
118
+ wp_die(- 31);
119
+ }
120
+ if ($GADASH_Config->options['ga_dash_token'] and $projectId) {
121
+ include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
122
+ global $GADASH_GAPI;
123
+ } else {
124
+ wp_die(- 24);
125
+ }
126
+ print($GADASH_GAPI->gadash_realtime_data($projectId));
127
+ wp_die();
128
  }
129
+ }
130
  }
 
131
  $GADASH_Backend_Ajax = new GADASH_Backend_Ajax();
admin/css/ga_dash.css CHANGED
@@ -1,7 +1,7 @@
1
  /* Tab navigation */
2
-
3
- #gadwp-events, #gadwp-custom, #gadwp-advanced, #gadwp-exclude, #gadwp-config{
4
- display:none;
5
  }
6
 
7
  /* Options pages */
@@ -36,10 +36,10 @@ td.title label {
36
  }
37
 
38
  .gadash-title {
39
- float:left;
40
  margin-right: 10px;
41
  margin-top: 2px;
42
- clear:left;
43
  }
44
 
45
  .gadash-desc {
@@ -51,6 +51,7 @@ td.title label {
51
  }
52
 
53
  pre.gadash {
 
54
  }
55
 
56
  pre.log_data {
@@ -189,13 +190,13 @@ td.roles {
189
  .gadash-pleft {
190
  width: 90%;
191
  float: left;
192
- padding-left:5px;
193
  }
194
 
195
  .gadash-pright {
196
  width: 5%;
197
  float: right;
198
- padding-right:5px;
199
  }
200
 
201
  #gadash-widget .realtime {
@@ -218,7 +219,7 @@ td.roles {
218
  width: 60%;
219
  padding: 33px 0;
220
  float: left;
221
- text-align:center;
222
  }
223
 
224
  .gadash-tdo-right {
@@ -228,15 +229,15 @@ td.roles {
228
  font-weight: bold;
229
  vertical-align: middle;
230
  float: right;
231
- display:table;
232
  }
233
 
234
  .gadash-online {
235
  font-size: 100px;
236
  font-weight: normal;
237
  line-height: 1em;
238
- margin:0 auto;
239
- width:80%;
240
  }
241
 
242
  .gadash-bigtext {
@@ -249,17 +250,17 @@ td.roles {
249
  -webkit-box-shadow: 0px 0px 3px 0px #BBB;
250
  box-shadow: 0px 0px 3px 0px #BBB;
251
  display: table;
252
- overflow: hidden;
253
  }
254
 
255
- .gadash-bleft{
256
- float:left;
257
- width:80%;
258
  }
259
 
260
- .gadash-bright{
261
- float:right;
262
- width:20%;
263
  }
264
 
265
  .gadash-pgdetailsr {
@@ -271,36 +272,37 @@ td.roles {
271
  min-width: 250px;
272
  }
273
 
274
- #gadash-mainchart{
275
  width: 98%;
276
- height:100%;
277
  margin: 10px auto 10px 0;
278
  height: 250px;
279
  }
280
 
281
- .gadash-floatwraper{
282
- display:table;
283
- width:100%;
284
- height:100%;
285
  }
286
 
287
- #gadash-trafficmediums, #gadash-traffictype, #gadash-socialnetworks, #gadash-trafficorganic{
288
- width:47%;
289
- margin:10px 0 0 0;
 
290
  height: 200px;
291
  }
292
 
293
- #gadash-trafficmediums, #gadash-trafficorganic{
294
- float:left;
295
  }
296
-
297
- #gadash-traffictype, #gadash-socialnetworks{
298
- float:right;
299
  }
300
-
301
- #gadash-map, #gadash-prs{
302
  width: 98%;
303
- height:100%;
304
  margin: 10px auto 10px 0;
305
  }
306
 
@@ -315,11 +317,10 @@ td.roles {
315
  }
316
 
317
  /* Admin Widget content */
318
-
319
- #gadash-progressbar{
320
- width:100%;
321
- height:3px;
322
- margin:5px 0 0px 0;
323
  }
324
 
325
  .gadash-wrapper {
@@ -359,4 +360,4 @@ td.roles {
359
  .gadash-wrapper .inside .small-box {
360
  width: 45%;
361
  }
362
- }
1
  /* Tab navigation */
2
+ #gadwp-events, #gadwp-custom, #gadwp-advanced, #gadwp-exclude,
3
+ #gadwp-config {
4
+ display: none;
5
  }
6
 
7
  /* Options pages */
36
  }
37
 
38
  .gadash-title {
39
+ float: left;
40
  margin-right: 10px;
41
  margin-top: 2px;
42
+ clear: left;
43
  }
44
 
45
  .gadash-desc {
51
  }
52
 
53
  pre.gadash {
54
+
55
  }
56
 
57
  pre.log_data {
190
  .gadash-pleft {
191
  width: 90%;
192
  float: left;
193
+ padding-left: 5px;
194
  }
195
 
196
  .gadash-pright {
197
  width: 5%;
198
  float: right;
199
+ padding-right: 5px;
200
  }
201
 
202
  #gadash-widget .realtime {
219
  width: 60%;
220
  padding: 33px 0;
221
  float: left;
222
+ text-align: center;
223
  }
224
 
225
  .gadash-tdo-right {
229
  font-weight: bold;
230
  vertical-align: middle;
231
  float: right;
232
+ display: table;
233
  }
234
 
235
  .gadash-online {
236
  font-size: 100px;
237
  font-weight: normal;
238
  line-height: 1em;
239
+ margin: 0 auto;
240
+ width: 80%;
241
  }
242
 
243
  .gadash-bigtext {
250
  -webkit-box-shadow: 0px 0px 3px 0px #BBB;
251
  box-shadow: 0px 0px 3px 0px #BBB;
252
  display: table;
253
+ overflow: hidden;
254
  }
255
 
256
+ .gadash-bleft {
257
+ float: left;
258
+ width: 80%;
259
  }
260
 
261
+ .gadash-bright {
262
+ float: right;
263
+ width: 20%;
264
  }
265
 
266
  .gadash-pgdetailsr {
272
  min-width: 250px;
273
  }
274
 
275
+ #gadash-mainchart {
276
  width: 98%;
277
+ height: 100%;
278
  margin: 10px auto 10px 0;
279
  height: 250px;
280
  }
281
 
282
+ .gadash-floatwraper {
283
+ display: table;
284
+ width: 100%;
285
+ height: 100%;
286
  }
287
 
288
+ #gadash-trafficmediums, #gadash-traffictype, #gadash-socialnetworks,
289
+ #gadash-trafficorganic {
290
+ width: 47%;
291
+ margin: 10px 0 0 0;
292
  height: 200px;
293
  }
294
 
295
+ #gadash-trafficmediums, #gadash-trafficorganic {
296
+ float: left;
297
  }
298
+
299
+ #gadash-traffictype, #gadash-socialnetworks {
300
+ float: right;
301
  }
302
+
303
+ #gadash-map, #gadash-prs {
304
  width: 98%;
305
+ height: 100%;
306
  margin: 10px auto 10px 0;
307
  }
308
 
317
  }
318
 
319
  /* Admin Widget content */
320
+ #gadash-progressbar {
321
+ width: 100%;
322
+ height: 3px;
323
+ margin: 5px 0 0px 0;
 
324
  }
325
 
326
  .gadash-wrapper {
360
  .gadash-wrapper .inside .small-box {
361
  width: 45%;
362
  }
363
+ }
admin/dashboard_widgets.php CHANGED
@@ -7,297 +7,271 @@
7
  */
8
  if (! class_exists('GADASH_Widgets')) {
9
 
10
- class GADASH_Widgets
11
- {
12
 
13
- function __construct()
14
- {
15
- global $GADASH_Config;
16
- add_action('wp_dashboard_setup', array(
17
- $this,
18
- 'ga_dash_setup'
19
- ));
20
- // Admin Styles
21
- add_action('admin_enqueue_scripts', array(
22
- $this,
23
- 'ga_dash_admin_enqueue_styles'
24
- ));
25
- // Admin Menu
26
- add_action('admin_menu', array(
27
- $this,
28
- 'ga_dash_admin_actions'
29
- ));
30
- // Network Menu
31
- add_action('network_admin_menu', array(
32
- $this,
33
- 'ga_dash_network_actions'
34
- ));
35
- // Plugin Settings link
36
- add_filter("plugin_action_links_" . plugin_basename($GADASH_Config->plugin_path) . '/gadwp.php', array(
37
- $this,
38
- 'ga_dash_settings_link'
39
- ));
40
- // Add error bubble
41
- add_action('admin_print_scripts', array(
42
- $this,
43
- 'draw_error_bubble'
44
- ), 10000);
45
- }
46
 
47
- function draw_error_bubble()
48
- {
49
- $bubble_msg = '!';
50
- if (get_transient('ga_dash_gapi_errors')) {
51
- ?>
52
- <script type="text/javascript">
53
  jQuery(document).ready(function() {
54
  jQuery('#toplevel_page_gadash_settings li > a[href*="page=gadash_errors_debugging"]').append('&nbsp;<span class="awaiting-mod count-1"><span class="pending-count" style="padding:0 7px;"><?php echo $bubble_msg ?></span></span>');
55
  });
56
  </script>
57
- <?php
58
- }
59
- }
60
-
61
- function ga_dash_admin_actions()
62
- {
63
- global $GADASH_Config;
64
- global $wp_version;
65
-
66
- if (current_user_can('manage_options')) {
67
- include ($GADASH_Config->plugin_path . '/admin/ga_dash_settings.php');
68
-
69
- add_menu_page(__("Google Analytics", 'ga-dash'), __("Google Analytics", 'ga-dash'), 'manage_options', 'gadash_settings', array(
70
- 'GADASH_Settings',
71
- 'general_settings'
72
- ), version_compare($wp_version, '3.8.0', '>=') ? 'dashicons-chart-area' : $GADASH_Config->plugin_url . '/admin/images/gadash-icon.png');
73
- add_submenu_page('gadash_settings', __("General Settings", 'ga-dash'), __("General Settings", 'ga-dash'), 'manage_options', 'gadash_settings', array(
74
- 'GADASH_Settings',
75
- 'general_settings'
76
- ));
77
- add_submenu_page('gadash_settings', __("Backend Settings", 'ga-dash'), __("Backend Settings", 'ga-dash'), 'manage_options', 'gadash_backend_settings', array(
78
- 'GADASH_Settings',
79
- 'backend_settings'
80
- ));
81
- add_submenu_page('gadash_settings', __("Frontend Settings", 'ga-dash'), __("Frontend Settings", 'ga-dash'), 'manage_options', 'gadash_frontend_settings', array(
82
- 'GADASH_Settings',
83
- 'frontend_settings'
84
- ));
85
- add_submenu_page('gadash_settings', __("Tracking Code", 'ga-dash'), __("Tracking Code", 'ga-dash'), 'manage_options', 'gadash_tracking_settings', array(
86
- 'GADASH_Settings',
87
- 'tracking_settings'
88
- ));
89
- add_submenu_page('gadash_settings', __("Errors & Debug", 'ga-dash'), __("Errors & Debug", 'ga-dash'), 'manage_options', 'gadash_errors_debugging', array(
90
- 'GADASH_Settings',
91
- 'errors_debugging'
92
- ));
93
- }
94
- }
95
 
96
- function ga_dash_network_actions()
97
- {
98
- global $GADASH_Config;
99
- global $wp_version;
100
-
101
- if (current_user_can('manage_netwrok')) {
102
- include ($GADASH_Config->plugin_path . '/admin/ga_dash_settings.php');
103
-
104
- add_menu_page(__("Google Analytics", 'ga-dash'), __("Google Analytics", 'ga-dash'), 'manage_netwrok', 'gadash_settings', array(
105
- 'GADASH_Settings',
106
- 'general_settings_network'
107
- ), version_compare($wp_version, '3.8.0', '>=') ? 'dashicons-chart-area' : $GADASH_Config->plugin_url . '/admin/images/gadash-icon.png');
108
- add_submenu_page('gadash_settings', __("General Settings", 'ga-dash'), __("General Settings", 'ga-dash'), 'manage_netwrok', 'gadash_settings', array(
109
- 'GADASH_Settings',
110
- 'general_settings_network'
111
- ));
112
- add_submenu_page('gadash_settings', __("Errors & Debug", 'ga-dash'), __("Errors & Debug", 'ga-dash'), 'manage_network', 'gadash_errors_debugging', array(
113
- 'GADASH_Settings',
114
- 'errors_debugging'
115
- ));
116
- }
117
- }
 
 
 
 
 
 
 
 
 
 
118
 
119
- /*
120
- * Include styles
121
- */
122
- function ga_dash_admin_enqueue_styles($hook)
123
- {
124
- global $GADASH_Config;
125
- $valid_hooks = array(
126
- 'toplevel_page_gadash_settings',
127
- 'google-analytics_page_gadash_backend_settings',
128
- 'google-analytics_page_gadash_frontend_settings',
129
- 'google-analytics_page_gadash_tracking_settings',
130
- 'google-analytics_page_gadash_errors_debugging'
131
- );
132
-
133
- if (! in_array($hook, $valid_hooks) and 'index.php' != $hook)
134
- return;
135
-
136
- wp_enqueue_style('ga_dash-nprogress', $GADASH_Config->plugin_url . '/tools/nprogress/nprogress.css', NULL, GADWP_CURRENT_VERSION);
137
-
138
- wp_register_style('ga_dash', $GADASH_Config->plugin_url . '/admin/css/ga_dash.css', NULL, GADWP_CURRENT_VERSION);
139
-
140
- wp_enqueue_style('ga_dash');
141
- wp_enqueue_style('wp-color-picker');
142
- wp_enqueue_script('wp-color-picker');
143
- wp_enqueue_script('wp-color-picker-script-handle', plugins_url('js/wp-color-picker-script.js', __FILE__), array(
144
- 'wp-color-picker'
145
- ), false, true);
146
- wp_enqueue_script('gadash-general-settings', plugins_url('js/admin.js', __FILE__), array(
147
- 'jquery'
148
- ), GADWP_CURRENT_VERSION);
149
- if (! wp_script_is('googlejsapi')) {
150
- wp_register_script('googlejsapi', 'https://www.google.com/jsapi');
151
- wp_enqueue_script('googlejsapi');
152
- }
153
- wp_enqueue_script('ga_dash-nprogress', $GADASH_Config->plugin_url . '/tools/nprogress/nprogress.js', array(
154
- 'jquery'
155
- ), GADWP_CURRENT_VERSION);
156
- }
157
 
158
- function ga_dash_settings_link($links)
159
- {
160
- $settings_link = '<a href="' . get_admin_url(null, 'admin.php?page=gadash_settings') . '">' . __("Settings", 'ga-dash') . '</a>';
161
- array_unshift($links, $settings_link);
162
- return $links;
163
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
 
165
- function ga_dash_setup()
166
- {
167
- global $GADASH_Config;
168
-
169
- /*
170
- * Include Tools
171
- */
172
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
173
- $tools = new GADASH_Tools();
174
-
175
- if ($tools->check_roles($GADASH_Config->options['ga_dash_access_back'])) {
176
- wp_add_dashboard_widget('gadash-widget', __("Google Analytics Dashboard", 'ga-dash'), array(
177
- $this,
178
- 'gadash_dashboard_widgets'
179
- ), $control_callback = null);
180
- }
181
- }
182
 
183
- function gadash_dashboard_widgets()
184
- {
185
- global $GADASH_Config;
 
 
 
 
 
 
 
 
 
 
 
 
186
 
187
- /*
188
- * Include GAPI
189
- */
190
- if ($GADASH_Config->options['ga_dash_token']) {
191
- include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
192
- global $GADASH_GAPI;
193
- } else {
194
- echo '<p>' . __("This plugin needs an authorization:", 'ga-dash') . '</p><form action="' . menu_page_url('gadash_settings', false) . '" method="POST">' . get_submit_button(__("Authorize Plugin", 'ga-dash'), 'secondary') . '</form>';
195
- return;
196
- }
197
-
198
- /*
199
- * Include Tools
200
- */
201
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
202
- $tools = new GADASH_Tools();
203
-
204
- $tools->ga_dash_cleanup_timeouts();
205
-
206
- if (current_user_can('manage_options')) {
207
-
208
- if (isset($_REQUEST['ga_dash_profile_select'])) {
209
- $GADASH_Config->options['ga_dash_tableid'] = $_REQUEST['ga_dash_profile_select'];
210
- }
211
-
212
- $profiles = $GADASH_Config->options['ga_dash_profile_list'];
213
- $profile_switch = '';
214
-
215
- if (is_array($profiles)) {
216
- if (! $GADASH_Config->options['ga_dash_tableid']) {
217
- if ($GADASH_Config->options['ga_dash_tableid_jail']) {
218
- $GADASH_Config->options['ga_dash_tableid'] = $GADASH_Config->options['ga_dash_tableid_jail'];
219
- } else {
220
- $GADASH_Config->options['ga_dash_tableid'] = $tools->guess_default_domain($profiles);
221
- }
222
- } else
223
- if ($GADASH_Config->options['ga_dash_jailadmins'] and $GADASH_Config->options['ga_dash_tableid_jail']) {
224
- $GADASH_Config->options['ga_dash_tableid'] = $GADASH_Config->options['ga_dash_tableid_jail'];
225
- }
226
-
227
- $profile_switch .= '<select id="ga_dash_profile_select" name="ga_dash_profile_select" onchange="this.form.submit()">';
228
- foreach ($profiles as $profile) {
229
- if (! $GADASH_Config->options['ga_dash_tableid']) {
230
- $GADASH_Config->options['ga_dash_tableid'] = $profile[1];
231
- }
232
- if (isset($profile[3])) {
233
- $profile_switch .= '<option value="' . esc_attr($profile[1]) . '" ';
234
- $profile_switch .= selected($profile[1], $GADASH_Config->options['ga_dash_tableid'], false);
235
- $profile_switch .= ' title="' . __("View Name:", 'ga-dash') . ' ' . esc_attr($profile[0]) . '">' . esc_attr($tools->ga_dash_get_profile_domain($profile[3])) . '</option>';
236
- }
237
- }
238
- $profile_switch .= "</select>";
239
- } else {
240
- echo '<p>' . __("Something went wrong while retrieving profiles list.", 'ga-dash') . '</p><form action="' . menu_page_url('gadash_settings', false) . '" method="POST">' . get_submit_button(__("More details", 'ga-dash'), 'secondary') . '</form>';
241
- return;
242
- }
243
- }
244
-
245
- $GADASH_Config->set_plugin_options();
246
-
247
- ?>
248
- <form id="ga-dash" method="POST">
249
- <?php
250
-
251
- if (current_user_can('manage_options')) {
252
- if ($GADASH_Config->options['ga_dash_jailadmins']) {
253
- if ($GADASH_Config->options['ga_dash_tableid_jail']) {
254
- $projectId = $GADASH_Config->options['ga_dash_tableid_jail'];
255
- } else {
256
- echo '<p>' . __("An admin should asign a default Google Analytics Profile.", 'ga-dash') . '</p><form action="' . menu_page_url('gadash_settings', false) . '" method="POST">' . get_submit_button(__("Select Domain", 'ga-dash'), 'secondary') . '</form>';
257
- return;
258
- }
259
- } else {
260
- echo $profile_switch;
261
- $projectId = $GADASH_Config->options['ga_dash_tableid'];
262
- }
263
  } else {
264
- if ($GADASH_Config->options['ga_dash_tableid_jail']) {
265
- $projectId = $GADASH_Config->options['ga_dash_tableid_jail'];
266
- } else {
267
- echo '<p>' . __("An admin should asign a default Google Analytics Profile.", 'ga-dash') . '</p><form action="' . menu_page_url('gadash_settings', false) . '" method="POST">' . get_submit_button(__("Select Domain", 'ga-dash'), 'secondary') . '</form>';
268
- return;
269
- }
270
  }
271
-
272
- if (! ($projectId)) {
273
- echo '<p>' . __("Something went wrong while retrieving property data. You need to create and properly configure a Google Analytics account:", 'ga-dash') . '</p> <form action="https://deconf.com/how-to-set-up-google-analytics-on-your-website/" method="POST">' . get_submit_button(__("Find out more!", 'ga-dash'), 'secondary') . '</form>';
274
- return;
275
- } else {
276
- $profile_info = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $projectId);
277
- if (isset($profile_info[4])) {
278
- $GADASH_GAPI->timeshift = $profile_info[4];
279
- } else {
280
- $GADASH_GAPI->timeshift = (int) current_time('timestamp') - time();
281
- }
282
  }
283
-
284
- if (isset($_REQUEST['query'])) {
285
- $query = $_REQUEST['query'];
286
- $GADASH_Config->options['ga_dash_default_metric'] = $query;
287
- $GADASH_Config->set_plugin_options();
288
- } else {
289
- $query = isset($GADASH_Config->options['ga_dash_default_metric']) ? $GADASH_Config->options['ga_dash_default_metric'] : 'sessions';
290
  }
291
-
292
- if (isset($_REQUEST['period'])) {
293
- $period = $_REQUEST['period'];
294
- $GADASH_Config->options['ga_dash_default_dimension'] = $period;
295
- $GADASH_Config->set_plugin_options();
296
- } else {
297
- $period = isset($GADASH_Config->options['ga_dash_default_dimension']) ? $GADASH_Config->options['ga_dash_default_dimension'] : '30daysAgo';
298
  }
299
-
300
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
 
302
  <select id="ga_dash_period" name="period" onchange="this.form.submit()">
303
  <option value="realtime"
@@ -341,99 +315,85 @@ if (! class_exists('GADASH_Widgets')) {
341
  </form>
342
  <div id="gadash-progressbar"></div>
343
  <?php
344
- switch ($period) {
345
-
346
- case 'today':
347
- $from = 'today';
348
- $to = 'today';
349
- $haxis = 4;
350
- break;
351
-
352
- case 'yesterday':
353
- $from = 'yesterday';
354
- $to = 'yesterday';
355
- $haxis = 4;
356
- break;
357
-
358
- case '7daysAgo':
359
- $from = '7daysAgo';
360
- $to = 'yesterday';
361
- $haxis = 2;
362
- break;
363
-
364
- case '14daysAgo':
365
- $from = '14daysAgo';
366
- $to = 'yesterday';
367
- $haxis = 3;
368
- break;
369
-
370
- case '30daysAgo':
371
- $from = '30daysAgo';
372
- $to = 'yesterday';
373
- $haxis = 5;
374
- break;
375
-
376
- default:
377
- $from = '90daysAgo';
378
- $to = 'yesterday';
379
- $haxis = 16;
380
- break;
381
- }
382
-
383
- if ($query == 'visitBounceRate') {
384
- $formater = "var formatter = new google.visualization.NumberFormat({
385
  pattern: '#,##%',
386
  fractionDigits: 2
387
  });
388
 
389
  formatter.format(data, 1); ";
390
- } else {
391
- $formater = '';
392
- }
393
-
394
- /*
395
- * Include Tools
396
- */
397
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
398
- $tools = new GADASH_Tools();
399
-
400
- if (isset($GADASH_Config->options['ga_dash_style'])) {
401
- $light_color = $tools->colourVariator($GADASH_Config->options['ga_dash_style'], 40);
402
- $dark_color = $tools->colourVariator($GADASH_Config->options['ga_dash_style'], - 20);
403
- $css = "colors:['" . $GADASH_Config->options['ga_dash_style'] . "','" . $tools->colourVariator($GADASH_Config->options['ga_dash_style'], - 20) . "'],";
404
- $color = $GADASH_Config->options['ga_dash_style'];
405
- } else {
406
- $css = "";
407
- $color = "#3366CC";
408
- }
409
-
410
- if ($period == 'realtime') {
411
-
412
- wp_register_style('jquery-ui-tooltip-html', $GADASH_Config->plugin_url . '/realtime/jquery/jquery.ui.tooltip.html.css');
413
- wp_enqueue_style('jquery-ui-tooltip-html');
414
-
415
- if (! wp_script_is('jquery')) {
416
- wp_enqueue_script('jquery');
417
- }
418
- if (! wp_script_is('jquery-ui-tooltip')) {
419
- wp_enqueue_script("jquery-ui-tooltip");
420
- }
421
- if (! wp_script_is('jquery-ui-core')) {
422
- wp_enqueue_script("jquery-ui-core");
423
- }
424
- if (! wp_script_is('jquery-ui-position')) {
425
- wp_enqueue_script("jquery-ui-position");
426
- }
427
- if (! wp_script_is('jquery-ui-position')) {
428
- wp_enqueue_script("jquery-ui-position");
429
- }
430
-
431
- wp_register_script("jquery-ui-tooltip-html", $GADASH_Config->plugin_url . '/realtime/jquery/jquery.ui.tooltip.html.js');
432
- wp_enqueue_script("jquery-ui-tooltip-html");
433
- }
434
-
435
- if ($period == 'realtime') {
436
- ?>
437
  <div class="realtime">
438
  <div class="gadash-rt-box">
439
  <div class='gadash-tdo-left'>
@@ -719,7 +679,7 @@ if (! class_exists('GADASH_Widgets')) {
719
  NProgress.configure({ showSpinner: false });
720
  NProgress.start();
721
  } catch(e) {
722
- jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border":"1px solid red","border-left":"5px solid red"});
723
  jQuery("#gadash-progressbar").html("<?php _e("A JavaScript Error is blocking plugin resources!", 'ga-dash'); ?>");
724
  }
725
  npcounter = 0;
@@ -727,8 +687,15 @@ if (! class_exists('GADASH_Widgets')) {
727
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "<?php echo $query; ?>",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
728
 
729
  if (!jQuery.isNumeric(response)){
 
730
  gadash_prs=jQuery.parseJSON(response);
731
- google.setOnLoadCallback(ga_dash_drawprs(gadash_prs));
 
 
 
 
 
 
732
  }else{
733
  jQuery("#gadash-prs").css({"background-color":"#F7F7F7","height":"auto","padding-top":"125px","padding-bottom":"125px","color":"#000","text-align":"center"});
734
  jQuery("#gadash-prs").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
@@ -739,8 +706,15 @@ if (! class_exists('GADASH_Widgets')) {
739
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "trafficchannels",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
740
 
741
  if (!jQuery.isNumeric(response)){
742
- gadash_trafficchannels=jQuery.parseJSON(response);
743
- google.setOnLoadCallback(ga_dash_drawtrafficchannels(gadash_trafficchannels));
 
 
 
 
 
 
 
744
  }else{
745
  jQuery("#gadash-trafficchannels").css({"background-color":"#F7F7F7","height":"auto","padding-top":"125px","padding-bottom":"125px","color":"#000","text-align":"center"});
746
  jQuery("#gadash-trafficchannels").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
@@ -802,7 +776,7 @@ if (! class_exists('GADASH_Widgets')) {
802
  NProgress.configure({ showSpinner: false });
803
  NProgress.start();
804
  } catch(e) {
805
- jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border":"1px solid red","border-left":"5px solid red"});
806
  jQuery("#gadash-progressbar").html("<?php _e("A JavaScript Error is blocking plugin resources!", 'ga-dash'); ?>");
807
  }
808
  npcounter = 0;
@@ -810,8 +784,15 @@ if (! class_exists('GADASH_Widgets')) {
810
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "medium",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
811
 
812
  if (!jQuery.isNumeric(response)){
813
- gadash_trafficmediums=jQuery.parseJSON(response);
814
- google.setOnLoadCallback(ga_dash_drawtrafficmediums(gadash_trafficmediums));
 
 
 
 
 
 
 
815
  }else{
816
  jQuery("#gadash-trafficmediums").css({"background-color":"#F7F7F7","height":"auto","padding-top":"80px","padding-bottom":"80px","color":"#000","text-align":"center"});
817
  jQuery("#gadash-trafficmediums").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
@@ -834,8 +815,15 @@ if (! class_exists('GADASH_Widgets')) {
834
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "trafficchannels",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
835
 
836
  if (!jQuery.isNumeric(response)){
837
- gadash_trafficchannels=jQuery.parseJSON(response);
838
- google.setOnLoadCallback(ga_dash_drawtrafficchannels(gadash_trafficchannels));
 
 
 
 
 
 
 
839
  }else{
840
  jQuery("#gadash-trafficchannels").css({"background-color":"#F7F7F7","height":"auto","padding-top":"125px","padding-bottom":"125px","color":"#000","text-align":"center"});
841
  jQuery("#gadash-trafficchannels").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
@@ -846,8 +834,15 @@ if (! class_exists('GADASH_Widgets')) {
846
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "socialNetwork",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
847
 
848
  if (!jQuery.isNumeric(response)){
849
- gadash_socialnetworks=jQuery.parseJSON(response);
850
- google.setOnLoadCallback(ga_dash_drawsocialnetworks(gadash_socialnetworks));
 
 
 
 
 
 
 
851
  }else{
852
  jQuery("#gadash-socialnetworks").css({"background-color":"#F7F7F7","height":"auto","padding-top":"80px","padding-bottom":"80px","color":"#000","text-align":"center"});
853
  jQuery("#gadash-socialnetworks").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
@@ -859,8 +854,15 @@ if (! class_exists('GADASH_Widgets')) {
859
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "source",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
860
 
861
  if (!jQuery.isNumeric(response)){
862
- gadash_trafficorganic=jQuery.parseJSON(response);
863
- google.setOnLoadCallback(ga_dash_drawtrafficorganic(gadash_trafficorganic));
 
 
 
 
 
 
 
864
  }else{
865
  jQuery("#gadash-trafficorganic").css({"background-color":"#F7F7F7","height":"auto","padding-top":"80px","padding-bottom":"80px","color":"#000","text-align":"center"});
866
  jQuery("#gadash-trafficorganic").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
@@ -966,7 +968,7 @@ if (! class_exists('GADASH_Widgets')) {
966
  NProgress.configure({ showSpinner: false });
967
  NProgress.start();
968
  } catch(e) {
969
- jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border":"1px solid red","border-left":"5px solid red"});
970
  jQuery("#gadash-progressbar").html("<?php _e("A JavaScript Error is blocking plugin resources!", 'ga-dash'); ?>");
971
  }
972
  npcounter = 0;
@@ -974,9 +976,16 @@ if (! class_exists('GADASH_Widgets')) {
974
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "<?php echo $query; ?>",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
975
 
976
  if (!jQuery.isNumeric(response)){
977
- gadash_locations=jQuery.parseJSON(response);
978
- google.setOnLoadCallback(ga_dash_drawmaplocations(gadash_locations));
979
- google.setOnLoadCallback(ga_dash_drawlocations(gadash_locations));
 
 
 
 
 
 
 
980
  }else{
981
  jQuery("#gadash-map").css({"background-color":"#F7F7F7","height":"auto","padding-top":"125px","padding-bottom":"125px","color":"#000","text-align":"center"});
982
  jQuery("#gadash-map").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
@@ -994,9 +1003,9 @@ if (! class_exists('GADASH_Widgets')) {
994
  chartArea: {width: '99%',height: '90%'},
995
  colors: ['<?php echo $light_color; ?>', '<?php echo $dark_color; ?>'],
996
  <?php
997
- $GADASH_GAPI->getcountrycodes();
998
- if ($GADASH_Config->options['ga_target_geomap'] and isset($GADASH_GAPI->country_codes[$GADASH_Config->options['ga_target_geomap']])) {
999
- ?>
1000
  region : '<?php echo esc_html($GADASH_Config->options ['ga_target_geomap']); ?>',
1001
  displayMode : 'markers',
1002
  datalessRegionColor : 'EFEFEF'
@@ -1070,7 +1079,7 @@ if (! class_exists('GADASH_Widgets')) {
1070
  NProgress.configure({ showSpinner: false });
1071
  NProgress.start();
1072
  } catch(e) {
1073
- jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border":"1px solid red","border-left":"5px solid red"});
1074
  jQuery("#gadash-progressbar").html("<?php _e("A JavaScript Error is blocking plugin resources!", 'ga-dash'); ?>");
1075
  }
1076
  npcounter = 0;
@@ -1078,8 +1087,15 @@ if (! class_exists('GADASH_Widgets')) {
1078
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "<?php echo $query; ?>",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
1079
 
1080
  if (!jQuery.isNumeric(response)){
1081
- gadash_mainchart=jQuery.parseJSON(response);
1082
- google.setOnLoadCallback(ga_dash_drawmainchart(gadash_mainchart));
 
 
 
 
 
 
 
1083
  }else{
1084
  jQuery("#gadash-mainchart").css({"background-color":"#F7F7F7","height":"auto","padding-top":"125px","padding-bottom":"125px","color":"#000","text-align":"center"});
1085
  jQuery("#gadash-mainchart").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
@@ -1090,8 +1106,15 @@ if (! class_exists('GADASH_Widgets')) {
1090
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "bottomstats",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
1091
 
1092
  if (!jQuery.isNumeric(response)){
1093
- gadash_bottomstats=jQuery.parseJSON(response);
1094
- ga_dash_drawbottomstats(gadash_bottomstats);
 
 
 
 
 
 
 
1095
  }else{
1096
  jQuery("#gadash-bottomstats").css({"background-color":"#F7F7F7","height":"auto","padding-top":"40px","padding-bottom":"40px","color":"#000","text-align":"center","width": "98%"});
1097
  jQuery("#gadash-bottomstats").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
@@ -1127,11 +1150,10 @@ if (! class_exists('GADASH_Widgets')) {
1127
  };
1128
  </script>
1129
  <?php
1130
- }
1131
- }
1132
  }
 
1133
  }
1134
-
1135
  if (is_admin()) {
1136
- $GADASH_Widgets = new GADASH_Widgets();
1137
  }
7
  */
8
  if (! class_exists('GADASH_Widgets')) {
9
 
10
+ class GADASH_Widgets
11
+ {
12
 
13
+ function __construct()
14
+ {
15
+ global $GADASH_Config;
16
+ add_action('wp_dashboard_setup', array(
17
+ $this,
18
+ 'ga_dash_setup'
19
+ ));
20
+ // Admin Styles
21
+ add_action('admin_enqueue_scripts', array(
22
+ $this,
23
+ 'ga_dash_admin_enqueue_styles'
24
+ ));
25
+ // Admin Menu
26
+ add_action('admin_menu', array(
27
+ $this,
28
+ 'ga_dash_admin_actions'
29
+ ));
30
+ // Network Menu
31
+ add_action('network_admin_menu', array(
32
+ $this,
33
+ 'ga_dash_network_actions'
34
+ ));
35
+ // Plugin Settings link
36
+ add_filter("plugin_action_links_" . plugin_basename($GADASH_Config->plugin_path) . '/gadwp.php', array(
37
+ $this,
38
+ 'ga_dash_settings_link'
39
+ ));
40
+ // Add error bubble
41
+ add_action('admin_print_scripts', array(
42
+ $this,
43
+ 'draw_error_bubble'
44
+ ), 10000);
45
+ }
46
 
47
+ function draw_error_bubble()
48
+ {
49
+ $bubble_msg = '!';
50
+ if (get_transient('ga_dash_gapi_errors')) {
51
+ ?>
52
+ <script type="text/javascript">
53
  jQuery(document).ready(function() {
54
  jQuery('#toplevel_page_gadash_settings li > a[href*="page=gadash_errors_debugging"]').append('&nbsp;<span class="awaiting-mod count-1"><span class="pending-count" style="padding:0 7px;"><?php echo $bubble_msg ?></span></span>');
55
  });
56
  </script>
57
+ <?php
58
+ }
59
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
+ function ga_dash_admin_actions()
62
+ {
63
+ global $GADASH_Config;
64
+ global $wp_version;
65
+ if (current_user_can('manage_options')) {
66
+ include ($GADASH_Config->plugin_path . '/admin/ga_dash_settings.php');
67
+ add_menu_page(__("Google Analytics", 'ga-dash'), __("Google Analytics", 'ga-dash'), 'manage_options', 'gadash_settings', array(
68
+ 'GADASH_Settings',
69
+ 'general_settings'
70
+ ), version_compare($wp_version, '3.8.0', '>=') ? 'dashicons-chart-area' : $GADASH_Config->plugin_url . '/admin/images/gadash-icon.png');
71
+ add_submenu_page('gadash_settings', __("General Settings", 'ga-dash'), __("General Settings", 'ga-dash'), 'manage_options', 'gadash_settings', array(
72
+ 'GADASH_Settings',
73
+ 'general_settings'
74
+ ));
75
+ add_submenu_page('gadash_settings', __("Backend Settings", 'ga-dash'), __("Backend Settings", 'ga-dash'), 'manage_options', 'gadash_backend_settings', array(
76
+ 'GADASH_Settings',
77
+ 'backend_settings'
78
+ ));
79
+ add_submenu_page('gadash_settings', __("Frontend Settings", 'ga-dash'), __("Frontend Settings", 'ga-dash'), 'manage_options', 'gadash_frontend_settings', array(
80
+ 'GADASH_Settings',
81
+ 'frontend_settings'
82
+ ));
83
+ add_submenu_page('gadash_settings', __("Tracking Code", 'ga-dash'), __("Tracking Code", 'ga-dash'), 'manage_options', 'gadash_tracking_settings', array(
84
+ 'GADASH_Settings',
85
+ 'tracking_settings'
86
+ ));
87
+ add_submenu_page('gadash_settings', __("Errors & Debug", 'ga-dash'), __("Errors & Debug", 'ga-dash'), 'manage_options', 'gadash_errors_debugging', array(
88
+ 'GADASH_Settings',
89
+ 'errors_debugging'
90
+ ));
91
+ }
92
+ }
93
 
94
+ function ga_dash_network_actions()
95
+ {
96
+ global $GADASH_Config;
97
+ global $wp_version;
98
+ if (current_user_can('manage_netwrok')) {
99
+ include ($GADASH_Config->plugin_path . '/admin/ga_dash_settings.php');
100
+ add_menu_page(__("Google Analytics", 'ga-dash'), __("Google Analytics", 'ga-dash'), 'manage_netwrok', 'gadash_settings', array(
101
+ 'GADASH_Settings',
102
+ 'general_settings_network'
103
+ ), version_compare($wp_version, '3.8.0', '>=') ? 'dashicons-chart-area' : $GADASH_Config->plugin_url . '/admin/images/gadash-icon.png');
104
+ add_submenu_page('gadash_settings', __("General Settings", 'ga-dash'), __("General Settings", 'ga-dash'), 'manage_netwrok', 'gadash_settings', array(
105
+ 'GADASH_Settings',
106
+ 'general_settings_network'
107
+ ));
108
+ add_submenu_page('gadash_settings', __("Errors & Debug", 'ga-dash'), __("Errors & Debug", 'ga-dash'), 'manage_network', 'gadash_errors_debugging', array(
109
+ 'GADASH_Settings',
110
+ 'errors_debugging'
111
+ ));
112
+ }
113
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
+ /*
116
+ * Include styles
117
+ */
118
+ function ga_dash_admin_enqueue_styles($hook)
119
+ {
120
+ global $GADASH_Config;
121
+ $valid_hooks = array(
122
+ 'toplevel_page_gadash_settings',
123
+ 'google-analytics_page_gadash_backend_settings',
124
+ 'google-analytics_page_gadash_frontend_settings',
125
+ 'google-analytics_page_gadash_tracking_settings',
126
+ 'google-analytics_page_gadash_errors_debugging'
127
+ );
128
+ if (! in_array($hook, $valid_hooks) and 'index.php' != $hook)
129
+ return;
130
+ wp_enqueue_style('ga_dash-nprogress', $GADASH_Config->plugin_url . '/tools/nprogress/nprogress.css', NULL, GADWP_CURRENT_VERSION);
131
+ wp_register_style('ga_dash', $GADASH_Config->plugin_url . '/admin/css/ga_dash.css', NULL, GADWP_CURRENT_VERSION);
132
+ wp_enqueue_style('ga_dash');
133
+ wp_enqueue_style('wp-color-picker');
134
+ wp_enqueue_script('wp-color-picker');
135
+ wp_enqueue_script('wp-color-picker-script-handle', plugins_url('js/wp-color-picker-script.js', __FILE__), array(
136
+ 'wp-color-picker'
137
+ ), false, true);
138
+ wp_enqueue_script('gadash-general-settings', plugins_url('js/admin.js', __FILE__), array(
139
+ 'jquery'
140
+ ), GADWP_CURRENT_VERSION);
141
+ if (! wp_script_is('googlejsapi')) {
142
+ wp_register_script('googlejsapi', 'https://www.google.com/jsapi');
143
+ wp_enqueue_script('googlejsapi');
144
+ }
145
+ wp_enqueue_script('ga_dash-nprogress', $GADASH_Config->plugin_url . '/tools/nprogress/nprogress.js', array(
146
+ 'jquery'
147
+ ), GADWP_CURRENT_VERSION);
148
+ }
149
 
150
+ function ga_dash_settings_link($links)
151
+ {
152
+ $settings_link = '<a href="' . get_admin_url(null, 'admin.php?page=gadash_settings') . '">' . __("Settings", 'ga-dash') . '</a>';
153
+ array_unshift($links, $settings_link);
154
+ return $links;
155
+ }
 
 
 
 
 
 
 
 
 
 
 
156
 
157
+ function ga_dash_setup()
158
+ {
159
+ global $GADASH_Config;
160
+ /*
161
+ * Include Tools
162
+ */
163
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
164
+ $tools = new GADASH_Tools();
165
+ if ($tools->check_roles($GADASH_Config->options['ga_dash_access_back'])) {
166
+ wp_add_dashboard_widget('gadash-widget', __("Google Analytics Dashboard", 'ga-dash'), array(
167
+ $this,
168
+ 'gadash_dashboard_widgets'
169
+ ), $control_callback = null);
170
+ }
171
+ }
172
 
173
+ function gadash_dashboard_widgets()
174
+ {
175
+ global $GADASH_Config;
176
+ /*
177
+ * Include GAPI
178
+ */
179
+ if ($GADASH_Config->options['ga_dash_token']) {
180
+ include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
181
+ global $GADASH_GAPI;
182
+ } else {
183
+ echo '<p>' . __("This plugin needs an authorization:", 'ga-dash') . '</p><form action="' . menu_page_url('gadash_settings', false) . '" method="POST">' . get_submit_button(__("Authorize Plugin", 'ga-dash'), 'secondary') . '</form>';
184
+ return;
185
+ }
186
+ /*
187
+ * Include Tools
188
+ */
189
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
190
+ $tools = new GADASH_Tools();
191
+ if (current_user_can('manage_options')) {
192
+ if (isset($_REQUEST['ga_dash_profile_select'])) {
193
+ $GADASH_Config->options['ga_dash_tableid'] = $_REQUEST['ga_dash_profile_select'];
194
+ }
195
+ $profiles = $GADASH_Config->options['ga_dash_profile_list'];
196
+ $profile_switch = '';
197
+ if (is_array($profiles)) {
198
+ if (! $GADASH_Config->options['ga_dash_tableid']) {
199
+ if ($GADASH_Config->options['ga_dash_tableid_jail']) {
200
+ $GADASH_Config->options['ga_dash_tableid'] = $GADASH_Config->options['ga_dash_tableid_jail'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  } else {
202
+ $GADASH_Config->options['ga_dash_tableid'] = $tools->guess_default_domain($profiles);
 
 
 
 
 
203
  }
204
+ } else
205
+ if ($GADASH_Config->options['ga_dash_jailadmins'] and $GADASH_Config->options['ga_dash_tableid_jail']) {
206
+ $GADASH_Config->options['ga_dash_tableid'] = $GADASH_Config->options['ga_dash_tableid_jail'];
 
 
 
 
 
 
 
 
207
  }
208
+ $profile_switch .= '<select id="ga_dash_profile_select" name="ga_dash_profile_select" onchange="this.form.submit()">';
209
+ foreach ($profiles as $profile) {
210
+ if (! $GADASH_Config->options['ga_dash_tableid']) {
211
+ $GADASH_Config->options['ga_dash_tableid'] = $profile[1];
 
 
 
212
  }
213
+ if (isset($profile[3])) {
214
+ $profile_switch .= '<option value="' . esc_attr($profile[1]) . '" ';
215
+ $profile_switch .= selected($profile[1], $GADASH_Config->options['ga_dash_tableid'], false);
216
+ $profile_switch .= ' title="' . __("View Name:", 'ga-dash') . ' ' . esc_attr($profile[0]) . '">' . esc_attr($tools->ga_dash_get_profile_domain($profile[3])) . '</option>';
 
 
 
217
  }
218
+ }
219
+ $profile_switch .= "</select>";
220
+ } else {
221
+ echo '<p>' . __("Something went wrong while retrieving profiles list.", 'ga-dash') . '</p><form action="' . menu_page_url('gadash_settings', false) . '" method="POST">' . get_submit_button(__("More details", 'ga-dash'), 'secondary') . '</form>';
222
+ return;
223
+ }
224
+ }
225
+ $GADASH_Config->set_plugin_options();
226
+ ?>
227
+ <form id="ga-dash" method="POST">
228
+ <?php
229
+ if (current_user_can('manage_options')) {
230
+ if ($GADASH_Config->options['ga_dash_jailadmins']) {
231
+ if ($GADASH_Config->options['ga_dash_tableid_jail']) {
232
+ $projectId = $GADASH_Config->options['ga_dash_tableid_jail'];
233
+ } else {
234
+ echo '<p>' . __("An admin should asign a default Google Analytics Profile.", 'ga-dash') . '</p><form action="' . menu_page_url('gadash_settings', false) . '" method="POST">' . get_submit_button(__("Select Domain", 'ga-dash'), 'secondary') . '</form>';
235
+ return;
236
+ }
237
+ } else {
238
+ echo $profile_switch;
239
+ $projectId = $GADASH_Config->options['ga_dash_tableid'];
240
+ }
241
+ } else {
242
+ if ($GADASH_Config->options['ga_dash_tableid_jail']) {
243
+ $projectId = $GADASH_Config->options['ga_dash_tableid_jail'];
244
+ } else {
245
+ echo '<p>' . __("An admin should asign a default Google Analytics Profile.", 'ga-dash') . '</p><form action="' . menu_page_url('gadash_settings', false) . '" method="POST">' . get_submit_button(__("Select Domain", 'ga-dash'), 'secondary') . '</form>';
246
+ return;
247
+ }
248
+ }
249
+ if (! ($projectId)) {
250
+ echo '<p>' . __("Something went wrong while retrieving property data. You need to create and properly configure a Google Analytics account:", 'ga-dash') . '</p> <form action="https://deconf.com/how-to-set-up-google-analytics-on-your-website/" method="POST">' . get_submit_button(__("Find out more!", 'ga-dash'), 'secondary') . '</form>';
251
+ return;
252
+ } else {
253
+ $profile_info = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $projectId);
254
+ if (isset($profile_info[4])) {
255
+ $GADASH_GAPI->timeshift = $profile_info[4];
256
+ } else {
257
+ $GADASH_GAPI->timeshift = (int) current_time('timestamp') - time();
258
+ }
259
+ }
260
+ if (isset($_REQUEST['query'])) {
261
+ $query = $_REQUEST['query'];
262
+ $GADASH_Config->options['ga_dash_default_metric'] = $query;
263
+ $GADASH_Config->set_plugin_options();
264
+ } else {
265
+ $query = isset($GADASH_Config->options['ga_dash_default_metric']) ? $GADASH_Config->options['ga_dash_default_metric'] : 'sessions';
266
+ }
267
+ if (isset($_REQUEST['period'])) {
268
+ $period = $_REQUEST['period'];
269
+ $GADASH_Config->options['ga_dash_default_dimension'] = $period;
270
+ $GADASH_Config->set_plugin_options();
271
+ } else {
272
+ $period = isset($GADASH_Config->options['ga_dash_default_dimension']) ? $GADASH_Config->options['ga_dash_default_dimension'] : '30daysAgo';
273
+ }
274
+ ?>
275
 
276
  <select id="ga_dash_period" name="period" onchange="this.form.submit()">
277
  <option value="realtime"
315
  </form>
316
  <div id="gadash-progressbar"></div>
317
  <?php
318
+ switch ($period) {
319
+ case 'today':
320
+ $from = 'today';
321
+ $to = 'today';
322
+ $haxis = 4;
323
+ break;
324
+ case 'yesterday':
325
+ $from = 'yesterday';
326
+ $to = 'yesterday';
327
+ $haxis = 4;
328
+ break;
329
+ case '7daysAgo':
330
+ $from = '7daysAgo';
331
+ $to = 'yesterday';
332
+ $haxis = 2;
333
+ break;
334
+ case '14daysAgo':
335
+ $from = '14daysAgo';
336
+ $to = 'yesterday';
337
+ $haxis = 3;
338
+ break;
339
+ case '30daysAgo':
340
+ $from = '30daysAgo';
341
+ $to = 'yesterday';
342
+ $haxis = 5;
343
+ break;
344
+ default:
345
+ $from = '90daysAgo';
346
+ $to = 'yesterday';
347
+ $haxis = 16;
348
+ break;
349
+ }
350
+ if ($query == 'visitBounceRate') {
351
+ $formater = "var formatter = new google.visualization.NumberFormat({
 
 
 
 
 
 
 
352
  pattern: '#,##%',
353
  fractionDigits: 2
354
  });
355
 
356
  formatter.format(data, 1); ";
357
+ } else {
358
+ $formater = '';
359
+ }
360
+ /*
361
+ * Include Tools
362
+ */
363
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
364
+ $tools = new GADASH_Tools();
365
+ if (isset($GADASH_Config->options['ga_dash_style'])) {
366
+ $light_color = $tools->colourVariator($GADASH_Config->options['ga_dash_style'], 40);
367
+ $dark_color = $tools->colourVariator($GADASH_Config->options['ga_dash_style'], - 20);
368
+ $css = "colors:['" . $GADASH_Config->options['ga_dash_style'] . "','" . $tools->colourVariator($GADASH_Config->options['ga_dash_style'], - 20) . "'],";
369
+ $color = $GADASH_Config->options['ga_dash_style'];
370
+ } else {
371
+ $css = "";
372
+ $color = "#3366CC";
373
+ }
374
+ if ($period == 'realtime') {
375
+ wp_register_style('jquery-ui-tooltip-html', $GADASH_Config->plugin_url . '/realtime/jquery/jquery.ui.tooltip.html.css');
376
+ wp_enqueue_style('jquery-ui-tooltip-html');
377
+ if (! wp_script_is('jquery')) {
378
+ wp_enqueue_script('jquery');
379
+ }
380
+ if (! wp_script_is('jquery-ui-tooltip')) {
381
+ wp_enqueue_script("jquery-ui-tooltip");
382
+ }
383
+ if (! wp_script_is('jquery-ui-core')) {
384
+ wp_enqueue_script("jquery-ui-core");
385
+ }
386
+ if (! wp_script_is('jquery-ui-position')) {
387
+ wp_enqueue_script("jquery-ui-position");
388
+ }
389
+ if (! wp_script_is('jquery-ui-position')) {
390
+ wp_enqueue_script("jquery-ui-position");
391
+ }
392
+ wp_register_script("jquery-ui-tooltip-html", $GADASH_Config->plugin_url . '/realtime/jquery/jquery.ui.tooltip.html.js');
393
+ wp_enqueue_script("jquery-ui-tooltip-html");
394
+ }
395
+ if ($period == 'realtime') {
396
+ ?>
 
 
 
 
 
 
 
397
  <div class="realtime">
398
  <div class="gadash-rt-box">
399
  <div class='gadash-tdo-left'>
679
  NProgress.configure({ showSpinner: false });
680
  NProgress.start();
681
  } catch(e) {
682
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
683
  jQuery("#gadash-progressbar").html("<?php _e("A JavaScript Error is blocking plugin resources!", 'ga-dash'); ?>");
684
  }
685
  npcounter = 0;
687
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "<?php echo $query; ?>",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
688
 
689
  if (!jQuery.isNumeric(response)){
690
+ try{
691
  gadash_prs=jQuery.parseJSON(response);
692
+ google.setOnLoadCallback(ga_dash_drawprs(gadash_prs));
693
+ } catch(e) {
694
+ checknpcounter(0);
695
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
696
+ jQuery("#gadash-progressbar").html("<?php _e("Invalid response, more details in JavaScript Console (F12).", 'ga-dash'); ?>");
697
+ console.log("\n********************* GADWP Log ********************* \n\n"+response);
698
+ }
699
  }else{
700
  jQuery("#gadash-prs").css({"background-color":"#F7F7F7","height":"auto","padding-top":"125px","padding-bottom":"125px","color":"#000","text-align":"center"});
701
  jQuery("#gadash-prs").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
706
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "trafficchannels",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
707
 
708
  if (!jQuery.isNumeric(response)){
709
+ try{
710
+ gadash_trafficchannels=jQuery.parseJSON(response);
711
+ google.setOnLoadCallback(ga_dash_drawtrafficchannels(gadash_trafficchannels));
712
+ } catch(e) {
713
+ checknpcounter(0);
714
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
715
+ jQuery("#gadash-progressbar").html("<?php _e("Invalid response, more details in JavaScript Console (F12).", 'ga-dash'); ?>");
716
+ console.log("\n********************* GADWP Log ********************* \n\n"+response);
717
+ }
718
  }else{
719
  jQuery("#gadash-trafficchannels").css({"background-color":"#F7F7F7","height":"auto","padding-top":"125px","padding-bottom":"125px","color":"#000","text-align":"center"});
720
  jQuery("#gadash-trafficchannels").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
776
  NProgress.configure({ showSpinner: false });
777
  NProgress.start();
778
  } catch(e) {
779
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
780
  jQuery("#gadash-progressbar").html("<?php _e("A JavaScript Error is blocking plugin resources!", 'ga-dash'); ?>");
781
  }
782
  npcounter = 0;
784
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "medium",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
785
 
786
  if (!jQuery.isNumeric(response)){
787
+ try{
788
+ gadash_trafficmediums=jQuery.parseJSON(response);
789
+ google.setOnLoadCallback(ga_dash_drawtrafficmediums(gadash_trafficmediums));
790
+ } catch(e) {
791
+ checknpcounter(0);
792
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
793
+ jQuery("#gadash-progressbar").html("<?php _e("Invalid response, more details in JavaScript Console (F12).", 'ga-dash'); ?>");
794
+ console.log("\n********************* GADWP Log ********************* \n\n"+response);
795
+ }
796
  }else{
797
  jQuery("#gadash-trafficmediums").css({"background-color":"#F7F7F7","height":"auto","padding-top":"80px","padding-bottom":"80px","color":"#000","text-align":"center"});
798
  jQuery("#gadash-trafficmediums").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
815
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "trafficchannels",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
816
 
817
  if (!jQuery.isNumeric(response)){
818
+ try{
819
+ gadash_trafficchannels=jQuery.parseJSON(response);
820
+ google.setOnLoadCallback(ga_dash_drawtrafficchannels(gadash_trafficchannels));
821
+ } catch(e) {
822
+ checknpcounter(0);
823
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
824
+ jQuery("#gadash-progressbar").html("<?php _e("Invalid response, more details in JavaScript Console (F12).", 'ga-dash'); ?>");
825
+ console.log("\n********************* GADWP Log ********************* \n\n"+response);
826
+ }
827
  }else{
828
  jQuery("#gadash-trafficchannels").css({"background-color":"#F7F7F7","height":"auto","padding-top":"125px","padding-bottom":"125px","color":"#000","text-align":"center"});
829
  jQuery("#gadash-trafficchannels").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
834
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "socialNetwork",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
835
 
836
  if (!jQuery.isNumeric(response)){
837
+ try{
838
+ gadash_socialnetworks=jQuery.parseJSON(response);
839
+ google.setOnLoadCallback(ga_dash_drawsocialnetworks(gadash_socialnetworks));
840
+ } catch(e) {
841
+ checknpcounter(0);
842
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
843
+ jQuery("#gadash-progressbar").html("<?php _e("Invalid response, more details in JavaScript Console (F12).", 'ga-dash'); ?>");
844
+ console.log("\n********************* GADWP Log ********************* \n\n"+response);
845
+ }
846
  }else{
847
  jQuery("#gadash-socialnetworks").css({"background-color":"#F7F7F7","height":"auto","padding-top":"80px","padding-bottom":"80px","color":"#000","text-align":"center"});
848
  jQuery("#gadash-socialnetworks").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
854
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "source",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
855
 
856
  if (!jQuery.isNumeric(response)){
857
+ try{
858
+ gadash_trafficorganic=jQuery.parseJSON(response);
859
+ google.setOnLoadCallback(ga_dash_drawtrafficorganic(gadash_trafficorganic));
860
+ } catch(e) {
861
+ checknpcounter(0);
862
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
863
+ jQuery("#gadash-progressbar").html("<?php _e("Invalid response, more details in JavaScript Console (F12).", 'ga-dash'); ?>");
864
+ console.log("\n********************* GADWP Log ********************* \n\n"+response);
865
+ }
866
  }else{
867
  jQuery("#gadash-trafficorganic").css({"background-color":"#F7F7F7","height":"auto","padding-top":"80px","padding-bottom":"80px","color":"#000","text-align":"center"});
868
  jQuery("#gadash-trafficorganic").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
968
  NProgress.configure({ showSpinner: false });
969
  NProgress.start();
970
  } catch(e) {
971
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
972
  jQuery("#gadash-progressbar").html("<?php _e("A JavaScript Error is blocking plugin resources!", 'ga-dash'); ?>");
973
  }
974
  npcounter = 0;
976
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "<?php echo $query; ?>",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
977
 
978
  if (!jQuery.isNumeric(response)){
979
+ try{
980
+ gadash_locations=jQuery.parseJSON(response);
981
+ google.setOnLoadCallback(ga_dash_drawmaplocations(gadash_locations));
982
+ google.setOnLoadCallback(ga_dash_drawlocations(gadash_locations));
983
+ } catch(e) {
984
+ checknpcounter(0);
985
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
986
+ jQuery("#gadash-progressbar").html("<?php _e("Invalid response, more details in JavaScript Console (F12).", 'ga-dash'); ?>");
987
+ console.log("\n********************* GADWP Log ********************* \n\n"+response);
988
+ }
989
  }else{
990
  jQuery("#gadash-map").css({"background-color":"#F7F7F7","height":"auto","padding-top":"125px","padding-bottom":"125px","color":"#000","text-align":"center"});
991
  jQuery("#gadash-map").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
1003
  chartArea: {width: '99%',height: '90%'},
1004
  colors: ['<?php echo $light_color; ?>', '<?php echo $dark_color; ?>'],
1005
  <?php
1006
+ $GADASH_GAPI->getcountrycodes();
1007
+ if ($GADASH_Config->options['ga_target_geomap'] and isset($GADASH_GAPI->country_codes[$GADASH_Config->options['ga_target_geomap']])) {
1008
+ ?>
1009
  region : '<?php echo esc_html($GADASH_Config->options ['ga_target_geomap']); ?>',
1010
  displayMode : 'markers',
1011
  datalessRegionColor : 'EFEFEF'
1079
  NProgress.configure({ showSpinner: false });
1080
  NProgress.start();
1081
  } catch(e) {
1082
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
1083
  jQuery("#gadash-progressbar").html("<?php _e("A JavaScript Error is blocking plugin resources!", 'ga-dash'); ?>");
1084
  }
1085
  npcounter = 0;
1087
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "<?php echo $query; ?>",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
1088
 
1089
  if (!jQuery.isNumeric(response)){
1090
+ try{
1091
+ gadash_mainchart=jQuery.parseJSON(response);
1092
+ google.setOnLoadCallback(ga_dash_drawmainchart(gadash_mainchart));
1093
+ } catch(e) {
1094
+ checknpcounter(0);
1095
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
1096
+ jQuery("#gadash-progressbar").html("<?php _e("Invalid response, more details in JavaScript Console (F12).", 'ga-dash'); ?>");
1097
+ console.log("\n********************* GADWP Log ********************* \n\n"+response);
1098
+ }
1099
  }else{
1100
  jQuery("#gadash-mainchart").css({"background-color":"#F7F7F7","height":"auto","padding-top":"125px","padding-bottom":"125px","color":"#000","text-align":"center"});
1101
  jQuery("#gadash-mainchart").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
1106
  jQuery.post(ajaxurl, {action: "gadashadmin_get_widgetreports",projectId: "<?php echo $projectId; ?>",from: "<?php echo $from; ?>",to: "<?php echo $to; ?>",query: "bottomstats",gadashadmin_security_widget_reports: "<?php echo wp_create_nonce('gadashadmin_get_widgetreports'); ?>"}, function(response){
1107
 
1108
  if (!jQuery.isNumeric(response)){
1109
+ try{
1110
+ gadash_bottomstats=jQuery.parseJSON(response);
1111
+ ga_dash_drawbottomstats(gadash_bottomstats);
1112
+ } catch(e) {
1113
+ checknpcounter(0);
1114
+ jQuery("#gadash-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red"});
1115
+ jQuery("#gadash-progressbar").html("<?php _e("Invalid response, more details in JavaScript Console (F12).", 'ga-dash'); ?>");
1116
+ console.log("\n********************* GADWP Log ********************* \n\n"+response);
1117
+ }
1118
  }else{
1119
  jQuery("#gadash-bottomstats").css({"background-color":"#F7F7F7","height":"auto","padding-top":"40px","padding-bottom":"40px","color":"#000","text-align":"center","width": "98%"});
1120
  jQuery("#gadash-bottomstats").html("<?php _e("This report is unavailable", 'ga-dash'); ?> ("+response+")");
1150
  };
1151
  </script>
1152
  <?php
1153
+ }
 
1154
  }
1155
+ }
1156
  }
 
1157
  if (is_admin()) {
1158
+ $GADASH_Widgets = new GADASH_Widgets();
1159
  }
admin/ga_dash_settings.php CHANGED
@@ -9,86 +9,86 @@
9
  final class GADASH_Settings
10
  {
11
 
12
- private static function set_get_options($who)
13
- {
14
- global $GADASH_Config;
15
- $network_settings = false;
16
- $options = $GADASH_Config->options; // Get current options
17
- if (isset($_POST['options']['ga_dash_hidden']) and isset($_POST['options']) and (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) and $who != 'Reset') {
18
- $new_options = $_POST['options'];
19
- if ($who == 'tracking') {
20
- $options['ga_dash_anonim'] = 0;
21
- $options['ga_event_tracking'] = 0;
22
- $options['ga_enhanced_links'] = 0;
23
- $options['ga_dash_remarketing'] = 0;
24
- $options['ga_dash_adsense'] = 0;
25
- $options['ga_event_bouncerate'] = 0;
26
- $options['ga_crossdomain_tracking'] = 0;
27
- $options['ga_aff_tracking'] = 0;
28
- $options['ga_hash_tracking'] = 0;
29
- if (isset($_POST['options']['ga_tracking_code'])) {
30
- $new_options['ga_tracking_code'] = trim($new_options['ga_tracking_code'], "\t");
31
- }
32
- if (empty($new_options['ga_track_exclude'])) {
33
- $new_options['ga_track_exclude'] = array();
34
- }
35
- } else
36
- if ($who == 'backend') {
37
- $options['ga_dash_jailadmins'] = 0;
38
- if (empty($new_options['ga_dash_access_back'])) {
39
- $new_options['ga_dash_access_back'][] = 'administrator';
40
- }
41
- } else
42
- if ($who == 'frontend') {
43
- $options['ga_dash_frontend_stats'] = 0;
44
- $options['ga_dash_frontend_keywords'] = 0;
45
- if (empty($new_options['ga_dash_access_front'])) {
46
- $new_options['ga_dash_access_front'][] = 'administrator';
47
- }
48
- } else
49
- if ($who == 'general') {
50
- $options['ga_dash_userapi'] = 0;
51
- } else
52
- if ($who == 'network') {
53
- $options['ga_dash_userapi'] = 0;
54
- $options['ga_dash_network'] = 0;
55
- $options['ga_dash_excludesa'] = 0;
56
- $network_settings = true;
57
- }
58
- $options = array_merge($options, $new_options);
59
- $GADASH_Config->options = $options;
60
- $GADASH_Config->set_plugin_options($network_settings);
61
  }
62
- return $options;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  }
 
 
64
 
65
- private static function navigation_tabs($tabs)
66
- {
67
- echo '<div id="icon-themes" class="icon32"><br></div>';
68
- echo '<h2 class="nav-tab-wrapper">';
69
- foreach ($tabs as $tab => $name) {
70
- echo "<a class='nav-tab' id='tab-$tab' href='#top#gadwp-$tab'>$name</a>";
71
- }
72
- echo '</h2>';
73
  }
 
 
74
 
75
- public static function frontend_settings()
76
- {
77
- global $GADASH_Config;
78
- if (! current_user_can('manage_options')) {
79
- return;
80
- }
81
- $options = self::set_get_options('frontend');
82
- if (isset($_POST['options']['ga_dash_hidden'])) {
83
- $message = "<div class='updated'><p>" . __("Settings saved.", 'ga-dash') . "</p></div>";
84
- if (! (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form'))) {
85
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
86
- }
87
- }
88
- if (! $GADASH_Config->options['ga_dash_tableid_jail'] or ! $GADASH_Config->options['ga_dash_token']) {
89
- $message = "<div class='error'><p>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash'). "</a> " .__('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
90
- }
91
- ?>
92
  <form name="ga_dash_form" method="post"
93
  action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
94
  <div class="wrap">
@@ -108,18 +108,17 @@ final class GADASH_Settings
108
  <td class="roles title"><label for="ga_dash_access_front"><?php _e("Show stats to:", 'ga-dash' ); ?></label></td>
109
  <td class="roles">
110
  <?php
111
- if (! isset($wp_roles)) {
112
- $wp_roles = new WP_Roles();
113
- }
114
- $i = 0;
115
- ?>
116
- <table>
117
  <tr>
118
- <?php
119
- foreach ($wp_roles->role_names as $role => $name) {
120
- if ($role != 'subscriber') {
121
- $i ++;
122
- ?>
123
  <td><label> <input
124
  type="checkbox" name="options[ga_dash_access_front][]"
125
  value="<?php echo $role; ?>"
@@ -127,16 +126,15 @@ final class GADASH_Settings
127
  <?php echo $name; ?>
128
  </label></td>
129
  <?php
130
- }
131
- if ($i % 4 == 0) {
132
- ?>
133
  </tr>
134
  <tr>
135
  <?php
136
- }
137
- }
138
- ?>
139
- </table>
140
  </td>
141
  </tr>
142
  <tr>
@@ -180,29 +178,28 @@ final class GADASH_Settings
180
  </tr>
181
  </table>
182
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
183
- <?php wp_nonce_field('gadash_form','gadash_security'); ?>
184
- </form>
185
  <?php
186
- self::output_sidebar();
187
- }
188
 
189
- public static function backend_settings()
190
- {
191
- global $GADASH_Config;
192
- if (! current_user_can('manage_options')) {
193
- return;
194
- }
195
- $options = self::set_get_options('backend');
196
- if (isset($_POST['options']['ga_dash_hidden'])) {
197
- $message = "<div class='updated'><p>" . __("Settings saved.", 'ga-dash') . "</p></div>";
198
- if (! (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form'))) {
199
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
200
- }
201
- }
202
- if (! $GADASH_Config->options['ga_dash_tableid_jail'] or ! $GADASH_Config->options['ga_dash_token']) {
203
- $message = "<div class='error'><p>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash'). "</a> " .__('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
204
- }
205
- ?>
206
  <form name="ga_dash_form" method="post"
207
  action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
208
  <div class="wrap">
@@ -222,18 +219,18 @@ final class GADASH_Settings
222
  <td class="roles title"><label for="ga_dash_access_back"><?php _e("Show stats to:", 'ga-dash' ); ?></label></td>
223
  <td class="roles">
224
  <?php
225
- if (! isset($wp_roles)) {
226
- $wp_roles = new WP_Roles();
227
- }
228
- $i = 0;
229
- ?>
230
  <table>
231
  <tr>
232
  <?php
233
- foreach ($wp_roles->role_names as $role => $name) {
234
- if ($role != 'subscriber') {
235
- $i ++;
236
- ?>
237
  <td><label> <input
238
  type="checkbox" name="options[ga_dash_access_back][]"
239
  value="<?php echo $role; ?>"
@@ -241,16 +238,15 @@ final class GADASH_Settings
241
  <?php echo $name; ?>
242
  </label></td>
243
  <?php
244
- }
245
- if ($i % 4 == 0) {
246
- ?>
247
  </tr>
248
  <tr>
249
  <?php
250
- }
251
- }
252
- ?>
253
- </table>
254
  </td>
255
  </tr>
256
  <tr>
@@ -310,60 +306,56 @@ final class GADASH_Settings
310
  </tr>
311
  </table>
312
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
313
- <?php wp_nonce_field('gadash_form','gadash_security'); ?>
314
- </form>
315
  <?php
316
- self::output_sidebar();
317
- }
318
 
319
- public static function tracking_settings()
320
- {
321
- global $GADASH_Config;
322
- /*
323
- * Include Tools
324
- */
325
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
326
- $tools = new GADASH_Tools();
327
- if (! current_user_can('manage_options')) {
328
- return;
329
- }
330
- $options = self::set_get_options('tracking');
331
- if (isset($_POST['options']['ga_dash_hidden'])) {
332
- $message = "<div class='updated'><p>" . __("Settings saved.", 'ga-dash') . "</p></div>";
333
- if (! (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form'))) {
334
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
335
- }
336
- }
337
- if (! $GADASH_Config->options['ga_dash_tableid_jail']) {
338
- $message = "<div class='error'><p>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash'). "</a> " .__('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
339
- }
340
-
341
- if (!$options['ga_dash_tracking']) {
342
- $message = "<div class='error'><p>" . __("The tracking component is disabled. You should set",'ga-dash')." <strong>". __("Tracking Options",'ga-dash')."</strong> " .__("to",'ga-dash')." <strong>".__("Enabled", 'ga-dash') . "</strong>.</p></div>";
343
- }
344
-
345
- ?>
346
  <form name="ga_dash_form" method="post"
347
  action="<?php esc_url($_SERVER['REQUEST_URI']); ?>">
348
  <div class="wrap">
349
  <?php echo "<h2>" . __( "Google Analytics Tracking Code", 'ga-dash' ) . "</h2>"; ?>
350
  </div>
351
-
352
  <div id="poststuff">
353
  <div id="post-body" class="metabox-holder columns-2">
354
  <div id="post-body-content">
355
  <div class="settings-wrapper">
356
  <div class="inside">
357
  <?php
358
- $tabs = array(
359
- 'basic' => __("Basic Settings", 'ga-dash'),
360
- 'events' => __("Events Tracking", 'ga-dash'),
361
- 'custom' => __("Custom Definitions", 'ga-dash'),
362
- 'exclude' => __("Exclude Tracking", 'ga-dash'),
363
- 'advanced' => __("Advanced Settings", 'ga-dash')
364
- );
365
- self::navigation_tabs($tabs);
366
- ?>
367
  <?php if (isset($message)) echo $message; ?>
368
  <div id="gadwp-basic">
369
  <table class="options">
@@ -384,15 +376,14 @@ final class GADASH_Settings
384
  <tr>
385
  <td class="title"></td>
386
  <td><?php
387
- $profile_info = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $GADASH_Config->options['ga_dash_tableid_jail']);
388
- echo '<pre>' . __("View Name:", 'ga-dash') . "\t" . esc_html($profile_info[0]) . "<br />" . __("Tracking ID:", 'ga-dash') . "\t" . esc_html($profile_info[2]) . "<br />" . __("Default URL:", 'ga-dash') . "\t" . esc_html($profile_info[3]) . "<br />" . __("Time Zone:", 'ga-dash') . "\t" . esc_html($profile_info[5]) . '</pre>';
389
- ?></td>
390
  </tr>
391
  <?php }?>
392
  <tr>
393
  <td colspan="2"><hr><?php echo "<h2>" . __( "Basic Tracking", 'ga-dash' ) . "</h2>"; ?></td>
394
  </tr>
395
-
396
  <tr>
397
  <td class="title"><label for="ga_dash_tracking_type"><?php _e("Tracking Type:", 'ga-dash' ); ?></label></td>
398
  <td><select id="ga_dash_tracking_type"
@@ -635,16 +626,16 @@ final class GADASH_Settings
635
  <td class="roles title"><label for="ga_track_exclude"><?php _e("Exclude tracking for:", 'ga-dash' ); ?></label></td>
636
  <td class="roles">
637
  <?php
638
- if (! isset($wp_roles)) {
639
- $wp_roles = new WP_Roles();
640
- }
641
- $i = 0;
642
- ?> <table>
643
  <tr>
644
  <?php
645
- foreach ($wp_roles->role_names as $role => $name) {
646
- $i ++;
647
- ?>
648
  <td><label> <input type="checkbox"
649
  name="options[ga_track_exclude][]"
650
  value="<?php echo $role; ?>"
@@ -652,14 +643,14 @@ final class GADASH_Settings
652
  <?php echo $name; ?>
653
  </label></td>
654
  <?php
655
- if ($i % 4 == 0) {
656
- ?>
657
  </tr>
658
  <tr>
659
  <?php
660
- }
661
- }
662
- ?>
663
  </table>
664
  </td>
665
  </tr>
@@ -676,25 +667,22 @@ final class GADASH_Settings
676
  </tr>
677
  </table>
678
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
679
- <?php wp_nonce_field('gadash_form','gadash_security'); ?>
680
- </form>
681
  <?php
682
- self::output_sidebar();
683
- }
684
-
685
- public static function errors_debugging()
686
- {
687
- global $GADASH_Config;
688
- if (! current_user_can('manage_options')) {
689
- return;
690
- }
691
- $options = self::set_get_options('frontend');
692
-
693
- if (! $GADASH_Config->options['ga_dash_tableid_jail'] or ! $GADASH_Config->options['ga_dash_token']) {
694
- $message = "<div class='error'><p><strong>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash'). "</a> " .__('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
695
- }
696
- ?>
697
 
 
 
 
 
 
 
 
 
 
 
 
698
  <div class="wrap">
699
  <?php echo "<h2>" . __( "Google Analytics Errors & Debugging", 'ga-dash' ) . "</h2>"; ?>
700
  </div>
@@ -705,29 +693,29 @@ final class GADASH_Settings
705
  <div class="inside">
706
  <?php if (isset($message)) echo $message; ?>
707
  <?php
708
- $tabs = array(
709
- 'errors' => __("Errors & Details", 'ga-dash'),
710
- 'config' => __("Plugin Settings", 'ga-dash')
711
- );
712
- self::navigation_tabs($tabs);
713
- ?>
714
  <div id="gadwp-errors">
715
  <table class="options">
716
  <tr>
717
  <td>
718
  <?php echo __("For errors and/or other issues please check",'ga-dash')." <a href='https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=errors_screen&utm_campaign=gadwp' target='_blank'>". __("the plugin documentation page",'ga-dash')."</a> ".__("and related tutorials",'ga-dash').".";?>
719
  </td>
720
- </tr>
721
  <tr>
722
  <td><?php echo "<h2>" . __( "Last Error detected", 'ga-dash' ) . "</h2>"; ?></td>
723
  </tr>
724
  <tr>
725
  <td>
726
  <?php
727
- $errors = esc_html(print_r(get_transient('gadash_lasterror'), true)) ? esc_html(print_r(get_transient('gadash_lasterror'), true)) : __("None", 'ga-dash');
728
- echo '<pre class="log_data">Last Error: ';
729
- echo $errors;
730
- ?></pre>
731
  </td>
732
  </tr>
733
  <tr>
@@ -736,14 +724,12 @@ final class GADASH_Settings
736
  <tr>
737
  <td>
738
  <?php
739
- echo '<pre class="log_data">Error Details: ';
740
- $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", 'ga-dash');
741
- echo $error_details;
742
- ?></pre><br />
743
  <hr>
744
  </td>
745
-
746
-
747
  <tr>
748
 
749
  </table>
@@ -755,139 +741,135 @@ final class GADASH_Settings
755
  </tr>
756
  <tr>
757
  <td><pre class="log_data"><?php
758
- $anonim = $GADASH_Config->options;
759
- $anonim['wp_version'] = $wp_version;
760
- $anonim['gadwp_version'] = GADWP_CURRENT_VERSION;
761
- if ($anonim['ga_dash_token']) {
762
- $anonim['ga_dash_token'] = 'HIDDEN';
763
- }
764
- if ($anonim['ga_dash_refresh_token']) {
765
- $anonim['ga_dash_refresh_token'] = 'HIDDEN';
766
- }
767
- if ($anonim['ga_dash_clientid']) {
768
- $anonim['ga_dash_clientid'] = 'HIDDEN';
769
- }
770
- if ($anonim['ga_dash_clientsecret']) {
771
- $anonim['ga_dash_clientsecret'] = 'HIDDEN';
772
- }
773
- if ($anonim['ga_dash_apikey']) {
774
- $anonim['ga_dash_apikey'] = 'HIDDEN';
775
- }
776
- echo esc_html(print_r($anonim, true));
777
- ?></pre><br />
778
- <hr></td>
779
  </tr>
780
  </table>
781
  </div>
782
-
783
  <?php
784
- self::output_sidebar();
785
- }
786
 
787
- public static function general_settings()
788
- {
789
- global $GADASH_Config;
790
- global $wp_version;
791
- /*
792
- * Include Tools
793
- */
794
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
795
- $tools = new GADASH_Tools();
796
- if (! current_user_can('manage_options')) {
797
- return;
798
- }
799
- $options = self::set_get_options('general');
800
- /*
801
- * Include GAPI
802
- */
803
- echo '<div id="gapi-warning" class="updated"><p>' . __('Loading the required libraries. If this results in a blank screen or a fatal error, try this solution:', "ga-dash") . ' <a href="https://deconf.com/ask/question/ga-dashboard-absolutely-empty-general-settings#answer-770">Library conflicts between WordPress plugins</a></p></div>';
804
- include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
805
- global $GADASH_GAPI;
806
- echo '<script type="text/javascript">jQuery("#gapi-warning").hide()</script>';
807
- if (isset($_POST['ga_dash_code'])) {
808
- if (! stripos('x' . $_POST['ga_dash_code'], 'UA-', 1) == 1) {
809
- try {
810
- $GADASH_GAPI->client->authenticate($_POST['ga_dash_code']);
811
- $GADASH_Config->options['ga_dash_token'] = $GADASH_GAPI->client->getAccessToken();
812
- $google_token = json_decode($GADASH_GAPI->client->getAccessToken());
813
- $GADASH_Config->options['ga_dash_refresh_token'] = $google_token->refresh_token;
814
- $GADASH_Config->set_plugin_options();
815
- $message = "<div class='updated'><p>" . __("Plugin authorization succeeded.", 'ga-dash') . "</p></div>";
816
- $options = self::set_get_options('general');
817
- delete_transient('ga_dash_gapi_errors');
818
- } catch (Google_IO_Exception $e) {
819
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $GADASH_GAPI->error_timeout);
820
- return false;
821
- } catch (Google_Service_Exception $e) {
822
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html("(" . $e->getCode() . ") " . $e->getMessage()), $GADASH_GAPI->error_timeout);
823
- set_transient('ga_dash_gapi_errors', $e->getErrors(), $GADASH_GAPI->error_timeout);
824
- return $e->getCode();
825
- } catch (Exception $e) {
826
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e) . "\nResponseHttpCode:" . $e->getCode(), $GADASH_GAPI->error_timeout);
827
- $GADASH_GAPI->ga_dash_reset_token(false);
828
- }
829
- } else {
830
- $message = "<div class='error'><p>" . __("The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> (UA-XXXXX-X). Try again, and use the red link to get your access code", 'ga-dash') . ".</p></div>";
831
- }
832
- }
833
-
834
- if ($GADASH_GAPI->client->getAccessToken()) {
835
- if ($GADASH_Config->options['ga_dash_profile_list']) {
836
- $profiles = $GADASH_Config->options['ga_dash_profile_list'];
837
- } else {
838
- $profiles = $GADASH_GAPI->refresh_profiles();
839
- }
840
- if ($profiles) {
841
- $GADASH_Config->options['ga_dash_profile_list'] = $profiles;
842
- if (! $GADASH_Config->options['ga_dash_tableid_jail']) {
843
- $profile = $tools->guess_default_domain($profiles);
844
- $GADASH_Config->options['ga_dash_tableid_jail'] = $profile;
845
- $GADASH_Config->options['ga_dash_tableid'] = $profile;
846
- }
847
- $GADASH_Config->set_plugin_options();
848
- $options = self::set_get_options('general');
849
- }
850
- }
851
-
852
- if (isset($_POST['Clear'])) {
853
- if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
854
- $tools->ga_dash_clear_cache();
855
- $message = "<div class='updated'><p>" . __("Cleared Cache.", 'ga-dash') . "</p></div>";
856
- } else {
857
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
858
- }
859
- }
860
- if (isset($_POST['Reset'])) {
861
- if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
862
- $GADASH_GAPI->ga_dash_reset_token(true);
863
- $tools->ga_dash_clear_cache();
864
- $message = "<div class='updated'><p>" . __("Token Reseted and Revoked.", 'ga-dash') . "</p></div>";
865
- $options = self::set_get_options('Reset');
866
- } else {
867
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
868
- }
869
- }
870
-
871
- if (isset($_POST['options']['ga_dash_hidden']) and ! isset($_POST['Clear']) and ! isset($_POST['Reset'])) {
872
- $message = "<div class='updated'><p>" . __("Settings saved.", 'ga-dash') . "</p></div>";
873
- if (! (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form'))) {
874
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
875
- }
876
  }
877
- if (isset($_POST['Hide'])) {
878
- if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
879
- $message = "<div class='updated'><p>" . __("All other domains/properties were removed.", 'ga-dash') . "</p></div>";
880
- $lock_profile = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $GADASH_Config->options['ga_dash_tableid_jail']);
881
- $GADASH_Config->options['ga_dash_profile_list'] = array(
882
- $lock_profile
883
- );
884
- $options = self::set_get_options('general');
885
- } else {
886
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
887
- }
 
 
 
 
 
888
  }
889
-
890
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
891
  <div class="wrap">
892
  <?php echo "<h2>" . __( "Google Analytics Settings", 'ga-dash' ) . "</h2>"; ?><hr>
893
  </div>
@@ -896,19 +878,17 @@ final class GADASH_Settings
896
  <div id="post-body-content">
897
  <div class="settings-wrapper">
898
  <div class="inside">
899
-
900
- if ($GADASH_GAPI->gapi_errors_handler()) {
901
- $message = "<div class='error'><p>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash'). "</a> " .__('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
902
- }
903
-
904
- if (isset($_POST['Authorize'])) {
905
- $tools->ga_dash_clear_cache();
906
- $GADASH_GAPI->token_request();
907
- echo "<div class='updated'><p>" . __("Use the red link (see below) to generate and get your access code!", 'ga-dash') . "</p></div>";
908
- } else {
909
- if (isset($message))
910
- echo $message;
911
- ?>
912
  <form name="ga_dash_form" method="post"
913
  action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
914
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
@@ -923,8 +903,8 @@ final class GADASH_Settings
923
  </td>
924
  </tr>
925
  <?php
926
- if (! $options['ga_dash_token'] or $options['ga_dash_userapi']) {
927
- ?>
928
  <tr>
929
  <td colspan="2" class="info"><input
930
  name="options[ga_dash_userapi]" type="checkbox"
@@ -934,9 +914,9 @@ final class GADASH_Settings
934
  <?php echo ($options['ga_dash_network'])?'disabled="disabled"':''; ?> /><?php _e ( " use your own API Project credentials", 'ga-dash' );?>
935
  </td>
936
  </tr>
937
- }
938
- if ($options['ga_dash_userapi']) {
939
- ?>
940
  <tr>
941
  <td class="title"><label for="options[ga_dash_apikey]"><?php _e("API Key:", 'ga-dash'); ?></label>
942
  </td>
@@ -963,11 +943,11 @@ final class GADASH_Settings
963
  </td>
964
  </tr>
965
  <?php
966
- }
967
- ?>
968
  <?php
969
- if ($options['ga_dash_token']) {
970
- ?>
971
  <tr>
972
  <td colspan="2"><input type="submit" name="Reset"
973
  class="button button-secondary"
@@ -989,41 +969,41 @@ final class GADASH_Settings
989
  <?php disabled(is_array($options['ga_dash_profile_list']), false); ?>
990
  name="options[ga_dash_tableid_jail]">
991
  <?php
992
- if (is_array($options['ga_dash_profile_list'])) {
993
- foreach ($options['ga_dash_profile_list'] as $items) {
994
- if ($items[3]) {
995
- echo '<option value="' . esc_attr($items[1]) . '" ' . selected($items[1], $options['ga_dash_tableid_jail']);
996
- echo ' title="' . __("View Name:", 'ga-dash') . ' ' . esc_attr($items[0]) . '">' . esc_html($tools->ga_dash_get_profile_domain($items[3])) . ' &#8658; ' . esc_attr($items[0]) . '</option>';
997
- }
998
- }
999
- } else {
1000
- echo '<option value="">' . __("Property not found", 'ga-dash') . '</option>';
1001
- }
1002
- ?>
1003
  </select>
1004
- if (count($options['ga_dash_profile_list']) > 1) {
1005
- _e("and/or hide all other domains", 'ga-dash');
1006
- ?>
1007
  <input type="submit" name="Hide" class="button button-secondary"
1008
  value="<?php _e( "Hide Now", 'ga-dash' ); ?>" />
1009
  <?php
1010
- }
1011
- ?>
1012
  </td>
1013
  </tr>
1014
  <?php
1015
- if ($options['ga_dash_tableid_jail']) {
1016
- ?>
1017
  <tr>
1018
  <td class="title"></td>
1019
  <td><?php
1020
- $profile_info = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $GADASH_Config->options['ga_dash_tableid_jail']);
1021
- echo '<pre>' . __("View Name:", 'ga-dash') . "\t" . esc_html($profile_info[0]) . "<br />" . __("Tracking ID:", 'ga-dash') . "\t" . esc_html($profile_info[2]) . "<br />" . __("Default URL:", 'ga-dash') . "\t" . esc_html($profile_info[3]) . "<br />" . __("Time Zone:", 'ga-dash') . "\t" . esc_html($profile_info[5]) . '</pre>';
1022
- ?></td>
1023
  </tr>
1024
  <?php
1025
- }
1026
- ?>
1027
  <td class="title"><label for="ga_dash_style"><?php _e("Theme Color:", 'ga-dash' ); ?></label></td>
1028
  <td><input type="text" id="ga_dash_style"
1029
  class="ga_dash_style" name="options[ga_dash_style]"
@@ -1044,8 +1024,8 @@ final class GADASH_Settings
1044
  name="Submit" class="button button-primary"
1045
  value="<?php _e('Save Changes', 'ga-dash' ) ?>" /></td>
1046
  </tr>
1047
- } else {
1048
- ?>
1049
  <tr>
1050
  <td colspan="2"><hr></td>
1051
  </tr>
@@ -1064,137 +1044,134 @@ final class GADASH_Settings
1064
  </table>
1065
  </form>
1066
  <?php
1067
- self::output_sidebar();
1068
- return;
1069
- }
1070
- ?>
1071
- </form>
1072
- }
1073
  self::output_sidebar();
 
 
 
 
1074
  }
1075
- // Network Settings
1076
- public static function general_settings_network()
1077
- {
1078
- global $GADASH_Config;
1079
- global $wp_version;
1080
- /*
1081
- * Include Tools
1082
- */
1083
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
1084
- $tools = new GADASH_Tools();
1085
- if (! current_user_can('manage_network_options')) {
1086
- return;
1087
- }
1088
- $options = self::set_get_options('network');
1089
- /*
1090
- * Include GAPI
1091
- */
1092
- echo '<div id="gapi-warning" class="updated"><p>' . __('Loading the required libraries. If this results in a blank screen or a fatal error, try this solution:', "ga-dash") . ' <a href="https://deconf.com/ask/question/ga-dashboard-absolutely-empty-general-settings#answer-770">Library conflicts between WordPress plugins</a></p></div>';
1093
- include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
1094
- global $GADASH_GAPI;
1095
- echo '<script type="text/javascript">jQuery("#gapi-warning").hide()</script>';
1096
- if (isset($_POST['ga_dash_code'])) {
1097
- if (! stripos('x' . $_POST['ga_dash_code'], 'UA-', 1) == 1) {
1098
- try {
1099
- $GADASH_GAPI->client->authenticate($_POST['ga_dash_code']);
1100
- $GADASH_Config->options['ga_dash_token'] = $GADASH_GAPI->client->getAccessToken();
1101
- $google_token = json_decode($GADASH_GAPI->client->getAccessToken());
1102
- $GADASH_Config->options['ga_dash_refresh_token'] = $google_token->refresh_token;
1103
- $GADASH_Config->set_plugin_options(true);
1104
- $message = "<div class='updated'><p>" . __("Plugin authorization succeeded.", 'ga-dash') . "</p></div>";
1105
- $options = self::set_get_options('network');
1106
- if (is_multisite()) { // Cleanup errors on the entire network
1107
- foreach (wp_get_sites(array( 'limit' => apply_filters('gadwp_sites_limit', 100))) as $blog) {
1108
- switch_to_blog($blog['blog_id']);
1109
- delete_transient('ga_dash_gapi_errors');
1110
- restore_current_blog();
1111
- }
1112
- } else {
1113
- delete_transient('ga_dash_gapi_errors');
1114
- }
1115
- } catch (Google_IO_Exception $e) {
1116
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $GADASH_GAPI->error_timeout);
1117
- return false;
1118
- } catch (Google_Service_Exception $e) {
1119
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html("(" . $e->getCode() . ") " . $e->getMessage()), $GADASH_GAPI->error_timeout);
1120
- set_transient('ga_dash_gapi_errors', $e->getErrors(), $GADASH_GAPI->error_timeout);
1121
- return $e->getCode();
1122
- } catch (Exception $e) {
1123
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e) . "\nResponseHttpCode:" . $e->getCode(), $GADASH_GAPI->error_timeout);
1124
- $GADASH_GAPI->ga_dash_reset_token(false);
1125
- }
1126
- } else {
1127
- $message = "<div class='error'><p>" . __("The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> (UA-XXXXX-X). Try again, and use the red link to get your access code", 'ga-dash') . ".</p></div>";
1128
- }
1129
- }
1130
-
1131
- if (isset($_POST['Refresh'])) {
1132
- if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
1133
- $GADASH_Config->options['ga_dash_profile_list'] = '';
1134
- $message = "<div class='updated'><p>" . __("Properties refreshed.", 'ga-dash') . "</p></div>";
1135
- $options = self::set_get_options('network');
1136
- } else {
1137
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
1138
- }
1139
- }
1140
-
1141
- if ($GADASH_GAPI->client->getAccessToken()) {
1142
- if ($GADASH_Config->options['ga_dash_profile_list']) {
1143
- $profiles = $GADASH_Config->options['ga_dash_profile_list'];
1144
- } else {
1145
- $profiles = $GADASH_GAPI->refresh_profiles();
1146
- }
1147
- if ($profiles) {
1148
- $GADASH_Config->options['ga_dash_profile_list'] = $profiles;
1149
- if (isset($GADASH_Config->options['ga_dash_tableid_jail']) and ! $GADASH_Config->options['ga_dash_tableid_jail']) {
1150
- $profile = $tools->guess_default_domain($profiles);
1151
- $GADASH_Config->options['ga_dash_tableid_jail'] = $profile;
1152
- $GADASH_Config->options['ga_dash_tableid'] = $profile;
1153
- }
1154
- $GADASH_Config->set_plugin_options(true);
1155
- $options = self::set_get_options('network');
1156
- }
1157
- }
1158
-
1159
- if (isset($_POST['Clear'])) {
1160
- if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
1161
- $tools->ga_dash_clear_cache();
1162
- $message = "<div class='updated'><p>" . __("Cleared Cache.", 'ga-dash') . "</p></div>";
1163
- } else {
1164
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
1165
- }
1166
- }
1167
- if (isset($_POST['Reset'])) {
1168
- if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
1169
- $GADASH_GAPI->ga_dash_reset_token(true);
1170
- $tools->ga_dash_clear_cache();
1171
- $message = "<div class='updated'><p>" . __("Token Reseted and Revoked.", 'ga-dash') . "</p></div>";
1172
- $options = self::set_get_options('Reset');
1173
- } else {
1174
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
1175
- }
1176
- }
1177
-
1178
- if (isset($_POST['options']['ga_dash_hidden']) and ! isset($_POST['Clear']) and ! isset($_POST['Reset']) and ! isset($_POST['Refresh'])) {
1179
- $message = "<div class='updated'><p>" . __("Settings saved.", 'ga-dash') . "</p></div>";
1180
- if (! (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form'))) {
1181
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
1182
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
1183
  }
1184
- if (isset($_POST['Hide'])) {
1185
- if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
1186
- $message = "<div class='updated'><p>" . __("All other domains/properties were removed.", 'ga-dash') . "</p></div>";
1187
- $lock_profile = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $GADASH_Config->options['ga_dash_tableid_jail']);
1188
- $GADASH_Config->options['ga_dash_profile_list'] = array(
1189
- $lock_profile
1190
- );
1191
- $options = self::set_get_options('network');
1192
- } else {
1193
- $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
1194
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1195
  }
1196
-
1197
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1198
  <div class="wrap">
1199
  <?php echo "<h2>" . __( "Google Analytics Settings", 'ga-dash' ) . "</h2>"; ?><hr>
1200
  </div>
@@ -1203,17 +1180,17 @@ final class GADASH_Settings
1203
  <div id="post-body-content">
1204
  <div class="settings-wrapper">
1205
  <div class="inside">
1206
- if ($GADASH_GAPI->gapi_errors_handler()) {
1207
- $message = "<div class='error'><p>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash'). "</a> " .__('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
1208
- }
1209
- if (isset($_POST['Authorize'])) {
1210
- $tools->ga_dash_clear_cache();
1211
- $GADASH_GAPI->token_request();
1212
- echo "<div class='updated'><p>" . __("Use the red link (see below) to generate and get your access code!", 'ga-dash') . "</p></div>";
1213
- } else {
1214
- if (isset($message))
1215
- echo $message;
1216
- ?>
1217
  <form name="ga_dash_form" method="post"
1218
  action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
1219
  <input type="hidden" name="options[ga_dash_hidden]"
@@ -1252,8 +1229,8 @@ final class GADASH_Settings
1252
  </td>
1253
  </tr>
1254
  <?php
1255
- if (! $options['ga_dash_token'] or $options['ga_dash_userapi']) {
1256
- ?>
1257
  <tr>
1258
  <td colspan="2" class="info"><input
1259
  name="options[ga_dash_userapi]" type="checkbox"
@@ -1262,9 +1239,9 @@ final class GADASH_Settings
1262
  onchange="this.form.submit()" /><?php _e ( " use your own API Project credentials", 'ga-dash' );?>
1263
  </td>
1264
  </tr>
1265
- }
1266
- if ($options['ga_dash_userapi']) {
1267
- ?>
1268
  <tr>
1269
  <td class="title"><label for="options[ga_dash_apikey]"><?php _e("API Key:", 'ga-dash'); ?></label>
1270
  </td>
@@ -1294,11 +1271,11 @@ final class GADASH_Settings
1294
  </td>
1295
  </tr>
1296
  <?php
1297
- }
1298
- ?>
1299
  <?php
1300
- if ($options['ga_dash_token']) {
1301
- ?>
1302
  <tr>
1303
  <td colspan="2"><input type="submit" name="Reset"
1304
  class="button button-secondary"
@@ -1317,11 +1294,13 @@ final class GADASH_Settings
1317
  <td colspan="2"><?php echo "<h2>" . __( "Properties/Views Settings", 'ga-dash' ) . "</h2>"; ?></td>
1318
  </tr>
1319
  <?php
1320
- if (isset($options['ga_dash_tableid_network'])) {
1321
- $options['ga_dash_tableid_network'] = json_decode(json_encode($options['ga_dash_tableid_network']), FALSE);
1322
- }
1323
- foreach (wp_get_sites(array( 'limit' => apply_filters('gadwp_sites_limit', 100))) as $blog) {
1324
- ?>
 
 
1325
  <tr>
1326
  <td class="title-select"><label
1327
  for="ga_dash_tableid_network"><?php echo '<strong>'.$blog['domain'].$blog['path'].'</strong>: ';?></label></td>
@@ -1329,22 +1308,22 @@ final class GADASH_Settings
1329
  <?php disabled(is_array($options['ga_dash_profile_list']),false);?>
1330
  name="options[ga_dash_tableid_network][<?php echo $blog['blog_id'];?>]">
1331
  <?php
1332
- if (is_array($options['ga_dash_profile_list'])) {
1333
- foreach ($options['ga_dash_profile_list'] as $items) {
1334
- if ($items[3]) {
1335
- echo '<option value="' . esc_attr($items[1]) . '" ' . selected($items[1], isset($options['ga_dash_tableid_network']->$blog['blog_id']) ? $options['ga_dash_tableid_network']->$blog['blog_id'] : '');
1336
- echo ' title="' . __("View Name:", 'ga-dash') . ' ' . esc_attr($items[0]) . '">' . $tools->ga_dash_get_profile_domain($items[3]) . ' &#8658; ' . esc_attr($items[0]) . '</option>';
1337
- }
1338
- }
1339
- } else {
1340
- echo '<option value="">' . __("Property not found", 'ga-dash') . '</option>';
1341
- }
1342
- ?>
1343
  </select><br /></td>
1344
  </tr>
1345
  <?php
1346
- }
1347
- ?>
1348
  <tr>
1349
  <td colspan="2"><hr><?php echo "<h2>" . __( "Exclude Tracking", 'ga-dash' ) . "</h2>"; ?></td>
1350
  </tr>
@@ -1371,14 +1350,14 @@ final class GADASH_Settings
1371
  name="Submit" class="button button-primary"
1372
  value="<?php _e('Save Changes', 'ga-dash' ) ?>" /></td>
1373
  </tr>
1374
- } else {
1375
- ?>
1376
  <td colspan="2"><hr></td>
1377
  </tr>
1378
  <tr>
1379
  <td colspan="2"><input type="submit" name="Authorize"
1380
  class="button button-secondary" id="authorize"
1381
- value="<?php _e( "Authorize Plugin", 'ga-dash' ); ?>"/>
1382
  <input type="submit" name="Clear"
1383
  class="button button-secondary"
1384
  value="<?php _e( "Clear Cache", 'ga-dash' ); ?>" /></td>
@@ -1390,21 +1369,21 @@ final class GADASH_Settings
1390
  </table>
1391
  </form>
1392
  <?php
1393
- self::output_sidebar();
1394
- return;
1395
- }
1396
- ?>
1397
  </table>
1398
  </form>
1399
  <?php
1400
- }
1401
- self::output_sidebar();
1402
  }
 
 
1403
 
1404
- public static function output_sidebar()
1405
- {
1406
- global $GADASH_Config;
1407
- ?>
1408
  </div>
1409
  </div>
1410
  </div>
@@ -1486,14 +1465,8 @@ final class GADASH_Settings
1486
  </div>
1487
  </div>
1488
  <?php
1489
-
1490
- /*
1491
- * Include Tools
1492
- */
1493
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
1494
- $tools = new GADASH_Tools();
1495
-
1496
- $tools->ga_dash_cleanup_timeouts();
1497
-
1498
- }
1499
  }
9
  final class GADASH_Settings
10
  {
11
 
12
+ private static function set_get_options($who)
13
+ {
14
+ global $GADASH_Config;
15
+ $network_settings = false;
16
+ $options = $GADASH_Config->options; // Get current options
17
+ if (isset($_POST['options']['ga_dash_hidden']) and isset($_POST['options']) and (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) and $who != 'Reset') {
18
+ $new_options = $_POST['options'];
19
+ if ($who == 'tracking') {
20
+ $options['ga_dash_anonim'] = 0;
21
+ $options['ga_event_tracking'] = 0;
22
+ $options['ga_enhanced_links'] = 0;
23
+ $options['ga_dash_remarketing'] = 0;
24
+ $options['ga_dash_adsense'] = 0;
25
+ $options['ga_event_bouncerate'] = 0;
26
+ $options['ga_crossdomain_tracking'] = 0;
27
+ $options['ga_aff_tracking'] = 0;
28
+ $options['ga_hash_tracking'] = 0;
29
+ if (isset($_POST['options']['ga_tracking_code'])) {
30
+ $new_options['ga_tracking_code'] = trim($new_options['ga_tracking_code'], "\t");
31
+ }
32
+ if (empty($new_options['ga_track_exclude'])) {
33
+ $new_options['ga_track_exclude'] = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  }
35
+ } else
36
+ if ($who == 'backend') {
37
+ $options['ga_dash_jailadmins'] = 0;
38
+ if (empty($new_options['ga_dash_access_back'])) {
39
+ $new_options['ga_dash_access_back'][] = 'administrator';
40
+ }
41
+ } else
42
+ if ($who == 'frontend') {
43
+ $options['ga_dash_frontend_stats'] = 0;
44
+ $options['ga_dash_frontend_keywords'] = 0;
45
+ if (empty($new_options['ga_dash_access_front'])) {
46
+ $new_options['ga_dash_access_front'][] = 'administrator';
47
+ }
48
+ } else
49
+ if ($who == 'general') {
50
+ $options['ga_dash_userapi'] = 0;
51
+ } else
52
+ if ($who == 'network') {
53
+ $options['ga_dash_userapi'] = 0;
54
+ $options['ga_dash_network'] = 0;
55
+ $options['ga_dash_excludesa'] = 0;
56
+ $network_settings = true;
57
+ }
58
+ $options = array_merge($options, $new_options);
59
+ $GADASH_Config->options = $options;
60
+ $GADASH_Config->set_plugin_options($network_settings);
61
  }
62
+ return $options;
63
+ }
64
 
65
+ private static function navigation_tabs($tabs)
66
+ {
67
+ echo '<div id="icon-themes" class="icon32"><br></div>';
68
+ echo '<h2 class="nav-tab-wrapper">';
69
+ foreach ($tabs as $tab => $name) {
70
+ echo "<a class='nav-tab' id='tab-$tab' href='#top#gadwp-$tab'>$name</a>";
 
 
71
  }
72
+ echo '</h2>';
73
+ }
74
 
75
+ public static function frontend_settings()
76
+ {
77
+ global $GADASH_Config;
78
+ if (! current_user_can('manage_options')) {
79
+ return;
80
+ }
81
+ $options = self::set_get_options('frontend');
82
+ if (isset($_POST['options']['ga_dash_hidden'])) {
83
+ $message = "<div class='updated'><p>" . __("Settings saved.", 'ga-dash') . "</p></div>";
84
+ if (! (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form'))) {
85
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
86
+ }
87
+ }
88
+ if (! $GADASH_Config->options['ga_dash_tableid_jail'] or ! $GADASH_Config->options['ga_dash_token']) {
89
+ $message = "<div class='error'><p>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash') . "</a> " . __('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
90
+ }
91
+ ?>
92
  <form name="ga_dash_form" method="post"
93
  action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
94
  <div class="wrap">
108
  <td class="roles title"><label for="ga_dash_access_front"><?php _e("Show stats to:", 'ga-dash' ); ?></label></td>
109
  <td class="roles">
110
  <?php
111
+ if (! isset($wp_roles)) {
112
+ $wp_roles = new WP_Roles();
113
+ }
114
+ $i = 0;
115
+ ?><table>
 
116
  <tr>
117
+ <?php
118
+ foreach ($wp_roles->role_names as $role => $name) {
119
+ if ($role != 'subscriber') {
120
+ $i ++;
121
+ ?>
122
  <td><label> <input
123
  type="checkbox" name="options[ga_dash_access_front][]"
124
  value="<?php echo $role; ?>"
126
  <?php echo $name; ?>
127
  </label></td>
128
  <?php
129
+ }
130
+ if ($i % 4 == 0) {
131
+ ?>
132
  </tr>
133
  <tr>
134
  <?php
135
+ }
136
+ }
137
+ ?>
 
138
  </td>
139
  </tr>
140
  <tr>
178
  </tr>
179
  </table>
180
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
181
+ <?php wp_nonce_field('gadash_form','gadash_security'); ?>
 
182
  <?php
183
+ self::output_sidebar();
184
+ }
185
 
186
+ public static function backend_settings()
187
+ {
188
+ global $GADASH_Config;
189
+ if (! current_user_can('manage_options')) {
190
+ return;
191
+ }
192
+ $options = self::set_get_options('backend');
193
+ if (isset($_POST['options']['ga_dash_hidden'])) {
194
+ $message = "<div class='updated'><p>" . __("Settings saved.", 'ga-dash') . "</p></div>";
195
+ if (! (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form'))) {
196
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
197
+ }
198
+ }
199
+ if (! $GADASH_Config->options['ga_dash_tableid_jail'] or ! $GADASH_Config->options['ga_dash_token']) {
200
+ $message = "<div class='error'><p>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash') . "</a> " . __('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
201
+ }
202
+ ?>
203
  <form name="ga_dash_form" method="post"
204
  action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
205
  <div class="wrap">
219
  <td class="roles title"><label for="ga_dash_access_back"><?php _e("Show stats to:", 'ga-dash' ); ?></label></td>
220
  <td class="roles">
221
  <?php
222
+ if (! isset($wp_roles)) {
223
+ $wp_roles = new WP_Roles();
224
+ }
225
+ $i = 0;
226
+ ?>
227
  <table>
228
  <tr>
229
  <?php
230
+ foreach ($wp_roles->role_names as $role => $name) {
231
+ if ($role != 'subscriber') {
232
+ $i ++;
233
+ ?>
234
  <td><label> <input
235
  type="checkbox" name="options[ga_dash_access_back][]"
236
  value="<?php echo $role; ?>"
238
  <?php echo $name; ?>
239
  </label></td>
240
  <?php
241
+ }
242
+ if ($i % 4 == 0) {
243
+ ?>
244
  </tr>
245
  <tr>
246
  <?php
247
+ }
248
+ }
249
+ ?>
 
250
  </td>
251
  </tr>
252
  <tr>
306
  </tr>
307
  </table>
308
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
309
+ <?php wp_nonce_field('gadash_form','gadash_security'); ?>
 
310
  <?php
311
+ self::output_sidebar();
312
+ }
313
 
314
+ public static function tracking_settings()
315
+ {
316
+ global $GADASH_Config;
317
+ /*
318
+ * Include Tools
319
+ */
320
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
321
+ $tools = new GADASH_Tools();
322
+ if (! current_user_can('manage_options')) {
323
+ return;
324
+ }
325
+ $options = self::set_get_options('tracking');
326
+ if (isset($_POST['options']['ga_dash_hidden'])) {
327
+ $message = "<div class='updated'><p>" . __("Settings saved.", 'ga-dash') . "</p></div>";
328
+ if (! (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form'))) {
329
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
330
+ }
331
+ }
332
+ if (! $GADASH_Config->options['ga_dash_tableid_jail']) {
333
+ $message = "<div class='error'><p>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash') . "</a> " . __('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
334
+ }
335
+ if (! $options['ga_dash_tracking']) {
336
+ $message = "<div class='error'><p>" . __("The tracking component is disabled. You should set", 'ga-dash') . " <strong>" . __("Tracking Options", 'ga-dash') . "</strong> " . __("to", 'ga-dash') . " <strong>" . __("Enabled", 'ga-dash') . "</strong>.</p></div>";
337
+ }
338
+ ?>
 
 
339
  <form name="ga_dash_form" method="post"
340
  action="<?php esc_url($_SERVER['REQUEST_URI']); ?>">
341
  <div class="wrap">
342
  <?php echo "<h2>" . __( "Google Analytics Tracking Code", 'ga-dash' ) . "</h2>"; ?>
343
  </div>
 
344
  <div id="poststuff">
345
  <div id="post-body" class="metabox-holder columns-2">
346
  <div id="post-body-content">
347
  <div class="settings-wrapper">
348
  <div class="inside">
349
  <?php
350
+ $tabs = array(
351
+ 'basic' => __("Basic Settings", 'ga-dash'),
352
+ 'events' => __("Events Tracking", 'ga-dash'),
353
+ 'custom' => __("Custom Definitions", 'ga-dash'),
354
+ 'exclude' => __("Exclude Tracking", 'ga-dash'),
355
+ 'advanced' => __("Advanced Settings", 'ga-dash')
356
+ );
357
+ self::navigation_tabs($tabs);
358
+ ?>
359
  <?php if (isset($message)) echo $message; ?>
360
  <div id="gadwp-basic">
361
  <table class="options">
376
  <tr>
377
  <td class="title"></td>
378
  <td><?php
379
+ $profile_info = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $GADASH_Config->options['ga_dash_tableid_jail']);
380
+ echo '<pre>' . __("View Name:", 'ga-dash') . "\t" . esc_html($profile_info[0]) . "<br />" . __("Tracking ID:", 'ga-dash') . "\t" . esc_html($profile_info[2]) . "<br />" . __("Default URL:", 'ga-dash') . "\t" . esc_html($profile_info[3]) . "<br />" . __("Time Zone:", 'ga-dash') . "\t" . esc_html($profile_info[5]) . '</pre>';
381
+ ?></td>
382
  </tr>
383
  <?php }?>
384
  <tr>
385
  <td colspan="2"><hr><?php echo "<h2>" . __( "Basic Tracking", 'ga-dash' ) . "</h2>"; ?></td>
386
  </tr>
 
387
  <tr>
388
  <td class="title"><label for="ga_dash_tracking_type"><?php _e("Tracking Type:", 'ga-dash' ); ?></label></td>
389
  <td><select id="ga_dash_tracking_type"
626
  <td class="roles title"><label for="ga_track_exclude"><?php _e("Exclude tracking for:", 'ga-dash' ); ?></label></td>
627
  <td class="roles">
628
  <?php
629
+ if (! isset($wp_roles)) {
630
+ $wp_roles = new WP_Roles();
631
+ }
632
+ $i = 0;
633
+ ?> <table>
634
  <tr>
635
  <?php
636
+ foreach ($wp_roles->role_names as $role => $name) {
637
+ $i ++;
638
+ ?>
639
  <td><label> <input type="checkbox"
640
  name="options[ga_track_exclude][]"
641
  value="<?php echo $role; ?>"
643
  <?php echo $name; ?>
644
  </label></td>
645
  <?php
646
+ if ($i % 4 == 0) {
647
+ ?>
648
  </tr>
649
  <tr>
650
  <?php
651
+ }
652
+ }
653
+ ?>
654
  </table>
655
  </td>
656
  </tr>
667
  </tr>
668
  </table>
669
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
670
+ <?php wp_nonce_field('gadash_form','gadash_security'); ?>
 
671
  <?php
672
+ self::output_sidebar();
673
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
674
 
675
+ public static function errors_debugging()
676
+ {
677
+ global $GADASH_Config;
678
+ if (! current_user_can('manage_options')) {
679
+ return;
680
+ }
681
+ $options = self::set_get_options('frontend');
682
+ if (! $GADASH_Config->options['ga_dash_tableid_jail'] or ! $GADASH_Config->options['ga_dash_token']) {
683
+ $message = "<div class='error'><p>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash') . "</a> " . __('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
684
+ }
685
+ ?>
686
  <div class="wrap">
687
  <?php echo "<h2>" . __( "Google Analytics Errors & Debugging", 'ga-dash' ) . "</h2>"; ?>
688
  </div>
693
  <div class="inside">
694
  <?php if (isset($message)) echo $message; ?>
695
  <?php
696
+ $tabs = array(
697
+ 'errors' => __("Errors & Details", 'ga-dash'),
698
+ 'config' => __("Plugin Settings", 'ga-dash')
699
+ );
700
+ self::navigation_tabs($tabs);
701
+ ?>
702
  <div id="gadwp-errors">
703
  <table class="options">
704
  <tr>
705
  <td>
706
  <?php echo __("For errors and/or other issues please check",'ga-dash')." <a href='https://deconf.com/google-analytics-dashboard-wordpress/?utm_source=gadwp_config&utm_medium=link&utm_content=errors_screen&utm_campaign=gadwp' target='_blank'>". __("the plugin documentation page",'ga-dash')."</a> ".__("and related tutorials",'ga-dash').".";?>
707
  </td>
708
+ </tr>
709
  <tr>
710
  <td><?php echo "<h2>" . __( "Last Error detected", 'ga-dash' ) . "</h2>"; ?></td>
711
  </tr>
712
  <tr>
713
  <td>
714
  <?php
715
+ $errors = esc_html(print_r(get_transient('ga_dash_lasterror'), true)) ? esc_html(print_r(get_transient('ga_dash_lasterror'), true)) : __("None", 'ga-dash');
716
+ echo '<pre class="log_data">Last Error: ';
717
+ echo $errors;
718
+ ?></pre>
719
  </td>
720
  </tr>
721
  <tr>
724
  <tr>
725
  <td>
726
  <?php
727
+ echo '<pre class="log_data">Error Details: ';
728
+ $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", 'ga-dash');
729
+ echo $error_details;
730
+ ?></pre><br />
731
  <hr>
732
  </td>
 
 
733
  <tr>
734
 
735
  </table>
741
  </tr>
742
  <tr>
743
  <td><pre class="log_data"><?php
744
+ $anonim = $GADASH_Config->options;
745
+ $anonim['wp_version'] = $wp_version;
746
+ $anonim['gadwp_version'] = GADWP_CURRENT_VERSION;
747
+ if ($anonim['ga_dash_token']) {
748
+ $anonim['ga_dash_token'] = 'HIDDEN';
749
+ }
750
+ if ($anonim['ga_dash_refresh_token']) {
751
+ $anonim['ga_dash_refresh_token'] = 'HIDDEN';
752
+ }
753
+ if ($anonim['ga_dash_clientid']) {
754
+ $anonim['ga_dash_clientid'] = 'HIDDEN';
755
+ }
756
+ if ($anonim['ga_dash_clientsecret']) {
757
+ $anonim['ga_dash_clientsecret'] = 'HIDDEN';
758
+ }
759
+ if ($anonim['ga_dash_apikey']) {
760
+ $anonim['ga_dash_apikey'] = 'HIDDEN';
761
+ }
762
+ echo esc_html(print_r($anonim, true));
763
+ ?></pre><br />
764
+ <hr></td>
765
  </tr>
766
  </table>
767
  </div>
 
768
  <?php
769
+ self::output_sidebar();
770
+ }
771
 
772
+ public static function general_settings()
773
+ {
774
+ global $GADASH_Config;
775
+ global $wp_version;
776
+ /*
777
+ * Include Tools
778
+ */
779
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
780
+ $tools = new GADASH_Tools();
781
+ if (! current_user_can('manage_options')) {
782
+ return;
783
+ }
784
+ $options = self::set_get_options('general');
785
+ /*
786
+ * Include GAPI
787
+ */
788
+ echo '<div id="gapi-warning" class="updated"><p>' . __('Loading the required libraries. If this results in a blank screen or a fatal error, try this solution:', "ga-dash") . ' <a href="https://deconf.com/ask/question/ga-dashboard-absolutely-empty-general-settings#answer-770">Library conflicts between WordPress plugins</a></p></div>';
789
+ include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
790
+ global $GADASH_GAPI;
791
+ echo '<script type="text/javascript">jQuery("#gapi-warning").hide()</script>';
792
+ if (isset($_POST['ga_dash_code'])) {
793
+ if (! stripos('x' . $_POST['ga_dash_code'], 'UA-', 1) == 1) {
794
+ try {
795
+ $GADASH_GAPI->client->authenticate($_POST['ga_dash_code']);
796
+ $GADASH_Config->options['ga_dash_token'] = $GADASH_GAPI->client->getAccessToken();
797
+ $google_token = json_decode($GADASH_GAPI->client->getAccessToken());
798
+ $GADASH_Config->options['ga_dash_refresh_token'] = $google_token->refresh_token;
799
+ $GADASH_Config->set_plugin_options();
800
+ $message = "<div class='updated'><p>" . __("Plugin authorization succeeded.", 'ga-dash') . "</p></div>";
801
+ $options = self::set_get_options('general');
802
+ delete_transient('ga_dash_gapi_errors');
803
+ delete_transient('ga_dash_lasterror');
804
+ } catch (Google_IO_Exception $e) {
805
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $GADASH_GAPI->error_timeout);
806
+ return false;
807
+ } catch (Google_Service_Exception $e) {
808
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html("(" . $e->getCode() . ") " . $e->getMessage()), $GADASH_GAPI->error_timeout);
809
+ set_transient('ga_dash_gapi_errors', $e->getErrors(), $GADASH_GAPI->error_timeout);
810
+ return $e->getCode();
811
+ } catch (Exception $e) {
812
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e) . "\nResponseHttpCode:" . $e->getCode(), $GADASH_GAPI->error_timeout);
813
+ $GADASH_GAPI->ga_dash_reset_token(false);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
814
  }
815
+ } else {
816
+ $message = "<div class='error'><p>" . __("The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> (UA-XXXXX-X). Try again, and use the red link to get your access code", 'ga-dash') . ".</p></div>";
817
+ }
818
+ }
819
+ if ($GADASH_Config->options['ga_dash_token'] and $GADASH_GAPI->client->getAccessToken()) {
820
+ if ($GADASH_Config->options['ga_dash_profile_list']) {
821
+ $profiles = $GADASH_Config->options['ga_dash_profile_list'];
822
+ } else {
823
+ $profiles = $GADASH_GAPI->refresh_profiles();
824
+ }
825
+ if ($profiles) {
826
+ $GADASH_Config->options['ga_dash_profile_list'] = $profiles;
827
+ if (! $GADASH_Config->options['ga_dash_tableid_jail']) {
828
+ $profile = $tools->guess_default_domain($profiles);
829
+ $GADASH_Config->options['ga_dash_tableid_jail'] = $profile;
830
+ $GADASH_Config->options['ga_dash_tableid'] = $profile;
831
  }
832
+ $GADASH_Config->set_plugin_options();
833
+ $options = self::set_get_options('general');
834
+ }
835
+ }
836
+ if (isset($_POST['Clear'])) {
837
+ if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
838
+ $tools->ga_dash_clear_cache();
839
+ $message = "<div class='updated'><p>" . __("Cleared Cache.", 'ga-dash') . "</p></div>";
840
+ } else {
841
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
842
+ }
843
+ }
844
+ if (isset($_POST['Reset'])) {
845
+ if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
846
+ $GADASH_GAPI->ga_dash_reset_token(true);
847
+ $tools->ga_dash_clear_cache();
848
+ $message = "<div class='updated'><p>" . __("Token Reseted and Revoked.", 'ga-dash') . "</p></div>";
849
+ $options = self::set_get_options('Reset');
850
+ } else {
851
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
852
+ }
853
+ }
854
+ if (isset($_POST['options']['ga_dash_hidden']) and ! isset($_POST['Clear']) and ! isset($_POST['Reset'])) {
855
+ $message = "<div class='updated'><p>" . __("Settings saved.", 'ga-dash') . "</p></div>";
856
+ if (! (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form'))) {
857
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
858
+ }
859
+ }
860
+ if (isset($_POST['Hide'])) {
861
+ if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
862
+ $message = "<div class='updated'><p>" . __("All other domains/properties were removed.", 'ga-dash') . "</p></div>";
863
+ $lock_profile = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $GADASH_Config->options['ga_dash_tableid_jail']);
864
+ $GADASH_Config->options['ga_dash_profile_list'] = array(
865
+ $lock_profile
866
+ );
867
+ $options = self::set_get_options('general');
868
+ } else {
869
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
870
+ }
871
+ }
872
+ ?>
873
  <div class="wrap">
874
  <?php echo "<h2>" . __( "Google Analytics Settings", 'ga-dash' ) . "</h2>"; ?><hr>
875
  </div>
878
  <div id="post-body-content">
879
  <div class="settings-wrapper">
880
  <div class="inside">
881
+ if ($GADASH_GAPI->gapi_errors_handler()) {
882
+ $message = "<div class='error'><p>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash') . "</a> " . __('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
883
+ }
884
+ if (isset($_POST['Authorize'])) {
885
+ $tools->ga_dash_clear_cache();
886
+ $GADASH_GAPI->token_request();
887
+ echo "<div class='updated'><p>" . __("Use the red link (see below) to generate and get your access code!", 'ga-dash') . "</p></div>";
888
+ } else {
889
+ if (isset($message))
890
+ echo $message;
891
+ ?>
 
 
892
  <form name="ga_dash_form" method="post"
893
  action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
894
  <input type="hidden" name="options[ga_dash_hidden]" value="Y">
903
  </td>
904
  </tr>
905
  <?php
906
+ if (! $options['ga_dash_token'] or $options['ga_dash_userapi']) {
907
+ ?>
908
  <tr>
909
  <td colspan="2" class="info"><input
910
  name="options[ga_dash_userapi]" type="checkbox"
914
  <?php echo ($options['ga_dash_network'])?'disabled="disabled"':''; ?> /><?php _e ( " use your own API Project credentials", 'ga-dash' );?>
915
  </td>
916
  </tr>
917
+ }
918
+ if ($options['ga_dash_userapi']) {
919
+ ?>
920
  <tr>
921
  <td class="title"><label for="options[ga_dash_apikey]"><?php _e("API Key:", 'ga-dash'); ?></label>
922
  </td>
943
  </td>
944
  </tr>
945
  <?php
946
+ }
947
+ ?>
948
  <?php
949
+ if ($options['ga_dash_token']) {
950
+ ?>
951
  <tr>
952
  <td colspan="2"><input type="submit" name="Reset"
953
  class="button button-secondary"
969
  <?php disabled(is_array($options['ga_dash_profile_list']), false); ?>
970
  name="options[ga_dash_tableid_jail]">
971
  <?php
972
+ if (is_array($options['ga_dash_profile_list'])) {
973
+ foreach ($options['ga_dash_profile_list'] as $items) {
974
+ if ($items[3]) {
975
+ echo '<option value="' . esc_attr($items[1]) . '" ' . selected($items[1], $options['ga_dash_tableid_jail']);
976
+ echo ' title="' . __("View Name:", 'ga-dash') . ' ' . esc_attr($items[0]) . '">' . esc_html($tools->ga_dash_get_profile_domain($items[3])) . ' &#8658; ' . esc_attr($items[0]) . '</option>';
977
+ }
978
+ }
979
+ } else {
980
+ echo '<option value="">' . __("Property not found", 'ga-dash') . '</option>';
981
+ }
982
+ ?>
983
  </select>
984
+ if (count($options['ga_dash_profile_list']) > 1) {
985
+ _e("and/or hide all other domains", 'ga-dash');
986
+ ?>
987
  <input type="submit" name="Hide" class="button button-secondary"
988
  value="<?php _e( "Hide Now", 'ga-dash' ); ?>" />
989
  <?php
990
+ }
991
+ ?>
992
  </td>
993
  </tr>
994
  <?php
995
+ if ($options['ga_dash_tableid_jail']) {
996
+ ?>
997
  <tr>
998
  <td class="title"></td>
999
  <td><?php
1000
+ $profile_info = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $GADASH_Config->options['ga_dash_tableid_jail']);
1001
+ echo '<pre>' . __("View Name:", 'ga-dash') . "\t" . esc_html($profile_info[0]) . "<br />" . __("Tracking ID:", 'ga-dash') . "\t" . esc_html($profile_info[2]) . "<br />" . __("Default URL:", 'ga-dash') . "\t" . esc_html($profile_info[3]) . "<br />" . __("Time Zone:", 'ga-dash') . "\t" . esc_html($profile_info[5]) . '</pre>';
1002
+ ?></td>
1003
  </tr>
1004
  <?php
1005
+ }
1006
+ ?>
1007
  <td class="title"><label for="ga_dash_style"><?php _e("Theme Color:", 'ga-dash' ); ?></label></td>
1008
  <td><input type="text" id="ga_dash_style"
1009
  class="ga_dash_style" name="options[ga_dash_style]"
1024
  name="Submit" class="button button-primary"
1025
  value="<?php _e('Save Changes', 'ga-dash' ) ?>" /></td>
1026
  </tr>
1027
+ } else {
1028
+ ?>
1029
  <tr>
1030
  <td colspan="2"><hr></td>
1031
  </tr>
1044
  </table>
1045
  </form>
1046
  <?php
 
 
 
 
 
 
1047
  self::output_sidebar();
1048
+ return;
1049
+ }
1050
+ ?>
1051
+ </form>
1052
  }
1053
+ self::output_sidebar();
1054
+ }
1055
+ // Network Settings
1056
+ public static function general_settings_network()
1057
+ {
1058
+ global $GADASH_Config;
1059
+ global $wp_version;
1060
+ /*
1061
+ * Include Tools
1062
+ */
1063
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
1064
+ $tools = new GADASH_Tools();
1065
+ if (! current_user_can('manage_network_options')) {
1066
+ return;
1067
+ }
1068
+ $options = self::set_get_options('network');
1069
+ /*
1070
+ * Include GAPI
1071
+ */
1072
+ echo '<div id="gapi-warning" class="updated"><p>' . __('Loading the required libraries. If this results in a blank screen or a fatal error, try this solution:', "ga-dash") . ' <a href="https://deconf.com/ask/question/ga-dashboard-absolutely-empty-general-settings#answer-770">Library conflicts between WordPress plugins</a></p></div>';
1073
+ include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
1074
+ global $GADASH_GAPI;
1075
+ echo '<script type="text/javascript">jQuery("#gapi-warning").hide()</script>';
1076
+ if (isset($_POST['ga_dash_code'])) {
1077
+ if (! stripos('x' . $_POST['ga_dash_code'], 'UA-', 1) == 1) {
1078
+ try {
1079
+ $GADASH_GAPI->client->authenticate($_POST['ga_dash_code']);
1080
+ $GADASH_Config->options['ga_dash_token'] = $GADASH_GAPI->client->getAccessToken();
1081
+ $google_token = json_decode($GADASH_GAPI->client->getAccessToken());
1082
+ $GADASH_Config->options['ga_dash_refresh_token'] = $google_token->refresh_token;
1083
+ $GADASH_Config->set_plugin_options(true);
1084
+ $message = "<div class='updated'><p>" . __("Plugin authorization succeeded.", 'ga-dash') . "</p></div>";
1085
+ $options = self::set_get_options('network');
1086
+ if (is_multisite()) { // Cleanup errors on the entire network
1087
+ foreach (wp_get_sites(array(
1088
+ 'limit' => apply_filters('gadwp_sites_limit', 100)
1089
+ )) as $blog) {
1090
+ switch_to_blog($blog['blog_id']);
1091
+ delete_transient('ga_dash_gapi_errors');
1092
+ restore_current_blog();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1093
  }
1094
+ } else {
1095
+ delete_transient('ga_dash_gapi_errors');
1096
+ }
1097
+ } catch (Google_IO_Exception $e) {
1098
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $GADASH_GAPI->error_timeout);
1099
+ return false;
1100
+ } catch (Google_Service_Exception $e) {
1101
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html("(" . $e->getCode() . ") " . $e->getMessage()), $GADASH_GAPI->error_timeout);
1102
+ set_transient('ga_dash_gapi_errors', $e->getErrors(), $GADASH_GAPI->error_timeout);
1103
+ return $e->getCode();
1104
+ } catch (Exception $e) {
1105
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e) . "\nResponseHttpCode:" . $e->getCode(), $GADASH_GAPI->error_timeout);
1106
+ $GADASH_GAPI->ga_dash_reset_token(false);
1107
  }
1108
+ } else {
1109
+ $message = "<div class='error'><p>" . __("The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> (UA-XXXXX-X). Try again, and use the red link to get your access code", 'ga-dash') . ".</p></div>";
1110
+ }
1111
+ }
1112
+ if (isset($_POST['Refresh'])) {
1113
+ if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
1114
+ $GADASH_Config->options['ga_dash_profile_list'] = '';
1115
+ $message = "<div class='updated'><p>" . __("Properties refreshed.", 'ga-dash') . "</p></div>";
1116
+ $options = self::set_get_options('network');
1117
+ } else {
1118
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
1119
+ }
1120
+ }
1121
+ if ($GADASH_Config->options['ga_dash_token'] and $GADASH_GAPI->client->getAccessToken()) {
1122
+ if ($GADASH_Config->options['ga_dash_profile_list']) {
1123
+ $profiles = $GADASH_Config->options['ga_dash_profile_list'];
1124
+ } else {
1125
+ $profiles = $GADASH_GAPI->refresh_profiles();
1126
+ }
1127
+ if ($profiles) {
1128
+ $GADASH_Config->options['ga_dash_profile_list'] = $profiles;
1129
+ if (isset($GADASH_Config->options['ga_dash_tableid_jail']) and ! $GADASH_Config->options['ga_dash_tableid_jail']) {
1130
+ $profile = $tools->guess_default_domain($profiles);
1131
+ $GADASH_Config->options['ga_dash_tableid_jail'] = $profile;
1132
+ $GADASH_Config->options['ga_dash_tableid'] = $profile;
1133
  }
1134
+ $GADASH_Config->set_plugin_options(true);
1135
+ $options = self::set_get_options('network');
1136
+ }
1137
+ }
1138
+ if (isset($_POST['Clear'])) {
1139
+ if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
1140
+ $tools->ga_dash_clear_cache();
1141
+ $message = "<div class='updated'><p>" . __("Cleared Cache.", 'ga-dash') . "</p></div>";
1142
+ } else {
1143
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
1144
+ }
1145
+ }
1146
+ if (isset($_POST['Reset'])) {
1147
+ if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
1148
+ $GADASH_GAPI->ga_dash_reset_token(true);
1149
+ $tools->ga_dash_clear_cache();
1150
+ $message = "<div class='updated'><p>" . __("Token Reseted and Revoked.", 'ga-dash') . "</p></div>";
1151
+ $options = self::set_get_options('Reset');
1152
+ } else {
1153
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
1154
+ }
1155
+ }
1156
+ if (isset($_POST['options']['ga_dash_hidden']) and ! isset($_POST['Clear']) and ! isset($_POST['Reset']) and ! isset($_POST['Refresh'])) {
1157
+ $message = "<div class='updated'><p>" . __("Settings saved.", 'ga-dash') . "</p></div>";
1158
+ if (! (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form'))) {
1159
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
1160
+ }
1161
+ }
1162
+ if (isset($_POST['Hide'])) {
1163
+ if (isset($_POST['gadash_security']) && wp_verify_nonce($_POST['gadash_security'], 'gadash_form')) {
1164
+ $message = "<div class='updated'><p>" . __("All other domains/properties were removed.", 'ga-dash') . "</p></div>";
1165
+ $lock_profile = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $GADASH_Config->options['ga_dash_tableid_jail']);
1166
+ $GADASH_Config->options['ga_dash_profile_list'] = array(
1167
+ $lock_profile
1168
+ );
1169
+ $options = self::set_get_options('network');
1170
+ } else {
1171
+ $message = "<div class='error'><p>" . __("Cheating Huh?", 'ga-dash') . "</p></div>";
1172
+ }
1173
+ }
1174
+ ?>
1175
  <div class="wrap">
1176
  <?php echo "<h2>" . __( "Google Analytics Settings", 'ga-dash' ) . "</h2>"; ?><hr>
1177
  </div>
1180
  <div id="post-body-content">
1181
  <div class="settings-wrapper">
1182
  <div class="inside">
1183
+ if ($GADASH_GAPI->gapi_errors_handler()) {
1184
+ $message = "<div class='error'><p>" . __("Something went wrong, check", 'ga-dash') . " <a href='" . menu_page_url('gadash_errors_debugging', false) . "'>" . __('Errors & Debug', 'ga-dash') . "</a> " . __('or', 'ga-dash') . " <a href='" . menu_page_url('gadash_settings', false) . "'>" . __('auhorize the plugin', 'ga-dash') . "</a>.</p></div>";
1185
+ }
1186
+ if (isset($_POST['Authorize'])) {
1187
+ $tools->ga_dash_clear_cache();
1188
+ $GADASH_GAPI->token_request();
1189
+ echo "<div class='updated'><p>" . __("Use the red link (see below) to generate and get your access code!", 'ga-dash') . "</p></div>";
1190
+ } else {
1191
+ if (isset($message))
1192
+ echo $message;
1193
+ ?>
1194
  <form name="ga_dash_form" method="post"
1195
  action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>">
1196
  <input type="hidden" name="options[ga_dash_hidden]"
1229
  </td>
1230
  </tr>
1231
  <?php
1232
+ if (! $options['ga_dash_token'] or $options['ga_dash_userapi']) {
1233
+ ?>
1234
  <tr>
1235
  <td colspan="2" class="info"><input
1236
  name="options[ga_dash_userapi]" type="checkbox"
1239
  onchange="this.form.submit()" /><?php _e ( " use your own API Project credentials", 'ga-dash' );?>
1240
  </td>
1241
  </tr>
1242
+ }
1243
+ if ($options['ga_dash_userapi']) {
1244
+ ?>
1245
  <tr>
1246
  <td class="title"><label for="options[ga_dash_apikey]"><?php _e("API Key:", 'ga-dash'); ?></label>
1247
  </td>
1271
  </td>
1272
  </tr>
1273
  <?php
1274
+ }
1275
+ ?>
1276
  <?php
1277
+ if ($options['ga_dash_token']) {
1278
+ ?>
1279
  <tr>
1280
  <td colspan="2"><input type="submit" name="Reset"
1281
  class="button button-secondary"
1294
  <td colspan="2"><?php echo "<h2>" . __( "Properties/Views Settings", 'ga-dash' ) . "</h2>"; ?></td>
1295
  </tr>
1296
  <?php
1297
+ if (isset($options['ga_dash_tableid_network'])) {
1298
+ $options['ga_dash_tableid_network'] = json_decode(json_encode($options['ga_dash_tableid_network']), FALSE);
1299
+ }
1300
+ foreach (wp_get_sites(array(
1301
+ 'limit' => apply_filters('gadwp_sites_limit', 100)
1302
+ )) as $blog) {
1303
+ ?>
1304
  <tr>
1305
  <td class="title-select"><label
1306
  for="ga_dash_tableid_network"><?php echo '<strong>'.$blog['domain'].$blog['path'].'</strong>: ';?></label></td>
1308
  <?php disabled(is_array($options['ga_dash_profile_list']),false);?>
1309
  name="options[ga_dash_tableid_network][<?php echo $blog['blog_id'];?>]">
1310
  <?php
1311
+ if (is_array($options['ga_dash_profile_list'])) {
1312
+ foreach ($options['ga_dash_profile_list'] as $items) {
1313
+ if ($items[3]) {
1314
+ echo '<option value="' . esc_attr($items[1]) . '" ' . selected($items[1], isset($options['ga_dash_tableid_network']->$blog['blog_id']) ? $options['ga_dash_tableid_network']->$blog['blog_id'] : '');
1315
+ echo ' title="' . __("View Name:", 'ga-dash') . ' ' . esc_attr($items[0]) . '">' . $tools->ga_dash_get_profile_domain($items[3]) . ' &#8658; ' . esc_attr($items[0]) . '</option>';
1316
+ }
1317
+ }
1318
+ } else {
1319
+ echo '<option value="">' . __("Property not found", 'ga-dash') . '</option>';
1320
+ }
1321
+ ?>
1322
  </select><br /></td>
1323
  </tr>
1324
  <?php
1325
+ }
1326
+ ?>
1327
  <tr>
1328
  <td colspan="2"><hr><?php echo "<h2>" . __( "Exclude Tracking", 'ga-dash' ) . "</h2>"; ?></td>
1329
  </tr>
1350
  name="Submit" class="button button-primary"
1351
  value="<?php _e('Save Changes', 'ga-dash' ) ?>" /></td>
1352
  </tr>
1353
+ } else {
1354
+ ?>
1355
  <td colspan="2"><hr></td>
1356
  </tr>
1357
  <tr>
1358
  <td colspan="2"><input type="submit" name="Authorize"
1359
  class="button button-secondary" id="authorize"
1360
+ value="<?php _e( "Authorize Plugin", 'ga-dash' ); ?>" />
1361
  <input type="submit" name="Clear"
1362
  class="button button-secondary"
1363
  value="<?php _e( "Clear Cache", 'ga-dash' ); ?>" /></td>
1369
  </table>
1370
  </form>
1371
  <?php
1372
+ self::output_sidebar();
1373
+ return;
1374
+ }
1375
+ ?>
1376
  </table>
1377
  </form>
1378
  <?php
 
 
1379
  }
1380
+ self::output_sidebar();
1381
+ }
1382
 
1383
+ public static function output_sidebar()
1384
+ {
1385
+ global $GADASH_Config;
1386
+ ?>
1387
  </div>
1388
  </div>
1389
  </div>
1465
  </div>
1466
  </div>
1467
  <?php
1468
+ /*
1469
+ * Include Tools
1470
+ */
1471
+ }
 
 
 
 
 
 
1472
  }
config.php CHANGED
@@ -7,274 +7,257 @@
7
  */
8
  if (! class_exists('GADASH_Config')) {
9
 
10
- final class GADASH_Config
11
- {
12
-
13
- public $options;
14
-
15
- public $country_codes;
16
-
17
- public $plugin_path, $plugin_url;
 
 
18
 
19
- public function __construct()
20
- {
21
- $this->getPluginPath();
22
-
23
- // get plugin options
24
- $this->get_plugin_options();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
-
27
- // Validates data before storing
28
- private static function validate_data($options)
29
- {
30
- if (isset($options['ga_realtime_pages'])) {
31
- $options['ga_realtime_pages'] = (int) $options['ga_realtime_pages'];
32
- }
33
- if (isset($options['ga_crossdomain_tracking'])) {
34
- $options['ga_crossdomain_tracking'] = (int) $options['ga_crossdomain_tracking'];
35
- }
36
- if (isset($options['ga_crossdomain_list'])) {
37
- $options['ga_crossdomain_list'] = sanitize_text_field($options['ga_crossdomain_list']);
38
- }
39
- if (isset($options['ga_dash_apikey'])) {
40
- $options['ga_dash_apikey'] = sanitize_text_field($options['ga_dash_apikey']);
41
- }
42
- if (isset($options['ga_dash_clientid'])) {
43
- $options['ga_dash_clientid'] = sanitize_text_field($options['ga_dash_clientid']);
44
- }
45
- if (isset($options['ga_dash_clientsecret'])) {
46
- $options['ga_dash_clientsecret'] = sanitize_text_field($options['ga_dash_clientsecret']);
47
- }
48
- if (isset($options['ga_dash_style'])) {
49
- $options['ga_dash_style'] = sanitize_text_field($options['ga_dash_style']);
50
- }
51
- if (isset($options['ga_event_downloads'])) {
52
- if (empty($options['ga_event_downloads'])) {
53
- $options['ga_event_downloads'] = 'zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*';
54
- }
55
- $options['ga_event_downloads'] = sanitize_text_field($options['ga_event_downloads']);
56
- }
57
- if (isset($options['ga_speed_samplerate']) && ($options['ga_speed_samplerate'] < 1 || $options['ga_speed_samplerate'] > 100)) {
58
- $options['ga_speed_samplerate'] = 1;
59
- }
60
-
61
- if (isset($options['ga_target_geomap'])) {
62
- $options['ga_target_geomap'] = sanitize_text_field($options['ga_target_geomap']);
63
- }
64
-
65
- if (isset($options['ga_author_dimindex'])) {
66
- $options['ga_author_dimindex'] = (int) $options['ga_author_dimindex'];
67
- }
68
- if (isset($options['ga_category_dimindex'])) {
69
- $options['ga_category_dimindex'] = (int) $options['ga_category_dimindex'];
70
- }
71
- if (isset($options['ga_user_dimindex'])) {
72
- $options['ga_user_dimindex'] = (int) $options['ga_user_dimindex'];
73
- }
74
- if (isset($options['ga_pubyear_dimindex'])) {
75
- $options['ga_pubyear_dimindex'] = (int) $options['ga_pubyear_dimindex'];
76
- }
77
-
78
- if (isset($options['ga_aff_tracking'])) {
79
- $options['ga_aff_tracking'] = (int) $options['ga_aff_tracking'];
80
- }
81
-
82
- if (isset($options['ga_event_affiliates'])) {
83
- if (empty($options['ga_event_affiliates'])) {
84
- $options['ga_event_affiliates'] = '/out/';
85
- }
86
- $options['ga_event_affiliates'] = sanitize_text_field($options['ga_event_affiliates']);
87
- }
88
-
89
- return $options;
90
  }
 
 
 
 
91
 
92
- public function set_plugin_options($network_settings = false)
93
- {
94
- // Handle Network Mode
95
- $options = $this->options;
96
- $get_network_options = get_site_option('gadash_network_options');
97
- $old_network_options = (array) json_decode($get_network_options);
98
-
99
- if (is_multisite()) {
100
- if ($network_settings) { // Retrieve network options, clear blog options, store both to db
101
- $network_options['ga_dash_token'] = $this->options['ga_dash_token'];
102
- $options['ga_dash_token'] = '';
103
- $network_options['ga_dash_refresh_token'] = $this->options['ga_dash_refresh_token'];
104
- $options['ga_dash_refresh_token'] = '';
105
- if (is_network_admin()) {
106
- $network_options['ga_dash_profile_list'] = $this->options['ga_dash_profile_list'];
107
- $options['ga_dash_profile_list'] = array();
108
- $network_options['ga_dash_apikey'] = $this->options['ga_dash_apikey'];
109
- $options['ga_dash_apikey'] = '';
110
- $network_options['ga_dash_clientid'] = $this->options['ga_dash_clientid'];
111
- $options['ga_dash_clientid'] = '';
112
- $network_options['ga_dash_clientsecret'] = $this->options['ga_dash_clientsecret'];
113
- $options['ga_dash_clientsecret'] = '';
114
- $network_options['ga_dash_userapi'] = $this->options['ga_dash_userapi'];
115
- $options['ga_dash_userapi'] = 0;
116
- $network_options['ga_dash_network'] = $this->options['ga_dash_network'];
117
- $network_options['ga_dash_excludesa'] = $this->options['ga_dash_excludesa'];
118
- unset($options['ga_dash_network']);
119
-
120
- if (isset($this->options['ga_dash_tableid_network'])) {
121
- $network_options['ga_dash_tableid_network'] = $this->options['ga_dash_tableid_network'];
122
- unset($options['ga_dash_tableid_network']);
123
- }
124
- }
125
- update_site_option('gadash_network_options', json_encode($this->validate_data(array_merge($old_network_options, $network_options))));
126
- }
127
- }
128
-
129
- if (current_user_can('manage_options')) {
130
- update_option('gadash_options', json_encode($this->validate_data($options)));
131
- }
132
  }
 
 
 
133
 
134
- public function getPluginPath()
135
- {
136
- /*
137
- * Set Plugin Path
138
- */
139
- $this->plugin_path = dirname(__FILE__);
140
- $this->plugin_url = plugins_url("", __FILE__);
141
- }
142
 
143
- private function get_plugin_options()
144
- {
145
- /*
146
- * Get plugin options
147
- */
148
- global $blog_id;
149
- /*
150
- * Include Tools
151
- */
152
- include_once ($this->plugin_path . '/tools/tools.php');
153
- $tools = new GADASH_Tools();
154
-
155
- if (! get_option('gadash_options')) {
156
- GADASH_Install::install();
157
- }
158
- $this->options = (array) json_decode(get_option('gadash_options'));
159
-
160
- // Maintain Compatibility
161
- $this->maintain_compatibility();
162
-
163
- // Handle Network Mode
164
- if (is_multisite()) {
165
- $get_network_options = get_site_option('gadash_network_options');
166
- $network_options = (array) json_decode($get_network_options);
167
- if (isset($network_options['ga_dash_network']) && ($network_options['ga_dash_network'])) {
168
-
169
- $network_options = (array) json_decode($get_network_options);
170
-
171
- if (! is_network_admin() && ! empty($network_options['ga_dash_profile_list'])) {
172
- $network_options['ga_dash_profile_list'] = array(
173
- 0 => $tools->get_selected_profile($network_options['ga_dash_profile_list'], $network_options['ga_dash_tableid_network']->$blog_id)
174
- );
175
- $network_options['ga_dash_tableid_jail'] = $network_options['ga_dash_profile_list'][0][1];
176
- }
177
-
178
- $this->options = array_merge($this->options, $network_options);
179
- }
180
- }
181
  }
 
 
182
 
183
- private function maintain_compatibility()
184
- {
185
- if (GADWP_CURRENT_VERSION != get_option('gadwp_version')) {
186
- include_once ($this->plugin_path . '/tools/tools.php');
187
- $tools = new GADASH_Tools();
188
- $tools->ga_dash_clear_cache();
189
- delete_transient('gadash_lasterror');
190
- update_option('gadwp_version', GADWP_CURRENT_VERSION);
191
- if (is_multisite()) { // Cleanup errors on the entire network
192
- foreach (wp_get_sites(array( 'limit' => apply_filters('gadwp_sites_limit', 100))) as $blog) {
193
- switch_to_blog($blog['blog_id']);
194
- delete_transient('ga_dash_gapi_errors');
195
- restore_current_blog();
196
- }
197
- } else {
198
- delete_transient('ga_dash_gapi_errors');
199
- }
200
- }
201
-
202
- if (! isset($this->options['ga_enhanced_links'])) {
203
- $this->options['ga_enhanced_links'] = 0;
204
- }
205
-
206
- if (! isset($this->options['ga_enhanced_network'])) {
207
- $this->options['ga_dash_network'] = 0;
208
- }
209
-
210
- if (! isset($this->options['ga_enhanced_excludesa'])) {
211
- $this->options['ga_dash_excludesa'] = 0;
212
- }
213
-
214
- if (! isset($this->options['ga_dash_remarketing'])) {
215
- $this->options['ga_dash_remarketing'] = 0;
216
- }
217
-
218
- if (! isset($this->options['ga_dash_adsense'])) {
219
- $this->options['ga_dash_adsense'] = 0;
220
- }
221
-
222
- if (! isset($this->options['ga_speed_samplerate'])) {
223
- $this->options['ga_speed_samplerate'] = 1;
224
- }
225
-
226
- if (! isset($this->options['ga_event_bouncerate'])) {
227
- $this->options['ga_event_bouncerate'] = 0;
228
- }
229
-
230
- if (! is_array($this->options['ga_dash_access_front']) or empty($this->options['ga_dash_access_front'])) {
231
- $this->options['ga_dash_access_front'] = array();
232
- $this->options['ga_dash_access_front'][] = 'administrator';
233
- }
234
-
235
- if (! is_array($this->options['ga_dash_access_back']) or empty($this->options['ga_dash_access_back'])) {
236
- $this->options['ga_dash_access_back'] = array();
237
- $this->options['ga_dash_access_back'][] = 'administrator';
238
- }
239
-
240
- if (! is_array($this->options['ga_track_exclude'])) {
241
- $this->options['ga_track_exclude'] = array();
242
- }
243
-
244
- if (! isset($this->options['ga_crossdomain_tracking'])) {
245
- $this->options['ga_crossdomain_tracking'] = 0;
246
- }
247
- if (! isset($this->options['ga_crossdomain_list'])) {
248
- $this->options['ga_crossdomain_list'] = '';
249
- }
250
- if (! isset($this->options['ga_author_dimindex'])) {
251
- $this->options['ga_author_dimindex'] = 0;
252
- }
253
- if (! isset($this->options['ga_category_dimindex'])) {
254
- $this->options['ga_category_dimindex'] = 0;
255
- }
256
- if (! isset($this->options['ga_user_dimindex'])) {
257
- $this->options['ga_user_dimindex'] = 0;
258
- }
259
- if (! isset($this->options['ga_pubyear_dimindex'])) {
260
- $this->options['ga_pubyear_dimindex'] = 0;
261
- }
262
- if (! isset($this->options['ga_event_affiliates'])) {
263
- $this->options['ga_event_affiliates'] = '/out/';
264
- }
265
- if (! isset($this->options['ga_aff_tracking'])) {
266
- $this->options['ga_aff_tracking'] = 0;
267
- }
268
- if (! isset($this->options['ga_hash_tracking'])) {
269
- $this->options['ga_hash_tracking'] = 0;
270
- }
271
- if (isset($this->options['ga_tracking_code'])) {
272
- unset($this->options['ga_tracking_code']);
273
- }
274
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  }
 
276
  }
277
-
278
  if (! isset($GLOBALS['GADASH_Config'])) {
279
- $GLOBALS['GADASH_Config'] = new GADASH_Config();
280
  }
7
  */
8
  if (! class_exists('GADASH_Config')) {
9
 
10
+ final class GADASH_Config
11
+ {
12
+ public $options;
13
+ public $country_codes;
14
+ public $plugin_path, $plugin_url;
15
+ public $access = array(
16
+ '65556128781.apps.googleusercontent.com',
17
+ 'Kc7888wgbc_JbeCpbFjnYpwE',
18
+ 'AIzaSymApG7LlUoHc29ZeC_dsShVaBEX15SfRl_WY'
19
+ );
20
 
21
+ public function __construct()
22
+ {
23
+ $this->getPluginPath();
24
+ // get plugin options
25
+ $this->get_plugin_options();
26
+ $this->access = array_map(array(
27
+ $this,
28
+ 'map'
29
+ ), $this->access);
30
+ }
31
+ // Validates data before storing
32
+ private static function validate_data($options)
33
+ {
34
+ if (isset($options['ga_realtime_pages'])) {
35
+ $options['ga_realtime_pages'] = (int) $options['ga_realtime_pages'];
36
+ }
37
+ if (isset($options['ga_crossdomain_tracking'])) {
38
+ $options['ga_crossdomain_tracking'] = (int) $options['ga_crossdomain_tracking'];
39
+ }
40
+ if (isset($options['ga_crossdomain_list'])) {
41
+ $options['ga_crossdomain_list'] = sanitize_text_field($options['ga_crossdomain_list']);
42
+ }
43
+ if (isset($options['ga_dash_apikey'])) {
44
+ $options['ga_dash_apikey'] = sanitize_text_field($options['ga_dash_apikey']);
45
+ }
46
+ if (isset($options['ga_dash_clientid'])) {
47
+ $options['ga_dash_clientid'] = sanitize_text_field($options['ga_dash_clientid']);
48
+ }
49
+ if (isset($options['ga_dash_clientsecret'])) {
50
+ $options['ga_dash_clientsecret'] = sanitize_text_field($options['ga_dash_clientsecret']);
51
+ }
52
+ if (isset($options['ga_dash_style'])) {
53
+ $options['ga_dash_style'] = sanitize_text_field($options['ga_dash_style']);
54
+ }
55
+ if (isset($options['ga_event_downloads'])) {
56
+ if (empty($options['ga_event_downloads'])) {
57
+ $options['ga_event_downloads'] = 'zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*';
58
  }
59
+ $options['ga_event_downloads'] = sanitize_text_field($options['ga_event_downloads']);
60
+ }
61
+ if (isset($options['ga_speed_samplerate']) && ($options['ga_speed_samplerate'] < 1 || $options['ga_speed_samplerate'] > 100)) {
62
+ $options['ga_speed_samplerate'] = 1;
63
+ }
64
+ if (isset($options['ga_target_geomap'])) {
65
+ $options['ga_target_geomap'] = sanitize_text_field($options['ga_target_geomap']);
66
+ }
67
+ if (isset($options['ga_author_dimindex'])) {
68
+ $options['ga_author_dimindex'] = (int) $options['ga_author_dimindex'];
69
+ }
70
+ if (isset($options['ga_category_dimindex'])) {
71
+ $options['ga_category_dimindex'] = (int) $options['ga_category_dimindex'];
72
+ }
73
+ if (isset($options['ga_user_dimindex'])) {
74
+ $options['ga_user_dimindex'] = (int) $options['ga_user_dimindex'];
75
+ }
76
+ if (isset($options['ga_pubyear_dimindex'])) {
77
+ $options['ga_pubyear_dimindex'] = (int) $options['ga_pubyear_dimindex'];
78
+ }
79
+ if (isset($options['ga_aff_tracking'])) {
80
+ $options['ga_aff_tracking'] = (int) $options['ga_aff_tracking'];
81
+ }
82
+ if (isset($options['ga_event_affiliates'])) {
83
+ if (empty($options['ga_event_affiliates'])) {
84
+ $options['ga_event_affiliates'] = '/out/';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  }
86
+ $options['ga_event_affiliates'] = sanitize_text_field($options['ga_event_affiliates']);
87
+ }
88
+ return $options;
89
+ }
90
 
91
+ public function set_plugin_options($network_settings = false)
92
+ {
93
+ // Handle Network Mode
94
+ $options = $this->options;
95
+ $get_network_options = get_site_option('gadash_network_options');
96
+ $old_network_options = (array) json_decode($get_network_options);
97
+ if (is_multisite()) {
98
+ if ($network_settings) { // Retrieve network options, clear blog options, store both to db
99
+ $network_options['ga_dash_token'] = $this->options['ga_dash_token'];
100
+ $options['ga_dash_token'] = '';
101
+ $network_options['ga_dash_refresh_token'] = $this->options['ga_dash_refresh_token'];
102
+ $options['ga_dash_refresh_token'] = '';
103
+ if (is_network_admin()) {
104
+ $network_options['ga_dash_profile_list'] = $this->options['ga_dash_profile_list'];
105
+ $options['ga_dash_profile_list'] = array();
106
+ $network_options['ga_dash_apikey'] = $this->options['ga_dash_apikey'];
107
+ $options['ga_dash_apikey'] = '';
108
+ $network_options['ga_dash_clientid'] = $this->options['ga_dash_clientid'];
109
+ $options['ga_dash_clientid'] = '';
110
+ $network_options['ga_dash_clientsecret'] = $this->options['ga_dash_clientsecret'];
111
+ $options['ga_dash_clientsecret'] = '';
112
+ $network_options['ga_dash_userapi'] = $this->options['ga_dash_userapi'];
113
+ $options['ga_dash_userapi'] = 0;
114
+ $network_options['ga_dash_network'] = $this->options['ga_dash_network'];
115
+ $network_options['ga_dash_excludesa'] = $this->options['ga_dash_excludesa'];
116
+ unset($options['ga_dash_network']);
117
+ if (isset($this->options['ga_dash_tableid_network'])) {
118
+ $network_options['ga_dash_tableid_network'] = $this->options['ga_dash_tableid_network'];
119
+ unset($options['ga_dash_tableid_network']);
120
+ }
121
+ }
122
+ update_site_option('gadash_network_options', json_encode($this->validate_data(array_merge($old_network_options, $network_options))));
 
 
 
 
 
 
 
 
123
  }
124
+ }
125
+ update_option('gadash_options', json_encode($this->validate_data($options)));
126
+ }
127
 
128
+ public function getPluginPath()
129
+ {
130
+ /*
131
+ * Set Plugin Path
132
+ */
133
+ $this->plugin_path = dirname(__FILE__);
134
+ $this->plugin_url = plugins_url("", __FILE__);
135
+ }
136
 
137
+ private function map($map)
138
+ {
139
+ return str_ireplace('map', chr(66), $map);
140
+ }
141
+
142
+ private function get_plugin_options()
143
+ {
144
+ /*
145
+ * Get plugin options
146
+ */
147
+ global $blog_id;
148
+ /*
149
+ * Include Tools
150
+ */
151
+ include_once ($this->plugin_path . '/tools/tools.php');
152
+ $tools = new GADASH_Tools();
153
+ if (! get_option('gadash_options')) {
154
+ GADASH_Install::install();
155
+ }
156
+ $this->options = (array) json_decode(get_option('gadash_options'));
157
+ // Maintain Compatibility
158
+ $this->maintain_compatibility();
159
+ // Handle Network Mode
160
+ if (is_multisite()) {
161
+ $get_network_options = get_site_option('gadash_network_options');
162
+ $network_options = (array) json_decode($get_network_options);
163
+ if (isset($network_options['ga_dash_network']) && ($network_options['ga_dash_network'])) {
164
+ $network_options = (array) json_decode($get_network_options);
165
+ if (! is_network_admin() && ! empty($network_options['ga_dash_profile_list'])) {
166
+ $network_options['ga_dash_profile_list'] = array(
167
+ 0 => $tools->get_selected_profile($network_options['ga_dash_profile_list'], $network_options['ga_dash_tableid_network']->$blog_id)
168
+ );
169
+ $network_options['ga_dash_tableid_jail'] = $network_options['ga_dash_profile_list'][0][1];
170
+ }
171
+ $this->options = array_merge($this->options, $network_options);
 
 
 
172
  }
173
+ }
174
+ }
175
 
176
+ private function maintain_compatibility()
177
+ {
178
+ if (GADWP_CURRENT_VERSION != get_option('gadwp_version')) {
179
+ include_once ($this->plugin_path . '/tools/tools.php');
180
+ $tools = new GADASH_Tools();
181
+ $tools->ga_dash_clear_cache();
182
+ delete_transient('ga_dash_lasterror');
183
+ update_option('gadwp_version', GADWP_CURRENT_VERSION);
184
+ if (is_multisite()) { // Cleanup errors on the entire network
185
+ foreach (wp_get_sites(array(
186
+ 'limit' => apply_filters('gadwp_sites_limit', 100)
187
+ )) as $blog) {
188
+ switch_to_blog($blog['blog_id']);
189
+ delete_transient('ga_dash_gapi_errors');
190
+ restore_current_blog();
191
+ }
192
+ } else {
193
+ delete_transient('ga_dash_gapi_errors');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  }
195
+ }
196
+ if (! isset($this->options['ga_enhanced_links'])) {
197
+ $this->options['ga_enhanced_links'] = 0;
198
+ }
199
+ if (! isset($this->options['ga_enhanced_network'])) {
200
+ $this->options['ga_dash_network'] = 0;
201
+ }
202
+ if (! isset($this->options['ga_enhanced_excludesa'])) {
203
+ $this->options['ga_dash_excludesa'] = 0;
204
+ }
205
+ if (! isset($this->options['ga_dash_remarketing'])) {
206
+ $this->options['ga_dash_remarketing'] = 0;
207
+ }
208
+ if (! isset($this->options['ga_dash_adsense'])) {
209
+ $this->options['ga_dash_adsense'] = 0;
210
+ }
211
+ if (! isset($this->options['ga_speed_samplerate'])) {
212
+ $this->options['ga_speed_samplerate'] = 1;
213
+ }
214
+ if (! isset($this->options['ga_event_bouncerate'])) {
215
+ $this->options['ga_event_bouncerate'] = 0;
216
+ }
217
+ if (! is_array($this->options['ga_dash_access_front']) or empty($this->options['ga_dash_access_front'])) {
218
+ $this->options['ga_dash_access_front'] = array();
219
+ $this->options['ga_dash_access_front'][] = 'administrator';
220
+ }
221
+ if (! is_array($this->options['ga_dash_access_back']) or empty($this->options['ga_dash_access_back'])) {
222
+ $this->options['ga_dash_access_back'] = array();
223
+ $this->options['ga_dash_access_back'][] = 'administrator';
224
+ }
225
+ if (! is_array($this->options['ga_track_exclude'])) {
226
+ $this->options['ga_track_exclude'] = array();
227
+ }
228
+ if (! isset($this->options['ga_crossdomain_tracking'])) {
229
+ $this->options['ga_crossdomain_tracking'] = 0;
230
+ }
231
+ if (! isset($this->options['ga_crossdomain_list'])) {
232
+ $this->options['ga_crossdomain_list'] = '';
233
+ }
234
+ if (! isset($this->options['ga_author_dimindex'])) {
235
+ $this->options['ga_author_dimindex'] = 0;
236
+ }
237
+ if (! isset($this->options['ga_category_dimindex'])) {
238
+ $this->options['ga_category_dimindex'] = 0;
239
+ }
240
+ if (! isset($this->options['ga_user_dimindex'])) {
241
+ $this->options['ga_user_dimindex'] = 0;
242
+ }
243
+ if (! isset($this->options['ga_pubyear_dimindex'])) {
244
+ $this->options['ga_pubyear_dimindex'] = 0;
245
+ }
246
+ if (! isset($this->options['ga_event_affiliates'])) {
247
+ $this->options['ga_event_affiliates'] = '/out/';
248
+ }
249
+ if (! isset($this->options['ga_aff_tracking'])) {
250
+ $this->options['ga_aff_tracking'] = 0;
251
+ }
252
+ if (! isset($this->options['ga_hash_tracking'])) {
253
+ $this->options['ga_hash_tracking'] = 0;
254
+ }
255
+ if (isset($this->options['ga_tracking_code'])) {
256
+ unset($this->options['ga_tracking_code']);
257
+ }
258
  }
259
+ }
260
  }
 
261
  if (! isset($GLOBALS['GADASH_Config'])) {
262
+ $GLOBALS['GADASH_Config'] = new GADASH_Config();
263
  }
front/ajax-actions.php CHANGED
@@ -7,155 +7,134 @@
7
  */
8
  if (! class_exists('GADASH_Frontend_Ajax')) {
9
 
10
- final class GADASH_Frontend_Ajax
11
- {
12
-
13
- function __construct()
14
- {
15
- // Frontend Reports/Page action
16
- add_action('wp_ajax_gadash_get_frontend_pagereports', array(
17
- $this,
18
- 'ajax_afterpost_reports'
19
- ));
20
-
21
- // Frontend Widget actions
22
- add_action('wp_ajax_gadash_get_frontendwidget_data', array(
23
- $this,
24
- 'ajax_frontend_widget'
25
- ));
26
-
27
- add_action('wp_ajax_nopriv_gadash_get_frontendwidget_data', array(
28
- $this,
29
- 'ajax_frontend_widget'
30
- ));
31
- }
32
-
33
- // Frontend Reports/Page
34
- /**
35
- * Ajax handler for getting analytics data for frontend Views vs UniqueViews
36
- *
37
- * @return string|int
38
- */
39
- function ajax_afterpost_reports()
40
- {
41
- global $GADASH_Config;
42
-
43
- $page_url = esc_url($_REQUEST['gadash_pageurl']);
44
- $post_id = (int)$_REQUEST['gadash_postid'];
45
- $query = $_REQUEST['query'];
46
-
47
- ob_clean();
48
-
49
- if (! isset($_REQUEST['gadash_security_pagereports']) or ! wp_verify_nonce($_REQUEST['gadash_security_pagereports'], 'gadash_get_frontend_pagereports')) {
50
- print(json_encode(- 30));
51
- die();
52
- }
53
-
54
- /*
55
- * Include Tools
56
- */
57
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
58
- $tools = new GADASH_Tools();
59
-
60
- if (! $tools->check_roles($GADASH_Config->options['ga_dash_access_front']) or ! ($GADASH_Config->options['ga_dash_frontend_stats'] or $GADASH_Config->options['ga_dash_frontend_keywords'])) {
61
- print(json_encode(- 31));
62
- die();
63
- }
64
-
65
- if ($GADASH_Config->options['ga_dash_token'] and $GADASH_Config->options['ga_dash_tableid_jail']) {
66
- include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
67
- global $GADASH_GAPI;
68
- } else {
69
- print(json_encode(- 24));
70
- die();
71
- }
72
-
73
- $projectId = $GADASH_Config->options['ga_dash_tableid_jail'];
74
- $profile_info = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $projectId);
75
- if (isset($profile_info[4])) {
76
- $GADASH_GAPI->timeshift = $profile_info[4];
77
- } else {
78
- $GADASH_GAPI->timeshift = (int) current_time('timestamp') - time();
79
- }
80
-
81
- if (! $GADASH_GAPI->client->getAccessToken()) {
82
- print(json_encode(- 25));
83
- die();
84
- }
85
-
86
- switch ($query) {
87
- case 'pageviews':
88
- print($GADASH_GAPI->frontend_afterpost_pageviews($projectId, $page_url, $post_id));
89
- break;
90
- default:
91
- print($GADASH_GAPI->frontend_afterpost_searches($projectId, $page_url, $post_id));
92
- break;
93
- }
94
-
95
- die();
96
- }
97
 
98
- // Frontend Widget Reports
99
- /**
100
- * Ajax handler for getting analytics data for frontend Widget
101
- *
102
- * @return string|int
103
- */
104
- function ajax_frontend_widget()
105
- {
106
- global $GADASH_Config;
107
-
108
- $anonim = (int)$_REQUEST['gadash_anonim']; //make sure we have an int value
109
-
110
- switch ($_REQUEST['gadash_period']) { //make sure we have a valid request
111
- case '7daysAgo':
112
- $period = '7daysAgo';
113
- break;
114
- case '14daysAgo':
115
- $period = '14daysAgo';
116
- break;
117
- default:
118
- $period = '30daysAgo';
119
- break;
120
- }
121
-
122
- ob_clean();
123
-
124
- if (!is_active_widget(false,false,'gadash_frontend_widget')){
125
- print(json_encode(- 30));
126
- die();
127
- }
128
-
129
- if ($GADASH_Config->options['ga_dash_token'] and $GADASH_Config->options['ga_dash_tableid_jail']) {
130
- include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
131
- global $GADASH_GAPI;
132
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
133
- $tools = new GADASH_Tools();
134
- } else {
135
- print(json_encode(- 24));
136
- die();
137
- }
138
-
139
- $projectId = $GADASH_Config->options['ga_dash_tableid_jail'];
140
- $profile_info = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $projectId);
141
- if (isset($profile_info[4])) {
142
- $GADASH_GAPI->timeshift = $profile_info[4];
143
- } else {
144
- $GADASH_GAPI->timeshift = (int) current_time('timestamp') - time();
145
- }
146
-
147
- if (! $GADASH_GAPI->client->getAccessToken()) {
148
- print(json_encode(- 25));
149
- die();
150
- }
151
-
152
- $data_widget = $GADASH_GAPI->frontend_widget_stats($projectId, $period, $anonim);
153
-
154
- print(json_encode($data_widget));
155
-
156
- die();
157
- }
158
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  }
160
-
161
  $GADASH_Frontend_Ajax = new GADASH_Frontend_Ajax();
7
  */
8
  if (! class_exists('GADASH_Frontend_Ajax')) {
9
 
10
+ final class GADASH_Frontend_Ajax
11
+ {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
+ function __construct()
14
+ {
15
+ // Frontend Reports/Page action
16
+ add_action('wp_ajax_gadash_get_frontend_pagereports', array(
17
+ $this,
18
+ 'ajax_afterpost_reports'
19
+ ));
20
+ // Frontend Widget actions
21
+ add_action('wp_ajax_gadash_get_frontendwidget_data', array(
22
+ $this,
23
+ 'ajax_frontend_widget'
24
+ ));
25
+ add_action('wp_ajax_nopriv_gadash_get_frontendwidget_data', array(
26
+ $this,
27
+ 'ajax_frontend_widget'
28
+ ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  }
30
+ // Frontend Reports/Page
31
+ /**
32
+ * Ajax handler for getting analytics data for frontend Views vs UniqueViews
33
+ *
34
+ * @return string|int
35
+ */
36
+ function ajax_afterpost_reports()
37
+ {
38
+ global $GADASH_Config;
39
+ if (! isset($_REQUEST['gadash_security_pagereports']) or ! wp_verify_nonce($_REQUEST['gadash_security_pagereports'], 'gadash_get_frontend_pagereports')) {
40
+ wp_die(-30);
41
+ }
42
+ $page_url = esc_url($_REQUEST['gadash_pageurl']);
43
+ $post_id = (int) $_REQUEST['gadash_postid'];
44
+ $query = $_REQUEST['query'];
45
+ if (ob_get_length()) {
46
+ ob_clean();
47
+ }
48
+ /*
49
+ * Include Tools
50
+ */
51
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
52
+ $tools = new GADASH_Tools();
53
+ if (! $tools->check_roles($GADASH_Config->options['ga_dash_access_front']) or ! ($GADASH_Config->options['ga_dash_frontend_stats'] or $GADASH_Config->options['ga_dash_frontend_keywords'])) {
54
+ wp_die(-31);
55
+ }
56
+ if ($GADASH_Config->options['ga_dash_token'] and $GADASH_Config->options['ga_dash_tableid_jail']) {
57
+ include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
58
+ global $GADASH_GAPI;
59
+ } else {
60
+ wp_die(-24);
61
+ }
62
+ $projectId = $GADASH_Config->options['ga_dash_tableid_jail'];
63
+ $profile_info = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $projectId);
64
+ if (isset($profile_info[4])) {
65
+ $GADASH_GAPI->timeshift = $profile_info[4];
66
+ } else {
67
+ $GADASH_GAPI->timeshift = (int) current_time('timestamp') - time();
68
+ }
69
+ if (! $GADASH_GAPI->client->getAccessToken()) {
70
+ wp_die(-25);
71
+ }
72
+ switch ($query) {
73
+ case 'pageviews':
74
+ print($GADASH_GAPI->frontend_afterpost_pageviews($projectId, $page_url, $post_id));
75
+ break;
76
+ default:
77
+ print($GADASH_GAPI->frontend_afterpost_searches($projectId, $page_url, $post_id));
78
+ break;
79
+ }
80
+ wp_die();
81
+ }
82
+ // Frontend Widget Reports
83
+ /**
84
+ * Ajax handler for getting analytics data for frontend Widget
85
+ *
86
+ * @return string|int
87
+ */
88
+ function ajax_frontend_widget()
89
+ {
90
+ global $GADASH_Config;
91
+ if (! isset($_REQUEST['gadash_number']) or ! isset($_REQUEST['gadash_optionname']) or ! is_active_widget(false, false, 'gadash_frontend_widget')) {
92
+ wp_die(-30);
93
+ }
94
+ $widget_index = $_REQUEST['gadash_number'];
95
+ $option_name = $_REQUEST['gadash_optionname'];
96
+ $options = get_option($option_name);
97
+ if (isset($options[$widget_index])) {
98
+ $instance = $options[$widget_index];
99
+ } else {
100
+ wp_die(-32);
101
+ }
102
+ switch ($instance['period']) { // make sure we have a valid request
103
+ case '7daysAgo':
104
+ $period = '7daysAgo';
105
+ break;
106
+ case '14daysAgo':
107
+ $period = '14daysAgo';
108
+ break;
109
+ default:
110
+ $period = '30daysAgo';
111
+ break;
112
+ }
113
+ if (ob_get_length()) {
114
+ ob_clean();
115
+ }
116
+ if ($GADASH_Config->options['ga_dash_token'] and $GADASH_Config->options['ga_dash_tableid_jail']) {
117
+ include_once ($GADASH_Config->plugin_path . '/tools/gapi.php');
118
+ global $GADASH_GAPI;
119
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
120
+ $tools = new GADASH_Tools();
121
+ } else {
122
+ wp_die(-24);
123
+ }
124
+ $projectId = $GADASH_Config->options['ga_dash_tableid_jail'];
125
+ $profile_info = $tools->get_selected_profile($GADASH_Config->options['ga_dash_profile_list'], $projectId);
126
+ if (isset($profile_info[4])) {
127
+ $GADASH_GAPI->timeshift = $profile_info[4];
128
+ } else {
129
+ $GADASH_GAPI->timeshift = (int) current_time('timestamp') - time();
130
+ }
131
+ if (! $GADASH_GAPI->client->getAccessToken()) {
132
+ wp_die(-25);
133
+ }
134
+ $data_widget = $GADASH_GAPI->frontend_widget_stats($projectId, $period, (int) $instance['anonim']);
135
+ print(json_encode($data_widget));
136
+ wp_die();
137
+ }
138
+ }
139
  }
 
140
  $GADASH_Frontend_Ajax = new GADASH_Frontend_Ajax();
front/css/content_stats.css CHANGED
@@ -29,8 +29,8 @@
29
  padding-bottom: 2px;
30
  }
31
 
32
- #gadwp-widget{
33
- padding:0 5px;
34
  }
35
 
36
  #gadwp-widgetchart {
@@ -50,12 +50,12 @@
50
  float: left;
51
  font-weight: 600;
52
  }
53
-
54
- #gadwp-progressbar{
55
- width:100%;
56
- height:3px;
57
- margin:3px 0;
58
- }
59
 
60
  #gadwp-widgettotals .gadwp-right {
61
  padding: 10px 0 0 0;
29
  padding-bottom: 2px;
30
  }
31
 
32
+ #gadwp-widget {
33
+ padding: 0 5px;
34
  }
35
 
36
  #gadwp-widgetchart {
50
  float: left;
51
  font-weight: 600;
52
  }
53
+
54
+ #gadwp-progressbar {
55
+ width: 100%;
56
+ height: 3px;
57
+ margin: 3px 0;
58
+ }
59
 
60
  #gadwp-widgettotals .gadwp-right {
61
  padding: 10px 0 0 0;
front/frontend.php CHANGED
@@ -5,70 +5,60 @@
5
  * License: GPLv2 or later
6
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  */
8
-
9
  if (! class_exists('GADASH_Frontend')) {
10
 
11
- final class GADASH_Frontend
12
- {
13
 
14
- function __construct()
15
- {
16
- add_filter('the_content', array(
17
- $this,
18
- 'ga_dash_front_content'
19
- ));
20
- // Frontend Styles
21
- add_action('wp_enqueue_scripts', array(
22
- $this,
23
- 'ga_dash_front_enqueue_styles'
24
- ));
25
- }
26
 
27
- function ga_dash_front_enqueue_styles()
28
- {
29
- global $GADASH_Config;
30
-
31
- if ((! is_page() and ! is_single()) or is_preview() or ! is_user_logged_in()) {
32
- return;
33
- }
34
-
35
- wp_enqueue_style('ga_dash-front', $GADASH_Config->plugin_url . '/front/css/content_stats.css', NULL, GADWP_CURRENT_VERSION);
36
- wp_enqueue_style('ga_dash-nprogress', $GADASH_Config->plugin_url . '/tools/nprogress/nprogress.css', NULL, GADWP_CURRENT_VERSION);
37
- wp_enqueue_script('ga_dash-front', $GADASH_Config->plugin_url . '/front/js/content_stats.js', array(
38
- 'jquery'
39
- ), GADWP_CURRENT_VERSION);
40
- wp_enqueue_script('ga_dash-nprogress', $GADASH_Config->plugin_url . '/tools/nprogress/nprogress.js', array(
41
- 'jquery'
42
- ), GADWP_CURRENT_VERSION);
43
- wp_enqueue_script('googlejsapi', 'https://www.google.com/jsapi');
44
- }
45
 
46
- function ga_dash_front_content($content)
47
- {
48
- global $post;
49
- global $GADASH_Config;
50
-
51
- /*
52
- * Include Tools
53
- */
54
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
55
- $tools = new GADASH_Tools();
56
-
57
- if (! $tools->check_roles($GADASH_Config->options['ga_dash_access_front']) or ! ($GADASH_Config->options['ga_dash_frontend_stats'] or $GADASH_Config->options['ga_dash_frontend_keywords'])) {
58
- return $content;
59
- }
60
-
61
- if ((is_page() || is_single()) && ! is_preview()) {
62
-
63
- wp_enqueue_script('gadash-general-settings', plugins_url('admin/js/admin.js', dirname(__FILE__)), array(
64
- 'jquery'
65
- ));
66
-
67
- $page_url = $_SERVER["REQUEST_URI"]; // str_replace(site_url(), "", get_permalink());
68
-
69
- $post_id = $post->ID;
70
-
71
- $content .= '<script type="text/javascript">
72
 
73
  gadash_firstclick = true;
74
 
@@ -94,27 +84,41 @@ if (! class_exists('GADASH_Frontend')) {
94
  NProgress.configure({ showSpinner: false });
95
  NProgress.start();
96
  } catch(e) {
97
- jQuery("#gadwp-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border":"1px solid red","border-left":"5px solid red","font-size":"13px"});
98
- jQuery("#gadwp-progressbar").html("'.__("A JavaScript Error is blocking plugin resources!", 'ga-dash').'");
99
  }
100
 
101
  if(typeof ga_dash_drawpagesessions == "function"){
102
  jQuery.post("' . admin_url('admin-ajax.php') . '", {action: "gadash_get_frontend_pagereports",gadash_pageurl: "' . $page_url . '",gadash_postid: "' . $post_id . '",query: "pageviews",gadash_security_pagereports: "' . wp_create_nonce('gadash_get_frontend_pagereports') . '"}, function(response){
103
- gadash_pagesessions = jQuery.parseJSON(response);
104
- if (!jQuery.isNumeric(gadash_pagesessions)){
105
- google.setOnLoadCallback(ga_dash_drawpagesessions(gadash_pagesessions));
106
- }else{
107
- jQuery("#gadwp-sessions").css({"background-color":"#F7F7F7","height":"auto","padding-top":"30px","padding-bottom":"30px","color":"#000","text-align":"center"});
108
- jQuery("#gadwp-sessions").html("' . __("This report is unavailable", 'ga-dash') . ' ("+response+")");
109
- checknpcounter(1);
110
- }
 
 
 
 
 
 
 
111
  });
112
  }
113
  if(typeof ga_dash_drawpagesearches == "function"){
114
  jQuery.post("' . admin_url('admin-ajax.php') . '", {action: "gadash_get_frontend_pagereports",gadash_pageurl: "' . $page_url . '",gadash_postid: "' . $post_id . '",query: "searches",gadash_security_pagereports: "' . wp_create_nonce('gadash_get_frontend_pagereports') . '"}, function(response){
115
- gadash_pagesearches = jQuery.parseJSON(response);
116
- if (!jQuery.isNumeric(gadash_pagesearches)){
117
- google.setOnLoadCallback(ga_dash_drawpagesearches(gadash_pagesearches));
 
 
 
 
 
 
 
118
  }else{
119
  jQuery("#gadwp-searches").css({"background-color":"#F7F7F7","height":"auto","padding-top":"30px","padding-bottom":"30px","color":"#000","text-align":"center"});
120
  jQuery("#gadwp-searches").html("' . __("This report is unavailable", 'ga-dash') . ' ("+response+")");
@@ -126,20 +130,16 @@ if (! class_exists('GADASH_Frontend')) {
126
  }
127
  });
128
  });';
129
-
130
- if ($GADASH_Config->options['ga_dash_frontend_stats']) {
131
-
132
- $title = __("Views vs UniqueViews", 'ga-dash');
133
-
134
- if (isset($GADASH_Config->options['ga_dash_style'])) {
135
- $css = "colors:['" . $GADASH_Config->options['ga_dash_style'] . "','" . $tools->colourVariator($GADASH_Config->options['ga_dash_style'], - 20) . "'],";
136
- $color = $GADASH_Config->options['ga_dash_style'];
137
- } else {
138
- $css = "";
139
- $color = "#3366CC";
140
- }
141
-
142
- $content .= '
143
  google.load("visualization", "1", {packages:["corechart"]});
144
  function ga_dash_drawpagesessions(gadash_pagesessions) {
145
 
@@ -158,11 +158,9 @@ if (! class_exists('GADASH_Frontend')) {
158
  chart.draw(data, options);
159
  checknpcounter(1);
160
  }';
161
- }
162
-
163
- if ($GADASH_Config->options['ga_dash_frontend_keywords']) {
164
-
165
- $content .= '
166
  google.load("visualization", "1", {packages:["table"]})
167
  function ga_dash_drawpagesearches(gadash_pagesearches) {
168
 
@@ -178,10 +176,9 @@ if (! class_exists('GADASH_Frontend')) {
178
  chart.draw(datas, options);
179
  checknpcounter(1);
180
  }';
181
- }
182
-
183
- $content .= "</script>";
184
- $content .= '<p>
185
  <div id="gadwp">
186
  <div id="gadwp-title">
187
  <a href="#gadwp">' . __('Google Analytics Reports', "ga-dash") . ' <span id="gadwp-arrow">&#x25BC;</span></a>
@@ -192,11 +189,11 @@ if (! class_exists('GADASH_Frontend')) {
192
  </div>
193
  </div>
194
  </p>';
195
- }
196
- return $content;
197
- }
198
  }
 
199
  }
200
  if (! is_admin()) {
201
- $GADASH_Frontend = new GADASH_Frontend();
202
  }
5
  * License: GPLv2 or later
6
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  */
 
8
  if (! class_exists('GADASH_Frontend')) {
9
 
10
+ final class GADASH_Frontend
11
+ {
12
 
13
+ function __construct()
14
+ {
15
+ add_filter('the_content', array(
16
+ $this,
17
+ 'ga_dash_front_content'
18
+ ));
19
+ // Frontend Styles
20
+ add_action('wp_enqueue_scripts', array(
21
+ $this,
22
+ 'ga_dash_front_enqueue_styles'
23
+ ));
24
+ }
25
 
26
+ function ga_dash_front_enqueue_styles()
27
+ {
28
+ global $GADASH_Config;
29
+ if ((! is_page() and ! is_single()) or is_preview() or ! is_user_logged_in()) {
30
+ return;
31
+ }
32
+ wp_enqueue_style('ga_dash-front', $GADASH_Config->plugin_url . '/front/css/content_stats.css', NULL, GADWP_CURRENT_VERSION);
33
+ wp_enqueue_style('ga_dash-nprogress', $GADASH_Config->plugin_url . '/tools/nprogress/nprogress.css', NULL, GADWP_CURRENT_VERSION);
34
+ wp_enqueue_script('ga_dash-front', $GADASH_Config->plugin_url . '/front/js/content_stats.js', array(
35
+ 'jquery'
36
+ ), GADWP_CURRENT_VERSION);
37
+ wp_enqueue_script('ga_dash-nprogress', $GADASH_Config->plugin_url . '/tools/nprogress/nprogress.js', array(
38
+ 'jquery'
39
+ ), GADWP_CURRENT_VERSION);
40
+ wp_enqueue_script('googlejsapi', 'https://www.google.com/jsapi');
41
+ }
 
 
42
 
43
+ function ga_dash_front_content($content)
44
+ {
45
+ global $post;
46
+ global $GADASH_Config;
47
+ /*
48
+ * Include Tools
49
+ */
50
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
51
+ $tools = new GADASH_Tools();
52
+ if (! $tools->check_roles($GADASH_Config->options['ga_dash_access_front']) or ! ($GADASH_Config->options['ga_dash_frontend_stats'] or $GADASH_Config->options['ga_dash_frontend_keywords'])) {
53
+ return $content;
54
+ }
55
+ if ((is_page() || is_single()) && ! is_preview()) {
56
+ wp_enqueue_script('gadash-general-settings', plugins_url('admin/js/admin.js', dirname(__FILE__)), array(
57
+ 'jquery'
58
+ ));
59
+ $page_url = $_SERVER["REQUEST_URI"]; // str_replace(site_url(), "", get_permalink());
60
+ $post_id = $post->ID;
61
+ $content .= '<script type="text/javascript">
 
 
 
 
 
 
 
62
 
63
  gadash_firstclick = true;
64
 
84
  NProgress.configure({ showSpinner: false });
85
  NProgress.start();
86
  } catch(e) {
87
+ jQuery("#gadwp-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red","font-size":"13px"});
88
+ jQuery("#gadwp-progressbar").html("' . __("A JavaScript Error is blocking plugin resources!", 'ga-dash') . '");
89
  }
90
 
91
  if(typeof ga_dash_drawpagesessions == "function"){
92
  jQuery.post("' . admin_url('admin-ajax.php') . '", {action: "gadash_get_frontend_pagereports",gadash_pageurl: "' . $page_url . '",gadash_postid: "' . $post_id . '",query: "pageviews",gadash_security_pagereports: "' . wp_create_nonce('gadash_get_frontend_pagereports') . '"}, function(response){
93
+ if (!jQuery.isNumeric(response)){
94
+ try{
95
+ gadash_pagesessions = jQuery.parseJSON(response);
96
+ google.setOnLoadCallback(ga_dash_drawpagesessions(gadash_pagesessions));
97
+ } catch(e) {
98
+ checknpcounter(0);
99
+ jQuery("#gadwp-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red","font-size":"13px"});
100
+ jQuery("#gadwp-progressbar").html("'. __("Invalid response, more details in JavaScript Console (F12).", 'ga-dash'). '");
101
+ console.log("\n********************* GADWP Log ********************* \n\n"+response);
102
+ }
103
+ }else{
104
+ jQuery("#gadwp-sessions").css({"background-color":"#F7F7F7","height":"auto","padding-top":"30px","padding-bottom":"30px","color":"#000","text-align":"center"});
105
+ jQuery("#gadwp-sessions").html("' . __("This report is unavailable", 'ga-dash') . ' ("+response+")");
106
+ checknpcounter(1);
107
+ }
108
  });
109
  }
110
  if(typeof ga_dash_drawpagesearches == "function"){
111
  jQuery.post("' . admin_url('admin-ajax.php') . '", {action: "gadash_get_frontend_pagereports",gadash_pageurl: "' . $page_url . '",gadash_postid: "' . $post_id . '",query: "searches",gadash_security_pagereports: "' . wp_create_nonce('gadash_get_frontend_pagereports') . '"}, function(response){
112
+ if (!jQuery.isNumeric(response)){
113
+ try{
114
+ gadash_pagesearches = jQuery.parseJSON(response);
115
+ google.setOnLoadCallback(ga_dash_drawpagesearches(gadash_pagesearches));
116
+ } catch(e) {
117
+ checknpcounter(0);
118
+ jQuery("#gadwp-progressbar").css({"margin-top":"3px","padding-left":"5px","height":"auto","color":"#000","border-left":"5px solid red","font-size":"13px"});
119
+ jQuery("#gadwp-progressbar").html("'. __("Invalid response, more details in JavaScript Console (F12).", 'ga-dash'). '");
120
+ console.log("\n********************* GADWP Log ********************* \n\n"+response);
121
+ }
122
  }else{
123
  jQuery("#gadwp-searches").css({"background-color":"#F7F7F7","height":"auto","padding-top":"30px","padding-bottom":"30px","color":"#000","text-align":"center"});
124
  jQuery("#gadwp-searches").html("' . __("This report is unavailable", 'ga-dash') . ' ("+response+")");
130
  }
131
  });
132
  });';
133
+ if ($GADASH_Config->options['ga_dash_frontend_stats']) {
134
+ $title = __("Views vs UniqueViews", 'ga-dash');
135
+ if (isset($GADASH_Config->options['ga_dash_style'])) {
136
+ $css = "colors:['" . $GADASH_Config->options['ga_dash_style'] . "','" . $tools->colourVariator($GADASH_Config->options['ga_dash_style'], - 20) . "'],";
137
+ $color = $GADASH_Config->options['ga_dash_style'];
138
+ } else {
139
+ $css = "";
140
+ $color = "#3366CC";
141
+ }
142
+ $content .= '
 
 
 
 
143
  google.load("visualization", "1", {packages:["corechart"]});
144
  function ga_dash_drawpagesessions(gadash_pagesessions) {
145
 
158
  chart.draw(data, options);
159
  checknpcounter(1);
160
  }';
161
+ }
162
+ if ($GADASH_Config->options['ga_dash_frontend_keywords']) {
163
+ $content .= '
 
 
164
  google.load("visualization", "1", {packages:["table"]})
165
  function ga_dash_drawpagesearches(gadash_pagesearches) {
166
 
176
  chart.draw(datas, options);
177
  checknpcounter(1);
178
  }';
179
+ }
180
+ $content .= "</script>";
181
+ $content .= '<p>
 
182
  <div id="gadwp">
183
  <div id="gadwp-title">
184
  <a href="#gadwp">' . __('Google Analytics Reports', "ga-dash") . ' <span id="gadwp-arrow">&#x25BC;</span></a>
189
  </div>
190
  </div>
191
  </p>';
192
+ }
193
+ return $content;
 
194
  }
195
+ }
196
  }
197
  if (! is_admin()) {
198
+ $GADASH_Frontend = new GADASH_Frontend();
199
  }
front/js/content_stats.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(){
2
 
3
 
4
  });
 
5
 
6
 
7
  });
 
1
 
2
 
3
  });
4
+ jQuery(document).ready(function(){
5
 
6
 
7
  });
front/tracking.php CHANGED
@@ -7,74 +7,65 @@
7
  */
8
  if (! class_exists('GADASH_Tracking')) {
9
 
10
- class GADASH_Tracking
 
 
 
11
  {
 
 
 
 
 
 
 
 
 
12
 
13
- function __construct()
14
- {
15
- add_action('wp_head', array(
16
- $this,
17
- 'ga_dash_tracking'
18
- ));
19
- add_action('wp_enqueue_scripts', array(
20
- $this,
21
- 'ga_dash_enqueue_scripts'
22
- ));
23
- }
24
 
25
- function ga_dash_enqueue_scripts()
26
- {
27
- global $GADASH_Config;
28
- if ($GADASH_Config->options['ga_event_tracking'] and ! wp_script_is('jquery')) {
29
- wp_enqueue_script('jquery');
30
- }
 
 
 
 
 
 
 
 
 
 
31
  }
32
-
33
- function ga_dash_tracking()
34
- {
35
- global $GADASH_Config;
36
- /*
37
- * Include Tools
38
- */
39
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
40
- $tools = new GADASH_Tools();
41
-
42
- if ($tools->check_roles($GADASH_Config->options['ga_track_exclude'], true) or ($GADASH_Config->options['ga_dash_excludesa'] and current_user_can('manage_network'))) {
43
- return;
44
- }
45
-
46
- $traking_mode = $GADASH_Config->options['ga_dash_tracking'];
47
- $traking_type = $GADASH_Config->options['ga_dash_tracking_type'];
48
-
49
- if ($traking_mode > 0) {
50
-
51
- if (! $GADASH_Config->options['ga_dash_tableid_jail']) {
52
- return;
53
- }
54
-
55
- if ($traking_type == "classic") {
56
- echo "\n<!-- BEGIN GADWP v" . GADWP_CURRENT_VERSION . " Classic Tracking - https://deconf.com/google-analytics-dashboard-wordpress/ -->\n";
57
- if ($GADASH_Config->options['ga_event_tracking']) {
58
- require_once 'tracking/events-classic.php';
59
- }
60
-
61
- require_once 'tracking/code-classic.php';
62
- echo "\n<!-- END GADWP Classic Tracking -->\n\n";
63
- } else {
64
- echo "\n<!-- BEGIN GADWP v" . GADWP_CURRENT_VERSION . " Universal Tracking - https://deconf.com/google-analytics-dashboard-wordpress/ -->\n";
65
- if ($GADASH_Config->options['ga_event_tracking'] or $GADASH_Config->options['ga_aff_tracking'] or $GADASH_Config->options['ga_hash_tracking']) {
66
- require_once 'tracking/events-universal.php';
67
- }
68
-
69
- require_once 'tracking/code-universal.php';
70
-
71
- echo "\n<!-- END GADWP Universal Tracking -->\n\n";
72
- }
73
- }
74
  }
 
75
  }
 
76
  }
77
-
78
  if (! is_admin()) {
79
- $GADASH_Tracking = new GADASH_Tracking();
80
  }
7
  */
8
  if (! class_exists('GADASH_Tracking')) {
9
 
10
+ class GADASH_Tracking
11
+ {
12
+
13
+ function __construct()
14
  {
15
+ add_action('wp_head', array(
16
+ $this,
17
+ 'ga_dash_tracking'
18
+ ));
19
+ add_action('wp_enqueue_scripts', array(
20
+ $this,
21
+ 'ga_dash_enqueue_scripts'
22
+ ));
23
+ }
24
 
25
+ function ga_dash_enqueue_scripts()
26
+ {
27
+ global $GADASH_Config;
28
+ if ($GADASH_Config->options['ga_event_tracking'] and ! wp_script_is('jquery')) {
29
+ wp_enqueue_script('jquery');
30
+ }
31
+ }
 
 
 
 
32
 
33
+ function ga_dash_tracking()
34
+ {
35
+ global $GADASH_Config;
36
+ /*
37
+ * Include Tools
38
+ */
39
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
40
+ $tools = new GADASH_Tools();
41
+ if ($tools->check_roles($GADASH_Config->options['ga_track_exclude'], true) or ($GADASH_Config->options['ga_dash_excludesa'] and current_user_can('manage_network'))) {
42
+ return;
43
+ }
44
+ $traking_mode = $GADASH_Config->options['ga_dash_tracking'];
45
+ $traking_type = $GADASH_Config->options['ga_dash_tracking_type'];
46
+ if ($traking_mode > 0) {
47
+ if (! $GADASH_Config->options['ga_dash_tableid_jail']) {
48
+ return;
49
  }
50
+ if ($traking_type == "classic") {
51
+ echo "\n<!-- BEGIN GADWP v" . GADWP_CURRENT_VERSION . " Classic Tracking - https://deconf.com/google-analytics-dashboard-wordpress/ -->\n";
52
+ if ($GADASH_Config->options['ga_event_tracking']) {
53
+ require_once 'tracking/events-classic.php';
54
+ }
55
+ require_once 'tracking/code-classic.php';
56
+ echo "\n<!-- END GADWP Classic Tracking -->\n\n";
57
+ } else {
58
+ echo "\n<!-- BEGIN GADWP v" . GADWP_CURRENT_VERSION . " Universal Tracking - https://deconf.com/google-analytics-dashboard-wordpress/ -->\n";
59
+ if ($GADASH_Config->options['ga_event_tracking'] or $GADASH_Config->options['ga_aff_tracking'] or $GADASH_Config->options['ga_hash_tracking']) {
60
+ require_once 'tracking/events-universal.php';
61
+ }
62
+ require_once 'tracking/code-universal.php';
63
+ echo "\n<!-- END GADWP Universal Tracking -->\n\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
+ }
66
  }
67
+ }
68
  }
 
69
  if (! is_admin()) {
70
+ $GADASH_Tracking = new GADASH_Tracking();
71
  }
front/tracking/code-universal.php CHANGED
@@ -16,13 +16,13 @@ $rootdomain = $tools->get_root_domain($profile[3]);
16
  <?php
17
  $create_options = '{';
18
  if ($GADASH_Config->options['ga_speed_samplerate'] != 1) {
19
- $create_options .= "'siteSpeedSampleRate' : " . (int) $GADASH_Config->options['ga_speed_samplerate'];
20
  }
21
  if ($GADASH_Config->options['ga_crossdomain_tracking'] and $GADASH_Config->options['ga_crossdomain_list'] != '') {
22
- if ($create_options != '{') {
23
- $create_options .= ', ';
24
- }
25
- $create_options .= "'allowLinker' : true";
26
  }
27
  $create_options .= '}';
28
  ?>
@@ -30,74 +30,65 @@ $create_options .= '}';
30
  <?php if ($GADASH_Config->options ['ga_crossdomain_tracking'] AND $GADASH_Config->options ['ga_crossdomain_list']!='') {?>
31
  ga('require', 'linker');
32
  <?php
33
- $crossdomain_list = explode(',', $GADASH_Config->options['ga_crossdomain_list']);
34
- $crossdomain_list = array_map('trim', $crossdomain_list);
35
- $crossdomain_list = strip_tags(implode("','", $crossdomain_list));
36
- ?>
37
  ga('linker:autoLink', ['<?php echo ($crossdomain_list)?>'] );
38
  <?php
39
  }
40
-
41
  if ($GADASH_Config->options['ga_dash_remarketing']) {
42
- ?>
43
  ga('require', 'displayfeatures');
44
  <?php
45
  }
46
-
47
  if ($GADASH_Config->options['ga_enhanced_links']) {
48
- ?>
49
  ga('require', 'linkid', 'linkid.js');
50
  <?php
51
  }
52
-
53
  if ($GADASH_Config->options['ga_author_dimindex'] and (is_single() or is_page())) {
54
- global $post;
55
- $author_id = $post->post_author;
56
- $author_name = get_the_author_meta('display_name', $author_id);
57
- ?>
58
  ga('set', 'dimension<?php echo (int)$GADASH_Config->options ['ga_author_dimindex']; ?>', '<?php echo $author_name; ?>');
59
  <?php
60
  }
61
-
62
  if ($GADASH_Config->options['ga_pubyear_dimindex'] and is_single()) {
63
- global $post;
64
- $date = get_the_date('Y', $post->ID);
65
- ?>
66
  ga('set', 'dimension<?php echo (int)$GADASH_Config->options ['ga_pubyear_dimindex']; ?>', '<?php echo $date; ?>');
67
  <?php
68
  }
69
-
70
  if ($GADASH_Config->options['ga_category_dimindex'] and is_category()) {
71
- ?>
72
  ga('set', 'dimension<?php echo (int)$GADASH_Config->options ['ga_category_dimindex']; ?>', '<?php echo single_tag_title(); ?>');
73
  <?php
74
  }
75
-
76
  if ($GADASH_Config->options['ga_category_dimindex'] and is_single()) {
77
- global $post;
78
- $categories = get_the_category($post->ID);
79
- foreach ($categories as $category) {
80
- ?>
81
  ga('set', 'dimension<?php echo (int)$GADASH_Config->options ['ga_category_dimindex']; ?>', '<?php echo $category->name; ?>');
82
  <?php
83
- break;
84
- }
85
  }
86
-
87
  if ($GADASH_Config->options['ga_user_dimindex']) {
88
- ?>
89
  ga('set', 'dimension<?php echo (int)$GADASH_Config->options ['ga_user_dimindex']; ?>', '<?php echo is_user_logged_in()?'registered':'guest'; ?>');
90
  <?php
91
  }
92
-
93
  do_action('ga_dash_addtrackingcode');
94
-
95
  if ($GADASH_Config->options['ga_dash_anonim']) {
96
- ?> ga('send', 'pageview', {'anonymizeIp': true});<?php } else {?> ga('send', 'pageview');
97
  <?php
98
  }
99
  if ($GADASH_Config->options['ga_dash_adsense']) {
100
- ?>
101
 
102
  window.google_analytics_uacct = "<?php echo esc_html($profile[2]); ?>";
103
  <?php }?>
16
  <?php
17
  $create_options = '{';
18
  if ($GADASH_Config->options['ga_speed_samplerate'] != 1) {
19
+ $create_options .= "'siteSpeedSampleRate' : " . (int) $GADASH_Config->options['ga_speed_samplerate'];
20
  }
21
  if ($GADASH_Config->options['ga_crossdomain_tracking'] and $GADASH_Config->options['ga_crossdomain_list'] != '') {
22
+ if ($create_options != '{') {
23
+ $create_options .= ', ';
24
+ }
25
+ $create_options .= "'allowLinker' : true";
26
  }
27
  $create_options .= '}';
28
  ?>
30
  <?php if ($GADASH_Config->options ['ga_crossdomain_tracking'] AND $GADASH_Config->options ['ga_crossdomain_list']!='') {?>
31
  ga('require', 'linker');
32
  <?php
33
+ $crossdomain_list = explode(',', $GADASH_Config->options['ga_crossdomain_list']);
34
+ $crossdomain_list = array_map('trim', $crossdomain_list);
35
+ $crossdomain_list = strip_tags(implode("','", $crossdomain_list));
36
+ ?>
37
  ga('linker:autoLink', ['<?php echo ($crossdomain_list)?>'] );
38
  <?php
39
  }
 
40
  if ($GADASH_Config->options['ga_dash_remarketing']) {
41
+ ?>
42
  ga('require', 'displayfeatures');
43
  <?php
44
  }
 
45
  if ($GADASH_Config->options['ga_enhanced_links']) {
46
+ ?>
47
  ga('require', 'linkid', 'linkid.js');
48
  <?php
49
  }
 
50
  if ($GADASH_Config->options['ga_author_dimindex'] and (is_single() or is_page())) {
51
+ global $post;
52
+ $author_id = $post->post_author;
53
+ $author_name = get_the_author_meta('display_name', $author_id);
54
+ ?>
55
  ga('set', 'dimension<?php echo (int)$GADASH_Config->options ['ga_author_dimindex']; ?>', '<?php echo $author_name; ?>');
56
  <?php
57
  }
 
58
  if ($GADASH_Config->options['ga_pubyear_dimindex'] and is_single()) {
59
+ global $post;
60
+ $date = get_the_date('Y', $post->ID);
61
+ ?>
62
  ga('set', 'dimension<?php echo (int)$GADASH_Config->options ['ga_pubyear_dimindex']; ?>', '<?php echo $date; ?>');
63
  <?php
64
  }
 
65
  if ($GADASH_Config->options['ga_category_dimindex'] and is_category()) {
66
+ ?>
67
  ga('set', 'dimension<?php echo (int)$GADASH_Config->options ['ga_category_dimindex']; ?>', '<?php echo single_tag_title(); ?>');
68
  <?php
69
  }
 
70
  if ($GADASH_Config->options['ga_category_dimindex'] and is_single()) {
71
+ global $post;
72
+ $categories = get_the_category($post->ID);
73
+ foreach ($categories as $category) {
74
+ ?>
75
  ga('set', 'dimension<?php echo (int)$GADASH_Config->options ['ga_category_dimindex']; ?>', '<?php echo $category->name; ?>');
76
  <?php
77
+ break;
78
+ }
79
  }
 
80
  if ($GADASH_Config->options['ga_user_dimindex']) {
81
+ ?>
82
  ga('set', 'dimension<?php echo (int)$GADASH_Config->options ['ga_user_dimindex']; ?>', '<?php echo is_user_logged_in()?'registered':'guest'; ?>');
83
  <?php
84
  }
 
85
  do_action('ga_dash_addtrackingcode');
 
86
  if ($GADASH_Config->options['ga_dash_anonim']) {
87
+ ?> ga('send', 'pageview', {'anonymizeIp': true});<?php } else {?> ga('send', 'pageview');
88
  <?php
89
  }
90
  if ($GADASH_Config->options['ga_dash_adsense']) {
91
+ ?>
92
 
93
  window.google_analytics_uacct = "<?php echo esc_html($profile[2]); ?>";
94
  <?php }?>
front/widgets.php CHANGED
@@ -6,110 +6,97 @@
6
  * License: GPLv2 or later
7
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
  */
9
-
10
  class GADSH_Frontend_Widget extends WP_Widget
11
  {
12
 
13
- final function __construct()
14
- {
15
- parent::__construct('gadash_frontend_widget', __('Google Analytics Dashboard', 'ga-dash'), array(
16
- 'description' => __("Will display your google analytics stats in a widget", 'ga-dash')
17
- ));
18
-
19
- // Frontend Styles
20
- if (is_active_widget(false, false, $this->id_base, true)) {
21
- add_action('wp_enqueue_scripts', array(
22
- $this,
23
- 'ga_dash_front_enqueue_styles'
24
- ));
25
- }
26
  }
 
27
 
28
- function ga_dash_front_enqueue_styles()
29
- {
30
- global $GADASH_Config;
31
-
32
- wp_enqueue_style('ga_dash-front', $GADASH_Config->plugin_url . '/front/css/content_stats.css', NULL, GADWP_CURRENT_VERSION);
33
- wp_enqueue_script('ga_dash-front', $GADASH_Config->plugin_url . '/front/js/content_stats.js', array(
34
- 'jquery'
35
- ), GADWP_CURRENT_VERSION);
36
- wp_enqueue_script('googlejsapi', 'https://www.google.com/jsapi');
37
- }
38
 
39
- public function widget($args, $instance)
40
- {
41
- global $GADASH_Config;
42
-
43
- $widget_title = apply_filters('widget_title', $instance['title']);
44
- $title = __("Sessions", 'ga-dash') . ($instance['anonim'] ? "' " . __("trend", 'ga-dash') : '');
45
-
46
- echo "\n<!-- BEGIN GADWP v" . GADWP_CURRENT_VERSION . " Widget - https://deconf.com/google-analytics-dashboard-wordpress/ -->\n";
47
- echo $args['before_widget'];
48
- if (! empty($widget_title)) {
49
- echo $args['before_title'] . $widget_title . $args['after_title'];
50
- }
51
-
52
- /*
53
- * Include Tools
54
- */
55
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
56
- $tools = new GADASH_Tools();
57
-
58
- if (isset($GADASH_Config->options['ga_dash_style'])) {
59
- $css = "colors:['" . $GADASH_Config->options['ga_dash_style'] . "','" . $tools->colourVariator($GADASH_Config->options['ga_dash_style'], - 20) . "'],";
60
- $color = $GADASH_Config->options['ga_dash_style'];
61
- } else {
62
- $css = "";
63
- $color = "#3366CC";
64
- }
65
-
66
- ob_start();
67
-
68
- if ($instance['anonim']) {
69
- $formater = "var formatter = new google.visualization.NumberFormat({
70
  suffix: '%',
71
  fractionDigits: 2
72
  });
73
 
74
  formatter.format(data, 1); ";
75
- } else {
76
- $formater = '';
77
- }
78
-
 
 
 
 
 
 
 
 
 
 
 
79
  $periodtext = "";
80
-
81
- switch ($instance['period']) {
82
- case '7daysAgo':
83
- $periodtext = __('Last 7 Days', 'ga-dash');
84
- break;
85
- case '14daysAgo':
86
- $periodtext = __('Last 14 Days', 'ga-dash');
87
- break;
88
- case '30daysAgo':
89
- $periodtext = __('Last 30 Days', 'ga-dash');
90
- break;
91
- default:
92
- $periodtext = "";
93
- break;
94
- }
95
-
96
- switch ($instance['display']) {
97
- case '1':
98
- echo '<div id="gadwp-widget"><div id="gadwp-widgetchart"></div><div id="gadwp-widgettotals"></div></div>';
99
- break;
100
- case '2':
101
- echo '<div id="gadwp-widget"><div id="gadwp-widgetchart"></div></div>';
102
- break;
103
- case '3':
104
- echo '<div id="gadwp-widget"><div id="gadwp-widgettotals"></div></div>';
105
- break;
106
- }
107
-
108
- echo '<script type="text/javascript">
109
 
110
- jQuery.post("' . admin_url('admin-ajax.php') . '", {action: "gadash_get_frontendwidget_data",gadash_anonim: "' . $instance['anonim'] . '",gadash_period: "' . $instance['period'] . '"}, function(response){
111
- response = jQuery.parseJSON(response);
112
  if (!jQuery.isNumeric(response)){
 
113
  if (jQuery("#gadwp-widgetchart")[0]){
114
  gadash_widgetsessions=jQuery.parseJSON(response[0]);
115
  google.setOnLoadCallback(ga_dash_drawfwidgetsessions(gadash_widgetsessions));
@@ -122,8 +109,7 @@ class GADSH_Frontend_Widget extends WP_Widget
122
  jQuery("#gadwp-widgetchart").html("' . __("This report is unavailable", 'ga-dash') . ' ("+response+")");
123
  }
124
  });';
125
-
126
- echo 'google.load("visualization", "1", {packages:["corechart"]});
127
  function ga_dash_drawfwidgetsessions(response) {
128
  var data = google.visualization.arrayToDataTable(response);
129
  var options = {
@@ -145,30 +131,24 @@ class GADSH_Frontend_Widget extends WP_Widget
145
  }
146
  jQuery("#gadwp-widgettotals").html("<div class=\"gadwp-left\">' . __("Period:", 'ga-dash') . '</div> <div class=\"gadwp-right\">' . $periodtext . '</div><div class=\"gadwp-left\">' . __("Sessions:", 'ga-dash') . '</div> <div class=\"gadwp-right\">"+response+"</div>");
147
  }';
148
-
149
- echo '</script>';
150
-
151
- if ($instance['give_credits'] == 1)
152
- echo '<div style="text-align:right;width:100%;font-size:0.8em;clear:both;margin-right:5px;">' . __('generated by', 'ga-dash') . ' <a href="https://deconf.com/google-analytics-dashboard-wordpress/" rel="nofollow" style="text-decoration:none;font-size:1em;">GADWP</a>&nbsp;</div>';
153
-
154
- $widget_content = ob_get_contents();
155
-
156
- ob_end_clean();
157
-
158
- echo apply_filters('widget_html_content', $widget_content);
159
-
160
- echo $args['after_widget'];
161
- echo "\n<!-- END GADWP Widget -->\n";
162
- }
163
 
164
- public function form($instance)
165
- {
166
- $widget_title = (isset($instance['title']) ? $instance['title'] : __("Google Analytics Stats", 'ga-dash'));
167
- $period = (isset($instance['period']) ? $instance['period'] : '7daysAgo');
168
- $display = (isset($instance['display']) ? $instance['display'] : 1);
169
- $give_credits = (isset($instance['give_credits']) ? $instance['give_credits'] : 1);
170
- $anonim = (isset($instance['anonim']) ? $instance['anonim'] : 0);
171
- ?>
172
  <p>
173
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( "Title:",'ga-dash' ); ?></label>
174
  <input class="widefat"
@@ -187,7 +167,7 @@ class GADSH_Frontend_Widget extends WP_Widget
187
  </select>
188
  </p>
189
  <p>
190
- <label for="<?php echo $this->get_field_id( 'anonim' ); ?>"><?php _e( "Anonimize chart&#39;s stats:",'ga-dash' ); ?></label>
191
  <input class="widefat"
192
  id="<?php echo $this->get_field_id( 'anonim' ); ?>"
193
  name="<?php echo $this->get_field_name( 'anonim' ); ?>"
@@ -213,22 +193,22 @@ class GADSH_Frontend_Widget extends WP_Widget
213
 
214
 
215
  <?php
216
- }
217
 
218
- public function update($new_instance, $old_instance)
219
- {
220
- $instance = array();
221
- $instance['title'] = (! empty($new_instance['title'])) ? strip_tags($new_instance['title']) : 'Analytics Stats';
222
- $instance['period'] = (! empty($new_instance['period'])) ? strip_tags($new_instance['period']) : '7daysAgo';
223
- $instance['display'] = (! empty($new_instance['display'])) ? strip_tags($new_instance['display']) : 1;
224
- $instance['give_credits'] = (! empty($new_instance['give_credits'])) ? strip_tags($new_instance['give_credits']) : 0;
225
- $instance['anonim'] = (! empty($new_instance['anonim'])) ? strip_tags($new_instance['anonim']) : 0;
226
- return $instance;
227
- }
228
  }
229
 
230
  function register_GADSH_Frontend_Widget()
231
  {
232
- register_widget('GADSH_Frontend_Widget');
233
  }
234
  add_action('widgets_init', 'register_GADSH_Frontend_Widget');
6
  * License: GPLv2 or later
7
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
  */
 
9
  class GADSH_Frontend_Widget extends WP_Widget
10
  {
11
 
12
+ final function __construct()
13
+ {
14
+ parent::__construct('gadash_frontend_widget', __('Google Analytics Dashboard', 'ga-dash'), array(
15
+ 'description' => __("Will display your google analytics stats in a widget", 'ga-dash')
16
+ ));
17
+ // Frontend Styles
18
+ if (is_active_widget(false, false, $this->id_base, true)) {
19
+ add_action('wp_enqueue_scripts', array(
20
+ $this,
21
+ 'ga_dash_front_enqueue_styles'
22
+ ));
 
 
23
  }
24
+ }
25
 
26
+ function ga_dash_front_enqueue_styles()
27
+ {
28
+ global $GADASH_Config;
29
+ wp_enqueue_style('ga_dash-front', $GADASH_Config->plugin_url . '/front/css/content_stats.css', NULL, GADWP_CURRENT_VERSION);
30
+ wp_enqueue_script('ga_dash-front', $GADASH_Config->plugin_url . '/front/js/content_stats.js', array(
31
+ 'jquery'
32
+ ), GADWP_CURRENT_VERSION);
33
+ wp_enqueue_script('googlejsapi', 'https://www.google.com/jsapi');
34
+ }
 
35
 
36
+ public function widget($args, $instance)
37
+ {
38
+ global $GADASH_Config;
39
+ $widget_title = apply_filters('widget_title', $instance['title']);
40
+ $title = __("Sessions", 'ga-dash') . ($instance['anonim'] ? "' " . __("trend", 'ga-dash') : '');
41
+ echo "\n<!-- BEGIN GADWP v" . GADWP_CURRENT_VERSION . " Widget - https://deconf.com/google-analytics-dashboard-wordpress/ -->\n";
42
+ echo $args['before_widget'];
43
+ if (! empty($widget_title)) {
44
+ echo $args['before_title'] . $widget_title . $args['after_title'];
45
+ }
46
+ /*
47
+ * Include Tools
48
+ */
49
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
50
+ $tools = new GADASH_Tools();
51
+ if (isset($GADASH_Config->options['ga_dash_style'])) {
52
+ $css = "colors:['" . $GADASH_Config->options['ga_dash_style'] . "','" . $tools->colourVariator($GADASH_Config->options['ga_dash_style'], - 20) . "'],";
53
+ $color = $GADASH_Config->options['ga_dash_style'];
54
+ } else {
55
+ $css = "";
56
+ $color = "#3366CC";
57
+ }
58
+ ob_start();
59
+ if ($instance['anonim']) {
60
+ $formater = "var formatter = new google.visualization.NumberFormat({
 
 
 
 
 
 
61
  suffix: '%',
62
  fractionDigits: 2
63
  });
64
 
65
  formatter.format(data, 1); ";
66
+ } else {
67
+ $formater = '';
68
+ }
69
+ $periodtext = "";
70
+ switch ($instance['period']) {
71
+ case '7daysAgo':
72
+ $periodtext = __('Last 7 Days', 'ga-dash');
73
+ break;
74
+ case '14daysAgo':
75
+ $periodtext = __('Last 14 Days', 'ga-dash');
76
+ break;
77
+ case '30daysAgo':
78
+ $periodtext = __('Last 30 Days', 'ga-dash');
79
+ break;
80
+ default:
81
  $periodtext = "";
82
+ break;
83
+ }
84
+ switch ($instance['display']) {
85
+ case '1':
86
+ echo '<div id="gadwp-widget"><div id="gadwp-widgetchart"></div><div id="gadwp-widgettotals"></div></div>';
87
+ break;
88
+ case '2':
89
+ echo '<div id="gadwp-widget"><div id="gadwp-widgetchart"></div></div>';
90
+ break;
91
+ case '3':
92
+ echo '<div id="gadwp-widget"><div id="gadwp-widgettotals"></div></div>';
93
+ break;
94
+ }
95
+ echo '<script type="text/javascript">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
+ jQuery.post("' . admin_url('admin-ajax.php') . '", {action: "gadash_get_frontendwidget_data",gadash_number: "' . $this->number . '",gadash_optionname: "' . $this->option_name . '"}, function(response){
 
98
  if (!jQuery.isNumeric(response)){
99
+ response = jQuery.parseJSON(response);
100
  if (jQuery("#gadwp-widgetchart")[0]){
101
  gadash_widgetsessions=jQuery.parseJSON(response[0]);
102
  google.setOnLoadCallback(ga_dash_drawfwidgetsessions(gadash_widgetsessions));
109
  jQuery("#gadwp-widgetchart").html("' . __("This report is unavailable", 'ga-dash') . ' ("+response+")");
110
  }
111
  });';
112
+ echo 'google.load("visualization", "1", {packages:["corechart"]});
 
113
  function ga_dash_drawfwidgetsessions(response) {
114
  var data = google.visualization.arrayToDataTable(response);
115
  var options = {
131
  }
132
  jQuery("#gadwp-widgettotals").html("<div class=\"gadwp-left\">' . __("Period:", 'ga-dash') . '</div> <div class=\"gadwp-right\">' . $periodtext . '</div><div class=\"gadwp-left\">' . __("Sessions:", 'ga-dash') . '</div> <div class=\"gadwp-right\">"+response+"</div>");
133
  }';
134
+ echo '</script>';
135
+ if ($instance['give_credits'] == 1)
136
+ echo '<div style="text-align:right;width:100%;font-size:0.8em;clear:both;margin-right:5px;">' . __('generated by', 'ga-dash') . ' <a href="https://deconf.com/google-analytics-dashboard-wordpress/" rel="nofollow" style="text-decoration:none;font-size:1em;">GADWP</a>&nbsp;</div>';
137
+ $widget_content = ob_get_contents();
138
+ ob_end_clean();
139
+ echo apply_filters('widget_html_content', $widget_content);
140
+ echo $args['after_widget'];
141
+ echo "\n<!-- END GADWP Widget -->\n";
142
+ }
 
 
 
 
 
 
143
 
144
+ public function form($instance)
145
+ {
146
+ $widget_title = (isset($instance['title']) ? $instance['title'] : __("Google Analytics Stats", 'ga-dash'));
147
+ $period = (isset($instance['period']) ? $instance['period'] : '7daysAgo');
148
+ $display = (isset($instance['display']) ? $instance['display'] : 1);
149
+ $give_credits = (isset($instance['give_credits']) ? $instance['give_credits'] : 1);
150
+ $anonim = (isset($instance['anonim']) ? $instance['anonim'] : 0);
151
+ ?>
152
  <p>
153
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( "Title:",'ga-dash' ); ?></label>
154
  <input class="widefat"
167
  </select>
168
  </p>
169
  <p>
170
+ <label for="<?php echo $this->get_field_id( 'anonim' ); ?>"><?php _e( "Anonymize stats:",'ga-dash' ); ?></label>
171
  <input class="widefat"
172
  id="<?php echo $this->get_field_id( 'anonim' ); ?>"
173
  name="<?php echo $this->get_field_name( 'anonim' ); ?>"
193
 
194
 
195
  <?php
196
+ }
197
 
198
+ public function update($new_instance, $old_instance)
199
+ {
200
+ $instance = array();
201
+ $instance['title'] = (! empty($new_instance['title'])) ? strip_tags($new_instance['title']) : 'Analytics Stats';
202
+ $instance['period'] = (! empty($new_instance['period'])) ? strip_tags($new_instance['period']) : '7daysAgo';
203
+ $instance['display'] = (! empty($new_instance['display'])) ? strip_tags($new_instance['display']) : 1;
204
+ $instance['give_credits'] = (! empty($new_instance['give_credits'])) ? strip_tags($new_instance['give_credits']) : 0;
205
+ $instance['anonim'] = (! empty($new_instance['anonim'])) ? strip_tags($new_instance['anonim']) : 0;
206
+ return $instance;
207
+ }
208
  }
209
 
210
  function register_GADSH_Frontend_Widget()
211
  {
212
+ register_widget('GADSH_Frontend_Widget');
213
  }
214
  add_action('widgets_init', 'register_GADSH_Frontend_Widget');
gadwp.php CHANGED
@@ -4,84 +4,75 @@
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.4.3
8
  * Author URI: https://deconf.com
9
  */
10
- define('GADWP_CURRENT_VERSION', '4.4.3');
11
-
12
  /*
13
  * Include Install
14
  */
15
-
16
  include_once (dirname(__FILE__) . '/install/install.php');
17
  register_activation_hook(__FILE__, array(
18
- 'GADASH_Install',
19
- 'install'
20
  ));
21
-
22
  /*
23
  * Include Uninstall
24
  */
25
  include_once (dirname(__FILE__) . '/install/uninstall.php');
26
  register_uninstall_hook(__FILE__, array(
27
- 'GADASH_Uninstall',
28
- 'uninstall'
29
  ));
30
-
31
  include_once (dirname(__FILE__) . '/config.php');
32
-
33
  // Plugin i18n
34
  add_action('plugins_loaded', 'ga_dash_load_i18n');
35
 
36
  function ga_dash_load_i18n()
37
  {
38
- load_plugin_textdomain('ga-dash', false, basename(dirname(__FILE__)) . '/languages');
39
  }
40
-
41
  add_action('plugins_loaded', 'gadash_init');
42
 
43
  function gadash_init()
44
  {
45
- global $GADASH_Config;
46
-
 
 
 
 
 
47
  /*
48
- * Include Tools
49
  */
50
- include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
51
- $tools = new GADASH_Tools();
52
-
53
- if (is_admin()) {
54
-
55
- /*
56
- * Include backend widgets
57
- */
58
- if ($tools->check_roles($GADASH_Config->options['ga_dash_access_back'])) {
59
- include_once (dirname(__FILE__) . '/admin/dashboard_widgets.php');
60
- }
61
- } else {
62
- /*
63
- * Include frontend stats
64
- */
65
- if ($tools->check_roles($GADASH_Config->options['ga_dash_access_front']) and ($GADASH_Config->options['ga_dash_frontend_stats'] or $GADASH_Config->options['ga_dash_frontend_keywords'])) {
66
- include_once (dirname(__FILE__) . '/front/frontend.php');
67
- }
68
- /*
69
- * Include tracking
70
- */
71
- if (! $tools->check_roles($GADASH_Config->options['ga_track_exclude'], true) and $GADASH_Config->options['ga_dash_tracking']) {
72
- include_once (dirname(__FILE__) . '/front/tracking.php');
73
- }
74
  }
 
75
  /*
76
- * Include frontend widgets
77
- */
78
- include_once (dirname(__FILE__) . '/front/widgets.php');
79
- /*
80
- * Include Frontend Ajax actions
81
  */
82
- include_once ($GADASH_Config->plugin_path . '/front/ajax-actions.php');
 
 
83
  /*
84
- * Include Backend Ajax actions
85
  */
86
- include_once ($GADASH_Config->plugin_path . '/admin/ajax-actions.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  }
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.4.4
8
  * Author URI: https://deconf.com
9
  */
10
+ define('GADWP_CURRENT_VERSION', '4.4.4');
 
11
  /*
12
  * Include Install
13
  */
 
14
  include_once (dirname(__FILE__) . '/install/install.php');
15
  register_activation_hook(__FILE__, array(
16
+ 'GADASH_Install',
17
+ 'install'
18
  ));
 
19
  /*
20
  * Include Uninstall
21
  */
22
  include_once (dirname(__FILE__) . '/install/uninstall.php');
23
  register_uninstall_hook(__FILE__, array(
24
+ 'GADASH_Uninstall',
25
+ 'uninstall'
26
  ));
 
27
  include_once (dirname(__FILE__) . '/config.php');
 
28
  // Plugin i18n
29
  add_action('plugins_loaded', 'ga_dash_load_i18n');
30
 
31
  function ga_dash_load_i18n()
32
  {
33
+ load_plugin_textdomain('ga-dash', false, basename(dirname(__FILE__)) . '/languages');
34
  }
 
35
  add_action('plugins_loaded', 'gadash_init');
36
 
37
  function gadash_init()
38
  {
39
+ global $GADASH_Config;
40
+ /*
41
+ * Include Tools
42
+ */
43
+ include_once ($GADASH_Config->plugin_path . '/tools/tools.php');
44
+ $tools = new GADASH_Tools();
45
+ if (is_admin()) {
46
  /*
47
+ * Include backend widgets
48
  */
49
+ if ($tools->check_roles($GADASH_Config->options['ga_dash_access_back'])) {
50
+ include_once (dirname(__FILE__) . '/admin/dashboard_widgets.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  }
52
+ } else {
53
  /*
54
+ * Include frontend stats
 
 
 
 
55
  */
56
+ if ($tools->check_roles($GADASH_Config->options['ga_dash_access_front']) and ($GADASH_Config->options['ga_dash_frontend_stats'] or $GADASH_Config->options['ga_dash_frontend_keywords'])) {
57
+ include_once (dirname(__FILE__) . '/front/frontend.php');
58
+ }
59
  /*
60
+ * Include tracking
61
  */
62
+ if (! $tools->check_roles($GADASH_Config->options['ga_track_exclude'], true) and $GADASH_Config->options['ga_dash_tracking']) {
63
+ include_once (dirname(__FILE__) . '/front/tracking.php');
64
+ }
65
+ }
66
+ /*
67
+ * Include frontend widgets
68
+ */
69
+ include_once (dirname(__FILE__) . '/front/widgets.php');
70
+ /*
71
+ * Include Frontend Ajax actions
72
+ */
73
+ include_once ($GADASH_Config->plugin_path . '/front/ajax-actions.php');
74
+ /*
75
+ * Include Backend Ajax actions
76
+ */
77
+ include_once ($GADASH_Config->plugin_path . '/admin/ajax-actions.php');
78
  }
install/install.php CHANGED
@@ -9,128 +9,124 @@
9
  class GADASH_Install
10
  {
11
 
12
- static function install()
13
- {
14
- if (! get_option('ga_dash_token')) {
15
- $options = array();
16
- $options['ga_dash_apikey'] = '';
17
- $options['ga_dash_clientid'] = '';
18
- $options['ga_dash_clientsecret'] = '';
19
- $options['ga_dash_access_front'][] = 'administrator';
20
- $options['ga_dash_access_back'][] = 'administrator';
21
- $options['ga_dash_tableid_jail'] = '';
22
- $options['ga_dash_style'] = '#1e73be';
23
- $options['ga_dash_jailadmins'] = 1;
24
- $options['ga_dash_cachetime'] = 3600;
25
- $options['ga_dash_tracking'] = 1;
26
- $options['ga_dash_tracking_type'] = 'universal';
27
- $options['ga_dash_default_ua'] = '';
28
- $options['ga_dash_anonim'] = 0;
29
- $options['ga_dash_userapi'] = 0;
30
- $options['ga_event_tracking'] = 0;
31
- $options['ga_event_downloads'] = 'zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*';
32
- $options['ga_track_exclude'] = array();
33
- $options['ga_target_geomap'] = '';
34
- $options['ga_realtime_pages'] = 10;
35
- $options['ga_dash_token'] = '';
36
- $options['ga_dash_refresh_token'] = '';
37
- $options['ga_dash_profile_list'] = '';
38
- $options['ga_dash_tableid'] = '';
39
- $options['ga_dash_frontend_keywords'] = 0;
40
- $options['ga_tracking_code'] = '';
41
- $options['ga_enhanced_links'] = 0;
42
- $options['ga_dash_remarketing'] = 0;
43
- $options['ga_dash_default_metric'] = 'sessions';
44
- $options['ga_dash_default_dimension'] = '30daysAgo';
45
- $options['ga_dash_frontend_stats'] = 0;
46
- $options['ga_dash_network'] = 0;
47
- $options['ga_dash_adsense'] = 0;
48
- $options['ga_speed_samplerate'] = 1;
49
- $options['ga_event_bouncerate'] = 0;
50
- $options['ga_crossdomain_tracking'] = 0;
51
- $options['ga_crossdomain_list'] = '';
52
- $options['ga_author_dimindex'] = 0;
53
- $options['ga_category_dimindex'] = 0;
54
- $options['ga_user_dimindex'] = 0;
55
- $options['ga_pubyear_dimindex'] = 0;
56
- $options['ga_aff_tracking'] = 0;
57
- $options['ga_event_affiliates'] = '/out/';
58
- } else {
59
- $options = array();
60
- $options['ga_dash_apikey'] = get_option('ga_dash_apikey');
61
- $options['ga_dash_clientid'] = get_option('ga_dash_clientid');
62
- $options['ga_dash_clientsecret'] = get_option('ga_dash_clientsecret');
63
- $options['ga_dash_access'] = get_option('ga_dash_access');
64
- $options['ga_dash_access_front'][] = 'administrator';
65
- $options['ga_dash_access_back'][] = 'administrator';
66
- $options['ga_dash_tableid_jail'] = get_option('ga_dash_tableid_jail');
67
- $options['ga_dash_frontend_stats'] = get_option('ga_dash_frontend');
68
- $options['ga_dash_style'] = '#1e73be';
69
- $options['ga_dash_jailadmins'] = get_option('ga_dash_jailadmins');
70
- $options['ga_dash_cachetime'] = get_option('ga_dash_cachetime');
71
-
72
- if (get_option('ga_dash_tracking') == 4) {
73
- $options['ga_dash_tracking'] = 0;
74
- } else {
75
- $options['ga_dash_tracking'] = 1;
76
- }
77
-
78
- $options['ga_dash_tracking_type'] = get_option('ga_dash_tracking_type');
79
- $options['ga_dash_default_ua'] = get_option('ga_dash_default_ua');
80
- $options['ga_dash_anonim'] = get_option('ga_dash_anonim');
81
- $options['ga_dash_userapi'] = get_option('ga_dash_userapi');
82
- $options['ga_event_tracking'] = get_option('ga_event_tracking');
83
- $options['ga_event_downloads'] = get_option('ga_event_downloads');
84
- $options['ga_track_exclude'] = array();
85
- $options['ga_target_geomap'] = get_option('ga_target_geomap');
86
- $options['ga_realtime_pages'] = get_option('ga_realtime_pages');
87
- $options['ga_dash_token'] = get_option('ga_dash_token');
88
- $options['ga_dash_refresh_token'] = get_option('ga_dash_refresh_token');
89
- $options['ga_dash_profile_list'] = get_option('ga_dash_profile_list');
90
- $options['ga_dash_tableid'] = get_option('ga_dash_tableid');
91
- $options['ga_dash_frontend_keywords'] = 0;
92
- $options['ga_enhanced_links'] = 0;
93
- $options['ga_dash_remarketing'] = 0;
94
- $options['ga_dash_default_metric'] = 'sessions';
95
- $options['ga_dash_default_dimension'] = '30daysAgo';
96
- $options['ga_dash_network'] = 0;
97
- $options['ga_event_bouncerate'] = 0;
98
- $options['ga_crossdomain_tracking'] = 0;
99
- $options['ga_crossdomain_list'] = '';
100
- $options['ga_author_dimindex'] = 0;
101
- $options['ga_category_dimindex'] = 0;
102
- $options['ga_user_dimindex'] = 0;
103
- $options['ga_pubyear_dimindex'] = 0;
104
- $options['ga_event_affiliates'] = '/out/';
105
- $options['ga_aff_tracking'] = 0;
106
-
107
- delete_option('ga_dash_apikey');
108
- delete_option('ga_dash_clientid');
109
- delete_option('ga_dash_clientsecret');
110
- delete_option('ga_dash_access');
111
- delete_option('ga_dash_access_front');
112
- delete_option('ga_dash_access_back');
113
- delete_option('ga_dash_tableid_jail');
114
- delete_option('ga_dash_frontend');
115
- delete_option('ga_dash_style');
116
- delete_option('ga_dash_jailadmins');
117
- delete_option('ga_dash_cachetime');
118
- delete_option('ga_dash_tracking');
119
- delete_option('ga_dash_tracking_type');
120
- delete_option('ga_dash_default_ua');
121
- delete_option('ga_dash_anonim');
122
- delete_option('ga_dash_userapi');
123
- delete_option('ga_event_tracking');
124
- delete_option('ga_event_downloads');
125
- delete_option('ga_track_exclude');
126
- delete_option('ga_target_geomap');
127
- delete_option('ga_realtime_pages');
128
- delete_option('ga_dash_token');
129
- delete_option('ga_dash_refresh_token');
130
- delete_option('ga_dash_profile_list');
131
- delete_option('ga_dash_tableid');
132
- }
133
-
134
- add_option('gadash_options', json_encode($options));
135
  }
 
 
136
  }
9
  class GADASH_Install
10
  {
11
 
12
+ static function install()
13
+ {
14
+ if (! get_option('ga_dash_token')) {
15
+ $options = array();
16
+ $options['ga_dash_apikey'] = '';
17
+ $options['ga_dash_clientid'] = '';
18
+ $options['ga_dash_clientsecret'] = '';
19
+ $options['ga_dash_access_front'][] = 'administrator';
20
+ $options['ga_dash_access_back'][] = 'administrator';
21
+ $options['ga_dash_tableid_jail'] = '';
22
+ $options['ga_dash_style'] = '#1e73be';
23
+ $options['ga_dash_jailadmins'] = 1;
24
+ $options['ga_dash_cachetime'] = 3600;
25
+ $options['ga_dash_tracking'] = 1;
26
+ $options['ga_dash_tracking_type'] = 'universal';
27
+ $options['ga_dash_default_ua'] = '';
28
+ $options['ga_dash_anonim'] = 0;
29
+ $options['ga_dash_userapi'] = 0;
30
+ $options['ga_event_tracking'] = 0;
31
+ $options['ga_event_downloads'] = 'zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*';
32
+ $options['ga_track_exclude'] = array();
33
+ $options['ga_target_geomap'] = '';
34
+ $options['ga_realtime_pages'] = 10;
35
+ $options['ga_dash_token'] = '';
36
+ $options['ga_dash_refresh_token'] = '';
37
+ $options['ga_dash_profile_list'] = '';
38
+ $options['ga_dash_tableid'] = '';
39
+ $options['ga_dash_frontend_keywords'] = 0;
40
+ $options['ga_tracking_code'] = '';
41
+ $options['ga_enhanced_links'] = 0;
42
+ $options['ga_dash_remarketing'] = 0;
43
+ $options['ga_dash_default_metric'] = 'sessions';
44
+ $options['ga_dash_default_dimension'] = '30daysAgo';
45
+ $options['ga_dash_frontend_stats'] = 0;
46
+ $options['ga_dash_network'] = 0;
47
+ $options['ga_dash_adsense'] = 0;
48
+ $options['ga_speed_samplerate'] = 1;
49
+ $options['ga_event_bouncerate'] = 0;
50
+ $options['ga_crossdomain_tracking'] = 0;
51
+ $options['ga_crossdomain_list'] = '';
52
+ $options['ga_author_dimindex'] = 0;
53
+ $options['ga_category_dimindex'] = 0;
54
+ $options['ga_user_dimindex'] = 0;
55
+ $options['ga_pubyear_dimindex'] = 0;
56
+ $options['ga_aff_tracking'] = 0;
57
+ $options['ga_event_affiliates'] = '/out/';
58
+ } else {
59
+ $options = array();
60
+ $options['ga_dash_apikey'] = get_option('ga_dash_apikey');
61
+ $options['ga_dash_clientid'] = get_option('ga_dash_clientid');
62
+ $options['ga_dash_clientsecret'] = get_option('ga_dash_clientsecret');
63
+ $options['ga_dash_access'] = get_option('ga_dash_access');
64
+ $options['ga_dash_access_front'][] = 'administrator';
65
+ $options['ga_dash_access_back'][] = 'administrator';
66
+ $options['ga_dash_tableid_jail'] = get_option('ga_dash_tableid_jail');
67
+ $options['ga_dash_frontend_stats'] = get_option('ga_dash_frontend');
68
+ $options['ga_dash_style'] = '#1e73be';
69
+ $options['ga_dash_jailadmins'] = get_option('ga_dash_jailadmins');
70
+ $options['ga_dash_cachetime'] = get_option('ga_dash_cachetime');
71
+ if (get_option('ga_dash_tracking') == 4) {
72
+ $options['ga_dash_tracking'] = 0;
73
+ } else {
74
+ $options['ga_dash_tracking'] = 1;
75
+ }
76
+ $options['ga_dash_tracking_type'] = get_option('ga_dash_tracking_type');
77
+ $options['ga_dash_default_ua'] = get_option('ga_dash_default_ua');
78
+ $options['ga_dash_anonim'] = get_option('ga_dash_anonim');
79
+ $options['ga_dash_userapi'] = get_option('ga_dash_userapi');
80
+ $options['ga_event_tracking'] = get_option('ga_event_tracking');
81
+ $options['ga_event_downloads'] = get_option('ga_event_downloads');
82
+ $options['ga_track_exclude'] = array();
83
+ $options['ga_target_geomap'] = get_option('ga_target_geomap');
84
+ $options['ga_realtime_pages'] = get_option('ga_realtime_pages');
85
+ $options['ga_dash_token'] = get_option('ga_dash_token');
86
+ $options['ga_dash_refresh_token'] = get_option('ga_dash_refresh_token');
87
+ $options['ga_dash_profile_list'] = get_option('ga_dash_profile_list');
88
+ $options['ga_dash_tableid'] = get_option('ga_dash_tableid');
89
+ $options['ga_dash_frontend_keywords'] = 0;
90
+ $options['ga_enhanced_links'] = 0;
91
+ $options['ga_dash_remarketing'] = 0;
92
+ $options['ga_dash_default_metric'] = 'sessions';
93
+ $options['ga_dash_default_dimension'] = '30daysAgo';
94
+ $options['ga_dash_network'] = 0;
95
+ $options['ga_event_bouncerate'] = 0;
96
+ $options['ga_crossdomain_tracking'] = 0;
97
+ $options['ga_crossdomain_list'] = '';
98
+ $options['ga_author_dimindex'] = 0;
99
+ $options['ga_category_dimindex'] = 0;
100
+ $options['ga_user_dimindex'] = 0;
101
+ $options['ga_pubyear_dimindex'] = 0;
102
+ $options['ga_event_affiliates'] = '/out/';
103
+ $options['ga_aff_tracking'] = 0;
104
+ delete_option('ga_dash_apikey');
105
+ delete_option('ga_dash_clientid');
106
+ delete_option('ga_dash_clientsecret');
107
+ delete_option('ga_dash_access');
108
+ delete_option('ga_dash_access_front');
109
+ delete_option('ga_dash_access_back');
110
+ delete_option('ga_dash_tableid_jail');
111
+ delete_option('ga_dash_frontend');
112
+ delete_option('ga_dash_style');
113
+ delete_option('ga_dash_jailadmins');
114
+ delete_option('ga_dash_cachetime');
115
+ delete_option('ga_dash_tracking');
116
+ delete_option('ga_dash_tracking_type');
117
+ delete_option('ga_dash_default_ua');
118
+ delete_option('ga_dash_anonim');
119
+ delete_option('ga_dash_userapi');
120
+ delete_option('ga_event_tracking');
121
+ delete_option('ga_event_downloads');
122
+ delete_option('ga_track_exclude');
123
+ delete_option('ga_target_geomap');
124
+ delete_option('ga_realtime_pages');
125
+ delete_option('ga_dash_token');
126
+ delete_option('ga_dash_refresh_token');
127
+ delete_option('ga_dash_profile_list');
128
+ delete_option('ga_dash_tableid');
 
 
 
 
 
 
129
  }
130
+ add_option('gadash_options', json_encode($options));
131
+ }
132
  }
install/uninstall.php CHANGED
@@ -9,29 +9,35 @@
9
  class GADASH_Uninstall
10
  {
11
 
12
- static function uninstall()
13
- {
14
- global $wpdb;
15
- if (is_multisite()) { // Cleanup Network install
16
- foreach (wp_get_sites(array( 'limit' => apply_filters('gadwp_sites_limit', 100))) as $blog) {
17
- switch_to_blog($blog['blog_id']);
18
- $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_gadash%%'");
19
- $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_gadash%%'");
20
- delete_option('gadash_options');
21
- delete_transient('gadash_lasterror');
22
- delete_transient('ga_dash_refresh_token');
23
- delete_transient('ga_dash_gapi_errors');
24
- restore_current_blog();
25
- }
26
- delete_site_option('gadash_network_options');
27
- delete_site_transient('ga_dash_refresh_token');
28
- } else { // Cleanup Single install
29
- $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_gadash%%'");
30
- $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_gadash%%'");
31
- delete_option('gadash_options');
32
- delete_transient('gadash_lasterror');
33
- delete_transient('ga_dash_refresh_token');
34
- delete_transient('ga_dash_gapi_errors');
35
- }
 
 
 
 
 
36
  }
 
37
  }
9
  class GADASH_Uninstall
10
  {
11
 
12
+ static function uninstall()
13
+ {
14
+ global $wpdb;
15
+ if (is_multisite()) { // Cleanup Network install
16
+ foreach (wp_get_sites(array(
17
+ 'limit' => apply_filters('gadwp_sites_limit', 100)
18
+ )) as $blog) {
19
+ switch_to_blog($blog['blog_id']);
20
+ $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_gadash%%'");
21
+ $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_gadash%%'");
22
+ $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_ga_dash%%'");
23
+ $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_ga_dash%%'");
24
+ delete_option('gadash_options');
25
+ delete_transient('ga_dash_lasterror');
26
+ delete_transient('ga_dash_refresh_token');
27
+ delete_transient('ga_dash_gapi_errors');
28
+ restore_current_blog();
29
+ }
30
+ delete_site_option('gadash_network_options');
31
+ delete_site_transient('ga_dash_refresh_token');
32
+ } else { // Cleanup Single install
33
+ $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_gadash%%'");
34
+ $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_gadash%%'");
35
+ $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_ga_dash%%'");
36
+ $sqlquery = $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE '_transient_timeout_ga_dash%%'");
37
+ delete_option('gadash_options');
38
+ delete_transient('ga_dash_lasterror');
39
+ delete_transient('ga_dash_refresh_token');
40
+ delete_transient('ga_dash_gapi_errors');
41
  }
42
+ }
43
  }
languages/ar.mo CHANGED
Binary file
languages/ar.po CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
- "POT-Creation-Date: 2015-01-07 20:25+0200\n"
5
- "PO-Revision-Date: 2015-01-07 20:25+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Ahmed Majed <admin@almobdaa.com>\n"
8
  "Language: ar\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.1\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
@@ -17,68 +17,75 @@ msgstr ""
17
  "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n"
18
  "X-Poedit-SearchPath-0: ../.\n"
19
 
20
- #: .././admin/dashboard_widgets.php:50 .././admin/dashboard_widgets.php:81
21
  msgid "Google Analytics"
22
  msgstr "أحصائيات كوكل"
23
 
24
- #: .././admin/dashboard_widgets.php:54 .././admin/dashboard_widgets.php:85
25
- #: .././admin/ga_dash_settings.php:100 .././admin/ga_dash_settings.php:222
26
- #: .././admin/ga_dash_settings.php:954
27
  msgid "General Settings"
28
  msgstr "الأعدادات العامة"
29
 
30
- #: .././admin/dashboard_widgets.php:58
31
  msgid "Backend Settings"
32
  msgstr "أعدادات العمل"
33
 
34
- #: .././admin/dashboard_widgets.php:62
35
  msgid "Frontend Settings"
36
  msgstr "اعدادات الظهور"
37
 
38
- #: .././admin/dashboard_widgets.php:66
39
  msgid "Tracking Code"
40
  msgstr "كود التعقب"
41
 
42
- #: .././admin/dashboard_widgets.php:132
 
 
 
 
 
 
 
43
  msgid "Settings"
44
  msgstr "الاعدادات"
45
 
46
- #: .././admin/dashboard_widgets.php:148 .././front/widgets.php:15
47
  msgid "Google Analytics Dashboard"
48
  msgstr "لوحة أحصائيات كوكل"
49
 
50
- #: .././admin/dashboard_widgets.php:166
51
  msgid "This plugin needs an authorization:"
52
  msgstr "هذه الاضافة تحتاج الى تصريح:"
53
 
54
- #: .././admin/dashboard_widgets.php:166 .././admin/ga_dash_settings.php:1063
55
- #: .././admin/ga_dash_settings.php:1465
56
  msgid "Authorize Plugin"
57
  msgstr "صرح الأضافة "
58
 
59
- #: .././admin/dashboard_widgets.php:207 .././admin/ga_dash_settings.php:459
60
- #: .././admin/ga_dash_settings.php:966 .././admin/ga_dash_settings.php:991
61
- #: .././admin/ga_dash_settings.php:1383
62
  msgid "View Name:"
63
  msgstr "شاهد الاسم:"
64
 
65
- #: .././admin/dashboard_widgets.php:212
66
  msgid "Something went wrong while retrieving profiles list."
67
  msgstr "حدث خطأ ما اثناء استرجاع قائمة البروفايلات."
68
 
69
- #: .././admin/dashboard_widgets.php:212
70
  msgid "More details"
71
  msgstr "المزيد من التفاصيل"
72
 
73
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
74
  msgid "An admin should asign a default Google Analytics Profile."
75
  msgstr "المدير يجب ان يحصل على حساب احصائيات كوكل رئيسي."
76
 
77
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
78
  msgid "Select Domain"
79
  msgstr "حدد النطاق"
80
 
81
- #: .././admin/dashboard_widgets.php:245
82
  msgid ""
83
  "Something went wrong while retrieving property data. You need to create and "
84
  "properly configure a Google Analytics account:"
@@ -86,764 +93,839 @@ msgstr ""
86
  "حدث خطأ ما اثناء استرجاع بيانات الملكية. تحتاج الى انشاء واعداد حساب كوكل "
87
  "للأحصائيات بصورة صحيحة:"
88
 
89
- #: .././admin/dashboard_widgets.php:245
90
  msgid "Find out more!"
91
  msgstr "اعرف أكثر!"
92
 
93
- #: .././admin/dashboard_widgets.php:276
94
  msgid "Real-Time"
95
  msgstr "الوقت الحقيقي"
96
 
97
- #: .././admin/dashboard_widgets.php:277
98
  msgid "Today"
99
  msgstr "اليوم"
100
 
101
- #: .././admin/dashboard_widgets.php:279
102
  msgid "Yesterday"
103
  msgstr "البارحة"
104
 
105
- #: .././admin/dashboard_widgets.php:281 .././front/widgets.php:83
106
- #: .././front/widgets.php:199
107
  msgid "Last 7 Days"
108
  msgstr "اخر ٧ ايام"
109
 
110
- #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:86
111
- #: .././front/widgets.php:200
112
  msgid "Last 14 Days"
113
  msgstr "أخر ١٤ يوم"
114
 
115
- #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:89
116
- #: .././front/widgets.php:201
117
  msgid "Last 30 Days"
118
  msgstr "اخر ٣٠ يوم"
119
 
120
- #: .././admin/dashboard_widgets.php:287
121
  msgid "Last 90 Days"
122
  msgstr "أخر ٩٠ يوم"
123
 
124
- #: .././admin/dashboard_widgets.php:293 .././admin/dashboard_widgets.php:952
125
- #: .././front/widgets.php:44 .././tools/gapi.php:384 .././tools/gapi.php:543
126
- #: .././tools/gapi.php:587 .././tools/gapi.php:658 .././tools/gapi.php:808
127
- #: .././tools/gapi.php:899
128
  msgid "Sessions"
129
  msgstr ""
130
 
131
- #: .././admin/dashboard_widgets.php:294 .././admin/dashboard_widgets.php:956
132
- #: .././tools/gapi.php:368
133
  msgid "Users"
134
  msgstr ""
135
 
136
- #: .././admin/dashboard_widgets.php:296
137
  msgid "Organic"
138
  msgstr "عضوي"
139
 
140
- #: .././admin/dashboard_widgets.php:298 .././admin/dashboard_widgets.php:960
141
- #: .././tools/gapi.php:372
142
  msgid "Page Views"
143
  msgstr "مشاهدات الصفحة"
144
 
145
- #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:964
146
- #: .././tools/gapi.php:376
147
  msgid "Bounce Rate"
148
  msgstr "نسبة القفز"
149
 
150
- #: .././admin/dashboard_widgets.php:302
151
  msgid "Location"
152
  msgstr ""
153
 
154
- #: .././admin/dashboard_widgets.php:304 .././tools/gapi.php:500
155
  msgid "Pages"
156
  msgstr ""
157
 
158
- #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:543
159
  msgid "Referrers"
160
  msgstr ""
161
 
162
- #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:587
 
163
  msgid "Searches"
164
  msgstr ""
165
 
166
- #: .././admin/dashboard_widgets.php:310
167
  msgid "Traffic Details"
168
  msgstr ""
169
 
170
- #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:657
171
  msgid "REFERRAL"
172
  msgstr "المصدر"
173
 
174
- #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:658
175
  msgid "ORGANIC"
176
  msgstr "عضوي"
177
 
178
- #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:544
179
- #: .././admin/dashboard_widgets.php:659
180
  msgid "SOCIAL"
181
  msgstr "اجتماعي"
182
 
183
- #: .././admin/dashboard_widgets.php:428 .././admin/dashboard_widgets.php:547
184
- #: .././admin/dashboard_widgets.php:660
185
  msgid "CAMPAIGN"
186
  msgstr ""
187
 
188
- #: .././admin/dashboard_widgets.php:432 .././admin/dashboard_widgets.php:550
189
- #: .././admin/dashboard_widgets.php:663
190
  msgid "DIRECT"
191
  msgstr "مباشر"
192
 
193
- #: .././admin/dashboard_widgets.php:436 .././admin/dashboard_widgets.php:664
194
  msgid "NEW"
195
  msgstr "جديد"
196
 
197
- #: .././admin/dashboard_widgets.php:538
198
  msgid "REFERRALS"
199
  msgstr "المصادر"
200
 
201
- #: .././admin/dashboard_widgets.php:541
202
  msgid "KEYWORDS"
203
  msgstr "الكلمات المفتاحية"
204
 
205
- #: .././admin/dashboard_widgets.php:690 .././admin/dashboard_widgets.php:702
206
- #: .././admin/dashboard_widgets.php:757 .././admin/dashboard_widgets.php:769
207
- #: .././admin/dashboard_widgets.php:781 .././admin/dashboard_widgets.php:793
208
- #: .././admin/dashboard_widgets.php:806 .././admin/dashboard_widgets.php:905
209
- #: .././admin/dashboard_widgets.php:908 .././admin/dashboard_widgets.php:992
210
- #: .././admin/dashboard_widgets.php:1004 .././front/frontend.php:88
211
- #: .././front/frontend.php:100 .././front/widgets.php:122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  msgid "This report is unavailable"
213
  msgstr ""
214
 
215
- #: .././admin/dashboard_widgets.php:818
216
  msgid "Traffic Mediums"
217
  msgstr ""
218
 
219
- #: .././admin/dashboard_widgets.php:834
220
  msgid "Visitor Type"
221
  msgstr ""
222
 
223
- #: .././admin/dashboard_widgets.php:850
224
  msgid "Social Networks"
225
  msgstr ""
226
 
227
- #: .././admin/dashboard_widgets.php:866
228
  msgid "Search Engines"
229
  msgstr ""
230
 
231
- #: .././admin/dashboard_widgets.php:968
232
  msgid "Organic Search"
233
  msgstr ""
234
 
235
- #: .././admin/dashboard_widgets.php:972
236
  msgid "Pages/Session"
237
  msgstr ""
238
 
239
- #: .././admin/ga_dash_settings.php:78 .././admin/ga_dash_settings.php:200
240
- #: .././admin/ga_dash_settings.php:418 .././admin/ga_dash_settings.php:841
241
- #: .././admin/ga_dash_settings.php:1228
242
  msgid "Settings saved."
243
  msgstr ""
244
 
245
- #: .././admin/ga_dash_settings.php:80 .././admin/ga_dash_settings.php:202
246
- #: .././admin/ga_dash_settings.php:420 .././admin/ga_dash_settings.php:824
247
- #: .././admin/ga_dash_settings.php:834 .././admin/ga_dash_settings.php:843
248
- #: .././admin/ga_dash_settings.php:855 .././admin/ga_dash_settings.php:1183
249
- #: .././admin/ga_dash_settings.php:1211 .././admin/ga_dash_settings.php:1221
250
- #: .././admin/ga_dash_settings.php:1230 .././admin/ga_dash_settings.php:1242
251
  msgid "Cheating Huh?"
252
  msgstr "تغش ها؟"
253
 
254
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
255
- #: .././admin/ga_dash_settings.php:424
256
- msgid "Something went wrong, you need to"
257
- msgstr "حدث خطأ ما, تحتاج الى"
 
258
 
259
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
260
- #: .././admin/ga_dash_settings.php:424
 
 
 
 
 
 
 
261
  msgid "auhorize the plugin"
262
  msgstr "صرح بالدخول للأضافة"
263
 
264
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
265
- #: .././admin/ga_dash_settings.php:424
266
- msgid "or properly configure your"
267
- msgstr "أو عدل اعداداتك بصورة صحيحة"
268
-
269
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
270
- #: .././admin/ga_dash_settings.php:424
271
- msgid "Google Analytics account"
272
- msgstr "حساب أحصائيات كوكل"
273
-
274
- #: .././admin/ga_dash_settings.php:90
275
  msgid "Google Analytics Frontend Settings"
276
  msgstr "اعدادات الظهور الامامي لأحصائيات كوكل"
277
 
278
- #: .././admin/ga_dash_settings.php:103 .././admin/ga_dash_settings.php:225
279
  msgid "Show stats to:"
280
  msgstr ""
281
 
282
- #: .././admin/ga_dash_settings.php:153
283
  msgid " show page sessions and users in frontend (after each article)"
284
  msgstr ""
285
 
286
- #: .././admin/ga_dash_settings.php:169
287
  msgid " show page searches (after each article)"
288
  msgstr "اظهر بحوث الصفحة (بعد كل مقالة)"
289
 
290
- #: .././admin/ga_dash_settings.php:178 .././admin/ga_dash_settings.php:391
291
- #: .././admin/ga_dash_settings.php:739 .././admin/ga_dash_settings.php:1053
292
- #: .././admin/ga_dash_settings.php:1456
293
  msgid "Save Changes"
294
  msgstr ""
295
 
296
- #: .././admin/ga_dash_settings.php:212
297
  msgid "Google Analytics Dashboard Settings"
298
  msgstr "اعدادات الاضافة"
299
 
300
- #: .././admin/ga_dash_settings.php:275
301
  msgid "disable Switch Profile/View functionality"
302
  msgstr "عطل امكانية تغيير اعدادات الحساب/المشاهدة"
303
 
304
- #: .././admin/ga_dash_settings.php:279
305
  msgid "Real-Time Settings"
306
  msgstr "اعدادات الوقت الحقيقي"
307
 
308
- #: .././admin/ga_dash_settings.php:282
309
  msgid "Maximum number of pages to display on real-time tab:"
310
  msgstr "اكثر عدد صفحات يتم اظهارها في قسم الوقت الحقيقي:"
311
 
312
- #: .././admin/ga_dash_settings.php:287
313
- msgid "(find out more"
314
- msgstr "(اعرف المزيد"
315
 
316
- #: .././admin/ga_dash_settings.php:289 .././admin/ga_dash_settings.php:324
317
  msgid "about this feature"
318
  msgstr "حول هذه الميزة"
319
 
320
- #: .././admin/ga_dash_settings.php:290 .././admin/ga_dash_settings.php:325
321
- msgid ")"
322
- msgstr "("
323
 
324
- #: .././admin/ga_dash_settings.php:293
325
- msgid "Additional Stats & Charts"
326
- msgstr "المزيد من الاحصائيات والاشكال"
327
 
328
- #: .././admin/ga_dash_settings.php:306
329
- msgid " show Geo Map chart for sessions"
330
  msgstr ""
331
 
332
- #: .././admin/ga_dash_settings.php:311
333
- msgid "Target Geo Map to region:"
334
- msgstr "حدد الخريطة الجغرافية لمنطقة معينة:"
335
 
336
- #: .././admin/ga_dash_settings.php:316
337
- msgid "and render top"
338
- msgstr "واظهر الاعلى"
339
 
340
- #: .././admin/ga_dash_settings.php:321
341
- msgid "cities (find out more"
342
- msgstr "المدن (اعرف المزيد"
343
 
344
- #: .././admin/ga_dash_settings.php:339
345
- msgid " show traffic overview"
346
- msgstr "اظهر المرور بصورة عامة"
347
 
348
- #: .././admin/ga_dash_settings.php:353
349
- msgid " show top pages"
350
- msgstr "اظهر الصفحات الاكثر شعبية"
351
 
352
- #: .././admin/ga_dash_settings.php:367
353
- msgid " show top referrers"
354
- msgstr "اظهر المصادر الاكثر شعبية"
355
 
356
- #: .././admin/ga_dash_settings.php:381
357
- msgid " show top searches"
358
- msgstr "اظهر كلمات البحث الاكثر شعبية"
359
 
360
- #: .././admin/ga_dash_settings.php:430
361
- msgid "Google Analytics Tracking Code"
362
- msgstr "كود تعقب احصائيات كوكل"
 
363
 
364
- #: .././admin/ga_dash_settings.php:440
 
 
 
 
365
  msgid "Tracking Settings"
366
  msgstr "اعدادات التعقب"
367
 
368
- #: .././admin/ga_dash_settings.php:443
369
  msgid "Tracking Options:"
370
  msgstr ""
371
 
372
- #: .././admin/ga_dash_settings.php:447
373
  msgid "Disabled"
374
  msgstr "تعطيل"
375
 
376
- #: .././admin/ga_dash_settings.php:449
377
- msgid "Enabled"
378
- msgstr "تفعيل"
379
-
380
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
381
  msgid "Tracking ID:"
382
  msgstr "معرف التعقب:"
383
 
384
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
385
  msgid "Default URL:"
386
  msgstr "الرابط الرئيسي:"
387
 
388
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
389
  msgid "Time Zone:"
390
  msgstr "المنطقة الزمنية:"
391
 
392
- #: .././admin/ga_dash_settings.php:467
393
  msgid "Basic Tracking"
394
  msgstr "التعقب الاساسي"
395
 
396
- #: .././admin/ga_dash_settings.php:473
397
  msgid "Tracking Type:"
398
  msgstr ""
399
 
400
- #: .././admin/ga_dash_settings.php:477
401
  msgid "Classic Analytics"
402
  msgstr "الاحصائيات الكلاسيكية"
403
 
404
- #: .././admin/ga_dash_settings.php:479
405
  msgid "Universal Analytics"
406
  msgstr "الاحصائيات العالمية"
407
 
408
- #: .././admin/ga_dash_settings.php:493
409
  msgid " anonymize IPs while tracking"
410
  msgstr "تجاهل الاي بي عند التعقب"
411
 
412
- #: .././admin/ga_dash_settings.php:508
413
  msgid " enable remarketing, demographics and interests reports"
414
  msgstr "فعل تقارير اعادة التسويق, الديمغرافي والاهتمام"
415
 
416
- #: .././admin/ga_dash_settings.php:512
417
- msgid "Events Tracking"
418
- msgstr "تعقب الافعال"
419
-
420
- #: .././admin/ga_dash_settings.php:525
421
  msgid " track downloads, mailto and outbound links"
422
  msgstr "تعقب التحميلات, ارسل الى والروابط الخارجية"
423
 
424
- #: .././admin/ga_dash_settings.php:529
425
  msgid "Downloads Regex:"
426
  msgstr "حمل التقارير"
427
 
428
- #: .././admin/ga_dash_settings.php:546
429
  msgid " track affiliate links matching this regex"
430
  msgstr "تتبع روابط الداعمين التي تطابق هذا الجزء"
431
 
432
- #: .././admin/ga_dash_settings.php:550
433
  msgid "Affiliates Regex:"
434
  msgstr "روابط الداعمين:"
435
 
436
- #: .././admin/ga_dash_settings.php:567
437
  msgid " track fragment identifiers, hashmarks (#) in URI links"
438
  msgstr ""
439
 
440
- #: .././admin/ga_dash_settings.php:571
441
- msgid "Custom Definitions"
442
- msgstr "تعاريف مخصصة"
443
-
444
- #: .././admin/ga_dash_settings.php:574
445
  msgid "Authors:"
446
  msgstr ""
447
 
448
- #: .././admin/ga_dash_settings.php:584
449
  msgid "Publication Year:"
450
  msgstr ""
451
 
452
- #: .././admin/ga_dash_settings.php:594
453
  msgid "Categories:"
454
  msgstr ""
455
 
456
- #: .././admin/ga_dash_settings.php:604
457
  msgid "User Type:"
458
  msgstr ""
459
 
460
- #: .././admin/ga_dash_settings.php:614
461
  msgid "Advanced Tracking"
462
  msgstr "تتبع متطور"
463
 
464
- #: .././admin/ga_dash_settings.php:617
465
  msgid "Page Speed SR:"
466
  msgstr "سرعة الصفحة:"
467
 
468
- #: .././admin/ga_dash_settings.php:635
469
  msgid " exclude events from bounce-rate calculation"
470
  msgstr "لا تحسب الافعال من حسابات نسبة القفز"
471
 
472
- #: .././admin/ga_dash_settings.php:649
473
  msgid " enable enhanced link attribution"
474
  msgstr "فعل تعديل الرابط المحسن"
475
 
476
- #: .././admin/ga_dash_settings.php:663
477
  msgid " enable AdSense account linking"
478
  msgstr "فعل ربط حساب ادسينس"
479
 
480
- #: .././admin/ga_dash_settings.php:678
481
  msgid " enable cross domain tracking"
482
  msgstr "فعل التتبع عبر الروابط"
483
 
484
- #: .././admin/ga_dash_settings.php:682
485
  msgid "Cross Domains:"
486
  msgstr "عبر الروابط التالية:"
487
 
488
- #: .././admin/ga_dash_settings.php:692 .././admin/ga_dash_settings.php:1396
489
- msgid "Exclude Tracking"
490
- msgstr "لا تتبع"
491
-
492
- #: .././admin/ga_dash_settings.php:695
493
  msgid "Exclude tracking for:"
494
  msgstr ""
495
 
496
- #: .././admin/ga_dash_settings.php:769 .././admin/ga_dash_settings.php:1138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
497
  msgid ""
498
  "Loading the required libraries. If this results in a blank screen or a fatal "
499
  "error, try this solution:"
500
  msgstr ""
501
 
502
- #: .././admin/ga_dash_settings.php:781 .././admin/ga_dash_settings.php:1150
503
  msgid "Plugin authorization succeeded."
504
  msgstr "تم تفعيل تصريح الاضافة بنجاح."
505
 
506
- #: .././admin/ga_dash_settings.php:796 .././admin/ga_dash_settings.php:1173
507
  msgid ""
508
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
509
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
510
  msgstr ""
511
 
512
- #: .././admin/ga_dash_settings.php:822 .././admin/ga_dash_settings.php:1209
513
  msgid "Cleared Cache."
514
  msgstr "الخزن المزال."
515
 
516
- #: .././admin/ga_dash_settings.php:831 .././admin/ga_dash_settings.php:1218
517
  msgid "Token Reseted and Revoked."
518
  msgstr "الجزء المراح والمعدل."
519
 
520
- #: .././admin/ga_dash_settings.php:838 .././admin/ga_dash_settings.php:1225
521
- msgid "Dumping log data."
522
- msgstr "امسح بيانات السجل."
523
-
524
- #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1235
525
  msgid "All other domains/properties were removed."
526
  msgstr "كل الروابط/والخصائص تم إزالتها."
527
 
528
- #: .././admin/ga_dash_settings.php:859 .././admin/ga_dash_settings.php:1246
529
- msgid ""
530
- "PHP CURL is required. Ask your hosting provider to install/enable PHP CURL!"
531
- msgstr ""
532
-
533
- #: .././admin/ga_dash_settings.php:863 .././admin/ga_dash_settings.php:1250
534
  msgid "Google Analytics Settings"
535
  msgstr "إعدادات احصائيات كوكل"
536
 
537
- #: .././admin/ga_dash_settings.php:872 .././admin/ga_dash_settings.php:1258
538
- msgid ""
539
- "Something went wrong. Please check the Debugging Data section for possible "
540
- "errors"
541
- msgstr "حدث خطأ ما. الرجاء التأكد من سجل الاصلاحات لرؤية الاخطاء المحتملة"
542
-
543
- #: .././admin/ga_dash_settings.php:878 .././admin/ga_dash_settings.php:1263
544
  msgid "Use the red link (see below) to generate and get your access code!"
545
  msgstr ""
546
 
547
- #: .././admin/ga_dash_settings.php:889 .././admin/ga_dash_settings.php:1297
548
  msgid "Plugin Authorization"
549
  msgstr "تصريح الأضافة"
550
 
551
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
552
  msgid "You should watch the"
553
  msgstr "يجب ان تشاهد هذا"
554
 
555
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
556
  msgid "video"
557
  msgstr "الڤيديو"
558
 
559
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
560
  msgid "and read this"
561
  msgstr "وأقرأ هذا"
562
 
563
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
564
  msgid "tutorial"
565
  msgstr "الدرس"
566
 
567
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
568
  msgid ""
569
  "before proceeding to authorization. This plugin requires a properly "
570
  "configured Google Analytics account"
571
  msgstr ""
572
  "قبل ان تباشر التصريح. هذه الاضافة تتطلب حساب احصائيات كوكل معد بصورة صحيحة"
573
 
574
- #: .././admin/ga_dash_settings.php:905 .././admin/ga_dash_settings.php:1312
575
  msgid " use your own API Project credentials"
576
  msgstr "أستخدام معرفات مشروع API خاصتك"
577
 
578
- #: .././admin/ga_dash_settings.php:912 .././admin/ga_dash_settings.php:1319
579
  msgid "API Key:"
580
  msgstr "مفتاح API:"
581
 
582
- #: .././admin/ga_dash_settings.php:919 .././admin/ga_dash_settings.php:1326
583
  msgid "Client ID:"
584
  msgstr "معرف الزيون:"
585
 
586
- #: .././admin/ga_dash_settings.php:926 .././admin/ga_dash_settings.php:1334
587
  msgid "Client Secret:"
588
  msgstr "سر الزبون:"
589
 
590
- #: .././admin/ga_dash_settings.php:944 .././admin/ga_dash_settings.php:1352
591
  msgid "Clear Authorization"
592
  msgstr "أزل التصريحات"
593
 
594
- #: .././admin/ga_dash_settings.php:948 .././admin/ga_dash_settings.php:1067
595
- #: .././admin/ga_dash_settings.php:1355 .././admin/ga_dash_settings.php:1469
596
  msgid "Clear Cache"
597
  msgstr "أزل الخزن"
598
 
599
- #: .././admin/ga_dash_settings.php:957
600
  msgid "Select Domain:"
601
  msgstr ""
602
 
603
- #: .././admin/ga_dash_settings.php:970 .././admin/ga_dash_settings.php:1387
604
  msgid "Property not found"
605
  msgstr ""
606
 
607
- #: .././admin/ga_dash_settings.php:975
608
  msgid "and/or hide all other domains"
609
  msgstr "و/أو أخفي كل الروابط الأخرى"
610
 
611
- #: .././admin/ga_dash_settings.php:978
612
  msgid "Hide Now"
613
  msgstr "أخفي الأن"
614
 
615
- #: .././admin/ga_dash_settings.php:997
616
  msgid "Theme Color:"
617
  msgstr ""
618
 
619
- #: .././admin/ga_dash_settings.php:1007
620
  msgid "A new frontend widget is available! To enable it, go to"
621
  msgstr "هنالك ودجت أمامي جديدة متوفرة! لتفعلها, أذهب الى"
622
 
623
- #: .././admin/ga_dash_settings.php:1007
624
  msgid "Appearance -> Widgets"
625
  msgstr "المظاهر -< المربعات الجانبية"
626
 
627
- #: .././admin/ga_dash_settings.php:1007
628
  msgid "and look for Google Analytics Dashboard."
629
  msgstr "وابحث عن المربع الخاص بالأضافة."
630
 
631
- #: .././admin/ga_dash_settings.php:1013 .././admin/ga_dash_settings.php:1073
632
- #: .././admin/ga_dash_settings.php:1416 .././admin/ga_dash_settings.php:1475
633
- msgid "Debugging Data"
634
- msgstr "بيانات التصليح"
635
-
636
- #: .././admin/ga_dash_settings.php:1180
637
  msgid "Properties refreshed."
638
  msgstr "تم تحديث الخصائص."
639
 
640
- #: .././admin/ga_dash_settings.php:1274
641
  msgid "Network Setup"
642
  msgstr "اعدادات الشبكة"
643
 
644
- #: .././admin/ga_dash_settings.php:1289
645
  msgid " use a single Google Analytics account for the entire network"
646
  msgstr "أستخدم حساب أحصائيات كوكل واحد للشبكة كلها"
647
 
648
- #: .././admin/ga_dash_settings.php:1358
649
  msgid "Refresh Properties"
650
  msgstr "حدث الخصائص"
651
 
652
- #: .././admin/ga_dash_settings.php:1364
653
  msgid "Properties/Views Settings"
654
  msgstr "اعدادات الخصائص/المشاهدة"
655
 
656
- #: .././admin/ga_dash_settings.php:1409
657
  msgid " exclude Super Admin tracking for the entire network"
658
  msgstr ""
659
 
660
- #: .././admin/ga_dash_settings.php:1537
661
  msgid "Setup Tutorial & Demo"
662
  msgstr "درس التنصيب"
663
 
664
- #: .././admin/ga_dash_settings.php:1549
665
  msgid "Support & Reviews"
666
  msgstr "الدعم والتقييم"
667
 
668
- #: .././admin/ga_dash_settings.php:1557
669
  msgid "Plugin documentation and support on"
670
  msgstr ""
671
 
672
- #: .././admin/ga_dash_settings.php:1564
673
  msgid "Your feedback and review are both important,"
674
  msgstr "رأيك وتقييمك كلاهما مهمان,"
675
 
676
- #: .././admin/ga_dash_settings.php:1564
677
  msgid "rate this plugin"
678
  msgstr "قيم هذه الاضافة"
679
 
680
- #: .././admin/ga_dash_settings.php:1569
681
  msgid "Further Reading"
682
  msgstr "أكمل القراءة"
683
 
684
- #: .././admin/ga_dash_settings.php:1576
685
  msgid "Improve search rankings"
686
  msgstr "حسن ترتيب البحث"
687
 
688
- #: .././admin/ga_dash_settings.php:1576
689
  msgid "by moving your website to HTTPS/SSL."
690
  msgstr "حول موقعك الى بروتوكول HTTPs/SSl"
691
 
692
- #: .././admin/ga_dash_settings.php:1582
693
  msgid "Other"
694
  msgstr "اخرى"
695
 
696
- #: .././admin/ga_dash_settings.php:1582
697
  msgid "WordPress Plugins"
698
  msgstr "اضافات وردبريس"
699
 
700
- #: .././admin/ga_dash_settings.php:1582
701
  msgid "written by the same author"
702
  msgstr "كتبت من قبل نفس صاحب الاضافة"
703
 
704
- #: .././admin/ga_dash_settings.php:1587
705
  msgid "Other Services"
706
  msgstr ""
707
 
708
- #: .././admin/ga_dash_settings.php:1594
709
  msgid "Speed up your website and plug into a whole"
710
  msgstr ""
711
 
712
- #: .././admin/ga_dash_settings.php:1594
713
  msgid "new level of site speed"
714
  msgstr ""
715
 
716
- #: .././admin/ga_dash_settings.php:1600
717
  msgid "Web Analytics"
718
  msgstr "احصائيات الويب"
719
 
720
- #: .././admin/ga_dash_settings.php:1600
721
  msgid "service with users tracking at IP level."
722
  msgstr ""
723
 
724
- #: .././front/frontend.php:112
725
  msgid "Views vs UniqueViews"
726
  msgstr "المشاهدات ضد المشاهدات الحقيقية"
727
 
728
- #: .././front/frontend.php:168
729
  msgid "Google Analytics Reports"
730
  msgstr ""
731
 
732
- #: .././front/widgets.php:16
733
  msgid "Will display your google analytics stats in a widget"
734
  msgstr "ستظهر احصائيات حسابك في مربع جانبي"
735
 
736
- #: .././front/widgets.php:44 .././tools/gapi.php:808
737
  msgid "trend"
738
  msgstr ""
739
 
740
- #: .././front/widgets.php:144
741
  msgid "Period:"
742
  msgstr "الفترة:"
743
 
744
- #: .././front/widgets.php:144
745
  msgid "Sessions:"
746
  msgstr ""
747
 
748
- #: .././front/widgets.php:150
749
  msgid "generated by"
750
  msgstr "اظهرت بواسطة"
751
 
752
- #: .././front/widgets.php:164
753
  msgid "Google Analytics Stats"
754
  msgstr "احصائيات كوكل"
755
 
756
- #: .././front/widgets.php:171
757
  msgid "Title:"
758
  msgstr "العنوان:"
759
 
760
- #: .././front/widgets.php:178
761
  msgid "Display:"
762
  msgstr "اظهر:"
763
 
764
- #: .././front/widgets.php:182
765
  msgid "Chart & Totals"
766
  msgstr "الاحصائيات والكل"
767
 
768
- #: .././front/widgets.php:183
769
  msgid "Chart"
770
  msgstr "الاحصائيات"
771
 
772
- #: .././front/widgets.php:184
773
  msgid "Totals"
774
  msgstr "الكل"
775
 
776
- #: .././front/widgets.php:188
777
- msgid "Anonimize chart&#39;s stats:"
778
- msgstr "عمم الاحصائيات:"
779
 
780
- #: .././front/widgets.php:195
781
  msgid "Stats for:"
782
  msgstr "الاحصائيات لـ:"
783
 
784
- #: .././front/widgets.php:205
785
  msgid "Give credits:"
786
  msgstr "أعطي الفضل:"
787
 
788
- #: .././tools/gapi.php:140
789
  msgid "Use this link to get your access code:"
790
  msgstr "أستخدم هذا الرابط للحصول على كود التعقب الخاص بك:"
791
 
792
- #: .././tools/gapi.php:140
793
  msgid "Get Access Code"
794
  msgstr "احصل على كود الدخول"
795
 
796
- #: .././tools/gapi.php:145 .././tools/gapi.php:149
797
  msgid "Use the red link to get your access code!"
798
  msgstr ""
799
 
800
- #: .././tools/gapi.php:145
801
  msgid "Access Code:"
802
  msgstr "كود الدخول:"
803
 
804
- #: .././tools/gapi.php:157
805
  msgid "Save Access Code"
806
  msgstr "أحفظ كود الدخول"
807
 
808
- #: .././tools/gapi.php:380
809
  msgid "Organic Searches"
810
  msgstr "البحث العضوي"
811
 
812
- #: .././tools/gapi.php:391
813
  msgid "Hour"
814
  msgstr "الساعة"
815
 
816
- #: .././tools/gapi.php:394 .././tools/gapi.php:808 .././tools/gapi.php:852
817
  msgid "Date"
818
  msgstr "التاريخ"
819
 
820
- #: .././tools/gapi.php:500 .././tools/gapi.php:852
821
  msgid "Views"
822
  msgstr "المشاهدات"
823
 
824
- #: .././tools/gapi.php:611
825
  msgid "Countries"
826
  msgstr ""
827
 
828
- #: .././tools/gapi.php:629
829
  msgid "Cities from"
830
  msgstr ""
831
 
832
- #: .././tools/gapi.php:691
833
  msgid "Channels"
834
  msgstr ""
835
 
836
- #: .././tools/gapi.php:754
837
  msgid "Type"
838
  msgstr "النوع"
839
 
840
- #: .././tools/gapi.php:852
841
  msgid "UniqueViews"
842
  msgstr "المشاهدات الخاصة"
843
 
844
- #: .././tools/gapi.php:899
845
- msgid "Top Searches"
846
- msgstr "البحث الاكثر شعبية"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
847
 
848
  #~ msgid "Error Log"
849
  #~ msgstr "سجل الاخطاء"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
+ "POT-Creation-Date: 2015-02-07 11:40+0200\n"
5
+ "PO-Revision-Date: 2015-02-07 11:40+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Ahmed Majed <admin@almobdaa.com>\n"
8
  "Language: ar\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.7.4\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n"
18
  "X-Poedit-SearchPath-0: ../.\n"
19
 
20
+ #: .././admin/dashboard_widgets.php:67 .././admin/dashboard_widgets.php:100
21
  msgid "Google Analytics"
22
  msgstr "أحصائيات كوكل"
23
 
24
+ #: .././admin/dashboard_widgets.php:71 .././admin/dashboard_widgets.php:104
25
+ #: .././admin/ga_dash_settings.php:105 .././admin/ga_dash_settings.php:216
26
+ #: .././admin/ga_dash_settings.php:964
27
  msgid "General Settings"
28
  msgstr "الأعدادات العامة"
29
 
30
+ #: .././admin/dashboard_widgets.php:75
31
  msgid "Backend Settings"
32
  msgstr "أعدادات العمل"
33
 
34
+ #: .././admin/dashboard_widgets.php:79
35
  msgid "Frontend Settings"
36
  msgstr "اعدادات الظهور"
37
 
38
+ #: .././admin/dashboard_widgets.php:83
39
  msgid "Tracking Code"
40
  msgstr "كود التعقب"
41
 
42
+ #: .././admin/dashboard_widgets.php:87 .././admin/dashboard_widgets.php:108
43
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
44
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
45
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
46
+ msgid "Errors & Debug"
47
+ msgstr ""
48
+
49
+ #: .././admin/dashboard_widgets.php:152
50
  msgid "Settings"
51
  msgstr "الاعدادات"
52
 
53
+ #: .././admin/dashboard_widgets.php:166 .././front/widgets.php:14
54
  msgid "Google Analytics Dashboard"
55
  msgstr "لوحة أحصائيات كوكل"
56
 
57
+ #: .././admin/dashboard_widgets.php:183
58
  msgid "This plugin needs an authorization:"
59
  msgstr "هذه الاضافة تحتاج الى تصريح:"
60
 
61
+ #: .././admin/dashboard_widgets.php:183 .././admin/ga_dash_settings.php:1035
62
+ #: .././admin/ga_dash_settings.php:1360
63
  msgid "Authorize Plugin"
64
  msgstr "صرح الأضافة "
65
 
66
+ #: .././admin/dashboard_widgets.php:216 .././admin/ga_dash_settings.php:380
67
+ #: .././admin/ga_dash_settings.php:976 .././admin/ga_dash_settings.php:1001
68
+ #: .././admin/ga_dash_settings.php:1315
69
  msgid "View Name:"
70
  msgstr "شاهد الاسم:"
71
 
72
+ #: .././admin/dashboard_widgets.php:221
73
  msgid "Something went wrong while retrieving profiles list."
74
  msgstr "حدث خطأ ما اثناء استرجاع قائمة البروفايلات."
75
 
76
+ #: .././admin/dashboard_widgets.php:221
77
  msgid "More details"
78
  msgstr "المزيد من التفاصيل"
79
 
80
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
81
  msgid "An admin should asign a default Google Analytics Profile."
82
  msgstr "المدير يجب ان يحصل على حساب احصائيات كوكل رئيسي."
83
 
84
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
85
  msgid "Select Domain"
86
  msgstr "حدد النطاق"
87
 
88
+ #: .././admin/dashboard_widgets.php:250
89
  msgid ""
90
  "Something went wrong while retrieving property data. You need to create and "
91
  "properly configure a Google Analytics account:"
93
  "حدث خطأ ما اثناء استرجاع بيانات الملكية. تحتاج الى انشاء واعداد حساب كوكل "
94
  "للأحصائيات بصورة صحيحة:"
95
 
96
+ #: .././admin/dashboard_widgets.php:250
97
  msgid "Find out more!"
98
  msgstr "اعرف أكثر!"
99
 
100
+ #: .././admin/dashboard_widgets.php:278
101
  msgid "Real-Time"
102
  msgstr "الوقت الحقيقي"
103
 
104
+ #: .././admin/dashboard_widgets.php:279
105
  msgid "Today"
106
  msgstr "اليوم"
107
 
108
+ #: .././admin/dashboard_widgets.php:281
109
  msgid "Yesterday"
110
  msgstr "البارحة"
111
 
112
+ #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:72
113
+ #: .././front/widgets.php:182
114
  msgid "Last 7 Days"
115
  msgstr "اخر ٧ ايام"
116
 
117
+ #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:75
118
+ #: .././front/widgets.php:183
119
  msgid "Last 14 Days"
120
  msgstr "أخر ١٤ يوم"
121
 
122
+ #: .././admin/dashboard_widgets.php:287 .././front/widgets.php:78
123
+ #: .././front/widgets.php:184
124
  msgid "Last 30 Days"
125
  msgstr "اخر ٣٠ يوم"
126
 
127
+ #: .././admin/dashboard_widgets.php:289
128
  msgid "Last 90 Days"
129
  msgstr "أخر ٩٠ يوم"
130
 
131
+ #: .././admin/dashboard_widgets.php:295 .././admin/dashboard_widgets.php:1037
132
+ #: .././front/widgets.php:40 .././tools/gapi.php:376 .././tools/gapi.php:515
133
+ #: .././tools/gapi.php:554 .././tools/gapi.php:615 .././tools/gapi.php:744
134
+ #: .././tools/gapi.php:825
135
  msgid "Sessions"
136
  msgstr ""
137
 
138
+ #: .././admin/dashboard_widgets.php:296 .././admin/dashboard_widgets.php:1041
139
+ #: .././tools/gapi.php:364
140
  msgid "Users"
141
  msgstr ""
142
 
143
+ #: .././admin/dashboard_widgets.php:298
144
  msgid "Organic"
145
  msgstr "عضوي"
146
 
147
+ #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:1045
148
+ #: .././tools/gapi.php:367
149
  msgid "Page Views"
150
  msgstr "مشاهدات الصفحة"
151
 
152
+ #: .././admin/dashboard_widgets.php:302 .././admin/dashboard_widgets.php:1049
153
+ #: .././tools/gapi.php:370
154
  msgid "Bounce Rate"
155
  msgstr "نسبة القفز"
156
 
157
+ #: .././admin/dashboard_widgets.php:304
158
  msgid "Location"
159
  msgstr ""
160
 
161
+ #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:477
162
  msgid "Pages"
163
  msgstr ""
164
 
165
+ #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:515
166
  msgid "Referrers"
167
  msgstr ""
168
 
169
+ #: .././admin/dashboard_widgets.php:310 .././tools/gapi.php:554
170
+ #: .././tools/gapi.php:825
171
  msgid "Searches"
172
  msgstr ""
173
 
174
+ #: .././admin/dashboard_widgets.php:312
175
  msgid "Traffic Details"
176
  msgstr ""
177
 
178
+ #: .././admin/dashboard_widgets.php:404 .././admin/dashboard_widgets.php:645
179
  msgid "REFERRAL"
180
  msgstr "المصدر"
181
 
182
+ #: .././admin/dashboard_widgets.php:408 .././admin/dashboard_widgets.php:646
183
  msgid "ORGANIC"
184
  msgstr "عضوي"
185
 
186
+ #: .././admin/dashboard_widgets.php:412 .././admin/dashboard_widgets.php:532
187
+ #: .././admin/dashboard_widgets.php:647
188
  msgid "SOCIAL"
189
  msgstr "اجتماعي"
190
 
191
+ #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:535
192
+ #: .././admin/dashboard_widgets.php:648
193
  msgid "CAMPAIGN"
194
  msgstr ""
195
 
196
+ #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:538
197
+ #: .././admin/dashboard_widgets.php:651
198
  msgid "DIRECT"
199
  msgstr "مباشر"
200
 
201
+ #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:652
202
  msgid "NEW"
203
  msgstr "جديد"
204
 
205
+ #: .././admin/dashboard_widgets.php:526
206
  msgid "REFERRALS"
207
  msgstr "المصادر"
208
 
209
+ #: .././admin/dashboard_widgets.php:529
210
  msgid "KEYWORDS"
211
  msgstr "الكلمات المفتاحية"
212
 
213
+ #: .././admin/dashboard_widgets.php:683 .././admin/dashboard_widgets.php:780
214
+ #: .././admin/dashboard_widgets.php:972 .././admin/dashboard_widgets.php:1083
215
+ #: .././front/frontend.php:88
216
+ msgid "A JavaScript Error is blocking plugin resources!"
217
+ msgstr ""
218
+
219
+ #: .././admin/dashboard_widgets.php:696 .././admin/dashboard_widgets.php:715
220
+ #: .././admin/dashboard_widgets.php:793 .././admin/dashboard_widgets.php:824
221
+ #: .././admin/dashboard_widgets.php:843 .././admin/dashboard_widgets.php:863
222
+ #: .././admin/dashboard_widgets.php:986 .././admin/dashboard_widgets.php:1096
223
+ #: .././admin/dashboard_widgets.php:1115 .././front/frontend.php:100
224
+ #: .././front/frontend.php:119
225
+ msgid "Invalid response, more details in JavaScript Console (F12)."
226
+ msgstr ""
227
+
228
+ #: .././admin/dashboard_widgets.php:701 .././admin/dashboard_widgets.php:720
229
+ #: .././admin/dashboard_widgets.php:798 .././admin/dashboard_widgets.php:810
230
+ #: .././admin/dashboard_widgets.php:829 .././admin/dashboard_widgets.php:848
231
+ #: .././admin/dashboard_widgets.php:868 .././admin/dashboard_widgets.php:991
232
+ #: .././admin/dashboard_widgets.php:994 .././admin/dashboard_widgets.php:1101
233
+ #: .././admin/dashboard_widgets.php:1120 .././front/frontend.php:105
234
+ #: .././front/frontend.php:124 .././front/widgets.php:110
235
  msgid "This report is unavailable"
236
  msgstr ""
237
 
238
+ #: .././admin/dashboard_widgets.php:880
239
  msgid "Traffic Mediums"
240
  msgstr ""
241
 
242
+ #: .././admin/dashboard_widgets.php:896
243
  msgid "Visitor Type"
244
  msgstr ""
245
 
246
+ #: .././admin/dashboard_widgets.php:912
247
  msgid "Social Networks"
248
  msgstr ""
249
 
250
+ #: .././admin/dashboard_widgets.php:928
251
  msgid "Search Engines"
252
  msgstr ""
253
 
254
+ #: .././admin/dashboard_widgets.php:1053
255
  msgid "Organic Search"
256
  msgstr ""
257
 
258
+ #: .././admin/dashboard_widgets.php:1057
259
  msgid "Pages/Session"
260
  msgstr ""
261
 
262
+ #: .././admin/ga_dash_settings.php:83 .././admin/ga_dash_settings.php:194
263
+ #: .././admin/ga_dash_settings.php:327 .././admin/ga_dash_settings.php:855
264
+ #: .././admin/ga_dash_settings.php:1157
265
  msgid "Settings saved."
266
  msgstr ""
267
 
268
+ #: .././admin/ga_dash_settings.php:85 .././admin/ga_dash_settings.php:196
269
+ #: .././admin/ga_dash_settings.php:329 .././admin/ga_dash_settings.php:841
270
+ #: .././admin/ga_dash_settings.php:851 .././admin/ga_dash_settings.php:857
271
+ #: .././admin/ga_dash_settings.php:869 .././admin/ga_dash_settings.php:1118
272
+ #: .././admin/ga_dash_settings.php:1143 .././admin/ga_dash_settings.php:1153
273
+ #: .././admin/ga_dash_settings.php:1159 .././admin/ga_dash_settings.php:1171
274
  msgid "Cheating Huh?"
275
  msgstr "تغش ها؟"
276
 
277
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
278
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
279
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
280
+ msgid "Something went wrong, check"
281
+ msgstr ""
282
 
283
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
284
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
285
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
286
+ msgid "or"
287
+ msgstr ""
288
+
289
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
290
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
291
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
292
  msgid "auhorize the plugin"
293
  msgstr "صرح بالدخول للأضافة"
294
 
295
+ #: .././admin/ga_dash_settings.php:95
 
 
 
 
 
 
 
 
 
 
296
  msgid "Google Analytics Frontend Settings"
297
  msgstr "اعدادات الظهور الامامي لأحصائيات كوكل"
298
 
299
+ #: .././admin/ga_dash_settings.php:108 .././admin/ga_dash_settings.php:219
300
  msgid "Show stats to:"
301
  msgstr ""
302
 
303
+ #: .././admin/ga_dash_settings.php:152
304
  msgid " show page sessions and users in frontend (after each article)"
305
  msgstr ""
306
 
307
+ #: .././admin/ga_dash_settings.php:168
308
  msgid " show page searches (after each article)"
309
  msgstr "اظهر بحوث الصفحة (بعد كل مقالة)"
310
 
311
+ #: .././admin/ga_dash_settings.php:177 .././admin/ga_dash_settings.php:305
312
+ #: .././admin/ga_dash_settings.php:666 .././admin/ga_dash_settings.php:1025
313
+ #: .././admin/ga_dash_settings.php:1351
314
  msgid "Save Changes"
315
  msgstr ""
316
 
317
+ #: .././admin/ga_dash_settings.php:206
318
  msgid "Google Analytics Dashboard Settings"
319
  msgstr "اعدادات الاضافة"
320
 
321
+ #: .././admin/ga_dash_settings.php:264
322
  msgid "disable Switch Profile/View functionality"
323
  msgstr "عطل امكانية تغيير اعدادات الحساب/المشاهدة"
324
 
325
+ #: .././admin/ga_dash_settings.php:268
326
  msgid "Real-Time Settings"
327
  msgstr "اعدادات الوقت الحقيقي"
328
 
329
+ #: .././admin/ga_dash_settings.php:271
330
  msgid "Maximum number of pages to display on real-time tab:"
331
  msgstr "اكثر عدد صفحات يتم اظهارها في قسم الوقت الحقيقي:"
332
 
333
+ #: .././admin/ga_dash_settings.php:276 .././admin/ga_dash_settings.php:292
334
+ msgid "find out more"
335
+ msgstr ""
336
 
337
+ #: .././admin/ga_dash_settings.php:278 .././admin/ga_dash_settings.php:295
338
  msgid "about this feature"
339
  msgstr "حول هذه الميزة"
340
 
341
+ #: .././admin/ga_dash_settings.php:283
342
+ msgid "Location Settings"
343
+ msgstr ""
344
 
345
+ #: .././admin/ga_dash_settings.php:287
346
+ msgid "Target Geo Map to country:"
347
+ msgstr ""
348
 
349
+ #: .././admin/ga_dash_settings.php:336
350
+ msgid "The tracking component is disabled. You should set"
351
  msgstr ""
352
 
353
+ #: .././admin/ga_dash_settings.php:336
354
+ msgid "Tracking Options"
355
+ msgstr ""
356
 
357
+ #: .././admin/ga_dash_settings.php:336
358
+ msgid "to"
359
+ msgstr ""
360
 
361
+ #: .././admin/ga_dash_settings.php:336 .././admin/ga_dash_settings.php:372
362
+ msgid "Enabled"
363
+ msgstr "تفعيل"
364
 
365
+ #: .././admin/ga_dash_settings.php:342
366
+ msgid "Google Analytics Tracking Code"
367
+ msgstr "كود تعقب احصائيات كوكل"
368
 
369
+ #: .././admin/ga_dash_settings.php:351
370
+ msgid "Basic Settings"
371
+ msgstr ""
372
 
373
+ #: .././admin/ga_dash_settings.php:352 .././admin/ga_dash_settings.php:431
374
+ msgid "Events Tracking"
375
+ msgstr "تعقب الافعال"
376
 
377
+ #: .././admin/ga_dash_settings.php:353 .././admin/ga_dash_settings.php:495
378
+ msgid "Custom Definitions"
379
+ msgstr "تعاريف مخصصة"
380
 
381
+ #: .././admin/ga_dash_settings.php:354 .././admin/ga_dash_settings.php:623
382
+ #: .././admin/ga_dash_settings.php:1328
383
+ msgid "Exclude Tracking"
384
+ msgstr "لا تتبع"
385
 
386
+ #: .././admin/ga_dash_settings.php:355
387
+ msgid "Advanced Settings"
388
+ msgstr ""
389
+
390
+ #: .././admin/ga_dash_settings.php:363
391
  msgid "Tracking Settings"
392
  msgstr "اعدادات التعقب"
393
 
394
+ #: .././admin/ga_dash_settings.php:366
395
  msgid "Tracking Options:"
396
  msgstr ""
397
 
398
+ #: .././admin/ga_dash_settings.php:370
399
  msgid "Disabled"
400
  msgstr "تعطيل"
401
 
402
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
 
 
 
 
403
  msgid "Tracking ID:"
404
  msgstr "معرف التعقب:"
405
 
406
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
407
  msgid "Default URL:"
408
  msgstr "الرابط الرئيسي:"
409
 
410
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
411
  msgid "Time Zone:"
412
  msgstr "المنطقة الزمنية:"
413
 
414
+ #: .././admin/ga_dash_settings.php:385
415
  msgid "Basic Tracking"
416
  msgstr "التعقب الاساسي"
417
 
418
+ #: .././admin/ga_dash_settings.php:388
419
  msgid "Tracking Type:"
420
  msgstr ""
421
 
422
+ #: .././admin/ga_dash_settings.php:392
423
  msgid "Classic Analytics"
424
  msgstr "الاحصائيات الكلاسيكية"
425
 
426
+ #: .././admin/ga_dash_settings.php:394
427
  msgid "Universal Analytics"
428
  msgstr "الاحصائيات العالمية"
429
 
430
+ #: .././admin/ga_dash_settings.php:408
431
  msgid " anonymize IPs while tracking"
432
  msgstr "تجاهل الاي بي عند التعقب"
433
 
434
+ #: .././admin/ga_dash_settings.php:423
435
  msgid " enable remarketing, demographics and interests reports"
436
  msgstr "فعل تقارير اعادة التسويق, الديمغرافي والاهتمام"
437
 
438
+ #: .././admin/ga_dash_settings.php:445
 
 
 
 
439
  msgid " track downloads, mailto and outbound links"
440
  msgstr "تعقب التحميلات, ارسل الى والروابط الخارجية"
441
 
442
+ #: .././admin/ga_dash_settings.php:449
443
  msgid "Downloads Regex:"
444
  msgstr "حمل التقارير"
445
 
446
+ #: .././admin/ga_dash_settings.php:466
447
  msgid " track affiliate links matching this regex"
448
  msgstr "تتبع روابط الداعمين التي تطابق هذا الجزء"
449
 
450
+ #: .././admin/ga_dash_settings.php:470
451
  msgid "Affiliates Regex:"
452
  msgstr "روابط الداعمين:"
453
 
454
+ #: .././admin/ga_dash_settings.php:487
455
  msgid " track fragment identifiers, hashmarks (#) in URI links"
456
  msgstr ""
457
 
458
+ #: .././admin/ga_dash_settings.php:498
 
 
 
 
459
  msgid "Authors:"
460
  msgstr ""
461
 
462
+ #: .././admin/ga_dash_settings.php:508
463
  msgid "Publication Year:"
464
  msgstr ""
465
 
466
+ #: .././admin/ga_dash_settings.php:518
467
  msgid "Categories:"
468
  msgstr ""
469
 
470
+ #: .././admin/ga_dash_settings.php:528
471
  msgid "User Type:"
472
  msgstr ""
473
 
474
+ #: .././admin/ga_dash_settings.php:542
475
  msgid "Advanced Tracking"
476
  msgstr "تتبع متطور"
477
 
478
+ #: .././admin/ga_dash_settings.php:545
479
  msgid "Page Speed SR:"
480
  msgstr "سرعة الصفحة:"
481
 
482
+ #: .././admin/ga_dash_settings.php:563
483
  msgid " exclude events from bounce-rate calculation"
484
  msgstr "لا تحسب الافعال من حسابات نسبة القفز"
485
 
486
+ #: .././admin/ga_dash_settings.php:578
487
  msgid " enable enhanced link attribution"
488
  msgstr "فعل تعديل الرابط المحسن"
489
 
490
+ #: .././admin/ga_dash_settings.php:592
491
  msgid " enable AdSense account linking"
492
  msgstr "فعل ربط حساب ادسينس"
493
 
494
+ #: .././admin/ga_dash_settings.php:608
495
  msgid " enable cross domain tracking"
496
  msgstr "فعل التتبع عبر الروابط"
497
 
498
+ #: .././admin/ga_dash_settings.php:612
499
  msgid "Cross Domains:"
500
  msgstr "عبر الروابط التالية:"
501
 
502
+ #: .././admin/ga_dash_settings.php:626
 
 
 
 
503
  msgid "Exclude tracking for:"
504
  msgstr ""
505
 
506
+ #: .././admin/ga_dash_settings.php:687
507
+ msgid "Google Analytics Errors & Debugging"
508
+ msgstr ""
509
+
510
+ #: .././admin/ga_dash_settings.php:697
511
+ msgid "Errors & Details"
512
+ msgstr ""
513
+
514
+ #: .././admin/ga_dash_settings.php:698
515
+ msgid "Plugin Settings"
516
+ msgstr ""
517
+
518
+ #: .././admin/ga_dash_settings.php:706
519
+ msgid "For errors and/or other issues please check"
520
+ msgstr ""
521
+
522
+ #: .././admin/ga_dash_settings.php:706
523
+ msgid "the plugin documentation page"
524
+ msgstr ""
525
+
526
+ #: .././admin/ga_dash_settings.php:706
527
+ msgid "and related tutorials"
528
+ msgstr ""
529
+
530
+ #: .././admin/ga_dash_settings.php:710
531
+ msgid "Last Error detected"
532
+ msgstr ""
533
+
534
+ #: .././admin/ga_dash_settings.php:715 .././admin/ga_dash_settings.php:728
535
+ msgid "None"
536
+ msgstr ""
537
+
538
+ #: .././admin/ga_dash_settings.php:722
539
+ msgid "Error Details"
540
+ msgstr ""
541
+
542
+ #: .././admin/ga_dash_settings.php:740
543
+ msgid "Plugin Configuration"
544
+ msgstr ""
545
+
546
+ #: .././admin/ga_dash_settings.php:788 .././admin/ga_dash_settings.php:1072
547
  msgid ""
548
  "Loading the required libraries. If this results in a blank screen or a fatal "
549
  "error, try this solution:"
550
  msgstr ""
551
 
552
+ #: .././admin/ga_dash_settings.php:800 .././admin/ga_dash_settings.php:1084
553
  msgid "Plugin authorization succeeded."
554
  msgstr "تم تفعيل تصريح الاضافة بنجاح."
555
 
556
+ #: .././admin/ga_dash_settings.php:816 .././admin/ga_dash_settings.php:1109
557
  msgid ""
558
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
559
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
560
  msgstr ""
561
 
562
+ #: .././admin/ga_dash_settings.php:839 .././admin/ga_dash_settings.php:1141
563
  msgid "Cleared Cache."
564
  msgstr "الخزن المزال."
565
 
566
+ #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1150
567
  msgid "Token Reseted and Revoked."
568
  msgstr "الجزء المراح والمعدل."
569
 
570
+ #: .././admin/ga_dash_settings.php:862 .././admin/ga_dash_settings.php:1164
 
 
 
 
571
  msgid "All other domains/properties were removed."
572
  msgstr "كل الروابط/والخصائص تم إزالتها."
573
 
574
+ #: .././admin/ga_dash_settings.php:874 .././admin/ga_dash_settings.php:1176
 
 
 
 
 
575
  msgid "Google Analytics Settings"
576
  msgstr "إعدادات احصائيات كوكل"
577
 
578
+ #: .././admin/ga_dash_settings.php:887 .././admin/ga_dash_settings.php:1189
 
 
 
 
 
 
579
  msgid "Use the red link (see below) to generate and get your access code!"
580
  msgstr ""
581
 
582
+ #: .././admin/ga_dash_settings.php:898 .././admin/ga_dash_settings.php:1224
583
  msgid "Plugin Authorization"
584
  msgstr "تصريح الأضافة"
585
 
586
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
587
  msgid "You should watch the"
588
  msgstr "يجب ان تشاهد هذا"
589
 
590
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
591
  msgid "video"
592
  msgstr "الڤيديو"
593
 
594
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
595
  msgid "and read this"
596
  msgstr "وأقرأ هذا"
597
 
598
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
599
  msgid "tutorial"
600
  msgstr "الدرس"
601
 
602
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
603
  msgid ""
604
  "before proceeding to authorization. This plugin requires a properly "
605
  "configured Google Analytics account"
606
  msgstr ""
607
  "قبل ان تباشر التصريح. هذه الاضافة تتطلب حساب احصائيات كوكل معد بصورة صحيحة"
608
 
609
+ #: .././admin/ga_dash_settings.php:914 .././admin/ga_dash_settings.php:1239
610
  msgid " use your own API Project credentials"
611
  msgstr "أستخدام معرفات مشروع API خاصتك"
612
 
613
+ #: .././admin/ga_dash_settings.php:921 .././admin/ga_dash_settings.php:1246
614
  msgid "API Key:"
615
  msgstr "مفتاح API:"
616
 
617
+ #: .././admin/ga_dash_settings.php:928 .././admin/ga_dash_settings.php:1254
618
  msgid "Client ID:"
619
  msgstr "معرف الزيون:"
620
 
621
+ #: .././admin/ga_dash_settings.php:936 .././admin/ga_dash_settings.php:1263
622
  msgid "Client Secret:"
623
  msgstr "سر الزبون:"
624
 
625
+ #: .././admin/ga_dash_settings.php:954 .././admin/ga_dash_settings.php:1282
626
  msgid "Clear Authorization"
627
  msgstr "أزل التصريحات"
628
 
629
+ #: .././admin/ga_dash_settings.php:958 .././admin/ga_dash_settings.php:1039
630
+ #: .././admin/ga_dash_settings.php:1285 .././admin/ga_dash_settings.php:1363
631
  msgid "Clear Cache"
632
  msgstr "أزل الخزن"
633
 
634
+ #: .././admin/ga_dash_settings.php:967
635
  msgid "Select Domain:"
636
  msgstr ""
637
 
638
+ #: .././admin/ga_dash_settings.php:980 .././admin/ga_dash_settings.php:1319
639
  msgid "Property not found"
640
  msgstr ""
641
 
642
+ #: .././admin/ga_dash_settings.php:985
643
  msgid "and/or hide all other domains"
644
  msgstr "و/أو أخفي كل الروابط الأخرى"
645
 
646
+ #: .././admin/ga_dash_settings.php:988
647
  msgid "Hide Now"
648
  msgstr "أخفي الأن"
649
 
650
+ #: .././admin/ga_dash_settings.php:1007
651
  msgid "Theme Color:"
652
  msgstr ""
653
 
654
+ #: .././admin/ga_dash_settings.php:1017
655
  msgid "A new frontend widget is available! To enable it, go to"
656
  msgstr "هنالك ودجت أمامي جديدة متوفرة! لتفعلها, أذهب الى"
657
 
658
+ #: .././admin/ga_dash_settings.php:1017
659
  msgid "Appearance -> Widgets"
660
  msgstr "المظاهر -< المربعات الجانبية"
661
 
662
+ #: .././admin/ga_dash_settings.php:1017
663
  msgid "and look for Google Analytics Dashboard."
664
  msgstr "وابحث عن المربع الخاص بالأضافة."
665
 
666
+ #: .././admin/ga_dash_settings.php:1115
 
 
 
 
 
667
  msgid "Properties refreshed."
668
  msgstr "تم تحديث الخصائص."
669
 
670
+ #: .././admin/ga_dash_settings.php:1201
671
  msgid "Network Setup"
672
  msgstr "اعدادات الشبكة"
673
 
674
+ #: .././admin/ga_dash_settings.php:1216
675
  msgid " use a single Google Analytics account for the entire network"
676
  msgstr "أستخدم حساب أحصائيات كوكل واحد للشبكة كلها"
677
 
678
+ #: .././admin/ga_dash_settings.php:1288
679
  msgid "Refresh Properties"
680
  msgstr "حدث الخصائص"
681
 
682
+ #: .././admin/ga_dash_settings.php:1294
683
  msgid "Properties/Views Settings"
684
  msgstr "اعدادات الخصائص/المشاهدة"
685
 
686
+ #: .././admin/ga_dash_settings.php:1342
687
  msgid " exclude Super Admin tracking for the entire network"
688
  msgstr ""
689
 
690
+ #: .././admin/ga_dash_settings.php:1394
691
  msgid "Setup Tutorial & Demo"
692
  msgstr "درس التنصيب"
693
 
694
+ #: .././admin/ga_dash_settings.php:1406
695
  msgid "Support & Reviews"
696
  msgstr "الدعم والتقييم"
697
 
698
+ #: .././admin/ga_dash_settings.php:1414
699
  msgid "Plugin documentation and support on"
700
  msgstr ""
701
 
702
+ #: .././admin/ga_dash_settings.php:1421
703
  msgid "Your feedback and review are both important,"
704
  msgstr "رأيك وتقييمك كلاهما مهمان,"
705
 
706
+ #: .././admin/ga_dash_settings.php:1421
707
  msgid "rate this plugin"
708
  msgstr "قيم هذه الاضافة"
709
 
710
+ #: .././admin/ga_dash_settings.php:1426
711
  msgid "Further Reading"
712
  msgstr "أكمل القراءة"
713
 
714
+ #: .././admin/ga_dash_settings.php:1434
715
  msgid "Improve search rankings"
716
  msgstr "حسن ترتيب البحث"
717
 
718
+ #: .././admin/ga_dash_settings.php:1434
719
  msgid "by moving your website to HTTPS/SSL."
720
  msgstr "حول موقعك الى بروتوكول HTTPs/SSl"
721
 
722
+ #: .././admin/ga_dash_settings.php:1441
723
  msgid "Other"
724
  msgstr "اخرى"
725
 
726
+ #: .././admin/ga_dash_settings.php:1441
727
  msgid "WordPress Plugins"
728
  msgstr "اضافات وردبريس"
729
 
730
+ #: .././admin/ga_dash_settings.php:1441
731
  msgid "written by the same author"
732
  msgstr "كتبت من قبل نفس صاحب الاضافة"
733
 
734
+ #: .././admin/ga_dash_settings.php:1446
735
  msgid "Other Services"
736
  msgstr ""
737
 
738
+ #: .././admin/ga_dash_settings.php:1453
739
  msgid "Speed up your website and plug into a whole"
740
  msgstr ""
741
 
742
+ #: .././admin/ga_dash_settings.php:1453
743
  msgid "new level of site speed"
744
  msgstr ""
745
 
746
+ #: .././admin/ga_dash_settings.php:1460
747
  msgid "Web Analytics"
748
  msgstr "احصائيات الويب"
749
 
750
+ #: .././admin/ga_dash_settings.php:1460
751
  msgid "service with users tracking at IP level."
752
  msgstr ""
753
 
754
+ #: .././front/frontend.php:134
755
  msgid "Views vs UniqueViews"
756
  msgstr "المشاهدات ضد المشاهدات الحقيقية"
757
 
758
+ #: .././front/frontend.php:184
759
  msgid "Google Analytics Reports"
760
  msgstr ""
761
 
762
+ #: .././front/widgets.php:15
763
  msgid "Will display your google analytics stats in a widget"
764
  msgstr "ستظهر احصائيات حسابك في مربع جانبي"
765
 
766
+ #: .././front/widgets.php:40 .././tools/gapi.php:744
767
  msgid "trend"
768
  msgstr ""
769
 
770
+ #: .././front/widgets.php:133
771
  msgid "Period:"
772
  msgstr "الفترة:"
773
 
774
+ #: .././front/widgets.php:133
775
  msgid "Sessions:"
776
  msgstr ""
777
 
778
+ #: .././front/widgets.php:137
779
  msgid "generated by"
780
  msgstr "اظهرت بواسطة"
781
 
782
+ #: .././front/widgets.php:147
783
  msgid "Google Analytics Stats"
784
  msgstr "احصائيات كوكل"
785
 
786
+ #: .././front/widgets.php:154
787
  msgid "Title:"
788
  msgstr "العنوان:"
789
 
790
+ #: .././front/widgets.php:161
791
  msgid "Display:"
792
  msgstr "اظهر:"
793
 
794
+ #: .././front/widgets.php:165
795
  msgid "Chart & Totals"
796
  msgstr "الاحصائيات والكل"
797
 
798
+ #: .././front/widgets.php:166
799
  msgid "Chart"
800
  msgstr "الاحصائيات"
801
 
802
+ #: .././front/widgets.php:167
803
  msgid "Totals"
804
  msgstr "الكل"
805
 
806
+ #: .././front/widgets.php:171
807
+ msgid "Anonymize stats:"
808
+ msgstr ""
809
 
810
+ #: .././front/widgets.php:178
811
  msgid "Stats for:"
812
  msgstr "الاحصائيات لـ:"
813
 
814
+ #: .././front/widgets.php:188
815
  msgid "Give credits:"
816
  msgstr "أعطي الفضل:"
817
 
818
+ #: .././tools/gapi.php:129
819
  msgid "Use this link to get your access code:"
820
  msgstr "أستخدم هذا الرابط للحصول على كود التعقب الخاص بك:"
821
 
822
+ #: .././tools/gapi.php:129
823
  msgid "Get Access Code"
824
  msgstr "احصل على كود الدخول"
825
 
826
+ #: .././tools/gapi.php:134 .././tools/gapi.php:138
827
  msgid "Use the red link to get your access code!"
828
  msgstr ""
829
 
830
+ #: .././tools/gapi.php:134
831
  msgid "Access Code:"
832
  msgstr "كود الدخول:"
833
 
834
+ #: .././tools/gapi.php:146
835
  msgid "Save Access Code"
836
  msgstr "أحفظ كود الدخول"
837
 
838
+ #: .././tools/gapi.php:373
839
  msgid "Organic Searches"
840
  msgstr "البحث العضوي"
841
 
842
+ #: .././tools/gapi.php:381
843
  msgid "Hour"
844
  msgstr "الساعة"
845
 
846
+ #: .././tools/gapi.php:384 .././tools/gapi.php:744 .././tools/gapi.php:783
847
  msgid "Date"
848
  msgstr "التاريخ"
849
 
850
+ #: .././tools/gapi.php:477 .././tools/gapi.php:783
851
  msgid "Views"
852
  msgstr "المشاهدات"
853
 
854
+ #: .././tools/gapi.php:576
855
  msgid "Countries"
856
  msgstr ""
857
 
858
+ #: .././tools/gapi.php:590
859
  msgid "Cities from"
860
  msgstr ""
861
 
862
+ #: .././tools/gapi.php:644
863
  msgid "Channels"
864
  msgstr ""
865
 
866
+ #: .././tools/gapi.php:698
867
  msgid "Type"
868
  msgstr "النوع"
869
 
870
+ #: .././tools/gapi.php:783
871
  msgid "UniqueViews"
872
  msgstr "المشاهدات الخاصة"
873
 
874
+ #~ msgid "Something went wrong, you need to"
875
+ #~ msgstr "حدث خطأ ما, تحتاج الى"
876
+
877
+ #~ msgid "or properly configure your"
878
+ #~ msgstr "أو عدل اعداداتك بصورة صحيحة"
879
+
880
+ #~ msgid "Google Analytics account"
881
+ #~ msgstr "حساب أحصائيات كوكل"
882
+
883
+ #~ msgid "(find out more"
884
+ #~ msgstr "(اعرف المزيد"
885
+
886
+ #~ msgid ")"
887
+ #~ msgstr "("
888
+
889
+ #~ msgid "Additional Stats & Charts"
890
+ #~ msgstr "المزيد من الاحصائيات والاشكال"
891
+
892
+ #~ msgid "Target Geo Map to region:"
893
+ #~ msgstr "حدد الخريطة الجغرافية لمنطقة معينة:"
894
+
895
+ #~ msgid "and render top"
896
+ #~ msgstr "واظهر الاعلى"
897
+
898
+ #~ msgid "cities (find out more"
899
+ #~ msgstr "المدن (اعرف المزيد"
900
+
901
+ #~ msgid " show traffic overview"
902
+ #~ msgstr "اظهر المرور بصورة عامة"
903
+
904
+ #~ msgid " show top pages"
905
+ #~ msgstr "اظهر الصفحات الاكثر شعبية"
906
+
907
+ #~ msgid " show top referrers"
908
+ #~ msgstr "اظهر المصادر الاكثر شعبية"
909
+
910
+ #~ msgid " show top searches"
911
+ #~ msgstr "اظهر كلمات البحث الاكثر شعبية"
912
+
913
+ #~ msgid "Dumping log data."
914
+ #~ msgstr "امسح بيانات السجل."
915
+
916
+ #~ msgid ""
917
+ #~ "Something went wrong. Please check the Debugging Data section for "
918
+ #~ "possible errors"
919
+ #~ msgstr "حدث خطأ ما. الرجاء التأكد من سجل الاصلاحات لرؤية الاخطاء المحتملة"
920
+
921
+ #~ msgid "Debugging Data"
922
+ #~ msgstr "بيانات التصليح"
923
+
924
+ #~ msgid "Anonimize chart&#39;s stats:"
925
+ #~ msgstr "عمم الاحصائيات:"
926
+
927
+ #~ msgid "Top Searches"
928
+ #~ msgstr "البحث الاكثر شعبية"
929
 
930
  #~ msgid "Error Log"
931
  #~ msgstr "سجل الاخطاء"
languages/ga-dash-de_DE.mo CHANGED
Binary file
languages/ga-dash-de_DE.po CHANGED
@@ -1,84 +1,91 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
- "POT-Creation-Date: 2015-01-07 20:25+0200\n"
5
- "PO-Revision-Date: 2015-01-07 20:25+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: pt_BR\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.1\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
- #: .././admin/dashboard_widgets.php:50 .././admin/dashboard_widgets.php:81
20
  msgid "Google Analytics"
21
  msgstr "Google Analytics"
22
 
23
- #: .././admin/dashboard_widgets.php:54 .././admin/dashboard_widgets.php:85
24
- #: .././admin/ga_dash_settings.php:100 .././admin/ga_dash_settings.php:222
25
- #: .././admin/ga_dash_settings.php:954
26
  msgid "General Settings"
27
  msgstr "Allgemeine Einstellungen"
28
 
29
- #: .././admin/dashboard_widgets.php:58
30
  msgid "Backend Settings"
31
  msgstr "Backend Einstellungen"
32
 
33
- #: .././admin/dashboard_widgets.php:62
34
  msgid "Frontend Settings"
35
  msgstr "Frontend Einstellungen"
36
 
37
- #: .././admin/dashboard_widgets.php:66
38
  msgid "Tracking Code"
39
  msgstr "Tracking Code"
40
 
41
- #: .././admin/dashboard_widgets.php:132
 
 
 
 
 
 
 
42
  msgid "Settings"
43
  msgstr "Einstellungen"
44
 
45
- #: .././admin/dashboard_widgets.php:148 .././front/widgets.php:15
46
  msgid "Google Analytics Dashboard"
47
  msgstr "Google Analytics Dashboard"
48
 
49
- #: .././admin/dashboard_widgets.php:166
50
  msgid "This plugin needs an authorization:"
51
  msgstr "Diese Plugin benötigt eine Autorisierung:"
52
 
53
- #: .././admin/dashboard_widgets.php:166 .././admin/ga_dash_settings.php:1063
54
- #: .././admin/ga_dash_settings.php:1465
55
  msgid "Authorize Plugin"
56
  msgstr "Plugin autorisieren"
57
 
58
- #: .././admin/dashboard_widgets.php:207 .././admin/ga_dash_settings.php:459
59
- #: .././admin/ga_dash_settings.php:966 .././admin/ga_dash_settings.php:991
60
- #: .././admin/ga_dash_settings.php:1383
61
  msgid "View Name:"
62
  msgstr "Anzeigename:"
63
 
64
- #: .././admin/dashboard_widgets.php:212
65
  msgid "Something went wrong while retrieving profiles list."
66
  msgstr ""
67
  "Ein Fehler ist aufgetreten. Die Profilliste konnte nicht abgerufen werden."
68
 
69
- #: .././admin/dashboard_widgets.php:212
70
  msgid "More details"
71
  msgstr "Mehr Details"
72
 
73
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
74
  msgid "An admin should asign a default Google Analytics Profile."
75
  msgstr "Ein Admin sollte ein Standardprofil festlegen."
76
 
77
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
78
  msgid "Select Domain"
79
  msgstr "Wähle eine Domain aus."
80
 
81
- #: .././admin/dashboard_widgets.php:245
82
  msgid ""
83
  "Something went wrong while retrieving property data. You need to create and "
84
  "properly configure a Google Analytics account:"
@@ -86,489 +93,515 @@ msgstr ""
86
  "Ein Fehler ist aufgetreten. Dein Google Analytics Account muss erstellt und "
87
  "fertig konfiguriert sein:"
88
 
89
- #: .././admin/dashboard_widgets.php:245
90
  msgid "Find out more!"
91
  msgstr "Erfahre mehr!"
92
 
93
- #: .././admin/dashboard_widgets.php:276
94
  msgid "Real-Time"
95
  msgstr "Echtzeit"
96
 
97
- #: .././admin/dashboard_widgets.php:277
98
  msgid "Today"
99
  msgstr "Heute"
100
 
101
- #: .././admin/dashboard_widgets.php:279
102
  msgid "Yesterday"
103
  msgstr "Gestern"
104
 
105
- #: .././admin/dashboard_widgets.php:281 .././front/widgets.php:83
106
- #: .././front/widgets.php:199
107
  msgid "Last 7 Days"
108
  msgstr "Letzten 7 Tage"
109
 
110
- #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:86
111
- #: .././front/widgets.php:200
112
  msgid "Last 14 Days"
113
  msgstr "Letzten 14 Tage"
114
 
115
- #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:89
116
- #: .././front/widgets.php:201
117
  msgid "Last 30 Days"
118
  msgstr "Letzten 30Tage"
119
 
120
- #: .././admin/dashboard_widgets.php:287
121
  msgid "Last 90 Days"
122
  msgstr "Letzten 90Tage"
123
 
124
- #: .././admin/dashboard_widgets.php:293 .././admin/dashboard_widgets.php:952
125
- #: .././front/widgets.php:44 .././tools/gapi.php:384 .././tools/gapi.php:543
126
- #: .././tools/gapi.php:587 .././tools/gapi.php:658 .././tools/gapi.php:808
127
- #: .././tools/gapi.php:899
128
  msgid "Sessions"
129
  msgstr ""
130
 
131
- #: .././admin/dashboard_widgets.php:294 .././admin/dashboard_widgets.php:956
132
- #: .././tools/gapi.php:368
133
  msgid "Users"
134
  msgstr ""
135
 
136
- #: .././admin/dashboard_widgets.php:296
137
  msgid "Organic"
138
  msgstr "Organisch"
139
 
140
- #: .././admin/dashboard_widgets.php:298 .././admin/dashboard_widgets.php:960
141
- #: .././tools/gapi.php:372
142
  msgid "Page Views"
143
  msgstr "Seitenaufrufe"
144
 
145
- #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:964
146
- #: .././tools/gapi.php:376
147
  msgid "Bounce Rate"
148
  msgstr "Absprungrate"
149
 
150
- #: .././admin/dashboard_widgets.php:302
151
  msgid "Location"
152
  msgstr ""
153
 
154
- #: .././admin/dashboard_widgets.php:304 .././tools/gapi.php:500
155
  msgid "Pages"
156
  msgstr ""
157
 
158
- #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:543
159
  msgid "Referrers"
160
  msgstr ""
161
 
162
- #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:587
 
163
  msgid "Searches"
164
  msgstr ""
165
 
166
- #: .././admin/dashboard_widgets.php:310
167
  msgid "Traffic Details"
168
  msgstr ""
169
 
170
- #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:657
171
  msgid "REFERRAL"
172
  msgstr "VERWEISUNG"
173
 
174
- #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:658
175
  msgid "ORGANIC"
176
  msgstr "ORGANISCH"
177
 
178
- #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:544
179
- #: .././admin/dashboard_widgets.php:659
180
  msgid "SOCIAL"
181
  msgstr "SOZIAL"
182
 
183
- #: .././admin/dashboard_widgets.php:428 .././admin/dashboard_widgets.php:547
184
- #: .././admin/dashboard_widgets.php:660
185
  msgid "CAMPAIGN"
186
  msgstr ""
187
 
188
- #: .././admin/dashboard_widgets.php:432 .././admin/dashboard_widgets.php:550
189
- #: .././admin/dashboard_widgets.php:663
190
  msgid "DIRECT"
191
  msgstr "DIREKT"
192
 
193
- #: .././admin/dashboard_widgets.php:436 .././admin/dashboard_widgets.php:664
194
  msgid "NEW"
195
  msgstr "NEUE"
196
 
197
- #: .././admin/dashboard_widgets.php:538
198
  msgid "REFERRALS"
199
  msgstr "VERWEISUNGEN"
200
 
201
- #: .././admin/dashboard_widgets.php:541
202
  msgid "KEYWORDS"
203
  msgstr "STICHWORTE"
204
 
205
- #: .././admin/dashboard_widgets.php:690 .././admin/dashboard_widgets.php:702
206
- #: .././admin/dashboard_widgets.php:757 .././admin/dashboard_widgets.php:769
207
- #: .././admin/dashboard_widgets.php:781 .././admin/dashboard_widgets.php:793
208
- #: .././admin/dashboard_widgets.php:806 .././admin/dashboard_widgets.php:905
209
- #: .././admin/dashboard_widgets.php:908 .././admin/dashboard_widgets.php:992
210
- #: .././admin/dashboard_widgets.php:1004 .././front/frontend.php:88
211
- #: .././front/frontend.php:100 .././front/widgets.php:122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  msgid "This report is unavailable"
213
  msgstr ""
214
 
215
- #: .././admin/dashboard_widgets.php:818
216
  msgid "Traffic Mediums"
217
  msgstr ""
218
 
219
- #: .././admin/dashboard_widgets.php:834
220
  msgid "Visitor Type"
221
  msgstr ""
222
 
223
- #: .././admin/dashboard_widgets.php:850
224
  msgid "Social Networks"
225
  msgstr ""
226
 
227
- #: .././admin/dashboard_widgets.php:866
228
  msgid "Search Engines"
229
  msgstr ""
230
 
231
- #: .././admin/dashboard_widgets.php:968
232
  msgid "Organic Search"
233
  msgstr ""
234
 
235
- #: .././admin/dashboard_widgets.php:972
236
  msgid "Pages/Session"
237
  msgstr ""
238
 
239
- #: .././admin/ga_dash_settings.php:78 .././admin/ga_dash_settings.php:200
240
- #: .././admin/ga_dash_settings.php:418 .././admin/ga_dash_settings.php:841
241
- #: .././admin/ga_dash_settings.php:1228
242
  msgid "Settings saved."
243
  msgstr ""
244
 
245
- #: .././admin/ga_dash_settings.php:80 .././admin/ga_dash_settings.php:202
246
- #: .././admin/ga_dash_settings.php:420 .././admin/ga_dash_settings.php:824
247
- #: .././admin/ga_dash_settings.php:834 .././admin/ga_dash_settings.php:843
248
- #: .././admin/ga_dash_settings.php:855 .././admin/ga_dash_settings.php:1183
249
- #: .././admin/ga_dash_settings.php:1211 .././admin/ga_dash_settings.php:1221
250
- #: .././admin/ga_dash_settings.php:1230 .././admin/ga_dash_settings.php:1242
251
  msgid "Cheating Huh?"
252
  msgstr ""
253
 
254
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
255
- #: .././admin/ga_dash_settings.php:424
256
- msgid "Something went wrong, you need to"
257
- msgstr "Ein Fehler ist aufgetreten. Du musst"
 
258
 
259
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
260
- #: .././admin/ga_dash_settings.php:424
 
 
 
 
 
 
 
261
  msgid "auhorize the plugin"
262
  msgstr "das Plugin autorisieren"
263
 
264
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
265
- #: .././admin/ga_dash_settings.php:424
266
- msgid "or properly configure your"
267
- msgstr "oder eine richtige Konfiguration"
268
-
269
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
270
- #: .././admin/ga_dash_settings.php:424
271
- msgid "Google Analytics account"
272
- msgstr "deines Google Analytics Accounts erstellen"
273
-
274
- #: .././admin/ga_dash_settings.php:90
275
  msgid "Google Analytics Frontend Settings"
276
  msgstr "Google Analytics Frontend Einstellungen"
277
 
278
- #: .././admin/ga_dash_settings.php:103 .././admin/ga_dash_settings.php:225
279
  msgid "Show stats to:"
280
  msgstr ""
281
 
282
- #: .././admin/ga_dash_settings.php:153
283
  msgid " show page sessions and users in frontend (after each article)"
284
  msgstr ""
285
 
286
- #: .././admin/ga_dash_settings.php:169
287
  msgid " show page searches (after each article)"
288
  msgstr "Suchen (nach jedem Artikel)"
289
 
290
- #: .././admin/ga_dash_settings.php:178 .././admin/ga_dash_settings.php:391
291
- #: .././admin/ga_dash_settings.php:739 .././admin/ga_dash_settings.php:1053
292
- #: .././admin/ga_dash_settings.php:1456
293
  msgid "Save Changes"
294
  msgstr ""
295
 
296
- #: .././admin/ga_dash_settings.php:212
297
  msgid "Google Analytics Dashboard Settings"
298
  msgstr "Google Analytics Dashboard Einstellungen"
299
 
300
- #: .././admin/ga_dash_settings.php:275
301
  msgid "disable Switch Profile/View functionality"
302
  msgstr "Deaktiviere bzw. ändere das Profil/Zeige die Funktionalität"
303
 
304
- #: .././admin/ga_dash_settings.php:279
305
  msgid "Real-Time Settings"
306
  msgstr "Echtzeit Einstellungen"
307
 
308
- #: .././admin/ga_dash_settings.php:282
309
  msgid "Maximum number of pages to display on real-time tab:"
310
  msgstr ""
311
  "Maximale Anzahl der Seiten, die in einem Echtzeit-Tab angezeigt werden "
312
  "sollen:"
313
 
314
- #: .././admin/ga_dash_settings.php:287
315
- msgid "(find out more"
316
- msgstr "(Finde mehr heraus"
317
 
318
- #: .././admin/ga_dash_settings.php:289 .././admin/ga_dash_settings.php:324
319
  msgid "about this feature"
320
  msgstr "über diese Funktion"
321
 
322
- #: .././admin/ga_dash_settings.php:290 .././admin/ga_dash_settings.php:325
323
- msgid ")"
324
- msgstr ")"
 
 
 
 
325
 
326
- #: .././admin/ga_dash_settings.php:293
327
- msgid "Additional Stats & Charts"
328
- msgstr "Zusätzliche Statistiken und Listen"
329
 
330
- #: .././admin/ga_dash_settings.php:306
331
- msgid " show Geo Map chart for sessions"
332
  msgstr ""
333
 
334
- #: .././admin/ga_dash_settings.php:311
335
- msgid "Target Geo Map to region:"
336
- msgstr "Bestimme die Geomap Region"
337
 
338
- #: .././admin/ga_dash_settings.php:316
339
- msgid "and render top"
340
- msgstr "und gebe den Rekord aus"
341
 
342
- #: .././admin/ga_dash_settings.php:321
343
- msgid "cities (find out more"
344
- msgstr "Städte (finde mehr heraus"
345
 
346
- #: .././admin/ga_dash_settings.php:339
347
- msgid " show traffic overview"
348
- msgstr "Zeige die Übersicht des Datenverkehrs"
349
 
350
- #: .././admin/ga_dash_settings.php:353
351
- msgid " show top pages"
352
- msgstr "Zeige die besten Seiten"
353
 
354
- #: .././admin/ga_dash_settings.php:367
355
- msgid " show top referrers"
356
- msgstr "Zeige die besten Referrer"
357
 
358
- #: .././admin/ga_dash_settings.php:381
359
- msgid " show top searches"
360
- msgstr "Zeige die besten Suchen"
 
361
 
362
- #: .././admin/ga_dash_settings.php:430
363
- msgid "Google Analytics Tracking Code"
364
- msgstr "Google Analytics Tracking Code"
365
 
366
- #: .././admin/ga_dash_settings.php:440
367
  msgid "Tracking Settings"
368
  msgstr "Tracking Einstellungen"
369
 
370
- #: .././admin/ga_dash_settings.php:443
371
  msgid "Tracking Options:"
372
  msgstr ""
373
 
374
- #: .././admin/ga_dash_settings.php:447
375
  msgid "Disabled"
376
  msgstr "Deaktiviert"
377
 
378
- #: .././admin/ga_dash_settings.php:449
379
- msgid "Enabled"
380
- msgstr "Aktiviert"
381
-
382
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
383
  msgid "Tracking ID:"
384
  msgstr "Tracking ID:"
385
 
386
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
387
  msgid "Default URL:"
388
  msgstr "Standard URL:"
389
 
390
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
391
  msgid "Time Zone:"
392
  msgstr "Zeitzone"
393
 
394
- #: .././admin/ga_dash_settings.php:467
395
  msgid "Basic Tracking"
396
  msgstr "Basic Tracking"
397
 
398
- #: .././admin/ga_dash_settings.php:473
399
  msgid "Tracking Type:"
400
  msgstr ""
401
 
402
- #: .././admin/ga_dash_settings.php:477
403
  msgid "Classic Analytics"
404
  msgstr "Klassische Analyse"
405
 
406
- #: .././admin/ga_dash_settings.php:479
407
  msgid "Universal Analytics"
408
  msgstr "Universelle Analyse"
409
 
410
- #: .././admin/ga_dash_settings.php:493
411
  msgid " anonymize IPs while tracking"
412
  msgstr "Anonymisiere die IPs während des Trackings"
413
 
414
- #: .././admin/ga_dash_settings.php:508
415
  msgid " enable remarketing, demographics and interests reports"
416
  msgstr "Aktiviere remarketing, demografische und interessen berichte"
417
 
418
- #: .././admin/ga_dash_settings.php:512
419
- msgid "Events Tracking"
420
- msgstr "Event Tracking"
421
-
422
- #: .././admin/ga_dash_settings.php:525
423
  msgid " track downloads, mailto and outbound links"
424
  msgstr "Tracke Downlaods, mailtos und ausgehende Links"
425
 
426
- #: .././admin/ga_dash_settings.php:529
427
  msgid "Downloads Regex:"
428
  msgstr "Download Filter:"
429
 
430
- #: .././admin/ga_dash_settings.php:546
431
  msgid " track affiliate links matching this regex"
432
  msgstr ""
433
 
434
- #: .././admin/ga_dash_settings.php:550
435
  msgid "Affiliates Regex:"
436
  msgstr ""
437
 
438
- #: .././admin/ga_dash_settings.php:567
439
  msgid " track fragment identifiers, hashmarks (#) in URI links"
440
  msgstr ""
441
 
442
- #: .././admin/ga_dash_settings.php:571
443
- msgid "Custom Definitions"
444
- msgstr ""
445
-
446
- #: .././admin/ga_dash_settings.php:574
447
  msgid "Authors:"
448
  msgstr ""
449
 
450
- #: .././admin/ga_dash_settings.php:584
451
  msgid "Publication Year:"
452
  msgstr ""
453
 
454
- #: .././admin/ga_dash_settings.php:594
455
  msgid "Categories:"
456
  msgstr ""
457
 
458
- #: .././admin/ga_dash_settings.php:604
459
  msgid "User Type:"
460
  msgstr ""
461
 
462
- #: .././admin/ga_dash_settings.php:614
463
  msgid "Advanced Tracking"
464
  msgstr "Advanced Tracking"
465
 
466
- #: .././admin/ga_dash_settings.php:617
467
  msgid "Page Speed SR:"
468
  msgstr "Seiten pro Besuch:"
469
 
470
- #: .././admin/ga_dash_settings.php:635
471
  msgid " exclude events from bounce-rate calculation"
472
  msgstr ""
473
 
474
- #: .././admin/ga_dash_settings.php:649
475
  msgid " enable enhanced link attribution"
476
  msgstr "Aktiviere die erweiterte Linkzuordnung"
477
 
478
- #: .././admin/ga_dash_settings.php:663
479
  msgid " enable AdSense account linking"
480
  msgstr ""
481
 
482
- #: .././admin/ga_dash_settings.php:678
483
  msgid " enable cross domain tracking"
484
  msgstr ""
485
 
486
- #: .././admin/ga_dash_settings.php:682
487
  msgid "Cross Domains:"
488
  msgstr ""
489
 
490
- #: .././admin/ga_dash_settings.php:692 .././admin/ga_dash_settings.php:1396
491
- msgid "Exclude Tracking"
492
- msgstr "Exkludiere Tracking"
493
-
494
- #: .././admin/ga_dash_settings.php:695
495
  msgid "Exclude tracking for:"
496
  msgstr ""
497
 
498
- #: .././admin/ga_dash_settings.php:769 .././admin/ga_dash_settings.php:1138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
499
  msgid ""
500
  "Loading the required libraries. If this results in a blank screen or a fatal "
501
  "error, try this solution:"
502
  msgstr ""
503
 
504
- #: .././admin/ga_dash_settings.php:781 .././admin/ga_dash_settings.php:1150
505
  msgid "Plugin authorization succeeded."
506
  msgstr "Plugin Autorisierung erfolgreich."
507
 
508
- #: .././admin/ga_dash_settings.php:796 .././admin/ga_dash_settings.php:1173
509
  msgid ""
510
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
511
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
512
  msgstr ""
513
 
514
- #: .././admin/ga_dash_settings.php:822 .././admin/ga_dash_settings.php:1209
515
  msgid "Cleared Cache."
516
  msgstr "Cache geleert."
517
 
518
- #: .././admin/ga_dash_settings.php:831 .././admin/ga_dash_settings.php:1218
519
  msgid "Token Reseted and Revoked."
520
  msgstr "Token zurückgesetzt und entzogen."
521
 
522
- #: .././admin/ga_dash_settings.php:838 .././admin/ga_dash_settings.php:1225
523
- msgid "Dumping log data."
524
- msgstr "Setze die Logs zurück."
525
-
526
- #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1235
527
  msgid "All other domains/properties were removed."
528
  msgstr "Alle anderen Domains/Einstellungen wurden entfernt."
529
 
530
- #: .././admin/ga_dash_settings.php:859 .././admin/ga_dash_settings.php:1246
531
- msgid ""
532
- "PHP CURL is required. Ask your hosting provider to install/enable PHP CURL!"
533
- msgstr ""
534
-
535
- #: .././admin/ga_dash_settings.php:863 .././admin/ga_dash_settings.php:1250
536
  msgid "Google Analytics Settings"
537
  msgstr "Google Analytics Einstellungen"
538
 
539
- #: .././admin/ga_dash_settings.php:872 .././admin/ga_dash_settings.php:1258
540
- msgid ""
541
- "Something went wrong. Please check the Debugging Data section for possible "
542
- "errors"
543
- msgstr ""
544
- "Ein Fehler ist aufgetreten. Bitte überprüfe den Debug Log, um mögliche "
545
- "Fehler anzuzeigen."
546
-
547
- #: .././admin/ga_dash_settings.php:878 .././admin/ga_dash_settings.php:1263
548
  msgid "Use the red link (see below) to generate and get your access code!"
549
  msgstr ""
550
 
551
- #: .././admin/ga_dash_settings.php:889 .././admin/ga_dash_settings.php:1297
552
  msgid "Plugin Authorization"
553
  msgstr "Plugin Autorisierung"
554
 
555
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
556
  msgid "You should watch the"
557
  msgstr "Du solltest dir das folgende"
558
 
559
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
560
  msgid "video"
561
  msgstr "Video ansehen"
562
 
563
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
564
  msgid "and read this"
565
  msgstr "und dieses"
566
 
567
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
568
  msgid "tutorial"
569
  msgstr "Tutorial lesen"
570
 
571
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
572
  msgid ""
573
  "before proceeding to authorization. This plugin requires a properly "
574
  "configured Google Analytics account"
@@ -576,279 +609,328 @@ msgstr ""
576
  "bevor du die Autorisierung fortsetzt. Hinweis: Dieses Plugin benötigt einen "
577
  "fertig konfigurierten Google Analytics Account"
578
 
579
- #: .././admin/ga_dash_settings.php:905 .././admin/ga_dash_settings.php:1312
580
  msgid " use your own API Project credentials"
581
  msgstr "Nutze deinen eigenen API Projekt Berechtigungsnachweis"
582
 
583
- #: .././admin/ga_dash_settings.php:912 .././admin/ga_dash_settings.php:1319
584
  msgid "API Key:"
585
  msgstr "API Key:"
586
 
587
- #: .././admin/ga_dash_settings.php:919 .././admin/ga_dash_settings.php:1326
588
  msgid "Client ID:"
589
  msgstr "Client ID:"
590
 
591
- #: .././admin/ga_dash_settings.php:926 .././admin/ga_dash_settings.php:1334
592
  msgid "Client Secret:"
593
  msgstr "Client Secret:"
594
 
595
- #: .././admin/ga_dash_settings.php:944 .././admin/ga_dash_settings.php:1352
596
  msgid "Clear Authorization"
597
  msgstr "Entferne die Autorisierung"
598
 
599
- #: .././admin/ga_dash_settings.php:948 .././admin/ga_dash_settings.php:1067
600
- #: .././admin/ga_dash_settings.php:1355 .././admin/ga_dash_settings.php:1469
601
  msgid "Clear Cache"
602
  msgstr "Cache leeren"
603
 
604
- #: .././admin/ga_dash_settings.php:957
605
  msgid "Select Domain:"
606
  msgstr ""
607
 
608
- #: .././admin/ga_dash_settings.php:970 .././admin/ga_dash_settings.php:1387
609
  msgid "Property not found"
610
  msgstr ""
611
 
612
- #: .././admin/ga_dash_settings.php:975
613
  msgid "and/or hide all other domains"
614
  msgstr "und/oder verberge alle anderen Domains"
615
 
616
- #: .././admin/ga_dash_settings.php:978
617
  msgid "Hide Now"
618
  msgstr "Jetzt verbergen"
619
 
620
- #: .././admin/ga_dash_settings.php:997
621
  msgid "Theme Color:"
622
  msgstr ""
623
 
624
- #: .././admin/ga_dash_settings.php:1007
625
  msgid "A new frontend widget is available! To enable it, go to"
626
  msgstr "Ein neues Frontend Widget ist verfügbar! Um es zu aktivieren, gehe zu"
627
 
628
- #: .././admin/ga_dash_settings.php:1007
629
  msgid "Appearance -> Widgets"
630
  msgstr "Design -> Widgets"
631
 
632
- #: .././admin/ga_dash_settings.php:1007
633
  msgid "and look for Google Analytics Dashboard."
634
  msgstr "und suche nach Google Analytics Dashboard."
635
 
636
- #: .././admin/ga_dash_settings.php:1013 .././admin/ga_dash_settings.php:1073
637
- #: .././admin/ga_dash_settings.php:1416 .././admin/ga_dash_settings.php:1475
638
- msgid "Debugging Data"
639
- msgstr "Debug Informationen"
640
-
641
- #: .././admin/ga_dash_settings.php:1180
642
  msgid "Properties refreshed."
643
  msgstr ""
644
 
645
- #: .././admin/ga_dash_settings.php:1274
646
  msgid "Network Setup"
647
  msgstr ""
648
 
649
- #: .././admin/ga_dash_settings.php:1289
650
  msgid " use a single Google Analytics account for the entire network"
651
  msgstr ""
652
 
653
- #: .././admin/ga_dash_settings.php:1358
654
  msgid "Refresh Properties"
655
  msgstr ""
656
 
657
- #: .././admin/ga_dash_settings.php:1364
658
  msgid "Properties/Views Settings"
659
  msgstr "Frontend Einstellungen"
660
 
661
- #: .././admin/ga_dash_settings.php:1409
662
  msgid " exclude Super Admin tracking for the entire network"
663
  msgstr ""
664
 
665
- #: .././admin/ga_dash_settings.php:1537
666
  msgid "Setup Tutorial & Demo"
667
  msgstr "Setup Tutorial & Demo"
668
 
669
- #: .././admin/ga_dash_settings.php:1549
670
  msgid "Support & Reviews"
671
  msgstr "Support & Bewertungen"
672
 
673
- #: .././admin/ga_dash_settings.php:1557
674
  msgid "Plugin documentation and support on"
675
  msgstr ""
676
 
677
- #: .././admin/ga_dash_settings.php:1564
678
  msgid "Your feedback and review are both important,"
679
  msgstr "Deine Feedbacks und Bewertungen sind wichtig,"
680
 
681
- #: .././admin/ga_dash_settings.php:1564
682
  msgid "rate this plugin"
683
  msgstr "Bewerte dieses Plugin"
684
 
685
- #: .././admin/ga_dash_settings.php:1569
686
  msgid "Further Reading"
687
  msgstr "Mehr erfahren"
688
 
689
- #: .././admin/ga_dash_settings.php:1576
690
  msgid "Improve search rankings"
691
  msgstr ""
692
 
693
- #: .././admin/ga_dash_settings.php:1576
694
  msgid "by moving your website to HTTPS/SSL."
695
  msgstr ""
696
 
697
- #: .././admin/ga_dash_settings.php:1582
698
  msgid "Other"
699
  msgstr "Andere"
700
 
701
- #: .././admin/ga_dash_settings.php:1582
702
  msgid "WordPress Plugins"
703
  msgstr "WordPress Plugins"
704
 
705
- #: .././admin/ga_dash_settings.php:1582
706
  msgid "written by the same author"
707
  msgstr "vom selben Autor"
708
 
709
- #: .././admin/ga_dash_settings.php:1587
710
  msgid "Other Services"
711
  msgstr ""
712
 
713
- #: .././admin/ga_dash_settings.php:1594
714
  msgid "Speed up your website and plug into a whole"
715
  msgstr ""
716
 
717
- #: .././admin/ga_dash_settings.php:1594
718
  msgid "new level of site speed"
719
  msgstr ""
720
 
721
- #: .././admin/ga_dash_settings.php:1600
722
  msgid "Web Analytics"
723
  msgstr "Web Analyse"
724
 
725
- #: .././admin/ga_dash_settings.php:1600
726
  msgid "service with users tracking at IP level."
727
  msgstr ""
728
 
729
- #: .././front/frontend.php:112
730
  msgid "Views vs UniqueViews"
731
  msgstr "Aufrufe vs. Einmalige Aufrufe"
732
 
733
- #: .././front/frontend.php:168
734
  msgid "Google Analytics Reports"
735
  msgstr ""
736
 
737
- #: .././front/widgets.php:16
738
  msgid "Will display your google analytics stats in a widget"
739
  msgstr "Zeigt deine Google Analytics Statistik in einem Widget an"
740
 
741
- #: .././front/widgets.php:44 .././tools/gapi.php:808
742
  msgid "trend"
743
  msgstr ""
744
 
745
- #: .././front/widgets.php:144
746
  msgid "Period:"
747
  msgstr "Dauer:"
748
 
749
- #: .././front/widgets.php:144
750
  msgid "Sessions:"
751
  msgstr ""
752
 
753
- #: .././front/widgets.php:150
754
  msgid "generated by"
755
  msgstr "Generiert von"
756
 
757
- #: .././front/widgets.php:164
758
  msgid "Google Analytics Stats"
759
  msgstr "Google Analytics Statistik"
760
 
761
- #: .././front/widgets.php:171
762
  msgid "Title:"
763
  msgstr "Titel"
764
 
765
- #: .././front/widgets.php:178
766
  msgid "Display:"
767
  msgstr "Anzeige"
768
 
769
- #: .././front/widgets.php:182
770
  msgid "Chart & Totals"
771
  msgstr "Diagramm & Bilanz"
772
 
773
- #: .././front/widgets.php:183
774
  msgid "Chart"
775
  msgstr "Diagramm"
776
 
777
- #: .././front/widgets.php:184
778
  msgid "Totals"
779
  msgstr "Bilanz"
780
 
781
- #: .././front/widgets.php:188
782
- msgid "Anonimize chart&#39;s stats:"
783
- msgstr "Anonymisiere die grafischen Statistiken"
784
 
785
- #: .././front/widgets.php:195
786
  msgid "Stats for:"
787
  msgstr "Statistiken für:"
788
 
789
- #: .././front/widgets.php:205
790
  msgid "Give credits:"
791
  msgstr "Verweise auf:"
792
 
793
- #: .././tools/gapi.php:140
794
  msgid "Use this link to get your access code:"
795
  msgstr "Nutze diesen Link, um deinen Zugriffscode zu erhalten:"
796
 
797
- #: .././tools/gapi.php:140
798
  msgid "Get Access Code"
799
  msgstr "Erhalte den Zugriffscode"
800
 
801
- #: .././tools/gapi.php:145 .././tools/gapi.php:149
802
  msgid "Use the red link to get your access code!"
803
  msgstr ""
804
 
805
- #: .././tools/gapi.php:145
806
  msgid "Access Code:"
807
  msgstr "Zugriffscode:"
808
 
809
- #: .././tools/gapi.php:157
810
  msgid "Save Access Code"
811
  msgstr "Zugriffscode speichern"
812
 
813
- #: .././tools/gapi.php:380
814
  msgid "Organic Searches"
815
  msgstr "Organische Suche"
816
 
817
- #: .././tools/gapi.php:391
818
  msgid "Hour"
819
  msgstr "Stunde"
820
 
821
- #: .././tools/gapi.php:394 .././tools/gapi.php:808 .././tools/gapi.php:852
822
  msgid "Date"
823
  msgstr "Datum"
824
 
825
- #: .././tools/gapi.php:500 .././tools/gapi.php:852
826
  msgid "Views"
827
  msgstr "Aufrufe"
828
 
829
- #: .././tools/gapi.php:611
830
  msgid "Countries"
831
  msgstr ""
832
 
833
- #: .././tools/gapi.php:629
834
  msgid "Cities from"
835
  msgstr ""
836
 
837
- #: .././tools/gapi.php:691
838
  msgid "Channels"
839
  msgstr ""
840
 
841
- #: .././tools/gapi.php:754
842
  msgid "Type"
843
  msgstr "Typ"
844
 
845
- #: .././tools/gapi.php:852
846
  msgid "UniqueViews"
847
  msgstr "Einmalige Aufrufe"
848
 
849
- #: .././tools/gapi.php:899
850
- msgid "Top Searches"
851
- msgstr "Besten Suchen"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852
 
853
  #~ msgid "Error Log"
854
  #~ msgstr "Error Log"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
+ "POT-Creation-Date: 2015-02-07 11:40+0200\n"
5
+ "PO-Revision-Date: 2015-02-07 11:40+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: pt_BR\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.7.4\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
+ #: .././admin/dashboard_widgets.php:67 .././admin/dashboard_widgets.php:100
20
  msgid "Google Analytics"
21
  msgstr "Google Analytics"
22
 
23
+ #: .././admin/dashboard_widgets.php:71 .././admin/dashboard_widgets.php:104
24
+ #: .././admin/ga_dash_settings.php:105 .././admin/ga_dash_settings.php:216
25
+ #: .././admin/ga_dash_settings.php:964
26
  msgid "General Settings"
27
  msgstr "Allgemeine Einstellungen"
28
 
29
+ #: .././admin/dashboard_widgets.php:75
30
  msgid "Backend Settings"
31
  msgstr "Backend Einstellungen"
32
 
33
+ #: .././admin/dashboard_widgets.php:79
34
  msgid "Frontend Settings"
35
  msgstr "Frontend Einstellungen"
36
 
37
+ #: .././admin/dashboard_widgets.php:83
38
  msgid "Tracking Code"
39
  msgstr "Tracking Code"
40
 
41
+ #: .././admin/dashboard_widgets.php:87 .././admin/dashboard_widgets.php:108
42
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
43
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
44
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
45
+ msgid "Errors & Debug"
46
+ msgstr ""
47
+
48
+ #: .././admin/dashboard_widgets.php:152
49
  msgid "Settings"
50
  msgstr "Einstellungen"
51
 
52
+ #: .././admin/dashboard_widgets.php:166 .././front/widgets.php:14
53
  msgid "Google Analytics Dashboard"
54
  msgstr "Google Analytics Dashboard"
55
 
56
+ #: .././admin/dashboard_widgets.php:183
57
  msgid "This plugin needs an authorization:"
58
  msgstr "Diese Plugin benötigt eine Autorisierung:"
59
 
60
+ #: .././admin/dashboard_widgets.php:183 .././admin/ga_dash_settings.php:1035
61
+ #: .././admin/ga_dash_settings.php:1360
62
  msgid "Authorize Plugin"
63
  msgstr "Plugin autorisieren"
64
 
65
+ #: .././admin/dashboard_widgets.php:216 .././admin/ga_dash_settings.php:380
66
+ #: .././admin/ga_dash_settings.php:976 .././admin/ga_dash_settings.php:1001
67
+ #: .././admin/ga_dash_settings.php:1315
68
  msgid "View Name:"
69
  msgstr "Anzeigename:"
70
 
71
+ #: .././admin/dashboard_widgets.php:221
72
  msgid "Something went wrong while retrieving profiles list."
73
  msgstr ""
74
  "Ein Fehler ist aufgetreten. Die Profilliste konnte nicht abgerufen werden."
75
 
76
+ #: .././admin/dashboard_widgets.php:221
77
  msgid "More details"
78
  msgstr "Mehr Details"
79
 
80
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
81
  msgid "An admin should asign a default Google Analytics Profile."
82
  msgstr "Ein Admin sollte ein Standardprofil festlegen."
83
 
84
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
85
  msgid "Select Domain"
86
  msgstr "Wähle eine Domain aus."
87
 
88
+ #: .././admin/dashboard_widgets.php:250
89
  msgid ""
90
  "Something went wrong while retrieving property data. You need to create and "
91
  "properly configure a Google Analytics account:"
93
  "Ein Fehler ist aufgetreten. Dein Google Analytics Account muss erstellt und "
94
  "fertig konfiguriert sein:"
95
 
96
+ #: .././admin/dashboard_widgets.php:250
97
  msgid "Find out more!"
98
  msgstr "Erfahre mehr!"
99
 
100
+ #: .././admin/dashboard_widgets.php:278
101
  msgid "Real-Time"
102
  msgstr "Echtzeit"
103
 
104
+ #: .././admin/dashboard_widgets.php:279
105
  msgid "Today"
106
  msgstr "Heute"
107
 
108
+ #: .././admin/dashboard_widgets.php:281
109
  msgid "Yesterday"
110
  msgstr "Gestern"
111
 
112
+ #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:72
113
+ #: .././front/widgets.php:182
114
  msgid "Last 7 Days"
115
  msgstr "Letzten 7 Tage"
116
 
117
+ #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:75
118
+ #: .././front/widgets.php:183
119
  msgid "Last 14 Days"
120
  msgstr "Letzten 14 Tage"
121
 
122
+ #: .././admin/dashboard_widgets.php:287 .././front/widgets.php:78
123
+ #: .././front/widgets.php:184
124
  msgid "Last 30 Days"
125
  msgstr "Letzten 30Tage"
126
 
127
+ #: .././admin/dashboard_widgets.php:289
128
  msgid "Last 90 Days"
129
  msgstr "Letzten 90Tage"
130
 
131
+ #: .././admin/dashboard_widgets.php:295 .././admin/dashboard_widgets.php:1037
132
+ #: .././front/widgets.php:40 .././tools/gapi.php:376 .././tools/gapi.php:515
133
+ #: .././tools/gapi.php:554 .././tools/gapi.php:615 .././tools/gapi.php:744
134
+ #: .././tools/gapi.php:825
135
  msgid "Sessions"
136
  msgstr ""
137
 
138
+ #: .././admin/dashboard_widgets.php:296 .././admin/dashboard_widgets.php:1041
139
+ #: .././tools/gapi.php:364
140
  msgid "Users"
141
  msgstr ""
142
 
143
+ #: .././admin/dashboard_widgets.php:298
144
  msgid "Organic"
145
  msgstr "Organisch"
146
 
147
+ #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:1045
148
+ #: .././tools/gapi.php:367
149
  msgid "Page Views"
150
  msgstr "Seitenaufrufe"
151
 
152
+ #: .././admin/dashboard_widgets.php:302 .././admin/dashboard_widgets.php:1049
153
+ #: .././tools/gapi.php:370
154
  msgid "Bounce Rate"
155
  msgstr "Absprungrate"
156
 
157
+ #: .././admin/dashboard_widgets.php:304
158
  msgid "Location"
159
  msgstr ""
160
 
161
+ #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:477
162
  msgid "Pages"
163
  msgstr ""
164
 
165
+ #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:515
166
  msgid "Referrers"
167
  msgstr ""
168
 
169
+ #: .././admin/dashboard_widgets.php:310 .././tools/gapi.php:554
170
+ #: .././tools/gapi.php:825
171
  msgid "Searches"
172
  msgstr ""
173
 
174
+ #: .././admin/dashboard_widgets.php:312
175
  msgid "Traffic Details"
176
  msgstr ""
177
 
178
+ #: .././admin/dashboard_widgets.php:404 .././admin/dashboard_widgets.php:645
179
  msgid "REFERRAL"
180
  msgstr "VERWEISUNG"
181
 
182
+ #: .././admin/dashboard_widgets.php:408 .././admin/dashboard_widgets.php:646
183
  msgid "ORGANIC"
184
  msgstr "ORGANISCH"
185
 
186
+ #: .././admin/dashboard_widgets.php:412 .././admin/dashboard_widgets.php:532
187
+ #: .././admin/dashboard_widgets.php:647
188
  msgid "SOCIAL"
189
  msgstr "SOZIAL"
190
 
191
+ #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:535
192
+ #: .././admin/dashboard_widgets.php:648
193
  msgid "CAMPAIGN"
194
  msgstr ""
195
 
196
+ #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:538
197
+ #: .././admin/dashboard_widgets.php:651
198
  msgid "DIRECT"
199
  msgstr "DIREKT"
200
 
201
+ #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:652
202
  msgid "NEW"
203
  msgstr "NEUE"
204
 
205
+ #: .././admin/dashboard_widgets.php:526
206
  msgid "REFERRALS"
207
  msgstr "VERWEISUNGEN"
208
 
209
+ #: .././admin/dashboard_widgets.php:529
210
  msgid "KEYWORDS"
211
  msgstr "STICHWORTE"
212
 
213
+ #: .././admin/dashboard_widgets.php:683 .././admin/dashboard_widgets.php:780
214
+ #: .././admin/dashboard_widgets.php:972 .././admin/dashboard_widgets.php:1083
215
+ #: .././front/frontend.php:88
216
+ msgid "A JavaScript Error is blocking plugin resources!"
217
+ msgstr ""
218
+
219
+ #: .././admin/dashboard_widgets.php:696 .././admin/dashboard_widgets.php:715
220
+ #: .././admin/dashboard_widgets.php:793 .././admin/dashboard_widgets.php:824
221
+ #: .././admin/dashboard_widgets.php:843 .././admin/dashboard_widgets.php:863
222
+ #: .././admin/dashboard_widgets.php:986 .././admin/dashboard_widgets.php:1096
223
+ #: .././admin/dashboard_widgets.php:1115 .././front/frontend.php:100
224
+ #: .././front/frontend.php:119
225
+ msgid "Invalid response, more details in JavaScript Console (F12)."
226
+ msgstr ""
227
+
228
+ #: .././admin/dashboard_widgets.php:701 .././admin/dashboard_widgets.php:720
229
+ #: .././admin/dashboard_widgets.php:798 .././admin/dashboard_widgets.php:810
230
+ #: .././admin/dashboard_widgets.php:829 .././admin/dashboard_widgets.php:848
231
+ #: .././admin/dashboard_widgets.php:868 .././admin/dashboard_widgets.php:991
232
+ #: .././admin/dashboard_widgets.php:994 .././admin/dashboard_widgets.php:1101
233
+ #: .././admin/dashboard_widgets.php:1120 .././front/frontend.php:105
234
+ #: .././front/frontend.php:124 .././front/widgets.php:110
235
  msgid "This report is unavailable"
236
  msgstr ""
237
 
238
+ #: .././admin/dashboard_widgets.php:880
239
  msgid "Traffic Mediums"
240
  msgstr ""
241
 
242
+ #: .././admin/dashboard_widgets.php:896
243
  msgid "Visitor Type"
244
  msgstr ""
245
 
246
+ #: .././admin/dashboard_widgets.php:912
247
  msgid "Social Networks"
248
  msgstr ""
249
 
250
+ #: .././admin/dashboard_widgets.php:928
251
  msgid "Search Engines"
252
  msgstr ""
253
 
254
+ #: .././admin/dashboard_widgets.php:1053
255
  msgid "Organic Search"
256
  msgstr ""
257
 
258
+ #: .././admin/dashboard_widgets.php:1057
259
  msgid "Pages/Session"
260
  msgstr ""
261
 
262
+ #: .././admin/ga_dash_settings.php:83 .././admin/ga_dash_settings.php:194
263
+ #: .././admin/ga_dash_settings.php:327 .././admin/ga_dash_settings.php:855
264
+ #: .././admin/ga_dash_settings.php:1157
265
  msgid "Settings saved."
266
  msgstr ""
267
 
268
+ #: .././admin/ga_dash_settings.php:85 .././admin/ga_dash_settings.php:196
269
+ #: .././admin/ga_dash_settings.php:329 .././admin/ga_dash_settings.php:841
270
+ #: .././admin/ga_dash_settings.php:851 .././admin/ga_dash_settings.php:857
271
+ #: .././admin/ga_dash_settings.php:869 .././admin/ga_dash_settings.php:1118
272
+ #: .././admin/ga_dash_settings.php:1143 .././admin/ga_dash_settings.php:1153
273
+ #: .././admin/ga_dash_settings.php:1159 .././admin/ga_dash_settings.php:1171
274
  msgid "Cheating Huh?"
275
  msgstr ""
276
 
277
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
278
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
279
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
280
+ msgid "Something went wrong, check"
281
+ msgstr ""
282
 
283
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
284
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
285
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
286
+ msgid "or"
287
+ msgstr ""
288
+
289
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
290
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
291
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
292
  msgid "auhorize the plugin"
293
  msgstr "das Plugin autorisieren"
294
 
295
+ #: .././admin/ga_dash_settings.php:95
 
 
 
 
 
 
 
 
 
 
296
  msgid "Google Analytics Frontend Settings"
297
  msgstr "Google Analytics Frontend Einstellungen"
298
 
299
+ #: .././admin/ga_dash_settings.php:108 .././admin/ga_dash_settings.php:219
300
  msgid "Show stats to:"
301
  msgstr ""
302
 
303
+ #: .././admin/ga_dash_settings.php:152
304
  msgid " show page sessions and users in frontend (after each article)"
305
  msgstr ""
306
 
307
+ #: .././admin/ga_dash_settings.php:168
308
  msgid " show page searches (after each article)"
309
  msgstr "Suchen (nach jedem Artikel)"
310
 
311
+ #: .././admin/ga_dash_settings.php:177 .././admin/ga_dash_settings.php:305
312
+ #: .././admin/ga_dash_settings.php:666 .././admin/ga_dash_settings.php:1025
313
+ #: .././admin/ga_dash_settings.php:1351
314
  msgid "Save Changes"
315
  msgstr ""
316
 
317
+ #: .././admin/ga_dash_settings.php:206
318
  msgid "Google Analytics Dashboard Settings"
319
  msgstr "Google Analytics Dashboard Einstellungen"
320
 
321
+ #: .././admin/ga_dash_settings.php:264
322
  msgid "disable Switch Profile/View functionality"
323
  msgstr "Deaktiviere bzw. ändere das Profil/Zeige die Funktionalität"
324
 
325
+ #: .././admin/ga_dash_settings.php:268
326
  msgid "Real-Time Settings"
327
  msgstr "Echtzeit Einstellungen"
328
 
329
+ #: .././admin/ga_dash_settings.php:271
330
  msgid "Maximum number of pages to display on real-time tab:"
331
  msgstr ""
332
  "Maximale Anzahl der Seiten, die in einem Echtzeit-Tab angezeigt werden "
333
  "sollen:"
334
 
335
+ #: .././admin/ga_dash_settings.php:276 .././admin/ga_dash_settings.php:292
336
+ msgid "find out more"
337
+ msgstr ""
338
 
339
+ #: .././admin/ga_dash_settings.php:278 .././admin/ga_dash_settings.php:295
340
  msgid "about this feature"
341
  msgstr "über diese Funktion"
342
 
343
+ #: .././admin/ga_dash_settings.php:283
344
+ msgid "Location Settings"
345
+ msgstr ""
346
+
347
+ #: .././admin/ga_dash_settings.php:287
348
+ msgid "Target Geo Map to country:"
349
+ msgstr ""
350
 
351
+ #: .././admin/ga_dash_settings.php:336
352
+ msgid "The tracking component is disabled. You should set"
353
+ msgstr ""
354
 
355
+ #: .././admin/ga_dash_settings.php:336
356
+ msgid "Tracking Options"
357
  msgstr ""
358
 
359
+ #: .././admin/ga_dash_settings.php:336
360
+ msgid "to"
361
+ msgstr ""
362
 
363
+ #: .././admin/ga_dash_settings.php:336 .././admin/ga_dash_settings.php:372
364
+ msgid "Enabled"
365
+ msgstr "Aktiviert"
366
 
367
+ #: .././admin/ga_dash_settings.php:342
368
+ msgid "Google Analytics Tracking Code"
369
+ msgstr "Google Analytics Tracking Code"
370
 
371
+ #: .././admin/ga_dash_settings.php:351
372
+ msgid "Basic Settings"
373
+ msgstr ""
374
 
375
+ #: .././admin/ga_dash_settings.php:352 .././admin/ga_dash_settings.php:431
376
+ msgid "Events Tracking"
377
+ msgstr "Event Tracking"
378
 
379
+ #: .././admin/ga_dash_settings.php:353 .././admin/ga_dash_settings.php:495
380
+ msgid "Custom Definitions"
381
+ msgstr ""
382
 
383
+ #: .././admin/ga_dash_settings.php:354 .././admin/ga_dash_settings.php:623
384
+ #: .././admin/ga_dash_settings.php:1328
385
+ msgid "Exclude Tracking"
386
+ msgstr "Exkludiere Tracking"
387
 
388
+ #: .././admin/ga_dash_settings.php:355
389
+ msgid "Advanced Settings"
390
+ msgstr ""
391
 
392
+ #: .././admin/ga_dash_settings.php:363
393
  msgid "Tracking Settings"
394
  msgstr "Tracking Einstellungen"
395
 
396
+ #: .././admin/ga_dash_settings.php:366
397
  msgid "Tracking Options:"
398
  msgstr ""
399
 
400
+ #: .././admin/ga_dash_settings.php:370
401
  msgid "Disabled"
402
  msgstr "Deaktiviert"
403
 
404
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
 
 
 
 
405
  msgid "Tracking ID:"
406
  msgstr "Tracking ID:"
407
 
408
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
409
  msgid "Default URL:"
410
  msgstr "Standard URL:"
411
 
412
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
413
  msgid "Time Zone:"
414
  msgstr "Zeitzone"
415
 
416
+ #: .././admin/ga_dash_settings.php:385
417
  msgid "Basic Tracking"
418
  msgstr "Basic Tracking"
419
 
420
+ #: .././admin/ga_dash_settings.php:388
421
  msgid "Tracking Type:"
422
  msgstr ""
423
 
424
+ #: .././admin/ga_dash_settings.php:392
425
  msgid "Classic Analytics"
426
  msgstr "Klassische Analyse"
427
 
428
+ #: .././admin/ga_dash_settings.php:394
429
  msgid "Universal Analytics"
430
  msgstr "Universelle Analyse"
431
 
432
+ #: .././admin/ga_dash_settings.php:408
433
  msgid " anonymize IPs while tracking"
434
  msgstr "Anonymisiere die IPs während des Trackings"
435
 
436
+ #: .././admin/ga_dash_settings.php:423
437
  msgid " enable remarketing, demographics and interests reports"
438
  msgstr "Aktiviere remarketing, demografische und interessen berichte"
439
 
440
+ #: .././admin/ga_dash_settings.php:445
 
 
 
 
441
  msgid " track downloads, mailto and outbound links"
442
  msgstr "Tracke Downlaods, mailtos und ausgehende Links"
443
 
444
+ #: .././admin/ga_dash_settings.php:449
445
  msgid "Downloads Regex:"
446
  msgstr "Download Filter:"
447
 
448
+ #: .././admin/ga_dash_settings.php:466
449
  msgid " track affiliate links matching this regex"
450
  msgstr ""
451
 
452
+ #: .././admin/ga_dash_settings.php:470
453
  msgid "Affiliates Regex:"
454
  msgstr ""
455
 
456
+ #: .././admin/ga_dash_settings.php:487
457
  msgid " track fragment identifiers, hashmarks (#) in URI links"
458
  msgstr ""
459
 
460
+ #: .././admin/ga_dash_settings.php:498
 
 
 
 
461
  msgid "Authors:"
462
  msgstr ""
463
 
464
+ #: .././admin/ga_dash_settings.php:508
465
  msgid "Publication Year:"
466
  msgstr ""
467
 
468
+ #: .././admin/ga_dash_settings.php:518
469
  msgid "Categories:"
470
  msgstr ""
471
 
472
+ #: .././admin/ga_dash_settings.php:528
473
  msgid "User Type:"
474
  msgstr ""
475
 
476
+ #: .././admin/ga_dash_settings.php:542
477
  msgid "Advanced Tracking"
478
  msgstr "Advanced Tracking"
479
 
480
+ #: .././admin/ga_dash_settings.php:545
481
  msgid "Page Speed SR:"
482
  msgstr "Seiten pro Besuch:"
483
 
484
+ #: .././admin/ga_dash_settings.php:563
485
  msgid " exclude events from bounce-rate calculation"
486
  msgstr ""
487
 
488
+ #: .././admin/ga_dash_settings.php:578
489
  msgid " enable enhanced link attribution"
490
  msgstr "Aktiviere die erweiterte Linkzuordnung"
491
 
492
+ #: .././admin/ga_dash_settings.php:592
493
  msgid " enable AdSense account linking"
494
  msgstr ""
495
 
496
+ #: .././admin/ga_dash_settings.php:608
497
  msgid " enable cross domain tracking"
498
  msgstr ""
499
 
500
+ #: .././admin/ga_dash_settings.php:612
501
  msgid "Cross Domains:"
502
  msgstr ""
503
 
504
+ #: .././admin/ga_dash_settings.php:626
 
 
 
 
505
  msgid "Exclude tracking for:"
506
  msgstr ""
507
 
508
+ #: .././admin/ga_dash_settings.php:687
509
+ msgid "Google Analytics Errors & Debugging"
510
+ msgstr ""
511
+
512
+ #: .././admin/ga_dash_settings.php:697
513
+ msgid "Errors & Details"
514
+ msgstr ""
515
+
516
+ #: .././admin/ga_dash_settings.php:698
517
+ msgid "Plugin Settings"
518
+ msgstr ""
519
+
520
+ #: .././admin/ga_dash_settings.php:706
521
+ msgid "For errors and/or other issues please check"
522
+ msgstr ""
523
+
524
+ #: .././admin/ga_dash_settings.php:706
525
+ msgid "the plugin documentation page"
526
+ msgstr ""
527
+
528
+ #: .././admin/ga_dash_settings.php:706
529
+ msgid "and related tutorials"
530
+ msgstr ""
531
+
532
+ #: .././admin/ga_dash_settings.php:710
533
+ msgid "Last Error detected"
534
+ msgstr ""
535
+
536
+ #: .././admin/ga_dash_settings.php:715 .././admin/ga_dash_settings.php:728
537
+ msgid "None"
538
+ msgstr ""
539
+
540
+ #: .././admin/ga_dash_settings.php:722
541
+ msgid "Error Details"
542
+ msgstr ""
543
+
544
+ #: .././admin/ga_dash_settings.php:740
545
+ msgid "Plugin Configuration"
546
+ msgstr ""
547
+
548
+ #: .././admin/ga_dash_settings.php:788 .././admin/ga_dash_settings.php:1072
549
  msgid ""
550
  "Loading the required libraries. If this results in a blank screen or a fatal "
551
  "error, try this solution:"
552
  msgstr ""
553
 
554
+ #: .././admin/ga_dash_settings.php:800 .././admin/ga_dash_settings.php:1084
555
  msgid "Plugin authorization succeeded."
556
  msgstr "Plugin Autorisierung erfolgreich."
557
 
558
+ #: .././admin/ga_dash_settings.php:816 .././admin/ga_dash_settings.php:1109
559
  msgid ""
560
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
561
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
562
  msgstr ""
563
 
564
+ #: .././admin/ga_dash_settings.php:839 .././admin/ga_dash_settings.php:1141
565
  msgid "Cleared Cache."
566
  msgstr "Cache geleert."
567
 
568
+ #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1150
569
  msgid "Token Reseted and Revoked."
570
  msgstr "Token zurückgesetzt und entzogen."
571
 
572
+ #: .././admin/ga_dash_settings.php:862 .././admin/ga_dash_settings.php:1164
 
 
 
 
573
  msgid "All other domains/properties were removed."
574
  msgstr "Alle anderen Domains/Einstellungen wurden entfernt."
575
 
576
+ #: .././admin/ga_dash_settings.php:874 .././admin/ga_dash_settings.php:1176
 
 
 
 
 
577
  msgid "Google Analytics Settings"
578
  msgstr "Google Analytics Einstellungen"
579
 
580
+ #: .././admin/ga_dash_settings.php:887 .././admin/ga_dash_settings.php:1189
 
 
 
 
 
 
 
 
581
  msgid "Use the red link (see below) to generate and get your access code!"
582
  msgstr ""
583
 
584
+ #: .././admin/ga_dash_settings.php:898 .././admin/ga_dash_settings.php:1224
585
  msgid "Plugin Authorization"
586
  msgstr "Plugin Autorisierung"
587
 
588
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
589
  msgid "You should watch the"
590
  msgstr "Du solltest dir das folgende"
591
 
592
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
593
  msgid "video"
594
  msgstr "Video ansehen"
595
 
596
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
597
  msgid "and read this"
598
  msgstr "und dieses"
599
 
600
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
601
  msgid "tutorial"
602
  msgstr "Tutorial lesen"
603
 
604
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
605
  msgid ""
606
  "before proceeding to authorization. This plugin requires a properly "
607
  "configured Google Analytics account"
609
  "bevor du die Autorisierung fortsetzt. Hinweis: Dieses Plugin benötigt einen "
610
  "fertig konfigurierten Google Analytics Account"
611
 
612
+ #: .././admin/ga_dash_settings.php:914 .././admin/ga_dash_settings.php:1239
613
  msgid " use your own API Project credentials"
614
  msgstr "Nutze deinen eigenen API Projekt Berechtigungsnachweis"
615
 
616
+ #: .././admin/ga_dash_settings.php:921 .././admin/ga_dash_settings.php:1246
617
  msgid "API Key:"
618
  msgstr "API Key:"
619
 
620
+ #: .././admin/ga_dash_settings.php:928 .././admin/ga_dash_settings.php:1254
621
  msgid "Client ID:"
622
  msgstr "Client ID:"
623
 
624
+ #: .././admin/ga_dash_settings.php:936 .././admin/ga_dash_settings.php:1263
625
  msgid "Client Secret:"
626
  msgstr "Client Secret:"
627
 
628
+ #: .././admin/ga_dash_settings.php:954 .././admin/ga_dash_settings.php:1282
629
  msgid "Clear Authorization"
630
  msgstr "Entferne die Autorisierung"
631
 
632
+ #: .././admin/ga_dash_settings.php:958 .././admin/ga_dash_settings.php:1039
633
+ #: .././admin/ga_dash_settings.php:1285 .././admin/ga_dash_settings.php:1363
634
  msgid "Clear Cache"
635
  msgstr "Cache leeren"
636
 
637
+ #: .././admin/ga_dash_settings.php:967
638
  msgid "Select Domain:"
639
  msgstr ""
640
 
641
+ #: .././admin/ga_dash_settings.php:980 .././admin/ga_dash_settings.php:1319
642
  msgid "Property not found"
643
  msgstr ""
644
 
645
+ #: .././admin/ga_dash_settings.php:985
646
  msgid "and/or hide all other domains"
647
  msgstr "und/oder verberge alle anderen Domains"
648
 
649
+ #: .././admin/ga_dash_settings.php:988
650
  msgid "Hide Now"
651
  msgstr "Jetzt verbergen"
652
 
653
+ #: .././admin/ga_dash_settings.php:1007
654
  msgid "Theme Color:"
655
  msgstr ""
656
 
657
+ #: .././admin/ga_dash_settings.php:1017
658
  msgid "A new frontend widget is available! To enable it, go to"
659
  msgstr "Ein neues Frontend Widget ist verfügbar! Um es zu aktivieren, gehe zu"
660
 
661
+ #: .././admin/ga_dash_settings.php:1017
662
  msgid "Appearance -> Widgets"
663
  msgstr "Design -> Widgets"
664
 
665
+ #: .././admin/ga_dash_settings.php:1017
666
  msgid "and look for Google Analytics Dashboard."
667
  msgstr "und suche nach Google Analytics Dashboard."
668
 
669
+ #: .././admin/ga_dash_settings.php:1115
 
 
 
 
 
670
  msgid "Properties refreshed."
671
  msgstr ""
672
 
673
+ #: .././admin/ga_dash_settings.php:1201
674
  msgid "Network Setup"
675
  msgstr ""
676
 
677
+ #: .././admin/ga_dash_settings.php:1216
678
  msgid " use a single Google Analytics account for the entire network"
679
  msgstr ""
680
 
681
+ #: .././admin/ga_dash_settings.php:1288
682
  msgid "Refresh Properties"
683
  msgstr ""
684
 
685
+ #: .././admin/ga_dash_settings.php:1294
686
  msgid "Properties/Views Settings"
687
  msgstr "Frontend Einstellungen"
688
 
689
+ #: .././admin/ga_dash_settings.php:1342
690
  msgid " exclude Super Admin tracking for the entire network"
691
  msgstr ""
692
 
693
+ #: .././admin/ga_dash_settings.php:1394
694
  msgid "Setup Tutorial & Demo"
695
  msgstr "Setup Tutorial & Demo"
696
 
697
+ #: .././admin/ga_dash_settings.php:1406
698
  msgid "Support & Reviews"
699
  msgstr "Support & Bewertungen"
700
 
701
+ #: .././admin/ga_dash_settings.php:1414
702
  msgid "Plugin documentation and support on"
703
  msgstr ""
704
 
705
+ #: .././admin/ga_dash_settings.php:1421
706
  msgid "Your feedback and review are both important,"
707
  msgstr "Deine Feedbacks und Bewertungen sind wichtig,"
708
 
709
+ #: .././admin/ga_dash_settings.php:1421
710
  msgid "rate this plugin"
711
  msgstr "Bewerte dieses Plugin"
712
 
713
+ #: .././admin/ga_dash_settings.php:1426
714
  msgid "Further Reading"
715
  msgstr "Mehr erfahren"
716
 
717
+ #: .././admin/ga_dash_settings.php:1434
718
  msgid "Improve search rankings"
719
  msgstr ""
720
 
721
+ #: .././admin/ga_dash_settings.php:1434
722
  msgid "by moving your website to HTTPS/SSL."
723
  msgstr ""
724
 
725
+ #: .././admin/ga_dash_settings.php:1441
726
  msgid "Other"
727
  msgstr "Andere"
728
 
729
+ #: .././admin/ga_dash_settings.php:1441
730
  msgid "WordPress Plugins"
731
  msgstr "WordPress Plugins"
732
 
733
+ #: .././admin/ga_dash_settings.php:1441
734
  msgid "written by the same author"
735
  msgstr "vom selben Autor"
736
 
737
+ #: .././admin/ga_dash_settings.php:1446
738
  msgid "Other Services"
739
  msgstr ""
740
 
741
+ #: .././admin/ga_dash_settings.php:1453
742
  msgid "Speed up your website and plug into a whole"
743
  msgstr ""
744
 
745
+ #: .././admin/ga_dash_settings.php:1453
746
  msgid "new level of site speed"
747
  msgstr ""
748
 
749
+ #: .././admin/ga_dash_settings.php:1460
750
  msgid "Web Analytics"
751
  msgstr "Web Analyse"
752
 
753
+ #: .././admin/ga_dash_settings.php:1460
754
  msgid "service with users tracking at IP level."
755
  msgstr ""
756
 
757
+ #: .././front/frontend.php:134
758
  msgid "Views vs UniqueViews"
759
  msgstr "Aufrufe vs. Einmalige Aufrufe"
760
 
761
+ #: .././front/frontend.php:184
762
  msgid "Google Analytics Reports"
763
  msgstr ""
764
 
765
+ #: .././front/widgets.php:15
766
  msgid "Will display your google analytics stats in a widget"
767
  msgstr "Zeigt deine Google Analytics Statistik in einem Widget an"
768
 
769
+ #: .././front/widgets.php:40 .././tools/gapi.php:744
770
  msgid "trend"
771
  msgstr ""
772
 
773
+ #: .././front/widgets.php:133
774
  msgid "Period:"
775
  msgstr "Dauer:"
776
 
777
+ #: .././front/widgets.php:133
778
  msgid "Sessions:"
779
  msgstr ""
780
 
781
+ #: .././front/widgets.php:137
782
  msgid "generated by"
783
  msgstr "Generiert von"
784
 
785
+ #: .././front/widgets.php:147
786
  msgid "Google Analytics Stats"
787
  msgstr "Google Analytics Statistik"
788
 
789
+ #: .././front/widgets.php:154
790
  msgid "Title:"
791
  msgstr "Titel"
792
 
793
+ #: .././front/widgets.php:161
794
  msgid "Display:"
795
  msgstr "Anzeige"
796
 
797
+ #: .././front/widgets.php:165
798
  msgid "Chart & Totals"
799
  msgstr "Diagramm & Bilanz"
800
 
801
+ #: .././front/widgets.php:166
802
  msgid "Chart"
803
  msgstr "Diagramm"
804
 
805
+ #: .././front/widgets.php:167
806
  msgid "Totals"
807
  msgstr "Bilanz"
808
 
809
+ #: .././front/widgets.php:171
810
+ msgid "Anonymize stats:"
811
+ msgstr ""
812
 
813
+ #: .././front/widgets.php:178
814
  msgid "Stats for:"
815
  msgstr "Statistiken für:"
816
 
817
+ #: .././front/widgets.php:188
818
  msgid "Give credits:"
819
  msgstr "Verweise auf:"
820
 
821
+ #: .././tools/gapi.php:129
822
  msgid "Use this link to get your access code:"
823
  msgstr "Nutze diesen Link, um deinen Zugriffscode zu erhalten:"
824
 
825
+ #: .././tools/gapi.php:129
826
  msgid "Get Access Code"
827
  msgstr "Erhalte den Zugriffscode"
828
 
829
+ #: .././tools/gapi.php:134 .././tools/gapi.php:138
830
  msgid "Use the red link to get your access code!"
831
  msgstr ""
832
 
833
+ #: .././tools/gapi.php:134
834
  msgid "Access Code:"
835
  msgstr "Zugriffscode:"
836
 
837
+ #: .././tools/gapi.php:146
838
  msgid "Save Access Code"
839
  msgstr "Zugriffscode speichern"
840
 
841
+ #: .././tools/gapi.php:373
842
  msgid "Organic Searches"
843
  msgstr "Organische Suche"
844
 
845
+ #: .././tools/gapi.php:381
846
  msgid "Hour"
847
  msgstr "Stunde"
848
 
849
+ #: .././tools/gapi.php:384 .././tools/gapi.php:744 .././tools/gapi.php:783
850
  msgid "Date"
851
  msgstr "Datum"
852
 
853
+ #: .././tools/gapi.php:477 .././tools/gapi.php:783
854
  msgid "Views"
855
  msgstr "Aufrufe"
856
 
857
+ #: .././tools/gapi.php:576
858
  msgid "Countries"
859
  msgstr ""
860
 
861
+ #: .././tools/gapi.php:590
862
  msgid "Cities from"
863
  msgstr ""
864
 
865
+ #: .././tools/gapi.php:644
866
  msgid "Channels"
867
  msgstr ""
868
 
869
+ #: .././tools/gapi.php:698
870
  msgid "Type"
871
  msgstr "Typ"
872
 
873
+ #: .././tools/gapi.php:783
874
  msgid "UniqueViews"
875
  msgstr "Einmalige Aufrufe"
876
 
877
+ #~ msgid "Something went wrong, you need to"
878
+ #~ msgstr "Ein Fehler ist aufgetreten. Du musst"
879
+
880
+ #~ msgid "or properly configure your"
881
+ #~ msgstr "oder eine richtige Konfiguration"
882
+
883
+ #~ msgid "Google Analytics account"
884
+ #~ msgstr "deines Google Analytics Accounts erstellen"
885
+
886
+ #~ msgid "(find out more"
887
+ #~ msgstr "(Finde mehr heraus"
888
+
889
+ #~ msgid ")"
890
+ #~ msgstr ")"
891
+
892
+ #~ msgid "Additional Stats & Charts"
893
+ #~ msgstr "Zusätzliche Statistiken und Listen"
894
+
895
+ #~ msgid "Target Geo Map to region:"
896
+ #~ msgstr "Bestimme die Geomap Region"
897
+
898
+ #~ msgid "and render top"
899
+ #~ msgstr "und gebe den Rekord aus"
900
+
901
+ #~ msgid "cities (find out more"
902
+ #~ msgstr "Städte (finde mehr heraus"
903
+
904
+ #~ msgid " show traffic overview"
905
+ #~ msgstr "Zeige die Übersicht des Datenverkehrs"
906
+
907
+ #~ msgid " show top pages"
908
+ #~ msgstr "Zeige die besten Seiten"
909
+
910
+ #~ msgid " show top referrers"
911
+ #~ msgstr "Zeige die besten Referrer"
912
+
913
+ #~ msgid " show top searches"
914
+ #~ msgstr "Zeige die besten Suchen"
915
+
916
+ #~ msgid "Dumping log data."
917
+ #~ msgstr "Setze die Logs zurück."
918
+
919
+ #~ msgid ""
920
+ #~ "Something went wrong. Please check the Debugging Data section for "
921
+ #~ "possible errors"
922
+ #~ msgstr ""
923
+ #~ "Ein Fehler ist aufgetreten. Bitte überprüfe den Debug Log, um mögliche "
924
+ #~ "Fehler anzuzeigen."
925
+
926
+ #~ msgid "Debugging Data"
927
+ #~ msgstr "Debug Informationen"
928
+
929
+ #~ msgid "Anonimize chart&#39;s stats:"
930
+ #~ msgstr "Anonymisiere die grafischen Statistiken"
931
+
932
+ #~ msgid "Top Searches"
933
+ #~ msgstr "Besten Suchen"
934
 
935
  #~ msgid "Error Log"
936
  #~ msgstr "Error Log"
languages/ga-dash-es_ES.mo CHANGED
Binary file
languages/ga-dash-es_ES.po CHANGED
@@ -1,870 +1,914 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
- "POT-Creation-Date: 2015-01-07 20:25+0200\n"
5
- "PO-Revision-Date: 2015-01-07 20:25+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: \n"
8
  "Language: es_ES\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.1\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-SearchPath-0: ../.\n"
17
 
18
- #: .././admin/dashboard_widgets.php:50 .././admin/dashboard_widgets.php:81
19
  msgid "Google Analytics"
20
  msgstr "Google Analytics"
21
 
22
- #: .././admin/dashboard_widgets.php:54 .././admin/dashboard_widgets.php:85
23
- #: .././admin/ga_dash_settings.php:100 .././admin/ga_dash_settings.php:222
24
- #: .././admin/ga_dash_settings.php:954
25
  msgid "General Settings"
26
  msgstr "Configuración general"
27
 
28
- #: .././admin/dashboard_widgets.php:58
29
  msgid "Backend Settings"
30
  msgstr "Configuración del backend"
31
 
32
- #: .././admin/dashboard_widgets.php:62
33
  msgid "Frontend Settings"
34
  msgstr "Configuración del frontend"
35
 
36
- #: .././admin/dashboard_widgets.php:66
37
  #, fuzzy
38
  msgid "Tracking Code"
39
  msgstr "Tipo de seguimiento:"
40
 
41
- #: .././admin/dashboard_widgets.php:132
 
 
 
 
 
 
 
42
  msgid "Settings"
43
  msgstr "Ajustes"
44
 
45
- #: .././admin/dashboard_widgets.php:148 .././front/widgets.php:15
46
  msgid "Google Analytics Dashboard"
47
  msgstr "Escritorio de Google Analytics"
48
 
49
- #: .././admin/dashboard_widgets.php:166
50
  msgid "This plugin needs an authorization:"
51
  msgstr ""
52
 
53
- #: .././admin/dashboard_widgets.php:166 .././admin/ga_dash_settings.php:1063
54
- #: .././admin/ga_dash_settings.php:1465
55
  #, fuzzy
56
  msgid "Authorize Plugin"
57
  msgstr "Autorizar aplicación"
58
 
59
- #: .././admin/dashboard_widgets.php:207 .././admin/ga_dash_settings.php:459
60
- #: .././admin/ga_dash_settings.php:966 .././admin/ga_dash_settings.php:991
61
- #: .././admin/ga_dash_settings.php:1383
62
  msgid "View Name:"
63
  msgstr ""
64
 
65
- #: .././admin/dashboard_widgets.php:212
66
  msgid "Something went wrong while retrieving profiles list."
67
  msgstr ""
68
 
69
- #: .././admin/dashboard_widgets.php:212
70
  msgid "More details"
71
  msgstr ""
72
 
73
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
74
  #, fuzzy
75
  msgid "An admin should asign a default Google Analytics Profile."
76
  msgstr "Pide a un administrador que asigne un perfil de Google Analytics"
77
 
78
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
79
  #, fuzzy
80
  msgid "Select Domain"
81
  msgstr "un solo dominio"
82
 
83
- #: .././admin/dashboard_widgets.php:245
84
  msgid ""
85
  "Something went wrong while retrieving property data. You need to create and "
86
  "properly configure a Google Analytics account:"
87
  msgstr ""
88
 
89
- #: .././admin/dashboard_widgets.php:245
90
  msgid "Find out more!"
91
  msgstr ""
92
 
93
- #: .././admin/dashboard_widgets.php:276
94
  msgid "Real-Time"
95
  msgstr "Tiempo real"
96
 
97
- #: .././admin/dashboard_widgets.php:277
98
  msgid "Today"
99
  msgstr "Hoy"
100
 
101
- #: .././admin/dashboard_widgets.php:279
102
  msgid "Yesterday"
103
  msgstr "Ayer"
104
 
105
- #: .././admin/dashboard_widgets.php:281 .././front/widgets.php:83
106
- #: .././front/widgets.php:199
107
  msgid "Last 7 Days"
108
  msgstr "Últimos 7 días "
109
 
110
- #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:86
111
- #: .././front/widgets.php:200
112
  msgid "Last 14 Days"
113
  msgstr "Últimos 14 días"
114
 
115
- #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:89
116
- #: .././front/widgets.php:201
117
  msgid "Last 30 Days"
118
  msgstr "Últimos 30 días"
119
 
120
- #: .././admin/dashboard_widgets.php:287
121
  msgid "Last 90 Days"
122
  msgstr "Últimos 90 días"
123
 
124
- #: .././admin/dashboard_widgets.php:293 .././admin/dashboard_widgets.php:952
125
- #: .././front/widgets.php:44 .././tools/gapi.php:384 .././tools/gapi.php:543
126
- #: .././tools/gapi.php:587 .././tools/gapi.php:658 .././tools/gapi.php:808
127
- #: .././tools/gapi.php:899
128
  msgid "Sessions"
129
  msgstr ""
130
 
131
- #: .././admin/dashboard_widgets.php:294 .././admin/dashboard_widgets.php:956
132
- #: .././tools/gapi.php:368
133
  msgid "Users"
134
  msgstr ""
135
 
136
- #: .././admin/dashboard_widgets.php:296
137
  msgid "Organic"
138
  msgstr "Búsquedas orgánicas"
139
 
140
- #: .././admin/dashboard_widgets.php:298 .././admin/dashboard_widgets.php:960
141
- #: .././tools/gapi.php:372
142
  msgid "Page Views"
143
  msgstr "Páginas vistas"
144
 
145
- #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:964
146
- #: .././tools/gapi.php:376
147
  msgid "Bounce Rate"
148
  msgstr "Porcenaje de rebote"
149
 
150
- #: .././admin/dashboard_widgets.php:302
151
  msgid "Location"
152
  msgstr ""
153
 
154
- #: .././admin/dashboard_widgets.php:304 .././tools/gapi.php:500
155
  msgid "Pages"
156
  msgstr ""
157
 
158
- #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:543
159
  msgid "Referrers"
160
  msgstr ""
161
 
162
- #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:587
 
163
  msgid "Searches"
164
  msgstr ""
165
 
166
- #: .././admin/dashboard_widgets.php:310
167
  msgid "Traffic Details"
168
  msgstr ""
169
 
170
- #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:657
171
  msgid "REFERRAL"
172
  msgstr "REFERENCIA"
173
 
174
- #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:658
175
  msgid "ORGANIC"
176
  msgstr "ORGÁNICO"
177
 
178
- #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:544
179
- #: .././admin/dashboard_widgets.php:659
180
  msgid "SOCIAL"
181
  msgstr "SOCIAL"
182
 
183
- #: .././admin/dashboard_widgets.php:428 .././admin/dashboard_widgets.php:547
184
- #: .././admin/dashboard_widgets.php:660
185
  msgid "CAMPAIGN"
186
  msgstr ""
187
 
188
- #: .././admin/dashboard_widgets.php:432 .././admin/dashboard_widgets.php:550
189
- #: .././admin/dashboard_widgets.php:663
190
  msgid "DIRECT"
191
  msgstr "DIRECTO"
192
 
193
- #: .././admin/dashboard_widgets.php:436 .././admin/dashboard_widgets.php:664
194
  msgid "NEW"
195
  msgstr "NUEVO"
196
 
197
- #: .././admin/dashboard_widgets.php:538
198
  msgid "REFERRALS"
199
  msgstr ""
200
 
201
- #: .././admin/dashboard_widgets.php:541
202
  msgid "KEYWORDS"
203
  msgstr ""
204
 
205
- #: .././admin/dashboard_widgets.php:690 .././admin/dashboard_widgets.php:702
206
- #: .././admin/dashboard_widgets.php:757 .././admin/dashboard_widgets.php:769
207
- #: .././admin/dashboard_widgets.php:781 .././admin/dashboard_widgets.php:793
208
- #: .././admin/dashboard_widgets.php:806 .././admin/dashboard_widgets.php:905
209
- #: .././admin/dashboard_widgets.php:908 .././admin/dashboard_widgets.php:992
210
- #: .././admin/dashboard_widgets.php:1004 .././front/frontend.php:88
211
- #: .././front/frontend.php:100 .././front/widgets.php:122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  msgid "This report is unavailable"
213
  msgstr ""
214
 
215
- #: .././admin/dashboard_widgets.php:818
216
  msgid "Traffic Mediums"
217
  msgstr ""
218
 
219
- #: .././admin/dashboard_widgets.php:834
220
  msgid "Visitor Type"
221
  msgstr ""
222
 
223
- #: .././admin/dashboard_widgets.php:850
224
  msgid "Social Networks"
225
  msgstr ""
226
 
227
- #: .././admin/dashboard_widgets.php:866
228
  msgid "Search Engines"
229
  msgstr ""
230
 
231
- #: .././admin/dashboard_widgets.php:968
232
  msgid "Organic Search"
233
  msgstr ""
234
 
235
- #: .././admin/dashboard_widgets.php:972
236
  msgid "Pages/Session"
237
  msgstr ""
238
 
239
- #: .././admin/ga_dash_settings.php:78 .././admin/ga_dash_settings.php:200
240
- #: .././admin/ga_dash_settings.php:418 .././admin/ga_dash_settings.php:841
241
- #: .././admin/ga_dash_settings.php:1228
242
  msgid "Settings saved."
243
  msgstr ""
244
 
245
- #: .././admin/ga_dash_settings.php:80 .././admin/ga_dash_settings.php:202
246
- #: .././admin/ga_dash_settings.php:420 .././admin/ga_dash_settings.php:824
247
- #: .././admin/ga_dash_settings.php:834 .././admin/ga_dash_settings.php:843
248
- #: .././admin/ga_dash_settings.php:855 .././admin/ga_dash_settings.php:1183
249
- #: .././admin/ga_dash_settings.php:1211 .././admin/ga_dash_settings.php:1221
250
- #: .././admin/ga_dash_settings.php:1230 .././admin/ga_dash_settings.php:1242
251
  msgid "Cheating Huh?"
252
  msgstr ""
253
 
254
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
255
- #: .././admin/ga_dash_settings.php:424
256
- msgid "Something went wrong, you need to"
 
257
  msgstr ""
258
 
259
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
260
- #: .././admin/ga_dash_settings.php:424
261
- msgid "auhorize the plugin"
262
- msgstr "autorizar aplicación"
263
-
264
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
265
- #: .././admin/ga_dash_settings.php:424
266
- msgid "or properly configure your"
267
  msgstr ""
268
 
269
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
270
- #: .././admin/ga_dash_settings.php:424
271
- #, fuzzy
272
- msgid "Google Analytics account"
273
- msgstr "Seguimiento de Google Analytics"
274
 
275
- #: .././admin/ga_dash_settings.php:90
276
  msgid "Google Analytics Frontend Settings"
277
  msgstr "Configuración del frontend de Google Analytics"
278
 
279
- #: .././admin/ga_dash_settings.php:103 .././admin/ga_dash_settings.php:225
280
  msgid "Show stats to:"
281
  msgstr ""
282
 
283
- #: .././admin/ga_dash_settings.php:153
284
  msgid " show page sessions and users in frontend (after each article)"
285
  msgstr ""
286
 
287
- #: .././admin/ga_dash_settings.php:169
288
  #, fuzzy
289
  msgid " show page searches (after each article)"
290
  msgstr ""
291
  "mostrar las visitas de página y las busquedas principales en el frontend "
292
  "(después de cada artículo)"
293
 
294
- #: .././admin/ga_dash_settings.php:178 .././admin/ga_dash_settings.php:391
295
- #: .././admin/ga_dash_settings.php:739 .././admin/ga_dash_settings.php:1053
296
- #: .././admin/ga_dash_settings.php:1456
297
  msgid "Save Changes"
298
  msgstr ""
299
 
300
- #: .././admin/ga_dash_settings.php:212
301
  msgid "Google Analytics Dashboard Settings"
302
  msgstr "Configuración del escritorio de Google Analytics"
303
 
304
- #: .././admin/ga_dash_settings.php:275
305
  #, fuzzy
306
  msgid "disable Switch Profile/View functionality"
307
  msgstr " desactivar la funcionalidad de cambio de perfil en el escritorio"
308
 
309
- #: .././admin/ga_dash_settings.php:279
310
  #, fuzzy
311
  msgid "Real-Time Settings"
312
  msgstr "Configuración de la caché"
313
 
314
- #: .././admin/ga_dash_settings.php:282
315
  msgid "Maximum number of pages to display on real-time tab:"
316
  msgstr ""
317
 
318
- #: .././admin/ga_dash_settings.php:287
319
- msgid "(find out more"
320
  msgstr ""
321
 
322
- #: .././admin/ga_dash_settings.php:289 .././admin/ga_dash_settings.php:324
323
  msgid "about this feature"
324
  msgstr ""
325
 
326
- #: .././admin/ga_dash_settings.php:290 .././admin/ga_dash_settings.php:325
327
- msgid ")"
328
  msgstr ""
329
 
330
- #: .././admin/ga_dash_settings.php:293
331
- msgid "Additional Stats & Charts"
332
  msgstr ""
333
 
334
- #: .././admin/ga_dash_settings.php:306
335
- msgid " show Geo Map chart for sessions"
336
  msgstr ""
337
 
338
- #: .././admin/ga_dash_settings.php:311
339
- msgid "Target Geo Map to region:"
340
  msgstr ""
341
 
342
- #: .././admin/ga_dash_settings.php:316
343
- msgid "and render top"
344
  msgstr ""
345
 
346
- #: .././admin/ga_dash_settings.php:321
347
- msgid "cities (find out more"
348
- msgstr ""
 
349
 
350
- #: .././admin/ga_dash_settings.php:339
351
- msgid " show traffic overview"
352
- msgstr "mostrar vista general del tráfico"
 
353
 
354
- #: .././admin/ga_dash_settings.php:353
355
- msgid " show top pages"
356
- msgstr "mostrar páginas principales"
357
 
358
- #: .././admin/ga_dash_settings.php:367
359
- msgid " show top referrers"
360
- msgstr "mostrar referencias principales"
 
361
 
362
- #: .././admin/ga_dash_settings.php:381
363
- msgid " show top searches"
364
- msgstr "mostrar búsquedas principales"
365
 
366
- #: .././admin/ga_dash_settings.php:430
 
367
  #, fuzzy
368
- msgid "Google Analytics Tracking Code"
369
- msgstr "Seguimiento de Google Analytics"
370
 
371
- #: .././admin/ga_dash_settings.php:440
 
 
 
 
372
  #, fuzzy
373
  msgid "Tracking Settings"
374
  msgstr "Configuración del backend"
375
 
376
- #: .././admin/ga_dash_settings.php:443
377
  msgid "Tracking Options:"
378
  msgstr ""
379
 
380
- #: .././admin/ga_dash_settings.php:447
381
  msgid "Disabled"
382
  msgstr "desactivado"
383
 
384
- #: .././admin/ga_dash_settings.php:449
385
- #, fuzzy
386
- msgid "Enabled"
387
- msgstr "desactivado"
388
-
389
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
390
  #, fuzzy
391
  msgid "Tracking ID:"
392
  msgstr "Tipo de seguimiento:"
393
 
394
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
395
  msgid "Default URL:"
396
  msgstr ""
397
 
398
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
399
  msgid "Time Zone:"
400
  msgstr ""
401
 
402
- #: .././admin/ga_dash_settings.php:467
403
  #, fuzzy
404
  msgid "Basic Tracking"
405
  msgstr "Activar seguimiento:"
406
 
407
- #: .././admin/ga_dash_settings.php:473
408
  msgid "Tracking Type:"
409
  msgstr ""
410
 
411
- #: .././admin/ga_dash_settings.php:477
412
  msgid "Classic Analytics"
413
  msgstr ""
414
 
415
- #: .././admin/ga_dash_settings.php:479
416
  msgid "Universal Analytics"
417
  msgstr ""
418
 
419
- #: .././admin/ga_dash_settings.php:493
420
  msgid " anonymize IPs while tracking"
421
  msgstr "anonimizar IPs durante el seguimiento"
422
 
423
- #: .././admin/ga_dash_settings.php:508
424
  msgid " enable remarketing, demographics and interests reports"
425
  msgstr ""
426
 
427
- #: .././admin/ga_dash_settings.php:512
428
- #, fuzzy
429
- msgid "Events Tracking"
430
- msgstr "Activar seguimiento:"
431
-
432
- #: .././admin/ga_dash_settings.php:525
433
  msgid " track downloads, mailto and outbound links"
434
  msgstr ""
435
 
436
- #: .././admin/ga_dash_settings.php:529
437
  msgid "Downloads Regex:"
438
  msgstr ""
439
 
440
- #: .././admin/ga_dash_settings.php:546
441
  msgid " track affiliate links matching this regex"
442
  msgstr ""
443
 
444
- #: .././admin/ga_dash_settings.php:550
445
  msgid "Affiliates Regex:"
446
  msgstr ""
447
 
448
- #: .././admin/ga_dash_settings.php:567
449
  msgid " track fragment identifiers, hashmarks (#) in URI links"
450
  msgstr ""
451
 
452
- #: .././admin/ga_dash_settings.php:571
453
- msgid "Custom Definitions"
454
- msgstr ""
455
-
456
- #: .././admin/ga_dash_settings.php:574
457
  msgid "Authors:"
458
  msgstr ""
459
 
460
- #: .././admin/ga_dash_settings.php:584
461
  msgid "Publication Year:"
462
  msgstr ""
463
 
464
- #: .././admin/ga_dash_settings.php:594
465
  msgid "Categories:"
466
  msgstr ""
467
 
468
- #: .././admin/ga_dash_settings.php:604
469
  msgid "User Type:"
470
  msgstr ""
471
 
472
- #: .././admin/ga_dash_settings.php:614
473
  #, fuzzy
474
  msgid "Advanced Tracking"
475
  msgstr "Activar seguimiento:"
476
 
477
- #: .././admin/ga_dash_settings.php:617
478
  #, fuzzy
479
  msgid "Page Speed SR:"
480
  msgstr "Páginas por visita:"
481
 
482
- #: .././admin/ga_dash_settings.php:635
483
  msgid " exclude events from bounce-rate calculation"
484
  msgstr ""
485
 
486
- #: .././admin/ga_dash_settings.php:649
487
  msgid " enable enhanced link attribution"
488
  msgstr ""
489
 
490
- #: .././admin/ga_dash_settings.php:663
491
  msgid " enable AdSense account linking"
492
  msgstr ""
493
 
494
- #: .././admin/ga_dash_settings.php:678
495
  msgid " enable cross domain tracking"
496
  msgstr ""
497
 
498
- #: .././admin/ga_dash_settings.php:682
499
  msgid "Cross Domains:"
500
  msgstr ""
501
 
502
- #: .././admin/ga_dash_settings.php:692 .././admin/ga_dash_settings.php:1396
503
- #, fuzzy
504
- msgid "Exclude Tracking"
505
- msgstr "Activar seguimiento:"
506
-
507
- #: .././admin/ga_dash_settings.php:695
508
  msgid "Exclude tracking for:"
509
  msgstr ""
510
 
511
- #: .././admin/ga_dash_settings.php:769 .././admin/ga_dash_settings.php:1138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
512
  msgid ""
513
  "Loading the required libraries. If this results in a blank screen or a fatal "
514
  "error, try this solution:"
515
  msgstr ""
516
 
517
- #: .././admin/ga_dash_settings.php:781 .././admin/ga_dash_settings.php:1150
518
  msgid "Plugin authorization succeeded."
519
  msgstr ""
520
 
521
- #: .././admin/ga_dash_settings.php:796 .././admin/ga_dash_settings.php:1173
522
  msgid ""
523
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
524
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
525
  msgstr ""
526
 
527
- #: .././admin/ga_dash_settings.php:822 .././admin/ga_dash_settings.php:1209
528
  msgid "Cleared Cache."
529
  msgstr "Caché borrada."
530
 
531
- #: .././admin/ga_dash_settings.php:831 .././admin/ga_dash_settings.php:1218
532
  #, fuzzy
533
  msgid "Token Reseted and Revoked."
534
  msgstr "Token reseteado."
535
 
536
- #: .././admin/ga_dash_settings.php:838 .././admin/ga_dash_settings.php:1225
537
- msgid "Dumping log data."
538
- msgstr ""
539
-
540
- #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1235
541
  msgid "All other domains/properties were removed."
542
  msgstr ""
543
 
544
- #: .././admin/ga_dash_settings.php:859 .././admin/ga_dash_settings.php:1246
545
- msgid ""
546
- "PHP CURL is required. Ask your hosting provider to install/enable PHP CURL!"
547
- msgstr ""
548
-
549
- #: .././admin/ga_dash_settings.php:863 .././admin/ga_dash_settings.php:1250
550
  msgid "Google Analytics Settings"
551
  msgstr "Configuración de Google Analytics"
552
 
553
- #: .././admin/ga_dash_settings.php:872 .././admin/ga_dash_settings.php:1258
554
- msgid ""
555
- "Something went wrong. Please check the Debugging Data section for possible "
556
- "errors"
557
- msgstr ""
558
-
559
- #: .././admin/ga_dash_settings.php:878 .././admin/ga_dash_settings.php:1263
560
  msgid "Use the red link (see below) to generate and get your access code!"
561
  msgstr ""
562
 
563
- #: .././admin/ga_dash_settings.php:889 .././admin/ga_dash_settings.php:1297
564
  #, fuzzy
565
  msgid "Plugin Authorization"
566
  msgstr "Borrar autorización"
567
 
568
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
569
  #, fuzzy
570
  msgid "You should watch the"
571
  msgstr "Deberías ver este"
572
 
573
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
574
  msgid "video"
575
  msgstr ""
576
 
577
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
578
  msgid "and read this"
579
  msgstr ""
580
 
581
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
582
  #, fuzzy
583
  msgid "tutorial"
584
  msgstr "Tutorial de configuración"
585
 
586
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
587
  msgid ""
588
  "before proceeding to authorization. This plugin requires a properly "
589
  "configured Google Analytics account"
590
  msgstr ""
591
 
592
- #: .././admin/ga_dash_settings.php:905 .././admin/ga_dash_settings.php:1312
593
  msgid " use your own API Project credentials"
594
  msgstr ""
595
 
596
- #: .././admin/ga_dash_settings.php:912 .././admin/ga_dash_settings.php:1319
597
  msgid "API Key:"
598
  msgstr "API Key:"
599
 
600
- #: .././admin/ga_dash_settings.php:919 .././admin/ga_dash_settings.php:1326
601
  msgid "Client ID:"
602
  msgstr "Client ID:"
603
 
604
- #: .././admin/ga_dash_settings.php:926 .././admin/ga_dash_settings.php:1334
605
  msgid "Client Secret:"
606
  msgstr "Client Secret:"
607
 
608
- #: .././admin/ga_dash_settings.php:944 .././admin/ga_dash_settings.php:1352
609
  msgid "Clear Authorization"
610
  msgstr "Borrar autorización"
611
 
612
- #: .././admin/ga_dash_settings.php:948 .././admin/ga_dash_settings.php:1067
613
- #: .././admin/ga_dash_settings.php:1355 .././admin/ga_dash_settings.php:1469
614
  msgid "Clear Cache"
615
  msgstr "Borrar caché"
616
 
617
- #: .././admin/ga_dash_settings.php:957
618
  msgid "Select Domain:"
619
  msgstr ""
620
 
621
- #: .././admin/ga_dash_settings.php:970 .././admin/ga_dash_settings.php:1387
622
  msgid "Property not found"
623
  msgstr ""
624
 
625
- #: .././admin/ga_dash_settings.php:975
626
  msgid "and/or hide all other domains"
627
  msgstr ""
628
 
629
- #: .././admin/ga_dash_settings.php:978
630
  msgid "Hide Now"
631
  msgstr ""
632
 
633
- #: .././admin/ga_dash_settings.php:997
634
  msgid "Theme Color:"
635
  msgstr ""
636
 
637
- #: .././admin/ga_dash_settings.php:1007
638
  msgid "A new frontend widget is available! To enable it, go to"
639
  msgstr ""
640
 
641
- #: .././admin/ga_dash_settings.php:1007
642
  msgid "Appearance -> Widgets"
643
  msgstr ""
644
 
645
- #: .././admin/ga_dash_settings.php:1007
646
  msgid "and look for Google Analytics Dashboard."
647
  msgstr "y busca escritorio de Google Analytics."
648
 
649
- #: .././admin/ga_dash_settings.php:1013 .././admin/ga_dash_settings.php:1073
650
- #: .././admin/ga_dash_settings.php:1416 .././admin/ga_dash_settings.php:1475
651
- msgid "Debugging Data"
652
- msgstr ""
653
-
654
- #: .././admin/ga_dash_settings.php:1180
655
  msgid "Properties refreshed."
656
  msgstr ""
657
 
658
- #: .././admin/ga_dash_settings.php:1274
659
  msgid "Network Setup"
660
  msgstr ""
661
 
662
- #: .././admin/ga_dash_settings.php:1289
663
  msgid " use a single Google Analytics account for the entire network"
664
  msgstr ""
665
 
666
- #: .././admin/ga_dash_settings.php:1358
667
  msgid "Refresh Properties"
668
  msgstr ""
669
 
670
- #: .././admin/ga_dash_settings.php:1364
671
  #, fuzzy
672
  msgid "Properties/Views Settings"
673
  msgstr "Configuración del frontend"
674
 
675
- #: .././admin/ga_dash_settings.php:1409
676
  msgid " exclude Super Admin tracking for the entire network"
677
  msgstr ""
678
 
679
- #: .././admin/ga_dash_settings.php:1537
680
  #, fuzzy
681
  msgid "Setup Tutorial & Demo"
682
  msgstr "Tutorial de configuración"
683
 
684
- #: .././admin/ga_dash_settings.php:1549
685
  #, fuzzy
686
  msgid "Support & Reviews"
687
  msgstr "Enlaces de soporte"
688
 
689
- #: .././admin/ga_dash_settings.php:1557
690
  msgid "Plugin documentation and support on"
691
  msgstr ""
692
 
693
- #: .././admin/ga_dash_settings.php:1564
694
  msgid "Your feedback and review are both important,"
695
  msgstr ""
696
 
697
- #: .././admin/ga_dash_settings.php:1564
698
  msgid "rate this plugin"
699
  msgstr ""
700
 
701
- #: .././admin/ga_dash_settings.php:1569
702
  msgid "Further Reading"
703
  msgstr ""
704
 
705
- #: .././admin/ga_dash_settings.php:1576
706
  msgid "Improve search rankings"
707
  msgstr ""
708
 
709
- #: .././admin/ga_dash_settings.php:1576
710
  msgid "by moving your website to HTTPS/SSL."
711
  msgstr ""
712
 
713
- #: .././admin/ga_dash_settings.php:1582
714
  msgid "Other"
715
  msgstr ""
716
 
717
- #: .././admin/ga_dash_settings.php:1582
718
  msgid "WordPress Plugins"
719
  msgstr ""
720
 
721
- #: .././admin/ga_dash_settings.php:1582
722
  msgid "written by the same author"
723
  msgstr ""
724
 
725
- #: .././admin/ga_dash_settings.php:1587
726
  msgid "Other Services"
727
  msgstr ""
728
 
729
- #: .././admin/ga_dash_settings.php:1594
730
  msgid "Speed up your website and plug into a whole"
731
  msgstr ""
732
 
733
- #: .././admin/ga_dash_settings.php:1594
734
  msgid "new level of site speed"
735
  msgstr ""
736
 
737
- #: .././admin/ga_dash_settings.php:1600
738
  msgid "Web Analytics"
739
  msgstr "Analíticas web"
740
 
741
- #: .././admin/ga_dash_settings.php:1600
742
  msgid "service with users tracking at IP level."
743
  msgstr ""
744
 
745
- #: .././front/frontend.php:112
746
  msgid "Views vs UniqueViews"
747
  msgstr "Visitas vs visitas únicas"
748
 
749
- #: .././front/frontend.php:168
750
  msgid "Google Analytics Reports"
751
  msgstr ""
752
 
753
- #: .././front/widgets.php:16
754
  msgid "Will display your google analytics stats in a widget"
755
  msgstr ""
756
 
757
- #: .././front/widgets.php:44 .././tools/gapi.php:808
758
  msgid "trend"
759
  msgstr ""
760
 
761
- #: .././front/widgets.php:144
762
  msgid "Period:"
763
  msgstr ""
764
 
765
- #: .././front/widgets.php:144
766
  msgid "Sessions:"
767
  msgstr ""
768
 
769
- #: .././front/widgets.php:150
770
  msgid "generated by"
771
  msgstr ""
772
 
773
- #: .././front/widgets.php:164
774
  msgid "Google Analytics Stats"
775
  msgstr "Estadísticas de Google Analytics"
776
 
777
- #: .././front/widgets.php:171
778
  msgid "Title:"
779
  msgstr ""
780
 
781
- #: .././front/widgets.php:178
782
  msgid "Display:"
783
  msgstr ""
784
 
785
- #: .././front/widgets.php:182
786
  msgid "Chart & Totals"
787
  msgstr ""
788
 
789
- #: .././front/widgets.php:183
790
  msgid "Chart"
791
  msgstr ""
792
 
793
- #: .././front/widgets.php:184
794
  msgid "Totals"
795
  msgstr ""
796
 
797
- #: .././front/widgets.php:188
798
- msgid "Anonimize chart&#39;s stats:"
799
  msgstr ""
800
 
801
- #: .././front/widgets.php:195
802
  msgid "Stats for:"
803
  msgstr ""
804
 
805
- #: .././front/widgets.php:205
806
  msgid "Give credits:"
807
  msgstr ""
808
 
809
- #: .././tools/gapi.php:140
810
  msgid "Use this link to get your access code:"
811
  msgstr ""
812
 
813
- #: .././tools/gapi.php:140
814
  msgid "Get Access Code"
815
  msgstr ""
816
 
817
- #: .././tools/gapi.php:145 .././tools/gapi.php:149
818
  msgid "Use the red link to get your access code!"
819
  msgstr ""
820
 
821
- #: .././tools/gapi.php:145
822
  msgid "Access Code:"
823
  msgstr "Código de acceso:"
824
 
825
- #: .././tools/gapi.php:157
826
  msgid "Save Access Code"
827
  msgstr ""
828
 
829
- #: .././tools/gapi.php:380
830
  msgid "Organic Searches"
831
  msgstr "Búsquedas orgánicas"
832
 
833
- #: .././tools/gapi.php:391
834
  msgid "Hour"
835
  msgstr "Hora"
836
 
837
- #: .././tools/gapi.php:394 .././tools/gapi.php:808 .././tools/gapi.php:852
838
  msgid "Date"
839
  msgstr "Fecha"
840
 
841
- #: .././tools/gapi.php:500 .././tools/gapi.php:852
842
  msgid "Views"
843
  msgstr "Vistas"
844
 
845
- #: .././tools/gapi.php:611
846
  msgid "Countries"
847
  msgstr ""
848
 
849
- #: .././tools/gapi.php:629
850
  msgid "Cities from"
851
  msgstr ""
852
 
853
- #: .././tools/gapi.php:691
854
  msgid "Channels"
855
  msgstr ""
856
 
857
- #: .././tools/gapi.php:754
858
  msgid "Type"
859
  msgstr "Tipo"
860
 
861
- #: .././tools/gapi.php:852
862
  msgid "UniqueViews"
863
  msgstr "Visitas únicas"
864
 
865
- #: .././tools/gapi.php:899
866
- msgid "Top Searches"
867
- msgstr "Búsquedas principales"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
868
 
869
  #~ msgid "Visits"
870
  #~ msgstr "Visitas"
@@ -1075,9 +1119,6 @@ msgstr "Búsquedas principales"
1075
  #~ msgid "Default Tracking Domain: "
1076
  #~ msgstr "Dominio predeterminado de seguimiento:"
1077
 
1078
- #~ msgid "None"
1079
- #~ msgstr "Ninguno"
1080
-
1081
  #~ msgid "Client ID, Client Secret or API Key is missing"
1082
  #~ msgstr "Falta Client ID, Client Secret o API Key"
1083
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
+ "POT-Creation-Date: 2015-02-07 11:40+0200\n"
5
+ "PO-Revision-Date: 2015-02-07 11:40+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: \n"
8
  "Language: es_ES\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.7.4\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "X-Poedit-SearchPath-0: ../.\n"
17
 
18
+ #: .././admin/dashboard_widgets.php:67 .././admin/dashboard_widgets.php:100
19
  msgid "Google Analytics"
20
  msgstr "Google Analytics"
21
 
22
+ #: .././admin/dashboard_widgets.php:71 .././admin/dashboard_widgets.php:104
23
+ #: .././admin/ga_dash_settings.php:105 .././admin/ga_dash_settings.php:216
24
+ #: .././admin/ga_dash_settings.php:964
25
  msgid "General Settings"
26
  msgstr "Configuración general"
27
 
28
+ #: .././admin/dashboard_widgets.php:75
29
  msgid "Backend Settings"
30
  msgstr "Configuración del backend"
31
 
32
+ #: .././admin/dashboard_widgets.php:79
33
  msgid "Frontend Settings"
34
  msgstr "Configuración del frontend"
35
 
36
+ #: .././admin/dashboard_widgets.php:83
37
  #, fuzzy
38
  msgid "Tracking Code"
39
  msgstr "Tipo de seguimiento:"
40
 
41
+ #: .././admin/dashboard_widgets.php:87 .././admin/dashboard_widgets.php:108
42
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
43
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
44
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
45
+ msgid "Errors & Debug"
46
+ msgstr ""
47
+
48
+ #: .././admin/dashboard_widgets.php:152
49
  msgid "Settings"
50
  msgstr "Ajustes"
51
 
52
+ #: .././admin/dashboard_widgets.php:166 .././front/widgets.php:14
53
  msgid "Google Analytics Dashboard"
54
  msgstr "Escritorio de Google Analytics"
55
 
56
+ #: .././admin/dashboard_widgets.php:183
57
  msgid "This plugin needs an authorization:"
58
  msgstr ""
59
 
60
+ #: .././admin/dashboard_widgets.php:183 .././admin/ga_dash_settings.php:1035
61
+ #: .././admin/ga_dash_settings.php:1360
62
  #, fuzzy
63
  msgid "Authorize Plugin"
64
  msgstr "Autorizar aplicación"
65
 
66
+ #: .././admin/dashboard_widgets.php:216 .././admin/ga_dash_settings.php:380
67
+ #: .././admin/ga_dash_settings.php:976 .././admin/ga_dash_settings.php:1001
68
+ #: .././admin/ga_dash_settings.php:1315
69
  msgid "View Name:"
70
  msgstr ""
71
 
72
+ #: .././admin/dashboard_widgets.php:221
73
  msgid "Something went wrong while retrieving profiles list."
74
  msgstr ""
75
 
76
+ #: .././admin/dashboard_widgets.php:221
77
  msgid "More details"
78
  msgstr ""
79
 
80
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
81
  #, fuzzy
82
  msgid "An admin should asign a default Google Analytics Profile."
83
  msgstr "Pide a un administrador que asigne un perfil de Google Analytics"
84
 
85
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
86
  #, fuzzy
87
  msgid "Select Domain"
88
  msgstr "un solo dominio"
89
 
90
+ #: .././admin/dashboard_widgets.php:250
91
  msgid ""
92
  "Something went wrong while retrieving property data. You need to create and "
93
  "properly configure a Google Analytics account:"
94
  msgstr ""
95
 
96
+ #: .././admin/dashboard_widgets.php:250
97
  msgid "Find out more!"
98
  msgstr ""
99
 
100
+ #: .././admin/dashboard_widgets.php:278
101
  msgid "Real-Time"
102
  msgstr "Tiempo real"
103
 
104
+ #: .././admin/dashboard_widgets.php:279
105
  msgid "Today"
106
  msgstr "Hoy"
107
 
108
+ #: .././admin/dashboard_widgets.php:281
109
  msgid "Yesterday"
110
  msgstr "Ayer"
111
 
112
+ #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:72
113
+ #: .././front/widgets.php:182
114
  msgid "Last 7 Days"
115
  msgstr "Últimos 7 días "
116
 
117
+ #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:75
118
+ #: .././front/widgets.php:183
119
  msgid "Last 14 Days"
120
  msgstr "Últimos 14 días"
121
 
122
+ #: .././admin/dashboard_widgets.php:287 .././front/widgets.php:78
123
+ #: .././front/widgets.php:184
124
  msgid "Last 30 Days"
125
  msgstr "Últimos 30 días"
126
 
127
+ #: .././admin/dashboard_widgets.php:289
128
  msgid "Last 90 Days"
129
  msgstr "Últimos 90 días"
130
 
131
+ #: .././admin/dashboard_widgets.php:295 .././admin/dashboard_widgets.php:1037
132
+ #: .././front/widgets.php:40 .././tools/gapi.php:376 .././tools/gapi.php:515
133
+ #: .././tools/gapi.php:554 .././tools/gapi.php:615 .././tools/gapi.php:744
134
+ #: .././tools/gapi.php:825
135
  msgid "Sessions"
136
  msgstr ""
137
 
138
+ #: .././admin/dashboard_widgets.php:296 .././admin/dashboard_widgets.php:1041
139
+ #: .././tools/gapi.php:364
140
  msgid "Users"
141
  msgstr ""
142
 
143
+ #: .././admin/dashboard_widgets.php:298
144
  msgid "Organic"
145
  msgstr "Búsquedas orgánicas"
146
 
147
+ #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:1045
148
+ #: .././tools/gapi.php:367
149
  msgid "Page Views"
150
  msgstr "Páginas vistas"
151
 
152
+ #: .././admin/dashboard_widgets.php:302 .././admin/dashboard_widgets.php:1049
153
+ #: .././tools/gapi.php:370
154
  msgid "Bounce Rate"
155
  msgstr "Porcenaje de rebote"
156
 
157
+ #: .././admin/dashboard_widgets.php:304
158
  msgid "Location"
159
  msgstr ""
160
 
161
+ #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:477
162
  msgid "Pages"
163
  msgstr ""
164
 
165
+ #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:515
166
  msgid "Referrers"
167
  msgstr ""
168
 
169
+ #: .././admin/dashboard_widgets.php:310 .././tools/gapi.php:554
170
+ #: .././tools/gapi.php:825
171
  msgid "Searches"
172
  msgstr ""
173
 
174
+ #: .././admin/dashboard_widgets.php:312
175
  msgid "Traffic Details"
176
  msgstr ""
177
 
178
+ #: .././admin/dashboard_widgets.php:404 .././admin/dashboard_widgets.php:645
179
  msgid "REFERRAL"
180
  msgstr "REFERENCIA"
181
 
182
+ #: .././admin/dashboard_widgets.php:408 .././admin/dashboard_widgets.php:646
183
  msgid "ORGANIC"
184
  msgstr "ORGÁNICO"
185
 
186
+ #: .././admin/dashboard_widgets.php:412 .././admin/dashboard_widgets.php:532
187
+ #: .././admin/dashboard_widgets.php:647
188
  msgid "SOCIAL"
189
  msgstr "SOCIAL"
190
 
191
+ #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:535
192
+ #: .././admin/dashboard_widgets.php:648
193
  msgid "CAMPAIGN"
194
  msgstr ""
195
 
196
+ #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:538
197
+ #: .././admin/dashboard_widgets.php:651
198
  msgid "DIRECT"
199
  msgstr "DIRECTO"
200
 
201
+ #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:652
202
  msgid "NEW"
203
  msgstr "NUEVO"
204
 
205
+ #: .././admin/dashboard_widgets.php:526
206
  msgid "REFERRALS"
207
  msgstr ""
208
 
209
+ #: .././admin/dashboard_widgets.php:529
210
  msgid "KEYWORDS"
211
  msgstr ""
212
 
213
+ #: .././admin/dashboard_widgets.php:683 .././admin/dashboard_widgets.php:780
214
+ #: .././admin/dashboard_widgets.php:972 .././admin/dashboard_widgets.php:1083
215
+ #: .././front/frontend.php:88
216
+ msgid "A JavaScript Error is blocking plugin resources!"
217
+ msgstr ""
218
+
219
+ #: .././admin/dashboard_widgets.php:696 .././admin/dashboard_widgets.php:715
220
+ #: .././admin/dashboard_widgets.php:793 .././admin/dashboard_widgets.php:824
221
+ #: .././admin/dashboard_widgets.php:843 .././admin/dashboard_widgets.php:863
222
+ #: .././admin/dashboard_widgets.php:986 .././admin/dashboard_widgets.php:1096
223
+ #: .././admin/dashboard_widgets.php:1115 .././front/frontend.php:100
224
+ #: .././front/frontend.php:119
225
+ msgid "Invalid response, more details in JavaScript Console (F12)."
226
+ msgstr ""
227
+
228
+ #: .././admin/dashboard_widgets.php:701 .././admin/dashboard_widgets.php:720
229
+ #: .././admin/dashboard_widgets.php:798 .././admin/dashboard_widgets.php:810
230
+ #: .././admin/dashboard_widgets.php:829 .././admin/dashboard_widgets.php:848
231
+ #: .././admin/dashboard_widgets.php:868 .././admin/dashboard_widgets.php:991
232
+ #: .././admin/dashboard_widgets.php:994 .././admin/dashboard_widgets.php:1101
233
+ #: .././admin/dashboard_widgets.php:1120 .././front/frontend.php:105
234
+ #: .././front/frontend.php:124 .././front/widgets.php:110
235
  msgid "This report is unavailable"
236
  msgstr ""
237
 
238
+ #: .././admin/dashboard_widgets.php:880
239
  msgid "Traffic Mediums"
240
  msgstr ""
241
 
242
+ #: .././admin/dashboard_widgets.php:896
243
  msgid "Visitor Type"
244
  msgstr ""
245
 
246
+ #: .././admin/dashboard_widgets.php:912
247
  msgid "Social Networks"
248
  msgstr ""
249
 
250
+ #: .././admin/dashboard_widgets.php:928
251
  msgid "Search Engines"
252
  msgstr ""
253
 
254
+ #: .././admin/dashboard_widgets.php:1053
255
  msgid "Organic Search"
256
  msgstr ""
257
 
258
+ #: .././admin/dashboard_widgets.php:1057
259
  msgid "Pages/Session"
260
  msgstr ""
261
 
262
+ #: .././admin/ga_dash_settings.php:83 .././admin/ga_dash_settings.php:194
263
+ #: .././admin/ga_dash_settings.php:327 .././admin/ga_dash_settings.php:855
264
+ #: .././admin/ga_dash_settings.php:1157
265
  msgid "Settings saved."
266
  msgstr ""
267
 
268
+ #: .././admin/ga_dash_settings.php:85 .././admin/ga_dash_settings.php:196
269
+ #: .././admin/ga_dash_settings.php:329 .././admin/ga_dash_settings.php:841
270
+ #: .././admin/ga_dash_settings.php:851 .././admin/ga_dash_settings.php:857
271
+ #: .././admin/ga_dash_settings.php:869 .././admin/ga_dash_settings.php:1118
272
+ #: .././admin/ga_dash_settings.php:1143 .././admin/ga_dash_settings.php:1153
273
+ #: .././admin/ga_dash_settings.php:1159 .././admin/ga_dash_settings.php:1171
274
  msgid "Cheating Huh?"
275
  msgstr ""
276
 
277
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
278
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
279
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
280
+ msgid "Something went wrong, check"
281
  msgstr ""
282
 
283
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
284
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
285
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
286
+ msgid "or"
 
 
 
 
287
  msgstr ""
288
 
289
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
290
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
291
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
292
+ msgid "auhorize the plugin"
293
+ msgstr "autorizar aplicación"
294
 
295
+ #: .././admin/ga_dash_settings.php:95
296
  msgid "Google Analytics Frontend Settings"
297
  msgstr "Configuración del frontend de Google Analytics"
298
 
299
+ #: .././admin/ga_dash_settings.php:108 .././admin/ga_dash_settings.php:219
300
  msgid "Show stats to:"
301
  msgstr ""
302
 
303
+ #: .././admin/ga_dash_settings.php:152
304
  msgid " show page sessions and users in frontend (after each article)"
305
  msgstr ""
306
 
307
+ #: .././admin/ga_dash_settings.php:168
308
  #, fuzzy
309
  msgid " show page searches (after each article)"
310
  msgstr ""
311
  "mostrar las visitas de página y las busquedas principales en el frontend "
312
  "(después de cada artículo)"
313
 
314
+ #: .././admin/ga_dash_settings.php:177 .././admin/ga_dash_settings.php:305
315
+ #: .././admin/ga_dash_settings.php:666 .././admin/ga_dash_settings.php:1025
316
+ #: .././admin/ga_dash_settings.php:1351
317
  msgid "Save Changes"
318
  msgstr ""
319
 
320
+ #: .././admin/ga_dash_settings.php:206
321
  msgid "Google Analytics Dashboard Settings"
322
  msgstr "Configuración del escritorio de Google Analytics"
323
 
324
+ #: .././admin/ga_dash_settings.php:264
325
  #, fuzzy
326
  msgid "disable Switch Profile/View functionality"
327
  msgstr " desactivar la funcionalidad de cambio de perfil en el escritorio"
328
 
329
+ #: .././admin/ga_dash_settings.php:268
330
  #, fuzzy
331
  msgid "Real-Time Settings"
332
  msgstr "Configuración de la caché"
333
 
334
+ #: .././admin/ga_dash_settings.php:271
335
  msgid "Maximum number of pages to display on real-time tab:"
336
  msgstr ""
337
 
338
+ #: .././admin/ga_dash_settings.php:276 .././admin/ga_dash_settings.php:292
339
+ msgid "find out more"
340
  msgstr ""
341
 
342
+ #: .././admin/ga_dash_settings.php:278 .././admin/ga_dash_settings.php:295
343
  msgid "about this feature"
344
  msgstr ""
345
 
346
+ #: .././admin/ga_dash_settings.php:283
347
+ msgid "Location Settings"
348
  msgstr ""
349
 
350
+ #: .././admin/ga_dash_settings.php:287
351
+ msgid "Target Geo Map to country:"
352
  msgstr ""
353
 
354
+ #: .././admin/ga_dash_settings.php:336
355
+ msgid "The tracking component is disabled. You should set"
356
  msgstr ""
357
 
358
+ #: .././admin/ga_dash_settings.php:336
359
+ msgid "Tracking Options"
360
  msgstr ""
361
 
362
+ #: .././admin/ga_dash_settings.php:336
363
+ msgid "to"
364
  msgstr ""
365
 
366
+ #: .././admin/ga_dash_settings.php:336 .././admin/ga_dash_settings.php:372
367
+ #, fuzzy
368
+ msgid "Enabled"
369
+ msgstr "desactivado"
370
 
371
+ #: .././admin/ga_dash_settings.php:342
372
+ #, fuzzy
373
+ msgid "Google Analytics Tracking Code"
374
+ msgstr "Seguimiento de Google Analytics"
375
 
376
+ #: .././admin/ga_dash_settings.php:351
377
+ msgid "Basic Settings"
378
+ msgstr ""
379
 
380
+ #: .././admin/ga_dash_settings.php:352 .././admin/ga_dash_settings.php:431
381
+ #, fuzzy
382
+ msgid "Events Tracking"
383
+ msgstr "Activar seguimiento:"
384
 
385
+ #: .././admin/ga_dash_settings.php:353 .././admin/ga_dash_settings.php:495
386
+ msgid "Custom Definitions"
387
+ msgstr ""
388
 
389
+ #: .././admin/ga_dash_settings.php:354 .././admin/ga_dash_settings.php:623
390
+ #: .././admin/ga_dash_settings.php:1328
391
  #, fuzzy
392
+ msgid "Exclude Tracking"
393
+ msgstr "Activar seguimiento:"
394
 
395
+ #: .././admin/ga_dash_settings.php:355
396
+ msgid "Advanced Settings"
397
+ msgstr ""
398
+
399
+ #: .././admin/ga_dash_settings.php:363
400
  #, fuzzy
401
  msgid "Tracking Settings"
402
  msgstr "Configuración del backend"
403
 
404
+ #: .././admin/ga_dash_settings.php:366
405
  msgid "Tracking Options:"
406
  msgstr ""
407
 
408
+ #: .././admin/ga_dash_settings.php:370
409
  msgid "Disabled"
410
  msgstr "desactivado"
411
 
412
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
 
 
 
 
 
413
  #, fuzzy
414
  msgid "Tracking ID:"
415
  msgstr "Tipo de seguimiento:"
416
 
417
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
418
  msgid "Default URL:"
419
  msgstr ""
420
 
421
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
422
  msgid "Time Zone:"
423
  msgstr ""
424
 
425
+ #: .././admin/ga_dash_settings.php:385
426
  #, fuzzy
427
  msgid "Basic Tracking"
428
  msgstr "Activar seguimiento:"
429
 
430
+ #: .././admin/ga_dash_settings.php:388
431
  msgid "Tracking Type:"
432
  msgstr ""
433
 
434
+ #: .././admin/ga_dash_settings.php:392
435
  msgid "Classic Analytics"
436
  msgstr ""
437
 
438
+ #: .././admin/ga_dash_settings.php:394
439
  msgid "Universal Analytics"
440
  msgstr ""
441
 
442
+ #: .././admin/ga_dash_settings.php:408
443
  msgid " anonymize IPs while tracking"
444
  msgstr "anonimizar IPs durante el seguimiento"
445
 
446
+ #: .././admin/ga_dash_settings.php:423
447
  msgid " enable remarketing, demographics and interests reports"
448
  msgstr ""
449
 
450
+ #: .././admin/ga_dash_settings.php:445
 
 
 
 
 
451
  msgid " track downloads, mailto and outbound links"
452
  msgstr ""
453
 
454
+ #: .././admin/ga_dash_settings.php:449
455
  msgid "Downloads Regex:"
456
  msgstr ""
457
 
458
+ #: .././admin/ga_dash_settings.php:466
459
  msgid " track affiliate links matching this regex"
460
  msgstr ""
461
 
462
+ #: .././admin/ga_dash_settings.php:470
463
  msgid "Affiliates Regex:"
464
  msgstr ""
465
 
466
+ #: .././admin/ga_dash_settings.php:487
467
  msgid " track fragment identifiers, hashmarks (#) in URI links"
468
  msgstr ""
469
 
470
+ #: .././admin/ga_dash_settings.php:498
 
 
 
 
471
  msgid "Authors:"
472
  msgstr ""
473
 
474
+ #: .././admin/ga_dash_settings.php:508
475
  msgid "Publication Year:"
476
  msgstr ""
477
 
478
+ #: .././admin/ga_dash_settings.php:518
479
  msgid "Categories:"
480
  msgstr ""
481
 
482
+ #: .././admin/ga_dash_settings.php:528
483
  msgid "User Type:"
484
  msgstr ""
485
 
486
+ #: .././admin/ga_dash_settings.php:542
487
  #, fuzzy
488
  msgid "Advanced Tracking"
489
  msgstr "Activar seguimiento:"
490
 
491
+ #: .././admin/ga_dash_settings.php:545
492
  #, fuzzy
493
  msgid "Page Speed SR:"
494
  msgstr "Páginas por visita:"
495
 
496
+ #: .././admin/ga_dash_settings.php:563
497
  msgid " exclude events from bounce-rate calculation"
498
  msgstr ""
499
 
500
+ #: .././admin/ga_dash_settings.php:578
501
  msgid " enable enhanced link attribution"
502
  msgstr ""
503
 
504
+ #: .././admin/ga_dash_settings.php:592
505
  msgid " enable AdSense account linking"
506
  msgstr ""
507
 
508
+ #: .././admin/ga_dash_settings.php:608
509
  msgid " enable cross domain tracking"
510
  msgstr ""
511
 
512
+ #: .././admin/ga_dash_settings.php:612
513
  msgid "Cross Domains:"
514
  msgstr ""
515
 
516
+ #: .././admin/ga_dash_settings.php:626
 
 
 
 
 
517
  msgid "Exclude tracking for:"
518
  msgstr ""
519
 
520
+ #: .././admin/ga_dash_settings.php:687
521
+ msgid "Google Analytics Errors & Debugging"
522
+ msgstr ""
523
+
524
+ #: .././admin/ga_dash_settings.php:697
525
+ msgid "Errors & Details"
526
+ msgstr ""
527
+
528
+ #: .././admin/ga_dash_settings.php:698
529
+ msgid "Plugin Settings"
530
+ msgstr ""
531
+
532
+ #: .././admin/ga_dash_settings.php:706
533
+ msgid "For errors and/or other issues please check"
534
+ msgstr ""
535
+
536
+ #: .././admin/ga_dash_settings.php:706
537
+ msgid "the plugin documentation page"
538
+ msgstr ""
539
+
540
+ #: .././admin/ga_dash_settings.php:706
541
+ msgid "and related tutorials"
542
+ msgstr ""
543
+
544
+ #: .././admin/ga_dash_settings.php:710
545
+ msgid "Last Error detected"
546
+ msgstr ""
547
+
548
+ #: .././admin/ga_dash_settings.php:715 .././admin/ga_dash_settings.php:728
549
+ msgid "None"
550
+ msgstr "Ninguno"
551
+
552
+ #: .././admin/ga_dash_settings.php:722
553
+ msgid "Error Details"
554
+ msgstr ""
555
+
556
+ #: .././admin/ga_dash_settings.php:740
557
+ msgid "Plugin Configuration"
558
+ msgstr ""
559
+
560
+ #: .././admin/ga_dash_settings.php:788 .././admin/ga_dash_settings.php:1072
561
  msgid ""
562
  "Loading the required libraries. If this results in a blank screen or a fatal "
563
  "error, try this solution:"
564
  msgstr ""
565
 
566
+ #: .././admin/ga_dash_settings.php:800 .././admin/ga_dash_settings.php:1084
567
  msgid "Plugin authorization succeeded."
568
  msgstr ""
569
 
570
+ #: .././admin/ga_dash_settings.php:816 .././admin/ga_dash_settings.php:1109
571
  msgid ""
572
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
573
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
574
  msgstr ""
575
 
576
+ #: .././admin/ga_dash_settings.php:839 .././admin/ga_dash_settings.php:1141
577
  msgid "Cleared Cache."
578
  msgstr "Caché borrada."
579
 
580
+ #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1150
581
  #, fuzzy
582
  msgid "Token Reseted and Revoked."
583
  msgstr "Token reseteado."
584
 
585
+ #: .././admin/ga_dash_settings.php:862 .././admin/ga_dash_settings.php:1164
 
 
 
 
586
  msgid "All other domains/properties were removed."
587
  msgstr ""
588
 
589
+ #: .././admin/ga_dash_settings.php:874 .././admin/ga_dash_settings.php:1176
 
 
 
 
 
590
  msgid "Google Analytics Settings"
591
  msgstr "Configuración de Google Analytics"
592
 
593
+ #: .././admin/ga_dash_settings.php:887 .././admin/ga_dash_settings.php:1189
 
 
 
 
 
 
594
  msgid "Use the red link (see below) to generate and get your access code!"
595
  msgstr ""
596
 
597
+ #: .././admin/ga_dash_settings.php:898 .././admin/ga_dash_settings.php:1224
598
  #, fuzzy
599
  msgid "Plugin Authorization"
600
  msgstr "Borrar autorización"
601
 
602
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
603
  #, fuzzy
604
  msgid "You should watch the"
605
  msgstr "Deberías ver este"
606
 
607
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
608
  msgid "video"
609
  msgstr ""
610
 
611
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
612
  msgid "and read this"
613
  msgstr ""
614
 
615
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
616
  #, fuzzy
617
  msgid "tutorial"
618
  msgstr "Tutorial de configuración"
619
 
620
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
621
  msgid ""
622
  "before proceeding to authorization. This plugin requires a properly "
623
  "configured Google Analytics account"
624
  msgstr ""
625
 
626
+ #: .././admin/ga_dash_settings.php:914 .././admin/ga_dash_settings.php:1239
627
  msgid " use your own API Project credentials"
628
  msgstr ""
629
 
630
+ #: .././admin/ga_dash_settings.php:921 .././admin/ga_dash_settings.php:1246
631
  msgid "API Key:"
632
  msgstr "API Key:"
633
 
634
+ #: .././admin/ga_dash_settings.php:928 .././admin/ga_dash_settings.php:1254
635
  msgid "Client ID:"
636
  msgstr "Client ID:"
637
 
638
+ #: .././admin/ga_dash_settings.php:936 .././admin/ga_dash_settings.php:1263
639
  msgid "Client Secret:"
640
  msgstr "Client Secret:"
641
 
642
+ #: .././admin/ga_dash_settings.php:954 .././admin/ga_dash_settings.php:1282
643
  msgid "Clear Authorization"
644
  msgstr "Borrar autorización"
645
 
646
+ #: .././admin/ga_dash_settings.php:958 .././admin/ga_dash_settings.php:1039
647
+ #: .././admin/ga_dash_settings.php:1285 .././admin/ga_dash_settings.php:1363
648
  msgid "Clear Cache"
649
  msgstr "Borrar caché"
650
 
651
+ #: .././admin/ga_dash_settings.php:967
652
  msgid "Select Domain:"
653
  msgstr ""
654
 
655
+ #: .././admin/ga_dash_settings.php:980 .././admin/ga_dash_settings.php:1319
656
  msgid "Property not found"
657
  msgstr ""
658
 
659
+ #: .././admin/ga_dash_settings.php:985
660
  msgid "and/or hide all other domains"
661
  msgstr ""
662
 
663
+ #: .././admin/ga_dash_settings.php:988
664
  msgid "Hide Now"
665
  msgstr ""
666
 
667
+ #: .././admin/ga_dash_settings.php:1007
668
  msgid "Theme Color:"
669
  msgstr ""
670
 
671
+ #: .././admin/ga_dash_settings.php:1017
672
  msgid "A new frontend widget is available! To enable it, go to"
673
  msgstr ""
674
 
675
+ #: .././admin/ga_dash_settings.php:1017
676
  msgid "Appearance -> Widgets"
677
  msgstr ""
678
 
679
+ #: .././admin/ga_dash_settings.php:1017
680
  msgid "and look for Google Analytics Dashboard."
681
  msgstr "y busca escritorio de Google Analytics."
682
 
683
+ #: .././admin/ga_dash_settings.php:1115
 
 
 
 
 
684
  msgid "Properties refreshed."
685
  msgstr ""
686
 
687
+ #: .././admin/ga_dash_settings.php:1201
688
  msgid "Network Setup"
689
  msgstr ""
690
 
691
+ #: .././admin/ga_dash_settings.php:1216
692
  msgid " use a single Google Analytics account for the entire network"
693
  msgstr ""
694
 
695
+ #: .././admin/ga_dash_settings.php:1288
696
  msgid "Refresh Properties"
697
  msgstr ""
698
 
699
+ #: .././admin/ga_dash_settings.php:1294
700
  #, fuzzy
701
  msgid "Properties/Views Settings"
702
  msgstr "Configuración del frontend"
703
 
704
+ #: .././admin/ga_dash_settings.php:1342
705
  msgid " exclude Super Admin tracking for the entire network"
706
  msgstr ""
707
 
708
+ #: .././admin/ga_dash_settings.php:1394
709
  #, fuzzy
710
  msgid "Setup Tutorial & Demo"
711
  msgstr "Tutorial de configuración"
712
 
713
+ #: .././admin/ga_dash_settings.php:1406
714
  #, fuzzy
715
  msgid "Support & Reviews"
716
  msgstr "Enlaces de soporte"
717
 
718
+ #: .././admin/ga_dash_settings.php:1414
719
  msgid "Plugin documentation and support on"
720
  msgstr ""
721
 
722
+ #: .././admin/ga_dash_settings.php:1421
723
  msgid "Your feedback and review are both important,"
724
  msgstr ""
725
 
726
+ #: .././admin/ga_dash_settings.php:1421
727
  msgid "rate this plugin"
728
  msgstr ""
729
 
730
+ #: .././admin/ga_dash_settings.php:1426
731
  msgid "Further Reading"
732
  msgstr ""
733
 
734
+ #: .././admin/ga_dash_settings.php:1434
735
  msgid "Improve search rankings"
736
  msgstr ""
737
 
738
+ #: .././admin/ga_dash_settings.php:1434
739
  msgid "by moving your website to HTTPS/SSL."
740
  msgstr ""
741
 
742
+ #: .././admin/ga_dash_settings.php:1441
743
  msgid "Other"
744
  msgstr ""
745
 
746
+ #: .././admin/ga_dash_settings.php:1441
747
  msgid "WordPress Plugins"
748
  msgstr ""
749
 
750
+ #: .././admin/ga_dash_settings.php:1441
751
  msgid "written by the same author"
752
  msgstr ""
753
 
754
+ #: .././admin/ga_dash_settings.php:1446
755
  msgid "Other Services"
756
  msgstr ""
757
 
758
+ #: .././admin/ga_dash_settings.php:1453
759
  msgid "Speed up your website and plug into a whole"
760
  msgstr ""
761
 
762
+ #: .././admin/ga_dash_settings.php:1453
763
  msgid "new level of site speed"
764
  msgstr ""
765
 
766
+ #: .././admin/ga_dash_settings.php:1460
767
  msgid "Web Analytics"
768
  msgstr "Analíticas web"
769
 
770
+ #: .././admin/ga_dash_settings.php:1460
771
  msgid "service with users tracking at IP level."
772
  msgstr ""
773
 
774
+ #: .././front/frontend.php:134
775
  msgid "Views vs UniqueViews"
776
  msgstr "Visitas vs visitas únicas"
777
 
778
+ #: .././front/frontend.php:184
779
  msgid "Google Analytics Reports"
780
  msgstr ""
781
 
782
+ #: .././front/widgets.php:15
783
  msgid "Will display your google analytics stats in a widget"
784
  msgstr ""
785
 
786
+ #: .././front/widgets.php:40 .././tools/gapi.php:744
787
  msgid "trend"
788
  msgstr ""
789
 
790
+ #: .././front/widgets.php:133
791
  msgid "Period:"
792
  msgstr ""
793
 
794
+ #: .././front/widgets.php:133
795
  msgid "Sessions:"
796
  msgstr ""
797
 
798
+ #: .././front/widgets.php:137
799
  msgid "generated by"
800
  msgstr ""
801
 
802
+ #: .././front/widgets.php:147
803
  msgid "Google Analytics Stats"
804
  msgstr "Estadísticas de Google Analytics"
805
 
806
+ #: .././front/widgets.php:154
807
  msgid "Title:"
808
  msgstr ""
809
 
810
+ #: .././front/widgets.php:161
811
  msgid "Display:"
812
  msgstr ""
813
 
814
+ #: .././front/widgets.php:165
815
  msgid "Chart & Totals"
816
  msgstr ""
817
 
818
+ #: .././front/widgets.php:166
819
  msgid "Chart"
820
  msgstr ""
821
 
822
+ #: .././front/widgets.php:167
823
  msgid "Totals"
824
  msgstr ""
825
 
826
+ #: .././front/widgets.php:171
827
+ msgid "Anonymize stats:"
828
  msgstr ""
829
 
830
+ #: .././front/widgets.php:178
831
  msgid "Stats for:"
832
  msgstr ""
833
 
834
+ #: .././front/widgets.php:188
835
  msgid "Give credits:"
836
  msgstr ""
837
 
838
+ #: .././tools/gapi.php:129
839
  msgid "Use this link to get your access code:"
840
  msgstr ""
841
 
842
+ #: .././tools/gapi.php:129
843
  msgid "Get Access Code"
844
  msgstr ""
845
 
846
+ #: .././tools/gapi.php:134 .././tools/gapi.php:138
847
  msgid "Use the red link to get your access code!"
848
  msgstr ""
849
 
850
+ #: .././tools/gapi.php:134
851
  msgid "Access Code:"
852
  msgstr "Código de acceso:"
853
 
854
+ #: .././tools/gapi.php:146
855
  msgid "Save Access Code"
856
  msgstr ""
857
 
858
+ #: .././tools/gapi.php:373
859
  msgid "Organic Searches"
860
  msgstr "Búsquedas orgánicas"
861
 
862
+ #: .././tools/gapi.php:381
863
  msgid "Hour"
864
  msgstr "Hora"
865
 
866
+ #: .././tools/gapi.php:384 .././tools/gapi.php:744 .././tools/gapi.php:783
867
  msgid "Date"
868
  msgstr "Fecha"
869
 
870
+ #: .././tools/gapi.php:477 .././tools/gapi.php:783
871
  msgid "Views"
872
  msgstr "Vistas"
873
 
874
+ #: .././tools/gapi.php:576
875
  msgid "Countries"
876
  msgstr ""
877
 
878
+ #: .././tools/gapi.php:590
879
  msgid "Cities from"
880
  msgstr ""
881
 
882
+ #: .././tools/gapi.php:644
883
  msgid "Channels"
884
  msgstr ""
885
 
886
+ #: .././tools/gapi.php:698
887
  msgid "Type"
888
  msgstr "Tipo"
889
 
890
+ #: .././tools/gapi.php:783
891
  msgid "UniqueViews"
892
  msgstr "Visitas únicas"
893
 
894
+ #, fuzzy
895
+ #~ msgid "Google Analytics account"
896
+ #~ msgstr "Seguimiento de Google Analytics"
897
+
898
+ #~ msgid " show traffic overview"
899
+ #~ msgstr "mostrar vista general del tráfico"
900
+
901
+ #~ msgid " show top pages"
902
+ #~ msgstr "mostrar páginas principales"
903
+
904
+ #~ msgid " show top referrers"
905
+ #~ msgstr "mostrar referencias principales"
906
+
907
+ #~ msgid " show top searches"
908
+ #~ msgstr "mostrar búsquedas principales"
909
+
910
+ #~ msgid "Top Searches"
911
+ #~ msgstr "Búsquedas principales"
912
 
913
  #~ msgid "Visits"
914
  #~ msgstr "Visitas"
1119
  #~ msgid "Default Tracking Domain: "
1120
  #~ msgstr "Dominio predeterminado de seguimiento:"
1121
 
 
 
 
1122
  #~ msgid "Client ID, Client Secret or API Key is missing"
1123
  #~ msgstr "Falta Client ID, Client Secret o API Key"
1124
 
languages/ga-dash-fr_FR.mo CHANGED
Binary file
languages/ga-dash-fr_FR.po CHANGED
@@ -1,85 +1,92 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
- "POT-Creation-Date: 2015-01-07 20:25+0200\n"
5
- "PO-Revision-Date: 2015-01-07 20:25+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: fr_FR\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.1\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
- #: .././admin/dashboard_widgets.php:50 .././admin/dashboard_widgets.php:81
20
  msgid "Google Analytics"
21
  msgstr "Google Analytics"
22
 
23
- #: .././admin/dashboard_widgets.php:54 .././admin/dashboard_widgets.php:85
24
- #: .././admin/ga_dash_settings.php:100 .././admin/ga_dash_settings.php:222
25
- #: .././admin/ga_dash_settings.php:954
26
  msgid "General Settings"
27
  msgstr "Réglages Généraux"
28
 
29
- #: .././admin/dashboard_widgets.php:58
30
  msgid "Backend Settings"
31
  msgstr "Réglages B.O"
32
 
33
- #: .././admin/dashboard_widgets.php:62
34
  msgid "Frontend Settings"
35
  msgstr "Réglages F.O"
36
 
37
- #: .././admin/dashboard_widgets.php:66
38
  msgid "Tracking Code"
39
  msgstr "Code de Tracking"
40
 
41
- #: .././admin/dashboard_widgets.php:132
 
 
 
 
 
 
 
42
  msgid "Settings"
43
  msgstr "Réglages"
44
 
45
- #: .././admin/dashboard_widgets.php:148 .././front/widgets.php:15
46
  msgid "Google Analytics Dashboard"
47
  msgstr "Tableau de Bord Google Analytics"
48
 
49
- #: .././admin/dashboard_widgets.php:166
50
  msgid "This plugin needs an authorization:"
51
  msgstr "Ce plugin a besoin d&#39;une autorisation:"
52
 
53
- #: .././admin/dashboard_widgets.php:166 .././admin/ga_dash_settings.php:1063
54
- #: .././admin/ga_dash_settings.php:1465
55
  msgid "Authorize Plugin"
56
  msgstr "autoriser le plugin"
57
 
58
- #: .././admin/dashboard_widgets.php:207 .././admin/ga_dash_settings.php:459
59
- #: .././admin/ga_dash_settings.php:966 .././admin/ga_dash_settings.php:991
60
- #: .././admin/ga_dash_settings.php:1383
61
  msgid "View Name:"
62
  msgstr "Nom de la vue:"
63
 
64
- #: .././admin/dashboard_widgets.php:212
65
  msgid "Something went wrong while retrieving profiles list."
66
  msgstr ""
67
  "Quelque chose s&#39;est mal passé lors de la récupération de la liste des "
68
  "profils."
69
 
70
- #: .././admin/dashboard_widgets.php:212
71
  msgid "More details"
72
  msgstr "Plus de Détails"
73
 
74
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
75
  msgid "An admin should asign a default Google Analytics Profile."
76
  msgstr "Un administrateur doit assigner un profil Google Analytics par défaut."
77
 
78
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
79
  msgid "Select Domain"
80
  msgstr "Sélectionner un Domaine"
81
 
82
- #: .././admin/dashboard_widgets.php:245
83
  msgid ""
84
  "Something went wrong while retrieving property data. You need to create and "
85
  "properly configure a Google Analytics account:"
@@ -88,493 +95,519 @@ msgstr ""
88
  "propriété. Vous devez créer et configurer correctement un compte Google "
89
  "Analytics:"
90
 
91
- #: .././admin/dashboard_widgets.php:245
92
  msgid "Find out more!"
93
  msgstr "En savoir plus!"
94
 
95
- #: .././admin/dashboard_widgets.php:276
96
  msgid "Real-Time"
97
  msgstr "Temps-Réel"
98
 
99
- #: .././admin/dashboard_widgets.php:277
100
  msgid "Today"
101
  msgstr "Aujourd&#39;hui"
102
 
103
- #: .././admin/dashboard_widgets.php:279
104
  msgid "Yesterday"
105
  msgstr "Hier"
106
 
107
- #: .././admin/dashboard_widgets.php:281 .././front/widgets.php:83
108
- #: .././front/widgets.php:199
109
  msgid "Last 7 Days"
110
  msgstr "7 Derniers Jours"
111
 
112
- #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:86
113
- #: .././front/widgets.php:200
114
  msgid "Last 14 Days"
115
  msgstr "14 Derniers Jours"
116
 
117
- #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:89
118
- #: .././front/widgets.php:201
119
  msgid "Last 30 Days"
120
  msgstr "30 Derniers Jours"
121
 
122
- #: .././admin/dashboard_widgets.php:287
123
  msgid "Last 90 Days"
124
  msgstr "90 Derniers Jours"
125
 
126
- #: .././admin/dashboard_widgets.php:293 .././admin/dashboard_widgets.php:952
127
- #: .././front/widgets.php:44 .././tools/gapi.php:384 .././tools/gapi.php:543
128
- #: .././tools/gapi.php:587 .././tools/gapi.php:658 .././tools/gapi.php:808
129
- #: .././tools/gapi.php:899
130
  msgid "Sessions"
131
  msgstr ""
132
 
133
- #: .././admin/dashboard_widgets.php:294 .././admin/dashboard_widgets.php:956
134
- #: .././tools/gapi.php:368
135
  msgid "Users"
136
  msgstr ""
137
 
138
- #: .././admin/dashboard_widgets.php:296
139
  msgid "Organic"
140
  msgstr "Organique"
141
 
142
- #: .././admin/dashboard_widgets.php:298 .././admin/dashboard_widgets.php:960
143
- #: .././tools/gapi.php:372
144
  msgid "Page Views"
145
  msgstr "Pages vues"
146
 
147
- #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:964
148
- #: .././tools/gapi.php:376
149
  msgid "Bounce Rate"
150
  msgstr "Taux de Rebond"
151
 
152
- #: .././admin/dashboard_widgets.php:302
153
  msgid "Location"
154
  msgstr ""
155
 
156
- #: .././admin/dashboard_widgets.php:304 .././tools/gapi.php:500
157
  msgid "Pages"
158
  msgstr ""
159
 
160
- #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:543
161
  msgid "Referrers"
162
  msgstr ""
163
 
164
- #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:587
 
165
  msgid "Searches"
166
  msgstr ""
167
 
168
- #: .././admin/dashboard_widgets.php:310
169
  msgid "Traffic Details"
170
  msgstr ""
171
 
172
- #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:657
173
  msgid "REFERRAL"
174
  msgstr "RENVOI"
175
 
176
- #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:658
177
  msgid "ORGANIC"
178
  msgstr "ORGANIQUE"
179
 
180
- #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:544
181
- #: .././admin/dashboard_widgets.php:659
182
  msgid "SOCIAL"
183
  msgstr "SOCIAL"
184
 
185
- #: .././admin/dashboard_widgets.php:428 .././admin/dashboard_widgets.php:547
186
- #: .././admin/dashboard_widgets.php:660
187
  msgid "CAMPAIGN"
188
  msgstr ""
189
 
190
- #: .././admin/dashboard_widgets.php:432 .././admin/dashboard_widgets.php:550
191
- #: .././admin/dashboard_widgets.php:663
192
  msgid "DIRECT"
193
  msgstr "DIRECT"
194
 
195
- #: .././admin/dashboard_widgets.php:436 .././admin/dashboard_widgets.php:664
196
  msgid "NEW"
197
  msgstr "NOUVEAU"
198
 
199
- #: .././admin/dashboard_widgets.php:538
200
  msgid "REFERRALS"
201
  msgstr "RÉFÉRENCES"
202
 
203
- #: .././admin/dashboard_widgets.php:541
204
  msgid "KEYWORDS"
205
  msgstr "MOTS-CLÉS"
206
 
207
- #: .././admin/dashboard_widgets.php:690 .././admin/dashboard_widgets.php:702
208
- #: .././admin/dashboard_widgets.php:757 .././admin/dashboard_widgets.php:769
209
- #: .././admin/dashboard_widgets.php:781 .././admin/dashboard_widgets.php:793
210
- #: .././admin/dashboard_widgets.php:806 .././admin/dashboard_widgets.php:905
211
- #: .././admin/dashboard_widgets.php:908 .././admin/dashboard_widgets.php:992
212
- #: .././admin/dashboard_widgets.php:1004 .././front/frontend.php:88
213
- #: .././front/frontend.php:100 .././front/widgets.php:122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  msgid "This report is unavailable"
215
  msgstr ""
216
 
217
- #: .././admin/dashboard_widgets.php:818
218
  msgid "Traffic Mediums"
219
  msgstr ""
220
 
221
- #: .././admin/dashboard_widgets.php:834
222
  msgid "Visitor Type"
223
  msgstr ""
224
 
225
- #: .././admin/dashboard_widgets.php:850
226
  msgid "Social Networks"
227
  msgstr ""
228
 
229
- #: .././admin/dashboard_widgets.php:866
230
  msgid "Search Engines"
231
  msgstr ""
232
 
233
- #: .././admin/dashboard_widgets.php:968
234
  msgid "Organic Search"
235
  msgstr ""
236
 
237
- #: .././admin/dashboard_widgets.php:972
238
  msgid "Pages/Session"
239
  msgstr ""
240
 
241
- #: .././admin/ga_dash_settings.php:78 .././admin/ga_dash_settings.php:200
242
- #: .././admin/ga_dash_settings.php:418 .././admin/ga_dash_settings.php:841
243
- #: .././admin/ga_dash_settings.php:1228
244
  msgid "Settings saved."
245
  msgstr ""
246
 
247
- #: .././admin/ga_dash_settings.php:80 .././admin/ga_dash_settings.php:202
248
- #: .././admin/ga_dash_settings.php:420 .././admin/ga_dash_settings.php:824
249
- #: .././admin/ga_dash_settings.php:834 .././admin/ga_dash_settings.php:843
250
- #: .././admin/ga_dash_settings.php:855 .././admin/ga_dash_settings.php:1183
251
- #: .././admin/ga_dash_settings.php:1211 .././admin/ga_dash_settings.php:1221
252
- #: .././admin/ga_dash_settings.php:1230 .././admin/ga_dash_settings.php:1242
253
  msgid "Cheating Huh?"
254
  msgstr "Tricher Hein?"
255
 
256
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
257
- #: .././admin/ga_dash_settings.php:424
258
- msgid "Something went wrong, you need to"
259
- msgstr "Quelque chose s&#39;est mal passé, vous devez"
 
260
 
261
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
262
- #: .././admin/ga_dash_settings.php:424
 
 
 
 
 
 
 
263
  msgid "auhorize the plugin"
264
  msgstr "autoriser le plugin"
265
 
266
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
267
- #: .././admin/ga_dash_settings.php:424
268
- msgid "or properly configure your"
269
- msgstr "ou bien configurer votre"
270
-
271
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
272
- #: .././admin/ga_dash_settings.php:424
273
- msgid "Google Analytics account"
274
- msgstr "Compte Google Analytics"
275
-
276
- #: .././admin/ga_dash_settings.php:90
277
  msgid "Google Analytics Frontend Settings"
278
  msgstr "Google Analytics Paramètres Frontend"
279
 
280
- #: .././admin/ga_dash_settings.php:103 .././admin/ga_dash_settings.php:225
281
  msgid "Show stats to:"
282
  msgstr ""
283
 
284
- #: .././admin/ga_dash_settings.php:153
285
  msgid " show page sessions and users in frontend (after each article)"
286
  msgstr ""
287
 
288
- #: .././admin/ga_dash_settings.php:169
289
  msgid " show page searches (after each article)"
290
  msgstr "Afficher la page de recherche (après chaque article)"
291
 
292
- #: .././admin/ga_dash_settings.php:178 .././admin/ga_dash_settings.php:391
293
- #: .././admin/ga_dash_settings.php:739 .././admin/ga_dash_settings.php:1053
294
- #: .././admin/ga_dash_settings.php:1456
295
  msgid "Save Changes"
296
  msgstr ""
297
 
298
- #: .././admin/ga_dash_settings.php:212
299
  msgid "Google Analytics Dashboard Settings"
300
  msgstr "Paramètres du tableau de bord Google Analytics"
301
 
302
- #: .././admin/ga_dash_settings.php:275
303
  msgid "disable Switch Profile/View functionality"
304
  msgstr "désactiver Changer Profil/Voir fonctionnalité"
305
 
306
- #: .././admin/ga_dash_settings.php:279
307
  msgid "Real-Time Settings"
308
  msgstr "Paramètres Temps-Réel"
309
 
310
- #: .././admin/ga_dash_settings.php:282
311
  msgid "Maximum number of pages to display on real-time tab:"
312
  msgstr "Nombre maximum de pages à afficher sur l&#39;onglet en temps réel:"
313
 
314
- #: .././admin/ga_dash_settings.php:287
315
- msgid "(find out more"
316
- msgstr "(en savoir plus"
317
 
318
- #: .././admin/ga_dash_settings.php:289 .././admin/ga_dash_settings.php:324
319
  msgid "about this feature"
320
  msgstr "sur cette fonction"
321
 
322
- #: .././admin/ga_dash_settings.php:290 .././admin/ga_dash_settings.php:325
323
- msgid ")"
324
- msgstr ")"
 
 
 
 
325
 
326
- #: .././admin/ga_dash_settings.php:293
327
- msgid "Additional Stats & Charts"
328
- msgstr "Statistiques et graphiques supplémentaires"
329
 
330
- #: .././admin/ga_dash_settings.php:306
331
- msgid " show Geo Map chart for sessions"
332
  msgstr ""
333
 
334
- #: .././admin/ga_dash_settings.php:311
335
- msgid "Target Geo Map to region:"
336
- msgstr "Cible Géo carte de la région:"
337
 
338
- #: .././admin/ga_dash_settings.php:316
339
- msgid "and render top"
340
- msgstr "et rendre haut"
341
 
342
- #: .././admin/ga_dash_settings.php:321
343
- msgid "cities (find out more"
344
- msgstr "villes (en savoir plus"
345
 
346
- #: .././admin/ga_dash_settings.php:339
347
- msgid " show traffic overview"
348
- msgstr "Affiche la Vue d&#39;ensemble du Traffic"
349
 
350
- #: .././admin/ga_dash_settings.php:353
351
- msgid " show top pages"
352
- msgstr "Affiche le Top pages"
353
 
354
- #: .././admin/ga_dash_settings.php:367
355
- msgid " show top referrers"
356
- msgstr "Affiche le Top références"
357
 
358
- #: .././admin/ga_dash_settings.php:381
359
- msgid " show top searches"
360
- msgstr "Affiche le Top recherches"
 
361
 
362
- #: .././admin/ga_dash_settings.php:430
363
- msgid "Google Analytics Tracking Code"
364
- msgstr "Google Analytics Tracking Code"
365
 
366
- #: .././admin/ga_dash_settings.php:440
367
  msgid "Tracking Settings"
368
  msgstr "Paramètres de suivi"
369
 
370
- #: .././admin/ga_dash_settings.php:443
371
  msgid "Tracking Options:"
372
  msgstr ""
373
 
374
- #: .././admin/ga_dash_settings.php:447
375
  msgid "Disabled"
376
  msgstr "Désactive"
377
 
378
- #: .././admin/ga_dash_settings.php:449
379
- msgid "Enabled"
380
- msgstr "Active"
381
-
382
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
383
  msgid "Tracking ID:"
384
  msgstr "Suivi ID:"
385
 
386
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
387
  msgid "Default URL:"
388
  msgstr "URL par défaut:"
389
 
390
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
391
  msgid "Time Zone:"
392
  msgstr "Fuseau horaire:"
393
 
394
- #: .././admin/ga_dash_settings.php:467
395
  #, fuzzy
396
  msgid "Basic Tracking"
397
  msgstr "Suivi des événements"
398
 
399
- #: .././admin/ga_dash_settings.php:473
400
  msgid "Tracking Type:"
401
  msgstr ""
402
 
403
- #: .././admin/ga_dash_settings.php:477
404
  msgid "Classic Analytics"
405
  msgstr "Analytics classiques"
406
 
407
- #: .././admin/ga_dash_settings.php:479
408
  msgid "Universal Analytics"
409
  msgstr "Universel Analytics"
410
 
411
- #: .././admin/ga_dash_settings.php:493
412
  msgid " anonymize IPs while tracking"
413
  msgstr "anonymiser IP tout en suivant"
414
 
415
- #: .././admin/ga_dash_settings.php:508
416
  msgid " enable remarketing, demographics and interests reports"
417
  msgstr ""
418
  "permettre remarketing, les données démographiques et les rapports d&#39;"
419
  "intérêts"
420
 
421
- #: .././admin/ga_dash_settings.php:512
422
- msgid "Events Tracking"
423
- msgstr "Suivi des événements"
424
-
425
- #: .././admin/ga_dash_settings.php:525
426
  msgid " track downloads, mailto and outbound links"
427
  msgstr "téléchargement de titres, mailto et liens sortants"
428
 
429
- #: .././admin/ga_dash_settings.php:529
430
  #, fuzzy
431
  msgid "Downloads Regex:"
432
  msgstr "Filtres téléchargement:"
433
 
434
- #: .././admin/ga_dash_settings.php:546
435
  msgid " track affiliate links matching this regex"
436
  msgstr ""
437
 
438
- #: .././admin/ga_dash_settings.php:550
439
  msgid "Affiliates Regex:"
440
  msgstr ""
441
 
442
- #: .././admin/ga_dash_settings.php:567
443
  msgid " track fragment identifiers, hashmarks (#) in URI links"
444
  msgstr ""
445
 
446
- #: .././admin/ga_dash_settings.php:571
447
- msgid "Custom Definitions"
448
- msgstr ""
449
-
450
- #: .././admin/ga_dash_settings.php:574
451
  msgid "Authors:"
452
  msgstr ""
453
 
454
- #: .././admin/ga_dash_settings.php:584
455
  msgid "Publication Year:"
456
  msgstr ""
457
 
458
- #: .././admin/ga_dash_settings.php:594
459
  msgid "Categories:"
460
  msgstr ""
461
 
462
- #: .././admin/ga_dash_settings.php:604
463
  msgid "User Type:"
464
  msgstr ""
465
 
466
- #: .././admin/ga_dash_settings.php:614
467
  #, fuzzy
468
  msgid "Advanced Tracking"
469
  msgstr "Suivi des événements"
470
 
471
- #: .././admin/ga_dash_settings.php:617
472
  msgid "Page Speed SR:"
473
  msgstr "Page Speed SR:"
474
 
475
- #: .././admin/ga_dash_settings.php:635
476
  #, fuzzy
477
  msgid " exclude events from bounce-rate calculation"
478
  msgstr " exclude the event hit from bounce-rate calculation"
479
 
480
- #: .././admin/ga_dash_settings.php:649
481
  msgid " enable enhanced link attribution"
482
  msgstr "permettre une meilleure liaison attribution"
483
 
484
- #: .././admin/ga_dash_settings.php:663
485
  msgid " enable AdSense account linking"
486
  msgstr "Permettre la liaison avec votre compte Adsense"
487
 
488
- #: .././admin/ga_dash_settings.php:678
489
  msgid " enable cross domain tracking"
490
  msgstr ""
491
 
492
- #: .././admin/ga_dash_settings.php:682
493
  msgid "Cross Domains:"
494
  msgstr ""
495
 
496
- #: .././admin/ga_dash_settings.php:692 .././admin/ga_dash_settings.php:1396
497
- msgid "Exclude Tracking"
498
- msgstr "Exclure Tracking"
499
-
500
- #: .././admin/ga_dash_settings.php:695
501
  msgid "Exclude tracking for:"
502
  msgstr ""
503
 
504
- #: .././admin/ga_dash_settings.php:769 .././admin/ga_dash_settings.php:1138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
505
  msgid ""
506
  "Loading the required libraries. If this results in a blank screen or a fatal "
507
  "error, try this solution:"
508
  msgstr ""
509
 
510
- #: .././admin/ga_dash_settings.php:781 .././admin/ga_dash_settings.php:1150
511
  msgid "Plugin authorization succeeded."
512
  msgstr "Autorisation Plugin réussi."
513
 
514
- #: .././admin/ga_dash_settings.php:796 .././admin/ga_dash_settings.php:1173
515
  msgid ""
516
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
517
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
518
  msgstr ""
519
 
520
- #: .././admin/ga_dash_settings.php:822 .././admin/ga_dash_settings.php:1209
521
  msgid "Cleared Cache."
522
  msgstr "Cache effacé."
523
 
524
- #: .././admin/ga_dash_settings.php:831 .././admin/ga_dash_settings.php:1218
525
  msgid "Token Reseted and Revoked."
526
  msgstr "Jeton remis à zéro et révoqué."
527
 
528
- #: .././admin/ga_dash_settings.php:838 .././admin/ga_dash_settings.php:1225
529
- msgid "Dumping log data."
530
- msgstr "D&#39;exporter les données du journal."
531
-
532
- #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1235
533
  msgid "All other domains/properties were removed."
534
  msgstr "Tous les autres domaines/propriétés ont été retirés."
535
 
536
- #: .././admin/ga_dash_settings.php:859 .././admin/ga_dash_settings.php:1246
537
- msgid ""
538
- "PHP CURL is required. Ask your hosting provider to install/enable PHP CURL!"
539
- msgstr ""
540
-
541
- #: .././admin/ga_dash_settings.php:863 .././admin/ga_dash_settings.php:1250
542
  msgid "Google Analytics Settings"
543
  msgstr "Réglages Google analytics"
544
 
545
- #: .././admin/ga_dash_settings.php:872 .././admin/ga_dash_settings.php:1258
546
- msgid ""
547
- "Something went wrong. Please check the Debugging Data section for possible "
548
- "errors"
549
- msgstr ""
550
- "Quelque chose s&#39;est mal passé. S&#39;il vous plaît consulter la section "
551
- "Mise au point de données pour d&#39;éventuelles erreurs"
552
-
553
- #: .././admin/ga_dash_settings.php:878 .././admin/ga_dash_settings.php:1263
554
  msgid "Use the red link (see below) to generate and get your access code!"
555
  msgstr ""
556
 
557
- #: .././admin/ga_dash_settings.php:889 .././admin/ga_dash_settings.php:1297
558
  msgid "Plugin Authorization"
559
  msgstr "Autorisation Plugin"
560
 
561
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
562
  msgid "You should watch the"
563
  msgstr "Vous devriez regarder la"
564
 
565
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
566
  msgid "video"
567
  msgstr "video"
568
 
569
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
570
  msgid "and read this"
571
  msgstr "et lire ce"
572
 
573
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
574
  msgid "tutorial"
575
  msgstr "Tutoriel"
576
 
577
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
578
  msgid ""
579
  "before proceeding to authorization. This plugin requires a properly "
580
  "configured Google Analytics account"
@@ -582,282 +615,331 @@ msgstr ""
582
  "avant de procéder à l&#39;autorisation. Ce plugin nécessite un compte Google "
583
  "Analytics correctement configuré"
584
 
585
- #: .././admin/ga_dash_settings.php:905 .././admin/ga_dash_settings.php:1312
586
  msgid " use your own API Project credentials"
587
  msgstr ""
588
  "utiliser vos propres informations d&#39;identification de projets de l&#39;"
589
  "API"
590
 
591
- #: .././admin/ga_dash_settings.php:912 .././admin/ga_dash_settings.php:1319
592
  msgid "API Key:"
593
  msgstr "Clé API:"
594
 
595
- #: .././admin/ga_dash_settings.php:919 .././admin/ga_dash_settings.php:1326
596
  msgid "Client ID:"
597
  msgstr "Client ID:"
598
 
599
- #: .././admin/ga_dash_settings.php:926 .././admin/ga_dash_settings.php:1334
600
  msgid "Client Secret:"
601
  msgstr "Client Secret:"
602
 
603
- #: .././admin/ga_dash_settings.php:944 .././admin/ga_dash_settings.php:1352
604
  msgid "Clear Authorization"
605
  msgstr "Effacer autorisation"
606
 
607
- #: .././admin/ga_dash_settings.php:948 .././admin/ga_dash_settings.php:1067
608
- #: .././admin/ga_dash_settings.php:1355 .././admin/ga_dash_settings.php:1469
609
  msgid "Clear Cache"
610
  msgstr "Effacer Cache"
611
 
612
- #: .././admin/ga_dash_settings.php:957
613
  msgid "Select Domain:"
614
  msgstr ""
615
 
616
- #: .././admin/ga_dash_settings.php:970 .././admin/ga_dash_settings.php:1387
617
  msgid "Property not found"
618
  msgstr ""
619
 
620
- #: .././admin/ga_dash_settings.php:975
621
  msgid "and/or hide all other domains"
622
  msgstr "et/ou masquer tous les autres domaines"
623
 
624
- #: .././admin/ga_dash_settings.php:978
625
  msgid "Hide Now"
626
  msgstr "Cacher Maintenant"
627
 
628
- #: .././admin/ga_dash_settings.php:997
629
  msgid "Theme Color:"
630
  msgstr ""
631
 
632
- #: .././admin/ga_dash_settings.php:1007
633
  msgid "A new frontend widget is available! To enable it, go to"
634
  msgstr ""
635
  "Un nouveau widget frontend est disponible! Pour l&#39;activer, allez dans"
636
 
637
- #: .././admin/ga_dash_settings.php:1007
638
  msgid "Appearance -> Widgets"
639
  msgstr "Apparence -> Widgets"
640
 
641
- #: .././admin/ga_dash_settings.php:1007
642
  msgid "and look for Google Analytics Dashboard."
643
  msgstr "et de chercher Google Analytics Dashboard."
644
 
645
- #: .././admin/ga_dash_settings.php:1013 .././admin/ga_dash_settings.php:1073
646
- #: .././admin/ga_dash_settings.php:1416 .././admin/ga_dash_settings.php:1475
647
- msgid "Debugging Data"
648
- msgstr "débogage des données"
649
-
650
- #: .././admin/ga_dash_settings.php:1180
651
  msgid "Properties refreshed."
652
  msgstr "Propriétés rafraîchies."
653
 
654
- #: .././admin/ga_dash_settings.php:1274
655
  msgid "Network Setup"
656
  msgstr "Configuration du réseau"
657
 
658
- #: .././admin/ga_dash_settings.php:1289
659
  msgid " use a single Google Analytics account for the entire network"
660
  msgstr "utiliser un seul compte Google Analytics pour l&#39;ensemble du réseau"
661
 
662
- #: .././admin/ga_dash_settings.php:1358
663
  msgid "Refresh Properties"
664
  msgstr "Propriétés Actualisées"
665
 
666
- #: .././admin/ga_dash_settings.php:1364
667
  msgid "Properties/Views Settings"
668
  msgstr "Propriétés/Paramètres Vues"
669
 
670
- #: .././admin/ga_dash_settings.php:1409
671
  msgid " exclude Super Admin tracking for the entire network"
672
  msgstr ""
673
 
674
- #: .././admin/ga_dash_settings.php:1537
675
  msgid "Setup Tutorial & Demo"
676
  msgstr "Configuration Tutorial et Démo"
677
 
678
- #: .././admin/ga_dash_settings.php:1549
679
  msgid "Support & Reviews"
680
  msgstr "Support & avis"
681
 
682
- #: .././admin/ga_dash_settings.php:1557
683
  msgid "Plugin documentation and support on"
684
  msgstr ""
685
 
686
- #: .././admin/ga_dash_settings.php:1564
687
  msgid "Your feedback and review are both important,"
688
  msgstr "Vos commentaires et avis sont importants,"
689
 
690
- #: .././admin/ga_dash_settings.php:1564
691
  msgid "rate this plugin"
692
  msgstr "évaluer ce plugin"
693
 
694
- #: .././admin/ga_dash_settings.php:1569
695
  msgid "Further Reading"
696
  msgstr "Lectures complémentaires"
697
 
698
- #: .././admin/ga_dash_settings.php:1576
699
  msgid "Improve search rankings"
700
  msgstr ""
701
 
702
- #: .././admin/ga_dash_settings.php:1576
703
  msgid "by moving your website to HTTPS/SSL."
704
  msgstr ""
705
 
706
- #: .././admin/ga_dash_settings.php:1582
707
  msgid "Other"
708
  msgstr "Autres"
709
 
710
- #: .././admin/ga_dash_settings.php:1582
711
  msgid "WordPress Plugins"
712
  msgstr "Plugin Wordpress"
713
 
714
- #: .././admin/ga_dash_settings.php:1582
715
  msgid "written by the same author"
716
  msgstr "écrit par le même auteur"
717
 
718
- #: .././admin/ga_dash_settings.php:1587
719
  msgid "Other Services"
720
  msgstr ""
721
 
722
- #: .././admin/ga_dash_settings.php:1594
723
  msgid "Speed up your website and plug into a whole"
724
  msgstr ""
725
 
726
- #: .././admin/ga_dash_settings.php:1594
727
  msgid "new level of site speed"
728
  msgstr ""
729
 
730
- #: .././admin/ga_dash_settings.php:1600
731
  msgid "Web Analytics"
732
  msgstr "Web Analytics"
733
 
734
- #: .././admin/ga_dash_settings.php:1600
735
  msgid "service with users tracking at IP level."
736
  msgstr ""
737
 
738
- #: .././front/frontend.php:112
739
  msgid "Views vs UniqueViews"
740
  msgstr "Vues VS Unique Vues"
741
 
742
- #: .././front/frontend.php:168
743
  msgid "Google Analytics Reports"
744
  msgstr ""
745
 
746
- #: .././front/widgets.php:16
747
  msgid "Will display your google analytics stats in a widget"
748
  msgstr "Affichera vos statistiques Google Analytics dans un widget"
749
 
750
- #: .././front/widgets.php:44 .././tools/gapi.php:808
751
  msgid "trend"
752
  msgstr ""
753
 
754
- #: .././front/widgets.php:144
755
  msgid "Period:"
756
  msgstr "Période:"
757
 
758
- #: .././front/widgets.php:144
759
  msgid "Sessions:"
760
  msgstr ""
761
 
762
- #: .././front/widgets.php:150
763
  msgid "generated by"
764
  msgstr "générée par"
765
 
766
- #: .././front/widgets.php:164
767
  msgid "Google Analytics Stats"
768
  msgstr "Google Analytics Statistiques"
769
 
770
- #: .././front/widgets.php:171
771
  msgid "Title:"
772
  msgstr "Titre:"
773
 
774
- #: .././front/widgets.php:178
775
  msgid "Display:"
776
  msgstr "Affichage:"
777
 
778
- #: .././front/widgets.php:182
779
  msgid "Chart & Totals"
780
  msgstr "Graphique & Totaux"
781
 
782
- #: .././front/widgets.php:183
783
  msgid "Chart"
784
  msgstr "raphique"
785
 
786
- #: .././front/widgets.php:184
787
  msgid "Totals"
788
  msgstr "Totaux"
789
 
790
- #: .././front/widgets.php:188
791
- msgid "Anonimize chart&#39;s stats:"
792
- msgstr "Les statistiques de Anonimize graphique:"
793
 
794
- #: .././front/widgets.php:195
795
  msgid "Stats for:"
796
  msgstr "Statistiques pour:"
797
 
798
- #: .././front/widgets.php:205
799
  msgid "Give credits:"
800
  msgstr "Accorder des crédits:"
801
 
802
- #: .././tools/gapi.php:140
803
  msgid "Use this link to get your access code:"
804
  msgstr "Utilisez ce lien pour obtenir votre code d&#39;accès:"
805
 
806
- #: .././tools/gapi.php:140
807
  msgid "Get Access Code"
808
  msgstr "Obtenir le code d&#39;accès"
809
 
810
- #: .././tools/gapi.php:145 .././tools/gapi.php:149
811
  msgid "Use the red link to get your access code!"
812
  msgstr ""
813
 
814
- #: .././tools/gapi.php:145
815
  msgid "Access Code:"
816
  msgstr "Code d&#39;Accès:"
817
 
818
- #: .././tools/gapi.php:157
819
  msgid "Save Access Code"
820
  msgstr "Sauver le Code d&#39;Accès"
821
 
822
- #: .././tools/gapi.php:380
823
  msgid "Organic Searches"
824
  msgstr "Recherches Organique"
825
 
826
- #: .././tools/gapi.php:391
827
  msgid "Hour"
828
  msgstr "Heure"
829
 
830
- #: .././tools/gapi.php:394 .././tools/gapi.php:808 .././tools/gapi.php:852
831
  msgid "Date"
832
  msgstr "Date"
833
 
834
- #: .././tools/gapi.php:500 .././tools/gapi.php:852
835
  msgid "Views"
836
  msgstr "Vues"
837
 
838
- #: .././tools/gapi.php:611
839
  msgid "Countries"
840
  msgstr ""
841
 
842
- #: .././tools/gapi.php:629
843
  msgid "Cities from"
844
  msgstr ""
845
 
846
- #: .././tools/gapi.php:691
847
  msgid "Channels"
848
  msgstr ""
849
 
850
- #: .././tools/gapi.php:754
851
  msgid "Type"
852
  msgstr "Type"
853
 
854
- #: .././tools/gapi.php:852
855
  msgid "UniqueViews"
856
  msgstr "Unique vues"
857
 
858
- #: .././tools/gapi.php:899
859
- msgid "Top Searches"
860
- msgstr "Top Recherches"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
861
 
862
  #~ msgid "Error Log"
863
  #~ msgstr "Log erreurs"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
+ "POT-Creation-Date: 2015-02-07 11:40+0200\n"
5
+ "PO-Revision-Date: 2015-02-07 11:40+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: fr_FR\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.7.4\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
+ #: .././admin/dashboard_widgets.php:67 .././admin/dashboard_widgets.php:100
20
  msgid "Google Analytics"
21
  msgstr "Google Analytics"
22
 
23
+ #: .././admin/dashboard_widgets.php:71 .././admin/dashboard_widgets.php:104
24
+ #: .././admin/ga_dash_settings.php:105 .././admin/ga_dash_settings.php:216
25
+ #: .././admin/ga_dash_settings.php:964
26
  msgid "General Settings"
27
  msgstr "Réglages Généraux"
28
 
29
+ #: .././admin/dashboard_widgets.php:75
30
  msgid "Backend Settings"
31
  msgstr "Réglages B.O"
32
 
33
+ #: .././admin/dashboard_widgets.php:79
34
  msgid "Frontend Settings"
35
  msgstr "Réglages F.O"
36
 
37
+ #: .././admin/dashboard_widgets.php:83
38
  msgid "Tracking Code"
39
  msgstr "Code de Tracking"
40
 
41
+ #: .././admin/dashboard_widgets.php:87 .././admin/dashboard_widgets.php:108
42
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
43
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
44
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
45
+ msgid "Errors & Debug"
46
+ msgstr ""
47
+
48
+ #: .././admin/dashboard_widgets.php:152
49
  msgid "Settings"
50
  msgstr "Réglages"
51
 
52
+ #: .././admin/dashboard_widgets.php:166 .././front/widgets.php:14
53
  msgid "Google Analytics Dashboard"
54
  msgstr "Tableau de Bord Google Analytics"
55
 
56
+ #: .././admin/dashboard_widgets.php:183
57
  msgid "This plugin needs an authorization:"
58
  msgstr "Ce plugin a besoin d&#39;une autorisation:"
59
 
60
+ #: .././admin/dashboard_widgets.php:183 .././admin/ga_dash_settings.php:1035
61
+ #: .././admin/ga_dash_settings.php:1360
62
  msgid "Authorize Plugin"
63
  msgstr "autoriser le plugin"
64
 
65
+ #: .././admin/dashboard_widgets.php:216 .././admin/ga_dash_settings.php:380
66
+ #: .././admin/ga_dash_settings.php:976 .././admin/ga_dash_settings.php:1001
67
+ #: .././admin/ga_dash_settings.php:1315
68
  msgid "View Name:"
69
  msgstr "Nom de la vue:"
70
 
71
+ #: .././admin/dashboard_widgets.php:221
72
  msgid "Something went wrong while retrieving profiles list."
73
  msgstr ""
74
  "Quelque chose s&#39;est mal passé lors de la récupération de la liste des "
75
  "profils."
76
 
77
+ #: .././admin/dashboard_widgets.php:221
78
  msgid "More details"
79
  msgstr "Plus de Détails"
80
 
81
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
82
  msgid "An admin should asign a default Google Analytics Profile."
83
  msgstr "Un administrateur doit assigner un profil Google Analytics par défaut."
84
 
85
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
86
  msgid "Select Domain"
87
  msgstr "Sélectionner un Domaine"
88
 
89
+ #: .././admin/dashboard_widgets.php:250
90
  msgid ""
91
  "Something went wrong while retrieving property data. You need to create and "
92
  "properly configure a Google Analytics account:"
95
  "propriété. Vous devez créer et configurer correctement un compte Google "
96
  "Analytics:"
97
 
98
+ #: .././admin/dashboard_widgets.php:250
99
  msgid "Find out more!"
100
  msgstr "En savoir plus!"
101
 
102
+ #: .././admin/dashboard_widgets.php:278
103
  msgid "Real-Time"
104
  msgstr "Temps-Réel"
105
 
106
+ #: .././admin/dashboard_widgets.php:279
107
  msgid "Today"
108
  msgstr "Aujourd&#39;hui"
109
 
110
+ #: .././admin/dashboard_widgets.php:281
111
  msgid "Yesterday"
112
  msgstr "Hier"
113
 
114
+ #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:72
115
+ #: .././front/widgets.php:182
116
  msgid "Last 7 Days"
117
  msgstr "7 Derniers Jours"
118
 
119
+ #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:75
120
+ #: .././front/widgets.php:183
121
  msgid "Last 14 Days"
122
  msgstr "14 Derniers Jours"
123
 
124
+ #: .././admin/dashboard_widgets.php:287 .././front/widgets.php:78
125
+ #: .././front/widgets.php:184
126
  msgid "Last 30 Days"
127
  msgstr "30 Derniers Jours"
128
 
129
+ #: .././admin/dashboard_widgets.php:289
130
  msgid "Last 90 Days"
131
  msgstr "90 Derniers Jours"
132
 
133
+ #: .././admin/dashboard_widgets.php:295 .././admin/dashboard_widgets.php:1037
134
+ #: .././front/widgets.php:40 .././tools/gapi.php:376 .././tools/gapi.php:515
135
+ #: .././tools/gapi.php:554 .././tools/gapi.php:615 .././tools/gapi.php:744
136
+ #: .././tools/gapi.php:825
137
  msgid "Sessions"
138
  msgstr ""
139
 
140
+ #: .././admin/dashboard_widgets.php:296 .././admin/dashboard_widgets.php:1041
141
+ #: .././tools/gapi.php:364
142
  msgid "Users"
143
  msgstr ""
144
 
145
+ #: .././admin/dashboard_widgets.php:298
146
  msgid "Organic"
147
  msgstr "Organique"
148
 
149
+ #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:1045
150
+ #: .././tools/gapi.php:367
151
  msgid "Page Views"
152
  msgstr "Pages vues"
153
 
154
+ #: .././admin/dashboard_widgets.php:302 .././admin/dashboard_widgets.php:1049
155
+ #: .././tools/gapi.php:370
156
  msgid "Bounce Rate"
157
  msgstr "Taux de Rebond"
158
 
159
+ #: .././admin/dashboard_widgets.php:304
160
  msgid "Location"
161
  msgstr ""
162
 
163
+ #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:477
164
  msgid "Pages"
165
  msgstr ""
166
 
167
+ #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:515
168
  msgid "Referrers"
169
  msgstr ""
170
 
171
+ #: .././admin/dashboard_widgets.php:310 .././tools/gapi.php:554
172
+ #: .././tools/gapi.php:825
173
  msgid "Searches"
174
  msgstr ""
175
 
176
+ #: .././admin/dashboard_widgets.php:312
177
  msgid "Traffic Details"
178
  msgstr ""
179
 
180
+ #: .././admin/dashboard_widgets.php:404 .././admin/dashboard_widgets.php:645
181
  msgid "REFERRAL"
182
  msgstr "RENVOI"
183
 
184
+ #: .././admin/dashboard_widgets.php:408 .././admin/dashboard_widgets.php:646
185
  msgid "ORGANIC"
186
  msgstr "ORGANIQUE"
187
 
188
+ #: .././admin/dashboard_widgets.php:412 .././admin/dashboard_widgets.php:532
189
+ #: .././admin/dashboard_widgets.php:647
190
  msgid "SOCIAL"
191
  msgstr "SOCIAL"
192
 
193
+ #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:535
194
+ #: .././admin/dashboard_widgets.php:648
195
  msgid "CAMPAIGN"
196
  msgstr ""
197
 
198
+ #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:538
199
+ #: .././admin/dashboard_widgets.php:651
200
  msgid "DIRECT"
201
  msgstr "DIRECT"
202
 
203
+ #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:652
204
  msgid "NEW"
205
  msgstr "NOUVEAU"
206
 
207
+ #: .././admin/dashboard_widgets.php:526
208
  msgid "REFERRALS"
209
  msgstr "RÉFÉRENCES"
210
 
211
+ #: .././admin/dashboard_widgets.php:529
212
  msgid "KEYWORDS"
213
  msgstr "MOTS-CLÉS"
214
 
215
+ #: .././admin/dashboard_widgets.php:683 .././admin/dashboard_widgets.php:780
216
+ #: .././admin/dashboard_widgets.php:972 .././admin/dashboard_widgets.php:1083
217
+ #: .././front/frontend.php:88
218
+ msgid "A JavaScript Error is blocking plugin resources!"
219
+ msgstr ""
220
+
221
+ #: .././admin/dashboard_widgets.php:696 .././admin/dashboard_widgets.php:715
222
+ #: .././admin/dashboard_widgets.php:793 .././admin/dashboard_widgets.php:824
223
+ #: .././admin/dashboard_widgets.php:843 .././admin/dashboard_widgets.php:863
224
+ #: .././admin/dashboard_widgets.php:986 .././admin/dashboard_widgets.php:1096
225
+ #: .././admin/dashboard_widgets.php:1115 .././front/frontend.php:100
226
+ #: .././front/frontend.php:119
227
+ msgid "Invalid response, more details in JavaScript Console (F12)."
228
+ msgstr ""
229
+
230
+ #: .././admin/dashboard_widgets.php:701 .././admin/dashboard_widgets.php:720
231
+ #: .././admin/dashboard_widgets.php:798 .././admin/dashboard_widgets.php:810
232
+ #: .././admin/dashboard_widgets.php:829 .././admin/dashboard_widgets.php:848
233
+ #: .././admin/dashboard_widgets.php:868 .././admin/dashboard_widgets.php:991
234
+ #: .././admin/dashboard_widgets.php:994 .././admin/dashboard_widgets.php:1101
235
+ #: .././admin/dashboard_widgets.php:1120 .././front/frontend.php:105
236
+ #: .././front/frontend.php:124 .././front/widgets.php:110
237
  msgid "This report is unavailable"
238
  msgstr ""
239
 
240
+ #: .././admin/dashboard_widgets.php:880
241
  msgid "Traffic Mediums"
242
  msgstr ""
243
 
244
+ #: .././admin/dashboard_widgets.php:896
245
  msgid "Visitor Type"
246
  msgstr ""
247
 
248
+ #: .././admin/dashboard_widgets.php:912
249
  msgid "Social Networks"
250
  msgstr ""
251
 
252
+ #: .././admin/dashboard_widgets.php:928
253
  msgid "Search Engines"
254
  msgstr ""
255
 
256
+ #: .././admin/dashboard_widgets.php:1053
257
  msgid "Organic Search"
258
  msgstr ""
259
 
260
+ #: .././admin/dashboard_widgets.php:1057
261
  msgid "Pages/Session"
262
  msgstr ""
263
 
264
+ #: .././admin/ga_dash_settings.php:83 .././admin/ga_dash_settings.php:194
265
+ #: .././admin/ga_dash_settings.php:327 .././admin/ga_dash_settings.php:855
266
+ #: .././admin/ga_dash_settings.php:1157
267
  msgid "Settings saved."
268
  msgstr ""
269
 
270
+ #: .././admin/ga_dash_settings.php:85 .././admin/ga_dash_settings.php:196
271
+ #: .././admin/ga_dash_settings.php:329 .././admin/ga_dash_settings.php:841
272
+ #: .././admin/ga_dash_settings.php:851 .././admin/ga_dash_settings.php:857
273
+ #: .././admin/ga_dash_settings.php:869 .././admin/ga_dash_settings.php:1118
274
+ #: .././admin/ga_dash_settings.php:1143 .././admin/ga_dash_settings.php:1153
275
+ #: .././admin/ga_dash_settings.php:1159 .././admin/ga_dash_settings.php:1171
276
  msgid "Cheating Huh?"
277
  msgstr "Tricher Hein?"
278
 
279
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
280
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
281
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
282
+ msgid "Something went wrong, check"
283
+ msgstr ""
284
 
285
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
286
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
287
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
288
+ msgid "or"
289
+ msgstr ""
290
+
291
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
292
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
293
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
294
  msgid "auhorize the plugin"
295
  msgstr "autoriser le plugin"
296
 
297
+ #: .././admin/ga_dash_settings.php:95
 
 
 
 
 
 
 
 
 
 
298
  msgid "Google Analytics Frontend Settings"
299
  msgstr "Google Analytics Paramètres Frontend"
300
 
301
+ #: .././admin/ga_dash_settings.php:108 .././admin/ga_dash_settings.php:219
302
  msgid "Show stats to:"
303
  msgstr ""
304
 
305
+ #: .././admin/ga_dash_settings.php:152
306
  msgid " show page sessions and users in frontend (after each article)"
307
  msgstr ""
308
 
309
+ #: .././admin/ga_dash_settings.php:168
310
  msgid " show page searches (after each article)"
311
  msgstr "Afficher la page de recherche (après chaque article)"
312
 
313
+ #: .././admin/ga_dash_settings.php:177 .././admin/ga_dash_settings.php:305
314
+ #: .././admin/ga_dash_settings.php:666 .././admin/ga_dash_settings.php:1025
315
+ #: .././admin/ga_dash_settings.php:1351
316
  msgid "Save Changes"
317
  msgstr ""
318
 
319
+ #: .././admin/ga_dash_settings.php:206
320
  msgid "Google Analytics Dashboard Settings"
321
  msgstr "Paramètres du tableau de bord Google Analytics"
322
 
323
+ #: .././admin/ga_dash_settings.php:264
324
  msgid "disable Switch Profile/View functionality"
325
  msgstr "désactiver Changer Profil/Voir fonctionnalité"
326
 
327
+ #: .././admin/ga_dash_settings.php:268
328
  msgid "Real-Time Settings"
329
  msgstr "Paramètres Temps-Réel"
330
 
331
+ #: .././admin/ga_dash_settings.php:271
332
  msgid "Maximum number of pages to display on real-time tab:"
333
  msgstr "Nombre maximum de pages à afficher sur l&#39;onglet en temps réel:"
334
 
335
+ #: .././admin/ga_dash_settings.php:276 .././admin/ga_dash_settings.php:292
336
+ msgid "find out more"
337
+ msgstr ""
338
 
339
+ #: .././admin/ga_dash_settings.php:278 .././admin/ga_dash_settings.php:295
340
  msgid "about this feature"
341
  msgstr "sur cette fonction"
342
 
343
+ #: .././admin/ga_dash_settings.php:283
344
+ msgid "Location Settings"
345
+ msgstr ""
346
+
347
+ #: .././admin/ga_dash_settings.php:287
348
+ msgid "Target Geo Map to country:"
349
+ msgstr ""
350
 
351
+ #: .././admin/ga_dash_settings.php:336
352
+ msgid "The tracking component is disabled. You should set"
353
+ msgstr ""
354
 
355
+ #: .././admin/ga_dash_settings.php:336
356
+ msgid "Tracking Options"
357
  msgstr ""
358
 
359
+ #: .././admin/ga_dash_settings.php:336
360
+ msgid "to"
361
+ msgstr ""
362
 
363
+ #: .././admin/ga_dash_settings.php:336 .././admin/ga_dash_settings.php:372
364
+ msgid "Enabled"
365
+ msgstr "Active"
366
 
367
+ #: .././admin/ga_dash_settings.php:342
368
+ msgid "Google Analytics Tracking Code"
369
+ msgstr "Google Analytics Tracking Code"
370
 
371
+ #: .././admin/ga_dash_settings.php:351
372
+ msgid "Basic Settings"
373
+ msgstr ""
374
 
375
+ #: .././admin/ga_dash_settings.php:352 .././admin/ga_dash_settings.php:431
376
+ msgid "Events Tracking"
377
+ msgstr "Suivi des événements"
378
 
379
+ #: .././admin/ga_dash_settings.php:353 .././admin/ga_dash_settings.php:495
380
+ msgid "Custom Definitions"
381
+ msgstr ""
382
 
383
+ #: .././admin/ga_dash_settings.php:354 .././admin/ga_dash_settings.php:623
384
+ #: .././admin/ga_dash_settings.php:1328
385
+ msgid "Exclude Tracking"
386
+ msgstr "Exclure Tracking"
387
 
388
+ #: .././admin/ga_dash_settings.php:355
389
+ msgid "Advanced Settings"
390
+ msgstr ""
391
 
392
+ #: .././admin/ga_dash_settings.php:363
393
  msgid "Tracking Settings"
394
  msgstr "Paramètres de suivi"
395
 
396
+ #: .././admin/ga_dash_settings.php:366
397
  msgid "Tracking Options:"
398
  msgstr ""
399
 
400
+ #: .././admin/ga_dash_settings.php:370
401
  msgid "Disabled"
402
  msgstr "Désactive"
403
 
404
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
 
 
 
 
405
  msgid "Tracking ID:"
406
  msgstr "Suivi ID:"
407
 
408
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
409
  msgid "Default URL:"
410
  msgstr "URL par défaut:"
411
 
412
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
413
  msgid "Time Zone:"
414
  msgstr "Fuseau horaire:"
415
 
416
+ #: .././admin/ga_dash_settings.php:385
417
  #, fuzzy
418
  msgid "Basic Tracking"
419
  msgstr "Suivi des événements"
420
 
421
+ #: .././admin/ga_dash_settings.php:388
422
  msgid "Tracking Type:"
423
  msgstr ""
424
 
425
+ #: .././admin/ga_dash_settings.php:392
426
  msgid "Classic Analytics"
427
  msgstr "Analytics classiques"
428
 
429
+ #: .././admin/ga_dash_settings.php:394
430
  msgid "Universal Analytics"
431
  msgstr "Universel Analytics"
432
 
433
+ #: .././admin/ga_dash_settings.php:408
434
  msgid " anonymize IPs while tracking"
435
  msgstr "anonymiser IP tout en suivant"
436
 
437
+ #: .././admin/ga_dash_settings.php:423
438
  msgid " enable remarketing, demographics and interests reports"
439
  msgstr ""
440
  "permettre remarketing, les données démographiques et les rapports d&#39;"
441
  "intérêts"
442
 
443
+ #: .././admin/ga_dash_settings.php:445
 
 
 
 
444
  msgid " track downloads, mailto and outbound links"
445
  msgstr "téléchargement de titres, mailto et liens sortants"
446
 
447
+ #: .././admin/ga_dash_settings.php:449
448
  #, fuzzy
449
  msgid "Downloads Regex:"
450
  msgstr "Filtres téléchargement:"
451
 
452
+ #: .././admin/ga_dash_settings.php:466
453
  msgid " track affiliate links matching this regex"
454
  msgstr ""
455
 
456
+ #: .././admin/ga_dash_settings.php:470
457
  msgid "Affiliates Regex:"
458
  msgstr ""
459
 
460
+ #: .././admin/ga_dash_settings.php:487
461
  msgid " track fragment identifiers, hashmarks (#) in URI links"
462
  msgstr ""
463
 
464
+ #: .././admin/ga_dash_settings.php:498
 
 
 
 
465
  msgid "Authors:"
466
  msgstr ""
467
 
468
+ #: .././admin/ga_dash_settings.php:508
469
  msgid "Publication Year:"
470
  msgstr ""
471
 
472
+ #: .././admin/ga_dash_settings.php:518
473
  msgid "Categories:"
474
  msgstr ""
475
 
476
+ #: .././admin/ga_dash_settings.php:528
477
  msgid "User Type:"
478
  msgstr ""
479
 
480
+ #: .././admin/ga_dash_settings.php:542
481
  #, fuzzy
482
  msgid "Advanced Tracking"
483
  msgstr "Suivi des événements"
484
 
485
+ #: .././admin/ga_dash_settings.php:545
486
  msgid "Page Speed SR:"
487
  msgstr "Page Speed SR:"
488
 
489
+ #: .././admin/ga_dash_settings.php:563
490
  #, fuzzy
491
  msgid " exclude events from bounce-rate calculation"
492
  msgstr " exclude the event hit from bounce-rate calculation"
493
 
494
+ #: .././admin/ga_dash_settings.php:578
495
  msgid " enable enhanced link attribution"
496
  msgstr "permettre une meilleure liaison attribution"
497
 
498
+ #: .././admin/ga_dash_settings.php:592
499
  msgid " enable AdSense account linking"
500
  msgstr "Permettre la liaison avec votre compte Adsense"
501
 
502
+ #: .././admin/ga_dash_settings.php:608
503
  msgid " enable cross domain tracking"
504
  msgstr ""
505
 
506
+ #: .././admin/ga_dash_settings.php:612
507
  msgid "Cross Domains:"
508
  msgstr ""
509
 
510
+ #: .././admin/ga_dash_settings.php:626
 
 
 
 
511
  msgid "Exclude tracking for:"
512
  msgstr ""
513
 
514
+ #: .././admin/ga_dash_settings.php:687
515
+ msgid "Google Analytics Errors & Debugging"
516
+ msgstr ""
517
+
518
+ #: .././admin/ga_dash_settings.php:697
519
+ msgid "Errors & Details"
520
+ msgstr ""
521
+
522
+ #: .././admin/ga_dash_settings.php:698
523
+ msgid "Plugin Settings"
524
+ msgstr ""
525
+
526
+ #: .././admin/ga_dash_settings.php:706
527
+ msgid "For errors and/or other issues please check"
528
+ msgstr ""
529
+
530
+ #: .././admin/ga_dash_settings.php:706
531
+ msgid "the plugin documentation page"
532
+ msgstr ""
533
+
534
+ #: .././admin/ga_dash_settings.php:706
535
+ msgid "and related tutorials"
536
+ msgstr ""
537
+
538
+ #: .././admin/ga_dash_settings.php:710
539
+ msgid "Last Error detected"
540
+ msgstr ""
541
+
542
+ #: .././admin/ga_dash_settings.php:715 .././admin/ga_dash_settings.php:728
543
+ msgid "None"
544
+ msgstr ""
545
+
546
+ #: .././admin/ga_dash_settings.php:722
547
+ msgid "Error Details"
548
+ msgstr ""
549
+
550
+ #: .././admin/ga_dash_settings.php:740
551
+ msgid "Plugin Configuration"
552
+ msgstr ""
553
+
554
+ #: .././admin/ga_dash_settings.php:788 .././admin/ga_dash_settings.php:1072
555
  msgid ""
556
  "Loading the required libraries. If this results in a blank screen or a fatal "
557
  "error, try this solution:"
558
  msgstr ""
559
 
560
+ #: .././admin/ga_dash_settings.php:800 .././admin/ga_dash_settings.php:1084
561
  msgid "Plugin authorization succeeded."
562
  msgstr "Autorisation Plugin réussi."
563
 
564
+ #: .././admin/ga_dash_settings.php:816 .././admin/ga_dash_settings.php:1109
565
  msgid ""
566
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
567
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
568
  msgstr ""
569
 
570
+ #: .././admin/ga_dash_settings.php:839 .././admin/ga_dash_settings.php:1141
571
  msgid "Cleared Cache."
572
  msgstr "Cache effacé."
573
 
574
+ #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1150
575
  msgid "Token Reseted and Revoked."
576
  msgstr "Jeton remis à zéro et révoqué."
577
 
578
+ #: .././admin/ga_dash_settings.php:862 .././admin/ga_dash_settings.php:1164
 
 
 
 
579
  msgid "All other domains/properties were removed."
580
  msgstr "Tous les autres domaines/propriétés ont été retirés."
581
 
582
+ #: .././admin/ga_dash_settings.php:874 .././admin/ga_dash_settings.php:1176
 
 
 
 
 
583
  msgid "Google Analytics Settings"
584
  msgstr "Réglages Google analytics"
585
 
586
+ #: .././admin/ga_dash_settings.php:887 .././admin/ga_dash_settings.php:1189
 
 
 
 
 
 
 
 
587
  msgid "Use the red link (see below) to generate and get your access code!"
588
  msgstr ""
589
 
590
+ #: .././admin/ga_dash_settings.php:898 .././admin/ga_dash_settings.php:1224
591
  msgid "Plugin Authorization"
592
  msgstr "Autorisation Plugin"
593
 
594
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
595
  msgid "You should watch the"
596
  msgstr "Vous devriez regarder la"
597
 
598
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
599
  msgid "video"
600
  msgstr "video"
601
 
602
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
603
  msgid "and read this"
604
  msgstr "et lire ce"
605
 
606
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
607
  msgid "tutorial"
608
  msgstr "Tutoriel"
609
 
610
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
611
  msgid ""
612
  "before proceeding to authorization. This plugin requires a properly "
613
  "configured Google Analytics account"
615
  "avant de procéder à l&#39;autorisation. Ce plugin nécessite un compte Google "
616
  "Analytics correctement configuré"
617
 
618
+ #: .././admin/ga_dash_settings.php:914 .././admin/ga_dash_settings.php:1239
619
  msgid " use your own API Project credentials"
620
  msgstr ""
621
  "utiliser vos propres informations d&#39;identification de projets de l&#39;"
622
  "API"
623
 
624
+ #: .././admin/ga_dash_settings.php:921 .././admin/ga_dash_settings.php:1246
625
  msgid "API Key:"
626
  msgstr "Clé API:"
627
 
628
+ #: .././admin/ga_dash_settings.php:928 .././admin/ga_dash_settings.php:1254
629
  msgid "Client ID:"
630
  msgstr "Client ID:"
631
 
632
+ #: .././admin/ga_dash_settings.php:936 .././admin/ga_dash_settings.php:1263
633
  msgid "Client Secret:"
634
  msgstr "Client Secret:"
635
 
636
+ #: .././admin/ga_dash_settings.php:954 .././admin/ga_dash_settings.php:1282
637
  msgid "Clear Authorization"
638
  msgstr "Effacer autorisation"
639
 
640
+ #: .././admin/ga_dash_settings.php:958 .././admin/ga_dash_settings.php:1039
641
+ #: .././admin/ga_dash_settings.php:1285 .././admin/ga_dash_settings.php:1363
642
  msgid "Clear Cache"
643
  msgstr "Effacer Cache"
644
 
645
+ #: .././admin/ga_dash_settings.php:967
646
  msgid "Select Domain:"
647
  msgstr ""
648
 
649
+ #: .././admin/ga_dash_settings.php:980 .././admin/ga_dash_settings.php:1319
650
  msgid "Property not found"
651
  msgstr ""
652
 
653
+ #: .././admin/ga_dash_settings.php:985
654
  msgid "and/or hide all other domains"
655
  msgstr "et/ou masquer tous les autres domaines"
656
 
657
+ #: .././admin/ga_dash_settings.php:988
658
  msgid "Hide Now"
659
  msgstr "Cacher Maintenant"
660
 
661
+ #: .././admin/ga_dash_settings.php:1007
662
  msgid "Theme Color:"
663
  msgstr ""
664
 
665
+ #: .././admin/ga_dash_settings.php:1017
666
  msgid "A new frontend widget is available! To enable it, go to"
667
  msgstr ""
668
  "Un nouveau widget frontend est disponible! Pour l&#39;activer, allez dans"
669
 
670
+ #: .././admin/ga_dash_settings.php:1017
671
  msgid "Appearance -> Widgets"
672
  msgstr "Apparence -> Widgets"
673
 
674
+ #: .././admin/ga_dash_settings.php:1017
675
  msgid "and look for Google Analytics Dashboard."
676
  msgstr "et de chercher Google Analytics Dashboard."
677
 
678
+ #: .././admin/ga_dash_settings.php:1115
 
 
 
 
 
679
  msgid "Properties refreshed."
680
  msgstr "Propriétés rafraîchies."
681
 
682
+ #: .././admin/ga_dash_settings.php:1201
683
  msgid "Network Setup"
684
  msgstr "Configuration du réseau"
685
 
686
+ #: .././admin/ga_dash_settings.php:1216
687
  msgid " use a single Google Analytics account for the entire network"
688
  msgstr "utiliser un seul compte Google Analytics pour l&#39;ensemble du réseau"
689
 
690
+ #: .././admin/ga_dash_settings.php:1288
691
  msgid "Refresh Properties"
692
  msgstr "Propriétés Actualisées"
693
 
694
+ #: .././admin/ga_dash_settings.php:1294
695
  msgid "Properties/Views Settings"
696
  msgstr "Propriétés/Paramètres Vues"
697
 
698
+ #: .././admin/ga_dash_settings.php:1342
699
  msgid " exclude Super Admin tracking for the entire network"
700
  msgstr ""
701
 
702
+ #: .././admin/ga_dash_settings.php:1394
703
  msgid "Setup Tutorial & Demo"
704
  msgstr "Configuration Tutorial et Démo"
705
 
706
+ #: .././admin/ga_dash_settings.php:1406
707
  msgid "Support & Reviews"
708
  msgstr "Support & avis"
709
 
710
+ #: .././admin/ga_dash_settings.php:1414
711
  msgid "Plugin documentation and support on"
712
  msgstr ""
713
 
714
+ #: .././admin/ga_dash_settings.php:1421
715
  msgid "Your feedback and review are both important,"
716
  msgstr "Vos commentaires et avis sont importants,"
717
 
718
+ #: .././admin/ga_dash_settings.php:1421
719
  msgid "rate this plugin"
720
  msgstr "évaluer ce plugin"
721
 
722
+ #: .././admin/ga_dash_settings.php:1426
723
  msgid "Further Reading"
724
  msgstr "Lectures complémentaires"
725
 
726
+ #: .././admin/ga_dash_settings.php:1434
727
  msgid "Improve search rankings"
728
  msgstr ""
729
 
730
+ #: .././admin/ga_dash_settings.php:1434
731
  msgid "by moving your website to HTTPS/SSL."
732
  msgstr ""
733
 
734
+ #: .././admin/ga_dash_settings.php:1441
735
  msgid "Other"
736
  msgstr "Autres"
737
 
738
+ #: .././admin/ga_dash_settings.php:1441
739
  msgid "WordPress Plugins"
740
  msgstr "Plugin Wordpress"
741
 
742
+ #: .././admin/ga_dash_settings.php:1441
743
  msgid "written by the same author"
744
  msgstr "écrit par le même auteur"
745
 
746
+ #: .././admin/ga_dash_settings.php:1446
747
  msgid "Other Services"
748
  msgstr ""
749
 
750
+ #: .././admin/ga_dash_settings.php:1453
751
  msgid "Speed up your website and plug into a whole"
752
  msgstr ""
753
 
754
+ #: .././admin/ga_dash_settings.php:1453
755
  msgid "new level of site speed"
756
  msgstr ""
757
 
758
+ #: .././admin/ga_dash_settings.php:1460
759
  msgid "Web Analytics"
760
  msgstr "Web Analytics"
761
 
762
+ #: .././admin/ga_dash_settings.php:1460
763
  msgid "service with users tracking at IP level."
764
  msgstr ""
765
 
766
+ #: .././front/frontend.php:134
767
  msgid "Views vs UniqueViews"
768
  msgstr "Vues VS Unique Vues"
769
 
770
+ #: .././front/frontend.php:184
771
  msgid "Google Analytics Reports"
772
  msgstr ""
773
 
774
+ #: .././front/widgets.php:15
775
  msgid "Will display your google analytics stats in a widget"
776
  msgstr "Affichera vos statistiques Google Analytics dans un widget"
777
 
778
+ #: .././front/widgets.php:40 .././tools/gapi.php:744
779
  msgid "trend"
780
  msgstr ""
781
 
782
+ #: .././front/widgets.php:133
783
  msgid "Period:"
784
  msgstr "Période:"
785
 
786
+ #: .././front/widgets.php:133
787
  msgid "Sessions:"
788
  msgstr ""
789
 
790
+ #: .././front/widgets.php:137
791
  msgid "generated by"
792
  msgstr "générée par"
793
 
794
+ #: .././front/widgets.php:147
795
  msgid "Google Analytics Stats"
796
  msgstr "Google Analytics Statistiques"
797
 
798
+ #: .././front/widgets.php:154
799
  msgid "Title:"
800
  msgstr "Titre:"
801
 
802
+ #: .././front/widgets.php:161
803
  msgid "Display:"
804
  msgstr "Affichage:"
805
 
806
+ #: .././front/widgets.php:165
807
  msgid "Chart & Totals"
808
  msgstr "Graphique & Totaux"
809
 
810
+ #: .././front/widgets.php:166
811
  msgid "Chart"
812
  msgstr "raphique"
813
 
814
+ #: .././front/widgets.php:167
815
  msgid "Totals"
816
  msgstr "Totaux"
817
 
818
+ #: .././front/widgets.php:171
819
+ msgid "Anonymize stats:"
820
+ msgstr ""
821
 
822
+ #: .././front/widgets.php:178
823
  msgid "Stats for:"
824
  msgstr "Statistiques pour:"
825
 
826
+ #: .././front/widgets.php:188
827
  msgid "Give credits:"
828
  msgstr "Accorder des crédits:"
829
 
830
+ #: .././tools/gapi.php:129
831
  msgid "Use this link to get your access code:"
832
  msgstr "Utilisez ce lien pour obtenir votre code d&#39;accès:"
833
 
834
+ #: .././tools/gapi.php:129
835
  msgid "Get Access Code"
836
  msgstr "Obtenir le code d&#39;accès"
837
 
838
+ #: .././tools/gapi.php:134 .././tools/gapi.php:138
839
  msgid "Use the red link to get your access code!"
840
  msgstr ""
841
 
842
+ #: .././tools/gapi.php:134
843
  msgid "Access Code:"
844
  msgstr "Code d&#39;Accès:"
845
 
846
+ #: .././tools/gapi.php:146
847
  msgid "Save Access Code"
848
  msgstr "Sauver le Code d&#39;Accès"
849
 
850
+ #: .././tools/gapi.php:373
851
  msgid "Organic Searches"
852
  msgstr "Recherches Organique"
853
 
854
+ #: .././tools/gapi.php:381
855
  msgid "Hour"
856
  msgstr "Heure"
857
 
858
+ #: .././tools/gapi.php:384 .././tools/gapi.php:744 .././tools/gapi.php:783
859
  msgid "Date"
860
  msgstr "Date"
861
 
862
+ #: .././tools/gapi.php:477 .././tools/gapi.php:783
863
  msgid "Views"
864
  msgstr "Vues"
865
 
866
+ #: .././tools/gapi.php:576
867
  msgid "Countries"
868
  msgstr ""
869
 
870
+ #: .././tools/gapi.php:590
871
  msgid "Cities from"
872
  msgstr ""
873
 
874
+ #: .././tools/gapi.php:644
875
  msgid "Channels"
876
  msgstr ""
877
 
878
+ #: .././tools/gapi.php:698
879
  msgid "Type"
880
  msgstr "Type"
881
 
882
+ #: .././tools/gapi.php:783
883
  msgid "UniqueViews"
884
  msgstr "Unique vues"
885
 
886
+ #~ msgid "Something went wrong, you need to"
887
+ #~ msgstr "Quelque chose s&#39;est mal passé, vous devez"
888
+
889
+ #~ msgid "or properly configure your"
890
+ #~ msgstr "ou bien configurer votre"
891
+
892
+ #~ msgid "Google Analytics account"
893
+ #~ msgstr "Compte Google Analytics"
894
+
895
+ #~ msgid "(find out more"
896
+ #~ msgstr "(en savoir plus"
897
+
898
+ #~ msgid ")"
899
+ #~ msgstr ")"
900
+
901
+ #~ msgid "Additional Stats & Charts"
902
+ #~ msgstr "Statistiques et graphiques supplémentaires"
903
+
904
+ #~ msgid "Target Geo Map to region:"
905
+ #~ msgstr "Cible Géo carte de la région:"
906
+
907
+ #~ msgid "and render top"
908
+ #~ msgstr "et rendre haut"
909
+
910
+ #~ msgid "cities (find out more"
911
+ #~ msgstr "villes (en savoir plus"
912
+
913
+ #~ msgid " show traffic overview"
914
+ #~ msgstr "Affiche la Vue d&#39;ensemble du Traffic"
915
+
916
+ #~ msgid " show top pages"
917
+ #~ msgstr "Affiche le Top pages"
918
+
919
+ #~ msgid " show top referrers"
920
+ #~ msgstr "Affiche le Top références"
921
+
922
+ #~ msgid " show top searches"
923
+ #~ msgstr "Affiche le Top recherches"
924
+
925
+ #~ msgid "Dumping log data."
926
+ #~ msgstr "D&#39;exporter les données du journal."
927
+
928
+ #~ msgid ""
929
+ #~ "Something went wrong. Please check the Debugging Data section for "
930
+ #~ "possible errors"
931
+ #~ msgstr ""
932
+ #~ "Quelque chose s&#39;est mal passé. S&#39;il vous plaît consulter la "
933
+ #~ "section Mise au point de données pour d&#39;éventuelles erreurs"
934
+
935
+ #~ msgid "Debugging Data"
936
+ #~ msgstr "débogage des données"
937
+
938
+ #~ msgid "Anonimize chart&#39;s stats:"
939
+ #~ msgstr "Les statistiques de Anonimize graphique:"
940
+
941
+ #~ msgid "Top Searches"
942
+ #~ msgstr "Top Recherches"
943
 
944
  #~ msgid "Error Log"
945
  #~ msgstr "Log erreurs"
languages/ga-dash-hu_HU.mo CHANGED
Binary file
languages/ga-dash-hu_HU.po CHANGED
@@ -1,84 +1,91 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP 4.2.20\n"
4
- "POT-Creation-Date: 2015-01-07 20:25+0200\n"
5
- "PO-Revision-Date: 2015-01-07 20:26+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: hu_HU\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.1\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
- #: .././admin/dashboard_widgets.php:50 .././admin/dashboard_widgets.php:81
20
  msgid "Google Analytics"
21
  msgstr "Google Analytics"
22
 
23
- #: .././admin/dashboard_widgets.php:54 .././admin/dashboard_widgets.php:85
24
- #: .././admin/ga_dash_settings.php:100 .././admin/ga_dash_settings.php:222
25
- #: .././admin/ga_dash_settings.php:954
26
  msgid "General Settings"
27
  msgstr "Általános beállítások"
28
 
29
- #: .././admin/dashboard_widgets.php:58
30
  msgid "Backend Settings"
31
  msgstr "Admin beállítások"
32
 
33
- #: .././admin/dashboard_widgets.php:62
34
  msgid "Frontend Settings"
35
  msgstr "Weblap beállítások"
36
 
37
- #: .././admin/dashboard_widgets.php:66
38
  msgid "Tracking Code"
39
  msgstr "Követőkód"
40
 
41
- #: .././admin/dashboard_widgets.php:132
 
 
 
 
 
 
 
42
  msgid "Settings"
43
  msgstr "Beállítások"
44
 
45
- #: .././admin/dashboard_widgets.php:148 .././front/widgets.php:15
46
  msgid "Google Analytics Dashboard"
47
  msgstr "Google Analytics vezérlőpult"
48
 
49
- #: .././admin/dashboard_widgets.php:166
50
  msgid "This plugin needs an authorization:"
51
  msgstr "Ennek a bővítménynek engedélyre van szüksége:"
52
 
53
- #: .././admin/dashboard_widgets.php:166 .././admin/ga_dash_settings.php:1063
54
- #: .././admin/ga_dash_settings.php:1465
55
  msgid "Authorize Plugin"
56
  msgstr "Bővítmény engedélyezése"
57
 
58
- #: .././admin/dashboard_widgets.php:207 .././admin/ga_dash_settings.php:459
59
- #: .././admin/ga_dash_settings.php:966 .././admin/ga_dash_settings.php:991
60
- #: .././admin/ga_dash_settings.php:1383
61
  msgid "View Name:"
62
  msgstr "Név:"
63
 
64
- #: .././admin/dashboard_widgets.php:212
65
  msgid "Something went wrong while retrieving profiles list."
66
  msgstr "Valami rosszul ment a profil lista lekérése közben."
67
 
68
- #: .././admin/dashboard_widgets.php:212
69
  msgid "More details"
70
  msgstr "További részletek"
71
 
72
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
73
  msgid "An admin should asign a default Google Analytics Profile."
74
  msgstr ""
75
  "Az alapértelmezett Google Analytics profilt egy admin képes kijelölni."
76
 
77
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
78
  msgid "Select Domain"
79
  msgstr "Domain kiválasztása"
80
 
81
- #: .././admin/dashboard_widgets.php:245
82
  msgid ""
83
  "Something went wrong while retrieving property data. You need to create and "
84
  "properly configure a Google Analytics account:"
@@ -86,491 +93,517 @@ msgstr ""
86
  "Valami rosszul ment a tulajdon adat lekérése közben. Egy jól konfigurált "
87
  "Google Analytics fiókra van szüksége:"
88
 
89
- #: .././admin/dashboard_widgets.php:245
90
  msgid "Find out more!"
91
  msgstr "Tudjon meg többet!"
92
 
93
- #: .././admin/dashboard_widgets.php:276
94
  msgid "Real-Time"
95
  msgstr "Valós idejű"
96
 
97
- #: .././admin/dashboard_widgets.php:277
98
  msgid "Today"
99
  msgstr "Ma"
100
 
101
- #: .././admin/dashboard_widgets.php:279
102
  msgid "Yesterday"
103
  msgstr "Tegnap"
104
 
105
- #: .././admin/dashboard_widgets.php:281 .././front/widgets.php:83
106
- #: .././front/widgets.php:199
107
  msgid "Last 7 Days"
108
  msgstr "Elmúlt 7 nap"
109
 
110
- #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:86
111
- #: .././front/widgets.php:200
112
  msgid "Last 14 Days"
113
  msgstr "Elmúlt 14 nap"
114
 
115
- #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:89
116
- #: .././front/widgets.php:201
117
  msgid "Last 30 Days"
118
  msgstr "Elmúlt 30 nap"
119
 
120
- #: .././admin/dashboard_widgets.php:287
121
  msgid "Last 90 Days"
122
  msgstr "Elmúlt 90 nap"
123
 
124
- #: .././admin/dashboard_widgets.php:293 .././admin/dashboard_widgets.php:952
125
- #: .././front/widgets.php:44 .././tools/gapi.php:384 .././tools/gapi.php:543
126
- #: .././tools/gapi.php:587 .././tools/gapi.php:658 .././tools/gapi.php:808
127
- #: .././tools/gapi.php:899
128
  msgid "Sessions"
129
  msgstr ""
130
 
131
- #: .././admin/dashboard_widgets.php:294 .././admin/dashboard_widgets.php:956
132
- #: .././tools/gapi.php:368
133
  msgid "Users"
134
  msgstr ""
135
 
136
- #: .././admin/dashboard_widgets.php:296
137
  msgid "Organic"
138
  msgstr "Organikus"
139
 
140
- #: .././admin/dashboard_widgets.php:298 .././admin/dashboard_widgets.php:960
141
- #: .././tools/gapi.php:372
142
  msgid "Page Views"
143
  msgstr "Oldalmegtekintések"
144
 
145
- #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:964
146
- #: .././tools/gapi.php:376
147
  msgid "Bounce Rate"
148
  msgstr "Visszafordulási arány"
149
 
150
- #: .././admin/dashboard_widgets.php:302
151
  msgid "Location"
152
  msgstr ""
153
 
154
- #: .././admin/dashboard_widgets.php:304 .././tools/gapi.php:500
155
  msgid "Pages"
156
  msgstr ""
157
 
158
- #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:543
159
  msgid "Referrers"
160
  msgstr ""
161
 
162
- #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:587
 
163
  msgid "Searches"
164
  msgstr ""
165
 
166
- #: .././admin/dashboard_widgets.php:310
167
  msgid "Traffic Details"
168
  msgstr ""
169
 
170
- #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:657
171
  msgid "REFERRAL"
172
  msgstr "HIVATKOZÓ"
173
 
174
- #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:658
175
  msgid "ORGANIC"
176
  msgstr "ORGANIKUS"
177
 
178
- #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:544
179
- #: .././admin/dashboard_widgets.php:659
180
  msgid "SOCIAL"
181
  msgstr "KÖZÖSSÉGI"
182
 
183
- #: .././admin/dashboard_widgets.php:428 .././admin/dashboard_widgets.php:547
184
- #: .././admin/dashboard_widgets.php:660
185
  msgid "CAMPAIGN"
186
  msgstr ""
187
 
188
- #: .././admin/dashboard_widgets.php:432 .././admin/dashboard_widgets.php:550
189
- #: .././admin/dashboard_widgets.php:663
190
  msgid "DIRECT"
191
  msgstr "KÖZVETLEN"
192
 
193
- #: .././admin/dashboard_widgets.php:436 .././admin/dashboard_widgets.php:664
194
  msgid "NEW"
195
  msgstr "ÚJ"
196
 
197
- #: .././admin/dashboard_widgets.php:538
198
  msgid "REFERRALS"
199
  msgstr "HIVATKOZÓK"
200
 
201
- #: .././admin/dashboard_widgets.php:541
202
  msgid "KEYWORDS"
203
  msgstr "KULCSSZAVAK"
204
 
205
- #: .././admin/dashboard_widgets.php:690 .././admin/dashboard_widgets.php:702
206
- #: .././admin/dashboard_widgets.php:757 .././admin/dashboard_widgets.php:769
207
- #: .././admin/dashboard_widgets.php:781 .././admin/dashboard_widgets.php:793
208
- #: .././admin/dashboard_widgets.php:806 .././admin/dashboard_widgets.php:905
209
- #: .././admin/dashboard_widgets.php:908 .././admin/dashboard_widgets.php:992
210
- #: .././admin/dashboard_widgets.php:1004 .././front/frontend.php:88
211
- #: .././front/frontend.php:100 .././front/widgets.php:122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  msgid "This report is unavailable"
213
  msgstr ""
214
 
215
- #: .././admin/dashboard_widgets.php:818
216
  msgid "Traffic Mediums"
217
  msgstr ""
218
 
219
- #: .././admin/dashboard_widgets.php:834
220
  msgid "Visitor Type"
221
  msgstr ""
222
 
223
- #: .././admin/dashboard_widgets.php:850
224
  msgid "Social Networks"
225
  msgstr ""
226
 
227
- #: .././admin/dashboard_widgets.php:866
228
  msgid "Search Engines"
229
  msgstr ""
230
 
231
- #: .././admin/dashboard_widgets.php:968
232
  msgid "Organic Search"
233
  msgstr ""
234
 
235
- #: .././admin/dashboard_widgets.php:972
236
  msgid "Pages/Session"
237
  msgstr ""
238
 
239
- #: .././admin/ga_dash_settings.php:78 .././admin/ga_dash_settings.php:200
240
- #: .././admin/ga_dash_settings.php:418 .././admin/ga_dash_settings.php:841
241
- #: .././admin/ga_dash_settings.php:1228
242
  msgid "Settings saved."
243
  msgstr ""
244
 
245
- #: .././admin/ga_dash_settings.php:80 .././admin/ga_dash_settings.php:202
246
- #: .././admin/ga_dash_settings.php:420 .././admin/ga_dash_settings.php:824
247
- #: .././admin/ga_dash_settings.php:834 .././admin/ga_dash_settings.php:843
248
- #: .././admin/ga_dash_settings.php:855 .././admin/ga_dash_settings.php:1183
249
- #: .././admin/ga_dash_settings.php:1211 .././admin/ga_dash_settings.php:1221
250
- #: .././admin/ga_dash_settings.php:1230 .././admin/ga_dash_settings.php:1242
251
  msgid "Cheating Huh?"
252
  msgstr ""
253
 
254
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
255
- #: .././admin/ga_dash_settings.php:424
256
- msgid "Something went wrong, you need to"
257
- msgstr "Valami rosszul ment, szükséges a "
 
258
 
259
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
260
- #: .././admin/ga_dash_settings.php:424
 
 
 
 
 
 
 
261
  msgid "auhorize the plugin"
262
  msgstr "bővítményt engedélyezni"
263
 
264
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
265
- #: .././admin/ga_dash_settings.php:424
266
- msgid "or properly configure your"
267
- msgstr "vagy helyesen beállítani a"
268
-
269
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
270
- #: .././admin/ga_dash_settings.php:424
271
- msgid "Google Analytics account"
272
- msgstr "Google Analytics fiókját"
273
-
274
- #: .././admin/ga_dash_settings.php:90
275
  msgid "Google Analytics Frontend Settings"
276
  msgstr "Google Analytics weblap beállítások"
277
 
278
- #: .././admin/ga_dash_settings.php:103 .././admin/ga_dash_settings.php:225
279
  msgid "Show stats to:"
280
  msgstr ""
281
 
282
- #: .././admin/ga_dash_settings.php:153
283
  msgid " show page sessions and users in frontend (after each article)"
284
  msgstr ""
285
 
286
- #: .././admin/ga_dash_settings.php:169
287
  msgid " show page searches (after each article)"
288
  msgstr "oldal keresések mutatása (minden cikk után)"
289
 
290
- #: .././admin/ga_dash_settings.php:178 .././admin/ga_dash_settings.php:391
291
- #: .././admin/ga_dash_settings.php:739 .././admin/ga_dash_settings.php:1053
292
- #: .././admin/ga_dash_settings.php:1456
293
  msgid "Save Changes"
294
  msgstr ""
295
 
296
- #: .././admin/ga_dash_settings.php:212
297
  msgid "Google Analytics Dashboard Settings"
298
  msgstr "Google Analytics vezérlőpult beállítások"
299
 
300
- #: .././admin/ga_dash_settings.php:275
301
  msgid "disable Switch Profile/View functionality"
302
  msgstr "Profil/Nézet Kapcsoló letiltása"
303
 
304
- #: .././admin/ga_dash_settings.php:279
305
  msgid "Real-Time Settings"
306
  msgstr "Valós idejű beállítások"
307
 
308
- #: .././admin/ga_dash_settings.php:282
309
  msgid "Maximum number of pages to display on real-time tab:"
310
  msgstr "Maximális oldalszám megjelenítése a valós idejű fülön:"
311
 
312
- #: .././admin/ga_dash_settings.php:287
313
- msgid "(find out more"
314
- msgstr "(tudjon meg többet"
315
 
316
- #: .././admin/ga_dash_settings.php:289 .././admin/ga_dash_settings.php:324
317
  msgid "about this feature"
318
  msgstr "erről a szolgáltatásról"
319
 
320
- #: .././admin/ga_dash_settings.php:290 .././admin/ga_dash_settings.php:325
321
- msgid ")"
322
- msgstr ")"
 
 
 
 
323
 
324
- #: .././admin/ga_dash_settings.php:293
325
- msgid "Additional Stats & Charts"
326
- msgstr "További statisztikák és grafikonok"
327
 
328
- #: .././admin/ga_dash_settings.php:306
329
- msgid " show Geo Map chart for sessions"
330
  msgstr ""
331
 
332
- #: .././admin/ga_dash_settings.php:311
333
- msgid "Target Geo Map to region:"
334
- msgstr "Cél földrajzi térkép a régióban:"
335
 
336
- #: .././admin/ga_dash_settings.php:316
337
- msgid "and render top"
338
- msgstr "és mutassa a top"
339
 
340
- #: .././admin/ga_dash_settings.php:321
341
- msgid "cities (find out more"
342
- msgstr "várost (tudjon meg többet"
343
 
344
- #: .././admin/ga_dash_settings.php:339
345
- msgid " show traffic overview"
346
- msgstr "forgalom áttekintés bekapcsolása"
347
 
348
- #: .././admin/ga_dash_settings.php:353
349
- msgid " show top pages"
350
- msgstr "legnépszerűbb oldalak bekapcsolása"
351
 
352
- #: .././admin/ga_dash_settings.php:367
353
- msgid " show top referrers"
354
- msgstr "leggyakoribb hivatkozók bekapcsolása"
355
 
356
- #: .././admin/ga_dash_settings.php:381
357
- msgid " show top searches"
358
- msgstr "legfőbb keresések bekapcsolása"
 
359
 
360
- #: .././admin/ga_dash_settings.php:430
361
- msgid "Google Analytics Tracking Code"
362
- msgstr "Google Analytics követőkód"
363
 
364
- #: .././admin/ga_dash_settings.php:440
365
  msgid "Tracking Settings"
366
  msgstr "Követési beállítások"
367
 
368
- #: .././admin/ga_dash_settings.php:443
369
  msgid "Tracking Options:"
370
  msgstr ""
371
 
372
- #: .././admin/ga_dash_settings.php:447
373
  msgid "Disabled"
374
  msgstr "Letiltva"
375
 
376
- #: .././admin/ga_dash_settings.php:449
377
- msgid "Enabled"
378
- msgstr "Engedélyezve"
379
-
380
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
381
  msgid "Tracking ID:"
382
  msgstr "Követési azonosító:"
383
 
384
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
385
  msgid "Default URL:"
386
  msgstr "Alapértelmezett webcím:"
387
 
388
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
389
  msgid "Time Zone:"
390
  msgstr "Időzóna:"
391
 
392
- #: .././admin/ga_dash_settings.php:467
393
  #, fuzzy
394
  msgid "Basic Tracking"
395
  msgstr "Események követése"
396
 
397
- #: .././admin/ga_dash_settings.php:473
398
  msgid "Tracking Type:"
399
  msgstr ""
400
 
401
- #: .././admin/ga_dash_settings.php:477
402
  msgid "Classic Analytics"
403
  msgstr "Klasszikus Analytics"
404
 
405
- #: .././admin/ga_dash_settings.php:479
406
  msgid "Universal Analytics"
407
  msgstr "Univerzális Analytics"
408
 
409
- #: .././admin/ga_dash_settings.php:493
410
  msgid " anonymize IPs while tracking"
411
  msgstr "nyomon követés közben IP anonimizálása"
412
 
413
- #: .././admin/ga_dash_settings.php:508
414
  msgid " enable remarketing, demographics and interests reports"
415
  msgstr "lehetővé remarketing, demográfia és érdeklődés jelentések"
416
 
417
- #: .././admin/ga_dash_settings.php:512
418
- msgid "Events Tracking"
419
- msgstr "Események követése"
420
-
421
- #: .././admin/ga_dash_settings.php:525
422
  msgid " track downloads, mailto and outbound links"
423
  msgstr "letöltések, mailto és kimenő linkek követése"
424
 
425
- #: .././admin/ga_dash_settings.php:529
426
  #, fuzzy
427
  msgid "Downloads Regex:"
428
  msgstr "Letöltés szűrők:"
429
 
430
- #: .././admin/ga_dash_settings.php:546
431
  msgid " track affiliate links matching this regex"
432
  msgstr ""
433
 
434
- #: .././admin/ga_dash_settings.php:550
435
  msgid "Affiliates Regex:"
436
  msgstr ""
437
 
438
- #: .././admin/ga_dash_settings.php:567
439
  msgid " track fragment identifiers, hashmarks (#) in URI links"
440
  msgstr ""
441
 
442
- #: .././admin/ga_dash_settings.php:571
443
- msgid "Custom Definitions"
444
- msgstr ""
445
-
446
- #: .././admin/ga_dash_settings.php:574
447
  msgid "Authors:"
448
  msgstr ""
449
 
450
- #: .././admin/ga_dash_settings.php:584
451
  msgid "Publication Year:"
452
  msgstr ""
453
 
454
- #: .././admin/ga_dash_settings.php:594
455
  msgid "Categories:"
456
  msgstr ""
457
 
458
- #: .././admin/ga_dash_settings.php:604
459
  msgid "User Type:"
460
  msgstr ""
461
 
462
- #: .././admin/ga_dash_settings.php:614
463
  #, fuzzy
464
  msgid "Advanced Tracking"
465
  msgstr "Események követése"
466
 
467
- #: .././admin/ga_dash_settings.php:617
468
  #, fuzzy
469
  msgid "Page Speed SR:"
470
  msgstr "Oldal / látogató"
471
 
472
- #: .././admin/ga_dash_settings.php:635
473
  msgid " exclude events from bounce-rate calculation"
474
  msgstr ""
475
 
476
- #: .././admin/ga_dash_settings.php:649
477
  msgid " enable enhanced link attribution"
478
  msgstr "kibővített link tulajdonság engedélyezése"
479
 
480
- #: .././admin/ga_dash_settings.php:663
481
  msgid " enable AdSense account linking"
482
  msgstr ""
483
 
484
- #: .././admin/ga_dash_settings.php:678
485
  msgid " enable cross domain tracking"
486
  msgstr ""
487
 
488
- #: .././admin/ga_dash_settings.php:682
489
  msgid "Cross Domains:"
490
  msgstr ""
491
 
492
- #: .././admin/ga_dash_settings.php:692 .././admin/ga_dash_settings.php:1396
493
- msgid "Exclude Tracking"
494
- msgstr "Követés kizárás"
495
-
496
- #: .././admin/ga_dash_settings.php:695
497
  msgid "Exclude tracking for:"
498
  msgstr ""
499
 
500
- #: .././admin/ga_dash_settings.php:769 .././admin/ga_dash_settings.php:1138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
501
  msgid ""
502
  "Loading the required libraries. If this results in a blank screen or a fatal "
503
  "error, try this solution:"
504
  msgstr ""
505
 
506
- #: .././admin/ga_dash_settings.php:781 .././admin/ga_dash_settings.php:1150
507
  msgid "Plugin authorization succeeded."
508
  msgstr "Bővítmény engedélyezése sikeres."
509
 
510
- #: .././admin/ga_dash_settings.php:796 .././admin/ga_dash_settings.php:1173
511
  msgid ""
512
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
513
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
514
  msgstr ""
515
 
516
- #: .././admin/ga_dash_settings.php:822 .././admin/ga_dash_settings.php:1209
517
  msgid "Cleared Cache."
518
  msgstr "Cache kiűrítve."
519
 
520
- #: .././admin/ga_dash_settings.php:831 .././admin/ga_dash_settings.php:1218
521
  msgid "Token Reseted and Revoked."
522
  msgstr "Token visszaállítva és visszavonva."
523
 
524
- #: .././admin/ga_dash_settings.php:838 .././admin/ga_dash_settings.php:1225
525
- msgid "Dumping log data."
526
- msgstr "Napló adat ürítése."
527
-
528
- #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1235
529
  msgid "All other domains/properties were removed."
530
  msgstr "Összes többi domain/tulajdon eltávolításra került."
531
 
532
- #: .././admin/ga_dash_settings.php:859 .././admin/ga_dash_settings.php:1246
533
- msgid ""
534
- "PHP CURL is required. Ask your hosting provider to install/enable PHP CURL!"
535
- msgstr ""
536
-
537
- #: .././admin/ga_dash_settings.php:863 .././admin/ga_dash_settings.php:1250
538
  msgid "Google Analytics Settings"
539
  msgstr "Google Analytics beállítások"
540
 
541
- #: .././admin/ga_dash_settings.php:872 .././admin/ga_dash_settings.php:1258
542
- msgid ""
543
- "Something went wrong. Please check the Debugging Data section for possible "
544
- "errors"
545
- msgstr ""
546
- "Valami rosszul ment. Kérjük, ellenőrizze a hibakeresés adatok részben az "
547
- "esetleges hibákat"
548
-
549
- #: .././admin/ga_dash_settings.php:878 .././admin/ga_dash_settings.php:1263
550
  msgid "Use the red link (see below) to generate and get your access code!"
551
  msgstr ""
552
 
553
- #: .././admin/ga_dash_settings.php:889 .././admin/ga_dash_settings.php:1297
554
  msgid "Plugin Authorization"
555
  msgstr "Bővítmény engedélyezés"
556
 
557
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
558
  msgid "You should watch the"
559
  msgstr "Kérjük, nézze meg ezt a"
560
 
561
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
562
  msgid "video"
563
  msgstr "videót"
564
 
565
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
566
  msgid "and read this"
567
  msgstr "és olvassa el ezt az"
568
 
569
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
570
  msgid "tutorial"
571
  msgstr "oktatói anyagot"
572
 
573
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
574
  msgid ""
575
  "before proceeding to authorization. This plugin requires a properly "
576
  "configured Google Analytics account"
@@ -578,280 +611,329 @@ msgstr ""
578
  "mielőtt engedélyezné. Ezt a bővítményt csak helyesen beállított Google "
579
  "Analytics fiókkal lehet használni"
580
 
581
- #: .././admin/ga_dash_settings.php:905 .././admin/ga_dash_settings.php:1312
582
  msgid " use your own API Project credentials"
583
  msgstr "használja a saját API Project hitelesítő adatait"
584
 
585
- #: .././admin/ga_dash_settings.php:912 .././admin/ga_dash_settings.php:1319
586
  msgid "API Key:"
587
  msgstr "API key:"
588
 
589
- #: .././admin/ga_dash_settings.php:919 .././admin/ga_dash_settings.php:1326
590
  msgid "Client ID:"
591
  msgstr "Client ID:"
592
 
593
- #: .././admin/ga_dash_settings.php:926 .././admin/ga_dash_settings.php:1334
594
  msgid "Client Secret:"
595
  msgstr "Client Secret:"
596
 
597
- #: .././admin/ga_dash_settings.php:944 .././admin/ga_dash_settings.php:1352
598
  msgid "Clear Authorization"
599
  msgstr "Engedélyezés törlése"
600
 
601
- #: .././admin/ga_dash_settings.php:948 .././admin/ga_dash_settings.php:1067
602
- #: .././admin/ga_dash_settings.php:1355 .././admin/ga_dash_settings.php:1469
603
  msgid "Clear Cache"
604
  msgstr "Cache ürítése"
605
 
606
- #: .././admin/ga_dash_settings.php:957
607
  msgid "Select Domain:"
608
  msgstr ""
609
 
610
- #: .././admin/ga_dash_settings.php:970 .././admin/ga_dash_settings.php:1387
611
  msgid "Property not found"
612
  msgstr ""
613
 
614
- #: .././admin/ga_dash_settings.php:975
615
  msgid "and/or hide all other domains"
616
  msgstr "és/vagy az összes többi domain eltüntetése"
617
 
618
- #: .././admin/ga_dash_settings.php:978
619
  msgid "Hide Now"
620
  msgstr "Elrejtés most"
621
 
622
- #: .././admin/ga_dash_settings.php:997
623
  msgid "Theme Color:"
624
  msgstr ""
625
 
626
- #: .././admin/ga_dash_settings.php:1007
627
  msgid "A new frontend widget is available! To enable it, go to"
628
  msgstr "Elérhető egy új frontend widget! Engedélyezéshez, menjen a"
629
 
630
- #: .././admin/ga_dash_settings.php:1007
631
  msgid "Appearance -> Widgets"
632
  msgstr "Megjelenés -> Widgetek"
633
 
634
- #: .././admin/ga_dash_settings.php:1007
635
  msgid "and look for Google Analytics Dashboard."
636
  msgstr "menühöz és keresse a Google Analytics vezérlőpultot."
637
 
638
- #: .././admin/ga_dash_settings.php:1013 .././admin/ga_dash_settings.php:1073
639
- #: .././admin/ga_dash_settings.php:1416 .././admin/ga_dash_settings.php:1475
640
- msgid "Debugging Data"
641
- msgstr "Hibakeresés adatok"
642
-
643
- #: .././admin/ga_dash_settings.php:1180
644
  msgid "Properties refreshed."
645
  msgstr ""
646
 
647
- #: .././admin/ga_dash_settings.php:1274
648
  msgid "Network Setup"
649
  msgstr ""
650
 
651
- #: .././admin/ga_dash_settings.php:1289
652
  msgid " use a single Google Analytics account for the entire network"
653
  msgstr ""
654
 
655
- #: .././admin/ga_dash_settings.php:1358
656
  msgid "Refresh Properties"
657
  msgstr ""
658
 
659
- #: .././admin/ga_dash_settings.php:1364
660
  #, fuzzy
661
  msgid "Properties/Views Settings"
662
  msgstr "Weblap beállítások"
663
 
664
- #: .././admin/ga_dash_settings.php:1409
665
  msgid " exclude Super Admin tracking for the entire network"
666
  msgstr ""
667
 
668
- #: .././admin/ga_dash_settings.php:1537
669
  msgid "Setup Tutorial & Demo"
670
  msgstr "Beállítás oktató anyag és demo"
671
 
672
- #: .././admin/ga_dash_settings.php:1549
673
  msgid "Support & Reviews"
674
  msgstr "Támogatás és vélemények"
675
 
676
- #: .././admin/ga_dash_settings.php:1557
677
  msgid "Plugin documentation and support on"
678
  msgstr ""
679
 
680
- #: .././admin/ga_dash_settings.php:1564
681
  msgid "Your feedback and review are both important,"
682
  msgstr "Az Ön visszajelzése és értékelése egyaránt fontos számunkra,"
683
 
684
- #: .././admin/ga_dash_settings.php:1564
685
  msgid "rate this plugin"
686
  msgstr "értékelje ezt a bővítményt"
687
 
688
- #: .././admin/ga_dash_settings.php:1569
689
  msgid "Further Reading"
690
  msgstr "További olvasmány"
691
 
692
- #: .././admin/ga_dash_settings.php:1576
693
  msgid "Improve search rankings"
694
  msgstr ""
695
 
696
- #: .././admin/ga_dash_settings.php:1576
697
  msgid "by moving your website to HTTPS/SSL."
698
  msgstr ""
699
 
700
- #: .././admin/ga_dash_settings.php:1582
701
  msgid "Other"
702
  msgstr "Egyéb"
703
 
704
- #: .././admin/ga_dash_settings.php:1582
705
  msgid "WordPress Plugins"
706
  msgstr "WordPress bővítmények"
707
 
708
- #: .././admin/ga_dash_settings.php:1582
709
  msgid "written by the same author"
710
  msgstr "ettől a szerzőtől"
711
 
712
- #: .././admin/ga_dash_settings.php:1587
713
  msgid "Other Services"
714
  msgstr ""
715
 
716
- #: .././admin/ga_dash_settings.php:1594
717
  msgid "Speed up your website and plug into a whole"
718
  msgstr ""
719
 
720
- #: .././admin/ga_dash_settings.php:1594
721
  msgid "new level of site speed"
722
  msgstr ""
723
 
724
- #: .././admin/ga_dash_settings.php:1600
725
  msgid "Web Analytics"
726
  msgstr "Web Analitika"
727
 
728
- #: .././admin/ga_dash_settings.php:1600
729
  msgid "service with users tracking at IP level."
730
  msgstr ""
731
 
732
- #: .././front/frontend.php:112
733
  msgid "Views vs UniqueViews"
734
  msgstr "Látogatások vs egyedi látogatások"
735
 
736
- #: .././front/frontend.php:168
737
  msgid "Google Analytics Reports"
738
  msgstr ""
739
 
740
- #: .././front/widgets.php:16
741
  msgid "Will display your google analytics stats in a widget"
742
  msgstr "Megjelenik a Google Analytics statisztika egy widgetben"
743
 
744
- #: .././front/widgets.php:44 .././tools/gapi.php:808
745
  msgid "trend"
746
  msgstr ""
747
 
748
- #: .././front/widgets.php:144
749
  msgid "Period:"
750
  msgstr "Időszak:"
751
 
752
- #: .././front/widgets.php:144
753
  msgid "Sessions:"
754
  msgstr ""
755
 
756
- #: .././front/widgets.php:150
757
  msgid "generated by"
758
  msgstr "által generált"
759
 
760
- #: .././front/widgets.php:164
761
  msgid "Google Analytics Stats"
762
  msgstr "Google Analytics statisztika"
763
 
764
- #: .././front/widgets.php:171
765
  msgid "Title:"
766
  msgstr "Cím:"
767
 
768
- #: .././front/widgets.php:178
769
  msgid "Display:"
770
  msgstr "Megjelenés:"
771
 
772
- #: .././front/widgets.php:182
773
  msgid "Chart & Totals"
774
  msgstr "Diagram és összegzés"
775
 
776
- #: .././front/widgets.php:183
777
  msgid "Chart"
778
  msgstr "Diagram"
779
 
780
- #: .././front/widgets.php:184
781
  msgid "Totals"
782
  msgstr "Összes"
783
 
784
- #: .././front/widgets.php:188
785
- msgid "Anonimize chart&#39;s stats:"
786
- msgstr "Grafikon statisztika anonimizálás:"
787
 
788
- #: .././front/widgets.php:195
789
  msgid "Stats for:"
790
  msgstr "Statisztika:"
791
 
792
- #: .././front/widgets.php:205
793
  msgid "Give credits:"
794
  msgstr "Köszönet:"
795
 
796
- #: .././tools/gapi.php:140
797
  msgid "Use this link to get your access code:"
798
  msgstr "Használja ezt a linket, hogy a hozzáférési kódot megkapja:"
799
 
800
- #: .././tools/gapi.php:140
801
  msgid "Get Access Code"
802
  msgstr "Hozzáférési kód beszerzése"
803
 
804
- #: .././tools/gapi.php:145 .././tools/gapi.php:149
805
  msgid "Use the red link to get your access code!"
806
  msgstr ""
807
 
808
- #: .././tools/gapi.php:145
809
  msgid "Access Code:"
810
  msgstr "Hozzáférési kód:"
811
 
812
- #: .././tools/gapi.php:157
813
  msgid "Save Access Code"
814
  msgstr "Hozzáférési kód mentése"
815
 
816
- #: .././tools/gapi.php:380
817
  msgid "Organic Searches"
818
  msgstr "Organikus keresés"
819
 
820
- #: .././tools/gapi.php:391
821
  msgid "Hour"
822
  msgstr "Óra"
823
 
824
- #: .././tools/gapi.php:394 .././tools/gapi.php:808 .././tools/gapi.php:852
825
  msgid "Date"
826
  msgstr "Dátum"
827
 
828
- #: .././tools/gapi.php:500 .././tools/gapi.php:852
829
  msgid "Views"
830
  msgstr "Látogatások"
831
 
832
- #: .././tools/gapi.php:611
833
  msgid "Countries"
834
  msgstr ""
835
 
836
- #: .././tools/gapi.php:629
837
  msgid "Cities from"
838
  msgstr ""
839
 
840
- #: .././tools/gapi.php:691
841
  msgid "Channels"
842
  msgstr ""
843
 
844
- #: .././tools/gapi.php:754
845
  msgid "Type"
846
  msgstr "Típus"
847
 
848
- #: .././tools/gapi.php:852
849
  msgid "UniqueViews"
850
  msgstr "Egyedi látogatások"
851
 
852
- #: .././tools/gapi.php:899
853
- msgid "Top Searches"
854
- msgstr "Legfőbb keresések"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
855
 
856
  #~ msgid "Error Log"
857
  #~ msgstr "Hiba napló"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP 4.2.20\n"
4
+ "POT-Creation-Date: 2015-02-07 11:40+0200\n"
5
+ "PO-Revision-Date: 2015-02-07 11:40+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: hu_HU\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.7.4\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
+ #: .././admin/dashboard_widgets.php:67 .././admin/dashboard_widgets.php:100
20
  msgid "Google Analytics"
21
  msgstr "Google Analytics"
22
 
23
+ #: .././admin/dashboard_widgets.php:71 .././admin/dashboard_widgets.php:104
24
+ #: .././admin/ga_dash_settings.php:105 .././admin/ga_dash_settings.php:216
25
+ #: .././admin/ga_dash_settings.php:964
26
  msgid "General Settings"
27
  msgstr "Általános beállítások"
28
 
29
+ #: .././admin/dashboard_widgets.php:75
30
  msgid "Backend Settings"
31
  msgstr "Admin beállítások"
32
 
33
+ #: .././admin/dashboard_widgets.php:79
34
  msgid "Frontend Settings"
35
  msgstr "Weblap beállítások"
36
 
37
+ #: .././admin/dashboard_widgets.php:83
38
  msgid "Tracking Code"
39
  msgstr "Követőkód"
40
 
41
+ #: .././admin/dashboard_widgets.php:87 .././admin/dashboard_widgets.php:108
42
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
43
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
44
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
45
+ msgid "Errors & Debug"
46
+ msgstr ""
47
+
48
+ #: .././admin/dashboard_widgets.php:152
49
  msgid "Settings"
50
  msgstr "Beállítások"
51
 
52
+ #: .././admin/dashboard_widgets.php:166 .././front/widgets.php:14
53
  msgid "Google Analytics Dashboard"
54
  msgstr "Google Analytics vezérlőpult"
55
 
56
+ #: .././admin/dashboard_widgets.php:183
57
  msgid "This plugin needs an authorization:"
58
  msgstr "Ennek a bővítménynek engedélyre van szüksége:"
59
 
60
+ #: .././admin/dashboard_widgets.php:183 .././admin/ga_dash_settings.php:1035
61
+ #: .././admin/ga_dash_settings.php:1360
62
  msgid "Authorize Plugin"
63
  msgstr "Bővítmény engedélyezése"
64
 
65
+ #: .././admin/dashboard_widgets.php:216 .././admin/ga_dash_settings.php:380
66
+ #: .././admin/ga_dash_settings.php:976 .././admin/ga_dash_settings.php:1001
67
+ #: .././admin/ga_dash_settings.php:1315
68
  msgid "View Name:"
69
  msgstr "Név:"
70
 
71
+ #: .././admin/dashboard_widgets.php:221
72
  msgid "Something went wrong while retrieving profiles list."
73
  msgstr "Valami rosszul ment a profil lista lekérése közben."
74
 
75
+ #: .././admin/dashboard_widgets.php:221
76
  msgid "More details"
77
  msgstr "További részletek"
78
 
79
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
80
  msgid "An admin should asign a default Google Analytics Profile."
81
  msgstr ""
82
  "Az alapértelmezett Google Analytics profilt egy admin képes kijelölni."
83
 
84
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
85
  msgid "Select Domain"
86
  msgstr "Domain kiválasztása"
87
 
88
+ #: .././admin/dashboard_widgets.php:250
89
  msgid ""
90
  "Something went wrong while retrieving property data. You need to create and "
91
  "properly configure a Google Analytics account:"
93
  "Valami rosszul ment a tulajdon adat lekérése közben. Egy jól konfigurált "
94
  "Google Analytics fiókra van szüksége:"
95
 
96
+ #: .././admin/dashboard_widgets.php:250
97
  msgid "Find out more!"
98
  msgstr "Tudjon meg többet!"
99
 
100
+ #: .././admin/dashboard_widgets.php:278
101
  msgid "Real-Time"
102
  msgstr "Valós idejű"
103
 
104
+ #: .././admin/dashboard_widgets.php:279
105
  msgid "Today"
106
  msgstr "Ma"
107
 
108
+ #: .././admin/dashboard_widgets.php:281
109
  msgid "Yesterday"
110
  msgstr "Tegnap"
111
 
112
+ #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:72
113
+ #: .././front/widgets.php:182
114
  msgid "Last 7 Days"
115
  msgstr "Elmúlt 7 nap"
116
 
117
+ #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:75
118
+ #: .././front/widgets.php:183
119
  msgid "Last 14 Days"
120
  msgstr "Elmúlt 14 nap"
121
 
122
+ #: .././admin/dashboard_widgets.php:287 .././front/widgets.php:78
123
+ #: .././front/widgets.php:184
124
  msgid "Last 30 Days"
125
  msgstr "Elmúlt 30 nap"
126
 
127
+ #: .././admin/dashboard_widgets.php:289
128
  msgid "Last 90 Days"
129
  msgstr "Elmúlt 90 nap"
130
 
131
+ #: .././admin/dashboard_widgets.php:295 .././admin/dashboard_widgets.php:1037
132
+ #: .././front/widgets.php:40 .././tools/gapi.php:376 .././tools/gapi.php:515
133
+ #: .././tools/gapi.php:554 .././tools/gapi.php:615 .././tools/gapi.php:744
134
+ #: .././tools/gapi.php:825
135
  msgid "Sessions"
136
  msgstr ""
137
 
138
+ #: .././admin/dashboard_widgets.php:296 .././admin/dashboard_widgets.php:1041
139
+ #: .././tools/gapi.php:364
140
  msgid "Users"
141
  msgstr ""
142
 
143
+ #: .././admin/dashboard_widgets.php:298
144
  msgid "Organic"
145
  msgstr "Organikus"
146
 
147
+ #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:1045
148
+ #: .././tools/gapi.php:367
149
  msgid "Page Views"
150
  msgstr "Oldalmegtekintések"
151
 
152
+ #: .././admin/dashboard_widgets.php:302 .././admin/dashboard_widgets.php:1049
153
+ #: .././tools/gapi.php:370
154
  msgid "Bounce Rate"
155
  msgstr "Visszafordulási arány"
156
 
157
+ #: .././admin/dashboard_widgets.php:304
158
  msgid "Location"
159
  msgstr ""
160
 
161
+ #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:477
162
  msgid "Pages"
163
  msgstr ""
164
 
165
+ #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:515
166
  msgid "Referrers"
167
  msgstr ""
168
 
169
+ #: .././admin/dashboard_widgets.php:310 .././tools/gapi.php:554
170
+ #: .././tools/gapi.php:825
171
  msgid "Searches"
172
  msgstr ""
173
 
174
+ #: .././admin/dashboard_widgets.php:312
175
  msgid "Traffic Details"
176
  msgstr ""
177
 
178
+ #: .././admin/dashboard_widgets.php:404 .././admin/dashboard_widgets.php:645
179
  msgid "REFERRAL"
180
  msgstr "HIVATKOZÓ"
181
 
182
+ #: .././admin/dashboard_widgets.php:408 .././admin/dashboard_widgets.php:646
183
  msgid "ORGANIC"
184
  msgstr "ORGANIKUS"
185
 
186
+ #: .././admin/dashboard_widgets.php:412 .././admin/dashboard_widgets.php:532
187
+ #: .././admin/dashboard_widgets.php:647
188
  msgid "SOCIAL"
189
  msgstr "KÖZÖSSÉGI"
190
 
191
+ #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:535
192
+ #: .././admin/dashboard_widgets.php:648
193
  msgid "CAMPAIGN"
194
  msgstr ""
195
 
196
+ #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:538
197
+ #: .././admin/dashboard_widgets.php:651
198
  msgid "DIRECT"
199
  msgstr "KÖZVETLEN"
200
 
201
+ #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:652
202
  msgid "NEW"
203
  msgstr "ÚJ"
204
 
205
+ #: .././admin/dashboard_widgets.php:526
206
  msgid "REFERRALS"
207
  msgstr "HIVATKOZÓK"
208
 
209
+ #: .././admin/dashboard_widgets.php:529
210
  msgid "KEYWORDS"
211
  msgstr "KULCSSZAVAK"
212
 
213
+ #: .././admin/dashboard_widgets.php:683 .././admin/dashboard_widgets.php:780
214
+ #: .././admin/dashboard_widgets.php:972 .././admin/dashboard_widgets.php:1083
215
+ #: .././front/frontend.php:88
216
+ msgid "A JavaScript Error is blocking plugin resources!"
217
+ msgstr ""
218
+
219
+ #: .././admin/dashboard_widgets.php:696 .././admin/dashboard_widgets.php:715
220
+ #: .././admin/dashboard_widgets.php:793 .././admin/dashboard_widgets.php:824
221
+ #: .././admin/dashboard_widgets.php:843 .././admin/dashboard_widgets.php:863
222
+ #: .././admin/dashboard_widgets.php:986 .././admin/dashboard_widgets.php:1096
223
+ #: .././admin/dashboard_widgets.php:1115 .././front/frontend.php:100
224
+ #: .././front/frontend.php:119
225
+ msgid "Invalid response, more details in JavaScript Console (F12)."
226
+ msgstr ""
227
+
228
+ #: .././admin/dashboard_widgets.php:701 .././admin/dashboard_widgets.php:720
229
+ #: .././admin/dashboard_widgets.php:798 .././admin/dashboard_widgets.php:810
230
+ #: .././admin/dashboard_widgets.php:829 .././admin/dashboard_widgets.php:848
231
+ #: .././admin/dashboard_widgets.php:868 .././admin/dashboard_widgets.php:991
232
+ #: .././admin/dashboard_widgets.php:994 .././admin/dashboard_widgets.php:1101
233
+ #: .././admin/dashboard_widgets.php:1120 .././front/frontend.php:105
234
+ #: .././front/frontend.php:124 .././front/widgets.php:110
235
  msgid "This report is unavailable"
236
  msgstr ""
237
 
238
+ #: .././admin/dashboard_widgets.php:880
239
  msgid "Traffic Mediums"
240
  msgstr ""
241
 
242
+ #: .././admin/dashboard_widgets.php:896
243
  msgid "Visitor Type"
244
  msgstr ""
245
 
246
+ #: .././admin/dashboard_widgets.php:912
247
  msgid "Social Networks"
248
  msgstr ""
249
 
250
+ #: .././admin/dashboard_widgets.php:928
251
  msgid "Search Engines"
252
  msgstr ""
253
 
254
+ #: .././admin/dashboard_widgets.php:1053
255
  msgid "Organic Search"
256
  msgstr ""
257
 
258
+ #: .././admin/dashboard_widgets.php:1057
259
  msgid "Pages/Session"
260
  msgstr ""
261
 
262
+ #: .././admin/ga_dash_settings.php:83 .././admin/ga_dash_settings.php:194
263
+ #: .././admin/ga_dash_settings.php:327 .././admin/ga_dash_settings.php:855
264
+ #: .././admin/ga_dash_settings.php:1157
265
  msgid "Settings saved."
266
  msgstr ""
267
 
268
+ #: .././admin/ga_dash_settings.php:85 .././admin/ga_dash_settings.php:196
269
+ #: .././admin/ga_dash_settings.php:329 .././admin/ga_dash_settings.php:841
270
+ #: .././admin/ga_dash_settings.php:851 .././admin/ga_dash_settings.php:857
271
+ #: .././admin/ga_dash_settings.php:869 .././admin/ga_dash_settings.php:1118
272
+ #: .././admin/ga_dash_settings.php:1143 .././admin/ga_dash_settings.php:1153
273
+ #: .././admin/ga_dash_settings.php:1159 .././admin/ga_dash_settings.php:1171
274
  msgid "Cheating Huh?"
275
  msgstr ""
276
 
277
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
278
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
279
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
280
+ msgid "Something went wrong, check"
281
+ msgstr ""
282
 
283
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
284
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
285
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
286
+ msgid "or"
287
+ msgstr ""
288
+
289
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
290
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
291
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
292
  msgid "auhorize the plugin"
293
  msgstr "bővítményt engedélyezni"
294
 
295
+ #: .././admin/ga_dash_settings.php:95
 
 
 
 
 
 
 
 
 
 
296
  msgid "Google Analytics Frontend Settings"
297
  msgstr "Google Analytics weblap beállítások"
298
 
299
+ #: .././admin/ga_dash_settings.php:108 .././admin/ga_dash_settings.php:219
300
  msgid "Show stats to:"
301
  msgstr ""
302
 
303
+ #: .././admin/ga_dash_settings.php:152
304
  msgid " show page sessions and users in frontend (after each article)"
305
  msgstr ""
306
 
307
+ #: .././admin/ga_dash_settings.php:168
308
  msgid " show page searches (after each article)"
309
  msgstr "oldal keresések mutatása (minden cikk után)"
310
 
311
+ #: .././admin/ga_dash_settings.php:177 .././admin/ga_dash_settings.php:305
312
+ #: .././admin/ga_dash_settings.php:666 .././admin/ga_dash_settings.php:1025
313
+ #: .././admin/ga_dash_settings.php:1351
314
  msgid "Save Changes"
315
  msgstr ""
316
 
317
+ #: .././admin/ga_dash_settings.php:206
318
  msgid "Google Analytics Dashboard Settings"
319
  msgstr "Google Analytics vezérlőpult beállítások"
320
 
321
+ #: .././admin/ga_dash_settings.php:264
322
  msgid "disable Switch Profile/View functionality"
323
  msgstr "Profil/Nézet Kapcsoló letiltása"
324
 
325
+ #: .././admin/ga_dash_settings.php:268
326
  msgid "Real-Time Settings"
327
  msgstr "Valós idejű beállítások"
328
 
329
+ #: .././admin/ga_dash_settings.php:271
330
  msgid "Maximum number of pages to display on real-time tab:"
331
  msgstr "Maximális oldalszám megjelenítése a valós idejű fülön:"
332
 
333
+ #: .././admin/ga_dash_settings.php:276 .././admin/ga_dash_settings.php:292
334
+ msgid "find out more"
335
+ msgstr ""
336
 
337
+ #: .././admin/ga_dash_settings.php:278 .././admin/ga_dash_settings.php:295
338
  msgid "about this feature"
339
  msgstr "erről a szolgáltatásról"
340
 
341
+ #: .././admin/ga_dash_settings.php:283
342
+ msgid "Location Settings"
343
+ msgstr ""
344
+
345
+ #: .././admin/ga_dash_settings.php:287
346
+ msgid "Target Geo Map to country:"
347
+ msgstr ""
348
 
349
+ #: .././admin/ga_dash_settings.php:336
350
+ msgid "The tracking component is disabled. You should set"
351
+ msgstr ""
352
 
353
+ #: .././admin/ga_dash_settings.php:336
354
+ msgid "Tracking Options"
355
  msgstr ""
356
 
357
+ #: .././admin/ga_dash_settings.php:336
358
+ msgid "to"
359
+ msgstr ""
360
 
361
+ #: .././admin/ga_dash_settings.php:336 .././admin/ga_dash_settings.php:372
362
+ msgid "Enabled"
363
+ msgstr "Engedélyezve"
364
 
365
+ #: .././admin/ga_dash_settings.php:342
366
+ msgid "Google Analytics Tracking Code"
367
+ msgstr "Google Analytics követőkód"
368
 
369
+ #: .././admin/ga_dash_settings.php:351
370
+ msgid "Basic Settings"
371
+ msgstr ""
372
 
373
+ #: .././admin/ga_dash_settings.php:352 .././admin/ga_dash_settings.php:431
374
+ msgid "Events Tracking"
375
+ msgstr "Események követése"
376
 
377
+ #: .././admin/ga_dash_settings.php:353 .././admin/ga_dash_settings.php:495
378
+ msgid "Custom Definitions"
379
+ msgstr ""
380
 
381
+ #: .././admin/ga_dash_settings.php:354 .././admin/ga_dash_settings.php:623
382
+ #: .././admin/ga_dash_settings.php:1328
383
+ msgid "Exclude Tracking"
384
+ msgstr "Követés kizárás"
385
 
386
+ #: .././admin/ga_dash_settings.php:355
387
+ msgid "Advanced Settings"
388
+ msgstr ""
389
 
390
+ #: .././admin/ga_dash_settings.php:363
391
  msgid "Tracking Settings"
392
  msgstr "Követési beállítások"
393
 
394
+ #: .././admin/ga_dash_settings.php:366
395
  msgid "Tracking Options:"
396
  msgstr ""
397
 
398
+ #: .././admin/ga_dash_settings.php:370
399
  msgid "Disabled"
400
  msgstr "Letiltva"
401
 
402
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
 
 
 
 
403
  msgid "Tracking ID:"
404
  msgstr "Követési azonosító:"
405
 
406
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
407
  msgid "Default URL:"
408
  msgstr "Alapértelmezett webcím:"
409
 
410
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
411
  msgid "Time Zone:"
412
  msgstr "Időzóna:"
413
 
414
+ #: .././admin/ga_dash_settings.php:385
415
  #, fuzzy
416
  msgid "Basic Tracking"
417
  msgstr "Események követése"
418
 
419
+ #: .././admin/ga_dash_settings.php:388
420
  msgid "Tracking Type:"
421
  msgstr ""
422
 
423
+ #: .././admin/ga_dash_settings.php:392
424
  msgid "Classic Analytics"
425
  msgstr "Klasszikus Analytics"
426
 
427
+ #: .././admin/ga_dash_settings.php:394
428
  msgid "Universal Analytics"
429
  msgstr "Univerzális Analytics"
430
 
431
+ #: .././admin/ga_dash_settings.php:408
432
  msgid " anonymize IPs while tracking"
433
  msgstr "nyomon követés közben IP anonimizálása"
434
 
435
+ #: .././admin/ga_dash_settings.php:423
436
  msgid " enable remarketing, demographics and interests reports"
437
  msgstr "lehetővé remarketing, demográfia és érdeklődés jelentések"
438
 
439
+ #: .././admin/ga_dash_settings.php:445
 
 
 
 
440
  msgid " track downloads, mailto and outbound links"
441
  msgstr "letöltések, mailto és kimenő linkek követése"
442
 
443
+ #: .././admin/ga_dash_settings.php:449
444
  #, fuzzy
445
  msgid "Downloads Regex:"
446
  msgstr "Letöltés szűrők:"
447
 
448
+ #: .././admin/ga_dash_settings.php:466
449
  msgid " track affiliate links matching this regex"
450
  msgstr ""
451
 
452
+ #: .././admin/ga_dash_settings.php:470
453
  msgid "Affiliates Regex:"
454
  msgstr ""
455
 
456
+ #: .././admin/ga_dash_settings.php:487
457
  msgid " track fragment identifiers, hashmarks (#) in URI links"
458
  msgstr ""
459
 
460
+ #: .././admin/ga_dash_settings.php:498
 
 
 
 
461
  msgid "Authors:"
462
  msgstr ""
463
 
464
+ #: .././admin/ga_dash_settings.php:508
465
  msgid "Publication Year:"
466
  msgstr ""
467
 
468
+ #: .././admin/ga_dash_settings.php:518
469
  msgid "Categories:"
470
  msgstr ""
471
 
472
+ #: .././admin/ga_dash_settings.php:528
473
  msgid "User Type:"
474
  msgstr ""
475
 
476
+ #: .././admin/ga_dash_settings.php:542
477
  #, fuzzy
478
  msgid "Advanced Tracking"
479
  msgstr "Események követése"
480
 
481
+ #: .././admin/ga_dash_settings.php:545
482
  #, fuzzy
483
  msgid "Page Speed SR:"
484
  msgstr "Oldal / látogató"
485
 
486
+ #: .././admin/ga_dash_settings.php:563
487
  msgid " exclude events from bounce-rate calculation"
488
  msgstr ""
489
 
490
+ #: .././admin/ga_dash_settings.php:578
491
  msgid " enable enhanced link attribution"
492
  msgstr "kibővített link tulajdonság engedélyezése"
493
 
494
+ #: .././admin/ga_dash_settings.php:592
495
  msgid " enable AdSense account linking"
496
  msgstr ""
497
 
498
+ #: .././admin/ga_dash_settings.php:608
499
  msgid " enable cross domain tracking"
500
  msgstr ""
501
 
502
+ #: .././admin/ga_dash_settings.php:612
503
  msgid "Cross Domains:"
504
  msgstr ""
505
 
506
+ #: .././admin/ga_dash_settings.php:626
 
 
 
 
507
  msgid "Exclude tracking for:"
508
  msgstr ""
509
 
510
+ #: .././admin/ga_dash_settings.php:687
511
+ msgid "Google Analytics Errors & Debugging"
512
+ msgstr ""
513
+
514
+ #: .././admin/ga_dash_settings.php:697
515
+ msgid "Errors & Details"
516
+ msgstr ""
517
+
518
+ #: .././admin/ga_dash_settings.php:698
519
+ msgid "Plugin Settings"
520
+ msgstr ""
521
+
522
+ #: .././admin/ga_dash_settings.php:706
523
+ msgid "For errors and/or other issues please check"
524
+ msgstr ""
525
+
526
+ #: .././admin/ga_dash_settings.php:706
527
+ msgid "the plugin documentation page"
528
+ msgstr ""
529
+
530
+ #: .././admin/ga_dash_settings.php:706
531
+ msgid "and related tutorials"
532
+ msgstr ""
533
+
534
+ #: .././admin/ga_dash_settings.php:710
535
+ msgid "Last Error detected"
536
+ msgstr ""
537
+
538
+ #: .././admin/ga_dash_settings.php:715 .././admin/ga_dash_settings.php:728
539
+ msgid "None"
540
+ msgstr ""
541
+
542
+ #: .././admin/ga_dash_settings.php:722
543
+ msgid "Error Details"
544
+ msgstr ""
545
+
546
+ #: .././admin/ga_dash_settings.php:740
547
+ msgid "Plugin Configuration"
548
+ msgstr ""
549
+
550
+ #: .././admin/ga_dash_settings.php:788 .././admin/ga_dash_settings.php:1072
551
  msgid ""
552
  "Loading the required libraries. If this results in a blank screen or a fatal "
553
  "error, try this solution:"
554
  msgstr ""
555
 
556
+ #: .././admin/ga_dash_settings.php:800 .././admin/ga_dash_settings.php:1084
557
  msgid "Plugin authorization succeeded."
558
  msgstr "Bővítmény engedélyezése sikeres."
559
 
560
+ #: .././admin/ga_dash_settings.php:816 .././admin/ga_dash_settings.php:1109
561
  msgid ""
562
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
563
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
564
  msgstr ""
565
 
566
+ #: .././admin/ga_dash_settings.php:839 .././admin/ga_dash_settings.php:1141
567
  msgid "Cleared Cache."
568
  msgstr "Cache kiűrítve."
569
 
570
+ #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1150
571
  msgid "Token Reseted and Revoked."
572
  msgstr "Token visszaállítva és visszavonva."
573
 
574
+ #: .././admin/ga_dash_settings.php:862 .././admin/ga_dash_settings.php:1164
 
 
 
 
575
  msgid "All other domains/properties were removed."
576
  msgstr "Összes többi domain/tulajdon eltávolításra került."
577
 
578
+ #: .././admin/ga_dash_settings.php:874 .././admin/ga_dash_settings.php:1176
 
 
 
 
 
579
  msgid "Google Analytics Settings"
580
  msgstr "Google Analytics beállítások"
581
 
582
+ #: .././admin/ga_dash_settings.php:887 .././admin/ga_dash_settings.php:1189
 
 
 
 
 
 
 
 
583
  msgid "Use the red link (see below) to generate and get your access code!"
584
  msgstr ""
585
 
586
+ #: .././admin/ga_dash_settings.php:898 .././admin/ga_dash_settings.php:1224
587
  msgid "Plugin Authorization"
588
  msgstr "Bővítmény engedélyezés"
589
 
590
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
591
  msgid "You should watch the"
592
  msgstr "Kérjük, nézze meg ezt a"
593
 
594
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
595
  msgid "video"
596
  msgstr "videót"
597
 
598
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
599
  msgid "and read this"
600
  msgstr "és olvassa el ezt az"
601
 
602
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
603
  msgid "tutorial"
604
  msgstr "oktatói anyagot"
605
 
606
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
607
  msgid ""
608
  "before proceeding to authorization. This plugin requires a properly "
609
  "configured Google Analytics account"
611
  "mielőtt engedélyezné. Ezt a bővítményt csak helyesen beállított Google "
612
  "Analytics fiókkal lehet használni"
613
 
614
+ #: .././admin/ga_dash_settings.php:914 .././admin/ga_dash_settings.php:1239
615
  msgid " use your own API Project credentials"
616
  msgstr "használja a saját API Project hitelesítő adatait"
617
 
618
+ #: .././admin/ga_dash_settings.php:921 .././admin/ga_dash_settings.php:1246
619
  msgid "API Key:"
620
  msgstr "API key:"
621
 
622
+ #: .././admin/ga_dash_settings.php:928 .././admin/ga_dash_settings.php:1254
623
  msgid "Client ID:"
624
  msgstr "Client ID:"
625
 
626
+ #: .././admin/ga_dash_settings.php:936 .././admin/ga_dash_settings.php:1263
627
  msgid "Client Secret:"
628
  msgstr "Client Secret:"
629
 
630
+ #: .././admin/ga_dash_settings.php:954 .././admin/ga_dash_settings.php:1282
631
  msgid "Clear Authorization"
632
  msgstr "Engedélyezés törlése"
633
 
634
+ #: .././admin/ga_dash_settings.php:958 .././admin/ga_dash_settings.php:1039
635
+ #: .././admin/ga_dash_settings.php:1285 .././admin/ga_dash_settings.php:1363
636
  msgid "Clear Cache"
637
  msgstr "Cache ürítése"
638
 
639
+ #: .././admin/ga_dash_settings.php:967
640
  msgid "Select Domain:"
641
  msgstr ""
642
 
643
+ #: .././admin/ga_dash_settings.php:980 .././admin/ga_dash_settings.php:1319
644
  msgid "Property not found"
645
  msgstr ""
646
 
647
+ #: .././admin/ga_dash_settings.php:985
648
  msgid "and/or hide all other domains"
649
  msgstr "és/vagy az összes többi domain eltüntetése"
650
 
651
+ #: .././admin/ga_dash_settings.php:988
652
  msgid "Hide Now"
653
  msgstr "Elrejtés most"
654
 
655
+ #: .././admin/ga_dash_settings.php:1007
656
  msgid "Theme Color:"
657
  msgstr ""
658
 
659
+ #: .././admin/ga_dash_settings.php:1017
660
  msgid "A new frontend widget is available! To enable it, go to"
661
  msgstr "Elérhető egy új frontend widget! Engedélyezéshez, menjen a"
662
 
663
+ #: .././admin/ga_dash_settings.php:1017
664
  msgid "Appearance -> Widgets"
665
  msgstr "Megjelenés -> Widgetek"
666
 
667
+ #: .././admin/ga_dash_settings.php:1017
668
  msgid "and look for Google Analytics Dashboard."
669
  msgstr "menühöz és keresse a Google Analytics vezérlőpultot."
670
 
671
+ #: .././admin/ga_dash_settings.php:1115
 
 
 
 
 
672
  msgid "Properties refreshed."
673
  msgstr ""
674
 
675
+ #: .././admin/ga_dash_settings.php:1201
676
  msgid "Network Setup"
677
  msgstr ""
678
 
679
+ #: .././admin/ga_dash_settings.php:1216
680
  msgid " use a single Google Analytics account for the entire network"
681
  msgstr ""
682
 
683
+ #: .././admin/ga_dash_settings.php:1288
684
  msgid "Refresh Properties"
685
  msgstr ""
686
 
687
+ #: .././admin/ga_dash_settings.php:1294
688
  #, fuzzy
689
  msgid "Properties/Views Settings"
690
  msgstr "Weblap beállítások"
691
 
692
+ #: .././admin/ga_dash_settings.php:1342
693
  msgid " exclude Super Admin tracking for the entire network"
694
  msgstr ""
695
 
696
+ #: .././admin/ga_dash_settings.php:1394
697
  msgid "Setup Tutorial & Demo"
698
  msgstr "Beállítás oktató anyag és demo"
699
 
700
+ #: .././admin/ga_dash_settings.php:1406
701
  msgid "Support & Reviews"
702
  msgstr "Támogatás és vélemények"
703
 
704
+ #: .././admin/ga_dash_settings.php:1414
705
  msgid "Plugin documentation and support on"
706
  msgstr ""
707
 
708
+ #: .././admin/ga_dash_settings.php:1421
709
  msgid "Your feedback and review are both important,"
710
  msgstr "Az Ön visszajelzése és értékelése egyaránt fontos számunkra,"
711
 
712
+ #: .././admin/ga_dash_settings.php:1421
713
  msgid "rate this plugin"
714
  msgstr "értékelje ezt a bővítményt"
715
 
716
+ #: .././admin/ga_dash_settings.php:1426
717
  msgid "Further Reading"
718
  msgstr "További olvasmány"
719
 
720
+ #: .././admin/ga_dash_settings.php:1434
721
  msgid "Improve search rankings"
722
  msgstr ""
723
 
724
+ #: .././admin/ga_dash_settings.php:1434
725
  msgid "by moving your website to HTTPS/SSL."
726
  msgstr ""
727
 
728
+ #: .././admin/ga_dash_settings.php:1441
729
  msgid "Other"
730
  msgstr "Egyéb"
731
 
732
+ #: .././admin/ga_dash_settings.php:1441
733
  msgid "WordPress Plugins"
734
  msgstr "WordPress bővítmények"
735
 
736
+ #: .././admin/ga_dash_settings.php:1441
737
  msgid "written by the same author"
738
  msgstr "ettől a szerzőtől"
739
 
740
+ #: .././admin/ga_dash_settings.php:1446
741
  msgid "Other Services"
742
  msgstr ""
743
 
744
+ #: .././admin/ga_dash_settings.php:1453
745
  msgid "Speed up your website and plug into a whole"
746
  msgstr ""
747
 
748
+ #: .././admin/ga_dash_settings.php:1453
749
  msgid "new level of site speed"
750
  msgstr ""
751
 
752
+ #: .././admin/ga_dash_settings.php:1460
753
  msgid "Web Analytics"
754
  msgstr "Web Analitika"
755
 
756
+ #: .././admin/ga_dash_settings.php:1460
757
  msgid "service with users tracking at IP level."
758
  msgstr ""
759
 
760
+ #: .././front/frontend.php:134
761
  msgid "Views vs UniqueViews"
762
  msgstr "Látogatások vs egyedi látogatások"
763
 
764
+ #: .././front/frontend.php:184
765
  msgid "Google Analytics Reports"
766
  msgstr ""
767
 
768
+ #: .././front/widgets.php:15
769
  msgid "Will display your google analytics stats in a widget"
770
  msgstr "Megjelenik a Google Analytics statisztika egy widgetben"
771
 
772
+ #: .././front/widgets.php:40 .././tools/gapi.php:744
773
  msgid "trend"
774
  msgstr ""
775
 
776
+ #: .././front/widgets.php:133
777
  msgid "Period:"
778
  msgstr "Időszak:"
779
 
780
+ #: .././front/widgets.php:133
781
  msgid "Sessions:"
782
  msgstr ""
783
 
784
+ #: .././front/widgets.php:137
785
  msgid "generated by"
786
  msgstr "által generált"
787
 
788
+ #: .././front/widgets.php:147
789
  msgid "Google Analytics Stats"
790
  msgstr "Google Analytics statisztika"
791
 
792
+ #: .././front/widgets.php:154
793
  msgid "Title:"
794
  msgstr "Cím:"
795
 
796
+ #: .././front/widgets.php:161
797
  msgid "Display:"
798
  msgstr "Megjelenés:"
799
 
800
+ #: .././front/widgets.php:165
801
  msgid "Chart & Totals"
802
  msgstr "Diagram és összegzés"
803
 
804
+ #: .././front/widgets.php:166
805
  msgid "Chart"
806
  msgstr "Diagram"
807
 
808
+ #: .././front/widgets.php:167
809
  msgid "Totals"
810
  msgstr "Összes"
811
 
812
+ #: .././front/widgets.php:171
813
+ msgid "Anonymize stats:"
814
+ msgstr ""
815
 
816
+ #: .././front/widgets.php:178
817
  msgid "Stats for:"
818
  msgstr "Statisztika:"
819
 
820
+ #: .././front/widgets.php:188
821
  msgid "Give credits:"
822
  msgstr "Köszönet:"
823
 
824
+ #: .././tools/gapi.php:129
825
  msgid "Use this link to get your access code:"
826
  msgstr "Használja ezt a linket, hogy a hozzáférési kódot megkapja:"
827
 
828
+ #: .././tools/gapi.php:129
829
  msgid "Get Access Code"
830
  msgstr "Hozzáférési kód beszerzése"
831
 
832
+ #: .././tools/gapi.php:134 .././tools/gapi.php:138
833
  msgid "Use the red link to get your access code!"
834
  msgstr ""
835
 
836
+ #: .././tools/gapi.php:134
837
  msgid "Access Code:"
838
  msgstr "Hozzáférési kód:"
839
 
840
+ #: .././tools/gapi.php:146
841
  msgid "Save Access Code"
842
  msgstr "Hozzáférési kód mentése"
843
 
844
+ #: .././tools/gapi.php:373
845
  msgid "Organic Searches"
846
  msgstr "Organikus keresés"
847
 
848
+ #: .././tools/gapi.php:381
849
  msgid "Hour"
850
  msgstr "Óra"
851
 
852
+ #: .././tools/gapi.php:384 .././tools/gapi.php:744 .././tools/gapi.php:783
853
  msgid "Date"
854
  msgstr "Dátum"
855
 
856
+ #: .././tools/gapi.php:477 .././tools/gapi.php:783
857
  msgid "Views"
858
  msgstr "Látogatások"
859
 
860
+ #: .././tools/gapi.php:576
861
  msgid "Countries"
862
  msgstr ""
863
 
864
+ #: .././tools/gapi.php:590
865
  msgid "Cities from"
866
  msgstr ""
867
 
868
+ #: .././tools/gapi.php:644
869
  msgid "Channels"
870
  msgstr ""
871
 
872
+ #: .././tools/gapi.php:698
873
  msgid "Type"
874
  msgstr "Típus"
875
 
876
+ #: .././tools/gapi.php:783
877
  msgid "UniqueViews"
878
  msgstr "Egyedi látogatások"
879
 
880
+ #~ msgid "Something went wrong, you need to"
881
+ #~ msgstr "Valami rosszul ment, szükséges a "
882
+
883
+ #~ msgid "or properly configure your"
884
+ #~ msgstr "vagy helyesen beállítani a"
885
+
886
+ #~ msgid "Google Analytics account"
887
+ #~ msgstr "Google Analytics fiókját"
888
+
889
+ #~ msgid "(find out more"
890
+ #~ msgstr "(tudjon meg többet"
891
+
892
+ #~ msgid ")"
893
+ #~ msgstr ")"
894
+
895
+ #~ msgid "Additional Stats & Charts"
896
+ #~ msgstr "További statisztikák és grafikonok"
897
+
898
+ #~ msgid "Target Geo Map to region:"
899
+ #~ msgstr "Cél földrajzi térkép a régióban:"
900
+
901
+ #~ msgid "and render top"
902
+ #~ msgstr "és mutassa a top"
903
+
904
+ #~ msgid "cities (find out more"
905
+ #~ msgstr "várost (tudjon meg többet"
906
+
907
+ #~ msgid " show traffic overview"
908
+ #~ msgstr "forgalom áttekintés bekapcsolása"
909
+
910
+ #~ msgid " show top pages"
911
+ #~ msgstr "legnépszerűbb oldalak bekapcsolása"
912
+
913
+ #~ msgid " show top referrers"
914
+ #~ msgstr "leggyakoribb hivatkozók bekapcsolása"
915
+
916
+ #~ msgid " show top searches"
917
+ #~ msgstr "legfőbb keresések bekapcsolása"
918
+
919
+ #~ msgid "Dumping log data."
920
+ #~ msgstr "Napló adat ürítése."
921
+
922
+ #~ msgid ""
923
+ #~ "Something went wrong. Please check the Debugging Data section for "
924
+ #~ "possible errors"
925
+ #~ msgstr ""
926
+ #~ "Valami rosszul ment. Kérjük, ellenőrizze a hibakeresés adatok részben az "
927
+ #~ "esetleges hibákat"
928
+
929
+ #~ msgid "Debugging Data"
930
+ #~ msgstr "Hibakeresés adatok"
931
+
932
+ #~ msgid "Anonimize chart&#39;s stats:"
933
+ #~ msgstr "Grafikon statisztika anonimizálás:"
934
+
935
+ #~ msgid "Top Searches"
936
+ #~ msgstr "Legfőbb keresések"
937
 
938
  #~ msgid "Error Log"
939
  #~ msgstr "Hiba napló"
languages/ga-dash-it_IT.mo CHANGED
Binary file
languages/ga-dash-it_IT.po CHANGED
@@ -1,1013 +1,1104 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
- "POT-Creation-Date: 2015-01-07 20:26+0200\n"
5
- "PO-Revision-Date: 2015-01-07 20:26+0200\n"
6
- "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
- "Language-Team: L.E.O.X. <leoxleox73@gmail.com>\n"
8
- "Language: it\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.1\n"
13
- "X-Poedit-KeywordsList: _e;__\n"
14
- "X-Poedit-Basepath: .\n"
15
- "X-Poedit-SourceCharset: UTF-8\n"
16
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
- "X-Poedit-SearchPath-0: ../.\n"
18
-
19
- #: .././admin/dashboard_widgets.php:50 .././admin/dashboard_widgets.php:81
20
- msgid "Google Analytics"
21
- msgstr "Google Analytics"
22
-
23
- #: .././admin/dashboard_widgets.php:54 .././admin/dashboard_widgets.php:85
24
- #: .././admin/ga_dash_settings.php:100 .././admin/ga_dash_settings.php:222
25
- #: .././admin/ga_dash_settings.php:954
26
- msgid "General Settings"
27
- msgstr "Impostazioni generali"
28
-
29
- #: .././admin/dashboard_widgets.php:58
30
- msgid "Backend Settings"
31
- msgstr "Impostazioni backend"
32
-
33
- #: .././admin/dashboard_widgets.php:62
34
- msgid "Frontend Settings"
35
- msgstr "Impostazioni frontend"
36
-
37
- #: .././admin/dashboard_widgets.php:66
38
- msgid "Tracking Code"
39
- msgstr "Monitoraggio"
40
-
41
- #: .././admin/dashboard_widgets.php:132
42
- msgid "Settings"
43
- msgstr "Impostazioni"
44
-
45
- #: .././admin/dashboard_widgets.php:148 .././front/widgets.php:15
46
- msgid "Google Analytics Dashboard"
47
- msgstr "Bacheca di Google Analytics"
48
-
49
- #: .././admin/dashboard_widgets.php:166
50
- msgid "This plugin needs an authorization:"
51
- msgstr "Questo plugin necessita di un&#39;autorizzazione:"
52
-
53
- #: .././admin/dashboard_widgets.php:166 .././admin/ga_dash_settings.php:1063
54
- #: .././admin/ga_dash_settings.php:1465
55
- msgid "Authorize Plugin"
56
- msgstr "Autorizza plugin"
57
-
58
- #: .././admin/dashboard_widgets.php:207 .././admin/ga_dash_settings.php:459
59
- #: .././admin/ga_dash_settings.php:966 .././admin/ga_dash_settings.php:991
60
- #: .././admin/ga_dash_settings.php:1383
61
- msgid "View Name:"
62
- msgstr "Mostra nome:"
63
-
64
- #: .././admin/dashboard_widgets.php:212
65
- msgid "Something went wrong while retrieving profiles list."
66
- msgstr ""
67
- "Qualcosa &egrave; andato male durante il recupero della lista dei profili."
68
-
69
- #: .././admin/dashboard_widgets.php:212
70
- msgid "More details"
71
- msgstr "Altri dettagli"
72
-
73
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
74
- msgid "An admin should asign a default Google Analytics Profile."
75
- msgstr ""
76
- "Un amministratore deve assegnare un profilo predefinito di Google Analytics."
77
-
78
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
79
- msgid "Select Domain"
80
- msgstr "Seleziona dominio"
81
-
82
- #: .././admin/dashboard_widgets.php:245
83
- msgid ""
84
- "Something went wrong while retrieving property data. You need to create and "
85
- "properly configure a Google Analytics account:"
86
- msgstr ""
87
- "Qualcosa &egrave; andato male durante il recupero dei dati. &Egrave; "
88
- "necessario creare e configurare correttamente un account di Google Analytics:"
89
-
90
- #: .././admin/dashboard_widgets.php:245
91
- msgid "Find out more!"
92
- msgstr "Per saperne di pi&ugrave;!"
93
-
94
- #: .././admin/dashboard_widgets.php:276
95
- msgid "Real-Time"
96
- msgstr "In tempo reale"
97
-
98
- #: .././admin/dashboard_widgets.php:277
99
- msgid "Today"
100
- msgstr "Oggi"
101
-
102
- #: .././admin/dashboard_widgets.php:279
103
- msgid "Yesterday"
104
- msgstr "Ieri"
105
-
106
- #: .././admin/dashboard_widgets.php:281 .././front/widgets.php:83
107
- #: .././front/widgets.php:199
108
- msgid "Last 7 Days"
109
- msgstr "Ultimi 7 giorni"
110
-
111
- #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:86
112
- #: .././front/widgets.php:200
113
- msgid "Last 14 Days"
114
- msgstr "Ultimi 14 giorni"
115
-
116
- #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:89
117
- #: .././front/widgets.php:201
118
- msgid "Last 30 Days"
119
- msgstr "Ultimi 30 giorni"
120
-
121
- #: .././admin/dashboard_widgets.php:287
122
- msgid "Last 90 Days"
123
- msgstr "Ultimi 90 giorni"
124
-
125
- #: .././admin/dashboard_widgets.php:293 .././admin/dashboard_widgets.php:952
126
- #: .././front/widgets.php:44 .././tools/gapi.php:384 .././tools/gapi.php:543
127
- #: .././tools/gapi.php:587 .././tools/gapi.php:658 .././tools/gapi.php:808
128
- #: .././tools/gapi.php:899
129
- msgid "Sessions"
130
- msgstr "Sessioni"
131
-
132
- #: .././admin/dashboard_widgets.php:294 .././admin/dashboard_widgets.php:956
133
- #: .././tools/gapi.php:368
134
- msgid "Users"
135
- msgstr "Utenti"
136
-
137
- #: .././admin/dashboard_widgets.php:296
138
- msgid "Organic"
139
- msgstr "Organico"
140
-
141
- #: .././admin/dashboard_widgets.php:298 .././admin/dashboard_widgets.php:960
142
- #: .././tools/gapi.php:372
143
- msgid "Page Views"
144
- msgstr "Pagine viste"
145
-
146
- #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:964
147
- #: .././tools/gapi.php:376
148
- msgid "Bounce Rate"
149
- msgstr "Frequenza di rimbalzo"
150
-
151
- #: .././admin/dashboard_widgets.php:302
152
- msgid "Location"
153
- msgstr ""
154
-
155
- #: .././admin/dashboard_widgets.php:304 .././tools/gapi.php:500
156
- msgid "Pages"
157
- msgstr ""
158
-
159
- #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:543
160
- msgid "Referrers"
161
- msgstr ""
162
-
163
- #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:587
164
- msgid "Searches"
165
- msgstr ""
166
-
167
- #: .././admin/dashboard_widgets.php:310
168
- msgid "Traffic Details"
169
- msgstr ""
170
-
171
- #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:657
172
- msgid "REFERRAL"
173
- msgstr "TRAFFICO REFERRAL"
174
-
175
- #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:658
176
- msgid "ORGANIC"
177
- msgstr "TRAFFICO ORGANICO"
178
-
179
- #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:544
180
- #: .././admin/dashboard_widgets.php:659
181
- msgid "SOCIAL"
182
- msgstr "TRAFFICO DAI SOCIAL NETWORK"
183
-
184
- #: .././admin/dashboard_widgets.php:428 .././admin/dashboard_widgets.php:547
185
- #: .././admin/dashboard_widgets.php:660
186
- msgid "CAMPAIGN"
187
- msgstr ""
188
-
189
- #: .././admin/dashboard_widgets.php:432 .././admin/dashboard_widgets.php:550
190
- #: .././admin/dashboard_widgets.php:663
191
- msgid "DIRECT"
192
- msgstr "TRAFFICO DIRETTO"
193
-
194
- #: .././admin/dashboard_widgets.php:436 .././admin/dashboard_widgets.php:664
195
- msgid "NEW"
196
- msgstr "VISITATORI NUOVI"
197
-
198
- #: .././admin/dashboard_widgets.php:538
199
- msgid "REFERRALS"
200
- msgstr "REFERRALS"
201
-
202
- #: .././admin/dashboard_widgets.php:541
203
- msgid "KEYWORDS"
204
- msgstr "KEYWORDS"
205
-
206
- #: .././admin/dashboard_widgets.php:690 .././admin/dashboard_widgets.php:702
207
- #: .././admin/dashboard_widgets.php:757 .././admin/dashboard_widgets.php:769
208
- #: .././admin/dashboard_widgets.php:781 .././admin/dashboard_widgets.php:793
209
- #: .././admin/dashboard_widgets.php:806 .././admin/dashboard_widgets.php:905
210
- #: .././admin/dashboard_widgets.php:908 .././admin/dashboard_widgets.php:992
211
- #: .././admin/dashboard_widgets.php:1004 .././front/frontend.php:88
212
- #: .././front/frontend.php:100 .././front/widgets.php:122
213
- msgid "This report is unavailable"
214
- msgstr "Questo rapporto non &egrave; disponibile"
215
-
216
- #: .././admin/dashboard_widgets.php:818
217
- msgid "Traffic Mediums"
218
- msgstr ""
219
-
220
- #: .././admin/dashboard_widgets.php:834
221
- msgid "Visitor Type"
222
- msgstr ""
223
-
224
- #: .././admin/dashboard_widgets.php:850
225
- msgid "Social Networks"
226
- msgstr ""
227
-
228
- #: .././admin/dashboard_widgets.php:866
229
- msgid "Search Engines"
230
- msgstr ""
231
-
232
- #: .././admin/dashboard_widgets.php:968
233
- msgid "Organic Search"
234
- msgstr "Ricerca organica"
235
-
236
- #: .././admin/dashboard_widgets.php:972
237
- msgid "Pages/Session"
238
- msgstr "Pagine per sessione"
239
-
240
- #: .././admin/ga_dash_settings.php:78 .././admin/ga_dash_settings.php:200
241
- #: .././admin/ga_dash_settings.php:418 .././admin/ga_dash_settings.php:841
242
- #: .././admin/ga_dash_settings.php:1228
243
- msgid "Settings saved."
244
- msgstr "Impostazioni salvate."
245
-
246
- #: .././admin/ga_dash_settings.php:80 .././admin/ga_dash_settings.php:202
247
- #: .././admin/ga_dash_settings.php:420 .././admin/ga_dash_settings.php:824
248
- #: .././admin/ga_dash_settings.php:834 .././admin/ga_dash_settings.php:843
249
- #: .././admin/ga_dash_settings.php:855 .././admin/ga_dash_settings.php:1183
250
- #: .././admin/ga_dash_settings.php:1211 .././admin/ga_dash_settings.php:1221
251
- #: .././admin/ga_dash_settings.php:1230 .././admin/ga_dash_settings.php:1242
252
- msgid "Cheating Huh?"
253
- msgstr "Frode?"
254
-
255
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
256
- #: .././admin/ga_dash_settings.php:424
257
- msgid "Something went wrong, you need to"
258
- msgstr "Qualcosa &egrave; andato male, devi"
259
-
260
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
261
- #: .././admin/ga_dash_settings.php:424
262
- msgid "auhorize the plugin"
263
- msgstr "autorizza il plugin"
264
-
265
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
266
- #: .././admin/ga_dash_settings.php:424
267
- msgid "or properly configure your"
268
- msgstr "o configura correttamente il tuo"
269
-
270
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
271
- #: .././admin/ga_dash_settings.php:424
272
- msgid "Google Analytics account"
273
- msgstr "Account di Google Analytics"
274
-
275
- #: .././admin/ga_dash_settings.php:90
276
- msgid "Google Analytics Frontend Settings"
277
- msgstr "Impostazioni Frontend di Google Analytics "
278
-
279
- #: .././admin/ga_dash_settings.php:103 .././admin/ga_dash_settings.php:225
280
- msgid "Show stats to:"
281
- msgstr "Mostra statistiche a:"
282
-
283
- #: .././admin/ga_dash_settings.php:153
284
- msgid " show page sessions and users in frontend (after each article)"
285
- msgstr ""
286
- "mostra le sessioni della pagina e gli utenti nel frontend (dopo ogni "
287
- "articolo)"
288
-
289
- #: .././admin/ga_dash_settings.php:169
290
- msgid " show page searches (after each article)"
291
- msgstr " mostra le ricerche della pagina (dopo ogni articolo)"
292
-
293
- #: .././admin/ga_dash_settings.php:178 .././admin/ga_dash_settings.php:391
294
- #: .././admin/ga_dash_settings.php:739 .././admin/ga_dash_settings.php:1053
295
- #: .././admin/ga_dash_settings.php:1456
296
- msgid "Save Changes"
297
- msgstr "Salva le modifiche"
298
-
299
- #: .././admin/ga_dash_settings.php:212
300
- msgid "Google Analytics Dashboard Settings"
301
- msgstr "Impostazioni Backend di Google Analytics"
302
-
303
- #: .././admin/ga_dash_settings.php:275
304
- msgid "disable Switch Profile/View functionality"
305
- msgstr "abilita o disabilita Cambia profilo/Mostra funzionalit&agrave;"
306
-
307
- #: .././admin/ga_dash_settings.php:279
308
- msgid "Real-Time Settings"
309
- msgstr "Impostazioni In tempo reale"
310
-
311
- #: .././admin/ga_dash_settings.php:282
312
- msgid "Maximum number of pages to display on real-time tab:"
313
- msgstr "Numero massimo di pagine da visualizzare nella scheda in tempo reale:"
314
-
315
- #: .././admin/ga_dash_settings.php:287
316
- msgid "(find out more"
317
- msgstr "(per saperne di pi&ugrave;"
318
-
319
- #: .././admin/ga_dash_settings.php:289 .././admin/ga_dash_settings.php:324
320
- msgid "about this feature"
321
- msgstr "su questa funzionalit&agrave;"
322
-
323
- #: .././admin/ga_dash_settings.php:290 .././admin/ga_dash_settings.php:325
324
- msgid ")"
325
- msgstr ")"
326
-
327
- #: .././admin/ga_dash_settings.php:293
328
- msgid "Additional Stats & Charts"
329
- msgstr "Ulteriori statistiche e grafici"
330
-
331
- #: .././admin/ga_dash_settings.php:306
332
- msgid " show Geo Map chart for sessions"
333
- msgstr "mostra il grafico per le sessioni"
334
-
335
- #: .././admin/ga_dash_settings.php:311
336
- msgid "Target Geo Map to region:"
337
- msgstr "Cartina delle visite per il paese:"
338
-
339
- #: .././admin/ga_dash_settings.php:316
340
- msgid "and render top"
341
- msgstr "con"
342
-
343
- #: .././admin/ga_dash_settings.php:321
344
- msgid "cities (find out more"
345
- msgstr "citt&agrave; (per saperne di più"
346
-
347
- #: .././admin/ga_dash_settings.php:339
348
- msgid " show traffic overview"
349
- msgstr " mostra la panoramica sul traffico"
350
-
351
- #: .././admin/ga_dash_settings.php:353
352
- msgid " show top pages"
353
- msgstr " mostra le principali pagine attive"
354
-
355
- #: .././admin/ga_dash_settings.php:367
356
- msgid " show top referrers"
357
- msgstr " mostra i referrers principali"
358
-
359
- #: .././admin/ga_dash_settings.php:381
360
- msgid " show top searches"
361
- msgstr " mostra le ricerche principali"
362
-
363
- #: .././admin/ga_dash_settings.php:430
364
- msgid "Google Analytics Tracking Code"
365
- msgstr "Impostazioni Monitoraggio di Google Analytics "
366
-
367
- #: .././admin/ga_dash_settings.php:440
368
- msgid "Tracking Settings"
369
- msgstr "Stato del monitoraggio"
370
-
371
- #: .././admin/ga_dash_settings.php:443
372
- msgid "Tracking Options:"
373
- msgstr "Monitoraggio:"
374
-
375
- #: .././admin/ga_dash_settings.php:447
376
- msgid "Disabled"
377
- msgstr "Disabilitato"
378
-
379
- #: .././admin/ga_dash_settings.php:449
380
- msgid "Enabled"
381
- msgstr "Abilitato"
382
-
383
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
384
- msgid "Tracking ID:"
385
- msgstr "ID monitoraggio:"
386
-
387
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
388
- msgid "Default URL:"
389
- msgstr "URL di default:"
390
-
391
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
392
- msgid "Time Zone:"
393
- msgstr "Fuso orario:"
394
-
395
- #: .././admin/ga_dash_settings.php:467
396
- msgid "Basic Tracking"
397
- msgstr "Impostazioni di base"
398
-
399
- #: .././admin/ga_dash_settings.php:473
400
- msgid "Tracking Type:"
401
- msgstr "Tipo:"
402
-
403
- #: .././admin/ga_dash_settings.php:477
404
- msgid "Classic Analytics"
405
- msgstr "Classic Analytics"
406
-
407
- #: .././admin/ga_dash_settings.php:479
408
- msgid "Universal Analytics"
409
- msgstr "Universal Analytics"
410
-
411
- #: .././admin/ga_dash_settings.php:493
412
- msgid " anonymize IPs while tracking"
413
- msgstr "rendi anonimi gli indirizzi IP durante il monitoraggio"
414
-
415
- #: .././admin/ga_dash_settings.php:508
416
- msgid " enable remarketing, demographics and interests reports"
417
- msgstr " abilita remarketing e rapporti demografici e sugli interessi"
418
-
419
- #: .././admin/ga_dash_settings.php:512
420
- msgid "Events Tracking"
421
- msgstr "Impostazioni eventi"
422
-
423
- #: .././admin/ga_dash_settings.php:525
424
- msgid " track downloads, mailto and outbound links"
425
- msgstr "monitora downloads, mailto e link in uscita"
426
-
427
- #: .././admin/ga_dash_settings.php:529
428
- msgid "Downloads Regex:"
429
- msgstr "Abbreviazioni downloads:"
430
-
431
- #: .././admin/ga_dash_settings.php:546
432
- msgid " track affiliate links matching this regex"
433
- msgstr " monitora collegamenti associati corrispondenti a queste abbreviazioni"
434
-
435
- #: .././admin/ga_dash_settings.php:550
436
- msgid "Affiliates Regex:"
437
- msgstr "Abbreviazioni associate:"
438
-
439
- #: .././admin/ga_dash_settings.php:567
440
- msgid " track fragment identifiers, hashmarks (#) in URI links"
441
- msgstr ""
442
- " monitora gli identificatori di frammentoe gli hashmarks (#) nei "
443
- "collegamenti URI"
444
-
445
- #: .././admin/ga_dash_settings.php:571
446
- msgid "Custom Definitions"
447
- msgstr "Impostazioni definizioni personalizzate"
448
-
449
- #: .././admin/ga_dash_settings.php:574
450
- msgid "Authors:"
451
- msgstr "Autori:"
452
-
453
- #: .././admin/ga_dash_settings.php:584
454
- msgid "Publication Year:"
455
- msgstr "Anno di pubblicazione:"
456
-
457
- #: .././admin/ga_dash_settings.php:594
458
- msgid "Categories:"
459
- msgstr "Categorie:"
460
-
461
- #: .././admin/ga_dash_settings.php:604
462
- msgid "User Type:"
463
- msgstr "Tipo di utente:"
464
-
465
- #: .././admin/ga_dash_settings.php:614
466
- msgid "Advanced Tracking"
467
- msgstr "Impostazioni avanzate"
468
-
469
- #: .././admin/ga_dash_settings.php:617
470
- msgid "Page Speed SR:"
471
- msgstr "Page Speed Sample Rate:"
472
-
473
- #: .././admin/ga_dash_settings.php:635
474
- msgid " exclude events from bounce-rate calculation"
475
- msgstr " escludi gli eventi dal calcolo del bounce-rate"
476
-
477
- #: .././admin/ga_dash_settings.php:649
478
- msgid " enable enhanced link attribution"
479
- msgstr "utilizza l&#39;attribuzione avanzata dei link"
480
-
481
- #: .././admin/ga_dash_settings.php:663
482
- msgid " enable AdSense account linking"
483
- msgstr " abilita AdSense account linking"
484
-
485
- #: .././admin/ga_dash_settings.php:678
486
- msgid " enable cross domain tracking"
487
- msgstr " abilita cross domanin tracking"
488
-
489
- #: .././admin/ga_dash_settings.php:682
490
- msgid "Cross Domains:"
491
- msgstr " Cross Domains:"
492
-
493
- #: .././admin/ga_dash_settings.php:692 .././admin/ga_dash_settings.php:1396
494
- msgid "Exclude Tracking"
495
- msgstr "Escludi monitoraggio"
496
-
497
- #: .././admin/ga_dash_settings.php:695
498
- msgid "Exclude tracking for:"
499
- msgstr "Escludi per:"
500
-
501
- #: .././admin/ga_dash_settings.php:769 .././admin/ga_dash_settings.php:1138
502
- msgid ""
503
- "Loading the required libraries. If this results in a blank screen or a fatal "
504
- "error, try this solution:"
505
- msgstr ""
506
- "Caricamento delle librerie richieste. Se viene restituita una schermata "
507
- "vuota o si verifica un errore fatale, provare questa soluzione:"
508
-
509
- #: .././admin/ga_dash_settings.php:781 .././admin/ga_dash_settings.php:1150
510
- msgid "Plugin authorization succeeded."
511
- msgstr "Autorizzazione plugin riuscita."
512
-
513
- #: .././admin/ga_dash_settings.php:796 .././admin/ga_dash_settings.php:1173
514
- msgid ""
515
- "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
516
- "(UA-XXXXX-X). Try again, and use the red link to get your access code"
517
- msgstr ""
518
- "Il codice di accesso <strong>NON</strong> &egrave; il <strong>Tracking ID</"
519
- "strong> (UA-XXXXX-X). Prova di nuovo utilizzando il link rosso per ottenere "
520
- "il codice di accesso"
521
-
522
- #: .././admin/ga_dash_settings.php:822 .././admin/ga_dash_settings.php:1209
523
- msgid "Cleared Cache."
524
- msgstr "Cache eliminata."
525
-
526
- #: .././admin/ga_dash_settings.php:831 .././admin/ga_dash_settings.php:1218
527
- msgid "Token Reseted and Revoked."
528
- msgstr "Token azzerato e revocato."
529
-
530
- #: .././admin/ga_dash_settings.php:838 .././admin/ga_dash_settings.php:1225
531
- msgid "Dumping log data."
532
- msgstr "Dumping dati di log."
533
-
534
- #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1235
535
- msgid "All other domains/properties were removed."
536
- msgstr "Tutti gli altri domini/propriet&agrave; sono stati rimossi."
537
-
538
- #: .././admin/ga_dash_settings.php:859 .././admin/ga_dash_settings.php:1246
539
- msgid ""
540
- "PHP CURL is required. Ask your hosting provider to install/enable PHP CURL!"
541
- msgstr ""
542
- "PHP CURL &egrave; necessario. Chiedete al vostro fornitore di hosting per "
543
- "installare/attivare PHP CURL!"
544
-
545
- #: .././admin/ga_dash_settings.php:863 .././admin/ga_dash_settings.php:1250
546
- msgid "Google Analytics Settings"
547
- msgstr "Impostazioni di Google Analytics"
548
-
549
- #: .././admin/ga_dash_settings.php:872 .././admin/ga_dash_settings.php:1258
550
- msgid ""
551
- "Something went wrong. Please check the Debugging Data section for possible "
552
- "errors"
553
- msgstr ""
554
- "Qualcosa &egrave; andato male. Controlla la sezione dati di debug per "
555
- "possibili errori"
556
-
557
- #: .././admin/ga_dash_settings.php:878 .././admin/ga_dash_settings.php:1263
558
- msgid "Use the red link (see below) to generate and get your access code!"
559
- msgstr ""
560
- "Utilizza il link rosso (vedi sotto) per generare ed ottenere il tuo codice "
561
- "di accesso!"
562
-
563
- #: .././admin/ga_dash_settings.php:889 .././admin/ga_dash_settings.php:1297
564
- msgid "Plugin Authorization"
565
- msgstr "Autorizzazione plugin"
566
-
567
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
568
- msgid "You should watch the"
569
- msgstr "Dovresti guardare il"
570
-
571
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
572
- msgid "video"
573
- msgstr "video"
574
-
575
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
576
- msgid "and read this"
577
- msgstr "e leggere questa"
578
-
579
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
580
- msgid "tutorial"
581
- msgstr "guida"
582
-
583
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
584
- msgid ""
585
- "before proceeding to authorization. This plugin requires a properly "
586
- "configured Google Analytics account"
587
- msgstr ""
588
- "prima di procedere con l&#39;autorizzazione. Questo plugin richiede un "
589
- "account di Google Analytics correttamente configurato"
590
-
591
- #: .././admin/ga_dash_settings.php:905 .././admin/ga_dash_settings.php:1312
592
- msgid " use your own API Project credentials"
593
- msgstr "utilizza le proprie credenziali API"
594
-
595
- #: .././admin/ga_dash_settings.php:912 .././admin/ga_dash_settings.php:1319
596
- msgid "API Key:"
597
- msgstr "Chiave API:"
598
-
599
- #: .././admin/ga_dash_settings.php:919 .././admin/ga_dash_settings.php:1326
600
- msgid "Client ID:"
601
- msgstr "ID Cliente:"
602
-
603
- #: .././admin/ga_dash_settings.php:926 .././admin/ga_dash_settings.php:1334
604
- msgid "Client Secret:"
605
- msgstr "Client Secret:"
606
-
607
- #: .././admin/ga_dash_settings.php:944 .././admin/ga_dash_settings.php:1352
608
- msgid "Clear Authorization"
609
- msgstr "Revoca autorizzazione"
610
-
611
- #: .././admin/ga_dash_settings.php:948 .././admin/ga_dash_settings.php:1067
612
- #: .././admin/ga_dash_settings.php:1355 .././admin/ga_dash_settings.php:1469
613
- msgid "Clear Cache"
614
- msgstr "Elimina cache"
615
-
616
- #: .././admin/ga_dash_settings.php:957
617
- msgid "Select Domain:"
618
- msgstr "Seleziona dominio:"
619
-
620
- #: .././admin/ga_dash_settings.php:970 .././admin/ga_dash_settings.php:1387
621
- msgid "Property not found"
622
- msgstr "Propriet&agrave; non trovata"
623
-
624
- #: .././admin/ga_dash_settings.php:975
625
- msgid "and/or hide all other domains"
626
- msgstr "e/o nasconde tutti gli altri domini"
627
-
628
- #: .././admin/ga_dash_settings.php:978
629
- msgid "Hide Now"
630
- msgstr "Nascondi ora"
631
-
632
- #: .././admin/ga_dash_settings.php:997
633
- msgid "Theme Color:"
634
- msgstr "Colore tema:"
635
-
636
- #: .././admin/ga_dash_settings.php:1007
637
- msgid "A new frontend widget is available! To enable it, go to"
638
- msgstr ""
639
- "&Egrave; disponibile un nuovo widget per il frontend. Per attivarlo, vai a"
640
-
641
- #: .././admin/ga_dash_settings.php:1007
642
- msgid "Appearance -> Widgets"
643
- msgstr "Aspetto -> Widgets"
644
-
645
- #: .././admin/ga_dash_settings.php:1007
646
- msgid "and look for Google Analytics Dashboard."
647
- msgstr "e cerca Bacheca di Google Analytics."
648
-
649
- #: .././admin/ga_dash_settings.php:1013 .././admin/ga_dash_settings.php:1073
650
- #: .././admin/ga_dash_settings.php:1416 .././admin/ga_dash_settings.php:1475
651
- msgid "Debugging Data"
652
- msgstr "Debug dei dati"
653
-
654
- #: .././admin/ga_dash_settings.php:1180
655
- msgid "Properties refreshed."
656
- msgstr "Propriet&agrave; aggiornate."
657
-
658
- #: .././admin/ga_dash_settings.php:1274
659
- msgid "Network Setup"
660
- msgstr "Configurazione della rete"
661
-
662
- #: .././admin/ga_dash_settings.php:1289
663
- msgid " use a single Google Analytics account for the entire network"
664
- msgstr " utilizza un unico account Google Analytics per l&#39;intera rete"
665
-
666
- #: .././admin/ga_dash_settings.php:1358
667
- msgid "Refresh Properties"
668
- msgstr "Aggiorna propriet&agrave;"
669
-
670
- #: .././admin/ga_dash_settings.php:1364
671
- msgid "Properties/Views Settings"
672
- msgstr "Propriet&agrave;/Mostra impostazioni"
673
-
674
- #: .././admin/ga_dash_settings.php:1409
675
- msgid " exclude Super Admin tracking for the entire network"
676
- msgstr " esclude il monitoraggio del Super Amministratore per tutta la rete"
677
-
678
- #: .././admin/ga_dash_settings.php:1537
679
- msgid "Setup Tutorial & Demo"
680
- msgstr "Guida all'installazione & Demo"
681
-
682
- #: .././admin/ga_dash_settings.php:1549
683
- msgid "Support & Reviews"
684
- msgstr "Supporto & Recensioni"
685
-
686
- #: .././admin/ga_dash_settings.php:1557
687
- msgid "Plugin documentation and support on"
688
- msgstr "Documentazione del plugin e supporto su"
689
-
690
- #: .././admin/ga_dash_settings.php:1564
691
- msgid "Your feedback and review are both important,"
692
- msgstr "Il tuo feedback e la tua recensione sono entrambi importanti,"
693
-
694
- #: .././admin/ga_dash_settings.php:1564
695
- msgid "rate this plugin"
696
- msgstr "vota questo plugin"
697
-
698
- #: .././admin/ga_dash_settings.php:1569
699
- msgid "Further Reading"
700
- msgstr "Approfondimenti"
701
-
702
- #: .././admin/ga_dash_settings.php:1576
703
- msgid "Improve search rankings"
704
- msgstr "Migliorare le classifiche di ricerca"
705
-
706
- #: .././admin/ga_dash_settings.php:1576
707
- msgid "by moving your website to HTTPS/SSL."
708
- msgstr "spostando il sito web a HTTPS/SSL."
709
-
710
- #: .././admin/ga_dash_settings.php:1582
711
- msgid "Other"
712
- msgstr "Altri"
713
-
714
- #: .././admin/ga_dash_settings.php:1582
715
- msgid "WordPress Plugins"
716
- msgstr "plugins per WordPress "
717
-
718
- #: .././admin/ga_dash_settings.php:1582
719
- msgid "written by the same author"
720
- msgstr "scritti dallo stesso autore"
721
-
722
- #: .././admin/ga_dash_settings.php:1587
723
- msgid "Other Services"
724
- msgstr "Altri servizi"
725
-
726
- #: .././admin/ga_dash_settings.php:1594
727
- msgid "Speed up your website and plug into a whole"
728
- msgstr "Accellera il tuo sito web ad un"
729
-
730
- #: .././admin/ga_dash_settings.php:1594
731
- msgid "new level of site speed"
732
- msgstr "nuovo livello di velocit&agrave;"
733
-
734
- #: .././admin/ga_dash_settings.php:1600
735
- msgid "Web Analytics"
736
- msgstr "Web Analytics"
737
-
738
- #: .././admin/ga_dash_settings.php:1600
739
- msgid "service with users tracking at IP level."
740
- msgstr "servizio con tracciamento degli utenti a livello IP."
741
-
742
- #: .././front/frontend.php:112
743
- msgid "Views vs UniqueViews"
744
- msgstr "Visualizzazioni vs Visualizzazioni uniche"
745
-
746
- #: .././front/frontend.php:168
747
- msgid "Google Analytics Reports"
748
- msgstr "Rapporti di Google Analytics"
749
-
750
- #: .././front/widgets.php:16
751
- msgid "Will display your google analytics stats in a widget"
752
- msgstr "Visualizza le statistiche di Google Analytics in un widget"
753
-
754
- #: .././front/widgets.php:44 .././tools/gapi.php:808
755
- msgid "trend"
756
- msgstr "tendenza"
757
-
758
- #: .././front/widgets.php:144
759
- msgid "Period:"
760
- msgstr "Periodo:"
761
-
762
- #: .././front/widgets.php:144
763
- msgid "Sessions:"
764
- msgstr "Sessioni:"
765
-
766
- #: .././front/widgets.php:150
767
- msgid "generated by"
768
- msgstr "generato da"
769
-
770
- #: .././front/widgets.php:164
771
- msgid "Google Analytics Stats"
772
- msgstr "Statistiche di Google Analytics"
773
-
774
- #: .././front/widgets.php:171
775
- msgid "Title:"
776
- msgstr "Titolo:"
777
-
778
- #: .././front/widgets.php:178
779
- msgid "Display:"
780
- msgstr "Mostra:"
781
-
782
- #: .././front/widgets.php:182
783
- msgid "Chart & Totals"
784
- msgstr "Grafico & Totali"
785
-
786
- #: .././front/widgets.php:183
787
- msgid "Chart"
788
- msgstr "Grafico"
789
-
790
- #: .././front/widgets.php:184
791
- msgid "Totals"
792
- msgstr "Totali"
793
-
794
- #: .././front/widgets.php:188
795
- msgid "Anonimize chart&#39;s stats:"
796
- msgstr "Rendi anonimo il grafico delle statistiche:"
797
-
798
- #: .././front/widgets.php:195
799
- msgid "Stats for:"
800
- msgstr "Statistiche per:"
801
-
802
- #: .././front/widgets.php:205
803
- msgid "Give credits:"
804
- msgstr "Crediti:"
805
-
806
- #: .././tools/gapi.php:140
807
- msgid "Use this link to get your access code:"
808
- msgstr "Utilizza questo link per ottenere il codice di accesso:"
809
-
810
- #: .././tools/gapi.php:140
811
- msgid "Get Access Code"
812
- msgstr "Ottieni codice di accesso"
813
-
814
- #: .././tools/gapi.php:145 .././tools/gapi.php:149
815
- msgid "Use the red link to get your access code!"
816
- msgstr "Utilizza il link rosso per ottenere il tuo codice di accesso!"
817
-
818
- #: .././tools/gapi.php:145
819
- msgid "Access Code:"
820
- msgstr "Codice di accesso:"
821
-
822
- #: .././tools/gapi.php:157
823
- msgid "Save Access Code"
824
- msgstr "Salva codice di accesso"
825
-
826
- #: .././tools/gapi.php:380
827
- msgid "Organic Searches"
828
- msgstr "Ricerche organiche"
829
-
830
- #: .././tools/gapi.php:391
831
- msgid "Hour"
832
- msgstr "Ora"
833
-
834
- #: .././tools/gapi.php:394 .././tools/gapi.php:808 .././tools/gapi.php:852
835
- msgid "Date"
836
- msgstr "Data"
837
-
838
- #: .././tools/gapi.php:500 .././tools/gapi.php:852
839
- msgid "Views"
840
- msgstr "Visualizzazioni"
841
-
842
- #: .././tools/gapi.php:611
843
- msgid "Countries"
844
- msgstr ""
845
-
846
- #: .././tools/gapi.php:629
847
- msgid "Cities from"
848
- msgstr ""
849
-
850
- #: .././tools/gapi.php:691
851
- msgid "Channels"
852
- msgstr ""
853
-
854
- #: .././tools/gapi.php:754
855
- msgid "Type"
856
- msgstr "Tipo"
857
-
858
- #: .././tools/gapi.php:852
859
- msgid "UniqueViews"
860
- msgstr "Visualizzazioni uniche"
861
-
862
- #: .././tools/gapi.php:899
863
- msgid "Top Searches"
864
- msgstr "Ricerche principali"
865
-
866
- #~ msgid "Error Log"
867
- #~ msgstr "Log errori"
868
-
869
- #~ msgid ""
870
- #~ "No stats available. Please check the Debugging Data section for possible "
871
- #~ "errors"
872
- #~ msgstr ""
873
- #~ "Nessuna statistica disponibile. Controlla la sezione dati di debug per "
874
- #~ "possibili errori"
875
-
876
- #~ msgid "Country/City"
877
- #~ msgstr "Paese/Citt&agrave;"
878
-
879
- #~ msgid "Source"
880
- #~ msgstr "Sorgente"
881
-
882
- #~ msgid "Traffic Sources"
883
- #~ msgstr "Sorgenti di traffico"
884
-
885
- #~ msgid "New vs. Returning"
886
- #~ msgstr "Visitatori nuovi contro Visitatori di ritorno"
887
-
888
- #~ msgid "Top Pages"
889
- #~ msgstr "Principali pagine attive"
890
-
891
- #~ msgid "Top Referrers"
892
- #~ msgstr "Referral principali"
893
-
894
- #~ msgid ""
895
- #~ "This is a beta feature and is only available when using my Developer Key! "
896
- #~ "("
897
- #~ msgstr ""
898
- #~ "Questa &egrave; una caratteristica beta ed &egrave; disponibile solo "
899
- #~ "quando si utilizza il Developer Key! ("
900
-
901
- #~ msgid "more about this feature"
902
- #~ msgstr "pi&ugrave; informazioni su questa funzione"
903
-
904
- #~ msgid "RETURN"
905
- #~ msgstr "VISITATORI DI RITORNO"
906
-
907
- #~ msgid "Sessions from "
908
- #~ msgstr "Sessioni da: "
909
-
910
- #~ msgid "Sessions by Country"
911
- #~ msgstr "Sessioni per paese"
912
-
913
- #~ msgid "Traffic Overview"
914
- #~ msgstr "Panoramica traffico"
915
-
916
- #~ msgid "Visits"
917
- #~ msgstr "Visite"
918
-
919
- #~ msgid "Visitors"
920
- #~ msgstr "Visitatori"
921
-
922
- #~ msgid "Visits:"
923
- #~ msgstr "Visite:"
924
-
925
- #~ msgid "Visitors:"
926
- #~ msgstr "Visitatori:"
927
-
928
- #~ msgid "Page Views:"
929
- #~ msgstr "Pagine viste:"
930
-
931
- #~ msgid "Bounce Rate:"
932
- #~ msgstr "Frequenza di rimbalzo:"
933
-
934
- #~ msgid "Organic Search:"
935
- #~ msgstr "Ricerca organica:"
936
-
937
- #~ msgid "Pages per Visit:"
938
- #~ msgstr "Pagine per visita:"
939
-
940
- #~ msgid "Visits from "
941
- #~ msgstr "Visite da "
942
-
943
- #~ msgid "Visits by Country"
944
- #~ msgstr "Visite per paese"
945
-
946
- #~ msgid " show page visits and visitors in frontend (after each article)"
947
- #~ msgstr ""
948
- #~ " mostra le pagine visitate e visitatori nel frontend (dopo ogni articolo)"
949
-
950
- #~ msgid " show Geo Map chart for visits"
951
- #~ msgstr " mostra la cartina geografica delle visite"
952
-
953
- #~ msgid "You can find support on"
954
- #~ msgstr "Puoi trovare supporto su"
955
-
956
- #~ msgid "DeConf.com"
957
- #~ msgstr "DeConf.com"
958
-
959
- #~ msgid "service with visitors tracking at IP level."
960
- #~ msgstr "servizio con monitoraggio dei visitatori a livello IP."
961
-
962
- #~ msgid "Total Visits:"
963
- #~ msgstr "Totale visite:"
964
-
965
- #~ msgid "PHP CURL is required. Please install/enable PHP CURL!"
966
- #~ msgstr "CURL è necessaria. Si prega di installare/abilitare CURL!"
967
-
968
- #~ msgid "Options saved."
969
- #~ msgstr "Opzioni salvate."
970
-
971
- #~ msgid "Show stats to: "
972
- #~ msgstr "Mostra statistiche:"
973
-
974
- #~ msgid "Update Options"
975
- #~ msgstr "Aggiorna opzioni"
976
-
977
- #~ msgid "Tracking Options: "
978
- #~ msgstr "Opzioni monitoraggio: "
979
-
980
- #~ msgid "Tracking Type: "
981
- #~ msgstr "Tipo di monitoraggio:"
982
-
983
- #, fuzzy
984
- #~ msgid "User Type: "
985
- #~ msgstr "Tipo di monitoraggio:"
986
-
987
- #~ msgid "Exclude tracking for: "
988
- #~ msgstr "Escludi monitoraggio per:"
989
-
990
- #~ msgid "Select Domain: "
991
- #~ msgstr "Seleziona dominio:"
992
-
993
- #~ msgid "Theme Color: "
994
- #~ msgstr "Colote tema:"
995
-
996
- #~ msgid "&#39; trend"
997
- #~ msgstr "&#39; tendenza"
998
-
999
- #~ msgid "DeConf Help Center"
1000
- #~ msgstr "DeConf Help Center"
1001
-
1002
- #~ msgid "Custom Code"
1003
- #~ msgstr "Codice personalizzato"
1004
-
1005
- #~ msgid "Your Tracking Code:"
1006
- #~ msgstr "Il tuo codice di monitoraggio:"
1007
-
1008
- #~ msgid ""
1009
- #~ " (watch this <a href='http://deconf.com/projects/google-analytics-"
1010
- #~ "dashboard-for-wordpress/' target='_blank'>Step by step video tutorial</a>)"
1011
- #~ msgstr ""
1012
- #~ " (watch this <a href='http://deconf.com/projects/google-analytics-"
1013
- #~ "dashboard-for-wordpress/' target='_blank'>Step by step video tutorial</a>)"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Google Analytics Dashboard for WP 4.4.4\n"
4
+ "POT-Creation-Date: 2015-02-07 11:41+0200\n"
5
+ "PO-Revision-Date: 2015-02-07 11:13+0100\n"
6
+ "Last-Translator: Leo The Strategist <leoxleox73@gmail.com>\n"
7
+ "Language-Team: L.E.O.X. <leoxleox73@gmail.com>\n"
8
+ "Language: it\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.5.4\n"
13
+ "X-Poedit-KeywordsList: _e;__\n"
14
+ "X-Poedit-Basepath: .\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+ "X-Poedit-SearchPath-0: ../.\n"
18
+
19
+ #: .././admin/dashboard_widgets.php:67 .././admin/dashboard_widgets.php:100
20
+ msgid "Google Analytics"
21
+ msgstr "Google Analytics"
22
+
23
+ #: .././admin/dashboard_widgets.php:71 .././admin/dashboard_widgets.php:104
24
+ #: .././admin/ga_dash_settings.php:105 .././admin/ga_dash_settings.php:216
25
+ #: .././admin/ga_dash_settings.php:964
26
+ msgid "General Settings"
27
+ msgstr "Impostazioni generali"
28
+
29
+ #: .././admin/dashboard_widgets.php:75
30
+ msgid "Backend Settings"
31
+ msgstr "Impostazioni backend"
32
+
33
+ #: .././admin/dashboard_widgets.php:79
34
+ msgid "Frontend Settings"
35
+ msgstr "Impostazioni frontend"
36
+
37
+ #: .././admin/dashboard_widgets.php:83
38
+ msgid "Tracking Code"
39
+ msgstr "Monitoraggio"
40
+
41
+ #: .././admin/dashboard_widgets.php:87 .././admin/dashboard_widgets.php:108
42
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
43
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
44
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
45
+ msgid "Errors & Debug"
46
+ msgstr "Errori & Debug"
47
+
48
+ #: .././admin/dashboard_widgets.php:152
49
+ msgid "Settings"
50
+ msgstr "Impostazioni"
51
+
52
+ #: .././admin/dashboard_widgets.php:166 .././front/widgets.php:14
53
+ msgid "Google Analytics Dashboard"
54
+ msgstr "Bacheca di Google Analytics"
55
+
56
+ #: .././admin/dashboard_widgets.php:183
57
+ msgid "This plugin needs an authorization:"
58
+ msgstr "Questo plugin necessita di un&#39;autorizzazione:"
59
+
60
+ #: .././admin/dashboard_widgets.php:183 .././admin/ga_dash_settings.php:1035
61
+ #: .././admin/ga_dash_settings.php:1360
62
+ msgid "Authorize Plugin"
63
+ msgstr "Autorizza plugin"
64
+
65
+ #: .././admin/dashboard_widgets.php:216 .././admin/ga_dash_settings.php:380
66
+ #: .././admin/ga_dash_settings.php:976 .././admin/ga_dash_settings.php:1001
67
+ #: .././admin/ga_dash_settings.php:1315
68
+ msgid "View Name:"
69
+ msgstr "Mostra nome:"
70
+
71
+ #: .././admin/dashboard_widgets.php:221
72
+ msgid "Something went wrong while retrieving profiles list."
73
+ msgstr ""
74
+ "Qualcosa &egrave; andato male durante il recupero della lista dei profili."
75
+
76
+ #: .././admin/dashboard_widgets.php:221
77
+ msgid "More details"
78
+ msgstr "Altri dettagli"
79
+
80
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
81
+ msgid "An admin should asign a default Google Analytics Profile."
82
+ msgstr ""
83
+ "Un amministratore deve assegnare un profilo predefinito di Google Analytics."
84
+
85
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
86
+ msgid "Select Domain"
87
+ msgstr "Seleziona dominio"
88
+
89
+ #: .././admin/dashboard_widgets.php:250
90
+ msgid ""
91
+ "Something went wrong while retrieving property data. You need to create and "
92
+ "properly configure a Google Analytics account:"
93
+ msgstr ""
94
+ "Qualcosa &egrave; andato male durante il recupero dei dati. &Egrave; "
95
+ "necessario creare e configurare correttamente un account di Google Analytics:"
96
+
97
+ #: .././admin/dashboard_widgets.php:250
98
+ msgid "Find out more!"
99
+ msgstr "Per saperne di pi&ugrave;!"
100
+
101
+ #: .././admin/dashboard_widgets.php:278
102
+ msgid "Real-Time"
103
+ msgstr "In tempo reale"
104
+
105
+ #: .././admin/dashboard_widgets.php:279
106
+ msgid "Today"
107
+ msgstr "Oggi"
108
+
109
+ #: .././admin/dashboard_widgets.php:281
110
+ msgid "Yesterday"
111
+ msgstr "Ieri"
112
+
113
+ #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:72
114
+ #: .././front/widgets.php:182
115
+ msgid "Last 7 Days"
116
+ msgstr "Ultimi 7 giorni"
117
+
118
+ #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:75
119
+ #: .././front/widgets.php:183
120
+ msgid "Last 14 Days"
121
+ msgstr "Ultimi 14 giorni"
122
+
123
+ #: .././admin/dashboard_widgets.php:287 .././front/widgets.php:78
124
+ #: .././front/widgets.php:184
125
+ msgid "Last 30 Days"
126
+ msgstr "Ultimi 30 giorni"
127
+
128
+ #: .././admin/dashboard_widgets.php:289
129
+ msgid "Last 90 Days"
130
+ msgstr "Ultimi 90 giorni"
131
+
132
+ #: .././admin/dashboard_widgets.php:295 .././admin/dashboard_widgets.php:1037
133
+ #: .././front/widgets.php:40 .././tools/gapi.php:376 .././tools/gapi.php:515
134
+ #: .././tools/gapi.php:554 .././tools/gapi.php:615 .././tools/gapi.php:744
135
+ #: .././tools/gapi.php:825
136
+ msgid "Sessions"
137
+ msgstr "Sessioni"
138
+
139
+ #: .././admin/dashboard_widgets.php:296 .././admin/dashboard_widgets.php:1041
140
+ #: .././tools/gapi.php:364
141
+ msgid "Users"
142
+ msgstr "Utenti"
143
+
144
+ #: .././admin/dashboard_widgets.php:298
145
+ msgid "Organic"
146
+ msgstr "Traffico da motorI di ricerca"
147
+
148
+ #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:1045
149
+ #: .././tools/gapi.php:367
150
+ msgid "Page Views"
151
+ msgstr "Pagine viste"
152
+
153
+ #: .././admin/dashboard_widgets.php:302 .././admin/dashboard_widgets.php:1049
154
+ #: .././tools/gapi.php:370
155
+ msgid "Bounce Rate"
156
+ msgstr "Frequenza di rimbalzo"
157
+
158
+ #: .././admin/dashboard_widgets.php:304
159
+ msgid "Location"
160
+ msgstr "Posizione geografica"
161
+
162
+ #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:477
163
+ msgid "Pages"
164
+ msgstr "Pagine"
165
+
166
+ #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:515
167
+ msgid "Referrers"
168
+ msgstr "Siti di origine del traffico"
169
+
170
+ #: .././admin/dashboard_widgets.php:310 .././tools/gapi.php:554
171
+ #: .././tools/gapi.php:825
172
+ msgid "Searches"
173
+ msgstr "Ricerche"
174
+
175
+ #: .././admin/dashboard_widgets.php:312
176
+ msgid "Traffic Details"
177
+ msgstr "Dettagli traffico"
178
+
179
+ #: .././admin/dashboard_widgets.php:404 .././admin/dashboard_widgets.php:645
180
+ msgid "REFERRAL"
181
+ msgstr "TRAFFICO DA SITI REFERENTI (REFERRALS)"
182
+
183
+ #: .././admin/dashboard_widgets.php:408 .././admin/dashboard_widgets.php:646
184
+ msgid "ORGANIC"
185
+ msgstr "TRAFFICO DA MOTORI DI RICERCA (ORGANICO)"
186
+
187
+ #: .././admin/dashboard_widgets.php:412 .././admin/dashboard_widgets.php:532
188
+ #: .././admin/dashboard_widgets.php:647
189
+ msgid "SOCIAL"
190
+ msgstr "TRAFFICO DAI SOCIAL NETWORK"
191
+
192
+ #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:535
193
+ #: .././admin/dashboard_widgets.php:648
194
+ msgid "CAMPAIGN"
195
+ msgstr "CAMPAGNA"
196
+
197
+ #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:538
198
+ #: .././admin/dashboard_widgets.php:651
199
+ msgid "DIRECT"
200
+ msgstr "TRAFFICO DIRETTO"
201
+
202
+ #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:652
203
+ msgid "NEW"
204
+ msgstr "VISITATORI NUOVI"
205
+
206
+ #: .././admin/dashboard_widgets.php:526
207
+ msgid "REFERRALS"
208
+ msgstr "TRAFFICO DA SITI REFERENTI (REFERRALS)"
209
+
210
+ #: .././admin/dashboard_widgets.php:529
211
+ msgid "KEYWORDS"
212
+ msgstr "KEYWORDS"
213
+
214
+ #: .././admin/dashboard_widgets.php:683 .././admin/dashboard_widgets.php:780
215
+ #: .././admin/dashboard_widgets.php:972 .././admin/dashboard_widgets.php:1083
216
+ #: .././front/frontend.php:88
217
+ msgid "A JavaScript Error is blocking plugin resources!"
218
+ msgstr "Un errore JavaScript sta bloccando le risorse del plugin"
219
+
220
+ #: .././admin/dashboard_widgets.php:696 .././admin/dashboard_widgets.php:715
221
+ #: .././admin/dashboard_widgets.php:793 .././admin/dashboard_widgets.php:824
222
+ #: .././admin/dashboard_widgets.php:843 .././admin/dashboard_widgets.php:863
223
+ #: .././admin/dashboard_widgets.php:986 .././admin/dashboard_widgets.php:1096
224
+ #: .././admin/dashboard_widgets.php:1115 .././front/frontend.php:100
225
+ #: .././front/frontend.php:119
226
+ msgid "Invalid response, more details in JavaScript Console (F12)."
227
+ msgstr ""
228
+ "Risposta non valida, ulteriori dettagli nella console JavaScript (F12)."
229
+
230
+ #: .././admin/dashboard_widgets.php:701 .././admin/dashboard_widgets.php:720
231
+ #: .././admin/dashboard_widgets.php:798 .././admin/dashboard_widgets.php:810
232
+ #: .././admin/dashboard_widgets.php:829 .././admin/dashboard_widgets.php:848
233
+ #: .././admin/dashboard_widgets.php:868 .././admin/dashboard_widgets.php:991
234
+ #: .././admin/dashboard_widgets.php:994 .././admin/dashboard_widgets.php:1101
235
+ #: .././admin/dashboard_widgets.php:1120 .././front/frontend.php:105
236
+ #: .././front/frontend.php:124 .././front/widgets.php:110
237
+ msgid "This report is unavailable"
238
+ msgstr "Questo rapporto non &egrave; disponibile"
239
+
240
+ #: .././admin/dashboard_widgets.php:880
241
+ msgid "Traffic Mediums"
242
+ msgstr "Origine del traffico in %"
243
+
244
+ #: .././admin/dashboard_widgets.php:896
245
+ msgid "Visitor Type"
246
+ msgstr "Tipo di visitatore"
247
+
248
+ #: .././admin/dashboard_widgets.php:912
249
+ msgid "Social Networks"
250
+ msgstr "Social Networks"
251
+
252
+ #: .././admin/dashboard_widgets.php:928
253
+ msgid "Search Engines"
254
+ msgstr "Motori di ricerca"
255
+
256
+ #: .././admin/dashboard_widgets.php:1053
257
+ msgid "Organic Search"
258
+ msgstr "Ricerca organica"
259
+
260
+ #: .././admin/dashboard_widgets.php:1057
261
+ msgid "Pages/Session"
262
+ msgstr "Pagine per sessione"
263
+
264
+ #: .././admin/ga_dash_settings.php:83 .././admin/ga_dash_settings.php:194
265
+ #: .././admin/ga_dash_settings.php:327 .././admin/ga_dash_settings.php:855
266
+ #: .././admin/ga_dash_settings.php:1157
267
+ msgid "Settings saved."
268
+ msgstr "Impostazioni salvate."
269
+
270
+ #: .././admin/ga_dash_settings.php:85 .././admin/ga_dash_settings.php:196
271
+ #: .././admin/ga_dash_settings.php:329 .././admin/ga_dash_settings.php:841
272
+ #: .././admin/ga_dash_settings.php:851 .././admin/ga_dash_settings.php:857
273
+ #: .././admin/ga_dash_settings.php:869 .././admin/ga_dash_settings.php:1118
274
+ #: .././admin/ga_dash_settings.php:1143 .././admin/ga_dash_settings.php:1153
275
+ #: .././admin/ga_dash_settings.php:1159 .././admin/ga_dash_settings.php:1171
276
+ msgid "Cheating Huh?"
277
+ msgstr "Frode?"
278
+
279
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
280
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
281
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
282
+ msgid "Something went wrong, check"
283
+ msgstr "Qualcosa è andato male, controlla"
284
+
285
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
286
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
287
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
288
+ msgid "or"
289
+ msgstr "o"
290
+
291
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
292
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
293
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
294
+ msgid "auhorize the plugin"
295
+ msgstr "autorizza il plugin"
296
+
297
+ #: .././admin/ga_dash_settings.php:95
298
+ msgid "Google Analytics Frontend Settings"
299
+ msgstr "Impostazioni Frontend di Google Analytics "
300
+
301
+ #: .././admin/ga_dash_settings.php:108 .././admin/ga_dash_settings.php:219
302
+ msgid "Show stats to:"
303
+ msgstr "Mostra statistiche a:"
304
+
305
+ #: .././admin/ga_dash_settings.php:152
306
+ msgid " show page sessions and users in frontend (after each article)"
307
+ msgstr ""
308
+ "mostra le sessioni della pagina e gli utenti nel frontend (dopo ogni "
309
+ "articolo)"
310
+
311
+ #: .././admin/ga_dash_settings.php:168
312
+ msgid " show page searches (after each article)"
313
+ msgstr " mostra le ricerche della pagina (dopo ogni articolo)"
314
+
315
+ #: .././admin/ga_dash_settings.php:177 .././admin/ga_dash_settings.php:305
316
+ #: .././admin/ga_dash_settings.php:666 .././admin/ga_dash_settings.php:1025
317
+ #: .././admin/ga_dash_settings.php:1351
318
+ msgid "Save Changes"
319
+ msgstr "Salva le modifiche"
320
+
321
+ #: .././admin/ga_dash_settings.php:206
322
+ msgid "Google Analytics Dashboard Settings"
323
+ msgstr "Impostazioni Backend di Google Analytics"
324
+
325
+ #: .././admin/ga_dash_settings.php:264
326
+ msgid "disable Switch Profile/View functionality"
327
+ msgstr "abilita o disabilita Cambia profilo/Mostra funzionalit&agrave;"
328
+
329
+ #: .././admin/ga_dash_settings.php:268
330
+ msgid "Real-Time Settings"
331
+ msgstr "Impostazioni In tempo reale"
332
+
333
+ #: .././admin/ga_dash_settings.php:271
334
+ msgid "Maximum number of pages to display on real-time tab:"
335
+ msgstr "Numero massimo di pagine da visualizzare nella scheda in tempo reale:"
336
+
337
+ #: .././admin/ga_dash_settings.php:276 .././admin/ga_dash_settings.php:292
338
+ msgid "find out more"
339
+ msgstr "per saperne di più"
340
+
341
+ #: .././admin/ga_dash_settings.php:278 .././admin/ga_dash_settings.php:295
342
+ msgid "about this feature"
343
+ msgstr "su questa funzionalit&agrave;"
344
+
345
+ #: .././admin/ga_dash_settings.php:283
346
+ msgid "Location Settings"
347
+ msgstr "Impostazioni posizione geografica"
348
+
349
+ #: .././admin/ga_dash_settings.php:287
350
+ msgid "Target Geo Map to country:"
351
+ msgstr "Obiettivo Geo Map per paese:"
352
+
353
+ #: .././admin/ga_dash_settings.php:336
354
+ msgid "The tracking component is disabled. You should set"
355
+ msgstr "Il componente di monitoraggio è disabilitato. È necessario impostare"
356
+
357
+ #: .././admin/ga_dash_settings.php:336
358
+ msgid "Tracking Options"
359
+ msgstr "Opzioni di monitoraggio"
360
+
361
+ #: .././admin/ga_dash_settings.php:336
362
+ msgid "to"
363
+ msgstr "a"
364
+
365
+ #: .././admin/ga_dash_settings.php:336 .././admin/ga_dash_settings.php:372
366
+ msgid "Enabled"
367
+ msgstr "Abilitato"
368
+
369
+ #: .././admin/ga_dash_settings.php:342
370
+ msgid "Google Analytics Tracking Code"
371
+ msgstr "Impostazioni Monitoraggio di Google Analytics "
372
+
373
+ #: .././admin/ga_dash_settings.php:351
374
+ msgid "Basic Settings"
375
+ msgstr "Impostazioni di base"
376
+
377
+ #: .././admin/ga_dash_settings.php:352 .././admin/ga_dash_settings.php:431
378
+ msgid "Events Tracking"
379
+ msgstr "Impostazioni eventi"
380
+
381
+ #: .././admin/ga_dash_settings.php:353 .././admin/ga_dash_settings.php:495
382
+ msgid "Custom Definitions"
383
+ msgstr "Impostazioni definizioni personalizzate"
384
+
385
+ #: .././admin/ga_dash_settings.php:354 .././admin/ga_dash_settings.php:623
386
+ #: .././admin/ga_dash_settings.php:1328
387
+ msgid "Exclude Tracking"
388
+ msgstr "Escludi monitoraggio"
389
+
390
+ #: .././admin/ga_dash_settings.php:355
391
+ msgid "Advanced Settings"
392
+ msgstr "Impostazioni avanzate"
393
+
394
+ #: .././admin/ga_dash_settings.php:363
395
+ msgid "Tracking Settings"
396
+ msgstr "Stato del monitoraggio"
397
+
398
+ #: .././admin/ga_dash_settings.php:366
399
+ msgid "Tracking Options:"
400
+ msgstr "Monitoraggio:"
401
+
402
+ #: .././admin/ga_dash_settings.php:370
403
+ msgid "Disabled"
404
+ msgstr "Disabilitato"
405
+
406
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
407
+ msgid "Tracking ID:"
408
+ msgstr "ID monitoraggio:"
409
+
410
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
411
+ msgid "Default URL:"
412
+ msgstr "URL di default:"
413
+
414
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
415
+ msgid "Time Zone:"
416
+ msgstr "Fuso orario:"
417
+
418
+ #: .././admin/ga_dash_settings.php:385
419
+ msgid "Basic Tracking"
420
+ msgstr "Impostazioni di base"
421
+
422
+ #: .././admin/ga_dash_settings.php:388
423
+ msgid "Tracking Type:"
424
+ msgstr "Tipo:"
425
+
426
+ #: .././admin/ga_dash_settings.php:392
427
+ msgid "Classic Analytics"
428
+ msgstr "Classic Analytics"
429
+
430
+ #: .././admin/ga_dash_settings.php:394
431
+ msgid "Universal Analytics"
432
+ msgstr "Universal Analytics"
433
+
434
+ #: .././admin/ga_dash_settings.php:408
435
+ msgid " anonymize IPs while tracking"
436
+ msgstr "rendi anonimi gli indirizzi IP durante il monitoraggio"
437
+
438
+ #: .././admin/ga_dash_settings.php:423
439
+ msgid " enable remarketing, demographics and interests reports"
440
+ msgstr " abilita remarketing e rapporti demografici e sugli interessi"
441
+
442
+ #: .././admin/ga_dash_settings.php:445
443
+ msgid " track downloads, mailto and outbound links"
444
+ msgstr "monitora downloads, mailto e link in uscita"
445
+
446
+ #: .././admin/ga_dash_settings.php:449
447
+ msgid "Downloads Regex:"
448
+ msgstr "Abbreviazioni downloads:"
449
+
450
+ #: .././admin/ga_dash_settings.php:466
451
+ msgid " track affiliate links matching this regex"
452
+ msgstr " monitora collegamenti associati corrispondenti a queste abbreviazioni"
453
+
454
+ #: .././admin/ga_dash_settings.php:470
455
+ msgid "Affiliates Regex:"
456
+ msgstr "Abbreviazioni associate:"
457
+
458
+ #: .././admin/ga_dash_settings.php:487
459
+ msgid " track fragment identifiers, hashmarks (#) in URI links"
460
+ msgstr ""
461
+ " monitora gli identificatori di frammentoe gli hashmarks (#) nei "
462
+ "collegamenti URI"
463
+
464
+ #: .././admin/ga_dash_settings.php:498
465
+ msgid "Authors:"
466
+ msgstr "Autori:"
467
+
468
+ #: .././admin/ga_dash_settings.php:508
469
+ msgid "Publication Year:"
470
+ msgstr "Anno di pubblicazione:"
471
+
472
+ #: .././admin/ga_dash_settings.php:518
473
+ msgid "Categories:"
474
+ msgstr "Categorie:"
475
+
476
+ #: .././admin/ga_dash_settings.php:528
477
+ msgid "User Type:"
478
+ msgstr "Tipo di utente:"
479
+
480
+ #: .././admin/ga_dash_settings.php:542
481
+ msgid "Advanced Tracking"
482
+ msgstr "Impostazioni avanzate"
483
+
484
+ #: .././admin/ga_dash_settings.php:545
485
+ msgid "Page Speed SR:"
486
+ msgstr "Page Speed Sample Rate:"
487
+
488
+ #: .././admin/ga_dash_settings.php:563
489
+ msgid " exclude events from bounce-rate calculation"
490
+ msgstr " escludi gli eventi dal calcolo del bounce-rate"
491
+
492
+ #: .././admin/ga_dash_settings.php:578
493
+ msgid " enable enhanced link attribution"
494
+ msgstr "utilizza l&#39;attribuzione avanzata dei link"
495
+
496
+ #: .././admin/ga_dash_settings.php:592
497
+ msgid " enable AdSense account linking"
498
+ msgstr " abilita AdSense account linking"
499
+
500
+ #: .././admin/ga_dash_settings.php:608
501
+ msgid " enable cross domain tracking"
502
+ msgstr " abilita cross domanin tracking"
503
+
504
+ #: .././admin/ga_dash_settings.php:612
505
+ msgid "Cross Domains:"
506
+ msgstr " Cross Domains:"
507
+
508
+ #: .././admin/ga_dash_settings.php:626
509
+ msgid "Exclude tracking for:"
510
+ msgstr "Escludi per:"
511
+
512
+ #: .././admin/ga_dash_settings.php:687
513
+ msgid "Google Analytics Errors & Debugging"
514
+ msgstr "Errori & Debugging di Google Analytics"
515
+
516
+ #: .././admin/ga_dash_settings.php:697
517
+ msgid "Errors & Details"
518
+ msgstr "Dettagli errori"
519
+
520
+ #: .././admin/ga_dash_settings.php:698
521
+ msgid "Plugin Settings"
522
+ msgstr "Impostazioni plugin"
523
+
524
+ #: .././admin/ga_dash_settings.php:706
525
+ msgid "For errors and/or other issues please check"
526
+ msgstr "Per errori e/o altri problemi leggere"
527
+
528
+ #: .././admin/ga_dash_settings.php:706
529
+ msgid "the plugin documentation page"
530
+ msgstr "la pagina della documentazione del plugin"
531
+
532
+ #: .././admin/ga_dash_settings.php:706
533
+ msgid "and related tutorials"
534
+ msgstr "ed i tutorial relativi"
535
+
536
+ #: .././admin/ga_dash_settings.php:710
537
+ msgid "Last Error detected"
538
+ msgstr "Ultimo errore rilevato"
539
+
540
+ #: .././admin/ga_dash_settings.php:715 .././admin/ga_dash_settings.php:728
541
+ msgid "None"
542
+ msgstr "Nessuno"
543
+
544
+ #: .././admin/ga_dash_settings.php:722
545
+ msgid "Error Details"
546
+ msgstr "Dettagli errore"
547
+
548
+ #: .././admin/ga_dash_settings.php:740
549
+ msgid "Plugin Configuration"
550
+ msgstr "Configurazione plugin"
551
+
552
+ #: .././admin/ga_dash_settings.php:788 .././admin/ga_dash_settings.php:1072
553
+ msgid ""
554
+ "Loading the required libraries. If this results in a blank screen or a fatal "
555
+ "error, try this solution:"
556
+ msgstr ""
557
+ "Caricamento delle librerie richieste. Se viene restituita una schermata "
558
+ "vuota o si verifica un errore fatale, provare questa soluzione:"
559
+
560
+ #: .././admin/ga_dash_settings.php:800 .././admin/ga_dash_settings.php:1084
561
+ msgid "Plugin authorization succeeded."
562
+ msgstr "Autorizzazione plugin riuscita."
563
+
564
+ #: .././admin/ga_dash_settings.php:816 .././admin/ga_dash_settings.php:1109
565
+ msgid ""
566
+ "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
567
+ "(UA-XXXXX-X). Try again, and use the red link to get your access code"
568
+ msgstr ""
569
+ "Il codice di accesso <strong>NON</strong> &egrave; il <strong>Tracking ID</"
570
+ "strong> (UA-XXXXX-X). Prova di nuovo utilizzando il link rosso per ottenere "
571
+ "il codice di accesso"
572
+
573
+ #: .././admin/ga_dash_settings.php:839 .././admin/ga_dash_settings.php:1141
574
+ msgid "Cleared Cache."
575
+ msgstr "Cache eliminata."
576
+
577
+ #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1150
578
+ msgid "Token Reseted and Revoked."
579
+ msgstr "Token azzerato e revocato."
580
+
581
+ #: .././admin/ga_dash_settings.php:862 .././admin/ga_dash_settings.php:1164
582
+ msgid "All other domains/properties were removed."
583
+ msgstr "Tutti gli altri domini/propriet&agrave; sono stati rimossi."
584
+
585
+ #: .././admin/ga_dash_settings.php:874 .././admin/ga_dash_settings.php:1176
586
+ msgid "Google Analytics Settings"
587
+ msgstr "Impostazioni di Google Analytics"
588
+
589
+ #: .././admin/ga_dash_settings.php:887 .././admin/ga_dash_settings.php:1189
590
+ msgid "Use the red link (see below) to generate and get your access code!"
591
+ msgstr ""
592
+ "Utilizza il link rosso (vedi sotto) per generare ed ottenere il tuo codice "
593
+ "di accesso!"
594
+
595
+ #: .././admin/ga_dash_settings.php:898 .././admin/ga_dash_settings.php:1224
596
+ msgid "Plugin Authorization"
597
+ msgstr "Autorizzazione plugin"
598
+
599
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
600
+ msgid "You should watch the"
601
+ msgstr "Dovresti guardare il"
602
+
603
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
604
+ msgid "video"
605
+ msgstr "video"
606
+
607
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
608
+ msgid "and read this"
609
+ msgstr "e leggere questa"
610
+
611
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
612
+ msgid "tutorial"
613
+ msgstr "guida"
614
+
615
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
616
+ msgid ""
617
+ "before proceeding to authorization. This plugin requires a properly "
618
+ "configured Google Analytics account"
619
+ msgstr ""
620
+ "prima di procedere con l&#39;autorizzazione. Questo plugin richiede un "
621
+ "account di Google Analytics correttamente configurato"
622
+
623
+ #: .././admin/ga_dash_settings.php:914 .././admin/ga_dash_settings.php:1239
624
+ msgid " use your own API Project credentials"
625
+ msgstr "utilizza le proprie credenziali API"
626
+
627
+ #: .././admin/ga_dash_settings.php:921 .././admin/ga_dash_settings.php:1246
628
+ msgid "API Key:"
629
+ msgstr "Chiave API:"
630
+
631
+ #: .././admin/ga_dash_settings.php:928 .././admin/ga_dash_settings.php:1254
632
+ msgid "Client ID:"
633
+ msgstr "ID Cliente:"
634
+
635
+ #: .././admin/ga_dash_settings.php:936 .././admin/ga_dash_settings.php:1263
636
+ msgid "Client Secret:"
637
+ msgstr "Client Secret:"
638
+
639
+ #: .././admin/ga_dash_settings.php:954 .././admin/ga_dash_settings.php:1282
640
+ msgid "Clear Authorization"
641
+ msgstr "Revoca autorizzazione"
642
+
643
+ #: .././admin/ga_dash_settings.php:958 .././admin/ga_dash_settings.php:1039
644
+ #: .././admin/ga_dash_settings.php:1285 .././admin/ga_dash_settings.php:1363
645
+ msgid "Clear Cache"
646
+ msgstr "Elimina cache"
647
+
648
+ #: .././admin/ga_dash_settings.php:967
649
+ msgid "Select Domain:"
650
+ msgstr "Seleziona dominio:"
651
+
652
+ #: .././admin/ga_dash_settings.php:980 .././admin/ga_dash_settings.php:1319
653
+ msgid "Property not found"
654
+ msgstr "Propriet&agrave; non trovata"
655
+
656
+ #: .././admin/ga_dash_settings.php:985
657
+ msgid "and/or hide all other domains"
658
+ msgstr "e/o nasconde tutti gli altri domini"
659
+
660
+ #: .././admin/ga_dash_settings.php:988
661
+ msgid "Hide Now"
662
+ msgstr "Nascondi ora"
663
+
664
+ #: .././admin/ga_dash_settings.php:1007
665
+ msgid "Theme Color:"
666
+ msgstr "Colore tema:"
667
+
668
+ #: .././admin/ga_dash_settings.php:1017
669
+ msgid "A new frontend widget is available! To enable it, go to"
670
+ msgstr ""
671
+ "&Egrave; disponibile un nuovo widget per il frontend. Per attivarlo, vai a"
672
+
673
+ #: .././admin/ga_dash_settings.php:1017
674
+ msgid "Appearance -> Widgets"
675
+ msgstr "Aspetto -> Widgets"
676
+
677
+ #: .././admin/ga_dash_settings.php:1017
678
+ msgid "and look for Google Analytics Dashboard."
679
+ msgstr "e cerca Bacheca di Google Analytics."
680
+
681
+ #: .././admin/ga_dash_settings.php:1115
682
+ msgid "Properties refreshed."
683
+ msgstr "Propriet&agrave; aggiornate."
684
+
685
+ #: .././admin/ga_dash_settings.php:1201
686
+ msgid "Network Setup"
687
+ msgstr "Configurazione della rete"
688
+
689
+ #: .././admin/ga_dash_settings.php:1216
690
+ msgid " use a single Google Analytics account for the entire network"
691
+ msgstr " utilizza un unico account Google Analytics per l&#39;intera rete"
692
+
693
+ #: .././admin/ga_dash_settings.php:1288
694
+ msgid "Refresh Properties"
695
+ msgstr "Aggiorna propriet&agrave;"
696
+
697
+ #: .././admin/ga_dash_settings.php:1294
698
+ msgid "Properties/Views Settings"
699
+ msgstr "Propriet&agrave;/Mostra impostazioni"
700
+
701
+ #: .././admin/ga_dash_settings.php:1342
702
+ msgid " exclude Super Admin tracking for the entire network"
703
+ msgstr " esclude il monitoraggio del Super Amministratore per tutta la rete"
704
+
705
+ #: .././admin/ga_dash_settings.php:1394
706
+ msgid "Setup Tutorial & Demo"
707
+ msgstr "Guida all'installazione & Demo"
708
+
709
+ #: .././admin/ga_dash_settings.php:1406
710
+ msgid "Support & Reviews"
711
+ msgstr "Supporto & Recensioni"
712
+
713
+ #: .././admin/ga_dash_settings.php:1414
714
+ msgid "Plugin documentation and support on"
715
+ msgstr "Documentazione del plugin e supporto su"
716
+
717
+ #: .././admin/ga_dash_settings.php:1421
718
+ msgid "Your feedback and review are both important,"
719
+ msgstr "Il tuo feedback e la tua recensione sono entrambi importanti,"
720
+
721
+ #: .././admin/ga_dash_settings.php:1421
722
+ msgid "rate this plugin"
723
+ msgstr "vota questo plugin"
724
+
725
+ #: .././admin/ga_dash_settings.php:1426
726
+ msgid "Further Reading"
727
+ msgstr "Approfondimenti"
728
+
729
+ #: .././admin/ga_dash_settings.php:1434
730
+ msgid "Improve search rankings"
731
+ msgstr "Migliorare le classifiche di ricerca"
732
+
733
+ #: .././admin/ga_dash_settings.php:1434
734
+ msgid "by moving your website to HTTPS/SSL."
735
+ msgstr "spostando il sito web a HTTPS/SSL."
736
+
737
+ #: .././admin/ga_dash_settings.php:1441
738
+ msgid "Other"
739
+ msgstr "Altri"
740
+
741
+ #: .././admin/ga_dash_settings.php:1441
742
+ msgid "WordPress Plugins"
743
+ msgstr "plugins per WordPress "
744
+
745
+ #: .././admin/ga_dash_settings.php:1441
746
+ msgid "written by the same author"
747
+ msgstr "scritti dallo stesso autore"
748
+
749
+ #: .././admin/ga_dash_settings.php:1446
750
+ msgid "Other Services"
751
+ msgstr "Altri servizi"
752
+
753
+ #: .././admin/ga_dash_settings.php:1453
754
+ msgid "Speed up your website and plug into a whole"
755
+ msgstr "Accellera il tuo sito web ad un"
756
+
757
+ #: .././admin/ga_dash_settings.php:1453
758
+ msgid "new level of site speed"
759
+ msgstr "nuovo livello di velocit&agrave;"
760
+
761
+ #: .././admin/ga_dash_settings.php:1460
762
+ msgid "Web Analytics"
763
+ msgstr "Web Analytics"
764
+
765
+ #: .././admin/ga_dash_settings.php:1460
766
+ msgid "service with users tracking at IP level."
767
+ msgstr "servizio con tracciamento degli utenti a livello IP."
768
+
769
+ #: .././front/frontend.php:134
770
+ msgid "Views vs UniqueViews"
771
+ msgstr "Visualizzazioni vs Visualizzazioni uniche"
772
+
773
+ #: .././front/frontend.php:184
774
+ msgid "Google Analytics Reports"
775
+ msgstr "Rapporti di Google Analytics"
776
+
777
+ #: .././front/widgets.php:15
778
+ msgid "Will display your google analytics stats in a widget"
779
+ msgstr "Visualizza le statistiche di Google Analytics in un widget"
780
+
781
+ #: .././front/widgets.php:40 .././tools/gapi.php:744
782
+ msgid "trend"
783
+ msgstr "tendenza"
784
+
785
+ #: .././front/widgets.php:133
786
+ msgid "Period:"
787
+ msgstr "Periodo:"
788
+
789
+ #: .././front/widgets.php:133
790
+ msgid "Sessions:"
791
+ msgstr "Sessioni:"
792
+
793
+ #: .././front/widgets.php:137
794
+ msgid "generated by"
795
+ msgstr "generato da"
796
+
797
+ #: .././front/widgets.php:147
798
+ msgid "Google Analytics Stats"
799
+ msgstr "Statistiche di Google Analytics"
800
+
801
+ #: .././front/widgets.php:154
802
+ msgid "Title:"
803
+ msgstr "Titolo:"
804
+
805
+ #: .././front/widgets.php:161
806
+ msgid "Display:"
807
+ msgstr "Mostra:"
808
+
809
+ #: .././front/widgets.php:165
810
+ msgid "Chart & Totals"
811
+ msgstr "Grafico & Totali"
812
+
813
+ #: .././front/widgets.php:166
814
+ msgid "Chart"
815
+ msgstr "Grafico"
816
+
817
+ #: .././front/widgets.php:167
818
+ msgid "Totals"
819
+ msgstr "Totali"
820
+
821
+ #: .././front/widgets.php:171
822
+ msgid "Anonymize stats:"
823
+ msgstr "Anonimizza le statistiche:"
824
+
825
+ #: .././front/widgets.php:178
826
+ msgid "Stats for:"
827
+ msgstr "Statistiche per:"
828
+
829
+ #: .././front/widgets.php:188
830
+ msgid "Give credits:"
831
+ msgstr "Crediti:"
832
+
833
+ #: .././tools/gapi.php:129
834
+ msgid "Use this link to get your access code:"
835
+ msgstr "Utilizza questo link per ottenere il codice di accesso:"
836
+
837
+ #: .././tools/gapi.php:129
838
+ msgid "Get Access Code"
839
+ msgstr "Ottieni codice di accesso"
840
+
841
+ #: .././tools/gapi.php:134 .././tools/gapi.php:138
842
+ msgid "Use the red link to get your access code!"
843
+ msgstr "Utilizza il link rosso per ottenere il tuo codice di accesso!"
844
+
845
+ #: .././tools/gapi.php:134
846
+ msgid "Access Code:"
847
+ msgstr "Codice di accesso:"
848
+
849
+ #: .././tools/gapi.php:146
850
+ msgid "Save Access Code"
851
+ msgstr "Salva codice di accesso"
852
+
853
+ #: .././tools/gapi.php:373
854
+ msgid "Organic Searches"
855
+ msgstr "Ricerche organiche"
856
+
857
+ #: .././tools/gapi.php:381
858
+ msgid "Hour"
859
+ msgstr "Ora"
860
+
861
+ #: .././tools/gapi.php:384 .././tools/gapi.php:744 .././tools/gapi.php:783
862
+ msgid "Date"
863
+ msgstr "Data"
864
+
865
+ #: .././tools/gapi.php:477 .././tools/gapi.php:783
866
+ msgid "Views"
867
+ msgstr "Visualizzazioni"
868
+
869
+ #: .././tools/gapi.php:576
870
+ msgid "Countries"
871
+ msgstr "Paesi"
872
+
873
+ #: .././tools/gapi.php:590
874
+ msgid "Cities from"
875
+ msgstr "Paese: "
876
+
877
+ #: .././tools/gapi.php:644
878
+ msgid "Channels"
879
+ msgstr "Canali"
880
+
881
+ #: .././tools/gapi.php:698
882
+ msgid "Type"
883
+ msgstr "Tipo"
884
+
885
+ #: .././tools/gapi.php:783
886
+ msgid "UniqueViews"
887
+ msgstr "Visualizzazioni uniche"
888
+
889
+ #~ msgid "Something went wrong, you need to"
890
+ #~ msgstr "Qualcosa &egrave; andato male, devi"
891
+
892
+ #~ msgid "or properly configure your"
893
+ #~ msgstr "o configura correttamente il tuo"
894
+
895
+ #~ msgid "Google Analytics account"
896
+ #~ msgstr "Account di Google Analytics"
897
+
898
+ #~ msgid "(find out more"
899
+ #~ msgstr "(per saperne di pi&ugrave;"
900
+
901
+ #~ msgid ")"
902
+ #~ msgstr ")"
903
+
904
+ #~ msgid "Additional Stats & Charts"
905
+ #~ msgstr "Ulteriori statistiche e grafici"
906
+
907
+ #~ msgid " show Geo Map chart for sessions"
908
+ #~ msgstr "mostra il grafico per le sessioni"
909
+
910
+ #~ msgid "Target Geo Map to region:"
911
+ #~ msgstr "Cartina delle visite per il paese:"
912
+
913
+ #~ msgid "and render top"
914
+ #~ msgstr "con"
915
+
916
+ #~ msgid "cities (find out more"
917
+ #~ msgstr "citt&agrave; (per saperne di più"
918
+
919
+ #~ msgid " show traffic overview"
920
+ #~ msgstr " mostra la panoramica sul traffico"
921
+
922
+ #~ msgid " show top pages"
923
+ #~ msgstr " mostra le principali pagine attive"
924
+
925
+ #~ msgid " show top referrers"
926
+ #~ msgstr " mostra i siti principali di origine del traffico"
927
+
928
+ #~ msgid " show top searches"
929
+ #~ msgstr " mostra le ricerche principali"
930
+
931
+ #~ msgid "Dumping log data."
932
+ #~ msgstr "Dumping dati di log."
933
+
934
+ #~ msgid ""
935
+ #~ "PHP CURL is required. Ask your hosting provider to install/enable PHP "
936
+ #~ "CURL!"
937
+ #~ msgstr ""
938
+ #~ "PHP CURL &egrave; necessario. Chiedete al vostro fornitore di hosting per "
939
+ #~ "installare/attivare PHP CURL!"
940
+
941
+ #~ msgid ""
942
+ #~ "Something went wrong. Please check the Debugging Data section for "
943
+ #~ "possible errors"
944
+ #~ msgstr ""
945
+ #~ "Qualcosa &egrave; andato male. Controlla la sezione dati di debug per "
946
+ #~ "possibili errori"
947
+
948
+ #~ msgid "Debugging Data"
949
+ #~ msgstr "Debug dei dati"
950
+
951
+ #~ msgid "Anonimize chart&#39;s stats:"
952
+ #~ msgstr "Rendi anonimo il grafico delle statistiche:"
953
+
954
+ #~ msgid "Top Searches"
955
+ #~ msgstr "Ricerche principali"
956
+
957
+ #~ msgid ""
958
+ #~ " (watch this <a href='http://deconf.com/projects/google-analytics-"
959
+ #~ "dashboard-for-wordpress/' target='_blank'>Step by step video tutorial</a>)"
960
+ #~ msgstr ""
961
+ #~ " (watch this <a href='http://deconf.com/projects/google-analytics-"
962
+ #~ "dashboard-for-wordpress/' target='_blank'>Step by step video tutorial</a>)"
963
+
964
+ #~ msgid "Error Log"
965
+ #~ msgstr "Log errori"
966
+
967
+ #~ msgid ""
968
+ #~ "No stats available. Please check the Debugging Data section for possible "
969
+ #~ "errors"
970
+ #~ msgstr ""
971
+ #~ "Nessuna statistica disponibile. Controlla la sezione dati di debug per "
972
+ #~ "possibili errori"
973
+
974
+ #~ msgid "Country/City"
975
+ #~ msgstr "Paese/Citt&agrave;"
976
+
977
+ #~ msgid "Source"
978
+ #~ msgstr "Sorgente"
979
+
980
+ #~ msgid "Traffic Sources"
981
+ #~ msgstr "Sorgenti di traffico"
982
+
983
+ #~ msgid "New vs. Returning"
984
+ #~ msgstr "Visitatori nuovi contro Visitatori di ritorno"
985
+
986
+ #~ msgid "Top Pages"
987
+ #~ msgstr "Principali pagine attive"
988
+
989
+ #~ msgid "Top Referrers"
990
+ #~ msgstr "Referral principali"
991
+
992
+ #~ msgid ""
993
+ #~ "This is a beta feature and is only available when using my Developer Key! "
994
+ #~ "("
995
+ #~ msgstr ""
996
+ #~ "Questa &egrave; una caratteristica beta ed &egrave; disponibile solo "
997
+ #~ "quando si utilizza il Developer Key! ("
998
+
999
+ #~ msgid "more about this feature"
1000
+ #~ msgstr "pi&ugrave; informazioni su questa funzione"
1001
+
1002
+ #~ msgid "RETURN"
1003
+ #~ msgstr "VISITATORI DI RITORNO"
1004
+
1005
+ #~ msgid "Sessions from "
1006
+ #~ msgstr "Sessioni da: "
1007
+
1008
+ #~ msgid "Sessions by Country"
1009
+ #~ msgstr "Sessioni per paese"
1010
+
1011
+ #~ msgid "Traffic Overview"
1012
+ #~ msgstr "Panoramica traffico"
1013
+
1014
+ #~ msgid "Visits"
1015
+ #~ msgstr "Visite"
1016
+
1017
+ #~ msgid "Visitors"
1018
+ #~ msgstr "Visitatori"
1019
+
1020
+ #~ msgid "Visits:"
1021
+ #~ msgstr "Visite:"
1022
+
1023
+ #~ msgid "Visitors:"
1024
+ #~ msgstr "Visitatori:"
1025
+
1026
+ #~ msgid "Page Views:"
1027
+ #~ msgstr "Pagine viste:"
1028
+
1029
+ #~ msgid "Bounce Rate:"
1030
+ #~ msgstr "Frequenza di rimbalzo:"
1031
+
1032
+ #~ msgid "Organic Search:"
1033
+ #~ msgstr "Ricerca organica:"
1034
+
1035
+ #~ msgid "Pages per Visit:"
1036
+ #~ msgstr "Pagine per visita:"
1037
+
1038
+ #~ msgid "Visits from "
1039
+ #~ msgstr "Visite da "
1040
+
1041
+ #~ msgid "Visits by Country"
1042
+ #~ msgstr "Visite per paese"
1043
+
1044
+ #~ msgid " show page visits and visitors in frontend (after each article)"
1045
+ #~ msgstr ""
1046
+ #~ " mostra le pagine visitate e visitatori nel frontend (dopo ogni articolo)"
1047
+
1048
+ #~ msgid " show Geo Map chart for visits"
1049
+ #~ msgstr " mostra la cartina geografica delle visite"
1050
+
1051
+ #~ msgid "You can find support on"
1052
+ #~ msgstr "Puoi trovare supporto su"
1053
+
1054
+ #~ msgid "DeConf.com"
1055
+ #~ msgstr "DeConf.com"
1056
+
1057
+ #~ msgid "service with visitors tracking at IP level."
1058
+ #~ msgstr "servizio con monitoraggio dei visitatori a livello IP."
1059
+
1060
+ #~ msgid "Total Visits:"
1061
+ #~ msgstr "Totale visite:"
1062
+
1063
+ #~ msgid "PHP CURL is required. Please install/enable PHP CURL!"
1064
+ #~ msgstr "CURL è necessaria. Si prega di installare/abilitare CURL!"
1065
+
1066
+ #~ msgid "Options saved."
1067
+ #~ msgstr "Opzioni salvate."
1068
+
1069
+ #~ msgid "Show stats to: "
1070
+ #~ msgstr "Mostra statistiche:"
1071
+
1072
+ #~ msgid "Update Options"
1073
+ #~ msgstr "Aggiorna opzioni"
1074
+
1075
+ #~ msgid "Tracking Options: "
1076
+ #~ msgstr "Opzioni monitoraggio: "
1077
+
1078
+ #~ msgid "Tracking Type: "
1079
+ #~ msgstr "Tipo di monitoraggio:"
1080
+
1081
+ #, fuzzy
1082
+ #~ msgid "User Type: "
1083
+ #~ msgstr "Tipo di monitoraggio:"
1084
+
1085
+ #~ msgid "Exclude tracking for: "
1086
+ #~ msgstr "Escludi monitoraggio per:"
1087
+
1088
+ #~ msgid "Select Domain: "
1089
+ #~ msgstr "Seleziona dominio:"
1090
+
1091
+ #~ msgid "Theme Color: "
1092
+ #~ msgstr "Colote tema:"
1093
+
1094
+ #~ msgid "&#39; trend"
1095
+ #~ msgstr "&#39; tendenza"
1096
+
1097
+ #~ msgid "DeConf Help Center"
1098
+ #~ msgstr "DeConf Help Center"
1099
+
1100
+ #~ msgid "Custom Code"
1101
+ #~ msgstr "Codice personalizzato"
1102
+
1103
+ #~ msgid "Your Tracking Code:"
1104
+ #~ msgstr "Il tuo codice di monitoraggio:"
languages/ga-dash-pl_PL.mo CHANGED
Binary file
languages/ga-dash-pl_PL.po CHANGED
@@ -1,83 +1,90 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
- "POT-Creation-Date: 2015-01-07 20:26+0200\n"
5
- "PO-Revision-Date: 2015-01-07 20:26+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: en\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.1\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
- #: .././admin/dashboard_widgets.php:50 .././admin/dashboard_widgets.php:81
20
  msgid "Google Analytics"
21
  msgstr "Google Analytics"
22
 
23
- #: .././admin/dashboard_widgets.php:54 .././admin/dashboard_widgets.php:85
24
- #: .././admin/ga_dash_settings.php:100 .././admin/ga_dash_settings.php:222
25
- #: .././admin/ga_dash_settings.php:954
26
  msgid "General Settings"
27
  msgstr "Ustawienia główne"
28
 
29
- #: .././admin/dashboard_widgets.php:58
30
  msgid "Backend Settings"
31
  msgstr "Ustawienia backendu"
32
 
33
- #: .././admin/dashboard_widgets.php:62
34
  msgid "Frontend Settings"
35
  msgstr "Ustawienia Frontendu"
36
 
37
- #: .././admin/dashboard_widgets.php:66
38
  msgid "Tracking Code"
39
  msgstr "Kod śledzenia"
40
 
41
- #: .././admin/dashboard_widgets.php:132
 
 
 
 
 
 
 
42
  msgid "Settings"
43
  msgstr "Ustawienia"
44
 
45
- #: .././admin/dashboard_widgets.php:148 .././front/widgets.php:15
46
  msgid "Google Analytics Dashboard"
47
  msgstr "Pulpit Google Analytics"
48
 
49
- #: .././admin/dashboard_widgets.php:166
50
  msgid "This plugin needs an authorization:"
51
  msgstr "Ta wtyczka wymaga autoryzacji:"
52
 
53
- #: .././admin/dashboard_widgets.php:166 .././admin/ga_dash_settings.php:1063
54
- #: .././admin/ga_dash_settings.php:1465
55
  msgid "Authorize Plugin"
56
  msgstr "Autoryzuj wtyczkę"
57
 
58
- #: .././admin/dashboard_widgets.php:207 .././admin/ga_dash_settings.php:459
59
- #: .././admin/ga_dash_settings.php:966 .././admin/ga_dash_settings.php:991
60
- #: .././admin/ga_dash_settings.php:1383
61
  msgid "View Name:"
62
  msgstr "Nazwa widoku:"
63
 
64
- #: .././admin/dashboard_widgets.php:212
65
  msgid "Something went wrong while retrieving profiles list."
66
  msgstr "Coś poszło nie tak podczas pobierania listy profili."
67
 
68
- #: .././admin/dashboard_widgets.php:212
69
  msgid "More details"
70
  msgstr "Więcej szczegółów"
71
 
72
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
73
  msgid "An admin should asign a default Google Analytics Profile."
74
  msgstr "Administrator poiwnien ustawić domyślny profil Google Analytics."
75
 
76
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
77
  msgid "Select Domain"
78
  msgstr "Wybierz domenę"
79
 
80
- #: .././admin/dashboard_widgets.php:245
81
  msgid ""
82
  "Something went wrong while retrieving property data. You need to create and "
83
  "properly configure a Google Analytics account:"
@@ -85,490 +92,517 @@ msgstr ""
85
  "Coś poszło nie tak podczas pobierania danych. Musisz stworzyc i odpowiednio "
86
  "skonfigurować konto Google Analytics:"
87
 
88
- #: .././admin/dashboard_widgets.php:245
89
  msgid "Find out more!"
90
  msgstr "Dowiedz sie więcej!"
91
 
92
- #: .././admin/dashboard_widgets.php:276
93
  msgid "Real-Time"
94
  msgstr "Czas rzeczywisty"
95
 
96
- #: .././admin/dashboard_widgets.php:277
97
  msgid "Today"
98
  msgstr "Dzisiaj"
99
 
100
- #: .././admin/dashboard_widgets.php:279
101
  msgid "Yesterday"
102
  msgstr "Wczoraj"
103
 
104
- #: .././admin/dashboard_widgets.php:281 .././front/widgets.php:83
105
- #: .././front/widgets.php:199
106
  msgid "Last 7 Days"
107
  msgstr "Ostatnie 7 dni"
108
 
109
- #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:86
110
- #: .././front/widgets.php:200
111
  msgid "Last 14 Days"
112
  msgstr "Ostatnie 14 dni"
113
 
114
- #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:89
115
- #: .././front/widgets.php:201
116
  msgid "Last 30 Days"
117
  msgstr "Ostatnie 30 dni"
118
 
119
- #: .././admin/dashboard_widgets.php:287
120
  msgid "Last 90 Days"
121
  msgstr "Ostatnie 90 dni"
122
 
123
- #: .././admin/dashboard_widgets.php:293 .././admin/dashboard_widgets.php:952
124
- #: .././front/widgets.php:44 .././tools/gapi.php:384 .././tools/gapi.php:543
125
- #: .././tools/gapi.php:587 .././tools/gapi.php:658 .././tools/gapi.php:808
126
- #: .././tools/gapi.php:899
127
  msgid "Sessions"
128
  msgstr ""
129
 
130
- #: .././admin/dashboard_widgets.php:294 .././admin/dashboard_widgets.php:956
131
- #: .././tools/gapi.php:368
132
  msgid "Users"
133
  msgstr ""
134
 
135
- #: .././admin/dashboard_widgets.php:296
136
  msgid "Organic"
137
  msgstr "Organiczne"
138
 
139
- #: .././admin/dashboard_widgets.php:298 .././admin/dashboard_widgets.php:960
140
- #: .././tools/gapi.php:372
141
  msgid "Page Views"
142
  msgstr "Wyświetleń strony"
143
 
144
- #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:964
145
- #: .././tools/gapi.php:376
146
  msgid "Bounce Rate"
147
  msgstr "Współczynnik odrzuceń"
148
 
149
- #: .././admin/dashboard_widgets.php:302
150
  msgid "Location"
151
  msgstr ""
152
 
153
- #: .././admin/dashboard_widgets.php:304 .././tools/gapi.php:500
154
  msgid "Pages"
155
  msgstr ""
156
 
157
- #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:543
158
  msgid "Referrers"
159
  msgstr ""
160
 
161
- #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:587
 
162
  msgid "Searches"
163
  msgstr ""
164
 
165
- #: .././admin/dashboard_widgets.php:310
166
  msgid "Traffic Details"
167
  msgstr ""
168
 
169
- #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:657
170
  msgid "REFERRAL"
171
  msgstr "REFERUJĄCY"
172
 
173
- #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:658
174
  msgid "ORGANIC"
175
  msgstr "ORGANICZNE"
176
 
177
- #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:544
178
- #: .././admin/dashboard_widgets.php:659
179
  msgid "SOCIAL"
180
  msgstr "SPOŁECZNE"
181
 
182
- #: .././admin/dashboard_widgets.php:428 .././admin/dashboard_widgets.php:547
183
- #: .././admin/dashboard_widgets.php:660
184
  msgid "CAMPAIGN"
185
  msgstr ""
186
 
187
- #: .././admin/dashboard_widgets.php:432 .././admin/dashboard_widgets.php:550
188
- #: .././admin/dashboard_widgets.php:663
189
  msgid "DIRECT"
190
  msgstr "BEZPOŚREDNIE"
191
 
192
- #: .././admin/dashboard_widgets.php:436 .././admin/dashboard_widgets.php:664
193
  msgid "NEW"
194
  msgstr "NOWE"
195
 
196
- #: .././admin/dashboard_widgets.php:538
197
  msgid "REFERRALS"
198
  msgstr "REFERUJĄCY"
199
 
200
- #: .././admin/dashboard_widgets.php:541
201
  msgid "KEYWORDS"
202
  msgstr "SŁOWA KLUCZOWE"
203
 
204
- #: .././admin/dashboard_widgets.php:690 .././admin/dashboard_widgets.php:702
205
- #: .././admin/dashboard_widgets.php:757 .././admin/dashboard_widgets.php:769
206
- #: .././admin/dashboard_widgets.php:781 .././admin/dashboard_widgets.php:793
207
- #: .././admin/dashboard_widgets.php:806 .././admin/dashboard_widgets.php:905
208
- #: .././admin/dashboard_widgets.php:908 .././admin/dashboard_widgets.php:992
209
- #: .././admin/dashboard_widgets.php:1004 .././front/frontend.php:88
210
- #: .././front/frontend.php:100 .././front/widgets.php:122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  msgid "This report is unavailable"
212
  msgstr ""
213
 
214
- #: .././admin/dashboard_widgets.php:818
215
  msgid "Traffic Mediums"
216
  msgstr ""
217
 
218
- #: .././admin/dashboard_widgets.php:834
219
  msgid "Visitor Type"
220
  msgstr ""
221
 
222
- #: .././admin/dashboard_widgets.php:850
223
  msgid "Social Networks"
224
  msgstr ""
225
 
226
- #: .././admin/dashboard_widgets.php:866
227
  msgid "Search Engines"
228
  msgstr ""
229
 
230
- #: .././admin/dashboard_widgets.php:968
231
  msgid "Organic Search"
232
  msgstr ""
233
 
234
- #: .././admin/dashboard_widgets.php:972
235
  msgid "Pages/Session"
236
  msgstr ""
237
 
238
- #: .././admin/ga_dash_settings.php:78 .././admin/ga_dash_settings.php:200
239
- #: .././admin/ga_dash_settings.php:418 .././admin/ga_dash_settings.php:841
240
- #: .././admin/ga_dash_settings.php:1228
241
  msgid "Settings saved."
242
  msgstr ""
243
 
244
- #: .././admin/ga_dash_settings.php:80 .././admin/ga_dash_settings.php:202
245
- #: .././admin/ga_dash_settings.php:420 .././admin/ga_dash_settings.php:824
246
- #: .././admin/ga_dash_settings.php:834 .././admin/ga_dash_settings.php:843
247
- #: .././admin/ga_dash_settings.php:855 .././admin/ga_dash_settings.php:1183
248
- #: .././admin/ga_dash_settings.php:1211 .././admin/ga_dash_settings.php:1221
249
- #: .././admin/ga_dash_settings.php:1230 .././admin/ga_dash_settings.php:1242
250
  msgid "Cheating Huh?"
251
  msgstr "Oszukujemy, co?"
252
 
253
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
254
- #: .././admin/ga_dash_settings.php:424
255
- msgid "Something went wrong, you need to"
256
- msgstr "Coś poszło nie tak, musisz"
 
257
 
258
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
259
- #: .././admin/ga_dash_settings.php:424
 
 
 
 
 
 
 
260
  msgid "auhorize the plugin"
261
  msgstr "autoryzować wtyczkę"
262
 
263
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
264
- #: .././admin/ga_dash_settings.php:424
265
- msgid "or properly configure your"
266
- msgstr "lub poprawnie skonfigurować twoje"
267
-
268
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
269
- #: .././admin/ga_dash_settings.php:424
270
- msgid "Google Analytics account"
271
- msgstr "konto Google Analytics"
272
-
273
- #: .././admin/ga_dash_settings.php:90
274
  msgid "Google Analytics Frontend Settings"
275
  msgstr "Ustawienia Frontendu Google Analytics"
276
 
277
- #: .././admin/ga_dash_settings.php:103 .././admin/ga_dash_settings.php:225
278
  msgid "Show stats to:"
279
  msgstr ""
280
 
281
- #: .././admin/ga_dash_settings.php:153
282
  msgid " show page sessions and users in frontend (after each article)"
283
  msgstr ""
284
 
285
- #: .././admin/ga_dash_settings.php:169
286
  msgid " show page searches (after each article)"
287
  msgstr "pokaż wyszukiwania strony (po każdym artykule)"
288
 
289
- #: .././admin/ga_dash_settings.php:178 .././admin/ga_dash_settings.php:391
290
- #: .././admin/ga_dash_settings.php:739 .././admin/ga_dash_settings.php:1053
291
- #: .././admin/ga_dash_settings.php:1456
292
  msgid "Save Changes"
293
  msgstr ""
294
 
295
- #: .././admin/ga_dash_settings.php:212
296
  msgid "Google Analytics Dashboard Settings"
297
  msgstr "Ustawienia Pulpitu Google Analytics"
298
 
299
- #: .././admin/ga_dash_settings.php:275
300
  msgid "disable Switch Profile/View functionality"
301
  msgstr "wyłącz funkcjonalność Przełączanie Profilu/Widoku"
302
 
303
- #: .././admin/ga_dash_settings.php:279
304
  msgid "Real-Time Settings"
305
  msgstr "Ustawienia Czasu Rzeczywistego"
306
 
307
- #: .././admin/ga_dash_settings.php:282
308
  msgid "Maximum number of pages to display on real-time tab:"
309
  msgstr "Maksymalna liczba stron wyświetlanych na karcie Czas Rzeczywisty:"
310
 
311
- #: .././admin/ga_dash_settings.php:287
312
- msgid "(find out more"
313
- msgstr "(dowiedz się więcej"
314
 
315
- #: .././admin/ga_dash_settings.php:289 .././admin/ga_dash_settings.php:324
316
  msgid "about this feature"
317
  msgstr "o tej opcji"
318
 
319
- #: .././admin/ga_dash_settings.php:290 .././admin/ga_dash_settings.php:325
320
- msgid ")"
321
- msgstr ")"
 
 
 
 
322
 
323
- #: .././admin/ga_dash_settings.php:293
324
- msgid "Additional Stats & Charts"
325
- msgstr "Dodatkowe Statystyki & Wykresy"
326
 
327
- #: .././admin/ga_dash_settings.php:306
328
- msgid " show Geo Map chart for sessions"
329
  msgstr ""
330
 
331
- #: .././admin/ga_dash_settings.php:311
332
- msgid "Target Geo Map to region:"
333
- msgstr "Ustaw Geo Mapę na region:"
334
 
335
- #: .././admin/ga_dash_settings.php:316
336
- msgid "and render top"
337
- msgstr "i wyrenderuj najlepsze"
338
 
339
- #: .././admin/ga_dash_settings.php:321
340
- msgid "cities (find out more"
341
- msgstr "miasta (dowiedz się więcej"
342
 
343
- #: .././admin/ga_dash_settings.php:339
344
- msgid " show traffic overview"
345
- msgstr "pokaż przegląd ruchu"
346
 
347
- #: .././admin/ga_dash_settings.php:353
348
- msgid " show top pages"
349
- msgstr "pokaż najlepsze strony"
350
 
351
- #: .././admin/ga_dash_settings.php:367
352
- msgid " show top referrers"
353
- msgstr "pokaż najlepszych referujących"
354
 
355
- #: .././admin/ga_dash_settings.php:381
356
- msgid " show top searches"
357
- msgstr "pokaż najlepsze wyszukiwania"
 
358
 
359
- #: .././admin/ga_dash_settings.php:430
360
- msgid "Google Analytics Tracking Code"
361
- msgstr "Kod Śledzenia Google Analytics"
362
 
363
- #: .././admin/ga_dash_settings.php:440
364
  msgid "Tracking Settings"
365
  msgstr "Ustawienia Śledzenia"
366
 
367
- #: .././admin/ga_dash_settings.php:443
368
  msgid "Tracking Options:"
369
  msgstr ""
370
 
371
- #: .././admin/ga_dash_settings.php:447
372
  msgid "Disabled"
373
  msgstr "Wyłączone"
374
 
375
- #: .././admin/ga_dash_settings.php:449
376
- msgid "Enabled"
377
- msgstr "Włączone"
378
-
379
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
380
  msgid "Tracking ID:"
381
  msgstr "Tracking ID:"
382
 
383
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
384
  msgid "Default URL:"
385
  msgstr "Domyślny URL:"
386
 
387
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
388
  msgid "Time Zone:"
389
  msgstr "Strefa Czasowa:"
390
 
391
- #: .././admin/ga_dash_settings.php:467
392
  #, fuzzy
393
  msgid "Basic Tracking"
394
  msgstr "Śledzenie Zdarzeń"
395
 
396
- #: .././admin/ga_dash_settings.php:473
397
  msgid "Tracking Type:"
398
  msgstr ""
399
 
400
- #: .././admin/ga_dash_settings.php:477
401
  msgid "Classic Analytics"
402
  msgstr "Klasyczne Analytics"
403
 
404
- #: .././admin/ga_dash_settings.php:479
405
  msgid "Universal Analytics"
406
  msgstr "Uniwerslane Analytics"
407
 
408
- #: .././admin/ga_dash_settings.php:493
409
  msgid " anonymize IPs while tracking"
410
  msgstr "ukryj adresy IP podczas śledzenia"
411
 
412
- #: .././admin/ga_dash_settings.php:508
413
  msgid " enable remarketing, demographics and interests reports"
414
  msgstr "włącz raporty zainteresować, remarketingowe i demograficzne"
415
 
416
- #: .././admin/ga_dash_settings.php:512
417
- msgid "Events Tracking"
418
- msgstr "Śledzenie Zdarzeń"
419
-
420
- #: .././admin/ga_dash_settings.php:525
421
  msgid " track downloads, mailto and outbound links"
422
  msgstr "śledź pobrania, wysyłanie maili i linki wychodzące"
423
 
424
- #: .././admin/ga_dash_settings.php:529
425
  #, fuzzy
426
  msgid "Downloads Regex:"
427
  msgstr "Filtry Pobierania:"
428
 
429
- #: .././admin/ga_dash_settings.php:546
430
  msgid " track affiliate links matching this regex"
431
  msgstr ""
432
 
433
- #: .././admin/ga_dash_settings.php:550
434
  msgid "Affiliates Regex:"
435
  msgstr ""
436
 
437
- #: .././admin/ga_dash_settings.php:567
438
  msgid " track fragment identifiers, hashmarks (#) in URI links"
439
  msgstr ""
440
 
441
- #: .././admin/ga_dash_settings.php:571
442
- msgid "Custom Definitions"
443
- msgstr ""
444
-
445
- #: .././admin/ga_dash_settings.php:574
446
  msgid "Authors:"
447
  msgstr ""
448
 
449
- #: .././admin/ga_dash_settings.php:584
450
  msgid "Publication Year:"
451
  msgstr ""
452
 
453
- #: .././admin/ga_dash_settings.php:594
454
  msgid "Categories:"
455
  msgstr ""
456
 
457
- #: .././admin/ga_dash_settings.php:604
458
  msgid "User Type:"
459
  msgstr ""
460
 
461
- #: .././admin/ga_dash_settings.php:614
462
  #, fuzzy
463
  msgid "Advanced Tracking"
464
  msgstr "Śledzenie Zdarzeń"
465
 
466
- #: .././admin/ga_dash_settings.php:617
467
  msgid "Page Speed SR:"
468
  msgstr "Page Speed SR:"
469
 
470
- #: .././admin/ga_dash_settings.php:635
471
  #, fuzzy
472
  msgid " exclude events from bounce-rate calculation"
473
  msgstr "wyklucz zdarzenie kliknięcia z kalkulacji stawki odrzuceń"
474
 
475
- #: .././admin/ga_dash_settings.php:649
476
  msgid " enable enhanced link attribution"
477
  msgstr "włącz rozszerzone przypisywanie linków"
478
 
479
- #: .././admin/ga_dash_settings.php:663
480
  msgid " enable AdSense account linking"
481
  msgstr " włącz linkowanie konta AdSense"
482
 
483
- #: .././admin/ga_dash_settings.php:678
484
  msgid " enable cross domain tracking"
485
  msgstr ""
486
 
487
- #: .././admin/ga_dash_settings.php:682
488
  msgid "Cross Domains:"
489
  msgstr ""
490
 
491
- #: .././admin/ga_dash_settings.php:692 .././admin/ga_dash_settings.php:1396
492
- msgid "Exclude Tracking"
493
- msgstr "Wyklucz Śledzenie"
494
-
495
- #: .././admin/ga_dash_settings.php:695
496
  msgid "Exclude tracking for:"
497
  msgstr ""
498
 
499
- #: .././admin/ga_dash_settings.php:769 .././admin/ga_dash_settings.php:1138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
500
  msgid ""
501
  "Loading the required libraries. If this results in a blank screen or a fatal "
502
  "error, try this solution:"
503
  msgstr ""
504
 
505
- #: .././admin/ga_dash_settings.php:781 .././admin/ga_dash_settings.php:1150
506
  msgid "Plugin authorization succeeded."
507
  msgstr "Autoryzacja wtyczki pomyślna."
508
 
509
- #: .././admin/ga_dash_settings.php:796 .././admin/ga_dash_settings.php:1173
510
  msgid ""
511
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
512
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
513
  msgstr ""
514
 
515
- #: .././admin/ga_dash_settings.php:822 .././admin/ga_dash_settings.php:1209
516
  msgid "Cleared Cache."
517
  msgstr "Cache wyczyszczony."
518
 
519
- #: .././admin/ga_dash_settings.php:831 .././admin/ga_dash_settings.php:1218
520
  msgid "Token Reseted and Revoked."
521
  msgstr "Token wyczyszczony i wycofany."
522
 
523
- #: .././admin/ga_dash_settings.php:838 .././admin/ga_dash_settings.php:1225
524
- msgid "Dumping log data."
525
- msgstr "Zrzucanie danych lgowania."
526
-
527
- #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1235
528
  msgid "All other domains/properties were removed."
529
  msgstr "Wszystkie inne domeny/właściwości zostały usunięte."
530
 
531
- #: .././admin/ga_dash_settings.php:859 .././admin/ga_dash_settings.php:1246
532
- msgid ""
533
- "PHP CURL is required. Ask your hosting provider to install/enable PHP CURL!"
534
- msgstr ""
535
-
536
- #: .././admin/ga_dash_settings.php:863 .././admin/ga_dash_settings.php:1250
537
  msgid "Google Analytics Settings"
538
  msgstr "Ustawienia Google Analytics"
539
 
540
- #: .././admin/ga_dash_settings.php:872 .././admin/ga_dash_settings.php:1258
541
- msgid ""
542
- "Something went wrong. Please check the Debugging Data section for possible "
543
- "errors"
544
- msgstr ""
545
- "Coś poszło nie tak. Sprawdź sekcję Dane debugowania, aby zobaczyć błędy"
546
-
547
- #: .././admin/ga_dash_settings.php:878 .././admin/ga_dash_settings.php:1263
548
  msgid "Use the red link (see below) to generate and get your access code!"
549
  msgstr ""
550
 
551
- #: .././admin/ga_dash_settings.php:889 .././admin/ga_dash_settings.php:1297
552
  msgid "Plugin Authorization"
553
  msgstr "Autoryzacja Wtyczki"
554
 
555
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
556
  msgid "You should watch the"
557
  msgstr "Powinienieś obejrzeć"
558
 
559
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
560
  msgid "video"
561
  msgstr "film"
562
 
563
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
564
  msgid "and read this"
565
  msgstr "i przeczytać"
566
 
567
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
568
  msgid "tutorial"
569
  msgstr "tutorial"
570
 
571
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
572
  msgid ""
573
  "before proceeding to authorization. This plugin requires a properly "
574
  "configured Google Analytics account"
@@ -576,279 +610,327 @@ msgstr ""
576
  "przed ukończeniem autoryzacji. Ta wtyczka wymaga poprawnie skonfigurowanego "
577
  "konta Google Analytics"
578
 
579
- #: .././admin/ga_dash_settings.php:905 .././admin/ga_dash_settings.php:1312
580
  msgid " use your own API Project credentials"
581
  msgstr "użyj własnych danych logowania do API Projektu"
582
 
583
- #: .././admin/ga_dash_settings.php:912 .././admin/ga_dash_settings.php:1319
584
  msgid "API Key:"
585
  msgstr "Klucz API:"
586
 
587
- #: .././admin/ga_dash_settings.php:919 .././admin/ga_dash_settings.php:1326
588
  msgid "Client ID:"
589
  msgstr "ID Klienta:"
590
 
591
- #: .././admin/ga_dash_settings.php:926 .././admin/ga_dash_settings.php:1334
592
  msgid "Client Secret:"
593
  msgstr "Hasło Klienta:"
594
 
595
- #: .././admin/ga_dash_settings.php:944 .././admin/ga_dash_settings.php:1352
596
  msgid "Clear Authorization"
597
  msgstr "Czyść Autoryzację"
598
 
599
- #: .././admin/ga_dash_settings.php:948 .././admin/ga_dash_settings.php:1067
600
- #: .././admin/ga_dash_settings.php:1355 .././admin/ga_dash_settings.php:1469
601
  msgid "Clear Cache"
602
  msgstr "Czyść Cache"
603
 
604
- #: .././admin/ga_dash_settings.php:957
605
  msgid "Select Domain:"
606
  msgstr ""
607
 
608
- #: .././admin/ga_dash_settings.php:970 .././admin/ga_dash_settings.php:1387
609
  msgid "Property not found"
610
  msgstr ""
611
 
612
- #: .././admin/ga_dash_settings.php:975
613
  msgid "and/or hide all other domains"
614
  msgstr "i/lub ukryj wszystkie inne domeny"
615
 
616
- #: .././admin/ga_dash_settings.php:978
617
  msgid "Hide Now"
618
  msgstr "Ukryj Teraz"
619
 
620
- #: .././admin/ga_dash_settings.php:997
621
  msgid "Theme Color:"
622
  msgstr ""
623
 
624
- #: .././admin/ga_dash_settings.php:1007
625
  msgid "A new frontend widget is available! To enable it, go to"
626
  msgstr "Nowy widget frontendu jest dostępny! Aby go włączyć, przejðź do"
627
 
628
- #: .././admin/ga_dash_settings.php:1007
629
  msgid "Appearance -> Widgets"
630
  msgstr "Wygląd -> Widgety"
631
 
632
- #: .././admin/ga_dash_settings.php:1007
633
  msgid "and look for Google Analytics Dashboard."
634
  msgstr "i poszukać Pulpit Google Analytics."
635
 
636
- #: .././admin/ga_dash_settings.php:1013 .././admin/ga_dash_settings.php:1073
637
- #: .././admin/ga_dash_settings.php:1416 .././admin/ga_dash_settings.php:1475
638
- msgid "Debugging Data"
639
- msgstr "Dane Debugowania"
640
-
641
- #: .././admin/ga_dash_settings.php:1180
642
  msgid "Properties refreshed."
643
  msgstr "Właściwości Odświeżone"
644
 
645
- #: .././admin/ga_dash_settings.php:1274
646
  msgid "Network Setup"
647
  msgstr "Ustawienia Sieci"
648
 
649
- #: .././admin/ga_dash_settings.php:1289
650
  msgid " use a single Google Analytics account for the entire network"
651
  msgstr "Użyj jednego konta Google Analytics dla całej sieci"
652
 
653
- #: .././admin/ga_dash_settings.php:1358
654
  msgid "Refresh Properties"
655
  msgstr "Odśwież Właściwości"
656
 
657
- #: .././admin/ga_dash_settings.php:1364
658
  msgid "Properties/Views Settings"
659
  msgstr "Ustawienia Właściwości /Widoków"
660
 
661
- #: .././admin/ga_dash_settings.php:1409
662
  msgid " exclude Super Admin tracking for the entire network"
663
  msgstr ""
664
 
665
- #: .././admin/ga_dash_settings.php:1537
666
  msgid "Setup Tutorial & Demo"
667
  msgstr "Ustaw Tutorial & Demo"
668
 
669
- #: .././admin/ga_dash_settings.php:1549
670
  msgid "Support & Reviews"
671
  msgstr "Wsparcie techniczne & Recenzje"
672
 
673
- #: .././admin/ga_dash_settings.php:1557
674
  msgid "Plugin documentation and support on"
675
  msgstr ""
676
 
677
- #: .././admin/ga_dash_settings.php:1564
678
  msgid "Your feedback and review are both important,"
679
  msgstr "Twój komentarz i ocena są ważne,"
680
 
681
- #: .././admin/ga_dash_settings.php:1564
682
  msgid "rate this plugin"
683
  msgstr "oceń tą wtyczkę"
684
 
685
- #: .././admin/ga_dash_settings.php:1569
686
  msgid "Further Reading"
687
  msgstr "Inne Dokumenty"
688
 
689
- #: .././admin/ga_dash_settings.php:1576
690
  msgid "Improve search rankings"
691
  msgstr ""
692
 
693
- #: .././admin/ga_dash_settings.php:1576
694
  msgid "by moving your website to HTTPS/SSL."
695
  msgstr ""
696
 
697
- #: .././admin/ga_dash_settings.php:1582
698
  msgid "Other"
699
  msgstr "Inne"
700
 
701
- #: .././admin/ga_dash_settings.php:1582
702
  msgid "WordPress Plugins"
703
  msgstr "Wtyczki WordPressa"
704
 
705
- #: .././admin/ga_dash_settings.php:1582
706
  msgid "written by the same author"
707
  msgstr "napisane przez tego samego autora"
708
 
709
- #: .././admin/ga_dash_settings.php:1587
710
  msgid "Other Services"
711
  msgstr ""
712
 
713
- #: .././admin/ga_dash_settings.php:1594
714
  msgid "Speed up your website and plug into a whole"
715
  msgstr ""
716
 
717
- #: .././admin/ga_dash_settings.php:1594
718
  msgid "new level of site speed"
719
  msgstr ""
720
 
721
- #: .././admin/ga_dash_settings.php:1600
722
  msgid "Web Analytics"
723
  msgstr "Web Analytics"
724
 
725
- #: .././admin/ga_dash_settings.php:1600
726
  msgid "service with users tracking at IP level."
727
  msgstr ""
728
 
729
- #: .././front/frontend.php:112
730
  msgid "Views vs UniqueViews"
731
  msgstr "Odsłon vs Odsłon Unikalnych"
732
 
733
- #: .././front/frontend.php:168
734
  msgid "Google Analytics Reports"
735
  msgstr ""
736
 
737
- #: .././front/widgets.php:16
738
  msgid "Will display your google analytics stats in a widget"
739
  msgstr "Wyświetli twoje statystyki Google Analytics na widgecie"
740
 
741
- #: .././front/widgets.php:44 .././tools/gapi.php:808
742
  msgid "trend"
743
  msgstr ""
744
 
745
- #: .././front/widgets.php:144
746
  msgid "Period:"
747
  msgstr "Okres:"
748
 
749
- #: .././front/widgets.php:144
750
  msgid "Sessions:"
751
  msgstr ""
752
 
753
- #: .././front/widgets.php:150
754
  msgid "generated by"
755
  msgstr "wygenerowane przez"
756
 
757
- #: .././front/widgets.php:164
758
  msgid "Google Analytics Stats"
759
  msgstr "Statystyki Google Analytics"
760
 
761
- #: .././front/widgets.php:171
762
  msgid "Title:"
763
  msgstr "Tytuł:"
764
 
765
- #: .././front/widgets.php:178
766
  msgid "Display:"
767
  msgstr "Wyświetlenie:"
768
 
769
- #: .././front/widgets.php:182
770
  msgid "Chart & Totals"
771
  msgstr "Wykres & Podsumowania"
772
 
773
- #: .././front/widgets.php:183
774
  msgid "Chart"
775
  msgstr "Wykres"
776
 
777
- #: .././front/widgets.php:184
778
  msgid "Totals"
779
  msgstr "Podsumowania"
780
 
781
- #: .././front/widgets.php:188
782
- msgid "Anonimize chart&#39;s stats:"
783
- msgstr "Statystyki wykresu"
784
 
785
- #: .././front/widgets.php:195
786
  msgid "Stats for:"
787
  msgstr "Statystyki dla:"
788
 
789
- #: .././front/widgets.php:205
790
  msgid "Give credits:"
791
  msgstr "Podziękuj:"
792
 
793
- #: .././tools/gapi.php:140
794
  msgid "Use this link to get your access code:"
795
  msgstr "Użyj tego linku, aby uzyskać kod dostępu:"
796
 
797
- #: .././tools/gapi.php:140
798
  msgid "Get Access Code"
799
  msgstr "Zdobądź Kod Dostępu"
800
 
801
- #: .././tools/gapi.php:145 .././tools/gapi.php:149
802
  msgid "Use the red link to get your access code!"
803
  msgstr ""
804
 
805
- #: .././tools/gapi.php:145
806
  msgid "Access Code:"
807
  msgstr "Kod Dostępu:"
808
 
809
- #: .././tools/gapi.php:157
810
  msgid "Save Access Code"
811
  msgstr "Zapisz Kod Dostępu"
812
 
813
- #: .././tools/gapi.php:380
814
  msgid "Organic Searches"
815
  msgstr "Wyszukiwania organiczne"
816
 
817
- #: .././tools/gapi.php:391
818
  msgid "Hour"
819
  msgstr "Godzina"
820
 
821
- #: .././tools/gapi.php:394 .././tools/gapi.php:808 .././tools/gapi.php:852
822
  msgid "Date"
823
  msgstr "Data"
824
 
825
- #: .././tools/gapi.php:500 .././tools/gapi.php:852
826
  msgid "Views"
827
  msgstr "Odsłon"
828
 
829
- #: .././tools/gapi.php:611
830
  msgid "Countries"
831
  msgstr ""
832
 
833
- #: .././tools/gapi.php:629
834
  msgid "Cities from"
835
  msgstr ""
836
 
837
- #: .././tools/gapi.php:691
838
  msgid "Channels"
839
  msgstr ""
840
 
841
- #: .././tools/gapi.php:754
842
  msgid "Type"
843
  msgstr "Typ"
844
 
845
- #: .././tools/gapi.php:852
846
  msgid "UniqueViews"
847
  msgstr "Odsłon Unikalnych"
848
 
849
- #: .././tools/gapi.php:899
850
- msgid "Top Searches"
851
- msgstr "Najlepsze wyszukiwania"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852
 
853
  #~ msgid "Error Log"
854
  #~ msgstr "Dziennik błędów"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
+ "POT-Creation-Date: 2015-02-07 11:40+0200\n"
5
+ "PO-Revision-Date: 2015-02-07 11:40+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: en\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.7.4\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
+ #: .././admin/dashboard_widgets.php:67 .././admin/dashboard_widgets.php:100
20
  msgid "Google Analytics"
21
  msgstr "Google Analytics"
22
 
23
+ #: .././admin/dashboard_widgets.php:71 .././admin/dashboard_widgets.php:104
24
+ #: .././admin/ga_dash_settings.php:105 .././admin/ga_dash_settings.php:216
25
+ #: .././admin/ga_dash_settings.php:964
26
  msgid "General Settings"
27
  msgstr "Ustawienia główne"
28
 
29
+ #: .././admin/dashboard_widgets.php:75
30
  msgid "Backend Settings"
31
  msgstr "Ustawienia backendu"
32
 
33
+ #: .././admin/dashboard_widgets.php:79
34
  msgid "Frontend Settings"
35
  msgstr "Ustawienia Frontendu"
36
 
37
+ #: .././admin/dashboard_widgets.php:83
38
  msgid "Tracking Code"
39
  msgstr "Kod śledzenia"
40
 
41
+ #: .././admin/dashboard_widgets.php:87 .././admin/dashboard_widgets.php:108
42
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
43
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
44
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
45
+ msgid "Errors & Debug"
46
+ msgstr ""
47
+
48
+ #: .././admin/dashboard_widgets.php:152
49
  msgid "Settings"
50
  msgstr "Ustawienia"
51
 
52
+ #: .././admin/dashboard_widgets.php:166 .././front/widgets.php:14
53
  msgid "Google Analytics Dashboard"
54
  msgstr "Pulpit Google Analytics"
55
 
56
+ #: .././admin/dashboard_widgets.php:183
57
  msgid "This plugin needs an authorization:"
58
  msgstr "Ta wtyczka wymaga autoryzacji:"
59
 
60
+ #: .././admin/dashboard_widgets.php:183 .././admin/ga_dash_settings.php:1035
61
+ #: .././admin/ga_dash_settings.php:1360
62
  msgid "Authorize Plugin"
63
  msgstr "Autoryzuj wtyczkę"
64
 
65
+ #: .././admin/dashboard_widgets.php:216 .././admin/ga_dash_settings.php:380
66
+ #: .././admin/ga_dash_settings.php:976 .././admin/ga_dash_settings.php:1001
67
+ #: .././admin/ga_dash_settings.php:1315
68
  msgid "View Name:"
69
  msgstr "Nazwa widoku:"
70
 
71
+ #: .././admin/dashboard_widgets.php:221
72
  msgid "Something went wrong while retrieving profiles list."
73
  msgstr "Coś poszło nie tak podczas pobierania listy profili."
74
 
75
+ #: .././admin/dashboard_widgets.php:221
76
  msgid "More details"
77
  msgstr "Więcej szczegółów"
78
 
79
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
80
  msgid "An admin should asign a default Google Analytics Profile."
81
  msgstr "Administrator poiwnien ustawić domyślny profil Google Analytics."
82
 
83
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
84
  msgid "Select Domain"
85
  msgstr "Wybierz domenę"
86
 
87
+ #: .././admin/dashboard_widgets.php:250
88
  msgid ""
89
  "Something went wrong while retrieving property data. You need to create and "
90
  "properly configure a Google Analytics account:"
92
  "Coś poszło nie tak podczas pobierania danych. Musisz stworzyc i odpowiednio "
93
  "skonfigurować konto Google Analytics:"
94
 
95
+ #: .././admin/dashboard_widgets.php:250
96
  msgid "Find out more!"
97
  msgstr "Dowiedz sie więcej!"
98
 
99
+ #: .././admin/dashboard_widgets.php:278
100
  msgid "Real-Time"
101
  msgstr "Czas rzeczywisty"
102
 
103
+ #: .././admin/dashboard_widgets.php:279
104
  msgid "Today"
105
  msgstr "Dzisiaj"
106
 
107
+ #: .././admin/dashboard_widgets.php:281
108
  msgid "Yesterday"
109
  msgstr "Wczoraj"
110
 
111
+ #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:72
112
+ #: .././front/widgets.php:182
113
  msgid "Last 7 Days"
114
  msgstr "Ostatnie 7 dni"
115
 
116
+ #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:75
117
+ #: .././front/widgets.php:183
118
  msgid "Last 14 Days"
119
  msgstr "Ostatnie 14 dni"
120
 
121
+ #: .././admin/dashboard_widgets.php:287 .././front/widgets.php:78
122
+ #: .././front/widgets.php:184
123
  msgid "Last 30 Days"
124
  msgstr "Ostatnie 30 dni"
125
 
126
+ #: .././admin/dashboard_widgets.php:289
127
  msgid "Last 90 Days"
128
  msgstr "Ostatnie 90 dni"
129
 
130
+ #: .././admin/dashboard_widgets.php:295 .././admin/dashboard_widgets.php:1037
131
+ #: .././front/widgets.php:40 .././tools/gapi.php:376 .././tools/gapi.php:515
132
+ #: .././tools/gapi.php:554 .././tools/gapi.php:615 .././tools/gapi.php:744
133
+ #: .././tools/gapi.php:825
134
  msgid "Sessions"
135
  msgstr ""
136
 
137
+ #: .././admin/dashboard_widgets.php:296 .././admin/dashboard_widgets.php:1041
138
+ #: .././tools/gapi.php:364
139
  msgid "Users"
140
  msgstr ""
141
 
142
+ #: .././admin/dashboard_widgets.php:298
143
  msgid "Organic"
144
  msgstr "Organiczne"
145
 
146
+ #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:1045
147
+ #: .././tools/gapi.php:367
148
  msgid "Page Views"
149
  msgstr "Wyświetleń strony"
150
 
151
+ #: .././admin/dashboard_widgets.php:302 .././admin/dashboard_widgets.php:1049
152
+ #: .././tools/gapi.php:370
153
  msgid "Bounce Rate"
154
  msgstr "Współczynnik odrzuceń"
155
 
156
+ #: .././admin/dashboard_widgets.php:304
157
  msgid "Location"
158
  msgstr ""
159
 
160
+ #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:477
161
  msgid "Pages"
162
  msgstr ""
163
 
164
+ #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:515
165
  msgid "Referrers"
166
  msgstr ""
167
 
168
+ #: .././admin/dashboard_widgets.php:310 .././tools/gapi.php:554
169
+ #: .././tools/gapi.php:825
170
  msgid "Searches"
171
  msgstr ""
172
 
173
+ #: .././admin/dashboard_widgets.php:312
174
  msgid "Traffic Details"
175
  msgstr ""
176
 
177
+ #: .././admin/dashboard_widgets.php:404 .././admin/dashboard_widgets.php:645
178
  msgid "REFERRAL"
179
  msgstr "REFERUJĄCY"
180
 
181
+ #: .././admin/dashboard_widgets.php:408 .././admin/dashboard_widgets.php:646
182
  msgid "ORGANIC"
183
  msgstr "ORGANICZNE"
184
 
185
+ #: .././admin/dashboard_widgets.php:412 .././admin/dashboard_widgets.php:532
186
+ #: .././admin/dashboard_widgets.php:647
187
  msgid "SOCIAL"
188
  msgstr "SPOŁECZNE"
189
 
190
+ #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:535
191
+ #: .././admin/dashboard_widgets.php:648
192
  msgid "CAMPAIGN"
193
  msgstr ""
194
 
195
+ #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:538
196
+ #: .././admin/dashboard_widgets.php:651
197
  msgid "DIRECT"
198
  msgstr "BEZPOŚREDNIE"
199
 
200
+ #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:652
201
  msgid "NEW"
202
  msgstr "NOWE"
203
 
204
+ #: .././admin/dashboard_widgets.php:526
205
  msgid "REFERRALS"
206
  msgstr "REFERUJĄCY"
207
 
208
+ #: .././admin/dashboard_widgets.php:529
209
  msgid "KEYWORDS"
210
  msgstr "SŁOWA KLUCZOWE"
211
 
212
+ #: .././admin/dashboard_widgets.php:683 .././admin/dashboard_widgets.php:780
213
+ #: .././admin/dashboard_widgets.php:972 .././admin/dashboard_widgets.php:1083
214
+ #: .././front/frontend.php:88
215
+ msgid "A JavaScript Error is blocking plugin resources!"
216
+ msgstr ""
217
+
218
+ #: .././admin/dashboard_widgets.php:696 .././admin/dashboard_widgets.php:715
219
+ #: .././admin/dashboard_widgets.php:793 .././admin/dashboard_widgets.php:824
220
+ #: .././admin/dashboard_widgets.php:843 .././admin/dashboard_widgets.php:863
221
+ #: .././admin/dashboard_widgets.php:986 .././admin/dashboard_widgets.php:1096
222
+ #: .././admin/dashboard_widgets.php:1115 .././front/frontend.php:100
223
+ #: .././front/frontend.php:119
224
+ msgid "Invalid response, more details in JavaScript Console (F12)."
225
+ msgstr ""
226
+
227
+ #: .././admin/dashboard_widgets.php:701 .././admin/dashboard_widgets.php:720
228
+ #: .././admin/dashboard_widgets.php:798 .././admin/dashboard_widgets.php:810
229
+ #: .././admin/dashboard_widgets.php:829 .././admin/dashboard_widgets.php:848
230
+ #: .././admin/dashboard_widgets.php:868 .././admin/dashboard_widgets.php:991
231
+ #: .././admin/dashboard_widgets.php:994 .././admin/dashboard_widgets.php:1101
232
+ #: .././admin/dashboard_widgets.php:1120 .././front/frontend.php:105
233
+ #: .././front/frontend.php:124 .././front/widgets.php:110
234
  msgid "This report is unavailable"
235
  msgstr ""
236
 
237
+ #: .././admin/dashboard_widgets.php:880
238
  msgid "Traffic Mediums"
239
  msgstr ""
240
 
241
+ #: .././admin/dashboard_widgets.php:896
242
  msgid "Visitor Type"
243
  msgstr ""
244
 
245
+ #: .././admin/dashboard_widgets.php:912
246
  msgid "Social Networks"
247
  msgstr ""
248
 
249
+ #: .././admin/dashboard_widgets.php:928
250
  msgid "Search Engines"
251
  msgstr ""
252
 
253
+ #: .././admin/dashboard_widgets.php:1053
254
  msgid "Organic Search"
255
  msgstr ""
256
 
257
+ #: .././admin/dashboard_widgets.php:1057
258
  msgid "Pages/Session"
259
  msgstr ""
260
 
261
+ #: .././admin/ga_dash_settings.php:83 .././admin/ga_dash_settings.php:194
262
+ #: .././admin/ga_dash_settings.php:327 .././admin/ga_dash_settings.php:855
263
+ #: .././admin/ga_dash_settings.php:1157
264
  msgid "Settings saved."
265
  msgstr ""
266
 
267
+ #: .././admin/ga_dash_settings.php:85 .././admin/ga_dash_settings.php:196
268
+ #: .././admin/ga_dash_settings.php:329 .././admin/ga_dash_settings.php:841
269
+ #: .././admin/ga_dash_settings.php:851 .././admin/ga_dash_settings.php:857
270
+ #: .././admin/ga_dash_settings.php:869 .././admin/ga_dash_settings.php:1118
271
+ #: .././admin/ga_dash_settings.php:1143 .././admin/ga_dash_settings.php:1153
272
+ #: .././admin/ga_dash_settings.php:1159 .././admin/ga_dash_settings.php:1171
273
  msgid "Cheating Huh?"
274
  msgstr "Oszukujemy, co?"
275
 
276
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
277
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
278
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
279
+ msgid "Something went wrong, check"
280
+ msgstr ""
281
 
282
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
283
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
284
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
285
+ msgid "or"
286
+ msgstr ""
287
+
288
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
289
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
290
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
291
  msgid "auhorize the plugin"
292
  msgstr "autoryzować wtyczkę"
293
 
294
+ #: .././admin/ga_dash_settings.php:95
 
 
 
 
 
 
 
 
 
 
295
  msgid "Google Analytics Frontend Settings"
296
  msgstr "Ustawienia Frontendu Google Analytics"
297
 
298
+ #: .././admin/ga_dash_settings.php:108 .././admin/ga_dash_settings.php:219
299
  msgid "Show stats to:"
300
  msgstr ""
301
 
302
+ #: .././admin/ga_dash_settings.php:152
303
  msgid " show page sessions and users in frontend (after each article)"
304
  msgstr ""
305
 
306
+ #: .././admin/ga_dash_settings.php:168
307
  msgid " show page searches (after each article)"
308
  msgstr "pokaż wyszukiwania strony (po każdym artykule)"
309
 
310
+ #: .././admin/ga_dash_settings.php:177 .././admin/ga_dash_settings.php:305
311
+ #: .././admin/ga_dash_settings.php:666 .././admin/ga_dash_settings.php:1025
312
+ #: .././admin/ga_dash_settings.php:1351
313
  msgid "Save Changes"
314
  msgstr ""
315
 
316
+ #: .././admin/ga_dash_settings.php:206
317
  msgid "Google Analytics Dashboard Settings"
318
  msgstr "Ustawienia Pulpitu Google Analytics"
319
 
320
+ #: .././admin/ga_dash_settings.php:264
321
  msgid "disable Switch Profile/View functionality"
322
  msgstr "wyłącz funkcjonalność Przełączanie Profilu/Widoku"
323
 
324
+ #: .././admin/ga_dash_settings.php:268
325
  msgid "Real-Time Settings"
326
  msgstr "Ustawienia Czasu Rzeczywistego"
327
 
328
+ #: .././admin/ga_dash_settings.php:271
329
  msgid "Maximum number of pages to display on real-time tab:"
330
  msgstr "Maksymalna liczba stron wyświetlanych na karcie Czas Rzeczywisty:"
331
 
332
+ #: .././admin/ga_dash_settings.php:276 .././admin/ga_dash_settings.php:292
333
+ msgid "find out more"
334
+ msgstr ""
335
 
336
+ #: .././admin/ga_dash_settings.php:278 .././admin/ga_dash_settings.php:295
337
  msgid "about this feature"
338
  msgstr "o tej opcji"
339
 
340
+ #: .././admin/ga_dash_settings.php:283
341
+ msgid "Location Settings"
342
+ msgstr ""
343
+
344
+ #: .././admin/ga_dash_settings.php:287
345
+ msgid "Target Geo Map to country:"
346
+ msgstr ""
347
 
348
+ #: .././admin/ga_dash_settings.php:336
349
+ msgid "The tracking component is disabled. You should set"
350
+ msgstr ""
351
 
352
+ #: .././admin/ga_dash_settings.php:336
353
+ msgid "Tracking Options"
354
  msgstr ""
355
 
356
+ #: .././admin/ga_dash_settings.php:336
357
+ msgid "to"
358
+ msgstr ""
359
 
360
+ #: .././admin/ga_dash_settings.php:336 .././admin/ga_dash_settings.php:372
361
+ msgid "Enabled"
362
+ msgstr "Włączone"
363
 
364
+ #: .././admin/ga_dash_settings.php:342
365
+ msgid "Google Analytics Tracking Code"
366
+ msgstr "Kod Śledzenia Google Analytics"
367
 
368
+ #: .././admin/ga_dash_settings.php:351
369
+ msgid "Basic Settings"
370
+ msgstr ""
371
 
372
+ #: .././admin/ga_dash_settings.php:352 .././admin/ga_dash_settings.php:431
373
+ msgid "Events Tracking"
374
+ msgstr "Śledzenie Zdarzeń"
375
 
376
+ #: .././admin/ga_dash_settings.php:353 .././admin/ga_dash_settings.php:495
377
+ msgid "Custom Definitions"
378
+ msgstr ""
379
 
380
+ #: .././admin/ga_dash_settings.php:354 .././admin/ga_dash_settings.php:623
381
+ #: .././admin/ga_dash_settings.php:1328
382
+ msgid "Exclude Tracking"
383
+ msgstr "Wyklucz Śledzenie"
384
 
385
+ #: .././admin/ga_dash_settings.php:355
386
+ msgid "Advanced Settings"
387
+ msgstr ""
388
 
389
+ #: .././admin/ga_dash_settings.php:363
390
  msgid "Tracking Settings"
391
  msgstr "Ustawienia Śledzenia"
392
 
393
+ #: .././admin/ga_dash_settings.php:366
394
  msgid "Tracking Options:"
395
  msgstr ""
396
 
397
+ #: .././admin/ga_dash_settings.php:370
398
  msgid "Disabled"
399
  msgstr "Wyłączone"
400
 
401
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
 
 
 
 
402
  msgid "Tracking ID:"
403
  msgstr "Tracking ID:"
404
 
405
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
406
  msgid "Default URL:"
407
  msgstr "Domyślny URL:"
408
 
409
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
410
  msgid "Time Zone:"
411
  msgstr "Strefa Czasowa:"
412
 
413
+ #: .././admin/ga_dash_settings.php:385
414
  #, fuzzy
415
  msgid "Basic Tracking"
416
  msgstr "Śledzenie Zdarzeń"
417
 
418
+ #: .././admin/ga_dash_settings.php:388
419
  msgid "Tracking Type:"
420
  msgstr ""
421
 
422
+ #: .././admin/ga_dash_settings.php:392
423
  msgid "Classic Analytics"
424
  msgstr "Klasyczne Analytics"
425
 
426
+ #: .././admin/ga_dash_settings.php:394
427
  msgid "Universal Analytics"
428
  msgstr "Uniwerslane Analytics"
429
 
430
+ #: .././admin/ga_dash_settings.php:408
431
  msgid " anonymize IPs while tracking"
432
  msgstr "ukryj adresy IP podczas śledzenia"
433
 
434
+ #: .././admin/ga_dash_settings.php:423
435
  msgid " enable remarketing, demographics and interests reports"
436
  msgstr "włącz raporty zainteresować, remarketingowe i demograficzne"
437
 
438
+ #: .././admin/ga_dash_settings.php:445
 
 
 
 
439
  msgid " track downloads, mailto and outbound links"
440
  msgstr "śledź pobrania, wysyłanie maili i linki wychodzące"
441
 
442
+ #: .././admin/ga_dash_settings.php:449
443
  #, fuzzy
444
  msgid "Downloads Regex:"
445
  msgstr "Filtry Pobierania:"
446
 
447
+ #: .././admin/ga_dash_settings.php:466
448
  msgid " track affiliate links matching this regex"
449
  msgstr ""
450
 
451
+ #: .././admin/ga_dash_settings.php:470
452
  msgid "Affiliates Regex:"
453
  msgstr ""
454
 
455
+ #: .././admin/ga_dash_settings.php:487
456
  msgid " track fragment identifiers, hashmarks (#) in URI links"
457
  msgstr ""
458
 
459
+ #: .././admin/ga_dash_settings.php:498
 
 
 
 
460
  msgid "Authors:"
461
  msgstr ""
462
 
463
+ #: .././admin/ga_dash_settings.php:508
464
  msgid "Publication Year:"
465
  msgstr ""
466
 
467
+ #: .././admin/ga_dash_settings.php:518
468
  msgid "Categories:"
469
  msgstr ""
470
 
471
+ #: .././admin/ga_dash_settings.php:528
472
  msgid "User Type:"
473
  msgstr ""
474
 
475
+ #: .././admin/ga_dash_settings.php:542
476
  #, fuzzy
477
  msgid "Advanced Tracking"
478
  msgstr "Śledzenie Zdarzeń"
479
 
480
+ #: .././admin/ga_dash_settings.php:545
481
  msgid "Page Speed SR:"
482
  msgstr "Page Speed SR:"
483
 
484
+ #: .././admin/ga_dash_settings.php:563
485
  #, fuzzy
486
  msgid " exclude events from bounce-rate calculation"
487
  msgstr "wyklucz zdarzenie kliknięcia z kalkulacji stawki odrzuceń"
488
 
489
+ #: .././admin/ga_dash_settings.php:578
490
  msgid " enable enhanced link attribution"
491
  msgstr "włącz rozszerzone przypisywanie linków"
492
 
493
+ #: .././admin/ga_dash_settings.php:592
494
  msgid " enable AdSense account linking"
495
  msgstr " włącz linkowanie konta AdSense"
496
 
497
+ #: .././admin/ga_dash_settings.php:608
498
  msgid " enable cross domain tracking"
499
  msgstr ""
500
 
501
+ #: .././admin/ga_dash_settings.php:612
502
  msgid "Cross Domains:"
503
  msgstr ""
504
 
505
+ #: .././admin/ga_dash_settings.php:626
 
 
 
 
506
  msgid "Exclude tracking for:"
507
  msgstr ""
508
 
509
+ #: .././admin/ga_dash_settings.php:687
510
+ msgid "Google Analytics Errors & Debugging"
511
+ msgstr ""
512
+
513
+ #: .././admin/ga_dash_settings.php:697
514
+ msgid "Errors & Details"
515
+ msgstr ""
516
+
517
+ #: .././admin/ga_dash_settings.php:698
518
+ msgid "Plugin Settings"
519
+ msgstr ""
520
+
521
+ #: .././admin/ga_dash_settings.php:706
522
+ msgid "For errors and/or other issues please check"
523
+ msgstr ""
524
+
525
+ #: .././admin/ga_dash_settings.php:706
526
+ msgid "the plugin documentation page"
527
+ msgstr ""
528
+
529
+ #: .././admin/ga_dash_settings.php:706
530
+ msgid "and related tutorials"
531
+ msgstr ""
532
+
533
+ #: .././admin/ga_dash_settings.php:710
534
+ msgid "Last Error detected"
535
+ msgstr ""
536
+
537
+ #: .././admin/ga_dash_settings.php:715 .././admin/ga_dash_settings.php:728
538
+ msgid "None"
539
+ msgstr ""
540
+
541
+ #: .././admin/ga_dash_settings.php:722
542
+ msgid "Error Details"
543
+ msgstr ""
544
+
545
+ #: .././admin/ga_dash_settings.php:740
546
+ msgid "Plugin Configuration"
547
+ msgstr ""
548
+
549
+ #: .././admin/ga_dash_settings.php:788 .././admin/ga_dash_settings.php:1072
550
  msgid ""
551
  "Loading the required libraries. If this results in a blank screen or a fatal "
552
  "error, try this solution:"
553
  msgstr ""
554
 
555
+ #: .././admin/ga_dash_settings.php:800 .././admin/ga_dash_settings.php:1084
556
  msgid "Plugin authorization succeeded."
557
  msgstr "Autoryzacja wtyczki pomyślna."
558
 
559
+ #: .././admin/ga_dash_settings.php:816 .././admin/ga_dash_settings.php:1109
560
  msgid ""
561
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
562
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
563
  msgstr ""
564
 
565
+ #: .././admin/ga_dash_settings.php:839 .././admin/ga_dash_settings.php:1141
566
  msgid "Cleared Cache."
567
  msgstr "Cache wyczyszczony."
568
 
569
+ #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1150
570
  msgid "Token Reseted and Revoked."
571
  msgstr "Token wyczyszczony i wycofany."
572
 
573
+ #: .././admin/ga_dash_settings.php:862 .././admin/ga_dash_settings.php:1164
 
 
 
 
574
  msgid "All other domains/properties were removed."
575
  msgstr "Wszystkie inne domeny/właściwości zostały usunięte."
576
 
577
+ #: .././admin/ga_dash_settings.php:874 .././admin/ga_dash_settings.php:1176
 
 
 
 
 
578
  msgid "Google Analytics Settings"
579
  msgstr "Ustawienia Google Analytics"
580
 
581
+ #: .././admin/ga_dash_settings.php:887 .././admin/ga_dash_settings.php:1189
 
 
 
 
 
 
 
582
  msgid "Use the red link (see below) to generate and get your access code!"
583
  msgstr ""
584
 
585
+ #: .././admin/ga_dash_settings.php:898 .././admin/ga_dash_settings.php:1224
586
  msgid "Plugin Authorization"
587
  msgstr "Autoryzacja Wtyczki"
588
 
589
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
590
  msgid "You should watch the"
591
  msgstr "Powinienieś obejrzeć"
592
 
593
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
594
  msgid "video"
595
  msgstr "film"
596
 
597
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
598
  msgid "and read this"
599
  msgstr "i przeczytać"
600
 
601
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
602
  msgid "tutorial"
603
  msgstr "tutorial"
604
 
605
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
606
  msgid ""
607
  "before proceeding to authorization. This plugin requires a properly "
608
  "configured Google Analytics account"
610
  "przed ukończeniem autoryzacji. Ta wtyczka wymaga poprawnie skonfigurowanego "
611
  "konta Google Analytics"
612
 
613
+ #: .././admin/ga_dash_settings.php:914 .././admin/ga_dash_settings.php:1239
614
  msgid " use your own API Project credentials"
615
  msgstr "użyj własnych danych logowania do API Projektu"
616
 
617
+ #: .././admin/ga_dash_settings.php:921 .././admin/ga_dash_settings.php:1246
618
  msgid "API Key:"
619
  msgstr "Klucz API:"
620
 
621
+ #: .././admin/ga_dash_settings.php:928 .././admin/ga_dash_settings.php:1254
622
  msgid "Client ID:"
623
  msgstr "ID Klienta:"
624
 
625
+ #: .././admin/ga_dash_settings.php:936 .././admin/ga_dash_settings.php:1263
626
  msgid "Client Secret:"
627
  msgstr "Hasło Klienta:"
628
 
629
+ #: .././admin/ga_dash_settings.php:954 .././admin/ga_dash_settings.php:1282
630
  msgid "Clear Authorization"
631
  msgstr "Czyść Autoryzację"
632
 
633
+ #: .././admin/ga_dash_settings.php:958 .././admin/ga_dash_settings.php:1039
634
+ #: .././admin/ga_dash_settings.php:1285 .././admin/ga_dash_settings.php:1363
635
  msgid "Clear Cache"
636
  msgstr "Czyść Cache"
637
 
638
+ #: .././admin/ga_dash_settings.php:967
639
  msgid "Select Domain:"
640
  msgstr ""
641
 
642
+ #: .././admin/ga_dash_settings.php:980 .././admin/ga_dash_settings.php:1319
643
  msgid "Property not found"
644
  msgstr ""
645
 
646
+ #: .././admin/ga_dash_settings.php:985
647
  msgid "and/or hide all other domains"
648
  msgstr "i/lub ukryj wszystkie inne domeny"
649
 
650
+ #: .././admin/ga_dash_settings.php:988
651
  msgid "Hide Now"
652
  msgstr "Ukryj Teraz"
653
 
654
+ #: .././admin/ga_dash_settings.php:1007
655
  msgid "Theme Color:"
656
  msgstr ""
657
 
658
+ #: .././admin/ga_dash_settings.php:1017
659
  msgid "A new frontend widget is available! To enable it, go to"
660
  msgstr "Nowy widget frontendu jest dostępny! Aby go włączyć, przejðź do"
661
 
662
+ #: .././admin/ga_dash_settings.php:1017
663
  msgid "Appearance -> Widgets"
664
  msgstr "Wygląd -> Widgety"
665
 
666
+ #: .././admin/ga_dash_settings.php:1017
667
  msgid "and look for Google Analytics Dashboard."
668
  msgstr "i poszukać Pulpit Google Analytics."
669
 
670
+ #: .././admin/ga_dash_settings.php:1115
 
 
 
 
 
671
  msgid "Properties refreshed."
672
  msgstr "Właściwości Odświeżone"
673
 
674
+ #: .././admin/ga_dash_settings.php:1201
675
  msgid "Network Setup"
676
  msgstr "Ustawienia Sieci"
677
 
678
+ #: .././admin/ga_dash_settings.php:1216
679
  msgid " use a single Google Analytics account for the entire network"
680
  msgstr "Użyj jednego konta Google Analytics dla całej sieci"
681
 
682
+ #: .././admin/ga_dash_settings.php:1288
683
  msgid "Refresh Properties"
684
  msgstr "Odśwież Właściwości"
685
 
686
+ #: .././admin/ga_dash_settings.php:1294
687
  msgid "Properties/Views Settings"
688
  msgstr "Ustawienia Właściwości /Widoków"
689
 
690
+ #: .././admin/ga_dash_settings.php:1342
691
  msgid " exclude Super Admin tracking for the entire network"
692
  msgstr ""
693
 
694
+ #: .././admin/ga_dash_settings.php:1394
695
  msgid "Setup Tutorial & Demo"
696
  msgstr "Ustaw Tutorial & Demo"
697
 
698
+ #: .././admin/ga_dash_settings.php:1406
699
  msgid "Support & Reviews"
700
  msgstr "Wsparcie techniczne & Recenzje"
701
 
702
+ #: .././admin/ga_dash_settings.php:1414
703
  msgid "Plugin documentation and support on"
704
  msgstr ""
705
 
706
+ #: .././admin/ga_dash_settings.php:1421
707
  msgid "Your feedback and review are both important,"
708
  msgstr "Twój komentarz i ocena są ważne,"
709
 
710
+ #: .././admin/ga_dash_settings.php:1421
711
  msgid "rate this plugin"
712
  msgstr "oceń tą wtyczkę"
713
 
714
+ #: .././admin/ga_dash_settings.php:1426
715
  msgid "Further Reading"
716
  msgstr "Inne Dokumenty"
717
 
718
+ #: .././admin/ga_dash_settings.php:1434
719
  msgid "Improve search rankings"
720
  msgstr ""
721
 
722
+ #: .././admin/ga_dash_settings.php:1434
723
  msgid "by moving your website to HTTPS/SSL."
724
  msgstr ""
725
 
726
+ #: .././admin/ga_dash_settings.php:1441
727
  msgid "Other"
728
  msgstr "Inne"
729
 
730
+ #: .././admin/ga_dash_settings.php:1441
731
  msgid "WordPress Plugins"
732
  msgstr "Wtyczki WordPressa"
733
 
734
+ #: .././admin/ga_dash_settings.php:1441
735
  msgid "written by the same author"
736
  msgstr "napisane przez tego samego autora"
737
 
738
+ #: .././admin/ga_dash_settings.php:1446
739
  msgid "Other Services"
740
  msgstr ""
741
 
742
+ #: .././admin/ga_dash_settings.php:1453
743
  msgid "Speed up your website and plug into a whole"
744
  msgstr ""
745
 
746
+ #: .././admin/ga_dash_settings.php:1453
747
  msgid "new level of site speed"
748
  msgstr ""
749
 
750
+ #: .././admin/ga_dash_settings.php:1460
751
  msgid "Web Analytics"
752
  msgstr "Web Analytics"
753
 
754
+ #: .././admin/ga_dash_settings.php:1460
755
  msgid "service with users tracking at IP level."
756
  msgstr ""
757
 
758
+ #: .././front/frontend.php:134
759
  msgid "Views vs UniqueViews"
760
  msgstr "Odsłon vs Odsłon Unikalnych"
761
 
762
+ #: .././front/frontend.php:184
763
  msgid "Google Analytics Reports"
764
  msgstr ""
765
 
766
+ #: .././front/widgets.php:15
767
  msgid "Will display your google analytics stats in a widget"
768
  msgstr "Wyświetli twoje statystyki Google Analytics na widgecie"
769
 
770
+ #: .././front/widgets.php:40 .././tools/gapi.php:744
771
  msgid "trend"
772
  msgstr ""
773
 
774
+ #: .././front/widgets.php:133
775
  msgid "Period:"
776
  msgstr "Okres:"
777
 
778
+ #: .././front/widgets.php:133
779
  msgid "Sessions:"
780
  msgstr ""
781
 
782
+ #: .././front/widgets.php:137
783
  msgid "generated by"
784
  msgstr "wygenerowane przez"
785
 
786
+ #: .././front/widgets.php:147
787
  msgid "Google Analytics Stats"
788
  msgstr "Statystyki Google Analytics"
789
 
790
+ #: .././front/widgets.php:154
791
  msgid "Title:"
792
  msgstr "Tytuł:"
793
 
794
+ #: .././front/widgets.php:161
795
  msgid "Display:"
796
  msgstr "Wyświetlenie:"
797
 
798
+ #: .././front/widgets.php:165
799
  msgid "Chart & Totals"
800
  msgstr "Wykres & Podsumowania"
801
 
802
+ #: .././front/widgets.php:166
803
  msgid "Chart"
804
  msgstr "Wykres"
805
 
806
+ #: .././front/widgets.php:167
807
  msgid "Totals"
808
  msgstr "Podsumowania"
809
 
810
+ #: .././front/widgets.php:171
811
+ msgid "Anonymize stats:"
812
+ msgstr ""
813
 
814
+ #: .././front/widgets.php:178
815
  msgid "Stats for:"
816
  msgstr "Statystyki dla:"
817
 
818
+ #: .././front/widgets.php:188
819
  msgid "Give credits:"
820
  msgstr "Podziękuj:"
821
 
822
+ #: .././tools/gapi.php:129
823
  msgid "Use this link to get your access code:"
824
  msgstr "Użyj tego linku, aby uzyskać kod dostępu:"
825
 
826
+ #: .././tools/gapi.php:129
827
  msgid "Get Access Code"
828
  msgstr "Zdobądź Kod Dostępu"
829
 
830
+ #: .././tools/gapi.php:134 .././tools/gapi.php:138
831
  msgid "Use the red link to get your access code!"
832
  msgstr ""
833
 
834
+ #: .././tools/gapi.php:134
835
  msgid "Access Code:"
836
  msgstr "Kod Dostępu:"
837
 
838
+ #: .././tools/gapi.php:146
839
  msgid "Save Access Code"
840
  msgstr "Zapisz Kod Dostępu"
841
 
842
+ #: .././tools/gapi.php:373
843
  msgid "Organic Searches"
844
  msgstr "Wyszukiwania organiczne"
845
 
846
+ #: .././tools/gapi.php:381
847
  msgid "Hour"
848
  msgstr "Godzina"
849
 
850
+ #: .././tools/gapi.php:384 .././tools/gapi.php:744 .././tools/gapi.php:783
851
  msgid "Date"
852
  msgstr "Data"
853
 
854
+ #: .././tools/gapi.php:477 .././tools/gapi.php:783
855
  msgid "Views"
856
  msgstr "Odsłon"
857
 
858
+ #: .././tools/gapi.php:576
859
  msgid "Countries"
860
  msgstr ""
861
 
862
+ #: .././tools/gapi.php:590
863
  msgid "Cities from"
864
  msgstr ""
865
 
866
+ #: .././tools/gapi.php:644
867
  msgid "Channels"
868
  msgstr ""
869
 
870
+ #: .././tools/gapi.php:698
871
  msgid "Type"
872
  msgstr "Typ"
873
 
874
+ #: .././tools/gapi.php:783
875
  msgid "UniqueViews"
876
  msgstr "Odsłon Unikalnych"
877
 
878
+ #~ msgid "Something went wrong, you need to"
879
+ #~ msgstr "Coś poszło nie tak, musisz"
880
+
881
+ #~ msgid "or properly configure your"
882
+ #~ msgstr "lub poprawnie skonfigurować twoje"
883
+
884
+ #~ msgid "Google Analytics account"
885
+ #~ msgstr "konto Google Analytics"
886
+
887
+ #~ msgid "(find out more"
888
+ #~ msgstr "(dowiedz się więcej"
889
+
890
+ #~ msgid ")"
891
+ #~ msgstr ")"
892
+
893
+ #~ msgid "Additional Stats & Charts"
894
+ #~ msgstr "Dodatkowe Statystyki & Wykresy"
895
+
896
+ #~ msgid "Target Geo Map to region:"
897
+ #~ msgstr "Ustaw Geo Mapę na region:"
898
+
899
+ #~ msgid "and render top"
900
+ #~ msgstr "i wyrenderuj najlepsze"
901
+
902
+ #~ msgid "cities (find out more"
903
+ #~ msgstr "miasta (dowiedz się więcej"
904
+
905
+ #~ msgid " show traffic overview"
906
+ #~ msgstr "pokaż przegląd ruchu"
907
+
908
+ #~ msgid " show top pages"
909
+ #~ msgstr "pokaż najlepsze strony"
910
+
911
+ #~ msgid " show top referrers"
912
+ #~ msgstr "pokaż najlepszych referujących"
913
+
914
+ #~ msgid " show top searches"
915
+ #~ msgstr "pokaż najlepsze wyszukiwania"
916
+
917
+ #~ msgid "Dumping log data."
918
+ #~ msgstr "Zrzucanie danych lgowania."
919
+
920
+ #~ msgid ""
921
+ #~ "Something went wrong. Please check the Debugging Data section for "
922
+ #~ "possible errors"
923
+ #~ msgstr ""
924
+ #~ "Coś poszło nie tak. Sprawdź sekcję Dane debugowania, aby zobaczyć błędy"
925
+
926
+ #~ msgid "Debugging Data"
927
+ #~ msgstr "Dane Debugowania"
928
+
929
+ #~ msgid "Anonimize chart&#39;s stats:"
930
+ #~ msgstr "Statystyki wykresu"
931
+
932
+ #~ msgid "Top Searches"
933
+ #~ msgstr "Najlepsze wyszukiwania"
934
 
935
  #~ msgid "Error Log"
936
  #~ msgstr "Dziennik błędów"
languages/ga-dash-pt_BR.mo CHANGED
Binary file
languages/ga-dash-pt_BR.po CHANGED
@@ -1,83 +1,90 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
- "POT-Creation-Date: 2015-01-07 20:26+0200\n"
5
- "PO-Revision-Date: 2015-01-07 20:26+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: pt_BR\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.1\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
- #: .././admin/dashboard_widgets.php:50 .././admin/dashboard_widgets.php:81
20
  msgid "Google Analytics"
21
  msgstr "Google Analytics"
22
 
23
- #: .././admin/dashboard_widgets.php:54 .././admin/dashboard_widgets.php:85
24
- #: .././admin/ga_dash_settings.php:100 .././admin/ga_dash_settings.php:222
25
- #: .././admin/ga_dash_settings.php:954
26
  msgid "General Settings"
27
  msgstr "Configurações Gerais"
28
 
29
- #: .././admin/dashboard_widgets.php:58
30
  msgid "Backend Settings"
31
  msgstr "Configurações Internas"
32
 
33
- #: .././admin/dashboard_widgets.php:62
34
  msgid "Frontend Settings"
35
  msgstr "Configurações Externas"
36
 
37
- #: .././admin/dashboard_widgets.php:66
38
  msgid "Tracking Code"
39
  msgstr "Tracking Code"
40
 
41
- #: .././admin/dashboard_widgets.php:132
 
 
 
 
 
 
 
42
  msgid "Settings"
43
  msgstr "Configurações"
44
 
45
- #: .././admin/dashboard_widgets.php:148 .././front/widgets.php:15
46
  msgid "Google Analytics Dashboard"
47
  msgstr "Painel do Google Analytics"
48
 
49
- #: .././admin/dashboard_widgets.php:166
50
  msgid "This plugin needs an authorization:"
51
  msgstr "Este plugin precisa de autorização"
52
 
53
- #: .././admin/dashboard_widgets.php:166 .././admin/ga_dash_settings.php:1063
54
- #: .././admin/ga_dash_settings.php:1465
55
  msgid "Authorize Plugin"
56
  msgstr "Autorize o Plugin"
57
 
58
- #: .././admin/dashboard_widgets.php:207 .././admin/ga_dash_settings.php:459
59
- #: .././admin/ga_dash_settings.php:966 .././admin/ga_dash_settings.php:991
60
- #: .././admin/ga_dash_settings.php:1383
61
  msgid "View Name:"
62
  msgstr "Nome:"
63
 
64
- #: .././admin/dashboard_widgets.php:212
65
  msgid "Something went wrong while retrieving profiles list."
66
  msgstr "Algo deu errado durante a recuperação da lista de perfil."
67
 
68
- #: .././admin/dashboard_widgets.php:212
69
  msgid "More details"
70
  msgstr "Mais detalhes"
71
 
72
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
73
  msgid "An admin should asign a default Google Analytics Profile."
74
  msgstr "Um administrador deve atribuir um Google Analytics perfil padrão."
75
 
76
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
77
  msgid "Select Domain"
78
  msgstr "Selecionar Domínio"
79
 
80
- #: .././admin/dashboard_widgets.php:245
81
  msgid ""
82
  "Something went wrong while retrieving property data. You need to create and "
83
  "properly configure a Google Analytics account:"
@@ -85,491 +92,517 @@ msgstr ""
85
  "Algo deu errado ao recuperar os dados da propriedade. Você precisa criar e "
86
  "configurar corretamente uma conta do Google Analytics:"
87
 
88
- #: .././admin/dashboard_widgets.php:245
89
  msgid "Find out more!"
90
  msgstr "Saber mais!"
91
 
92
- #: .././admin/dashboard_widgets.php:276
93
  msgid "Real-Time"
94
  msgstr "Tempo Real"
95
 
96
- #: .././admin/dashboard_widgets.php:277
97
  msgid "Today"
98
  msgstr "Hoje"
99
 
100
- #: .././admin/dashboard_widgets.php:279
101
  msgid "Yesterday"
102
  msgstr "Ontem"
103
 
104
- #: .././admin/dashboard_widgets.php:281 .././front/widgets.php:83
105
- #: .././front/widgets.php:199
106
  msgid "Last 7 Days"
107
  msgstr "Últimos 7 dias"
108
 
109
- #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:86
110
- #: .././front/widgets.php:200
111
  msgid "Last 14 Days"
112
  msgstr "Últimos 14 dias"
113
 
114
- #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:89
115
- #: .././front/widgets.php:201
116
  msgid "Last 30 Days"
117
  msgstr "Últimos 30 dias"
118
 
119
- #: .././admin/dashboard_widgets.php:287
120
  msgid "Last 90 Days"
121
  msgstr "Últimos 90 dias"
122
 
123
- #: .././admin/dashboard_widgets.php:293 .././admin/dashboard_widgets.php:952
124
- #: .././front/widgets.php:44 .././tools/gapi.php:384 .././tools/gapi.php:543
125
- #: .././tools/gapi.php:587 .././tools/gapi.php:658 .././tools/gapi.php:808
126
- #: .././tools/gapi.php:899
127
  msgid "Sessions"
128
  msgstr ""
129
 
130
- #: .././admin/dashboard_widgets.php:294 .././admin/dashboard_widgets.php:956
131
- #: .././tools/gapi.php:368
132
  msgid "Users"
133
  msgstr ""
134
 
135
- #: .././admin/dashboard_widgets.php:296
136
  msgid "Organic"
137
  msgstr "Buscas"
138
 
139
- #: .././admin/dashboard_widgets.php:298 .././admin/dashboard_widgets.php:960
140
- #: .././tools/gapi.php:372
141
  msgid "Page Views"
142
  msgstr "Visualizações de Páginas"
143
 
144
- #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:964
145
- #: .././tools/gapi.php:376
146
  msgid "Bounce Rate"
147
  msgstr "Taxa de Rejeição"
148
 
149
- #: .././admin/dashboard_widgets.php:302
150
  msgid "Location"
151
  msgstr ""
152
 
153
- #: .././admin/dashboard_widgets.php:304 .././tools/gapi.php:500
154
  msgid "Pages"
155
  msgstr ""
156
 
157
- #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:543
158
  msgid "Referrers"
159
  msgstr ""
160
 
161
- #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:587
 
162
  msgid "Searches"
163
  msgstr ""
164
 
165
- #: .././admin/dashboard_widgets.php:310
166
  msgid "Traffic Details"
167
  msgstr ""
168
 
169
- #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:657
170
  msgid "REFERRAL"
171
  msgstr "ENCAMINHAMENTO"
172
 
173
- #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:658
174
  msgid "ORGANIC"
175
  msgstr "ÔRGANICO"
176
 
177
- #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:544
178
- #: .././admin/dashboard_widgets.php:659
179
  msgid "SOCIAL"
180
  msgstr "SOCIAL"
181
 
182
- #: .././admin/dashboard_widgets.php:428 .././admin/dashboard_widgets.php:547
183
- #: .././admin/dashboard_widgets.php:660
184
  msgid "CAMPAIGN"
185
  msgstr ""
186
 
187
- #: .././admin/dashboard_widgets.php:432 .././admin/dashboard_widgets.php:550
188
- #: .././admin/dashboard_widgets.php:663
189
  msgid "DIRECT"
190
  msgstr "DIRETO"
191
 
192
- #: .././admin/dashboard_widgets.php:436 .././admin/dashboard_widgets.php:664
193
  msgid "NEW"
194
  msgstr "NOVO"
195
 
196
- #: .././admin/dashboard_widgets.php:538
197
  msgid "REFERRALS"
198
  msgstr "REFERÊNCIAS"
199
 
200
- #: .././admin/dashboard_widgets.php:541
201
  msgid "KEYWORDS"
202
  msgstr "PALAVRAS-CHAVE"
203
 
204
- #: .././admin/dashboard_widgets.php:690 .././admin/dashboard_widgets.php:702
205
- #: .././admin/dashboard_widgets.php:757 .././admin/dashboard_widgets.php:769
206
- #: .././admin/dashboard_widgets.php:781 .././admin/dashboard_widgets.php:793
207
- #: .././admin/dashboard_widgets.php:806 .././admin/dashboard_widgets.php:905
208
- #: .././admin/dashboard_widgets.php:908 .././admin/dashboard_widgets.php:992
209
- #: .././admin/dashboard_widgets.php:1004 .././front/frontend.php:88
210
- #: .././front/frontend.php:100 .././front/widgets.php:122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  msgid "This report is unavailable"
212
  msgstr ""
213
 
214
- #: .././admin/dashboard_widgets.php:818
215
  msgid "Traffic Mediums"
216
  msgstr ""
217
 
218
- #: .././admin/dashboard_widgets.php:834
219
  msgid "Visitor Type"
220
  msgstr ""
221
 
222
- #: .././admin/dashboard_widgets.php:850
223
  msgid "Social Networks"
224
  msgstr ""
225
 
226
- #: .././admin/dashboard_widgets.php:866
227
  msgid "Search Engines"
228
  msgstr ""
229
 
230
- #: .././admin/dashboard_widgets.php:968
231
  msgid "Organic Search"
232
  msgstr ""
233
 
234
- #: .././admin/dashboard_widgets.php:972
235
  msgid "Pages/Session"
236
  msgstr ""
237
 
238
- #: .././admin/ga_dash_settings.php:78 .././admin/ga_dash_settings.php:200
239
- #: .././admin/ga_dash_settings.php:418 .././admin/ga_dash_settings.php:841
240
- #: .././admin/ga_dash_settings.php:1228
241
  msgid "Settings saved."
242
  msgstr ""
243
 
244
- #: .././admin/ga_dash_settings.php:80 .././admin/ga_dash_settings.php:202
245
- #: .././admin/ga_dash_settings.php:420 .././admin/ga_dash_settings.php:824
246
- #: .././admin/ga_dash_settings.php:834 .././admin/ga_dash_settings.php:843
247
- #: .././admin/ga_dash_settings.php:855 .././admin/ga_dash_settings.php:1183
248
- #: .././admin/ga_dash_settings.php:1211 .././admin/ga_dash_settings.php:1221
249
- #: .././admin/ga_dash_settings.php:1230 .././admin/ga_dash_settings.php:1242
250
  msgid "Cheating Huh?"
251
  msgstr ""
252
 
253
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
254
- #: .././admin/ga_dash_settings.php:424
255
- msgid "Something went wrong, you need to"
256
- msgstr "Algo deu errado, você precisa"
 
257
 
258
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
259
- #: .././admin/ga_dash_settings.php:424
 
 
 
 
 
 
 
260
  msgid "auhorize the plugin"
261
  msgstr "autorize o plugin"
262
 
263
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
264
- #: .././admin/ga_dash_settings.php:424
265
- msgid "or properly configure your"
266
- msgstr "ou configurar corretamente o seu"
267
-
268
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
269
- #: .././admin/ga_dash_settings.php:424
270
- msgid "Google Analytics account"
271
- msgstr "Conta do Google Analytics"
272
-
273
- #: .././admin/ga_dash_settings.php:90
274
  msgid "Google Analytics Frontend Settings"
275
  msgstr "Configurações Externas do Google Analytics"
276
 
277
- #: .././admin/ga_dash_settings.php:103 .././admin/ga_dash_settings.php:225
278
  msgid "Show stats to:"
279
  msgstr ""
280
 
281
- #: .././admin/ga_dash_settings.php:153
282
  msgid " show page sessions and users in frontend (after each article)"
283
  msgstr ""
284
 
285
- #: .././admin/ga_dash_settings.php:169
286
  msgid " show page searches (after each article)"
287
  msgstr "pesquisas mostram página (depois de cada artigo)"
288
 
289
- #: .././admin/ga_dash_settings.php:178 .././admin/ga_dash_settings.php:391
290
- #: .././admin/ga_dash_settings.php:739 .././admin/ga_dash_settings.php:1053
291
- #: .././admin/ga_dash_settings.php:1456
292
  msgid "Save Changes"
293
  msgstr ""
294
 
295
- #: .././admin/ga_dash_settings.php:212
296
  msgid "Google Analytics Dashboard Settings"
297
  msgstr "Configurações de Painel do Google Analytics"
298
 
299
- #: .././admin/ga_dash_settings.php:275
300
  msgid "disable Switch Profile/View functionality"
301
  msgstr "desativar mudar perfil/Ver funcionalidade"
302
 
303
- #: .././admin/ga_dash_settings.php:279
304
  msgid "Real-Time Settings"
305
  msgstr "Configurações de Tempo Real"
306
 
307
- #: .././admin/ga_dash_settings.php:282
308
  msgid "Maximum number of pages to display on real-time tab:"
309
  msgstr "O número máximo de páginas para mostrar na guia Tempo Real:"
310
 
311
- #: .././admin/ga_dash_settings.php:287
312
- msgid "(find out more"
313
- msgstr "(Saiba mais"
314
 
315
- #: .././admin/ga_dash_settings.php:289 .././admin/ga_dash_settings.php:324
316
  msgid "about this feature"
317
  msgstr "sobre este recurso"
318
 
319
- #: .././admin/ga_dash_settings.php:290 .././admin/ga_dash_settings.php:325
320
- msgid ")"
321
- msgstr ")"
 
 
 
 
322
 
323
- #: .././admin/ga_dash_settings.php:293
324
- msgid "Additional Stats & Charts"
325
- msgstr "Estatísticas e gráficos adicionais"
326
 
327
- #: .././admin/ga_dash_settings.php:306
328
- msgid " show Geo Map chart for sessions"
329
  msgstr ""
330
 
331
- #: .././admin/ga_dash_settings.php:311
332
- msgid "Target Geo Map to region:"
333
- msgstr "Alvo Geo Map para a região:"
334
 
335
- #: .././admin/ga_dash_settings.php:316
336
- msgid "and render top"
337
- msgstr "e tornar pricipal"
338
 
339
- #: .././admin/ga_dash_settings.php:321
340
- msgid "cities (find out more"
341
- msgstr "cidades (mais"
342
 
343
- #: .././admin/ga_dash_settings.php:339
344
- msgid " show traffic overview"
345
- msgstr "mostrar visão geral do tráfego"
346
 
347
- #: .././admin/ga_dash_settings.php:353
348
- msgid " show top pages"
349
- msgstr "mostrar principais páginas"
350
 
351
- #: .././admin/ga_dash_settings.php:367
352
- msgid " show top referrers"
353
- msgstr "mostrar principais referências"
354
 
355
- #: .././admin/ga_dash_settings.php:381
356
- msgid " show top searches"
357
- msgstr "mostrar principais pesquisas"
 
358
 
359
- #: .././admin/ga_dash_settings.php:430
360
- msgid "Google Analytics Tracking Code"
361
- msgstr "Código de rastreamento do Google Analytics"
362
 
363
- #: .././admin/ga_dash_settings.php:440
364
  msgid "Tracking Settings"
365
  msgstr "Configurações de rastreamento"
366
 
367
- #: .././admin/ga_dash_settings.php:443
368
  msgid "Tracking Options:"
369
  msgstr ""
370
 
371
- #: .././admin/ga_dash_settings.php:447
372
  msgid "Disabled"
373
  msgstr "Desabilitar"
374
 
375
- #: .././admin/ga_dash_settings.php:449
376
- msgid "Enabled"
377
- msgstr "Habilitar"
378
-
379
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
380
  msgid "Tracking ID:"
381
  msgstr "ID de rastreamento:"
382
 
383
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
384
  msgid "Default URL:"
385
  msgstr "URL Padrão:"
386
 
387
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
388
  msgid "Time Zone:"
389
  msgstr "Fuso horário:"
390
 
391
- #: .././admin/ga_dash_settings.php:467
392
  #, fuzzy
393
  msgid "Basic Tracking"
394
  msgstr "Eventos de rastreamento"
395
 
396
- #: .././admin/ga_dash_settings.php:473
397
  msgid "Tracking Type:"
398
  msgstr ""
399
 
400
- #: .././admin/ga_dash_settings.php:477
401
  msgid "Classic Analytics"
402
  msgstr "Analytics clássico"
403
 
404
- #: .././admin/ga_dash_settings.php:479
405
  msgid "Universal Analytics"
406
  msgstr "Universal Analytics"
407
 
408
- #: .././admin/ga_dash_settings.php:493
409
  msgid " anonymize IPs while tracking"
410
  msgstr "IPs anônimo ao rastreamento"
411
 
412
- #: .././admin/ga_dash_settings.php:508
413
  msgid " enable remarketing, demographics and interests reports"
414
  msgstr "permitir Informações demográficas e interesses relatórios"
415
 
416
- #: .././admin/ga_dash_settings.php:512
417
- msgid "Events Tracking"
418
- msgstr "Eventos de rastreamento"
419
-
420
- #: .././admin/ga_dash_settings.php:525
421
  msgid " track downloads, mailto and outbound links"
422
  msgstr "baixe faixas, e-mail e links de saída"
423
 
424
- #: .././admin/ga_dash_settings.php:529
425
  #, fuzzy
426
  msgid "Downloads Regex:"
427
  msgstr "Baixe Filtros:"
428
 
429
- #: .././admin/ga_dash_settings.php:546
430
  msgid " track affiliate links matching this regex"
431
  msgstr ""
432
 
433
- #: .././admin/ga_dash_settings.php:550
434
  msgid "Affiliates Regex:"
435
  msgstr ""
436
 
437
- #: .././admin/ga_dash_settings.php:567
438
  msgid " track fragment identifiers, hashmarks (#) in URI links"
439
  msgstr ""
440
 
441
- #: .././admin/ga_dash_settings.php:571
442
- msgid "Custom Definitions"
443
- msgstr ""
444
-
445
- #: .././admin/ga_dash_settings.php:574
446
  msgid "Authors:"
447
  msgstr ""
448
 
449
- #: .././admin/ga_dash_settings.php:584
450
  msgid "Publication Year:"
451
  msgstr ""
452
 
453
- #: .././admin/ga_dash_settings.php:594
454
  msgid "Categories:"
455
  msgstr ""
456
 
457
- #: .././admin/ga_dash_settings.php:604
458
  msgid "User Type:"
459
  msgstr ""
460
 
461
- #: .././admin/ga_dash_settings.php:614
462
  #, fuzzy
463
  msgid "Advanced Tracking"
464
  msgstr "Eventos de rastreamento"
465
 
466
- #: .././admin/ga_dash_settings.php:617
467
  #, fuzzy
468
  msgid "Page Speed SR:"
469
  msgstr "Páginas por Visita:"
470
 
471
- #: .././admin/ga_dash_settings.php:635
472
  msgid " exclude events from bounce-rate calculation"
473
  msgstr ""
474
 
475
- #: .././admin/ga_dash_settings.php:649
476
  msgid " enable enhanced link attribution"
477
  msgstr "permitir reforço a atribuição de link"
478
 
479
- #: .././admin/ga_dash_settings.php:663
480
  msgid " enable AdSense account linking"
481
  msgstr ""
482
 
483
- #: .././admin/ga_dash_settings.php:678
484
  msgid " enable cross domain tracking"
485
  msgstr ""
486
 
487
- #: .././admin/ga_dash_settings.php:682
488
  msgid "Cross Domains:"
489
  msgstr ""
490
 
491
- #: .././admin/ga_dash_settings.php:692 .././admin/ga_dash_settings.php:1396
492
- msgid "Exclude Tracking"
493
- msgstr "Excluir Rastreamento"
494
-
495
- #: .././admin/ga_dash_settings.php:695
496
  msgid "Exclude tracking for:"
497
  msgstr ""
498
 
499
- #: .././admin/ga_dash_settings.php:769 .././admin/ga_dash_settings.php:1138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
500
  msgid ""
501
  "Loading the required libraries. If this results in a blank screen or a fatal "
502
  "error, try this solution:"
503
  msgstr ""
504
 
505
- #: .././admin/ga_dash_settings.php:781 .././admin/ga_dash_settings.php:1150
506
  msgid "Plugin authorization succeeded."
507
  msgstr "Plugin autorizado com sucesso."
508
 
509
- #: .././admin/ga_dash_settings.php:796 .././admin/ga_dash_settings.php:1173
510
  msgid ""
511
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
512
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
513
  msgstr ""
514
 
515
- #: .././admin/ga_dash_settings.php:822 .././admin/ga_dash_settings.php:1209
516
  msgid "Cleared Cache."
517
  msgstr "Cache limpa."
518
 
519
- #: .././admin/ga_dash_settings.php:831 .././admin/ga_dash_settings.php:1218
520
  msgid "Token Reseted and Revoked."
521
  msgstr "Símbolo redefinido e revogado"
522
 
523
- #: .././admin/ga_dash_settings.php:838 .././admin/ga_dash_settings.php:1225
524
- msgid "Dumping log data."
525
- msgstr "Lixeira de dados"
526
-
527
- #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1235
528
  msgid "All other domains/properties were removed."
529
  msgstr "Todos os outros domínios / propriedades foram removidas."
530
 
531
- #: .././admin/ga_dash_settings.php:859 .././admin/ga_dash_settings.php:1246
532
- msgid ""
533
- "PHP CURL is required. Ask your hosting provider to install/enable PHP CURL!"
534
- msgstr ""
535
-
536
- #: .././admin/ga_dash_settings.php:863 .././admin/ga_dash_settings.php:1250
537
  msgid "Google Analytics Settings"
538
  msgstr "Configurações do Google Analytics"
539
 
540
- #: .././admin/ga_dash_settings.php:872 .././admin/ga_dash_settings.php:1258
541
- msgid ""
542
- "Something went wrong. Please check the Debugging Data section for possible "
543
- "errors"
544
- msgstr ""
545
- "Algo deu errado. Por favor verifique a seção de dados de depuração por "
546
- "possíveis erros"
547
-
548
- #: .././admin/ga_dash_settings.php:878 .././admin/ga_dash_settings.php:1263
549
  msgid "Use the red link (see below) to generate and get your access code!"
550
  msgstr ""
551
 
552
- #: .././admin/ga_dash_settings.php:889 .././admin/ga_dash_settings.php:1297
553
  msgid "Plugin Authorization"
554
  msgstr "Autorização de Plugin"
555
 
556
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
557
  msgid "You should watch the"
558
  msgstr "Você deve assistir ao"
559
 
560
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
561
  msgid "video"
562
  msgstr "vídeo"
563
 
564
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
565
  msgid "and read this"
566
  msgstr "e ler este"
567
 
568
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
569
  msgid "tutorial"
570
  msgstr "tutorial"
571
 
572
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
573
  msgid ""
574
  "before proceeding to authorization. This plugin requires a properly "
575
  "configured Google Analytics account"
@@ -577,280 +610,329 @@ msgstr ""
577
  "antes de prosseguir para a autorização. Este plugin requer uma conta do "
578
  "Google Analytics configurado corretamente"
579
 
580
- #: .././admin/ga_dash_settings.php:905 .././admin/ga_dash_settings.php:1312
581
  msgid " use your own API Project credentials"
582
  msgstr "usar suas próprias credenciais de projeto API"
583
 
584
- #: .././admin/ga_dash_settings.php:912 .././admin/ga_dash_settings.php:1319
585
  msgid "API Key:"
586
  msgstr "Chave API:"
587
 
588
- #: .././admin/ga_dash_settings.php:919 .././admin/ga_dash_settings.php:1326
589
  msgid "Client ID:"
590
  msgstr "ID do cliente:"
591
 
592
- #: .././admin/ga_dash_settings.php:926 .././admin/ga_dash_settings.php:1334
593
  msgid "Client Secret:"
594
  msgstr "Cliente Secreto:"
595
 
596
- #: .././admin/ga_dash_settings.php:944 .././admin/ga_dash_settings.php:1352
597
  msgid "Clear Authorization"
598
  msgstr "Limpar Autorização"
599
 
600
- #: .././admin/ga_dash_settings.php:948 .././admin/ga_dash_settings.php:1067
601
- #: .././admin/ga_dash_settings.php:1355 .././admin/ga_dash_settings.php:1469
602
  msgid "Clear Cache"
603
  msgstr "Limpar Cache"
604
 
605
- #: .././admin/ga_dash_settings.php:957
606
  msgid "Select Domain:"
607
  msgstr ""
608
 
609
- #: .././admin/ga_dash_settings.php:970 .././admin/ga_dash_settings.php:1387
610
  msgid "Property not found"
611
  msgstr ""
612
 
613
- #: .././admin/ga_dash_settings.php:975
614
  msgid "and/or hide all other domains"
615
  msgstr "e / ou esconder todos os outros domínios"
616
 
617
- #: .././admin/ga_dash_settings.php:978
618
  msgid "Hide Now"
619
  msgstr "Ocultar Agora"
620
 
621
- #: .././admin/ga_dash_settings.php:997
622
  msgid "Theme Color:"
623
  msgstr ""
624
 
625
- #: .././admin/ga_dash_settings.php:1007
626
  msgid "A new frontend widget is available! To enable it, go to"
627
  msgstr "Um novo widget frontend está disponível! Para ativá-lo, vá para o"
628
 
629
- #: .././admin/ga_dash_settings.php:1007
630
  msgid "Appearance -> Widgets"
631
  msgstr "Aparência -> Widgets"
632
 
633
- #: .././admin/ga_dash_settings.php:1007
634
  msgid "and look for Google Analytics Dashboard."
635
  msgstr "e procura por Painel do Google Analytics."
636
 
637
- #: .././admin/ga_dash_settings.php:1013 .././admin/ga_dash_settings.php:1073
638
- #: .././admin/ga_dash_settings.php:1416 .././admin/ga_dash_settings.php:1475
639
- msgid "Debugging Data"
640
- msgstr "Depuração de Dados"
641
-
642
- #: .././admin/ga_dash_settings.php:1180
643
  msgid "Properties refreshed."
644
  msgstr ""
645
 
646
- #: .././admin/ga_dash_settings.php:1274
647
  msgid "Network Setup"
648
  msgstr ""
649
 
650
- #: .././admin/ga_dash_settings.php:1289
651
  msgid " use a single Google Analytics account for the entire network"
652
  msgstr ""
653
 
654
- #: .././admin/ga_dash_settings.php:1358
655
  msgid "Refresh Properties"
656
  msgstr ""
657
 
658
- #: .././admin/ga_dash_settings.php:1364
659
  #, fuzzy
660
  msgid "Properties/Views Settings"
661
  msgstr "Configurações Externas"
662
 
663
- #: .././admin/ga_dash_settings.php:1409
664
  msgid " exclude Super Admin tracking for the entire network"
665
  msgstr ""
666
 
667
- #: .././admin/ga_dash_settings.php:1537
668
  msgid "Setup Tutorial & Demo"
669
  msgstr "Tutorial de Instalação e demonstrações"
670
 
671
- #: .././admin/ga_dash_settings.php:1549
672
  msgid "Support & Reviews"
673
  msgstr "Suporte e Comentários"
674
 
675
- #: .././admin/ga_dash_settings.php:1557
676
  msgid "Plugin documentation and support on"
677
  msgstr ""
678
 
679
- #: .././admin/ga_dash_settings.php:1564
680
  msgid "Your feedback and review are both important,"
681
  msgstr "O seu feedback e revisão são importantes,"
682
 
683
- #: .././admin/ga_dash_settings.php:1564
684
  msgid "rate this plugin"
685
  msgstr "avaliar este plugin"
686
 
687
- #: .././admin/ga_dash_settings.php:1569
688
  msgid "Further Reading"
689
  msgstr "Leitura adicional"
690
 
691
- #: .././admin/ga_dash_settings.php:1576
692
  msgid "Improve search rankings"
693
  msgstr ""
694
 
695
- #: .././admin/ga_dash_settings.php:1576
696
  msgid "by moving your website to HTTPS/SSL."
697
  msgstr ""
698
 
699
- #: .././admin/ga_dash_settings.php:1582
700
  msgid "Other"
701
  msgstr "Outro"
702
 
703
- #: .././admin/ga_dash_settings.php:1582
704
  msgid "WordPress Plugins"
705
  msgstr "Plugins do WordPress"
706
 
707
- #: .././admin/ga_dash_settings.php:1582
708
  msgid "written by the same author"
709
  msgstr "escrito pelo mesmo autor"
710
 
711
- #: .././admin/ga_dash_settings.php:1587
712
  msgid "Other Services"
713
  msgstr ""
714
 
715
- #: .././admin/ga_dash_settings.php:1594
716
  msgid "Speed up your website and plug into a whole"
717
  msgstr ""
718
 
719
- #: .././admin/ga_dash_settings.php:1594
720
  msgid "new level of site speed"
721
  msgstr ""
722
 
723
- #: .././admin/ga_dash_settings.php:1600
724
  msgid "Web Analytics"
725
  msgstr "Web Analytics"
726
 
727
- #: .././admin/ga_dash_settings.php:1600
728
  msgid "service with users tracking at IP level."
729
  msgstr ""
730
 
731
- #: .././front/frontend.php:112
732
  msgid "Views vs UniqueViews"
733
  msgstr "Visualizações x Visualização única"
734
 
735
- #: .././front/frontend.php:168
736
  msgid "Google Analytics Reports"
737
  msgstr ""
738
 
739
- #: .././front/widgets.php:16
740
  msgid "Will display your google analytics stats in a widget"
741
  msgstr "Irá exibir suas estatísticas google analytics em um widget"
742
 
743
- #: .././front/widgets.php:44 .././tools/gapi.php:808
744
  msgid "trend"
745
  msgstr ""
746
 
747
- #: .././front/widgets.php:144
748
  msgid "Period:"
749
  msgstr "período:"
750
 
751
- #: .././front/widgets.php:144
752
  msgid "Sessions:"
753
  msgstr ""
754
 
755
- #: .././front/widgets.php:150
756
  msgid "generated by"
757
  msgstr "gerado pela"
758
 
759
- #: .././front/widgets.php:164
760
  msgid "Google Analytics Stats"
761
  msgstr "Estatísticas do Google Analytics"
762
 
763
- #: .././front/widgets.php:171
764
  msgid "Title:"
765
  msgstr "Título:"
766
 
767
- #: .././front/widgets.php:178
768
  msgid "Display:"
769
  msgstr "Exibir:"
770
 
771
- #: .././front/widgets.php:182
772
  msgid "Chart & Totals"
773
  msgstr "Gráfico e Totais"
774
 
775
- #: .././front/widgets.php:183
776
  msgid "Chart"
777
  msgstr "Gráfico"
778
 
779
- #: .././front/widgets.php:184
780
  msgid "Totals"
781
  msgstr "Totais"
782
 
783
- #: .././front/widgets.php:188
784
- msgid "Anonimize chart&#39;s stats:"
785
- msgstr "Esconder estatística de gráfico"
786
 
787
- #: .././front/widgets.php:195
788
  msgid "Stats for:"
789
  msgstr "Estatísticas para:"
790
 
791
- #: .././front/widgets.php:205
792
  msgid "Give credits:"
793
  msgstr "Dê créditos:"
794
 
795
- #: .././tools/gapi.php:140
796
  msgid "Use this link to get your access code:"
797
  msgstr "Use este link para obter o seu código de acesso:"
798
 
799
- #: .././tools/gapi.php:140
800
  msgid "Get Access Code"
801
  msgstr "Obter Código de Acesso"
802
 
803
- #: .././tools/gapi.php:145 .././tools/gapi.php:149
804
  msgid "Use the red link to get your access code!"
805
  msgstr ""
806
 
807
- #: .././tools/gapi.php:145
808
  msgid "Access Code:"
809
  msgstr "Código de acesso:"
810
 
811
- #: .././tools/gapi.php:157
812
  msgid "Save Access Code"
813
  msgstr "Salvar Código de Acesso"
814
 
815
- #: .././tools/gapi.php:380
816
  msgid "Organic Searches"
817
  msgstr "Pesquisas Ôrganicas"
818
 
819
- #: .././tools/gapi.php:391
820
  msgid "Hour"
821
  msgstr "Hora"
822
 
823
- #: .././tools/gapi.php:394 .././tools/gapi.php:808 .././tools/gapi.php:852
824
  msgid "Date"
825
  msgstr "Dia"
826
 
827
- #: .././tools/gapi.php:500 .././tools/gapi.php:852
828
  msgid "Views"
829
  msgstr "Visualizações"
830
 
831
- #: .././tools/gapi.php:611
832
  msgid "Countries"
833
  msgstr ""
834
 
835
- #: .././tools/gapi.php:629
836
  msgid "Cities from"
837
  msgstr ""
838
 
839
- #: .././tools/gapi.php:691
840
  msgid "Channels"
841
  msgstr ""
842
 
843
- #: .././tools/gapi.php:754
844
  msgid "Type"
845
  msgstr "Tipo"
846
 
847
- #: .././tools/gapi.php:852
848
  msgid "UniqueViews"
849
  msgstr "Visualização Única "
850
 
851
- #: .././tools/gapi.php:899
852
- msgid "Top Searches"
853
- msgstr "Principais Buscas"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
854
 
855
  #~ msgid "Error Log"
856
  #~ msgstr "Registro Errado"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
+ "POT-Creation-Date: 2015-02-07 11:41+0200\n"
5
+ "PO-Revision-Date: 2015-02-07 11:41+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: pt_BR\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.7.4\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
+ #: .././admin/dashboard_widgets.php:67 .././admin/dashboard_widgets.php:100
20
  msgid "Google Analytics"
21
  msgstr "Google Analytics"
22
 
23
+ #: .././admin/dashboard_widgets.php:71 .././admin/dashboard_widgets.php:104
24
+ #: .././admin/ga_dash_settings.php:105 .././admin/ga_dash_settings.php:216
25
+ #: .././admin/ga_dash_settings.php:964
26
  msgid "General Settings"
27
  msgstr "Configurações Gerais"
28
 
29
+ #: .././admin/dashboard_widgets.php:75
30
  msgid "Backend Settings"
31
  msgstr "Configurações Internas"
32
 
33
+ #: .././admin/dashboard_widgets.php:79
34
  msgid "Frontend Settings"
35
  msgstr "Configurações Externas"
36
 
37
+ #: .././admin/dashboard_widgets.php:83
38
  msgid "Tracking Code"
39
  msgstr "Tracking Code"
40
 
41
+ #: .././admin/dashboard_widgets.php:87 .././admin/dashboard_widgets.php:108
42
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
43
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
44
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
45
+ msgid "Errors & Debug"
46
+ msgstr ""
47
+
48
+ #: .././admin/dashboard_widgets.php:152
49
  msgid "Settings"
50
  msgstr "Configurações"
51
 
52
+ #: .././admin/dashboard_widgets.php:166 .././front/widgets.php:14
53
  msgid "Google Analytics Dashboard"
54
  msgstr "Painel do Google Analytics"
55
 
56
+ #: .././admin/dashboard_widgets.php:183
57
  msgid "This plugin needs an authorization:"
58
  msgstr "Este plugin precisa de autorização"
59
 
60
+ #: .././admin/dashboard_widgets.php:183 .././admin/ga_dash_settings.php:1035
61
+ #: .././admin/ga_dash_settings.php:1360
62
  msgid "Authorize Plugin"
63
  msgstr "Autorize o Plugin"
64
 
65
+ #: .././admin/dashboard_widgets.php:216 .././admin/ga_dash_settings.php:380
66
+ #: .././admin/ga_dash_settings.php:976 .././admin/ga_dash_settings.php:1001
67
+ #: .././admin/ga_dash_settings.php:1315
68
  msgid "View Name:"
69
  msgstr "Nome:"
70
 
71
+ #: .././admin/dashboard_widgets.php:221
72
  msgid "Something went wrong while retrieving profiles list."
73
  msgstr "Algo deu errado durante a recuperação da lista de perfil."
74
 
75
+ #: .././admin/dashboard_widgets.php:221
76
  msgid "More details"
77
  msgstr "Mais detalhes"
78
 
79
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
80
  msgid "An admin should asign a default Google Analytics Profile."
81
  msgstr "Um administrador deve atribuir um Google Analytics perfil padrão."
82
 
83
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
84
  msgid "Select Domain"
85
  msgstr "Selecionar Domínio"
86
 
87
+ #: .././admin/dashboard_widgets.php:250
88
  msgid ""
89
  "Something went wrong while retrieving property data. You need to create and "
90
  "properly configure a Google Analytics account:"
92
  "Algo deu errado ao recuperar os dados da propriedade. Você precisa criar e "
93
  "configurar corretamente uma conta do Google Analytics:"
94
 
95
+ #: .././admin/dashboard_widgets.php:250
96
  msgid "Find out more!"
97
  msgstr "Saber mais!"
98
 
99
+ #: .././admin/dashboard_widgets.php:278
100
  msgid "Real-Time"
101
  msgstr "Tempo Real"
102
 
103
+ #: .././admin/dashboard_widgets.php:279
104
  msgid "Today"
105
  msgstr "Hoje"
106
 
107
+ #: .././admin/dashboard_widgets.php:281
108
  msgid "Yesterday"
109
  msgstr "Ontem"
110
 
111
+ #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:72
112
+ #: .././front/widgets.php:182
113
  msgid "Last 7 Days"
114
  msgstr "Últimos 7 dias"
115
 
116
+ #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:75
117
+ #: .././front/widgets.php:183
118
  msgid "Last 14 Days"
119
  msgstr "Últimos 14 dias"
120
 
121
+ #: .././admin/dashboard_widgets.php:287 .././front/widgets.php:78
122
+ #: .././front/widgets.php:184
123
  msgid "Last 30 Days"
124
  msgstr "Últimos 30 dias"
125
 
126
+ #: .././admin/dashboard_widgets.php:289
127
  msgid "Last 90 Days"
128
  msgstr "Últimos 90 dias"
129
 
130
+ #: .././admin/dashboard_widgets.php:295 .././admin/dashboard_widgets.php:1037
131
+ #: .././front/widgets.php:40 .././tools/gapi.php:376 .././tools/gapi.php:515
132
+ #: .././tools/gapi.php:554 .././tools/gapi.php:615 .././tools/gapi.php:744
133
+ #: .././tools/gapi.php:825
134
  msgid "Sessions"
135
  msgstr ""
136
 
137
+ #: .././admin/dashboard_widgets.php:296 .././admin/dashboard_widgets.php:1041
138
+ #: .././tools/gapi.php:364
139
  msgid "Users"
140
  msgstr ""
141
 
142
+ #: .././admin/dashboard_widgets.php:298
143
  msgid "Organic"
144
  msgstr "Buscas"
145
 
146
+ #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:1045
147
+ #: .././tools/gapi.php:367
148
  msgid "Page Views"
149
  msgstr "Visualizações de Páginas"
150
 
151
+ #: .././admin/dashboard_widgets.php:302 .././admin/dashboard_widgets.php:1049
152
+ #: .././tools/gapi.php:370
153
  msgid "Bounce Rate"
154
  msgstr "Taxa de Rejeição"
155
 
156
+ #: .././admin/dashboard_widgets.php:304
157
  msgid "Location"
158
  msgstr ""
159
 
160
+ #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:477
161
  msgid "Pages"
162
  msgstr ""
163
 
164
+ #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:515
165
  msgid "Referrers"
166
  msgstr ""
167
 
168
+ #: .././admin/dashboard_widgets.php:310 .././tools/gapi.php:554
169
+ #: .././tools/gapi.php:825
170
  msgid "Searches"
171
  msgstr ""
172
 
173
+ #: .././admin/dashboard_widgets.php:312
174
  msgid "Traffic Details"
175
  msgstr ""
176
 
177
+ #: .././admin/dashboard_widgets.php:404 .././admin/dashboard_widgets.php:645
178
  msgid "REFERRAL"
179
  msgstr "ENCAMINHAMENTO"
180
 
181
+ #: .././admin/dashboard_widgets.php:408 .././admin/dashboard_widgets.php:646
182
  msgid "ORGANIC"
183
  msgstr "ÔRGANICO"
184
 
185
+ #: .././admin/dashboard_widgets.php:412 .././admin/dashboard_widgets.php:532
186
+ #: .././admin/dashboard_widgets.php:647
187
  msgid "SOCIAL"
188
  msgstr "SOCIAL"
189
 
190
+ #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:535
191
+ #: .././admin/dashboard_widgets.php:648
192
  msgid "CAMPAIGN"
193
  msgstr ""
194
 
195
+ #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:538
196
+ #: .././admin/dashboard_widgets.php:651
197
  msgid "DIRECT"
198
  msgstr "DIRETO"
199
 
200
+ #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:652
201
  msgid "NEW"
202
  msgstr "NOVO"
203
 
204
+ #: .././admin/dashboard_widgets.php:526
205
  msgid "REFERRALS"
206
  msgstr "REFERÊNCIAS"
207
 
208
+ #: .././admin/dashboard_widgets.php:529
209
  msgid "KEYWORDS"
210
  msgstr "PALAVRAS-CHAVE"
211
 
212
+ #: .././admin/dashboard_widgets.php:683 .././admin/dashboard_widgets.php:780
213
+ #: .././admin/dashboard_widgets.php:972 .././admin/dashboard_widgets.php:1083
214
+ #: .././front/frontend.php:88
215
+ msgid "A JavaScript Error is blocking plugin resources!"
216
+ msgstr ""
217
+
218
+ #: .././admin/dashboard_widgets.php:696 .././admin/dashboard_widgets.php:715
219
+ #: .././admin/dashboard_widgets.php:793 .././admin/dashboard_widgets.php:824
220
+ #: .././admin/dashboard_widgets.php:843 .././admin/dashboard_widgets.php:863
221
+ #: .././admin/dashboard_widgets.php:986 .././admin/dashboard_widgets.php:1096
222
+ #: .././admin/dashboard_widgets.php:1115 .././front/frontend.php:100
223
+ #: .././front/frontend.php:119
224
+ msgid "Invalid response, more details in JavaScript Console (F12)."
225
+ msgstr ""
226
+
227
+ #: .././admin/dashboard_widgets.php:701 .././admin/dashboard_widgets.php:720
228
+ #: .././admin/dashboard_widgets.php:798 .././admin/dashboard_widgets.php:810
229
+ #: .././admin/dashboard_widgets.php:829 .././admin/dashboard_widgets.php:848
230
+ #: .././admin/dashboard_widgets.php:868 .././admin/dashboard_widgets.php:991
231
+ #: .././admin/dashboard_widgets.php:994 .././admin/dashboard_widgets.php:1101
232
+ #: .././admin/dashboard_widgets.php:1120 .././front/frontend.php:105
233
+ #: .././front/frontend.php:124 .././front/widgets.php:110
234
  msgid "This report is unavailable"
235
  msgstr ""
236
 
237
+ #: .././admin/dashboard_widgets.php:880
238
  msgid "Traffic Mediums"
239
  msgstr ""
240
 
241
+ #: .././admin/dashboard_widgets.php:896
242
  msgid "Visitor Type"
243
  msgstr ""
244
 
245
+ #: .././admin/dashboard_widgets.php:912
246
  msgid "Social Networks"
247
  msgstr ""
248
 
249
+ #: .././admin/dashboard_widgets.php:928
250
  msgid "Search Engines"
251
  msgstr ""
252
 
253
+ #: .././admin/dashboard_widgets.php:1053
254
  msgid "Organic Search"
255
  msgstr ""
256
 
257
+ #: .././admin/dashboard_widgets.php:1057
258
  msgid "Pages/Session"
259
  msgstr ""
260
 
261
+ #: .././admin/ga_dash_settings.php:83 .././admin/ga_dash_settings.php:194
262
+ #: .././admin/ga_dash_settings.php:327 .././admin/ga_dash_settings.php:855
263
+ #: .././admin/ga_dash_settings.php:1157
264
  msgid "Settings saved."
265
  msgstr ""
266
 
267
+ #: .././admin/ga_dash_settings.php:85 .././admin/ga_dash_settings.php:196
268
+ #: .././admin/ga_dash_settings.php:329 .././admin/ga_dash_settings.php:841
269
+ #: .././admin/ga_dash_settings.php:851 .././admin/ga_dash_settings.php:857
270
+ #: .././admin/ga_dash_settings.php:869 .././admin/ga_dash_settings.php:1118
271
+ #: .././admin/ga_dash_settings.php:1143 .././admin/ga_dash_settings.php:1153
272
+ #: .././admin/ga_dash_settings.php:1159 .././admin/ga_dash_settings.php:1171
273
  msgid "Cheating Huh?"
274
  msgstr ""
275
 
276
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
277
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
278
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
279
+ msgid "Something went wrong, check"
280
+ msgstr ""
281
 
282
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
283
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
284
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
285
+ msgid "or"
286
+ msgstr ""
287
+
288
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
289
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
290
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
291
  msgid "auhorize the plugin"
292
  msgstr "autorize o plugin"
293
 
294
+ #: .././admin/ga_dash_settings.php:95
 
 
 
 
 
 
 
 
 
 
295
  msgid "Google Analytics Frontend Settings"
296
  msgstr "Configurações Externas do Google Analytics"
297
 
298
+ #: .././admin/ga_dash_settings.php:108 .././admin/ga_dash_settings.php:219
299
  msgid "Show stats to:"
300
  msgstr ""
301
 
302
+ #: .././admin/ga_dash_settings.php:152
303
  msgid " show page sessions and users in frontend (after each article)"
304
  msgstr ""
305
 
306
+ #: .././admin/ga_dash_settings.php:168
307
  msgid " show page searches (after each article)"
308
  msgstr "pesquisas mostram página (depois de cada artigo)"
309
 
310
+ #: .././admin/ga_dash_settings.php:177 .././admin/ga_dash_settings.php:305
311
+ #: .././admin/ga_dash_settings.php:666 .././admin/ga_dash_settings.php:1025
312
+ #: .././admin/ga_dash_settings.php:1351
313
  msgid "Save Changes"
314
  msgstr ""
315
 
316
+ #: .././admin/ga_dash_settings.php:206
317
  msgid "Google Analytics Dashboard Settings"
318
  msgstr "Configurações de Painel do Google Analytics"
319
 
320
+ #: .././admin/ga_dash_settings.php:264
321
  msgid "disable Switch Profile/View functionality"
322
  msgstr "desativar mudar perfil/Ver funcionalidade"
323
 
324
+ #: .././admin/ga_dash_settings.php:268
325
  msgid "Real-Time Settings"
326
  msgstr "Configurações de Tempo Real"
327
 
328
+ #: .././admin/ga_dash_settings.php:271
329
  msgid "Maximum number of pages to display on real-time tab:"
330
  msgstr "O número máximo de páginas para mostrar na guia Tempo Real:"
331
 
332
+ #: .././admin/ga_dash_settings.php:276 .././admin/ga_dash_settings.php:292
333
+ msgid "find out more"
334
+ msgstr ""
335
 
336
+ #: .././admin/ga_dash_settings.php:278 .././admin/ga_dash_settings.php:295
337
  msgid "about this feature"
338
  msgstr "sobre este recurso"
339
 
340
+ #: .././admin/ga_dash_settings.php:283
341
+ msgid "Location Settings"
342
+ msgstr ""
343
+
344
+ #: .././admin/ga_dash_settings.php:287
345
+ msgid "Target Geo Map to country:"
346
+ msgstr ""
347
 
348
+ #: .././admin/ga_dash_settings.php:336
349
+ msgid "The tracking component is disabled. You should set"
350
+ msgstr ""
351
 
352
+ #: .././admin/ga_dash_settings.php:336
353
+ msgid "Tracking Options"
354
  msgstr ""
355
 
356
+ #: .././admin/ga_dash_settings.php:336
357
+ msgid "to"
358
+ msgstr ""
359
 
360
+ #: .././admin/ga_dash_settings.php:336 .././admin/ga_dash_settings.php:372
361
+ msgid "Enabled"
362
+ msgstr "Habilitar"
363
 
364
+ #: .././admin/ga_dash_settings.php:342
365
+ msgid "Google Analytics Tracking Code"
366
+ msgstr "Código de rastreamento do Google Analytics"
367
 
368
+ #: .././admin/ga_dash_settings.php:351
369
+ msgid "Basic Settings"
370
+ msgstr ""
371
 
372
+ #: .././admin/ga_dash_settings.php:352 .././admin/ga_dash_settings.php:431
373
+ msgid "Events Tracking"
374
+ msgstr "Eventos de rastreamento"
375
 
376
+ #: .././admin/ga_dash_settings.php:353 .././admin/ga_dash_settings.php:495
377
+ msgid "Custom Definitions"
378
+ msgstr ""
379
 
380
+ #: .././admin/ga_dash_settings.php:354 .././admin/ga_dash_settings.php:623
381
+ #: .././admin/ga_dash_settings.php:1328
382
+ msgid "Exclude Tracking"
383
+ msgstr "Excluir Rastreamento"
384
 
385
+ #: .././admin/ga_dash_settings.php:355
386
+ msgid "Advanced Settings"
387
+ msgstr ""
388
 
389
+ #: .././admin/ga_dash_settings.php:363
390
  msgid "Tracking Settings"
391
  msgstr "Configurações de rastreamento"
392
 
393
+ #: .././admin/ga_dash_settings.php:366
394
  msgid "Tracking Options:"
395
  msgstr ""
396
 
397
+ #: .././admin/ga_dash_settings.php:370
398
  msgid "Disabled"
399
  msgstr "Desabilitar"
400
 
401
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
 
 
 
 
402
  msgid "Tracking ID:"
403
  msgstr "ID de rastreamento:"
404
 
405
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
406
  msgid "Default URL:"
407
  msgstr "URL Padrão:"
408
 
409
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
410
  msgid "Time Zone:"
411
  msgstr "Fuso horário:"
412
 
413
+ #: .././admin/ga_dash_settings.php:385
414
  #, fuzzy
415
  msgid "Basic Tracking"
416
  msgstr "Eventos de rastreamento"
417
 
418
+ #: .././admin/ga_dash_settings.php:388
419
  msgid "Tracking Type:"
420
  msgstr ""
421
 
422
+ #: .././admin/ga_dash_settings.php:392
423
  msgid "Classic Analytics"
424
  msgstr "Analytics clássico"
425
 
426
+ #: .././admin/ga_dash_settings.php:394
427
  msgid "Universal Analytics"
428
  msgstr "Universal Analytics"
429
 
430
+ #: .././admin/ga_dash_settings.php:408
431
  msgid " anonymize IPs while tracking"
432
  msgstr "IPs anônimo ao rastreamento"
433
 
434
+ #: .././admin/ga_dash_settings.php:423
435
  msgid " enable remarketing, demographics and interests reports"
436
  msgstr "permitir Informações demográficas e interesses relatórios"
437
 
438
+ #: .././admin/ga_dash_settings.php:445
 
 
 
 
439
  msgid " track downloads, mailto and outbound links"
440
  msgstr "baixe faixas, e-mail e links de saída"
441
 
442
+ #: .././admin/ga_dash_settings.php:449
443
  #, fuzzy
444
  msgid "Downloads Regex:"
445
  msgstr "Baixe Filtros:"
446
 
447
+ #: .././admin/ga_dash_settings.php:466
448
  msgid " track affiliate links matching this regex"
449
  msgstr ""
450
 
451
+ #: .././admin/ga_dash_settings.php:470
452
  msgid "Affiliates Regex:"
453
  msgstr ""
454
 
455
+ #: .././admin/ga_dash_settings.php:487
456
  msgid " track fragment identifiers, hashmarks (#) in URI links"
457
  msgstr ""
458
 
459
+ #: .././admin/ga_dash_settings.php:498
 
 
 
 
460
  msgid "Authors:"
461
  msgstr ""
462
 
463
+ #: .././admin/ga_dash_settings.php:508
464
  msgid "Publication Year:"
465
  msgstr ""
466
 
467
+ #: .././admin/ga_dash_settings.php:518
468
  msgid "Categories:"
469
  msgstr ""
470
 
471
+ #: .././admin/ga_dash_settings.php:528
472
  msgid "User Type:"
473
  msgstr ""
474
 
475
+ #: .././admin/ga_dash_settings.php:542
476
  #, fuzzy
477
  msgid "Advanced Tracking"
478
  msgstr "Eventos de rastreamento"
479
 
480
+ #: .././admin/ga_dash_settings.php:545
481
  #, fuzzy
482
  msgid "Page Speed SR:"
483
  msgstr "Páginas por Visita:"
484
 
485
+ #: .././admin/ga_dash_settings.php:563
486
  msgid " exclude events from bounce-rate calculation"
487
  msgstr ""
488
 
489
+ #: .././admin/ga_dash_settings.php:578
490
  msgid " enable enhanced link attribution"
491
  msgstr "permitir reforço a atribuição de link"
492
 
493
+ #: .././admin/ga_dash_settings.php:592
494
  msgid " enable AdSense account linking"
495
  msgstr ""
496
 
497
+ #: .././admin/ga_dash_settings.php:608
498
  msgid " enable cross domain tracking"
499
  msgstr ""
500
 
501
+ #: .././admin/ga_dash_settings.php:612
502
  msgid "Cross Domains:"
503
  msgstr ""
504
 
505
+ #: .././admin/ga_dash_settings.php:626
 
 
 
 
506
  msgid "Exclude tracking for:"
507
  msgstr ""
508
 
509
+ #: .././admin/ga_dash_settings.php:687
510
+ msgid "Google Analytics Errors & Debugging"
511
+ msgstr ""
512
+
513
+ #: .././admin/ga_dash_settings.php:697
514
+ msgid "Errors & Details"
515
+ msgstr ""
516
+
517
+ #: .././admin/ga_dash_settings.php:698
518
+ msgid "Plugin Settings"
519
+ msgstr ""
520
+
521
+ #: .././admin/ga_dash_settings.php:706
522
+ msgid "For errors and/or other issues please check"
523
+ msgstr ""
524
+
525
+ #: .././admin/ga_dash_settings.php:706
526
+ msgid "the plugin documentation page"
527
+ msgstr ""
528
+
529
+ #: .././admin/ga_dash_settings.php:706
530
+ msgid "and related tutorials"
531
+ msgstr ""
532
+
533
+ #: .././admin/ga_dash_settings.php:710
534
+ msgid "Last Error detected"
535
+ msgstr ""
536
+
537
+ #: .././admin/ga_dash_settings.php:715 .././admin/ga_dash_settings.php:728
538
+ msgid "None"
539
+ msgstr ""
540
+
541
+ #: .././admin/ga_dash_settings.php:722
542
+ msgid "Error Details"
543
+ msgstr ""
544
+
545
+ #: .././admin/ga_dash_settings.php:740
546
+ msgid "Plugin Configuration"
547
+ msgstr ""
548
+
549
+ #: .././admin/ga_dash_settings.php:788 .././admin/ga_dash_settings.php:1072
550
  msgid ""
551
  "Loading the required libraries. If this results in a blank screen or a fatal "
552
  "error, try this solution:"
553
  msgstr ""
554
 
555
+ #: .././admin/ga_dash_settings.php:800 .././admin/ga_dash_settings.php:1084
556
  msgid "Plugin authorization succeeded."
557
  msgstr "Plugin autorizado com sucesso."
558
 
559
+ #: .././admin/ga_dash_settings.php:816 .././admin/ga_dash_settings.php:1109
560
  msgid ""
561
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
562
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
563
  msgstr ""
564
 
565
+ #: .././admin/ga_dash_settings.php:839 .././admin/ga_dash_settings.php:1141
566
  msgid "Cleared Cache."
567
  msgstr "Cache limpa."
568
 
569
+ #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1150
570
  msgid "Token Reseted and Revoked."
571
  msgstr "Símbolo redefinido e revogado"
572
 
573
+ #: .././admin/ga_dash_settings.php:862 .././admin/ga_dash_settings.php:1164
 
 
 
 
574
  msgid "All other domains/properties were removed."
575
  msgstr "Todos os outros domínios / propriedades foram removidas."
576
 
577
+ #: .././admin/ga_dash_settings.php:874 .././admin/ga_dash_settings.php:1176
 
 
 
 
 
578
  msgid "Google Analytics Settings"
579
  msgstr "Configurações do Google Analytics"
580
 
581
+ #: .././admin/ga_dash_settings.php:887 .././admin/ga_dash_settings.php:1189
 
 
 
 
 
 
 
 
582
  msgid "Use the red link (see below) to generate and get your access code!"
583
  msgstr ""
584
 
585
+ #: .././admin/ga_dash_settings.php:898 .././admin/ga_dash_settings.php:1224
586
  msgid "Plugin Authorization"
587
  msgstr "Autorização de Plugin"
588
 
589
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
590
  msgid "You should watch the"
591
  msgstr "Você deve assistir ao"
592
 
593
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
594
  msgid "video"
595
  msgstr "vídeo"
596
 
597
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
598
  msgid "and read this"
599
  msgstr "e ler este"
600
 
601
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
602
  msgid "tutorial"
603
  msgstr "tutorial"
604
 
605
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
606
  msgid ""
607
  "before proceeding to authorization. This plugin requires a properly "
608
  "configured Google Analytics account"
610
  "antes de prosseguir para a autorização. Este plugin requer uma conta do "
611
  "Google Analytics configurado corretamente"
612
 
613
+ #: .././admin/ga_dash_settings.php:914 .././admin/ga_dash_settings.php:1239
614
  msgid " use your own API Project credentials"
615
  msgstr "usar suas próprias credenciais de projeto API"
616
 
617
+ #: .././admin/ga_dash_settings.php:921 .././admin/ga_dash_settings.php:1246
618
  msgid "API Key:"
619
  msgstr "Chave API:"
620
 
621
+ #: .././admin/ga_dash_settings.php:928 .././admin/ga_dash_settings.php:1254
622
  msgid "Client ID:"
623
  msgstr "ID do cliente:"
624
 
625
+ #: .././admin/ga_dash_settings.php:936 .././admin/ga_dash_settings.php:1263
626
  msgid "Client Secret:"
627
  msgstr "Cliente Secreto:"
628
 
629
+ #: .././admin/ga_dash_settings.php:954 .././admin/ga_dash_settings.php:1282
630
  msgid "Clear Authorization"
631
  msgstr "Limpar Autorização"
632
 
633
+ #: .././admin/ga_dash_settings.php:958 .././admin/ga_dash_settings.php:1039
634
+ #: .././admin/ga_dash_settings.php:1285 .././admin/ga_dash_settings.php:1363
635
  msgid "Clear Cache"
636
  msgstr "Limpar Cache"
637
 
638
+ #: .././admin/ga_dash_settings.php:967
639
  msgid "Select Domain:"
640
  msgstr ""
641
 
642
+ #: .././admin/ga_dash_settings.php:980 .././admin/ga_dash_settings.php:1319
643
  msgid "Property not found"
644
  msgstr ""
645
 
646
+ #: .././admin/ga_dash_settings.php:985
647
  msgid "and/or hide all other domains"
648
  msgstr "e / ou esconder todos os outros domínios"
649
 
650
+ #: .././admin/ga_dash_settings.php:988
651
  msgid "Hide Now"
652
  msgstr "Ocultar Agora"
653
 
654
+ #: .././admin/ga_dash_settings.php:1007
655
  msgid "Theme Color:"
656
  msgstr ""
657
 
658
+ #: .././admin/ga_dash_settings.php:1017
659
  msgid "A new frontend widget is available! To enable it, go to"
660
  msgstr "Um novo widget frontend está disponível! Para ativá-lo, vá para o"
661
 
662
+ #: .././admin/ga_dash_settings.php:1017
663
  msgid "Appearance -> Widgets"
664
  msgstr "Aparência -> Widgets"
665
 
666
+ #: .././admin/ga_dash_settings.php:1017
667
  msgid "and look for Google Analytics Dashboard."
668
  msgstr "e procura por Painel do Google Analytics."
669
 
670
+ #: .././admin/ga_dash_settings.php:1115
 
 
 
 
 
671
  msgid "Properties refreshed."
672
  msgstr ""
673
 
674
+ #: .././admin/ga_dash_settings.php:1201
675
  msgid "Network Setup"
676
  msgstr ""
677
 
678
+ #: .././admin/ga_dash_settings.php:1216
679
  msgid " use a single Google Analytics account for the entire network"
680
  msgstr ""
681
 
682
+ #: .././admin/ga_dash_settings.php:1288
683
  msgid "Refresh Properties"
684
  msgstr ""
685
 
686
+ #: .././admin/ga_dash_settings.php:1294
687
  #, fuzzy
688
  msgid "Properties/Views Settings"
689
  msgstr "Configurações Externas"
690
 
691
+ #: .././admin/ga_dash_settings.php:1342
692
  msgid " exclude Super Admin tracking for the entire network"
693
  msgstr ""
694
 
695
+ #: .././admin/ga_dash_settings.php:1394
696
  msgid "Setup Tutorial & Demo"
697
  msgstr "Tutorial de Instalação e demonstrações"
698
 
699
+ #: .././admin/ga_dash_settings.php:1406
700
  msgid "Support & Reviews"
701
  msgstr "Suporte e Comentários"
702
 
703
+ #: .././admin/ga_dash_settings.php:1414
704
  msgid "Plugin documentation and support on"
705
  msgstr ""
706
 
707
+ #: .././admin/ga_dash_settings.php:1421
708
  msgid "Your feedback and review are both important,"
709
  msgstr "O seu feedback e revisão são importantes,"
710
 
711
+ #: .././admin/ga_dash_settings.php:1421
712
  msgid "rate this plugin"
713
  msgstr "avaliar este plugin"
714
 
715
+ #: .././admin/ga_dash_settings.php:1426
716
  msgid "Further Reading"
717
  msgstr "Leitura adicional"
718
 
719
+ #: .././admin/ga_dash_settings.php:1434
720
  msgid "Improve search rankings"
721
  msgstr ""
722
 
723
+ #: .././admin/ga_dash_settings.php:1434
724
  msgid "by moving your website to HTTPS/SSL."
725
  msgstr ""
726
 
727
+ #: .././admin/ga_dash_settings.php:1441
728
  msgid "Other"
729
  msgstr "Outro"
730
 
731
+ #: .././admin/ga_dash_settings.php:1441
732
  msgid "WordPress Plugins"
733
  msgstr "Plugins do WordPress"
734
 
735
+ #: .././admin/ga_dash_settings.php:1441
736
  msgid "written by the same author"
737
  msgstr "escrito pelo mesmo autor"
738
 
739
+ #: .././admin/ga_dash_settings.php:1446
740
  msgid "Other Services"
741
  msgstr ""
742
 
743
+ #: .././admin/ga_dash_settings.php:1453
744
  msgid "Speed up your website and plug into a whole"
745
  msgstr ""
746
 
747
+ #: .././admin/ga_dash_settings.php:1453
748
  msgid "new level of site speed"
749
  msgstr ""
750
 
751
+ #: .././admin/ga_dash_settings.php:1460
752
  msgid "Web Analytics"
753
  msgstr "Web Analytics"
754
 
755
+ #: .././admin/ga_dash_settings.php:1460
756
  msgid "service with users tracking at IP level."
757
  msgstr ""
758
 
759
+ #: .././front/frontend.php:134
760
  msgid "Views vs UniqueViews"
761
  msgstr "Visualizações x Visualização única"
762
 
763
+ #: .././front/frontend.php:184
764
  msgid "Google Analytics Reports"
765
  msgstr ""
766
 
767
+ #: .././front/widgets.php:15
768
  msgid "Will display your google analytics stats in a widget"
769
  msgstr "Irá exibir suas estatísticas google analytics em um widget"
770
 
771
+ #: .././front/widgets.php:40 .././tools/gapi.php:744
772
  msgid "trend"
773
  msgstr ""
774
 
775
+ #: .././front/widgets.php:133
776
  msgid "Period:"
777
  msgstr "período:"
778
 
779
+ #: .././front/widgets.php:133
780
  msgid "Sessions:"
781
  msgstr ""
782
 
783
+ #: .././front/widgets.php:137
784
  msgid "generated by"
785
  msgstr "gerado pela"
786
 
787
+ #: .././front/widgets.php:147
788
  msgid "Google Analytics Stats"
789
  msgstr "Estatísticas do Google Analytics"
790
 
791
+ #: .././front/widgets.php:154
792
  msgid "Title:"
793
  msgstr "Título:"
794
 
795
+ #: .././front/widgets.php:161
796
  msgid "Display:"
797
  msgstr "Exibir:"
798
 
799
+ #: .././front/widgets.php:165
800
  msgid "Chart & Totals"
801
  msgstr "Gráfico e Totais"
802
 
803
+ #: .././front/widgets.php:166
804
  msgid "Chart"
805
  msgstr "Gráfico"
806
 
807
+ #: .././front/widgets.php:167
808
  msgid "Totals"
809
  msgstr "Totais"
810
 
811
+ #: .././front/widgets.php:171
812
+ msgid "Anonymize stats:"
813
+ msgstr ""
814
 
815
+ #: .././front/widgets.php:178
816
  msgid "Stats for:"
817
  msgstr "Estatísticas para:"
818
 
819
+ #: .././front/widgets.php:188
820
  msgid "Give credits:"
821
  msgstr "Dê créditos:"
822
 
823
+ #: .././tools/gapi.php:129
824
  msgid "Use this link to get your access code:"
825
  msgstr "Use este link para obter o seu código de acesso:"
826
 
827
+ #: .././tools/gapi.php:129
828
  msgid "Get Access Code"
829
  msgstr "Obter Código de Acesso"
830
 
831
+ #: .././tools/gapi.php:134 .././tools/gapi.php:138
832
  msgid "Use the red link to get your access code!"
833
  msgstr ""
834
 
835
+ #: .././tools/gapi.php:134
836
  msgid "Access Code:"
837
  msgstr "Código de acesso:"
838
 
839
+ #: .././tools/gapi.php:146
840
  msgid "Save Access Code"
841
  msgstr "Salvar Código de Acesso"
842
 
843
+ #: .././tools/gapi.php:373
844
  msgid "Organic Searches"
845
  msgstr "Pesquisas Ôrganicas"
846
 
847
+ #: .././tools/gapi.php:381
848
  msgid "Hour"
849
  msgstr "Hora"
850
 
851
+ #: .././tools/gapi.php:384 .././tools/gapi.php:744 .././tools/gapi.php:783
852
  msgid "Date"
853
  msgstr "Dia"
854
 
855
+ #: .././tools/gapi.php:477 .././tools/gapi.php:783
856
  msgid "Views"
857
  msgstr "Visualizações"
858
 
859
+ #: .././tools/gapi.php:576
860
  msgid "Countries"
861
  msgstr ""
862
 
863
+ #: .././tools/gapi.php:590
864
  msgid "Cities from"
865
  msgstr ""
866
 
867
+ #: .././tools/gapi.php:644
868
  msgid "Channels"
869
  msgstr ""
870
 
871
+ #: .././tools/gapi.php:698
872
  msgid "Type"
873
  msgstr "Tipo"
874
 
875
+ #: .././tools/gapi.php:783
876
  msgid "UniqueViews"
877
  msgstr "Visualização Única "
878
 
879
+ #~ msgid "Something went wrong, you need to"
880
+ #~ msgstr "Algo deu errado, você precisa"
881
+
882
+ #~ msgid "or properly configure your"
883
+ #~ msgstr "ou configurar corretamente o seu"
884
+
885
+ #~ msgid "Google Analytics account"
886
+ #~ msgstr "Conta do Google Analytics"
887
+
888
+ #~ msgid "(find out more"
889
+ #~ msgstr "(Saiba mais"
890
+
891
+ #~ msgid ")"
892
+ #~ msgstr ")"
893
+
894
+ #~ msgid "Additional Stats & Charts"
895
+ #~ msgstr "Estatísticas e gráficos adicionais"
896
+
897
+ #~ msgid "Target Geo Map to region:"
898
+ #~ msgstr "Alvo Geo Map para a região:"
899
+
900
+ #~ msgid "and render top"
901
+ #~ msgstr "e tornar pricipal"
902
+
903
+ #~ msgid "cities (find out more"
904
+ #~ msgstr "cidades (mais"
905
+
906
+ #~ msgid " show traffic overview"
907
+ #~ msgstr "mostrar visão geral do tráfego"
908
+
909
+ #~ msgid " show top pages"
910
+ #~ msgstr "mostrar principais páginas"
911
+
912
+ #~ msgid " show top referrers"
913
+ #~ msgstr "mostrar principais referências"
914
+
915
+ #~ msgid " show top searches"
916
+ #~ msgstr "mostrar principais pesquisas"
917
+
918
+ #~ msgid "Dumping log data."
919
+ #~ msgstr "Lixeira de dados"
920
+
921
+ #~ msgid ""
922
+ #~ "Something went wrong. Please check the Debugging Data section for "
923
+ #~ "possible errors"
924
+ #~ msgstr ""
925
+ #~ "Algo deu errado. Por favor verifique a seção de dados de depuração por "
926
+ #~ "possíveis erros"
927
+
928
+ #~ msgid "Debugging Data"
929
+ #~ msgstr "Depuração de Dados"
930
+
931
+ #~ msgid "Anonimize chart&#39;s stats:"
932
+ #~ msgstr "Esconder estatística de gráfico"
933
+
934
+ #~ msgid "Top Searches"
935
+ #~ msgstr "Principais Buscas"
936
 
937
  #~ msgid "Error Log"
938
  #~ msgstr "Registro Errado"
languages/ga-dash.pot CHANGED
@@ -1,846 +1,872 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
- "POT-Creation-Date: 2015-01-07 20:24+0200\n"
5
- "PO-Revision-Date: 2015-01-07 20:24+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: en\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.1\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
- #: .././admin/dashboard_widgets.php:50 .././admin/dashboard_widgets.php:81
20
  msgid "Google Analytics"
21
  msgstr ""
22
 
23
- #: .././admin/dashboard_widgets.php:54 .././admin/dashboard_widgets.php:85
24
- #: .././admin/ga_dash_settings.php:100 .././admin/ga_dash_settings.php:222
25
- #: .././admin/ga_dash_settings.php:954
26
  msgid "General Settings"
27
  msgstr ""
28
 
29
- #: .././admin/dashboard_widgets.php:58
30
  msgid "Backend Settings"
31
  msgstr ""
32
 
33
- #: .././admin/dashboard_widgets.php:62
34
  msgid "Frontend Settings"
35
  msgstr ""
36
 
37
- #: .././admin/dashboard_widgets.php:66
38
  msgid "Tracking Code"
39
  msgstr ""
40
 
41
- #: .././admin/dashboard_widgets.php:132
 
 
 
 
 
 
 
42
  msgid "Settings"
43
  msgstr ""
44
 
45
- #: .././admin/dashboard_widgets.php:148 .././front/widgets.php:15
46
  msgid "Google Analytics Dashboard"
47
  msgstr ""
48
 
49
- #: .././admin/dashboard_widgets.php:166
50
  msgid "This plugin needs an authorization:"
51
  msgstr ""
52
 
53
- #: .././admin/dashboard_widgets.php:166 .././admin/ga_dash_settings.php:1063
54
- #: .././admin/ga_dash_settings.php:1465
55
  msgid "Authorize Plugin"
56
  msgstr ""
57
 
58
- #: .././admin/dashboard_widgets.php:207 .././admin/ga_dash_settings.php:459
59
- #: .././admin/ga_dash_settings.php:966 .././admin/ga_dash_settings.php:991
60
- #: .././admin/ga_dash_settings.php:1383
61
  msgid "View Name:"
62
  msgstr ""
63
 
64
- #: .././admin/dashboard_widgets.php:212
65
  msgid "Something went wrong while retrieving profiles list."
66
  msgstr ""
67
 
68
- #: .././admin/dashboard_widgets.php:212
69
  msgid "More details"
70
  msgstr ""
71
 
72
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
73
  msgid "An admin should asign a default Google Analytics Profile."
74
  msgstr ""
75
 
76
- #: .././admin/dashboard_widgets.php:228 .././admin/dashboard_widgets.php:239
77
  msgid "Select Domain"
78
  msgstr ""
79
 
80
- #: .././admin/dashboard_widgets.php:245
81
  msgid ""
82
  "Something went wrong while retrieving property data. You need to create and "
83
  "properly configure a Google Analytics account:"
84
  msgstr ""
85
 
86
- #: .././admin/dashboard_widgets.php:245
87
  msgid "Find out more!"
88
  msgstr ""
89
 
90
- #: .././admin/dashboard_widgets.php:276
91
  msgid "Real-Time"
92
  msgstr ""
93
 
94
- #: .././admin/dashboard_widgets.php:277
95
  msgid "Today"
96
  msgstr ""
97
 
98
- #: .././admin/dashboard_widgets.php:279
99
  msgid "Yesterday"
100
  msgstr ""
101
 
102
- #: .././admin/dashboard_widgets.php:281 .././front/widgets.php:83
103
- #: .././front/widgets.php:199
104
  msgid "Last 7 Days"
105
  msgstr ""
106
 
107
- #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:86
108
- #: .././front/widgets.php:200
109
  msgid "Last 14 Days"
110
  msgstr ""
111
 
112
- #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:89
113
- #: .././front/widgets.php:201
114
  msgid "Last 30 Days"
115
  msgstr ""
116
 
117
- #: .././admin/dashboard_widgets.php:287
118
  msgid "Last 90 Days"
119
  msgstr ""
120
 
121
- #: .././admin/dashboard_widgets.php:293 .././admin/dashboard_widgets.php:952
122
- #: .././front/widgets.php:44 .././tools/gapi.php:384 .././tools/gapi.php:543
123
- #: .././tools/gapi.php:587 .././tools/gapi.php:658 .././tools/gapi.php:808
124
- #: .././tools/gapi.php:899
125
  msgid "Sessions"
126
  msgstr ""
127
 
128
- #: .././admin/dashboard_widgets.php:294 .././admin/dashboard_widgets.php:956
129
- #: .././tools/gapi.php:368
130
  msgid "Users"
131
  msgstr ""
132
 
133
- #: .././admin/dashboard_widgets.php:296
134
  msgid "Organic"
135
  msgstr ""
136
 
137
- #: .././admin/dashboard_widgets.php:298 .././admin/dashboard_widgets.php:960
138
- #: .././tools/gapi.php:372
139
  msgid "Page Views"
140
  msgstr ""
141
 
142
- #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:964
143
- #: .././tools/gapi.php:376
144
  msgid "Bounce Rate"
145
  msgstr ""
146
 
147
- #: .././admin/dashboard_widgets.php:302
148
  msgid "Location"
149
  msgstr ""
150
 
151
- #: .././admin/dashboard_widgets.php:304 .././tools/gapi.php:500
152
  msgid "Pages"
153
  msgstr ""
154
 
155
- #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:543
156
  msgid "Referrers"
157
  msgstr ""
158
 
159
- #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:587
 
160
  msgid "Searches"
161
  msgstr ""
162
 
163
- #: .././admin/dashboard_widgets.php:310
164
  msgid "Traffic Details"
165
  msgstr ""
166
 
167
- #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:657
168
  msgid "REFERRAL"
169
  msgstr ""
170
 
171
- #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:658
172
  msgid "ORGANIC"
173
  msgstr ""
174
 
175
- #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:544
176
- #: .././admin/dashboard_widgets.php:659
177
  msgid "SOCIAL"
178
  msgstr ""
179
 
180
- #: .././admin/dashboard_widgets.php:428 .././admin/dashboard_widgets.php:547
181
- #: .././admin/dashboard_widgets.php:660
182
  msgid "CAMPAIGN"
183
  msgstr ""
184
 
185
- #: .././admin/dashboard_widgets.php:432 .././admin/dashboard_widgets.php:550
186
- #: .././admin/dashboard_widgets.php:663
187
  msgid "DIRECT"
188
  msgstr ""
189
 
190
- #: .././admin/dashboard_widgets.php:436 .././admin/dashboard_widgets.php:664
191
  msgid "NEW"
192
  msgstr ""
193
 
194
- #: .././admin/dashboard_widgets.php:538
195
  msgid "REFERRALS"
196
  msgstr ""
197
 
198
- #: .././admin/dashboard_widgets.php:541
199
  msgid "KEYWORDS"
200
  msgstr ""
201
 
202
- #: .././admin/dashboard_widgets.php:690 .././admin/dashboard_widgets.php:702
203
- #: .././admin/dashboard_widgets.php:757 .././admin/dashboard_widgets.php:769
204
- #: .././admin/dashboard_widgets.php:781 .././admin/dashboard_widgets.php:793
205
- #: .././admin/dashboard_widgets.php:806 .././admin/dashboard_widgets.php:905
206
- #: .././admin/dashboard_widgets.php:908 .././admin/dashboard_widgets.php:992
207
- #: .././admin/dashboard_widgets.php:1004 .././front/frontend.php:88
208
- #: .././front/frontend.php:100 .././front/widgets.php:122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  msgid "This report is unavailable"
210
  msgstr ""
211
 
212
- #: .././admin/dashboard_widgets.php:818
213
  msgid "Traffic Mediums"
214
  msgstr ""
215
 
216
- #: .././admin/dashboard_widgets.php:834
217
  msgid "Visitor Type"
218
  msgstr ""
219
 
220
- #: .././admin/dashboard_widgets.php:850
221
  msgid "Social Networks"
222
  msgstr ""
223
 
224
- #: .././admin/dashboard_widgets.php:866
225
  msgid "Search Engines"
226
  msgstr ""
227
 
228
- #: .././admin/dashboard_widgets.php:968
229
  msgid "Organic Search"
230
  msgstr ""
231
 
232
- #: .././admin/dashboard_widgets.php:972
233
  msgid "Pages/Session"
234
  msgstr ""
235
 
236
- #: .././admin/ga_dash_settings.php:78 .././admin/ga_dash_settings.php:200
237
- #: .././admin/ga_dash_settings.php:418 .././admin/ga_dash_settings.php:841
238
- #: .././admin/ga_dash_settings.php:1228
239
  msgid "Settings saved."
240
  msgstr ""
241
 
242
- #: .././admin/ga_dash_settings.php:80 .././admin/ga_dash_settings.php:202
243
- #: .././admin/ga_dash_settings.php:420 .././admin/ga_dash_settings.php:824
244
- #: .././admin/ga_dash_settings.php:834 .././admin/ga_dash_settings.php:843
245
- #: .././admin/ga_dash_settings.php:855 .././admin/ga_dash_settings.php:1183
246
- #: .././admin/ga_dash_settings.php:1211 .././admin/ga_dash_settings.php:1221
247
- #: .././admin/ga_dash_settings.php:1230 .././admin/ga_dash_settings.php:1242
248
  msgid "Cheating Huh?"
249
  msgstr ""
250
 
251
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
252
- #: .././admin/ga_dash_settings.php:424
253
- msgid "Something went wrong, you need to"
 
254
  msgstr ""
255
 
256
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
257
- #: .././admin/ga_dash_settings.php:424
258
- msgid "auhorize the plugin"
259
- msgstr ""
260
-
261
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
262
- #: .././admin/ga_dash_settings.php:424
263
- msgid "or properly configure your"
264
  msgstr ""
265
 
266
- #: .././admin/ga_dash_settings.php:84 .././admin/ga_dash_settings.php:206
267
- #: .././admin/ga_dash_settings.php:424
268
- msgid "Google Analytics account"
 
269
  msgstr ""
270
 
271
- #: .././admin/ga_dash_settings.php:90
272
  msgid "Google Analytics Frontend Settings"
273
  msgstr ""
274
 
275
- #: .././admin/ga_dash_settings.php:103 .././admin/ga_dash_settings.php:225
276
  msgid "Show stats to:"
277
  msgstr ""
278
 
279
- #: .././admin/ga_dash_settings.php:153
280
  msgid " show page sessions and users in frontend (after each article)"
281
  msgstr ""
282
 
283
- #: .././admin/ga_dash_settings.php:169
284
  msgid " show page searches (after each article)"
285
  msgstr ""
286
 
287
- #: .././admin/ga_dash_settings.php:178 .././admin/ga_dash_settings.php:391
288
- #: .././admin/ga_dash_settings.php:739 .././admin/ga_dash_settings.php:1053
289
- #: .././admin/ga_dash_settings.php:1456
290
  msgid "Save Changes"
291
  msgstr ""
292
 
293
- #: .././admin/ga_dash_settings.php:212
294
  msgid "Google Analytics Dashboard Settings"
295
  msgstr ""
296
 
297
- #: .././admin/ga_dash_settings.php:275
298
  msgid "disable Switch Profile/View functionality"
299
  msgstr ""
300
 
301
- #: .././admin/ga_dash_settings.php:279
302
  msgid "Real-Time Settings"
303
  msgstr ""
304
 
305
- #: .././admin/ga_dash_settings.php:282
306
  msgid "Maximum number of pages to display on real-time tab:"
307
  msgstr ""
308
 
309
- #: .././admin/ga_dash_settings.php:287
310
- msgid "(find out more"
311
  msgstr ""
312
 
313
- #: .././admin/ga_dash_settings.php:289 .././admin/ga_dash_settings.php:324
314
  msgid "about this feature"
315
  msgstr ""
316
 
317
- #: .././admin/ga_dash_settings.php:290 .././admin/ga_dash_settings.php:325
318
- msgid ")"
319
  msgstr ""
320
 
321
- #: .././admin/ga_dash_settings.php:293
322
- msgid "Additional Stats & Charts"
323
  msgstr ""
324
 
325
- #: .././admin/ga_dash_settings.php:306
326
- msgid " show Geo Map chart for sessions"
327
  msgstr ""
328
 
329
- #: .././admin/ga_dash_settings.php:311
330
- msgid "Target Geo Map to region:"
331
  msgstr ""
332
 
333
- #: .././admin/ga_dash_settings.php:316
334
- msgid "and render top"
335
  msgstr ""
336
 
337
- #: .././admin/ga_dash_settings.php:321
338
- msgid "cities (find out more"
 
 
 
 
339
  msgstr ""
340
 
341
- #: .././admin/ga_dash_settings.php:339
342
- msgid " show traffic overview"
343
  msgstr ""
344
 
345
- #: .././admin/ga_dash_settings.php:353
346
- msgid " show top pages"
347
  msgstr ""
348
 
349
- #: .././admin/ga_dash_settings.php:367
350
- msgid " show top referrers"
351
  msgstr ""
352
 
353
- #: .././admin/ga_dash_settings.php:381
354
- msgid " show top searches"
 
355
  msgstr ""
356
 
357
- #: .././admin/ga_dash_settings.php:430
358
- msgid "Google Analytics Tracking Code"
359
  msgstr ""
360
 
361
- #: .././admin/ga_dash_settings.php:440
362
  msgid "Tracking Settings"
363
  msgstr ""
364
 
365
- #: .././admin/ga_dash_settings.php:443
366
  msgid "Tracking Options:"
367
  msgstr ""
368
 
369
- #: .././admin/ga_dash_settings.php:447
370
  msgid "Disabled"
371
  msgstr ""
372
 
373
- #: .././admin/ga_dash_settings.php:449
374
- msgid "Enabled"
375
- msgstr ""
376
-
377
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
378
  msgid "Tracking ID:"
379
  msgstr ""
380
 
381
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
382
  msgid "Default URL:"
383
  msgstr ""
384
 
385
- #: .././admin/ga_dash_settings.php:459 .././admin/ga_dash_settings.php:991
386
  msgid "Time Zone:"
387
  msgstr ""
388
 
389
- #: .././admin/ga_dash_settings.php:467
390
  msgid "Basic Tracking"
391
  msgstr ""
392
 
393
- #: .././admin/ga_dash_settings.php:473
394
  msgid "Tracking Type:"
395
  msgstr ""
396
 
397
- #: .././admin/ga_dash_settings.php:477
398
  msgid "Classic Analytics"
399
  msgstr ""
400
 
401
- #: .././admin/ga_dash_settings.php:479
402
  msgid "Universal Analytics"
403
  msgstr ""
404
 
405
- #: .././admin/ga_dash_settings.php:493
406
  msgid " anonymize IPs while tracking"
407
  msgstr ""
408
 
409
- #: .././admin/ga_dash_settings.php:508
410
  msgid " enable remarketing, demographics and interests reports"
411
  msgstr ""
412
 
413
- #: .././admin/ga_dash_settings.php:512
414
- msgid "Events Tracking"
415
- msgstr ""
416
-
417
- #: .././admin/ga_dash_settings.php:525
418
  msgid " track downloads, mailto and outbound links"
419
  msgstr ""
420
 
421
- #: .././admin/ga_dash_settings.php:529
422
  msgid "Downloads Regex:"
423
  msgstr ""
424
 
425
- #: .././admin/ga_dash_settings.php:546
426
  msgid " track affiliate links matching this regex"
427
  msgstr ""
428
 
429
- #: .././admin/ga_dash_settings.php:550
430
  msgid "Affiliates Regex:"
431
  msgstr ""
432
 
433
- #: .././admin/ga_dash_settings.php:567
434
  msgid " track fragment identifiers, hashmarks (#) in URI links"
435
  msgstr ""
436
 
437
- #: .././admin/ga_dash_settings.php:571
438
- msgid "Custom Definitions"
439
- msgstr ""
440
-
441
- #: .././admin/ga_dash_settings.php:574
442
  msgid "Authors:"
443
  msgstr ""
444
 
445
- #: .././admin/ga_dash_settings.php:584
446
  msgid "Publication Year:"
447
  msgstr ""
448
 
449
- #: .././admin/ga_dash_settings.php:594
450
  msgid "Categories:"
451
  msgstr ""
452
 
453
- #: .././admin/ga_dash_settings.php:604
454
  msgid "User Type:"
455
  msgstr ""
456
 
457
- #: .././admin/ga_dash_settings.php:614
458
  msgid "Advanced Tracking"
459
  msgstr ""
460
 
461
- #: .././admin/ga_dash_settings.php:617
462
  msgid "Page Speed SR:"
463
  msgstr ""
464
 
465
- #: .././admin/ga_dash_settings.php:635
466
  msgid " exclude events from bounce-rate calculation"
467
  msgstr ""
468
 
469
- #: .././admin/ga_dash_settings.php:649
470
  msgid " enable enhanced link attribution"
471
  msgstr ""
472
 
473
- #: .././admin/ga_dash_settings.php:663
474
  msgid " enable AdSense account linking"
475
  msgstr ""
476
 
477
- #: .././admin/ga_dash_settings.php:678
478
  msgid " enable cross domain tracking"
479
  msgstr ""
480
 
481
- #: .././admin/ga_dash_settings.php:682
482
  msgid "Cross Domains:"
483
  msgstr ""
484
 
485
- #: .././admin/ga_dash_settings.php:692 .././admin/ga_dash_settings.php:1396
486
- msgid "Exclude Tracking"
487
  msgstr ""
488
 
489
- #: .././admin/ga_dash_settings.php:695
490
- msgid "Exclude tracking for:"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  msgstr ""
492
 
493
- #: .././admin/ga_dash_settings.php:769 .././admin/ga_dash_settings.php:1138
 
 
 
 
 
 
 
 
 
 
 
 
494
  msgid ""
495
  "Loading the required libraries. If this results in a blank screen or a fatal "
496
  "error, try this solution:"
497
  msgstr ""
498
 
499
- #: .././admin/ga_dash_settings.php:781 .././admin/ga_dash_settings.php:1150
500
  msgid "Plugin authorization succeeded."
501
  msgstr ""
502
 
503
- #: .././admin/ga_dash_settings.php:796 .././admin/ga_dash_settings.php:1173
504
  msgid ""
505
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
506
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
507
  msgstr ""
508
 
509
- #: .././admin/ga_dash_settings.php:822 .././admin/ga_dash_settings.php:1209
510
  msgid "Cleared Cache."
511
  msgstr ""
512
 
513
- #: .././admin/ga_dash_settings.php:831 .././admin/ga_dash_settings.php:1218
514
  msgid "Token Reseted and Revoked."
515
  msgstr ""
516
 
517
- #: .././admin/ga_dash_settings.php:838 .././admin/ga_dash_settings.php:1225
518
- msgid "Dumping log data."
519
- msgstr ""
520
-
521
- #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1235
522
  msgid "All other domains/properties were removed."
523
  msgstr ""
524
 
525
- #: .././admin/ga_dash_settings.php:859 .././admin/ga_dash_settings.php:1246
526
- msgid ""
527
- "PHP CURL is required. Ask your hosting provider to install/enable PHP CURL!"
528
- msgstr ""
529
-
530
- #: .././admin/ga_dash_settings.php:863 .././admin/ga_dash_settings.php:1250
531
  msgid "Google Analytics Settings"
532
  msgstr ""
533
 
534
- #: .././admin/ga_dash_settings.php:872 .././admin/ga_dash_settings.php:1258
535
- msgid ""
536
- "Something went wrong. Please check the Debugging Data section for possible "
537
- "errors"
538
- msgstr ""
539
-
540
- #: .././admin/ga_dash_settings.php:878 .././admin/ga_dash_settings.php:1263
541
  msgid "Use the red link (see below) to generate and get your access code!"
542
  msgstr ""
543
 
544
- #: .././admin/ga_dash_settings.php:889 .././admin/ga_dash_settings.php:1297
545
  msgid "Plugin Authorization"
546
  msgstr ""
547
 
548
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
549
  msgid "You should watch the"
550
  msgstr ""
551
 
552
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
553
  msgid "video"
554
  msgstr ""
555
 
556
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
557
  msgid "and read this"
558
  msgstr ""
559
 
560
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
561
  msgid "tutorial"
562
  msgstr ""
563
 
564
- #: .././admin/ga_dash_settings.php:893 .././admin/ga_dash_settings.php:1301
565
  msgid ""
566
  "before proceeding to authorization. This plugin requires a properly "
567
  "configured Google Analytics account"
568
  msgstr ""
569
 
570
- #: .././admin/ga_dash_settings.php:905 .././admin/ga_dash_settings.php:1312
571
  msgid " use your own API Project credentials"
572
  msgstr ""
573
 
574
- #: .././admin/ga_dash_settings.php:912 .././admin/ga_dash_settings.php:1319
575
  msgid "API Key:"
576
  msgstr ""
577
 
578
- #: .././admin/ga_dash_settings.php:919 .././admin/ga_dash_settings.php:1326
579
  msgid "Client ID:"
580
  msgstr ""
581
 
582
- #: .././admin/ga_dash_settings.php:926 .././admin/ga_dash_settings.php:1334
583
  msgid "Client Secret:"
584
  msgstr ""
585
 
586
- #: .././admin/ga_dash_settings.php:944 .././admin/ga_dash_settings.php:1352
587
  msgid "Clear Authorization"
588
  msgstr ""
589
 
590
- #: .././admin/ga_dash_settings.php:948 .././admin/ga_dash_settings.php:1067
591
- #: .././admin/ga_dash_settings.php:1355 .././admin/ga_dash_settings.php:1469
592
  msgid "Clear Cache"
593
  msgstr ""
594
 
595
- #: .././admin/ga_dash_settings.php:957
596
  msgid "Select Domain:"
597
  msgstr ""
598
 
599
- #: .././admin/ga_dash_settings.php:970 .././admin/ga_dash_settings.php:1387
600
  msgid "Property not found"
601
  msgstr ""
602
 
603
- #: .././admin/ga_dash_settings.php:975
604
  msgid "and/or hide all other domains"
605
  msgstr ""
606
 
607
- #: .././admin/ga_dash_settings.php:978
608
  msgid "Hide Now"
609
  msgstr ""
610
 
611
- #: .././admin/ga_dash_settings.php:997
612
  msgid "Theme Color:"
613
  msgstr ""
614
 
615
- #: .././admin/ga_dash_settings.php:1007
616
  msgid "A new frontend widget is available! To enable it, go to"
617
  msgstr ""
618
 
619
- #: .././admin/ga_dash_settings.php:1007
620
  msgid "Appearance -> Widgets"
621
  msgstr ""
622
 
623
- #: .././admin/ga_dash_settings.php:1007
624
  msgid "and look for Google Analytics Dashboard."
625
  msgstr ""
626
 
627
- #: .././admin/ga_dash_settings.php:1013 .././admin/ga_dash_settings.php:1073
628
- #: .././admin/ga_dash_settings.php:1416 .././admin/ga_dash_settings.php:1475
629
- msgid "Debugging Data"
630
- msgstr ""
631
-
632
- #: .././admin/ga_dash_settings.php:1180
633
  msgid "Properties refreshed."
634
  msgstr ""
635
 
636
- #: .././admin/ga_dash_settings.php:1274
637
  msgid "Network Setup"
638
  msgstr ""
639
 
640
- #: .././admin/ga_dash_settings.php:1289
641
  msgid " use a single Google Analytics account for the entire network"
642
  msgstr ""
643
 
644
- #: .././admin/ga_dash_settings.php:1358
645
  msgid "Refresh Properties"
646
  msgstr ""
647
 
648
- #: .././admin/ga_dash_settings.php:1364
649
  msgid "Properties/Views Settings"
650
  msgstr ""
651
 
652
- #: .././admin/ga_dash_settings.php:1409
653
  msgid " exclude Super Admin tracking for the entire network"
654
  msgstr ""
655
 
656
- #: .././admin/ga_dash_settings.php:1537
657
  msgid "Setup Tutorial & Demo"
658
  msgstr ""
659
 
660
- #: .././admin/ga_dash_settings.php:1549
661
  msgid "Support & Reviews"
662
  msgstr ""
663
 
664
- #: .././admin/ga_dash_settings.php:1557
665
  msgid "Plugin documentation and support on"
666
  msgstr ""
667
 
668
- #: .././admin/ga_dash_settings.php:1564
669
  msgid "Your feedback and review are both important,"
670
  msgstr ""
671
 
672
- #: .././admin/ga_dash_settings.php:1564
673
  msgid "rate this plugin"
674
  msgstr ""
675
 
676
- #: .././admin/ga_dash_settings.php:1569
677
  msgid "Further Reading"
678
  msgstr ""
679
 
680
- #: .././admin/ga_dash_settings.php:1576
681
  msgid "Improve search rankings"
682
  msgstr ""
683
 
684
- #: .././admin/ga_dash_settings.php:1576
685
  msgid "by moving your website to HTTPS/SSL."
686
  msgstr ""
687
 
688
- #: .././admin/ga_dash_settings.php:1582
689
  msgid "Other"
690
  msgstr ""
691
 
692
- #: .././admin/ga_dash_settings.php:1582
693
  msgid "WordPress Plugins"
694
  msgstr ""
695
 
696
- #: .././admin/ga_dash_settings.php:1582
697
  msgid "written by the same author"
698
  msgstr ""
699
 
700
- #: .././admin/ga_dash_settings.php:1587
701
  msgid "Other Services"
702
  msgstr ""
703
 
704
- #: .././admin/ga_dash_settings.php:1594
705
  msgid "Speed up your website and plug into a whole"
706
  msgstr ""
707
 
708
- #: .././admin/ga_dash_settings.php:1594
709
  msgid "new level of site speed"
710
  msgstr ""
711
 
712
- #: .././admin/ga_dash_settings.php:1600
713
  msgid "Web Analytics"
714
  msgstr ""
715
 
716
- #: .././admin/ga_dash_settings.php:1600
717
  msgid "service with users tracking at IP level."
718
  msgstr ""
719
 
720
- #: .././front/frontend.php:112
721
  msgid "Views vs UniqueViews"
722
  msgstr ""
723
 
724
- #: .././front/frontend.php:168
725
  msgid "Google Analytics Reports"
726
  msgstr ""
727
 
728
- #: .././front/widgets.php:16
729
  msgid "Will display your google analytics stats in a widget"
730
  msgstr ""
731
 
732
- #: .././front/widgets.php:44 .././tools/gapi.php:808
733
  msgid "trend"
734
  msgstr ""
735
 
736
- #: .././front/widgets.php:144
737
  msgid "Period:"
738
  msgstr ""
739
 
740
- #: .././front/widgets.php:144
741
  msgid "Sessions:"
742
  msgstr ""
743
 
744
- #: .././front/widgets.php:150
745
  msgid "generated by"
746
  msgstr ""
747
 
748
- #: .././front/widgets.php:164
749
  msgid "Google Analytics Stats"
750
  msgstr ""
751
 
752
- #: .././front/widgets.php:171
753
  msgid "Title:"
754
  msgstr ""
755
 
756
- #: .././front/widgets.php:178
757
  msgid "Display:"
758
  msgstr ""
759
 
760
- #: .././front/widgets.php:182
761
  msgid "Chart & Totals"
762
  msgstr ""
763
 
764
- #: .././front/widgets.php:183
765
  msgid "Chart"
766
  msgstr ""
767
 
768
- #: .././front/widgets.php:184
769
  msgid "Totals"
770
  msgstr ""
771
 
772
- #: .././front/widgets.php:188
773
- msgid "Anonimize chart&#39;s stats:"
774
  msgstr ""
775
 
776
- #: .././front/widgets.php:195
777
  msgid "Stats for:"
778
  msgstr ""
779
 
780
- #: .././front/widgets.php:205
781
  msgid "Give credits:"
782
  msgstr ""
783
 
784
- #: .././tools/gapi.php:140
785
  msgid "Use this link to get your access code:"
786
  msgstr ""
787
 
788
- #: .././tools/gapi.php:140
789
  msgid "Get Access Code"
790
  msgstr ""
791
 
792
- #: .././tools/gapi.php:145 .././tools/gapi.php:149
793
  msgid "Use the red link to get your access code!"
794
  msgstr ""
795
 
796
- #: .././tools/gapi.php:145
797
  msgid "Access Code:"
798
  msgstr ""
799
 
800
- #: .././tools/gapi.php:157
801
  msgid "Save Access Code"
802
  msgstr ""
803
 
804
- #: .././tools/gapi.php:380
805
  msgid "Organic Searches"
806
  msgstr ""
807
 
808
- #: .././tools/gapi.php:391
809
  msgid "Hour"
810
  msgstr ""
811
 
812
- #: .././tools/gapi.php:394 .././tools/gapi.php:808 .././tools/gapi.php:852
813
  msgid "Date"
814
  msgstr ""
815
 
816
- #: .././tools/gapi.php:500 .././tools/gapi.php:852
817
  msgid "Views"
818
  msgstr ""
819
 
820
- #: .././tools/gapi.php:611
821
  msgid "Countries"
822
  msgstr ""
823
 
824
- #: .././tools/gapi.php:629
825
  msgid "Cities from"
826
  msgstr ""
827
 
828
- #: .././tools/gapi.php:691
829
  msgid "Channels"
830
  msgstr ""
831
 
832
- #: .././tools/gapi.php:754
833
  msgid "Type"
834
  msgstr ""
835
 
836
- #: .././tools/gapi.php:852
837
  msgid "UniqueViews"
838
  msgstr ""
839
 
840
- #: .././tools/gapi.php:899
841
- msgid "Top Searches"
842
- msgstr ""
843
-
844
  #~ msgid ""
845
  #~ " (watch this <a href='http://deconf.com/projects/google-analytics-"
846
  #~ "dashboard-for-wordpress/' target='_blank'>Step by step video tutorial</a>)"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Google Analytics Dashboard for WP\n"
4
+ "POT-Creation-Date: 2015-02-07 11:39+0200\n"
5
+ "PO-Revision-Date: 2015-02-07 11:39+0200\n"
6
  "Last-Translator: Alin Marcu <admin@deconf.com>\n"
7
  "Language-Team: Deconf <admin@deconf.com>\n"
8
  "Language: en\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.7.4\n"
13
  "X-Poedit-KeywordsList: _e;__\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
  "X-Poedit-SearchPath-0: ../.\n"
18
 
19
+ #: .././admin/dashboard_widgets.php:67 .././admin/dashboard_widgets.php:100
20
  msgid "Google Analytics"
21
  msgstr ""
22
 
23
+ #: .././admin/dashboard_widgets.php:71 .././admin/dashboard_widgets.php:104
24
+ #: .././admin/ga_dash_settings.php:105 .././admin/ga_dash_settings.php:216
25
+ #: .././admin/ga_dash_settings.php:964
26
  msgid "General Settings"
27
  msgstr ""
28
 
29
+ #: .././admin/dashboard_widgets.php:75
30
  msgid "Backend Settings"
31
  msgstr ""
32
 
33
+ #: .././admin/dashboard_widgets.php:79
34
  msgid "Frontend Settings"
35
  msgstr ""
36
 
37
+ #: .././admin/dashboard_widgets.php:83
38
  msgid "Tracking Code"
39
  msgstr ""
40
 
41
+ #: .././admin/dashboard_widgets.php:87 .././admin/dashboard_widgets.php:108
42
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
43
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
44
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
45
+ msgid "Errors & Debug"
46
+ msgstr ""
47
+
48
+ #: .././admin/dashboard_widgets.php:152
49
  msgid "Settings"
50
  msgstr ""
51
 
52
+ #: .././admin/dashboard_widgets.php:166 .././front/widgets.php:14
53
  msgid "Google Analytics Dashboard"
54
  msgstr ""
55
 
56
+ #: .././admin/dashboard_widgets.php:183
57
  msgid "This plugin needs an authorization:"
58
  msgstr ""
59
 
60
+ #: .././admin/dashboard_widgets.php:183 .././admin/ga_dash_settings.php:1035
61
+ #: .././admin/ga_dash_settings.php:1360
62
  msgid "Authorize Plugin"
63
  msgstr ""
64
 
65
+ #: .././admin/dashboard_widgets.php:216 .././admin/ga_dash_settings.php:380
66
+ #: .././admin/ga_dash_settings.php:976 .././admin/ga_dash_settings.php:1001
67
+ #: .././admin/ga_dash_settings.php:1315
68
  msgid "View Name:"
69
  msgstr ""
70
 
71
+ #: .././admin/dashboard_widgets.php:221
72
  msgid "Something went wrong while retrieving profiles list."
73
  msgstr ""
74
 
75
+ #: .././admin/dashboard_widgets.php:221
76
  msgid "More details"
77
  msgstr ""
78
 
79
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
80
  msgid "An admin should asign a default Google Analytics Profile."
81
  msgstr ""
82
 
83
+ #: .././admin/dashboard_widgets.php:234 .././admin/dashboard_widgets.php:245
84
  msgid "Select Domain"
85
  msgstr ""
86
 
87
+ #: .././admin/dashboard_widgets.php:250
88
  msgid ""
89
  "Something went wrong while retrieving property data. You need to create and "
90
  "properly configure a Google Analytics account:"
91
  msgstr ""
92
 
93
+ #: .././admin/dashboard_widgets.php:250
94
  msgid "Find out more!"
95
  msgstr ""
96
 
97
+ #: .././admin/dashboard_widgets.php:278
98
  msgid "Real-Time"
99
  msgstr ""
100
 
101
+ #: .././admin/dashboard_widgets.php:279
102
  msgid "Today"
103
  msgstr ""
104
 
105
+ #: .././admin/dashboard_widgets.php:281
106
  msgid "Yesterday"
107
  msgstr ""
108
 
109
+ #: .././admin/dashboard_widgets.php:283 .././front/widgets.php:72
110
+ #: .././front/widgets.php:182
111
  msgid "Last 7 Days"
112
  msgstr ""
113
 
114
+ #: .././admin/dashboard_widgets.php:285 .././front/widgets.php:75
115
+ #: .././front/widgets.php:183
116
  msgid "Last 14 Days"
117
  msgstr ""
118
 
119
+ #: .././admin/dashboard_widgets.php:287 .././front/widgets.php:78
120
+ #: .././front/widgets.php:184
121
  msgid "Last 30 Days"
122
  msgstr ""
123
 
124
+ #: .././admin/dashboard_widgets.php:289
125
  msgid "Last 90 Days"
126
  msgstr ""
127
 
128
+ #: .././admin/dashboard_widgets.php:295 .././admin/dashboard_widgets.php:1037
129
+ #: .././front/widgets.php:40 .././tools/gapi.php:376 .././tools/gapi.php:515
130
+ #: .././tools/gapi.php:554 .././tools/gapi.php:615 .././tools/gapi.php:744
131
+ #: .././tools/gapi.php:825
132
  msgid "Sessions"
133
  msgstr ""
134
 
135
+ #: .././admin/dashboard_widgets.php:296 .././admin/dashboard_widgets.php:1041
136
+ #: .././tools/gapi.php:364
137
  msgid "Users"
138
  msgstr ""
139
 
140
+ #: .././admin/dashboard_widgets.php:298
141
  msgid "Organic"
142
  msgstr ""
143
 
144
+ #: .././admin/dashboard_widgets.php:300 .././admin/dashboard_widgets.php:1045
145
+ #: .././tools/gapi.php:367
146
  msgid "Page Views"
147
  msgstr ""
148
 
149
+ #: .././admin/dashboard_widgets.php:302 .././admin/dashboard_widgets.php:1049
150
+ #: .././tools/gapi.php:370
151
  msgid "Bounce Rate"
152
  msgstr ""
153
 
154
+ #: .././admin/dashboard_widgets.php:304
155
  msgid "Location"
156
  msgstr ""
157
 
158
+ #: .././admin/dashboard_widgets.php:306 .././tools/gapi.php:477
159
  msgid "Pages"
160
  msgstr ""
161
 
162
+ #: .././admin/dashboard_widgets.php:308 .././tools/gapi.php:515
163
  msgid "Referrers"
164
  msgstr ""
165
 
166
+ #: .././admin/dashboard_widgets.php:310 .././tools/gapi.php:554
167
+ #: .././tools/gapi.php:825
168
  msgid "Searches"
169
  msgstr ""
170
 
171
+ #: .././admin/dashboard_widgets.php:312
172
  msgid "Traffic Details"
173
  msgstr ""
174
 
175
+ #: .././admin/dashboard_widgets.php:404 .././admin/dashboard_widgets.php:645
176
  msgid "REFERRAL"
177
  msgstr ""
178
 
179
+ #: .././admin/dashboard_widgets.php:408 .././admin/dashboard_widgets.php:646
180
  msgid "ORGANIC"
181
  msgstr ""
182
 
183
+ #: .././admin/dashboard_widgets.php:412 .././admin/dashboard_widgets.php:532
184
+ #: .././admin/dashboard_widgets.php:647
185
  msgid "SOCIAL"
186
  msgstr ""
187
 
188
+ #: .././admin/dashboard_widgets.php:416 .././admin/dashboard_widgets.php:535
189
+ #: .././admin/dashboard_widgets.php:648
190
  msgid "CAMPAIGN"
191
  msgstr ""
192
 
193
+ #: .././admin/dashboard_widgets.php:420 .././admin/dashboard_widgets.php:538
194
+ #: .././admin/dashboard_widgets.php:651
195
  msgid "DIRECT"
196
  msgstr ""
197
 
198
+ #: .././admin/dashboard_widgets.php:424 .././admin/dashboard_widgets.php:652
199
  msgid "NEW"
200
  msgstr ""
201
 
202
+ #: .././admin/dashboard_widgets.php:526
203
  msgid "REFERRALS"
204
  msgstr ""
205
 
206
+ #: .././admin/dashboard_widgets.php:529
207
  msgid "KEYWORDS"
208
  msgstr ""
209
 
210
+ #: .././admin/dashboard_widgets.php:683 .././admin/dashboard_widgets.php:780
211
+ #: .././admin/dashboard_widgets.php:972 .././admin/dashboard_widgets.php:1083
212
+ #: .././front/frontend.php:88
213
+ msgid "A JavaScript Error is blocking plugin resources!"
214
+ msgstr ""
215
+
216
+ #: .././admin/dashboard_widgets.php:696 .././admin/dashboard_widgets.php:715
217
+ #: .././admin/dashboard_widgets.php:793 .././admin/dashboard_widgets.php:824
218
+ #: .././admin/dashboard_widgets.php:843 .././admin/dashboard_widgets.php:863
219
+ #: .././admin/dashboard_widgets.php:986 .././admin/dashboard_widgets.php:1096
220
+ #: .././admin/dashboard_widgets.php:1115 .././front/frontend.php:100
221
+ #: .././front/frontend.php:119
222
+ msgid "Invalid response, more details in JavaScript Console (F12)."
223
+ msgstr ""
224
+
225
+ #: .././admin/dashboard_widgets.php:701 .././admin/dashboard_widgets.php:720
226
+ #: .././admin/dashboard_widgets.php:798 .././admin/dashboard_widgets.php:810
227
+ #: .././admin/dashboard_widgets.php:829 .././admin/dashboard_widgets.php:848
228
+ #: .././admin/dashboard_widgets.php:868 .././admin/dashboard_widgets.php:991
229
+ #: .././admin/dashboard_widgets.php:994 .././admin/dashboard_widgets.php:1101
230
+ #: .././admin/dashboard_widgets.php:1120 .././front/frontend.php:105
231
+ #: .././front/frontend.php:124 .././front/widgets.php:110
232
  msgid "This report is unavailable"
233
  msgstr ""
234
 
235
+ #: .././admin/dashboard_widgets.php:880
236
  msgid "Traffic Mediums"
237
  msgstr ""
238
 
239
+ #: .././admin/dashboard_widgets.php:896
240
  msgid "Visitor Type"
241
  msgstr ""
242
 
243
+ #: .././admin/dashboard_widgets.php:912
244
  msgid "Social Networks"
245
  msgstr ""
246
 
247
+ #: .././admin/dashboard_widgets.php:928
248
  msgid "Search Engines"
249
  msgstr ""
250
 
251
+ #: .././admin/dashboard_widgets.php:1053
252
  msgid "Organic Search"
253
  msgstr ""
254
 
255
+ #: .././admin/dashboard_widgets.php:1057
256
  msgid "Pages/Session"
257
  msgstr ""
258
 
259
+ #: .././admin/ga_dash_settings.php:83 .././admin/ga_dash_settings.php:194
260
+ #: .././admin/ga_dash_settings.php:327 .././admin/ga_dash_settings.php:855
261
+ #: .././admin/ga_dash_settings.php:1157
262
  msgid "Settings saved."
263
  msgstr ""
264
 
265
+ #: .././admin/ga_dash_settings.php:85 .././admin/ga_dash_settings.php:196
266
+ #: .././admin/ga_dash_settings.php:329 .././admin/ga_dash_settings.php:841
267
+ #: .././admin/ga_dash_settings.php:851 .././admin/ga_dash_settings.php:857
268
+ #: .././admin/ga_dash_settings.php:869 .././admin/ga_dash_settings.php:1118
269
+ #: .././admin/ga_dash_settings.php:1143 .././admin/ga_dash_settings.php:1153
270
+ #: .././admin/ga_dash_settings.php:1159 .././admin/ga_dash_settings.php:1171
271
  msgid "Cheating Huh?"
272
  msgstr ""
273
 
274
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
275
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
276
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
277
+ msgid "Something went wrong, check"
278
  msgstr ""
279
 
280
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
281
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
282
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
283
+ msgid "or"
 
 
 
 
284
  msgstr ""
285
 
286
+ #: .././admin/ga_dash_settings.php:89 .././admin/ga_dash_settings.php:200
287
+ #: .././admin/ga_dash_settings.php:333 .././admin/ga_dash_settings.php:683
288
+ #: .././admin/ga_dash_settings.php:882 .././admin/ga_dash_settings.php:1184
289
+ msgid "auhorize the plugin"
290
  msgstr ""
291
 
292
+ #: .././admin/ga_dash_settings.php:95
293
  msgid "Google Analytics Frontend Settings"
294
  msgstr ""
295
 
296
+ #: .././admin/ga_dash_settings.php:108 .././admin/ga_dash_settings.php:219
297
  msgid "Show stats to:"
298
  msgstr ""
299
 
300
+ #: .././admin/ga_dash_settings.php:152
301
  msgid " show page sessions and users in frontend (after each article)"
302
  msgstr ""
303
 
304
+ #: .././admin/ga_dash_settings.php:168
305
  msgid " show page searches (after each article)"
306
  msgstr ""
307
 
308
+ #: .././admin/ga_dash_settings.php:177 .././admin/ga_dash_settings.php:305
309
+ #: .././admin/ga_dash_settings.php:666 .././admin/ga_dash_settings.php:1025
310
+ #: .././admin/ga_dash_settings.php:1351
311
  msgid "Save Changes"
312
  msgstr ""
313
 
314
+ #: .././admin/ga_dash_settings.php:206
315
  msgid "Google Analytics Dashboard Settings"
316
  msgstr ""
317
 
318
+ #: .././admin/ga_dash_settings.php:264
319
  msgid "disable Switch Profile/View functionality"
320
  msgstr ""
321
 
322
+ #: .././admin/ga_dash_settings.php:268
323
  msgid "Real-Time Settings"
324
  msgstr ""
325
 
326
+ #: .././admin/ga_dash_settings.php:271
327
  msgid "Maximum number of pages to display on real-time tab:"
328
  msgstr ""
329
 
330
+ #: .././admin/ga_dash_settings.php:276 .././admin/ga_dash_settings.php:292
331
+ msgid "find out more"
332
  msgstr ""
333
 
334
+ #: .././admin/ga_dash_settings.php:278 .././admin/ga_dash_settings.php:295
335
  msgid "about this feature"
336
  msgstr ""
337
 
338
+ #: .././admin/ga_dash_settings.php:283
339
+ msgid "Location Settings"
340
  msgstr ""
341
 
342
+ #: .././admin/ga_dash_settings.php:287
343
+ msgid "Target Geo Map to country:"
344
  msgstr ""
345
 
346
+ #: .././admin/ga_dash_settings.php:336
347
+ msgid "The tracking component is disabled. You should set"
348
  msgstr ""
349
 
350
+ #: .././admin/ga_dash_settings.php:336
351
+ msgid "Tracking Options"
352
  msgstr ""
353
 
354
+ #: .././admin/ga_dash_settings.php:336
355
+ msgid "to"
356
  msgstr ""
357
 
358
+ #: .././admin/ga_dash_settings.php:336 .././admin/ga_dash_settings.php:372
359
+ msgid "Enabled"
360
+ msgstr ""
361
+
362
+ #: .././admin/ga_dash_settings.php:342
363
+ msgid "Google Analytics Tracking Code"
364
  msgstr ""
365
 
366
+ #: .././admin/ga_dash_settings.php:351
367
+ msgid "Basic Settings"
368
  msgstr ""
369
 
370
+ #: .././admin/ga_dash_settings.php:352 .././admin/ga_dash_settings.php:431
371
+ msgid "Events Tracking"
372
  msgstr ""
373
 
374
+ #: .././admin/ga_dash_settings.php:353 .././admin/ga_dash_settings.php:495
375
+ msgid "Custom Definitions"
376
  msgstr ""
377
 
378
+ #: .././admin/ga_dash_settings.php:354 .././admin/ga_dash_settings.php:623
379
+ #: .././admin/ga_dash_settings.php:1328
380
+ msgid "Exclude Tracking"
381
  msgstr ""
382
 
383
+ #: .././admin/ga_dash_settings.php:355
384
+ msgid "Advanced Settings"
385
  msgstr ""
386
 
387
+ #: .././admin/ga_dash_settings.php:363
388
  msgid "Tracking Settings"
389
  msgstr ""
390
 
391
+ #: .././admin/ga_dash_settings.php:366
392
  msgid "Tracking Options:"
393
  msgstr ""
394
 
395
+ #: .././admin/ga_dash_settings.php:370
396
  msgid "Disabled"
397
  msgstr ""
398
 
399
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
 
 
 
 
400
  msgid "Tracking ID:"
401
  msgstr ""
402
 
403
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
404
  msgid "Default URL:"
405
  msgstr ""
406
 
407
+ #: .././admin/ga_dash_settings.php:380 .././admin/ga_dash_settings.php:1001
408
  msgid "Time Zone:"
409
  msgstr ""
410
 
411
+ #: .././admin/ga_dash_settings.php:385
412
  msgid "Basic Tracking"
413
  msgstr ""
414
 
415
+ #: .././admin/ga_dash_settings.php:388
416
  msgid "Tracking Type:"
417
  msgstr ""
418
 
419
+ #: .././admin/ga_dash_settings.php:392
420
  msgid "Classic Analytics"
421
  msgstr ""
422
 
423
+ #: .././admin/ga_dash_settings.php:394
424
  msgid "Universal Analytics"
425
  msgstr ""
426
 
427
+ #: .././admin/ga_dash_settings.php:408
428
  msgid " anonymize IPs while tracking"
429
  msgstr ""
430
 
431
+ #: .././admin/ga_dash_settings.php:423
432
  msgid " enable remarketing, demographics and interests reports"
433
  msgstr ""
434
 
435
+ #: .././admin/ga_dash_settings.php:445
 
 
 
 
436
  msgid " track downloads, mailto and outbound links"
437
  msgstr ""
438
 
439
+ #: .././admin/ga_dash_settings.php:449
440
  msgid "Downloads Regex:"
441
  msgstr ""
442
 
443
+ #: .././admin/ga_dash_settings.php:466
444
  msgid " track affiliate links matching this regex"
445
  msgstr ""
446
 
447
+ #: .././admin/ga_dash_settings.php:470
448
  msgid "Affiliates Regex:"
449
  msgstr ""
450
 
451
+ #: .././admin/ga_dash_settings.php:487
452
  msgid " track fragment identifiers, hashmarks (#) in URI links"
453
  msgstr ""
454
 
455
+ #: .././admin/ga_dash_settings.php:498
 
 
 
 
456
  msgid "Authors:"
457
  msgstr ""
458
 
459
+ #: .././admin/ga_dash_settings.php:508
460
  msgid "Publication Year:"
461
  msgstr ""
462
 
463
+ #: .././admin/ga_dash_settings.php:518
464
  msgid "Categories:"
465
  msgstr ""
466
 
467
+ #: .././admin/ga_dash_settings.php:528
468
  msgid "User Type:"
469
  msgstr ""
470
 
471
+ #: .././admin/ga_dash_settings.php:542
472
  msgid "Advanced Tracking"
473
  msgstr ""
474
 
475
+ #: .././admin/ga_dash_settings.php:545
476
  msgid "Page Speed SR:"
477
  msgstr ""
478
 
479
+ #: .././admin/ga_dash_settings.php:563
480
  msgid " exclude events from bounce-rate calculation"
481
  msgstr ""
482
 
483
+ #: .././admin/ga_dash_settings.php:578
484
  msgid " enable enhanced link attribution"
485
  msgstr ""
486
 
487
+ #: .././admin/ga_dash_settings.php:592
488
  msgid " enable AdSense account linking"
489
  msgstr ""
490
 
491
+ #: .././admin/ga_dash_settings.php:608
492
  msgid " enable cross domain tracking"
493
  msgstr ""
494
 
495
+ #: .././admin/ga_dash_settings.php:612
496
  msgid "Cross Domains:"
497
  msgstr ""
498
 
499
+ #: .././admin/ga_dash_settings.php:626
500
+ msgid "Exclude tracking for:"
501
  msgstr ""
502
 
503
+ #: .././admin/ga_dash_settings.php:687
504
+ msgid "Google Analytics Errors & Debugging"
505
+ msgstr ""
506
+
507
+ #: .././admin/ga_dash_settings.php:697
508
+ msgid "Errors & Details"
509
+ msgstr ""
510
+
511
+ #: .././admin/ga_dash_settings.php:698
512
+ msgid "Plugin Settings"
513
+ msgstr ""
514
+
515
+ #: .././admin/ga_dash_settings.php:706
516
+ msgid "For errors and/or other issues please check"
517
+ msgstr ""
518
+
519
+ #: .././admin/ga_dash_settings.php:706
520
+ msgid "the plugin documentation page"
521
+ msgstr ""
522
+
523
+ #: .././admin/ga_dash_settings.php:706
524
+ msgid "and related tutorials"
525
+ msgstr ""
526
+
527
+ #: .././admin/ga_dash_settings.php:710
528
+ msgid "Last Error detected"
529
  msgstr ""
530
 
531
+ #: .././admin/ga_dash_settings.php:715 .././admin/ga_dash_settings.php:728
532
+ msgid "None"
533
+ msgstr ""
534
+
535
+ #: .././admin/ga_dash_settings.php:722
536
+ msgid "Error Details"
537
+ msgstr ""
538
+
539
+ #: .././admin/ga_dash_settings.php:740
540
+ msgid "Plugin Configuration"
541
+ msgstr ""
542
+
543
+ #: .././admin/ga_dash_settings.php:788 .././admin/ga_dash_settings.php:1072
544
  msgid ""
545
  "Loading the required libraries. If this results in a blank screen or a fatal "
546
  "error, try this solution:"
547
  msgstr ""
548
 
549
+ #: .././admin/ga_dash_settings.php:800 .././admin/ga_dash_settings.php:1084
550
  msgid "Plugin authorization succeeded."
551
  msgstr ""
552
 
553
+ #: .././admin/ga_dash_settings.php:816 .././admin/ga_dash_settings.php:1109
554
  msgid ""
555
  "The access code is <strong>NOT</strong> your <strong>Tracking ID</strong> "
556
  "(UA-XXXXX-X). Try again, and use the red link to get your access code"
557
  msgstr ""
558
 
559
+ #: .././admin/ga_dash_settings.php:839 .././admin/ga_dash_settings.php:1141
560
  msgid "Cleared Cache."
561
  msgstr ""
562
 
563
+ #: .././admin/ga_dash_settings.php:848 .././admin/ga_dash_settings.php:1150
564
  msgid "Token Reseted and Revoked."
565
  msgstr ""
566
 
567
+ #: .././admin/ga_dash_settings.php:862 .././admin/ga_dash_settings.php:1164
 
 
 
 
568
  msgid "All other domains/properties were removed."
569
  msgstr ""
570
 
571
+ #: .././admin/ga_dash_settings.php:874 .././admin/ga_dash_settings.php:1176
 
 
 
 
 
572
  msgid "Google Analytics Settings"
573
  msgstr ""
574
 
575
+ #: .././admin/ga_dash_settings.php:887 .././admin/ga_dash_settings.php:1189
 
 
 
 
 
 
576
  msgid "Use the red link (see below) to generate and get your access code!"
577
  msgstr ""
578
 
579
+ #: .././admin/ga_dash_settings.php:898 .././admin/ga_dash_settings.php:1224
580
  msgid "Plugin Authorization"
581
  msgstr ""
582
 
583
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
584
  msgid "You should watch the"
585
  msgstr ""
586
 
587
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
588
  msgid "video"
589
  msgstr ""
590
 
591
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
592
  msgid "and read this"
593
  msgstr ""
594
 
595
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
596
  msgid "tutorial"
597
  msgstr ""
598
 
599
+ #: .././admin/ga_dash_settings.php:902 .././admin/ga_dash_settings.php:1228
600
  msgid ""
601
  "before proceeding to authorization. This plugin requires a properly "
602
  "configured Google Analytics account"
603
  msgstr ""
604
 
605
+ #: .././admin/ga_dash_settings.php:914 .././admin/ga_dash_settings.php:1239
606
  msgid " use your own API Project credentials"
607
  msgstr ""
608
 
609
+ #: .././admin/ga_dash_settings.php:921 .././admin/ga_dash_settings.php:1246
610
  msgid "API Key:"
611
  msgstr ""
612
 
613
+ #: .././admin/ga_dash_settings.php:928 .././admin/ga_dash_settings.php:1254
614
  msgid "Client ID:"
615
  msgstr ""
616
 
617
+ #: .././admin/ga_dash_settings.php:936 .././admin/ga_dash_settings.php:1263
618
  msgid "Client Secret:"
619
  msgstr ""
620
 
621
+ #: .././admin/ga_dash_settings.php:954 .././admin/ga_dash_settings.php:1282
622
  msgid "Clear Authorization"
623
  msgstr ""
624
 
625
+ #: .././admin/ga_dash_settings.php:958 .././admin/ga_dash_settings.php:1039
626
+ #: .././admin/ga_dash_settings.php:1285 .././admin/ga_dash_settings.php:1363
627
  msgid "Clear Cache"
628
  msgstr ""
629
 
630
+ #: .././admin/ga_dash_settings.php:967
631
  msgid "Select Domain:"
632
  msgstr ""
633
 
634
+ #: .././admin/ga_dash_settings.php:980 .././admin/ga_dash_settings.php:1319
635
  msgid "Property not found"
636
  msgstr ""
637
 
638
+ #: .././admin/ga_dash_settings.php:985
639
  msgid "and/or hide all other domains"
640
  msgstr ""
641
 
642
+ #: .././admin/ga_dash_settings.php:988
643
  msgid "Hide Now"
644
  msgstr ""
645
 
646
+ #: .././admin/ga_dash_settings.php:1007
647
  msgid "Theme Color:"
648
  msgstr ""
649
 
650
+ #: .././admin/ga_dash_settings.php:1017
651
  msgid "A new frontend widget is available! To enable it, go to"
652
  msgstr ""
653
 
654
+ #: .././admin/ga_dash_settings.php:1017
655
  msgid "Appearance -> Widgets"
656
  msgstr ""
657
 
658
+ #: .././admin/ga_dash_settings.php:1017
659
  msgid "and look for Google Analytics Dashboard."
660
  msgstr ""
661
 
662
+ #: .././admin/ga_dash_settings.php:1115
 
 
 
 
 
663
  msgid "Properties refreshed."
664
  msgstr ""
665
 
666
+ #: .././admin/ga_dash_settings.php:1201
667
  msgid "Network Setup"
668
  msgstr ""
669
 
670
+ #: .././admin/ga_dash_settings.php:1216
671
  msgid " use a single Google Analytics account for the entire network"
672
  msgstr ""
673
 
674
+ #: .././admin/ga_dash_settings.php:1288
675
  msgid "Refresh Properties"
676
  msgstr ""
677
 
678
+ #: .././admin/ga_dash_settings.php:1294
679
  msgid "Properties/Views Settings"
680
  msgstr ""
681
 
682
+ #: .././admin/ga_dash_settings.php:1342
683
  msgid " exclude Super Admin tracking for the entire network"
684
  msgstr ""
685
 
686
+ #: .././admin/ga_dash_settings.php:1394
687
  msgid "Setup Tutorial & Demo"
688
  msgstr ""
689
 
690
+ #: .././admin/ga_dash_settings.php:1406
691
  msgid "Support & Reviews"
692
  msgstr ""
693
 
694
+ #: .././admin/ga_dash_settings.php:1414
695
  msgid "Plugin documentation and support on"
696
  msgstr ""
697
 
698
+ #: .././admin/ga_dash_settings.php:1421
699
  msgid "Your feedback and review are both important,"
700
  msgstr ""
701
 
702
+ #: .././admin/ga_dash_settings.php:1421
703
  msgid "rate this plugin"
704
  msgstr ""
705
 
706
+ #: .././admin/ga_dash_settings.php:1426
707
  msgid "Further Reading"
708
  msgstr ""
709
 
710
+ #: .././admin/ga_dash_settings.php:1434
711
  msgid "Improve search rankings"
712
  msgstr ""
713
 
714
+ #: .././admin/ga_dash_settings.php:1434
715
  msgid "by moving your website to HTTPS/SSL."
716
  msgstr ""
717
 
718
+ #: .././admin/ga_dash_settings.php:1441
719
  msgid "Other"
720
  msgstr ""
721
 
722
+ #: .././admin/ga_dash_settings.php:1441
723
  msgid "WordPress Plugins"
724
  msgstr ""
725
 
726
+ #: .././admin/ga_dash_settings.php:1441
727
  msgid "written by the same author"
728
  msgstr ""
729
 
730
+ #: .././admin/ga_dash_settings.php:1446
731
  msgid "Other Services"
732
  msgstr ""
733
 
734
+ #: .././admin/ga_dash_settings.php:1453
735
  msgid "Speed up your website and plug into a whole"
736
  msgstr ""
737
 
738
+ #: .././admin/ga_dash_settings.php:1453
739
  msgid "new level of site speed"
740
  msgstr ""
741
 
742
+ #: .././admin/ga_dash_settings.php:1460
743
  msgid "Web Analytics"
744
  msgstr ""
745
 
746
+ #: .././admin/ga_dash_settings.php:1460
747
  msgid "service with users tracking at IP level."
748
  msgstr ""
749
 
750
+ #: .././front/frontend.php:134
751
  msgid "Views vs UniqueViews"
752
  msgstr ""
753
 
754
+ #: .././front/frontend.php:184
755
  msgid "Google Analytics Reports"
756
  msgstr ""
757
 
758
+ #: .././front/widgets.php:15
759
  msgid "Will display your google analytics stats in a widget"
760
  msgstr ""
761
 
762
+ #: .././front/widgets.php:40 .././tools/gapi.php:744
763
  msgid "trend"
764
  msgstr ""
765
 
766
+ #: .././front/widgets.php:133
767
  msgid "Period:"
768
  msgstr ""
769
 
770
+ #: .././front/widgets.php:133
771
  msgid "Sessions:"
772
  msgstr ""
773
 
774
+ #: .././front/widgets.php:137
775
  msgid "generated by"
776
  msgstr ""
777
 
778
+ #: .././front/widgets.php:147
779
  msgid "Google Analytics Stats"
780
  msgstr ""
781
 
782
+ #: .././front/widgets.php:154
783
  msgid "Title:"
784
  msgstr ""
785
 
786
+ #: .././front/widgets.php:161
787
  msgid "Display:"
788
  msgstr ""
789
 
790
+ #: .././front/widgets.php:165
791
  msgid "Chart & Totals"
792
  msgstr ""
793
 
794
+ #: .././front/widgets.php:166
795
  msgid "Chart"
796
  msgstr ""
797
 
798
+ #: .././front/widgets.php:167
799
  msgid "Totals"
800
  msgstr ""
801
 
802
+ #: .././front/widgets.php:171
803
+ msgid "Anonymize stats:"
804
  msgstr ""
805
 
806
+ #: .././front/widgets.php:178
807
  msgid "Stats for:"
808
  msgstr ""
809
 
810
+ #: .././front/widgets.php:188
811
  msgid "Give credits:"
812
  msgstr ""
813
 
814
+ #: .././tools/gapi.php:129
815
  msgid "Use this link to get your access code:"
816
  msgstr ""
817
 
818
+ #: .././tools/gapi.php:129
819
  msgid "Get Access Code"
820
  msgstr ""
821
 
822
+ #: .././tools/gapi.php:134 .././tools/gapi.php:138
823
  msgid "Use the red link to get your access code!"
824
  msgstr ""
825
 
826
+ #: .././tools/gapi.php:134
827
  msgid "Access Code:"
828
  msgstr ""
829
 
830
+ #: .././tools/gapi.php:146
831
  msgid "Save Access Code"
832
  msgstr ""
833
 
834
+ #: .././tools/gapi.php:373
835
  msgid "Organic Searches"
836
  msgstr ""
837
 
838
+ #: .././tools/gapi.php:381
839
  msgid "Hour"
840
  msgstr ""
841
 
842
+ #: .././tools/gapi.php:384 .././tools/gapi.php:744 .././tools/gapi.php:783
843
  msgid "Date"
844
  msgstr ""
845
 
846
+ #: .././tools/gapi.php:477 .././tools/gapi.php:783
847
  msgid "Views"
848
  msgstr ""
849
 
850
+ #: .././tools/gapi.php:576
851
  msgid "Countries"
852
  msgstr ""
853
 
854
+ #: .././tools/gapi.php:590
855
  msgid "Cities from"
856
  msgstr ""
857
 
858
+ #: .././tools/gapi.php:644
859
  msgid "Channels"
860
  msgstr ""
861
 
862
+ #: .././tools/gapi.php:698
863
  msgid "Type"
864
  msgstr ""
865
 
866
+ #: .././tools/gapi.php:783
867
  msgid "UniqueViews"
868
  msgstr ""
869
 
 
 
 
 
870
  #~ msgid ""
871
  #~ " (watch this <a href='http://deconf.com/projects/google-analytics-"
872
  #~ "dashboard-for-wordpress/' target='_blank'>Step by step video tutorial</a>)"
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 widget,tracking,realtime,wpmu,multisite
5
  Requires at least: 2.8
6
  Tested up to: 4.1
7
- Stable tag: 4.4.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -126,6 +126,19 @@ This plugin it's released under the GPLv2, you can use it free of charge on your
126
 
127
  == Changelog ==
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  = 4.4.3 =
130
  - Enhancement: further optimization on queries
131
  - Enhancement: less error prone while running JavaScript
4
  Tags: google,analytics,google analytics,dashboard,analytics dashboard,google analytics dashboard,google analytics widget,tracking,realtime,wpmu,multisite
5
  Requires at least: 2.8
6
  Tested up to: 4.1
7
+ Stable tag: 4.4.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
126
 
127
  == Changelog ==
128
 
129
+ = 4.4.4 =
130
+ - Bug Fix: end tag missing on error message
131
+ - Bug Fix: additional checks before making a View list request
132
+ - Bug Fix: avoid deleting errors while clearing the cache
133
+ - Bug Fix: PHP notices fix for some requests
134
+ - Bug Fix: PHP notices fix when calling ob_clean on an empty buffer
135
+ - Bug Fix: frontend stats not responsive
136
+ - Enhancement: handle some additional API errors
137
+ - Enhancement: set totals to zero when anonymize stats is enabled
138
+ - Enhancement: auto-cleanup removed; all transients have static identifiers now
139
+ - Enhancement: dump error details to JavaScript Console and throw an alert on invalid responses
140
+ - Enhancement: Italian translation, updated by [Leo](https://www.facebook.com/leo.thestrategist)
141
+
142
  = 4.4.3 =
143
  - Enhancement: further optimization on queries
144
  - Enhancement: less error prone while running JavaScript
tools/autoload.php CHANGED
@@ -1,33 +1,33 @@
1
- <?php
2
- /*
3
- * Copyright 2014 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- function google_api_php_client_autoload_gadwp($className) {
19
- $classPath = explode('_', $className);
20
- if ($classPath[0] != 'Google') {
21
- return;
22
- }
23
- if (count($classPath) > 3) {
24
- // Maximum class file path depth in this project is 3.
25
- $classPath = array_slice($classPath, 0, 3);
26
- }
27
- $filePath = dirname(__FILE__) . '/src/' . implode('/', $classPath) . '.php';
28
- if (file_exists($filePath)) {
29
- require_once($filePath);
30
- }
31
- }
32
-
33
  spl_autoload_register('google_api_php_client_autoload_gadwp');
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2014 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ function google_api_php_client_autoload_gadwp($className)
19
+ {
20
+ $classPath = explode('_', $className);
21
+ if ($classPath[0] != 'Google') {
22
+ return;
23
+ }
24
+ if (count($classPath) > 3) {
25
+ // Maximum class file path depth in this project is 3.
26
+ $classPath = array_slice($classPath, 0, 3);
27
+ }
28
+ $filePath = dirname(__FILE__) . '/src/' . implode('/', $classPath) . '.php';
29
+ if (file_exists($filePath)) {
30
+ require_once ($filePath);
31
+ }
32
+ }
33
  spl_autoload_register('google_api_php_client_autoload_gadwp');
tools/gapi.php CHANGED
@@ -7,132 +7,119 @@
7
  */
8
  if (! class_exists('GADASH_GAPI')) {
9
 
10
- final class GADASH_GAPI
 
 
 
 
 
 
 
 
11
  {
12
-
13
- public $client, $service;
14
-
15
- public $country_codes;
16
-
17
- public $timeshift;
18
-
19
- private $error_timeout;
20
-
21
- private $managequota;
22
-
23
- function __construct()
24
- {
25
- global $GADASH_Config;
26
-
27
- include_once ($GADASH_Config->plugin_path . '/tools/autoload.php');;
28
-
29
- $config = new Google_Config();
30
- $config->setCacheClass('Google_Cache_Null');
31
- if (function_exists('curl_version')){
32
- $curlversion = curl_version();
33
-
34
- if (isset($curlversion['version']) AND version_compare($curlversion['version'], '7.10.8') >= 0 AND defined('GADWP_IP_VERSION') AND GADWP_IP_VERSION){
35
- $config->setClassConfig('Google_IO_Curl', array('options' => array(CURLOPT_IPRESOLVE => GADWP_IP_VERSION))); // Force CURL_IPRESOLVE_V4 OR CURL_IPRESOLVE_V6
36
- }
37
- }
38
-
39
- $this->client = new Google_Client($config);
40
- $this->client->setScopes('https://www.googleapis.com/auth/analytics.readonly');
41
- $this->client->setAccessType('offline');
42
- $this->client->setApplicationName('Google Analytics Dashboard');
43
- $this->client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
44
-
45
- $this->set_error_timeout();
46
- $this->managequota = 'u' . get_current_user_id() . 's' . get_current_blog_id();
47
-
48
- if ($GADASH_Config->options['ga_dash_userapi']) {
49
- $this->client->setClientId($GADASH_Config->options['ga_dash_clientid']);
50
- $this->client->setClientSecret($GADASH_Config->options['ga_dash_clientsecret']);
51
- $this->client->setDeveloperKey($GADASH_Config->options['ga_dash_apikey']);
52
- } else {
53
- $this->client->setClientId('65556128781.apps.googleusercontent.com');
54
- $this->client->setClientSecret('Kc7888wgbc_JbeCpbFjnYpwE');
55
- $this->client->setDeveloperKey('AIzaSyBG7LlUoHc29ZeC_dsShVaBEX15SfRl_WY');
56
- }
57
-
58
- $this->service = new Google_Service_Analytics($this->client);
59
-
60
- if ($GADASH_Config->options['ga_dash_token']) {
61
- $token = $GADASH_Config->options['ga_dash_token'];
62
- $token = $this->ga_dash_refresh_token();
63
- if ($token) {
64
- $this->client->setAccessToken($token);
65
- }
66
- }
67
  }
68
-
69
- private function set_error_timeout()
70
- {
71
- $midnight = strtotime("tomorrow 00:00:00"); // UTC midnight
72
- $midnight = $midnight + 8 * 3600; // UTC 8 AM
73
- $this->error_timeout = $midnight - time();
74
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  }
 
 
76
 
77
- private function prepare_json($value)
78
- {
79
- return esc_html(str_replace('\\', '&#92;', stripslashes($value)));
80
- }
 
 
 
81
 
82
- /**
83
- * Handles errors returned by GAPI
84
- *
85
- * @return int|boolean
86
- */
87
- function gapi_errors_handler()
88
- {
89
- $errors = get_transient('ga_dash_gapi_errors');
90
-
91
- if (isset($errors[1][0]['reason'])) {
92
-
93
- if ($errors[1][0]['reason'] == 'dailyLimitExceeded') {
94
- return TRUE;
95
- }
96
-
97
- if ($errors[1][0]['reason'] == 'invalidCredentials' || $errors[1][0]['reason'] == 'authError' || $errors[1][0]['reason'] == 'insufficientPermissions') {
98
- $this->ga_dash_reset_token(false);
99
- return TRUE;
100
- }
101
-
102
- if ($errors[1][0]['reason'] == 'invalidParameter' or $errors[1][0]['reason'] == 'badRequest') {
103
- return TRUE;
104
- }
105
- }
106
-
107
- return FALSE;
108
- }
109
 
110
- /**
111
- * Calculates proper timeouts for each GAPI query
112
- *
113
- * @param
114
- * $daily
115
- * @return number
116
- */
117
- function get_timeouts($daily)
118
- {
119
- $local_time = time() + $this->timeshift;
120
- if ($daily) {
121
- $nextday = explode('-', date('n-j-Y', strtotime(' +1 day', $local_time)));
122
- $midnight = mktime(0, 0, 0, $nextday[0], $nextday[1], $nextday[2]);
123
- return $midnight - $local_time;
124
- } else {
125
- $nexthour = explode('-', date('H-n-j-Y', strtotime(' +1 hour', $local_time)));
126
- $newhour = mktime($nexthour[0], 0, 0, $nexthour[1], $nexthour[2], $nexthour[3]);
127
- return $newhour - $local_time;
128
- }
129
- }
 
 
 
130
 
131
- function token_request()
132
- {
133
- $authUrl = $this->client->createAuthUrl();
134
-
135
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  <form name="input"
137
  action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" method="post">
138
 
@@ -161,813 +148,741 @@ if (! class_exists('GADASH_GAPI')) {
161
  </table>
162
  </form>
163
  <?php
164
- }
165
 
166
- /**
167
- * Retrives all Google Analytics Views with details
168
- *
169
- * @return array|string
170
- */
171
- function refresh_profiles()
172
- {
173
- try {
174
- $profiles = $this->service->management_profiles->listManagementProfiles('~all', '~all');
175
- $items = $profiles->getItems();
176
- if (count($items) != 0) {
177
- $ga_dash_profile_list = array();
178
- foreach ($items as $profile) {
179
- $timetz = new DateTimeZone($profile->getTimezone());
180
- $localtime = new DateTime('now', $timetz);
181
- $timeshift = strtotime($localtime->format('Y-m-d H:i:s')) - time();
182
- $ga_dash_profile_list[] = array(
183
- $profile->getName(),
184
- $profile->getId(),
185
- $profile->getwebPropertyId(),
186
- $profile->getwebsiteUrl(),
187
- $timeshift,
188
- $profile->getTimezone()
189
- );
190
- }
191
- set_transient('gadash_lasterror', 'None');
192
- return $ga_dash_profile_list;
193
- } else {
194
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': No properties were found in this account!', $this->error_timeout);
195
- return '';
196
- }
197
- } catch (Google_IO_Exception $e) {
198
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $this->error_timeout);
199
- return '';
200
- } catch (Google_Service_Exception $e) {
201
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html("(" . $e->getCode() . ") " . $e->getMessage()), $this->error_timeout);
202
- set_transient('ga_dash_gapi_errors', array($e->getCode(),(array)$e->getErrors()), $this->error_timeout);
203
- } catch (Exception $e) {
204
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e),$this->error_timeout);
205
- return '';
206
- }
207
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
 
209
- /**
210
- * Handles the token refresh process
211
- *
212
- * @return token|boolean
213
- */
214
- private function ga_dash_refresh_token()
215
- {
216
- global $GADASH_Config;
217
- try {
218
- if (is_multisite() && $GADASH_Config->options['ga_dash_network']) {
219
- $transient = get_site_transient("ga_dash_refresh_token");
220
- } else {
221
- $transient = get_transient("ga_dash_refresh_token");
222
- }
223
- if (empty($transient)) {
224
-
225
- if (! $GADASH_Config->options['ga_dash_refresh_token']) {
226
- $google_token = json_decode($GADASH_Config->options['ga_dash_token']);
227
- $GADASH_Config->options['ga_dash_refresh_token'] = $google_token->refresh_token;
228
- $this->client->refreshToken($google_token->refresh_token);
229
- } else {
230
- $this->client->refreshToken($GADASH_Config->options['ga_dash_refresh_token']);
231
- }
232
-
233
- $token = $this->client->getAccessToken();
234
- $google_token = json_decode($token);
235
- $GADASH_Config->options['ga_dash_token'] = $token;
236
- if (is_multisite() && $GADASH_Config->options['ga_dash_network']) {
237
- set_site_transient("ga_dash_refresh_token", $token, $google_token->expires_in);
238
- $GADASH_Config->set_plugin_options(true);
239
- } else {
240
- set_transient("ga_dash_refresh_token", $token, $google_token->expires_in);
241
- $GADASH_Config->set_plugin_options();
242
- }
243
- return $token;
244
- } else {
245
- return $transient;
246
- }
247
- } catch (Google_IO_Exception $e) {
248
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $this->error_timeout);
249
- return false;
250
- } catch (Google_Service_Exception $e) {
251
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html("(" . $e->getCode() . ") " . $e->getMessage()), $this->error_timeout);
252
- set_transient('ga_dash_gapi_errors', array($e->getCode(),(array)$e->getErrors()), $this->error_timeout);
253
- return $e->getCode();
254
- } catch (Exception $e) {
255
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $this->error_timeout);
256
- return false;
257
- }
258
  }
259
-
260
- /**
261
- * Handles the token reset process
262
- *
263
- * @param
264
- * $all
265
- */
266
- function ga_dash_reset_token($all = true)
267
- {
268
- global $GADASH_Config;
269
- if (is_multisite() && $GADASH_Config->options['ga_dash_network']) {
270
- delete_site_transient('ga_dash_refresh_token');
271
- } else {
272
- delete_transient('ga_dash_refresh_token');
273
- }
274
- $GADASH_Config->options['ga_dash_token'] = "";
275
- $GADASH_Config->options['ga_dash_refresh_token'] = "";
276
-
277
- if ($all) {
278
- $GADASH_Config->options['ga_dash_tableid'] = "";
279
- $GADASH_Config->options['ga_dash_tableid_jail'] = "";
280
- $GADASH_Config->options['ga_dash_profile_list'] = "";
281
- try {
282
- $this->client->revokeToken();
283
- } catch (Exception $e) {
284
- if (is_multisite() && $GADASH_Config->options['ga_dash_network']) {
285
- $GADASH_Config->set_plugin_options(true);
286
- } else {
287
- $GADASH_Config->set_plugin_options();
288
- }
289
- }
290
- }
291
-
292
- if (is_multisite() && $GADASH_Config->options['ga_dash_network']) {
293
- $GADASH_Config->set_plugin_options(true);
294
- } else {
295
- $GADASH_Config->set_plugin_options();
296
- }
297
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
 
299
- /**
300
- * Get and cache Core Reports
301
- *
302
- * @param unknown $projecId
303
- * @param unknown $from
304
- * @param unknown $to
305
- * @param unknown $metrics
306
- * @param unknown $options
307
- * @param unknown $serial
308
- * @return number|Google_Service_Analytics_GaData
309
- */
310
- private function handle_corereports($projectId, $from, $to, $metrics, $options, $serial)
311
- {
312
- try {
313
-
314
- if ($from == "today") {
315
- $timeouts = 0;
316
- } else {
317
- $timeouts = 1;
318
- }
319
-
320
- if (strlen($serial) > 44) {
321
- $serial = substr($serial, 0, 43); // keep a safe length
322
- }
323
-
324
- $transient = get_transient($serial);
325
- if (empty($transient)) {
326
-
327
- if ($this->gapi_errors_handler()) {
328
- return - 23;
329
- }
330
-
331
- $data = $this->service->data_ga->get('ga:' . $projectId, $from, $to, $metrics, $options);
332
- set_transient($serial, $data, $this->get_timeouts($timeouts));
333
- } else {
334
- $data = $transient;
335
- }
336
- } catch (Google_Service_Exception $e) {
337
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html("(" . $e->getCode() . ") " . $e->getMessage()), $this->error_timeout);
338
- set_transient('ga_dash_gapi_errors', array($e->getCode(),(array)$e->getErrors()), $this->error_timeout);
339
- return $e->getCode();
340
- } catch (Exception $e) {
341
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $this->error_timeout);
342
- return $e->getCode();
343
- }
344
-
345
- if (isset($data['rows'])) {
346
- return $data;
347
- } else {
348
- return - 21;
349
- }
350
  }
 
 
 
 
 
 
 
351
 
352
- /**
353
- * Analytics data for backend reports (Admin Widget main report)
354
- *
355
- * @param
356
- * $projectId
357
- * @param
358
- * $from
359
- * @param
360
- * $to
361
- * @param
362
- * $query
363
- * @return string|int
364
- */
365
- function get_mainreport($projectId, $from, $to, $query)
366
- {
367
- switch ($query) {
368
-
369
- case 'users':
370
- $title = __("Users", 'ga-dash');
371
- break;
372
-
373
- case 'pageviews':
374
- $title = __("Page Views", 'ga-dash');
375
- break;
376
-
377
- case 'visitBounceRate':
378
- $title = __("Bounce Rate", 'ga-dash');
379
- break;
380
-
381
- case 'organicSearches':
382
- $title = __("Organic Searches", 'ga-dash');
383
- break;
384
-
385
- default:
386
- $title = __("Sessions", 'ga-dash');
387
- }
388
-
389
- $metrics = 'ga:' . $query;
390
-
391
- if ($from == "today" or $from == "yesterday") {
392
- $dimensions = 'ga:hour';
393
- $dayorhour = __("Hour", 'ga-dash');
394
- } else {
395
- $dimensions = 'ga:date,ga:dayOfWeekName';
396
- $dayorhour = __("Date", 'ga-dash');
397
- }
398
-
399
- $serial = 'gadash_qr2' . str_replace(array(
400
- 'ga:',
401
- ',',
402
- '-'
403
- ), "", $projectId . $from . $metrics);
404
-
405
- $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
406
- 'dimensions' => $dimensions,
407
- 'quotaUser' => $this->managequota . 'p' . $projectId
408
- ), $serial);
409
-
410
- if (is_numeric($data)) {
411
- return $data;
412
- }
413
-
414
- $ga_dash_data = "";
415
-
416
- if ($from == "today" or $from == "yesterday") {
417
- for ($i = 0; $i < $data['totalResults']; $i ++) {
418
- $ga_dash_data .= '["' . (int) $data["rows"][$i][0] . ':00",' . round($data["rows"][$i][1], 2) . '],';
419
- }
420
- } else {
421
- for ($i = 0; $i < $data['totalResults']; $i ++) {
422
- $ga_dash_data .= '["' . esc_html(ucfirst(__($data["rows"][$i][1]))) . ", " . esc_html(substr_replace(substr_replace($data["rows"][$i][0], "-", 4, 0), "-", 7, 0)) . '",' . round($data["rows"][$i][2], 2) . '],';
423
- }
424
- }
425
-
426
- if ($ga_dash_data) {
427
- return '[["' . $dayorhour . '","' . $title . '"],' . rtrim($ga_dash_data, ',') . ']';
428
- } else {
429
- return - 22;
430
- }
431
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
 
433
- /**
434
- * Analytics data for backend reports (bottom stats main report)
435
- *
436
- * @param
437
- * $projectId
438
- * @param
439
- * $from
440
- * @param
441
- * $to
442
- * @return array|int
443
- */
444
- function get_bottomstats($projectId, $from, $to)
445
- {
446
- $metrics = 'ga:sessions,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession';
447
-
448
- $serial = 'gadash_qr3' . $projectId . $from;
449
-
450
- $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
451
- 'dimensions' => NULL,
452
- 'quotaUser' => $this->managequota . 'p' . $projectId
453
- ), $serial);
454
-
455
- if (is_numeric($data)) {
456
- if ($data == - 21) {
457
- return array_fill(0, 6, 0);
458
- } else {
459
- return $data;
460
- }
461
- }
462
-
463
- $ga_dash_data = $data['rows'][0];
464
- array_map('floatval', $ga_dash_data);
465
-
466
- return $ga_dash_data;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
467
  }
 
 
 
 
 
 
 
468
 
469
- /**
470
- * Analytics data for backend reports (contentpages)
471
- *
472
- * @param
473
- * $projectId
474
- * @param
475
- * $from
476
- * @param
477
- * $to
478
- * @return string|int
479
- */
480
- function get_contentpages($projectId, $from, $to)
481
- {
482
- $metrics = 'ga:pageviews';
483
- $dimensions = 'ga:pageTitle';
484
-
485
- $serial = 'gadash_qr4' . $projectId . $from;
 
 
 
 
 
 
 
 
 
 
 
 
 
486
 
487
- $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
488
- 'dimensions' => $dimensions,
489
- 'sort' => '-ga:pageviews',
490
- 'quotaUser' => $this->managequota . 'p' . $projectId
491
- ), $serial);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
492
 
493
- if (is_numeric($data)) {
494
- return $data;
495
- }
496
-
497
- $ga_dash_data = "";
498
- $i = 0;
499
-
500
- while (isset($data['rows'][$i][0])) {
501
- $ga_dash_data .= '["' . $this->prepare_json($data['rows'][$i][0]) . '",' . (int) $data['rows'][$i][1] . '],';
502
- $i ++;
503
- }
504
-
505
- if ($ga_dash_data) {
506
- return '[["' . __("Pages", 'ga-dash') . '","' . __("Views", 'ga-dash') . '"],' . rtrim($ga_dash_data, ',') . ']';
507
- } else {
508
- return - 22;
509
- }
510
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
511
 
512
- /**
513
- * Analytics data for backend reports (referrers)
514
- *
515
- * @param
516
- * $projectId
517
- * @param
518
- * $from
519
- * @param
520
- * $to
521
- * @return string|int
522
- */
523
- function get_referrers($projectId, $from, $to)
524
- {
525
- $metrics = 'ga:sessions';
526
- $dimensions = 'ga:source';
527
-
528
- $serial = 'gadash_qr5' . $projectId . $from;
529
-
530
- $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
531
- 'dimensions' => $dimensions,
532
- 'sort' => '-ga:sessions',
533
- 'filters' => 'ga:medium==referral',
534
- 'quotaUser' => $this->managequota . 'p' . $projectId
535
- ), $serial);
536
-
537
- if (is_numeric($data)) {
538
- return $data;
539
- }
540
-
541
- $ga_dash_data = "";
542
- $i = 0;
543
- while (isset($data['rows'][$i][0])) {
544
- $ga_dash_data .= '["' . $this->prepare_json($data["rows"][$i][0]) . '",' . (int) $data["rows"][$i][1] . '],';
545
- $i ++;
546
- }
547
-
548
- if ($ga_dash_data) {
549
- return '[["' . __("Referrers", 'ga-dash') . '","' . __("Sessions", 'ga-dash') . '"],' . rtrim($ga_dash_data, ',') . ']';
550
- } else {
551
- return - 22;
552
- }
553
  }
 
 
 
 
 
 
 
 
554
 
555
- /**
556
- * Analytics data for backend reports (searches)
557
- *
558
- * @param
559
- * $projectId
560
- * @param
561
- * $from
562
- * @param
563
- * $to
564
- * @return string|int
565
- */
566
- function get_searches($projectId, $from, $to)
567
- {
568
- $metrics = 'ga:sessions';
569
- $dimensions = 'ga:keyword';
570
-
571
- $serial = 'gadash_qr6' . $projectId . $from;
572
-
573
- $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
574
- 'dimensions' => $dimensions,
575
- 'sort' => '-ga:sessions',
576
- 'quotaUser' => $this->managequota . 'p' . $projectId
577
- ), $serial);
578
-
579
- if (is_numeric($data)) {
580
- return $data;
581
- }
582
-
583
- $ga_dash_data = "";
584
- $i = 0;
585
- while (isset($data['rows'][$i][0])) {
586
- if ($data['rows'][$i][0] != "(not set)") {
587
- $ga_dash_data .= '["' . $this->prepare_json($data["rows"][$i][0]) . '",' . (int) $data["rows"][$i][1] . '],';
588
- }
589
- $i ++;
590
- }
591
-
592
- if ($ga_dash_data) {
593
- return '[["' . __("Searches", 'ga-dash') . '","' . __("Sessions", 'ga-dash') . '"],' . rtrim($ga_dash_data, ',') . ']';
594
- } else {
595
- return - 22;
596
- }
597
  }
598
-
599
- /**
600
- * Analytics data for backend reports (location reports)
601
- *
602
- * @param
603
- * $projectId
604
- * @param
605
- * $from
606
- * @param
607
- * $to
608
- * @return string|int
609
- */
610
- function get_locations($projectId, $from, $to)
611
- {
612
- global $GADASH_Config;
613
-
614
- $metrics = 'ga:sessions';
615
- $options = "";
616
-
617
- $title = __("Countries", 'ga-dash');
618
-
619
- $serial = 'gadash_qr7' . $projectId . $from;
620
-
621
- $dimensions = 'ga:country';
622
- $filters = "";
623
-
624
- $options = array(
625
- 'dimensions' => $dimensions,
626
- 'sort' => '-ga:sessions',
627
- 'quotaUser' => $this->managequota . 'p' . $projectId
628
- );
629
-
630
- if ($GADASH_Config->options['ga_target_geomap']) {
631
- $dimensions = 'ga:city, ga:region';
632
- $this->getcountrycodes();
633
- if (isset($this->country_codes[$GADASH_Config->options['ga_target_geomap']])) {
634
- $filters = 'ga:country==' . ($this->country_codes[$GADASH_Config->options['ga_target_geomap']]);
635
- $title = __("Cities from", 'ga-dash') . ' ' . __($this->country_codes[$GADASH_Config->options['ga_target_geomap']]);
636
- $serial = 'gadash_qr7' . $projectId . $from . $GADASH_Config->options['ga_target_geomap'];
637
- $options = array(
638
- 'dimensions' => $dimensions,
639
- 'filters' => $filters,
640
- 'sort' => '-ga:sessions',
641
- 'quotaUser' => $this->managequota . 'p' . $projectId
642
- );
643
- }
644
- }
645
-
646
- $data = $this->handle_corereports($projectId, $from, $to, $metrics, $options, $serial);
647
-
648
- if (is_numeric($data)) {
649
- return $data;
650
- }
651
-
652
- $ga_dash_data = "";
653
- $i = 0;
654
- while (isset($data['rows'][$i][1])) {
655
- if (isset($data['rows'][$i][2])) {
656
- $ga_dash_data .= '["' . $this->prepare_json($data["rows"][$i][0]) . ', ' . $this->prepare_json($data["rows"][$i][1]) . '",' . (int) $data["rows"][$i][2] . '],';
657
- } else {
658
- $ga_dash_data .= '["' . $this->prepare_json($data["rows"][$i][0]) . '",' . (int) $data["rows"][$i][1] . '],';
659
- }
660
- $i ++;
661
- }
662
-
663
- if ($ga_dash_data) {
664
- return '[["' . $title . '", "' . __("Sessions", 'ga-dash') . '"],' . rtrim($ga_dash_data, ',') . ']';
665
- } else {
666
- return - 22;
667
- }
668
  }
 
 
 
 
 
 
 
 
669
 
670
- /**
671
- * Analytics data for backend reports (traffic channels)
672
- *
673
- * @param
674
- * $projectId
675
- * @param
676
- * $from
677
- * @param
678
- * $to
679
- * @return string|int
680
- */
681
- function get_trafficchannels($projectId, $from, $to)
682
- {
683
- $metrics = 'ga:sessions';
684
- $dimensions = 'ga:channelGrouping';
685
-
686
- $serial = 'gadash_qr8' . $projectId . $from;
687
-
688
- $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
689
- 'dimensions' => $dimensions,
690
- 'quotaUser' => $this->managequota . 'p' . $projectId
691
- ), $serial);
692
-
693
- if (is_numeric($data)) {
694
- return $data;
695
- }
696
-
697
- $title = __("Channels", 'ga-dash');
698
- $ga_dash_data = "";
699
-
700
- for ($i = 0; $i < $data['totalResults']; $i ++) {
701
- $shrink = explode(" ", $data["rows"][$i][0]);
702
- $ga_dash_data .= '["' . '<div style=\\"color:black; font-size:1.1em\\">' . esc_html($shrink[0]) . '</div><div style=\\"color:darkblue; font-size:1.2em\\">' . (int) $data["rows"][$i][1] . '</div>","' . '<div style=\\"color:black; font-size:1.1em\\">' . $title . '</div><div style=\\"color:darkblue; font-size:1.2em\\">' . (int) $data['totalsForAllResults']["ga:sessions"] . '</div>"],';
703
- }
704
-
705
- if ($ga_dash_data) {
706
- return '[["' . '<div style=\\"color:black; font-size:1.1em\\">' . $title . '</div><div style=\\"color:darkblue; font-size:1.2em\\">' . (int) $data['totalsForAllResults']["ga:sessions"] . '</div>", ""],' . rtrim($ga_dash_data, ',') . ']';
707
- } else {
708
- return - 22;
709
- }
710
- }
711
 
712
- /**
713
- * Analytics data for backend reports (traffic mediums, type, serach engines, social networks)
714
- *
715
- * @param
716
- * $projectId
717
- * @param
718
- * $from
719
- * @param
720
- * $to
721
- * @param
722
- * $query
723
- * @return string|int
724
- */
725
- function get_trafficdetails($projectId, $from, $to, $query)
726
- {
727
- $metrics = 'ga:sessions';
728
- $dimensions = 'ga:' . $query;
729
-
730
- if ($query == 'source') {
731
- $options = array(
732
- 'dimensions' => $dimensions,
733
- 'filters' => 'ga:medium==organic',
734
- 'quotaUser' => $this->managequota . 'p' . $projectId
735
- );
736
- } else {
737
- $options = array(
738
- 'dimensions' => $dimensions,
739
- 'quotaUser' => $this->managequota . 'p' . $projectId
740
- );
741
- }
742
-
743
- $serial = 'gadash_qr10' . $projectId . $from . $query;
744
-
745
- $data = $this->handle_corereports($projectId, $from, $to, $metrics, $options, $serial);
746
-
747
- if (is_numeric($data)) {
748
- return $data;
749
- }
750
-
751
- $ga_dash_data = "";
752
-
753
- for ($i = 0; $i < $data['totalResults']; $i ++) {
754
- if ($data['rows'][$i][0] != '(not set)') {
755
- $ga_dash_data .= '["' . str_replace("(none)", "direct", esc_html($data['rows'][$i][0])) . '",' . (int) $data["rows"][$i][1] . '],';
756
- }
757
- }
758
-
759
- if ($ga_dash_data) {
760
- return '[["' . __("Type", 'ga-dash') . '", "Sessions"],' . rtrim($ga_dash_data, ',') . ']';
761
- } else {
762
- return - 22;
763
- }
764
  }
 
 
 
 
 
 
 
765
 
766
- /**
767
- * Analytics data for frontend Widget (chart data and totals)
768
- *
769
- * @param
770
- * $projectId
771
- * @param
772
- * $period
773
- * @param
774
- * $anonim
775
- * @return array|int
776
- */
777
- function frontend_widget_stats($projectId, $from, $anonim)
778
- {
779
- $content = '';
780
- $to = 'yesterday';
781
- $metrics = 'ga:sessions';
782
- $dimensions = 'ga:date,ga:dayOfWeekName';
783
-
784
- $serial = 'gadash_qr2' . str_replace(array(
785
- 'ga:',
786
- ',',
787
- '-'
788
- ), "", $projectId . $from . $metrics);
789
-
790
- $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
791
- 'dimensions' => $dimensions,
792
- 'quotaUser' => $this->managequota . 'p' . $projectId
793
- ), $serial);
794
-
795
- if (is_numeric($data)) {
796
- return $data;
797
- }
798
-
799
- $ga_dash_data = "";
800
-
801
- $max_array = array();
802
- foreach ($data['rows'] as $item) {
803
- $max_array[] = $item[2];
804
- }
805
-
806
- $max = max($max_array) ? max($max_array) : 1;
807
-
808
- for ($i = 0; $i < $data['totalResults']; $i ++) {
809
- $ga_dash_data .= '["' . ucfirst(esc_html((__($data["rows"][$i][1])))) . ", " . esc_html(substr_replace(substr_replace($data["rows"][$i][0], "-", 4, 0), "-", 7, 0)) . '",' . ($anonim ? str_replace(",", ".", round($data["rows"][$i][2] * 100 / $max, 2)) : (int) $data["rows"][$i][2]) . '],';
810
- }
811
-
812
- if ($ga_dash_data) {
813
- return array(
814
- '[["' . __("Date", 'ga-dash') . '", "' . __("Sessions", 'ga-dash') . ($anonim ? "' " . __("trend", 'ga-dash') : '') . '"],' . rtrim($ga_dash_data, ",") . "]",
815
- (int) $data['totalsForAllResults']['ga:sessions']
816
- );
817
- } else {
818
- return - 22;
819
- }
820
- }
821
 
822
- /**
823
- * Analytics data for frontend reports (pagviews and unique pageviews per page)
824
- *
825
- * @param
826
- * $projectId
827
- * @param
828
- * $page_url
829
- * @param
830
- * $post_id
831
- * @return string|int
832
- */
833
- function frontend_afterpost_pageviews($projectId, $page_url, $post_id)
834
- {
835
- $from = '30daysAgo';
836
- $to = 'yesterday';
837
- $metrics = 'ga:pageviews,ga:uniquePageviews';
838
- $dimensions = 'ga:date,ga:dayOfWeekName';
839
-
840
- $serial = 'gadash_qr21' . $post_id . 'stats';
841
-
842
- $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
843
- 'dimensions' => $dimensions,
844
- 'filters' => 'ga:pagePath==' . $page_url,
845
- 'quotaUser' => $this->managequota . 'p' . $projectId
846
- ), $serial);
847
-
848
- if (is_numeric($data)) {
849
- return $data;
850
- }
851
-
852
- $ga_dash_data = "";
853
- for ($i = 0; $i < $data['totalResults']; $i ++) {
854
- $ga_dash_data .= '["' . ucfirst(esc_html(__($data['rows'][$i][1]))) . ", " . esc_html(substr_replace(substr_replace($data['rows'][$i][0], "-", 4, 0), "-", 7, 0)) . '",' . round($data['rows'][$i][2], 2) . ',' . round($data['rows'][$i][3], 2) . '],';
855
- }
856
-
857
- if ($ga_dash_data) {
858
- return '[["' . __('Date', "ga-dash") . '", "' . __('Views', "ga-dash") . '", "' . __('UniqueViews', "ga-dash") . '"],' . rtrim($ga_dash_data, ',') . ']';
859
- } else {
860
- return - 22;
861
- }
862
- }
863
 
864
- /**
865
- * Analytics data for frontend reports (searches per page)
866
- *
867
- * @param
868
- * $projectId
869
- * @param
870
- * $page_url
871
- * @param
872
- * $post_id
873
- * @return string|int
874
- */
875
- function frontend_afterpost_searches($projectId, $page_url, $post_id)
876
- {
877
- $from = '30daysAgo';
878
- $to = 'yesterday';
879
- $metrics = 'ga:sessions';
880
- $dimensions = 'ga:keyword';
881
-
882
- $serial = 'gadash_qr22' . $post_id . 'search';
883
-
884
- $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
885
- 'dimensions' => $dimensions,
886
- 'sort' => '-ga:sessions',
887
- 'filters' => 'ga:pagePath==' . $page_url,
888
- 'quotaUser' => $this->managequota . 'p' . $projectId
889
- ), $serial);
890
-
891
- if (is_numeric($data)) {
892
- return $data;
893
- }
894
-
895
- $ga_dash_data = "";
896
- $i = 0;
897
- while (isset($data['rows'][$i][0])) {
898
- if ($data['rows'][$i][0] != "(not set)") {
899
- $ga_dash_data .= '["' . $this->prepare_json($data['rows'][$i][0]) . '",' . (int) $data['rows'][$i][1] . '],';
900
- }
901
- $i ++;
902
- }
903
-
904
- if ($ga_dash_data) {
905
- return '[["' . __('Searches', "ga-dash") . '", "' . __('Sessions', "ga-dash") . '"],' . rtrim($ga_dash_data, ',') . ' ]';
906
- } else {
907
- return - 22;
908
- }
909
  }
 
 
 
 
 
 
 
 
910
 
911
- /**
912
- * Analytics data for backend reports (Real-Time)
913
- *
914
- * @param
915
- * $projectId
916
- * @return string|int
917
- */
918
- function gadash_realtime_data($projectId)
919
- {
920
- $metrics = 'rt:activeUsers';
921
- $dimensions = 'rt:pagePath,rt:source,rt:keyword,rt:trafficType,rt:visitorType,rt:pageTitle';
922
- try {
923
- $serial = "gadash_realtimecache_" . $projectId;
924
- $transient = get_transient($serial);
925
- if (empty($transient)) {
926
-
927
- if ($this->gapi_errors_handler()) {
928
- return - 23;
929
- }
930
-
931
- $data = $this->service->data_realtime->get('ga:' . $projectId, $metrics, array(
932
- 'dimensions' => $dimensions,
933
- 'quotaUser' => $this->managequota . 'p' . $projectId
934
- ));
935
- set_transient($serial, $data, 55);
936
- } else {
937
- $data = $transient;
938
- }
939
- } catch (Google_Service_Exception $e) {
940
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html("(" . $e->getCode() . ") " . $e->getMessage()), $this->error_timeout);
941
- set_transient('ga_dash_gapi_errors', array($e->getCode(),(array)$e->getErrors()), $this->error_timeout);
942
- return $e->getCode();
943
- } catch (Exception $e) {
944
- set_transient('gadash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $this->error_timeout);
945
- return $e->getCode();
946
- }
947
-
948
- if (! isset($data['rows'])) {
949
- return - 21;
950
- }
951
-
952
- $i = 0;
953
-
954
- $ga_dash_data = $data;
955
-
956
- while (isset($data->rows[$i])) {
957
- $ga_dash_data->rows[$i] = array_map('esc_html', $data->rows[$i]);
958
- $i ++;
959
- }
960
-
961
- return print_r(json_encode($ga_dash_data), true);
962
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
963
 
964
- public function getcountrycodes()
965
- {
966
- include_once 'iso3166.php';
967
- }
968
  }
 
969
  }
970
-
971
  if (! isset($GLOBALS['GADASH_GAPI'])) {
972
- $GLOBALS['GADASH_GAPI'] = new GADASH_GAPI();
973
  }
7
  */
8
  if (! class_exists('GADASH_GAPI')) {
9
 
10
+ final class GADASH_GAPI
11
+ {
12
+ public $client, $service;
13
+ public $country_codes;
14
+ public $timeshift;
15
+ private $error_timeout;
16
+ private $managequota;
17
+
18
+ function __construct()
19
  {
20
+ global $GADASH_Config;
21
+ include_once ($GADASH_Config->plugin_path . '/tools/autoload.php');
22
+ ;
23
+ $config = new Google_Config();
24
+ $config->setCacheClass('Google_Cache_Null');
25
+ if (function_exists('curl_version')) {
26
+ $curlversion = curl_version();
27
+ if (isset($curlversion['version']) and version_compare($curlversion['version'], '7.10.8') >= 0 and defined('GADWP_IP_VERSION') and GADWP_IP_VERSION) {
28
+ $config->setClassConfig('Google_IO_Curl', array(
29
+ 'options' => array(
30
+ CURLOPT_IPRESOLVE => GADWP_IP_VERSION
31
+ )
32
+ )); // Force CURL_IPRESOLVE_V4 or CURL_IPRESOLVE_V6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
+ }
35
+ $this->client = new Google_Client($config);
36
+ $this->client->setScopes('https://www.googleapis.com/auth/analytics.readonly');
37
+ $this->client->setAccessType('offline');
38
+ $this->client->setApplicationName('Google Analytics Dashboard');
39
+ $this->client->setRedirectUri('urn:ietf:wg:oauth:2.0:oob');
40
+ $this->set_error_timeout();
41
+ $this->managequota = 'u' . get_current_user_id() . 's' . get_current_blog_id();
42
+ if ($GADASH_Config->options['ga_dash_userapi']) {
43
+ $this->client->setClientId($GADASH_Config->options['ga_dash_clientid']);
44
+ $this->client->setClientSecret($GADASH_Config->options['ga_dash_clientsecret']);
45
+ $this->client->setDeveloperKey($GADASH_Config->options['ga_dash_apikey']);
46
+ } else {
47
+ $this->client->setClientId($GADASH_Config->access[0]);
48
+ $this->client->setClientSecret($GADASH_Config->access[1]);
49
+ $this->client->setDeveloperKey($GADASH_Config->access[2]);
50
+ }
51
+ $this->service = new Google_Service_Analytics($this->client);
52
+ if ($GADASH_Config->options['ga_dash_token']) {
53
+ $token = $GADASH_Config->options['ga_dash_token'];
54
+ $token = $this->ga_dash_refresh_token();
55
+ if ($token) {
56
+ $this->client->setAccessToken($token);
57
  }
58
+ }
59
+ }
60
 
61
+ private function set_error_timeout()
62
+ {
63
+ $midnight = strtotime("tomorrow 00:00:00"); // UTC midnight
64
+ $midnight = $midnight + 8 * 3600; // UTC 8 AM
65
+ $this->error_timeout = $midnight - time();
66
+ return;
67
+ }
68
 
69
+ private function prepare_json($value)
70
+ {
71
+ return esc_html(str_replace('\\', '&#92;', stripslashes($value)));
72
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
+ /**
75
+ * Handles errors returned by GAPI and allows exponential backoff
76
+ *
77
+ * @return boolean
78
+ */
79
+ function gapi_errors_handler()
80
+ {
81
+ $errors = get_transient('ga_dash_gapi_errors');
82
+ if ($errors === false or ! isset($errors[0])) { // invalid error
83
+ return FALSE;
84
+ }
85
+ if (isset($errors[1][0]['reason']) and ($errors[1][0]['reason'] == 'invalidCredentials' or $errors[1][0]['reason'] == 'authError' or $errors[1][0]['reason'] == 'insufficientPermissions' or $errors[1][0]['reason'] == 'required' or $errors[1][0]['reason'] == 'keyExpired')) {
86
+ $this->ga_dash_reset_token(false);
87
+ return TRUE;
88
+ }
89
+ if (isset($errors[1][0]['reason']) and ($errors[1][0]['reason'] == 'userRateLimitExceeded' or $errors[1][0]['reason'] == 'quotaExceeded')) { // allow retry
90
+ return FALSE;
91
+ }
92
+ if ($errors[0] == 400 or $errors[0] == 401 or $errors[0] == 403) {
93
+ return TRUE;
94
+ }
95
+ return FALSE;
96
+ }
97
 
98
+ /**
99
+ * Calculates proper timeouts for each GAPI query
100
+ *
101
+ * @param
102
+ * $daily
103
+ * @return number
104
+ */
105
+ function get_timeouts($daily)
106
+ {
107
+ $local_time = time() + $this->timeshift;
108
+ if ($daily) {
109
+ $nextday = explode('-', date('n-j-Y', strtotime(' +1 day', $local_time)));
110
+ $midnight = mktime(0, 0, 0, $nextday[0], $nextday[1], $nextday[2]);
111
+ return $midnight - $local_time;
112
+ } else {
113
+ $nexthour = explode('-', date('H-n-j-Y', strtotime(' +1 hour', $local_time)));
114
+ $newhour = mktime($nexthour[0], 0, 0, $nexthour[1], $nexthour[2], $nexthour[3]);
115
+ return $newhour - $local_time;
116
+ }
117
+ }
118
+
119
+ function token_request()
120
+ {
121
+ $authUrl = $this->client->createAuthUrl();
122
+ ?>
123
  <form name="input"
124
  action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" method="post">
125
 
148
  </table>
149
  </form>
150
  <?php
151
+ }
152
 
153
+ /**
154
+ * Retrives all Google Analytics Views with details
155
+ *
156
+ * @return array|string
157
+ */
158
+ function refresh_profiles()
159
+ {
160
+ global $GADASH_Config;
161
+ try {
162
+ $profiles = $this->service->management_profiles->listManagementProfiles('~all', '~all');
163
+ $items = $profiles->getItems();
164
+ if (count($items) != 0) {
165
+ $ga_dash_profile_list = array();
166
+ foreach ($items as $profile) {
167
+ $timetz = new DateTimeZone($profile->getTimezone());
168
+ $localtime = new DateTime('now', $timetz);
169
+ $timeshift = strtotime($localtime->format('Y-m-d H:i:s')) - time();
170
+ $ga_dash_profile_list[] = array(
171
+ $profile->getName(),
172
+ $profile->getId(),
173
+ $profile->getwebPropertyId(),
174
+ $profile->getwebsiteUrl(),
175
+ $timeshift,
176
+ $profile->getTimezone()
177
+ );
178
+ }
179
+ set_transient('ga_dash_lasterror', 'None');
180
+ return $ga_dash_profile_list;
181
+ } else {
182
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': No properties were found in this account!', $this->error_timeout);
183
+ return '';
 
 
 
 
 
 
 
 
 
 
184
  }
185
+ } catch (Google_IO_Exception $e) {
186
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $this->error_timeout);
187
+ return '';
188
+ } catch (Google_Service_Exception $e) {
189
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html("(" . $e->getCode() . ") " . $e->getMessage()), $this->error_timeout);
190
+ set_transient('ga_dash_gapi_errors', array(
191
+ $e->getCode(),
192
+ (array) $e->getErrors()
193
+ ), $this->error_timeout);
194
+ } catch (Exception $e) {
195
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $this->error_timeout);
196
+ return '';
197
+ }
198
+ }
199
 
200
+ /**
201
+ * Handles the token refresh process
202
+ *
203
+ * @return token|boolean
204
+ */
205
+ private function ga_dash_refresh_token()
206
+ {
207
+ global $GADASH_Config;
208
+ try {
209
+ if (is_multisite() && $GADASH_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 (! $GADASH_Config->options['ga_dash_refresh_token']) {
216
+ $google_token = json_decode($GADASH_Config->options['ga_dash_token']);
217
+ $GADASH_Config->options['ga_dash_refresh_token'] = $google_token->refresh_token;
218
+ $this->client->refreshToken($google_token->refresh_token);
219
+ } else {
220
+ $this->client->refreshToken($GADASH_Config->options['ga_dash_refresh_token']);
221
+ }
222
+ $token = $this->client->getAccessToken();
223
+ $google_token = json_decode($token);
224
+ $GADASH_Config->options['ga_dash_token'] = $token;
225
+ if (is_multisite() && $GADASH_Config->options['ga_dash_network']) {
226
+ set_site_transient("ga_dash_refresh_token", $token, $google_token->expires_in);
227
+ $GADASH_Config->set_plugin_options(true);
228
+ } else {
229
+ set_transient("ga_dash_refresh_token", $token, $google_token->expires_in);
230
+ $GADASH_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(
242
+ $e->getCode(),
243
+ (array) $e->getErrors()
244
+ ), $this->error_timeout);
245
+ return $e->getCode();
246
+ } catch (Exception $e) {
247
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $this->error_timeout);
248
+ return false;
249
+ }
250
+ }
251
 
252
+ /**
253
+ * Handles the token reset process
254
+ *
255
+ * @param
256
+ * $all
257
+ */
258
+ function ga_dash_reset_token($all = true)
259
+ {
260
+ global $GADASH_Config;
261
+ if (is_multisite() && $GADASH_Config->options['ga_dash_network']) {
262
+ delete_site_transient('ga_dash_refresh_token');
263
+ } else {
264
+ delete_transient('ga_dash_refresh_token');
265
+ }
266
+ $GADASH_Config->options['ga_dash_token'] = "";
267
+ $GADASH_Config->options['ga_dash_refresh_token'] = "";
268
+ if ($all) {
269
+ $GADASH_Config->options['ga_dash_tableid'] = "";
270
+ $GADASH_Config->options['ga_dash_tableid_jail'] = "";
271
+ $GADASH_Config->options['ga_dash_profile_list'] = "";
272
+ try {
273
+ $this->client->revokeToken();
274
+ } catch (Exception $e) {
275
+ if (is_multisite() && $GADASH_Config->options['ga_dash_network']) {
276
+ $GADASH_Config->set_plugin_options(true);
277
+ } else {
278
+ $GADASH_Config->set_plugin_options();
279
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
  }
281
+ }
282
+ if (is_multisite() && $GADASH_Config->options['ga_dash_network']) {
283
+ $GADASH_Config->set_plugin_options(true);
284
+ } else {
285
+ $GADASH_Config->set_plugin_options();
286
+ }
287
+ }
288
 
289
+ /**
290
+ * Get and cache Core Reports
291
+ *
292
+ * @todo implement retries with exponential backoff
293
+ *
294
+ * @param
295
+ * $projecId
296
+ * @param
297
+ * $from
298
+ * @param
299
+ * $to
300
+ * @param
301
+ * $metrics
302
+ * @param
303
+ * $options
304
+ * @param
305
+ * $serial
306
+ * @return int|Google_Service_Analytics_GaData
307
+ */
308
+ private function handle_corereports($projectId, $from, $to, $metrics, $options, $serial)
309
+ {
310
+ try {
311
+ if ($from == "today") {
312
+ $timeouts = 0;
313
+ } else {
314
+ $timeouts = 1;
315
+ }
316
+ if (strlen($serial) > 44) {
317
+ $serial = substr($serial, 0, 43); // keep a safe length
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
318
  }
319
+ $transient = get_transient($serial);
320
+ if ($transient === false) {
321
+ if ($this->gapi_errors_handler()) {
322
+ return - 23;
323
+ }
324
+ $data = $this->service->data_ga->get('ga:' . $projectId, $from, $to, $metrics, $options);
325
+ set_transient($serial, $data, $this->get_timeouts($timeouts));
326
+ } else {
327
+ $data = $transient;
328
+ }
329
+ } catch (Google_Service_Exception $e) {
330
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html("(" . $e->getCode() . ") " . $e->getMessage()), $this->error_timeout);
331
+ set_transient('ga_dash_gapi_errors', array(
332
+ $e->getCode(),
333
+ (array) $e->getErrors()
334
+ ), $this->error_timeout);
335
+ return $e->getCode();
336
+ } catch (Exception $e) {
337
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $this->error_timeout);
338
+ return $e->getCode();
339
+ }
340
+ if (isset($data['rows'])) {
341
+ return $data;
342
+ } else {
343
+ return - 21;
344
+ }
345
+ }
346
 
347
+ /**
348
+ * Analytics data for backend reports (Admin Widget main report)
349
+ *
350
+ * @param
351
+ * $projectId
352
+ * @param
353
+ * $from
354
+ * @param
355
+ * $to
356
+ * @param
357
+ * $query
358
+ * @return string|int
359
+ */
360
+ function get_mainreport($projectId, $from, $to, $query)
361
+ {
362
+ switch ($query) {
363
+ case 'users':
364
+ $title = __("Users", 'ga-dash');
365
+ break;
366
+ case 'pageviews':
367
+ $title = __("Page Views", 'ga-dash');
368
+ break;
369
+ case 'visitBounceRate':
370
+ $title = __("Bounce Rate", 'ga-dash');
371
+ break;
372
+ case 'organicSearches':
373
+ $title = __("Organic Searches", 'ga-dash');
374
+ break;
375
+ default:
376
+ $title = __("Sessions", 'ga-dash');
377
+ }
378
+ $metrics = 'ga:' . $query;
379
+ if ($from == "today" or $from == "yesterday") {
380
+ $dimensions = 'ga:hour';
381
+ $dayorhour = __("Hour", 'ga-dash');
382
+ } else {
383
+ $dimensions = 'ga:date,ga:dayOfWeekName';
384
+ $dayorhour = __("Date", 'ga-dash');
385
+ }
386
+ $serial = 'gadash_qr2' . str_replace(array(
387
+ 'ga:',
388
+ ',',
389
+ '-'
390
+ ), "", $projectId . $from . $metrics);
391
+ $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
392
+ 'dimensions' => $dimensions,
393
+ 'quotaUser' => $this->managequota . 'p' . $projectId
394
+ ), $serial);
395
+ if (is_numeric($data)) {
396
+ return $data;
397
+ }
398
+ $ga_dash_data = "";
399
+ if ($from == "today" or $from == "yesterday") {
400
+ for ($i = 0; $i < $data['totalResults']; $i ++) {
401
+ $ga_dash_data .= '["' . (int) $data["rows"][$i][0] . ':00",' . round($data["rows"][$i][1], 2) . '],';
402
+ }
403
+ } else {
404
+ for ($i = 0; $i < $data['totalResults']; $i ++) {
405
+ $ga_dash_data .= '["' . esc_html(ucfirst(__($data["rows"][$i][1]))) . ", " . esc_html(substr_replace(substr_replace($data["rows"][$i][0], "-", 4, 0), "-", 7, 0)) . '",' . round($data["rows"][$i][2], 2) . '],';
406
  }
407
+ }
408
+ if ($ga_dash_data) {
409
+ return '[["' . $dayorhour . '","' . $title . '"],' . rtrim($ga_dash_data, ',') . ']';
410
+ } else {
411
+ return - 22;
412
+ }
413
+ }
414
 
415
+ /**
416
+ * Analytics data for backend reports (bottom stats main report)
417
+ *
418
+ * @param
419
+ * $projectId
420
+ * @param
421
+ * $from
422
+ * @param
423
+ * $to
424
+ * @return array|int
425
+ */
426
+ function get_bottomstats($projectId, $from, $to)
427
+ {
428
+ $metrics = 'ga:sessions,ga:users,ga:pageviews,ga:BounceRate,ga:organicSearches,ga:pageviewsPerSession';
429
+ $serial = 'gadash_qr3' . $projectId . $from;
430
+ $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
431
+ 'dimensions' => NULL,
432
+ 'quotaUser' => $this->managequota . 'p' . $projectId
433
+ ), $serial);
434
+ if (is_numeric($data)) {
435
+ if ($data == - 21) {
436
+ return array_fill(0, 6, 0);
437
+ } else {
438
+ return $data;
439
+ }
440
+ }
441
+ $ga_dash_data = $data['rows'][0];
442
+ array_map('floatval', $ga_dash_data);
443
+ return $ga_dash_data;
444
+ }
445
 
446
+ /**
447
+ * Analytics data for backend reports (contentpages)
448
+ *
449
+ * @param
450
+ * $projectId
451
+ * @param
452
+ * $from
453
+ * @param
454
+ * $to
455
+ * @return string|int
456
+ */
457
+ function get_contentpages($projectId, $from, $to)
458
+ {
459
+ $metrics = 'ga:pageviews';
460
+ $dimensions = 'ga:pageTitle';
461
+ $serial = 'gadash_qr4' . $projectId . $from;
462
+ $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
463
+ 'dimensions' => $dimensions,
464
+ 'sort' => '-ga:pageviews',
465
+ 'quotaUser' => $this->managequota . 'p' . $projectId
466
+ ), $serial);
467
+ if (is_numeric($data)) {
468
+ return $data;
469
+ }
470
+ $ga_dash_data = "";
471
+ $i = 0;
472
+ while (isset($data['rows'][$i][0])) {
473
+ $ga_dash_data .= '["' . $this->prepare_json($data['rows'][$i][0]) . '",' . (int) $data['rows'][$i][1] . '],';
474
+ $i ++;
475
+ }
476
+ if ($ga_dash_data) {
477
+ return '[["' . __("Pages", 'ga-dash') . '","' . __("Views", 'ga-dash') . '"],' . rtrim($ga_dash_data, ',') . ']';
478
+ } else {
479
+ return - 22;
480
+ }
481
+ }
482
 
483
+ /**
484
+ * Analytics data for backend reports (referrers)
485
+ *
486
+ * @param
487
+ * $projectId
488
+ * @param
489
+ * $from
490
+ * @param
491
+ * $to
492
+ * @return string|int
493
+ */
494
+ function get_referrers($projectId, $from, $to)
495
+ {
496
+ $metrics = 'ga:sessions';
497
+ $dimensions = 'ga:source';
498
+ $serial = 'gadash_qr5' . $projectId . $from;
499
+ $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
500
+ 'dimensions' => $dimensions,
501
+ 'sort' => '-ga:sessions',
502
+ 'filters' => 'ga:medium==referral',
503
+ 'quotaUser' => $this->managequota . 'p' . $projectId
504
+ ), $serial);
505
+ if (is_numeric($data)) {
506
+ return $data;
507
+ }
508
+ $ga_dash_data = "";
509
+ $i = 0;
510
+ while (isset($data['rows'][$i][0])) {
511
+ $ga_dash_data .= '["' . $this->prepare_json($data["rows"][$i][0]) . '",' . (int) $data["rows"][$i][1] . '],';
512
+ $i ++;
513
+ }
514
+ if ($ga_dash_data) {
515
+ return '[["' . __("Referrers", 'ga-dash') . '","' . __("Sessions", 'ga-dash') . '"],' . rtrim($ga_dash_data, ',') . ']';
516
+ } else {
517
+ return - 22;
518
+ }
519
+ }
520
 
521
+ /**
522
+ * Analytics data for backend reports (searches)
523
+ *
524
+ * @param
525
+ * $projectId
526
+ * @param
527
+ * $from
528
+ * @param
529
+ * $to
530
+ * @return string|int
531
+ */
532
+ function get_searches($projectId, $from, $to)
533
+ {
534
+ $metrics = 'ga:sessions';
535
+ $dimensions = 'ga:keyword';
536
+ $serial = 'gadash_qr6' . $projectId . $from;
537
+ $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
538
+ 'dimensions' => $dimensions,
539
+ 'sort' => '-ga:sessions',
540
+ 'quotaUser' => $this->managequota . 'p' . $projectId
541
+ ), $serial);
542
+ if (is_numeric($data)) {
543
+ return $data;
544
+ }
545
+ $ga_dash_data = "";
546
+ $i = 0;
547
+ while (isset($data['rows'][$i][0])) {
548
+ if ($data['rows'][$i][0] != "(not set)") {
549
+ $ga_dash_data .= '["' . $this->prepare_json($data["rows"][$i][0]) . '",' . (int) $data["rows"][$i][1] . '],';
 
 
 
 
 
 
 
 
 
 
 
 
550
  }
551
+ $i ++;
552
+ }
553
+ if ($ga_dash_data) {
554
+ return '[["' . __("Searches", 'ga-dash') . '","' . __("Sessions", 'ga-dash') . '"],' . rtrim($ga_dash_data, ',') . ']';
555
+ } else {
556
+ return - 22;
557
+ }
558
+ }
559
 
560
+ /**
561
+ * Analytics data for backend reports (location reports)
562
+ *
563
+ * @param
564
+ * $projectId
565
+ * @param
566
+ * $from
567
+ * @param
568
+ * $to
569
+ * @return string|int
570
+ */
571
+ function get_locations($projectId, $from, $to)
572
+ {
573
+ global $GADASH_Config;
574
+ $metrics = 'ga:sessions';
575
+ $options = "";
576
+ $title = __("Countries", 'ga-dash');
577
+ $serial = 'gadash_qr7' . $projectId . $from;
578
+ $dimensions = 'ga:country';
579
+ $filters = "";
580
+ $options = array(
581
+ 'dimensions' => $dimensions,
582
+ 'sort' => '-ga:sessions',
583
+ 'quotaUser' => $this->managequota . 'p' . $projectId
584
+ );
585
+ if ($GADASH_Config->options['ga_target_geomap']) {
586
+ $dimensions = 'ga:city, ga:region';
587
+ $this->getcountrycodes();
588
+ if (isset($this->country_codes[$GADASH_Config->options['ga_target_geomap']])) {
589
+ $filters = 'ga:country==' . ($this->country_codes[$GADASH_Config->options['ga_target_geomap']]);
590
+ $title = __("Cities from", 'ga-dash') . ' ' . __($this->country_codes[$GADASH_Config->options['ga_target_geomap']]);
591
+ $serial = 'gadash_qr7' . $projectId . $from . $GADASH_Config->options['ga_target_geomap'];
592
+ $options = array(
593
+ 'dimensions' => $dimensions,
594
+ 'filters' => $filters,
595
+ 'sort' => '-ga:sessions',
596
+ 'quotaUser' => $this->managequota . 'p' . $projectId
597
+ );
 
 
 
 
598
  }
599
+ }
600
+ $data = $this->handle_corereports($projectId, $from, $to, $metrics, $options, $serial);
601
+ if (is_numeric($data)) {
602
+ return $data;
603
+ }
604
+ $ga_dash_data = "";
605
+ $i = 0;
606
+ while (isset($data['rows'][$i][1])) {
607
+ if (isset($data['rows'][$i][2])) {
608
+ $ga_dash_data .= '["' . $this->prepare_json($data["rows"][$i][0]) . ', ' . $this->prepare_json($data["rows"][$i][1]) . '",' . (int) $data["rows"][$i][2] . '],';
609
+ } else {
610
+ $ga_dash_data .= '["' . $this->prepare_json($data["rows"][$i][0]) . '",' . (int) $data["rows"][$i][1] . '],';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
611
  }
612
+ $i ++;
613
+ }
614
+ if ($ga_dash_data) {
615
+ return '[["' . $title . '", "' . __("Sessions", 'ga-dash') . '"],' . rtrim($ga_dash_data, ',') . ']';
616
+ } else {
617
+ return - 22;
618
+ }
619
+ }
620
 
621
+ /**
622
+ * Analytics data for backend reports (traffic channels)
623
+ *
624
+ * @param
625
+ * $projectId
626
+ * @param
627
+ * $from
628
+ * @param
629
+ * $to
630
+ * @return string|int
631
+ */
632
+ function get_trafficchannels($projectId, $from, $to)
633
+ {
634
+ $metrics = 'ga:sessions';
635
+ $dimensions = 'ga:channelGrouping';
636
+ $serial = 'gadash_qr8' . $projectId . $from;
637
+ $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
638
+ 'dimensions' => $dimensions,
639
+ 'quotaUser' => $this->managequota . 'p' . $projectId
640
+ ), $serial);
641
+ if (is_numeric($data)) {
642
+ return $data;
643
+ }
644
+ $title = __("Channels", 'ga-dash');
645
+ $ga_dash_data = "";
646
+ for ($i = 0; $i < $data['totalResults']; $i ++) {
647
+ $shrink = explode(" ", $data["rows"][$i][0]);
648
+ $ga_dash_data .= '["' . '<div style=\\"color:black; font-size:1.1em\\">' . esc_html($shrink[0]) . '</div><div style=\\"color:darkblue; font-size:1.2em\\">' . (int) $data["rows"][$i][1] . '</div>","' . '<div style=\\"color:black; font-size:1.1em\\">' . $title . '</div><div style=\\"color:darkblue; font-size:1.2em\\">' . (int) $data['totalsForAllResults']["ga:sessions"] . '</div>"],';
649
+ }
650
+ if ($ga_dash_data) {
651
+ return '[["' . '<div style=\\"color:black; font-size:1.1em\\">' . $title . '</div><div style=\\"color:darkblue; font-size:1.2em\\">' . (int) $data['totalsForAllResults']["ga:sessions"] . '</div>", ""],' . rtrim($ga_dash_data, ',') . ']';
652
+ } else {
653
+ return - 22;
654
+ }
655
+ }
 
 
 
 
 
 
656
 
657
+ /**
658
+ * Analytics data for backend reports (traffic mediums, type, serach engines, social networks)
659
+ *
660
+ * @param
661
+ * $projectId
662
+ * @param
663
+ * $from
664
+ * @param
665
+ * $to
666
+ * @param
667
+ * $query
668
+ * @return string|int
669
+ */
670
+ function get_trafficdetails($projectId, $from, $to, $query)
671
+ {
672
+ $metrics = 'ga:sessions';
673
+ $dimensions = 'ga:' . $query;
674
+ if ($query == 'source') {
675
+ $options = array(
676
+ 'dimensions' => $dimensions,
677
+ 'filters' => 'ga:medium==organic',
678
+ 'quotaUser' => $this->managequota . 'p' . $projectId
679
+ );
680
+ } else {
681
+ $options = array(
682
+ 'dimensions' => $dimensions,
683
+ 'quotaUser' => $this->managequota . 'p' . $projectId
684
+ );
685
+ }
686
+ $serial = 'gadash_qr10' . $projectId . $from . $query;
687
+ $data = $this->handle_corereports($projectId, $from, $to, $metrics, $options, $serial);
688
+ if (is_numeric($data)) {
689
+ return $data;
690
+ }
691
+ $ga_dash_data = "";
692
+ for ($i = 0; $i < $data['totalResults']; $i ++) {
693
+ if ($data['rows'][$i][0] != '(not set)') {
694
+ $ga_dash_data .= '["' . str_replace("(none)", "direct", esc_html($data['rows'][$i][0])) . '",' . (int) $data["rows"][$i][1] . '],';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
695
  }
696
+ }
697
+ if ($ga_dash_data) {
698
+ return '[["' . __("Type", 'ga-dash') . '", "Sessions"],' . rtrim($ga_dash_data, ',') . ']';
699
+ } else {
700
+ return - 22;
701
+ }
702
+ }
703
 
704
+ /**
705
+ * Analytics data for frontend Widget (chart data and totals)
706
+ *
707
+ * @param
708
+ * $projectId
709
+ * @param
710
+ * $period
711
+ * @param
712
+ * $anonim
713
+ * @return array|int
714
+ */
715
+ function frontend_widget_stats($projectId, $from, $anonim)
716
+ {
717
+ $content = '';
718
+ $to = 'yesterday';
719
+ $metrics = 'ga:sessions';
720
+ $dimensions = 'ga:date,ga:dayOfWeekName';
721
+ $serial = 'gadash_qr2' . str_replace(array(
722
+ 'ga:',
723
+ ',',
724
+ '-'
725
+ ), "", $projectId . $from . $metrics);
726
+ $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
727
+ 'dimensions' => $dimensions,
728
+ 'quotaUser' => $this->managequota . 'p' . $projectId
729
+ ), $serial);
730
+ if (is_numeric($data)) {
731
+ return $data;
732
+ }
733
+ $ga_dash_data = "";
734
+ $max_array = array();
735
+ foreach ($data['rows'] as $item) {
736
+ $max_array[] = $item[2];
737
+ }
738
+ $max = max($max_array) ? max($max_array) : 1;
739
+ for ($i = 0; $i < $data['totalResults']; $i ++) {
740
+ $ga_dash_data .= '["' . ucfirst(esc_html((__($data["rows"][$i][1])))) . ", " . esc_html(substr_replace(substr_replace($data["rows"][$i][0], "-", 4, 0), "-", 7, 0)) . '",' . ($anonim ? str_replace(",", ".", round($data["rows"][$i][2] * 100 / $max, 2)) : (int) $data["rows"][$i][2]) . '],';
741
+ }
742
+ if ($ga_dash_data) {
743
+ return array(
744
+ '[["' . __("Date", 'ga-dash') . '", "' . __("Sessions", 'ga-dash') . ($anonim ? "' " . __("trend", 'ga-dash') : '') . '"],' . rtrim($ga_dash_data, ",") . "]",
745
+ $anonim ? 0 : (int) $data['totalsForAllResults']['ga:sessions']
746
+ );
747
+ } else {
748
+ return - 22;
749
+ }
750
+ }
 
 
 
 
 
 
 
 
751
 
752
+ /**
753
+ * Analytics data for frontend reports (pagviews and unique pageviews per page)
754
+ *
755
+ * @param
756
+ * $projectId
757
+ * @param
758
+ * $page_url
759
+ * @param
760
+ * $post_id
761
+ * @return string|int
762
+ */
763
+ function frontend_afterpost_pageviews($projectId, $page_url, $post_id)
764
+ {
765
+ $from = '30daysAgo';
766
+ $to = 'yesterday';
767
+ $metrics = 'ga:pageviews,ga:uniquePageviews';
768
+ $dimensions = 'ga:date,ga:dayOfWeekName';
769
+ $serial = 'gadash_qr21' . $post_id . 'stats';
770
+ $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
771
+ 'dimensions' => $dimensions,
772
+ 'filters' => 'ga:pagePath==' . $page_url,
773
+ 'quotaUser' => $this->managequota . 'p' . $projectId
774
+ ), $serial);
775
+ if (is_numeric($data)) {
776
+ return $data;
777
+ }
778
+ $ga_dash_data = "";
779
+ for ($i = 0; $i < $data['totalResults']; $i ++) {
780
+ $ga_dash_data .= '["' . ucfirst(esc_html(__($data['rows'][$i][1]))) . ", " . esc_html(substr_replace(substr_replace($data['rows'][$i][0], "-", 4, 0), "-", 7, 0)) . '",' . round($data['rows'][$i][2], 2) . ',' . round($data['rows'][$i][3], 2) . '],';
781
+ }
782
+ if ($ga_dash_data) {
783
+ return '[["' . __('Date', "ga-dash") . '", "' . __('Views', "ga-dash") . '", "' . __('UniqueViews', "ga-dash") . '"],' . rtrim($ga_dash_data, ',') . ']';
784
+ } else {
785
+ return - 22;
786
+ }
787
+ }
 
 
 
 
 
788
 
789
+ /**
790
+ * Analytics data for frontend reports (searches per page)
791
+ *
792
+ * @param
793
+ * $projectId
794
+ * @param
795
+ * $page_url
796
+ * @param
797
+ * $post_id
798
+ * @return string|int
799
+ */
800
+ function frontend_afterpost_searches($projectId, $page_url, $post_id)
801
+ {
802
+ $from = '30daysAgo';
803
+ $to = 'yesterday';
804
+ $metrics = 'ga:sessions';
805
+ $dimensions = 'ga:keyword';
806
+ $serial = 'gadash_qr22' . $post_id . 'search';
807
+ $data = $this->handle_corereports($projectId, $from, $to, $metrics, array(
808
+ 'dimensions' => $dimensions,
809
+ 'sort' => '-ga:sessions',
810
+ 'filters' => 'ga:pagePath==' . $page_url,
811
+ 'quotaUser' => $this->managequota . 'p' . $projectId
812
+ ), $serial);
813
+ if (is_numeric($data)) {
814
+ return $data;
815
+ }
816
+ $ga_dash_data = "";
817
+ $i = 0;
818
+ while (isset($data['rows'][$i][0])) {
819
+ if ($data['rows'][$i][0] != "(not set)") {
820
+ $ga_dash_data .= '["' . $this->prepare_json($data['rows'][$i][0]) . '",' . (int) $data['rows'][$i][1] . '],';
 
 
 
 
 
 
 
 
 
 
 
 
 
821
  }
822
+ $i ++;
823
+ }
824
+ if ($ga_dash_data) {
825
+ return '[["' . __('Searches', "ga-dash") . '", "' . __('Sessions', "ga-dash") . '"],' . rtrim($ga_dash_data, ',') . ' ]';
826
+ } else {
827
+ return - 22;
828
+ }
829
+ }
830
 
831
+ /**
832
+ * Analytics data for backend reports (Real-Time)
833
+ *
834
+ * @param
835
+ * $projectId
836
+ * @return string|int
837
+ */
838
+ function gadash_realtime_data($projectId)
839
+ {
840
+ $metrics = 'rt:activeUsers';
841
+ $dimensions = 'rt:pagePath,rt:source,rt:keyword,rt:trafficType,rt:visitorType,rt:pageTitle';
842
+ try {
843
+ $serial = "gadash_realtimecache_" . $projectId;
844
+ $transient = get_transient($serial);
845
+ if ($transient === false) {
846
+ if ($this->gapi_errors_handler()) {
847
+ return - 23;
848
+ }
849
+ $data = $this->service->data_realtime->get('ga:' . $projectId, $metrics, array(
850
+ 'dimensions' => $dimensions,
851
+ 'quotaUser' => $this->managequota . 'p' . $projectId
852
+ ));
853
+ set_transient($serial, $data, 55);
854
+ } else {
855
+ $data = $transient;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
856
  }
857
+ } catch (Google_Service_Exception $e) {
858
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html("(" . $e->getCode() . ") " . $e->getMessage()), $this->error_timeout);
859
+ set_transient('ga_dash_gapi_errors', array(
860
+ $e->getCode(),
861
+ (array) $e->getErrors()
862
+ ), $this->error_timeout);
863
+ return $e->getCode();
864
+ } catch (Exception $e) {
865
+ set_transient('ga_dash_lasterror', date('Y-m-d H:i:s') . ': ' . esc_html($e), $this->error_timeout);
866
+ return $e->getCode();
867
+ }
868
+ if (! isset($data['rows'])) {
869
+ return - 21;
870
+ }
871
+ $i = 0;
872
+ $ga_dash_data = $data;
873
+ while (isset($data->rows[$i])) {
874
+ $ga_dash_data->rows[$i] = array_map('esc_html', $data->rows[$i]);
875
+ $i ++;
876
+ }
877
+ return print_r(json_encode($ga_dash_data), true);
878
+ }
879
 
880
+ public function getcountrycodes()
881
+ {
882
+ include_once 'iso3166.php';
 
883
  }
884
+ }
885
  }
 
886
  if (! isset($GLOBALS['GADASH_GAPI'])) {
887
+ $GLOBALS['GADASH_GAPI'] = new GADASH_GAPI();
888
  }
tools/nprogress/nprogress.css CHANGED
@@ -1,4 +1,3 @@
1
- /* Make clicks pass-through */
2
  #nprogress {
3
  pointer-events: none;
4
  }
 
1
  #nprogress {
2
  pointer-events: none;
3
  }
tools/src/Google/Auth/Abstract.php CHANGED
@@ -1,36 +1,40 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * Abstract class for the Authentication in the API client
22
- * @author Chris Chabot <chabotc@google.com>
23
- *
24
- */
25
- abstract class Google_Auth_Abstract
26
- {
27
- /**
28
- * An utility function that first calls $this->auth->sign($request) and then
29
- * executes makeRequest() on that signed request. Used for when a request
30
- * should be authenticated
31
- * @param Google_Http_Request $request
32
- * @return Google_Http_Request $request
33
- */
34
- abstract public function authenticatedRequest(Google_Http_Request $request);
35
- abstract public function sign(Google_Http_Request $request);
 
 
 
 
36
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * Abstract class for the Authentication in the API client
21
+ *
22
+ * @author Chris Chabot <chabotc@google.com>
23
+ *
24
+ */
25
+ abstract class Google_Auth_Abstract
26
+ {
27
+
28
+ /**
29
+ * An utility function that first calls $this->auth->sign($request) and then
30
+ * executes makeRequest() on that signed request.
31
+ * Used for when a request
32
+ * should be authenticated
33
+ *
34
+ * @param Google_Http_Request $request
35
+ * @return Google_Http_Request $request
36
+ */
37
+ abstract public function authenticatedRequest(Google_Http_Request $request);
38
+
39
+ abstract public function sign(Google_Http_Request $request);
40
  }
tools/src/Google/Auth/AppIdentity.php CHANGED
@@ -1,105 +1,96 @@
1
- <?php
2
- /*
3
- * Copyright 2014 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /*
19
- * WARNING - this class depends on the Google App Engine PHP library
20
- * which is 5.3 and above only, so if you include this in a PHP 5.2
21
- * setup or one without 5.3 things will blow up.
22
- */
23
- use google\appengine\api\app_identity\AppIdentityService;
24
-
25
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
26
-
27
- /**
28
- * Authentication via the Google App Engine App Identity service.
29
- */
30
- class Google_Auth_AppIdentity extends Google_Auth_Abstract
31
- {
32
- const CACHE_PREFIX = "Google_Auth_AppIdentity::";
33
- private $key = null;
34
- private $client;
35
- private $token = false;
36
- private $tokenScopes = false;
37
-
38
- public function __construct(Google_Client $client, $config = null)
39
- {
40
- $this->client = $client;
41
- }
42
-
43
- /**
44
- * Retrieve an access token for the scopes supplied.
45
- */
46
- public function authenticateForScope($scopes)
47
- {
48
- if ($this->token && $this->tokenScopes == $scopes) {
49
- return $this->token;
50
- }
51
-
52
- $cacheKey = self::CACHE_PREFIX;
53
- if (is_string($scopes)) {
54
- $cacheKey .= $scopes;
55
- } else if (is_array($scopes)) {
56
- $cacheKey .= implode(":", $scopes);
57
- }
58
-
59
- $this->token = $this->client->getCache()->get($cacheKey);
60
- if (!$this->token) {
61
- $this->token = AppIdentityService::getAccessToken($scopes);
62
- if ($this->token) {
63
- $this->client->getCache()->set(
64
- $cacheKey,
65
- $this->token
66
- );
67
- }
68
- }
69
- $this->tokenScopes = $scopes;
70
- return $this->token;
71
- }
72
-
73
- /**
74
- * Perform an authenticated / signed apiHttpRequest.
75
- * This function takes the apiHttpRequest, calls apiAuth->sign on it
76
- * (which can modify the request in what ever way fits the auth mechanism)
77
- * and then calls apiCurlIO::makeRequest on the signed request
78
- *
79
- * @param Google_Http_Request $request
80
- * @return Google_Http_Request The resulting HTTP response including the
81
- * responseHttpCode, responseHeaders and responseBody.
82
- */
83
- public function authenticatedRequest(Google_Http_Request $request)
84
- {
85
- $request = $this->sign($request);
86
- return $this->client->getIo()->makeRequest($request);
87
- }
88
-
89
- public function sign(Google_Http_Request $request)
90
- {
91
- if (!$this->token) {
92
- // No token, so nothing to do.
93
- return $request;
94
- }
95
-
96
- $this->client->getLogger()->debug('App Identity authentication');
97
-
98
- // Add the OAuth2 header to the request
99
- $request->setRequestHeaders(
100
- array('Authorization' => 'Bearer ' . $this->token['access_token'])
101
- );
102
-
103
- return $request;
104
- }
105
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /*
18
+ * WARNING - this class depends on the Google App Engine PHP library
19
+ * which is 5.3 and above only, so if you include this in a PHP 5.2
20
+ * setup or one without 5.3 things will blow up.
21
+ */
22
+ use google\appengine\api\app_identity\AppIdentityService;
23
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
24
+
25
+ /**
26
+ * Authentication via the Google App Engine App Identity service.
27
+ */
28
+ class Google_Auth_AppIdentity extends Google_Auth_Abstract
29
+ {
30
+ const CACHE_PREFIX = "Google_Auth_AppIdentity::";
31
+ private $key = null;
32
+ private $client;
33
+ private $token = false;
34
+ private $tokenScopes = false;
35
+
36
+ public function __construct(Google_Client $client, $config = null)
37
+ {
38
+ $this->client = $client;
39
+ }
40
+
41
+ /**
42
+ * Retrieve an access token for the scopes supplied.
43
+ */
44
+ public function authenticateForScope($scopes)
45
+ {
46
+ if ($this->token && $this->tokenScopes == $scopes) {
47
+ return $this->token;
48
+ }
49
+ $cacheKey = self::CACHE_PREFIX;
50
+ if (is_string($scopes)) {
51
+ $cacheKey .= $scopes;
52
+ } else
53
+ if (is_array($scopes)) {
54
+ $cacheKey .= implode(":", $scopes);
55
+ }
56
+ $this->token = $this->client->getCache()->get($cacheKey);
57
+ if (! $this->token) {
58
+ $this->token = AppIdentityService::getAccessToken($scopes);
59
+ if ($this->token) {
60
+ $this->client->getCache()->set($cacheKey, $this->token);
61
+ }
62
+ }
63
+ $this->tokenScopes = $scopes;
64
+ return $this->token;
65
+ }
66
+
67
+ /**
68
+ * Perform an authenticated / signed apiHttpRequest.
69
+ * This function takes the apiHttpRequest, calls apiAuth->sign on it
70
+ * (which can modify the request in what ever way fits the auth mechanism)
71
+ * and then calls apiCurlIO::makeRequest on the signed request
72
+ *
73
+ * @param Google_Http_Request $request
74
+ * @return Google_Http_Request The resulting HTTP response including the
75
+ * responseHttpCode, responseHeaders and responseBody.
76
+ */
77
+ public function authenticatedRequest(Google_Http_Request $request)
78
+ {
79
+ $request = $this->sign($request);
80
+ return $this->client->getIo()->makeRequest($request);
81
+ }
82
+
83
+ public function sign(Google_Http_Request $request)
84
+ {
85
+ if (! $this->token) {
86
+ // No token, so nothing to do.
87
+ return $request;
88
+ }
89
+ $this->client->getLogger()->debug('App Identity authentication');
90
+ // Add the OAuth2 header to the request
91
+ $request->setRequestHeaders(array(
92
+ 'Authorization' => 'Bearer ' . $this->token['access_token']
93
+ ));
94
+ return $request;
95
+ }
 
 
 
 
 
 
 
 
 
96
  }
tools/src/Google/Auth/AssertionCredentials.php CHANGED
@@ -1,136 +1,134 @@
1
- <?php
2
- /*
3
- * Copyright 2012 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * Credentials object used for OAuth 2.0 Signed JWT assertion grants.
22
- *
23
- * @author Chirag Shah <chirags@google.com>
24
- */
25
- class Google_Auth_AssertionCredentials
26
- {
27
- const MAX_TOKEN_LIFETIME_SECS = 3600;
28
-
29
- public $serviceAccountName;
30
- public $scopes;
31
- public $privateKey;
32
- public $privateKeyPassword;
33
- public $assertionType;
34
- public $sub;
35
- /**
36
- * @deprecated
37
- * @link http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06
38
- */
39
- public $prn;
40
- private $useCache;
41
-
42
- /**
43
- * @param $serviceAccountName
44
- * @param $scopes array List of scopes
45
- * @param $privateKey
46
- * @param string $privateKeyPassword
47
- * @param string $assertionType
48
- * @param bool|string $sub The email address of the user for which the
49
- * application is requesting delegated access.
50
- * @param bool useCache Whether to generate a cache key and allow
51
- * automatic caching of the generated token.
52
- */
53
- public function __construct(
54
- $serviceAccountName,
55
- $scopes,
56
- $privateKey,
57
- $privateKeyPassword = 'notasecret',
58
- $assertionType = 'http://oauth.net/grant_type/jwt/1.0/bearer',
59
- $sub = false,
60
- $useCache = true
61
- ) {
62
- $this->serviceAccountName = $serviceAccountName;
63
- $this->scopes = is_string($scopes) ? $scopes : implode(' ', $scopes);
64
- $this->privateKey = $privateKey;
65
- $this->privateKeyPassword = $privateKeyPassword;
66
- $this->assertionType = $assertionType;
67
- $this->sub = $sub;
68
- $this->prn = $sub;
69
- $this->useCache = $useCache;
70
- }
71
-
72
- /**
73
- * Generate a unique key to represent this credential.
74
- * @return string
75
- */
76
- public function getCacheKey()
77
- {
78
- if (!$this->useCache) {
79
- return false;
80
- }
81
- $h = $this->sub;
82
- $h .= $this->assertionType;
83
- $h .= $this->privateKey;
84
- $h .= $this->scopes;
85
- $h .= $this->serviceAccountName;
86
- return md5($h);
87
- }
88
-
89
- public function generateAssertion()
90
- {
91
- $now = time();
92
-
93
- $jwtParams = array(
94
- 'aud' => Google_Auth_OAuth2::OAUTH2_TOKEN_URI,
95
- 'scope' => $this->scopes,
96
- 'iat' => $now,
97
- 'exp' => $now + self::MAX_TOKEN_LIFETIME_SECS,
98
- 'iss' => $this->serviceAccountName,
99
- );
100
-
101
- if ($this->sub !== false) {
102
- $jwtParams['sub'] = $this->sub;
103
- } else if ($this->prn !== false) {
104
- $jwtParams['prn'] = $this->prn;
105
- }
106
-
107
- return $this->makeSignedJwt($jwtParams);
108
- }
109
-
110
- /**
111
- * Creates a signed JWT.
112
- * @param array $payload
113
- * @return string The signed JWT.
114
- */
115
- private function makeSignedJwt($payload)
116
- {
117
- $header = array('typ' => 'JWT', 'alg' => 'RS256');
118
-
119
- $payload = json_encode($payload);
120
- // Handle some overzealous escaping in PHP json that seemed to cause some errors
121
- // with claimsets.
122
- $payload = str_replace('\/', '/', $payload);
123
-
124
- $segments = array(
125
- Google_Utils::urlSafeB64Encode(json_encode($header)),
126
- Google_Utils::urlSafeB64Encode($payload)
127
- );
128
-
129
- $signingInput = implode('.', $segments);
130
- $signer = new Google_Signer_P12($this->privateKey, $this->privateKeyPassword);
131
- $signature = $signer->sign($signingInput);
132
- $segments[] = Google_Utils::urlSafeB64Encode($signature);
133
-
134
- return implode(".", $segments);
135
- }
136
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2012 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * Credentials object used for OAuth 2.0 Signed JWT assertion grants.
21
+ *
22
+ * @author Chirag Shah <chirags@google.com>
23
+ */
24
+ class Google_Auth_AssertionCredentials
25
+ {
26
+ const MAX_TOKEN_LIFETIME_SECS = 3600;
27
+ public $serviceAccountName;
28
+ public $scopes;
29
+ public $privateKey;
30
+ public $privateKeyPassword;
31
+ public $assertionType;
32
+ public $sub;
33
+ /**
34
+ *
35
+ * @deprecated
36
+ *
37
+ * @link http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06
38
+ */
39
+ public $prn;
40
+ private $useCache;
41
+
42
+ /**
43
+ *
44
+ * @param
45
+ * $serviceAccountName
46
+ * @param $scopes array
47
+ * List of scopes
48
+ * @param
49
+ * $privateKey
50
+ * @param string $privateKeyPassword
51
+ * @param string $assertionType
52
+ * @param bool|string $sub
53
+ * The email address of the user for which the
54
+ * application is requesting delegated access.
55
+ * @param
56
+ * bool useCache Whether to generate a cache key and allow
57
+ * automatic caching of the generated token.
58
+ */
59
+ public function __construct($serviceAccountName, $scopes, $privateKey, $privateKeyPassword = 'notasecret', $assertionType = 'http://oauth.net/grant_type/jwt/1.0/bearer', $sub = false, $useCache = true)
60
+ {
61
+ $this->serviceAccountName = $serviceAccountName;
62
+ $this->scopes = is_string($scopes) ? $scopes : implode(' ', $scopes);
63
+ $this->privateKey = $privateKey;
64
+ $this->privateKeyPassword = $privateKeyPassword;
65
+ $this->assertionType = $assertionType;
66
+ $this->sub = $sub;
67
+ $this->prn = $sub;
68
+ $this->useCache = $useCache;
69
+ }
70
+
71
+ /**
72
+ * Generate a unique key to represent this credential.
73
+ *
74
+ * @return string
75
+ */
76
+ public function getCacheKey()
77
+ {
78
+ if (! $this->useCache) {
79
+ return false;
80
+ }
81
+ $h = $this->sub;
82
+ $h .= $this->assertionType;
83
+ $h .= $this->privateKey;
84
+ $h .= $this->scopes;
85
+ $h .= $this->serviceAccountName;
86
+ return md5($h);
87
+ }
88
+
89
+ public function generateAssertion()
90
+ {
91
+ $now = time();
92
+ $jwtParams = array(
93
+ 'aud' => Google_Auth_OAuth2::OAUTH2_TOKEN_URI,
94
+ 'scope' => $this->scopes,
95
+ 'iat' => $now,
96
+ 'exp' => $now + self::MAX_TOKEN_LIFETIME_SECS,
97
+ 'iss' => $this->serviceAccountName
98
+ );
99
+ if ($this->sub !== false) {
100
+ $jwtParams['sub'] = $this->sub;
101
+ } else
102
+ if ($this->prn !== false) {
103
+ $jwtParams['prn'] = $this->prn;
104
+ }
105
+ return $this->makeSignedJwt($jwtParams);
106
+ }
107
+
108
+ /**
109
+ * Creates a signed JWT.
110
+ *
111
+ * @param array $payload
112
+ * @return string The signed JWT.
113
+ */
114
+ private function makeSignedJwt($payload)
115
+ {
116
+ $header = array(
117
+ 'typ' => 'JWT',
118
+ 'alg' => 'RS256'
119
+ );
120
+ $payload = json_encode($payload);
121
+ // Handle some overzealous escaping in PHP json that seemed to cause some errors
122
+ // with claimsets.
123
+ $payload = str_replace('\/', '/', $payload);
124
+ $segments = array(
125
+ Google_Utils::urlSafeB64Encode(json_encode($header)),
126
+ Google_Utils::urlSafeB64Encode($payload)
127
+ );
128
+ $signingInput = implode('.', $segments);
129
+ $signer = new Google_Signer_P12($this->privateKey, $this->privateKeyPassword);
130
+ $signature = $signer->sign($signingInput);
131
+ $segments[] = Google_Utils::urlSafeB64Encode($signature);
132
+ return implode(".", $segments);
133
+ }
 
 
134
  }
tools/src/Google/Auth/Exception.php CHANGED
@@ -1,22 +1,21 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- class Google_Auth_Exception extends Google_Exception
21
- {
22
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2013 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ class Google_Auth_Exception extends Google_Exception
20
+ {
 
21
  }
tools/src/Google/Auth/LoginTicket.php CHANGED
@@ -1,69 +1,75 @@
1
- <?php
2
- /*
3
- * Copyright 2011 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * Class to hold information about an authenticated login.
22
- *
23
- * @author Brian Eaton <beaton@google.com>
24
- */
25
- class Google_Auth_LoginTicket
26
- {
27
- const USER_ATTR = "sub";
28
-
29
- // Information from id token envelope.
30
- private $envelope;
31
-
32
- // Information from id token payload.
33
- private $payload;
34
-
35
- /**
36
- * Creates a user based on the supplied token.
37
- *
38
- * @param string $envelope Header from a verified authentication token.
39
- * @param string $payload Information from a verified authentication token.
40
- */
41
- public function __construct($envelope, $payload)
42
- {
43
- $this->envelope = $envelope;
44
- $this->payload = $payload;
45
- }
46
-
47
- /**
48
- * Returns the numeric identifier for the user.
49
- * @throws Google_Auth_Exception
50
- * @return
51
- */
52
- public function getUserId()
53
- {
54
- if (array_key_exists(self::USER_ATTR, $this->payload)) {
55
- return $this->payload[self::USER_ATTR];
56
- }
57
- throw new Google_Auth_Exception("No user_id in token");
58
- }
59
-
60
- /**
61
- * Returns attributes from the login ticket. This can contain
62
- * various information about the user session.
63
- * @return array
64
- */
65
- public function getAttributes()
66
- {
67
- return array("envelope" => $this->envelope, "payload" => $this->payload);
68
- }
 
 
 
 
 
 
69
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2011 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * Class to hold information about an authenticated login.
21
+ *
22
+ * @author Brian Eaton <beaton@google.com>
23
+ */
24
+ class Google_Auth_LoginTicket
25
+ {
26
+ const USER_ATTR = "sub";
27
+ // Information from id token envelope.
28
+ private $envelope;
29
+ // Information from id token payload.
30
+ private $payload;
31
+
32
+ /**
33
+ * Creates a user based on the supplied token.
34
+ *
35
+ * @param string $envelope
36
+ * Header from a verified authentication token.
37
+ * @param string $payload
38
+ * Information from a verified authentication token.
39
+ */
40
+ public function __construct($envelope, $payload)
41
+ {
42
+ $this->envelope = $envelope;
43
+ $this->payload = $payload;
44
+ }
45
+
46
+ /**
47
+ * Returns the numeric identifier for the user.
48
+ *
49
+ * @throws Google_Auth_Exception
50
+ * @return
51
+ *
52
+ */
53
+ public function getUserId()
54
+ {
55
+ if (array_key_exists(self::USER_ATTR, $this->payload)) {
56
+ return $this->payload[self::USER_ATTR];
57
+ }
58
+ throw new Google_Auth_Exception("No user_id in token");
59
+ }
60
+
61
+ /**
62
+ * Returns attributes from the login ticket.
63
+ * This can contain
64
+ * various information about the user session.
65
+ *
66
+ * @return array
67
+ */
68
+ public function getAttributes()
69
+ {
70
+ return array(
71
+ "envelope" => $this->envelope,
72
+ "payload" => $this->payload
73
+ );
74
+ }
75
  }
tools/src/Google/Auth/OAuth2.php CHANGED
@@ -1,633 +1,539 @@
1
- <?php
2
- /*
3
- * Copyright 2008 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * Authentication class that deals with the OAuth 2 web-server authentication flow
22
- *
23
- * @author Chris Chabot <chabotc@google.com>
24
- * @author Chirag Shah <chirags@google.com>
25
- *
26
- */
27
- class Google_Auth_OAuth2 extends Google_Auth_Abstract
28
- {
29
- const OAUTH2_REVOKE_URI = 'https://accounts.google.com/o/oauth2/revoke';
30
- const OAUTH2_TOKEN_URI = 'https://accounts.google.com/o/oauth2/token';
31
- const OAUTH2_AUTH_URL = 'https://accounts.google.com/o/oauth2/auth';
32
- const CLOCK_SKEW_SECS = 300; // five minutes in seconds
33
- const AUTH_TOKEN_LIFETIME_SECS = 300; // five minutes in seconds
34
- const MAX_TOKEN_LIFETIME_SECS = 86400; // one day in seconds
35
- const OAUTH2_ISSUER = 'accounts.google.com';
36
-
37
- /** @var Google_Auth_AssertionCredentials $assertionCredentials */
38
- private $assertionCredentials;
39
-
40
- /**
41
- * @var string The state parameters for CSRF and other forgery protection.
42
- */
43
- private $state;
44
-
45
- /**
46
- * @var array The token bundle.
47
- */
48
- private $token = array();
49
-
50
- /**
51
- * @var Google_Client the base client
52
- */
53
- private $client;
54
-
55
- /**
56
- * Instantiates the class, but does not initiate the login flow, leaving it
57
- * to the discretion of the caller.
58
- */
59
- public function __construct(Google_Client $client)
60
- {
61
- $this->client = $client;
62
- }
63
-
64
- /**
65
- * Perform an authenticated / signed apiHttpRequest.
66
- * This function takes the apiHttpRequest, calls apiAuth->sign on it
67
- * (which can modify the request in what ever way fits the auth mechanism)
68
- * and then calls apiCurlIO::makeRequest on the signed request
69
- *
70
- * @param Google_Http_Request $request
71
- * @return Google_Http_Request The resulting HTTP response including the
72
- * responseHttpCode, responseHeaders and responseBody.
73
- */
74
- public function authenticatedRequest(Google_Http_Request $request)
75
- {
76
- $request = $this->sign($request);
77
- return $this->client->getIo()->makeRequest($request);
78
- }
79
-
80
- /**
81
- * @param string $code
82
- * @throws Google_Auth_Exception
83
- * @return string
84
- */
85
- public function authenticate($code)
86
- {
87
- if (strlen($code) == 0) {
88
- throw new Google_Auth_Exception("Invalid code");
89
- }
90
-
91
- // We got here from the redirect from a successful authorization grant,
92
- // fetch the access token
93
- $request = new Google_Http_Request(
94
- self::OAUTH2_TOKEN_URI,
95
- 'POST',
96
- array(),
97
- array(
98
- 'code' => $code,
99
- 'grant_type' => 'authorization_code',
100
- 'redirect_uri' => $this->client->getClassConfig($this, 'redirect_uri'),
101
- 'client_id' => $this->client->getClassConfig($this, 'client_id'),
102
- 'client_secret' => $this->client->getClassConfig($this, 'client_secret')
103
- )
104
- );
105
- $request->disableGzip();
106
- $response = $this->client->getIo()->makeRequest($request);
107
-
108
- if ($response->getResponseHttpCode() == 200) {
109
- $this->setAccessToken($response->getResponseBody());
110
- $this->token['created'] = time();
111
- return $this->getAccessToken();
112
- } else {
113
- $decodedResponse = json_decode($response->getResponseBody(), true);
114
- if ($decodedResponse != null && $decodedResponse['error']) {
115
- $errorText = $decodedResponse['error'];
116
- if (isset($decodedResponse['error_description'])) {
117
- $errorText .= ": " . $decodedResponse['error_description'];
118
- }
119
- }
120
- throw new Google_Auth_Exception(
121
- sprintf(
122
- "Error fetching OAuth2 access token, message: '%s'",
123
- $errorText
124
- ),
125
- $response->getResponseHttpCode()
126
- );
127
- }
128
- }
129
-
130
- /**
131
- * Create a URL to obtain user authorization.
132
- * The authorization endpoint allows the user to first
133
- * authenticate, and then grant/deny the access request.
134
- * @param string $scope The scope is expressed as a list of space-delimited strings.
135
- * @return string
136
- */
137
- public function createAuthUrl($scope)
138
- {
139
- $params = array(
140
- 'response_type' => 'code',
141
- 'redirect_uri' => $this->client->getClassConfig($this, 'redirect_uri'),
142
- 'client_id' => $this->client->getClassConfig($this, 'client_id'),
143
- 'scope' => $scope,
144
- 'access_type' => $this->client->getClassConfig($this, 'access_type'),
145
- );
146
-
147
- // Prefer prompt to approval prompt.
148
- if ($this->client->getClassConfig($this, 'prompt')) {
149
- $params = $this->maybeAddParam($params, 'prompt');
150
- } else {
151
- $params = $this->maybeAddParam($params, 'approval_prompt');
152
- }
153
- $params = $this->maybeAddParam($params, 'login_hint');
154
- $params = $this->maybeAddParam($params, 'hd');
155
- $params = $this->maybeAddParam($params, 'openid.realm');
156
- $params = $this->maybeAddParam($params, 'include_granted_scopes');
157
-
158
- // If the list of scopes contains plus.login, add request_visible_actions
159
- // to auth URL.
160
- $rva = $this->client->getClassConfig($this, 'request_visible_actions');
161
- if (strpos($scope, 'plus.login') && strlen($rva) > 0) {
162
- $params['request_visible_actions'] = $rva;
163
- }
164
-
165
- if (isset($this->state)) {
166
- $params['state'] = $this->state;
167
- }
168
-
169
- return self::OAUTH2_AUTH_URL . "?" . http_build_query($params, '', '&');
170
- }
171
-
172
- /**
173
- * @param string $token
174
- * @throws Google_Auth_Exception
175
- */
176
- public function setAccessToken($token)
177
- {
178
- $token = json_decode($token, true);
179
- if ($token == null) {
180
- throw new Google_Auth_Exception('Could not json decode the token');
181
- }
182
- if (! isset($token['access_token'])) {
183
- throw new Google_Auth_Exception("Invalid token format");
184
- }
185
- $this->token = $token;
186
- }
187
-
188
- public function getAccessToken()
189
- {
190
- return json_encode($this->token);
191
- }
192
-
193
- public function getRefreshToken()
194
- {
195
- if (array_key_exists('refresh_token', $this->token)) {
196
- return $this->token['refresh_token'];
197
- } else {
198
- return null;
199
- }
200
- }
201
-
202
- public function setState($state)
203
- {
204
- $this->state = $state;
205
- }
206
-
207
- public function setAssertionCredentials(Google_Auth_AssertionCredentials $creds)
208
- {
209
- $this->assertionCredentials = $creds;
210
- }
211
-
212
- /**
213
- * Include an accessToken in a given apiHttpRequest.
214
- * @param Google_Http_Request $request
215
- * @return Google_Http_Request
216
- * @throws Google_Auth_Exception
217
- */
218
- public function sign(Google_Http_Request $request)
219
- {
220
- // add the developer key to the request before signing it
221
- if ($this->client->getClassConfig($this, 'developer_key')) {
222
- $request->setQueryParam('key', $this->client->getClassConfig($this, 'developer_key'));
223
- }
224
-
225
- // Cannot sign the request without an OAuth access token.
226
- if (null == $this->token && null == $this->assertionCredentials) {
227
- return $request;
228
- }
229
-
230
- // Check if the token is set to expire in the next 30 seconds
231
- // (or has already expired).
232
- if ($this->isAccessTokenExpired()) {
233
- if ($this->assertionCredentials) {
234
- $this->refreshTokenWithAssertion();
235
- } else {
236
- $this->client->getLogger()->debug('OAuth2 access token expired');
237
- if (! array_key_exists('refresh_token', $this->token)) {
238
- $error = "The OAuth 2.0 access token has expired,"
239
- ." and a refresh token is not available. Refresh tokens"
240
- ." are not returned for responses that were auto-approved.";
241
-
242
- $this->client->getLogger()->error($error);
243
- throw new Google_Auth_Exception($error);
244
- }
245
- $this->refreshToken($this->token['refresh_token']);
246
- }
247
- }
248
-
249
- $this->client->getLogger()->debug('OAuth2 authentication');
250
-
251
- // Add the OAuth2 header to the request
252
- $request->setRequestHeaders(
253
- array('Authorization' => 'Bearer ' . $this->token['access_token'])
254
- );
255
-
256
- return $request;
257
- }
258
-
259
- /**
260
- * Fetches a fresh access token with the given refresh token.
261
- * @param string $refreshToken
262
- * @return void
263
- */
264
- public function refreshToken($refreshToken)
265
- {
266
- $this->refreshTokenRequest(
267
- array(
268
- 'client_id' => $this->client->getClassConfig($this, 'client_id'),
269
- 'client_secret' => $this->client->getClassConfig($this, 'client_secret'),
270
- 'refresh_token' => $refreshToken,
271
- 'grant_type' => 'refresh_token'
272
- )
273
- );
274
- }
275
-
276
- /**
277
- * Fetches a fresh access token with a given assertion token.
278
- * @param Google_Auth_AssertionCredentials $assertionCredentials optional.
279
- * @return void
280
- */
281
- public function refreshTokenWithAssertion($assertionCredentials = null)
282
- {
283
- if (!$assertionCredentials) {
284
- $assertionCredentials = $this->assertionCredentials;
285
- }
286
-
287
- $cacheKey = $assertionCredentials->getCacheKey();
288
-
289
- if ($cacheKey) {
290
- // We can check whether we have a token available in the
291
- // cache. If it is expired, we can retrieve a new one from
292
- // the assertion.
293
- $token = $this->client->getCache()->get($cacheKey);
294
- if ($token) {
295
- $this->setAccessToken($token);
296
- }
297
- if (!$this->isAccessTokenExpired()) {
298
- return;
299
- }
300
- }
301
-
302
- $this->client->getLogger()->debug('OAuth2 access token expired');
303
- $this->refreshTokenRequest(
304
- array(
305
- 'grant_type' => 'assertion',
306
- 'assertion_type' => $assertionCredentials->assertionType,
307
- 'assertion' => $assertionCredentials->generateAssertion(),
308
- )
309
- );
310
-
311
- if ($cacheKey) {
312
- // Attempt to cache the token.
313
- $this->client->getCache()->set(
314
- $cacheKey,
315
- $this->getAccessToken()
316
- );
317
- }
318
- }
319
-
320
- private function refreshTokenRequest($params)
321
- {
322
- if (isset($params['assertion'])) {
323
- $this->client->getLogger()->info(
324
- 'OAuth2 access token refresh with Signed JWT assertion grants.'
325
- );
326
- } else {
327
- $this->client->getLogger()->info('OAuth2 access token refresh');
328
- }
329
-
330
- $http = new Google_Http_Request(
331
- self::OAUTH2_TOKEN_URI,
332
- 'POST',
333
- array(),
334
- $params
335
- );
336
- $http->disableGzip();
337
- $request = $this->client->getIo()->makeRequest($http);
338
-
339
- $code = $request->getResponseHttpCode();
340
- $body = $request->getResponseBody();
341
- if (200 == $code) {
342
- $token = json_decode($body, true);
343
- if ($token == null) {
344
- throw new Google_Auth_Exception("Could not json decode the access token");
345
- }
346
-
347
- if (! isset($token['access_token']) || ! isset($token['expires_in'])) {
348
- throw new Google_Auth_Exception("Invalid token format");
349
- }
350
-
351
- if (isset($token['id_token'])) {
352
- $this->token['id_token'] = $token['id_token'];
353
- }
354
- $this->token['access_token'] = $token['access_token'];
355
- $this->token['expires_in'] = $token['expires_in'];
356
- $this->token['created'] = time();
357
- } else {
358
- throw new Google_Auth_Exception("Error refreshing the OAuth2 token, message: '$body'", $code);
359
- }
360
- }
361
-
362
- /**
363
- * Revoke an OAuth2 access token or refresh token. This method will revoke the current access
364
- * token, if a token isn't provided.
365
- * @throws Google_Auth_Exception
366
- * @param string|null $token The token (access token or a refresh token) that should be revoked.
367
- * @return boolean Returns True if the revocation was successful, otherwise False.
368
- */
369
- public function revokeToken($token = null)
370
- {
371
- if (!$token) {
372
- if (!$this->token) {
373
- // Not initialized, no token to actually revoke
374
- return false;
375
- } elseif (array_key_exists('refresh_token', $this->token)) {
376
- $token = $this->token['refresh_token'];
377
- } else {
378
- $token = $this->token['access_token'];
379
- }
380
- }
381
- $request = new Google_Http_Request(
382
- self::OAUTH2_REVOKE_URI,
383
- 'POST',
384
- array(),
385
- "token=$token"
386
- );
387
- $request->disableGzip();
388
- $response = $this->client->getIo()->makeRequest($request);
389
- $code = $response->getResponseHttpCode();
390
- if ($code == 200) {
391
- $this->token = null;
392
- return true;
393
- }
394
-
395
- return false;
396
- }
397
-
398
- /**
399
- * Returns if the access_token is expired.
400
- * @return bool Returns True if the access_token is expired.
401
- */
402
- public function isAccessTokenExpired()
403
- {
404
- if (!$this->token || !isset($this->token['created'])) {
405
- return true;
406
- }
407
-
408
- // If the token is set to expire in the next 30 seconds.
409
- $expired = ($this->token['created']
410
- + ($this->token['expires_in'] - 30)) < time();
411
-
412
- return $expired;
413
- }
414
-
415
- // Gets federated sign-on certificates to use for verifying identity tokens.
416
- // Returns certs as array structure, where keys are key ids, and values
417
- // are PEM encoded certificates.
418
- private function getFederatedSignOnCerts()
419
- {
420
- return $this->retrieveCertsFromLocation(
421
- $this->client->getClassConfig($this, 'federated_signon_certs_url')
422
- );
423
- }
424
-
425
- /**
426
- * Retrieve and cache a certificates file.
427
- *
428
- * @param $url string location
429
- * @throws Google_Auth_Exception
430
- * @return array certificates
431
- */
432
- public function retrieveCertsFromLocation($url)
433
- {
434
- // If we're retrieving a local file, just grab it.
435
- if ("http" != substr($url, 0, 4)) {
436
- $file = file_get_contents($url);
437
- if ($file) {
438
- return json_decode($file, true);
439
- } else {
440
- throw new Google_Auth_Exception(
441
- "Failed to retrieve verification certificates: '" .
442
- $url . "'."
443
- );
444
- }
445
- }
446
-
447
- // This relies on makeRequest caching certificate responses.
448
- $request = $this->client->getIo()->makeRequest(
449
- new Google_Http_Request(
450
- $url
451
- )
452
- );
453
- if ($request->getResponseHttpCode() == 200) {
454
- $certs = json_decode($request->getResponseBody(), true);
455
- if ($certs) {
456
- return $certs;
457
- }
458
- }
459
- throw new Google_Auth_Exception(
460
- "Failed to retrieve verification certificates: '" .
461
- $request->getResponseBody() . "'.",
462
- $request->getResponseHttpCode()
463
- );
464
- }
465
-
466
- /**
467
- * Verifies an id token and returns the authenticated apiLoginTicket.
468
- * Throws an exception if the id token is not valid.
469
- * The audience parameter can be used to control which id tokens are
470
- * accepted. By default, the id token must have been issued to this OAuth2 client.
471
- *
472
- * @param $id_token
473
- * @param $audience
474
- * @return Google_Auth_LoginTicket
475
- */
476
- public function verifyIdToken($id_token = null, $audience = null)
477
- {
478
- if (!$id_token) {
479
- $id_token = $this->token['id_token'];
480
- }
481
- $certs = $this->getFederatedSignonCerts();
482
- if (!$audience) {
483
- $audience = $this->client->getClassConfig($this, 'client_id');
484
- }
485
-
486
- return $this->verifySignedJwtWithCerts($id_token, $certs, $audience, self::OAUTH2_ISSUER);
487
- }
488
-
489
- /**
490
- * Verifies the id token, returns the verified token contents.
491
- *
492
- * @param $jwt string the token
493
- * @param $certs array of certificates
494
- * @param $required_audience string the expected consumer of the token
495
- * @param [$issuer] the expected issues, defaults to Google
496
- * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS
497
- * @throws Google_Auth_Exception
498
- * @return mixed token information if valid, false if not
499
- */
500
- public function verifySignedJwtWithCerts(
501
- $jwt,
502
- $certs,
503
- $required_audience,
504
- $issuer = null,
505
- $max_expiry = null
506
- ) {
507
- if (!$max_expiry) {
508
- // Set the maximum time we will accept a token for.
509
- $max_expiry = self::MAX_TOKEN_LIFETIME_SECS;
510
- }
511
-
512
- $segments = explode(".", $jwt);
513
- if (count($segments) != 3) {
514
- throw new Google_Auth_Exception("Wrong number of segments in token: $jwt");
515
- }
516
- $signed = $segments[0] . "." . $segments[1];
517
- $signature = Google_Utils::urlSafeB64Decode($segments[2]);
518
-
519
- // Parse envelope.
520
- $envelope = json_decode(Google_Utils::urlSafeB64Decode($segments[0]), true);
521
- if (!$envelope) {
522
- throw new Google_Auth_Exception("Can't parse token envelope: " . $segments[0]);
523
- }
524
-
525
- // Parse token
526
- $json_body = Google_Utils::urlSafeB64Decode($segments[1]);
527
- $payload = json_decode($json_body, true);
528
- if (!$payload) {
529
- throw new Google_Auth_Exception("Can't parse token payload: " . $segments[1]);
530
- }
531
-
532
- // Check signature
533
- $verified = false;
534
- foreach ($certs as $keyName => $pem) {
535
- $public_key = new Google_Verifier_Pem($pem);
536
- if ($public_key->verify($signed, $signature)) {
537
- $verified = true;
538
- break;
539
- }
540
- }
541
-
542
- if (!$verified) {
543
- throw new Google_Auth_Exception("Invalid token signature: $jwt");
544
- }
545
-
546
- // Check issued-at timestamp
547
- $iat = 0;
548
- if (array_key_exists("iat", $payload)) {
549
- $iat = $payload["iat"];
550
- }
551
- if (!$iat) {
552
- throw new Google_Auth_Exception("No issue time in token: $json_body");
553
- }
554
- $earliest = $iat - self::CLOCK_SKEW_SECS;
555
-
556
- // Check expiration timestamp
557
- $now = time();
558
- $exp = 0;
559
- if (array_key_exists("exp", $payload)) {
560
- $exp = $payload["exp"];
561
- }
562
- if (!$exp) {
563
- throw new Google_Auth_Exception("No expiration time in token: $json_body");
564
- }
565
- if ($exp >= $now + $max_expiry) {
566
- throw new Google_Auth_Exception(
567
- sprintf("Expiration time too far in future: %s", $json_body)
568
- );
569
- }
570
-
571
- $latest = $exp + self::CLOCK_SKEW_SECS;
572
- if ($now < $earliest) {
573
- throw new Google_Auth_Exception(
574
- sprintf(
575
- "Token used too early, %s < %s: %s",
576
- $now,
577
- $earliest,
578
- $json_body
579
- )
580
- );
581
- }
582
- if ($now > $latest) {
583
- throw new Google_Auth_Exception(
584
- sprintf(
585
- "Token used too late, %s > %s: %s",
586
- $now,
587
- $latest,
588
- $json_body
589
- )
590
- );
591
- }
592
-
593
- $iss = $payload['iss'];
594
- if ($issuer && $iss != $issuer) {
595
- throw new Google_Auth_Exception(
596
- sprintf(
597
- "Invalid issuer, %s != %s: %s",
598
- $iss,
599
- $issuer,
600
- $json_body
601
- )
602
- );
603
- }
604
-
605
- // Check audience
606
- $aud = $payload["aud"];
607
- if ($aud != $required_audience) {
608
- throw new Google_Auth_Exception(
609
- sprintf(
610
- "Wrong recipient, %s != %s:",
611
- $aud,
612
- $required_audience,
613
- $json_body
614
- )
615
- );
616
- }
617
-
618
- // All good.
619
- return new Google_Auth_LoginTicket($envelope, $payload);
620
- }
621
-
622
- /**
623
- * Add a parameter to the auth params if not empty string.
624
- */
625
- private function maybeAddParam($params, $name)
626
- {
627
- $param = $this->client->getClassConfig($this, $name);
628
- if ($param != '') {
629
- $params[$name] = $param;
630
- }
631
- return $params;
632
- }
633
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2008 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * Authentication class that deals with the OAuth 2 web-server authentication flow
21
+ *
22
+ * @author Chris Chabot <chabotc@google.com>
23
+ * @author Chirag Shah <chirags@google.com>
24
+ *
25
+ */
26
+ class Google_Auth_OAuth2 extends Google_Auth_Abstract
27
+ {
28
+ const OAUTH2_REVOKE_URI = 'https://accounts.google.com/o/oauth2/revoke';
29
+ const OAUTH2_TOKEN_URI = 'https://accounts.google.com/o/oauth2/token';
30
+ const OAUTH2_AUTH_URL = 'https://accounts.google.com/o/oauth2/auth';
31
+ const CLOCK_SKEW_SECS = 300;
32
+ // five minutes in seconds
33
+ const AUTH_TOKEN_LIFETIME_SECS = 300;
34
+ // five minutes in seconds
35
+ const MAX_TOKEN_LIFETIME_SECS = 86400;
36
+ // one day in seconds
37
+ const OAUTH2_ISSUER = 'accounts.google.com';
38
+ /**
39
+ *
40
+ * @var Google_Auth_AssertionCredentials $assertionCredentials
41
+ */
42
+ private $assertionCredentials;
43
+ /**
44
+ *
45
+ * @var string The state parameters for CSRF and other forgery protection.
46
+ */
47
+ private $state;
48
+ /**
49
+ *
50
+ * @var array The token bundle.
51
+ */
52
+ private $token = array();
53
+ /**
54
+ *
55
+ * @var Google_Client the base client
56
+ */
57
+ private $client;
58
+
59
+ /**
60
+ * Instantiates the class, but does not initiate the login flow, leaving it
61
+ * to the discretion of the caller.
62
+ */
63
+ public function __construct(Google_Client $client)
64
+ {
65
+ $this->client = $client;
66
+ }
67
+
68
+ /**
69
+ * Perform an authenticated / signed apiHttpRequest.
70
+ * This function takes the apiHttpRequest, calls apiAuth->sign on it
71
+ * (which can modify the request in what ever way fits the auth mechanism)
72
+ * and then calls apiCurlIO::makeRequest on the signed request
73
+ *
74
+ * @param Google_Http_Request $request
75
+ * @return Google_Http_Request The resulting HTTP response including the
76
+ * responseHttpCode, responseHeaders and responseBody.
77
+ */
78
+ public function authenticatedRequest(Google_Http_Request $request)
79
+ {
80
+ $request = $this->sign($request);
81
+ return $this->client->getIo()->makeRequest($request);
82
+ }
83
+
84
+ /**
85
+ *
86
+ * @param string $code
87
+ * @throws Google_Auth_Exception
88
+ * @return string
89
+ */
90
+ public function authenticate($code)
91
+ {
92
+ if (strlen($code) == 0) {
93
+ throw new Google_Auth_Exception("Invalid code");
94
+ }
95
+ // We got here from the redirect from a successful authorization grant,
96
+ // fetch the access token
97
+ $request = new Google_Http_Request(self::OAUTH2_TOKEN_URI, 'POST', array(), array(
98
+ 'code' => $code,
99
+ 'grant_type' => 'authorization_code',
100
+ 'redirect_uri' => $this->client->getClassConfig($this, 'redirect_uri'),
101
+ 'client_id' => $this->client->getClassConfig($this, 'client_id'),
102
+ 'client_secret' => $this->client->getClassConfig($this, 'client_secret')
103
+ ));
104
+ $request->disableGzip();
105
+ $response = $this->client->getIo()->makeRequest($request);
106
+ if ($response->getResponseHttpCode() == 200) {
107
+ $this->setAccessToken($response->getResponseBody());
108
+ $this->token['created'] = time();
109
+ return $this->getAccessToken();
110
+ } else {
111
+ $decodedResponse = json_decode($response->getResponseBody(), true);
112
+ if ($decodedResponse != null && $decodedResponse['error']) {
113
+ $errorText = $decodedResponse['error'];
114
+ if (isset($decodedResponse['error_description'])) {
115
+ $errorText .= ": " . $decodedResponse['error_description'];
116
+ }
117
+ }
118
+ throw new Google_Auth_Exception(sprintf("Error fetching OAuth2 access token, message: '%s'", $errorText), $response->getResponseHttpCode());
119
+ }
120
+ }
121
+
122
+ /**
123
+ * Create a URL to obtain user authorization.
124
+ * The authorization endpoint allows the user to first
125
+ * authenticate, and then grant/deny the access request.
126
+ *
127
+ * @param string $scope
128
+ * The scope is expressed as a list of space-delimited strings.
129
+ * @return string
130
+ */
131
+ public function createAuthUrl($scope)
132
+ {
133
+ $params = array(
134
+ 'response_type' => 'code',
135
+ 'redirect_uri' => $this->client->getClassConfig($this, 'redirect_uri'),
136
+ 'client_id' => $this->client->getClassConfig($this, 'client_id'),
137
+ 'scope' => $scope,
138
+ 'access_type' => $this->client->getClassConfig($this, 'access_type')
139
+ );
140
+ // Prefer prompt to approval prompt.
141
+ if ($this->client->getClassConfig($this, 'prompt')) {
142
+ $params = $this->maybeAddParam($params, 'prompt');
143
+ } else {
144
+ $params = $this->maybeAddParam($params, 'approval_prompt');
145
+ }
146
+ $params = $this->maybeAddParam($params, 'login_hint');
147
+ $params = $this->maybeAddParam($params, 'hd');
148
+ $params = $this->maybeAddParam($params, 'openid.realm');
149
+ $params = $this->maybeAddParam($params, 'include_granted_scopes');
150
+ // If the list of scopes contains plus.login, add request_visible_actions
151
+ // to auth URL.
152
+ $rva = $this->client->getClassConfig($this, 'request_visible_actions');
153
+ if (strpos($scope, 'plus.login') && strlen($rva) > 0) {
154
+ $params['request_visible_actions'] = $rva;
155
+ }
156
+ if (isset($this->state)) {
157
+ $params['state'] = $this->state;
158
+ }
159
+ return self::OAUTH2_AUTH_URL . "?" . http_build_query($params, '', '&');
160
+ }
161
+
162
+ /**
163
+ *
164
+ * @param string $token
165
+ * @throws Google_Auth_Exception
166
+ */
167
+ public function setAccessToken($token)
168
+ {
169
+ $token = json_decode($token, true);
170
+ if ($token == null) {
171
+ throw new Google_Auth_Exception('Could not json decode the token');
172
+ }
173
+ if (! isset($token['access_token'])) {
174
+ throw new Google_Auth_Exception("Invalid token format");
175
+ }
176
+ $this->token = $token;
177
+ }
178
+
179
+ public function getAccessToken()
180
+ {
181
+ return json_encode($this->token);
182
+ }
183
+
184
+ public function getRefreshToken()
185
+ {
186
+ if (array_key_exists('refresh_token', $this->token)) {
187
+ return $this->token['refresh_token'];
188
+ } else {
189
+ return null;
190
+ }
191
+ }
192
+
193
+ public function setState($state)
194
+ {
195
+ $this->state = $state;
196
+ }
197
+
198
+ public function setAssertionCredentials(Google_Auth_AssertionCredentials $creds)
199
+ {
200
+ $this->assertionCredentials = $creds;
201
+ }
202
+
203
+ /**
204
+ * Include an accessToken in a given apiHttpRequest.
205
+ *
206
+ * @param Google_Http_Request $request
207
+ * @return Google_Http_Request
208
+ * @throws Google_Auth_Exception
209
+ */
210
+ public function sign(Google_Http_Request $request)
211
+ {
212
+ // add the developer key to the request before signing it
213
+ if ($this->client->getClassConfig($this, 'developer_key')) {
214
+ $request->setQueryParam('key', $this->client->getClassConfig($this, 'developer_key'));
215
+ }
216
+ // Cannot sign the request without an OAuth access token.
217
+ if (null == $this->token && null == $this->assertionCredentials) {
218
+ return $request;
219
+ }
220
+ // Check if the token is set to expire in the next 30 seconds
221
+ // (or has already expired).
222
+ if ($this->isAccessTokenExpired()) {
223
+ if ($this->assertionCredentials) {
224
+ $this->refreshTokenWithAssertion();
225
+ } else {
226
+ $this->client->getLogger()->debug('OAuth2 access token expired');
227
+ if (! array_key_exists('refresh_token', $this->token)) {
228
+ $error = "The OAuth 2.0 access token has expired," . " and a refresh token is not available. Refresh tokens" . " are not returned for responses that were auto-approved.";
229
+ $this->client->getLogger()->error($error);
230
+ throw new Google_Auth_Exception($error);
231
+ }
232
+ $this->refreshToken($this->token['refresh_token']);
233
+ }
234
+ }
235
+ $this->client->getLogger()->debug('OAuth2 authentication');
236
+ // Add the OAuth2 header to the request
237
+ $request->setRequestHeaders(array(
238
+ 'Authorization' => 'Bearer ' . $this->token['access_token']
239
+ ));
240
+ return $request;
241
+ }
242
+
243
+ /**
244
+ * Fetches a fresh access token with the given refresh token.
245
+ *
246
+ * @param string $refreshToken
247
+ * @return void
248
+ */
249
+ public function refreshToken($refreshToken)
250
+ {
251
+ $this->refreshTokenRequest(array(
252
+ 'client_id' => $this->client->getClassConfig($this, 'client_id'),
253
+ 'client_secret' => $this->client->getClassConfig($this, 'client_secret'),
254
+ 'refresh_token' => $refreshToken,
255
+ 'grant_type' => 'refresh_token'
256
+ ));
257
+ }
258
+
259
+ /**
260
+ * Fetches a fresh access token with a given assertion token.
261
+ *
262
+ * @param Google_Auth_AssertionCredentials $assertionCredentials
263
+ * optional.
264
+ * @return void
265
+ */
266
+ public function refreshTokenWithAssertion($assertionCredentials = null)
267
+ {
268
+ if (! $assertionCredentials) {
269
+ $assertionCredentials = $this->assertionCredentials;
270
+ }
271
+ $cacheKey = $assertionCredentials->getCacheKey();
272
+ if ($cacheKey) {
273
+ // We can check whether we have a token available in the
274
+ // cache. If it is expired, we can retrieve a new one from
275
+ // the assertion.
276
+ $token = $this->client->getCache()->get($cacheKey);
277
+ if ($token) {
278
+ $this->setAccessToken($token);
279
+ }
280
+ if (! $this->isAccessTokenExpired()) {
281
+ return;
282
+ }
283
+ }
284
+ $this->client->getLogger()->debug('OAuth2 access token expired');
285
+ $this->refreshTokenRequest(array(
286
+ 'grant_type' => 'assertion',
287
+ 'assertion_type' => $assertionCredentials->assertionType,
288
+ 'assertion' => $assertionCredentials->generateAssertion()
289
+ ));
290
+ if ($cacheKey) {
291
+ // Attempt to cache the token.
292
+ $this->client->getCache()->set($cacheKey, $this->getAccessToken());
293
+ }
294
+ }
295
+
296
+ private function refreshTokenRequest($params)
297
+ {
298
+ if (isset($params['assertion'])) {
299
+ $this->client->getLogger()->info('OAuth2 access token refresh with Signed JWT assertion grants.');
300
+ } else {
301
+ $this->client->getLogger()->info('OAuth2 access token refresh');
302
+ }
303
+ $http = new Google_Http_Request(self::OAUTH2_TOKEN_URI, 'POST', array(), $params);
304
+ $http->disableGzip();
305
+ $request = $this->client->getIo()->makeRequest($http);
306
+ $code = $request->getResponseHttpCode();
307
+ $body = $request->getResponseBody();
308
+ if (200 == $code) {
309
+ $token = json_decode($body, true);
310
+ if ($token == null) {
311
+ throw new Google_Auth_Exception("Could not json decode the access token");
312
+ }
313
+ if (! isset($token['access_token']) || ! isset($token['expires_in'])) {
314
+ throw new Google_Auth_Exception("Invalid token format");
315
+ }
316
+ if (isset($token['id_token'])) {
317
+ $this->token['id_token'] = $token['id_token'];
318
+ }
319
+ $this->token['access_token'] = $token['access_token'];
320
+ $this->token['expires_in'] = $token['expires_in'];
321
+ $this->token['created'] = time();
322
+ } else {
323
+ throw new Google_Auth_Exception("Error refreshing the OAuth2 token, message: '$body'", $code);
324
+ }
325
+ }
326
+
327
+ /**
328
+ * Revoke an OAuth2 access token or refresh token.
329
+ * This method will revoke the current access
330
+ * token, if a token isn't provided.
331
+ *
332
+ * @throws Google_Auth_Exception
333
+ * @param string|null $token
334
+ * The token (access token or a refresh token) that should be revoked.
335
+ * @return boolean Returns True if the revocation was successful, otherwise False.
336
+ */
337
+ public function revokeToken($token = null)
338
+ {
339
+ if (! $token) {
340
+ if (! $this->token) {
341
+ // Not initialized, no token to actually revoke
342
+ return false;
343
+ } elseif (array_key_exists('refresh_token', $this->token)) {
344
+ $token = $this->token['refresh_token'];
345
+ } else {
346
+ $token = $this->token['access_token'];
347
+ }
348
+ }
349
+ $request = new Google_Http_Request(self::OAUTH2_REVOKE_URI, 'POST', array(), "token=$token");
350
+ $request->disableGzip();
351
+ $response = $this->client->getIo()->makeRequest($request);
352
+ $code = $response->getResponseHttpCode();
353
+ if ($code == 200) {
354
+ $this->token = null;
355
+ return true;
356
+ }
357
+ return false;
358
+ }
359
+
360
+ /**
361
+ * Returns if the access_token is expired.
362
+ *
363
+ * @return bool Returns True if the access_token is expired.
364
+ */
365
+ public function isAccessTokenExpired()
366
+ {
367
+ if (! $this->token || ! isset($this->token['created'])) {
368
+ return true;
369
+ }
370
+ // If the token is set to expire in the next 30 seconds.
371
+ $expired = ($this->token['created'] + ($this->token['expires_in'] - 30)) < time();
372
+ return $expired;
373
+ }
374
+ // Gets federated sign-on certificates to use for verifying identity tokens.
375
+ // Returns certs as array structure, where keys are key ids, and values
376
+ // are PEM encoded certificates.
377
+ private function getFederatedSignOnCerts()
378
+ {
379
+ return $this->retrieveCertsFromLocation($this->client->getClassConfig($this, 'federated_signon_certs_url'));
380
+ }
381
+
382
+ /**
383
+ * Retrieve and cache a certificates file.
384
+ *
385
+ * @param $url string
386
+ * location
387
+ * @throws Google_Auth_Exception
388
+ * @return array certificates
389
+ */
390
+ public function retrieveCertsFromLocation($url)
391
+ {
392
+ // If we're retrieving a local file, just grab it.
393
+ if ("http" != substr($url, 0, 4)) {
394
+ $file = file_get_contents($url);
395
+ if ($file) {
396
+ return json_decode($file, true);
397
+ } else {
398
+ throw new Google_Auth_Exception("Failed to retrieve verification certificates: '" . $url . "'.");
399
+ }
400
+ }
401
+ // This relies on makeRequest caching certificate responses.
402
+ $request = $this->client->getIo()->makeRequest(new Google_Http_Request($url));
403
+ if ($request->getResponseHttpCode() == 200) {
404
+ $certs = json_decode($request->getResponseBody(), true);
405
+ if ($certs) {
406
+ return $certs;
407
+ }
408
+ }
409
+ throw new Google_Auth_Exception("Failed to retrieve verification certificates: '" . $request->getResponseBody() . "'.", $request->getResponseHttpCode());
410
+ }
411
+
412
+ /**
413
+ * Verifies an id token and returns the authenticated apiLoginTicket.
414
+ * Throws an exception if the id token is not valid.
415
+ * The audience parameter can be used to control which id tokens are
416
+ * accepted. By default, the id token must have been issued to this OAuth2 client.
417
+ *
418
+ * @param
419
+ * $id_token
420
+ * @param
421
+ * $audience
422
+ * @return Google_Auth_LoginTicket
423
+ */
424
+ public function verifyIdToken($id_token = null, $audience = null)
425
+ {
426
+ if (! $id_token) {
427
+ $id_token = $this->token['id_token'];
428
+ }
429
+ $certs = $this->getFederatedSignonCerts();
430
+ if (! $audience) {
431
+ $audience = $this->client->getClassConfig($this, 'client_id');
432
+ }
433
+ return $this->verifySignedJwtWithCerts($id_token, $certs, $audience, self::OAUTH2_ISSUER);
434
+ }
435
+
436
+ /**
437
+ * Verifies the id token, returns the verified token contents.
438
+ *
439
+ * @param $jwt string
440
+ * the token
441
+ * @param $certs array
442
+ * of certificates
443
+ * @param $required_audience string
444
+ * the expected consumer of the token
445
+ * @param
446
+ * [$issuer] the expected issues, defaults to Google
447
+ * @param
448
+ * [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS
449
+ * @throws Google_Auth_Exception
450
+ * @return mixed token information if valid, false if not
451
+ */
452
+ public function verifySignedJwtWithCerts($jwt, $certs, $required_audience, $issuer = null, $max_expiry = null)
453
+ {
454
+ if (! $max_expiry) {
455
+ // Set the maximum time we will accept a token for.
456
+ $max_expiry = self::MAX_TOKEN_LIFETIME_SECS;
457
+ }
458
+ $segments = explode(".", $jwt);
459
+ if (count($segments) != 3) {
460
+ throw new Google_Auth_Exception("Wrong number of segments in token: $jwt");
461
+ }
462
+ $signed = $segments[0] . "." . $segments[1];
463
+ $signature = Google_Utils::urlSafeB64Decode($segments[2]);
464
+ // Parse envelope.
465
+ $envelope = json_decode(Google_Utils::urlSafeB64Decode($segments[0]), true);
466
+ if (! $envelope) {
467
+ throw new Google_Auth_Exception("Can't parse token envelope: " . $segments[0]);
468
+ }
469
+ // Parse token
470
+ $json_body = Google_Utils::urlSafeB64Decode($segments[1]);
471
+ $payload = json_decode($json_body, true);
472
+ if (! $payload) {
473
+ throw new Google_Auth_Exception("Can't parse token payload: " . $segments[1]);
474
+ }
475
+ // Check signature
476
+ $verified = false;
477
+ foreach ($certs as $keyName => $pem) {
478
+ $public_key = new Google_Verifier_Pem($pem);
479
+ if ($public_key->verify($signed, $signature)) {
480
+ $verified = true;
481
+ break;
482
+ }
483
+ }
484
+ if (! $verified) {
485
+ throw new Google_Auth_Exception("Invalid token signature: $jwt");
486
+ }
487
+ // Check issued-at timestamp
488
+ $iat = 0;
489
+ if (array_key_exists("iat", $payload)) {
490
+ $iat = $payload["iat"];
491
+ }
492
+ if (! $iat) {
493
+ throw new Google_Auth_Exception("No issue time in token: $json_body");
494
+ }
495
+ $earliest = $iat - self::CLOCK_SKEW_SECS;
496
+ // Check expiration timestamp
497
+ $now = time();
498
+ $exp = 0;
499
+ if (array_key_exists("exp", $payload)) {
500
+ $exp = $payload["exp"];
501
+ }
502
+ if (! $exp) {
503
+ throw new Google_Auth_Exception("No expiration time in token: $json_body");
504
+ }
505
+ if ($exp >= $now + $max_expiry) {
506
+ throw new Google_Auth_Exception(sprintf("Expiration time too far in future: %s", $json_body));
507
+ }
508
+ $latest = $exp + self::CLOCK_SKEW_SECS;
509
+ if ($now < $earliest) {
510
+ throw new Google_Auth_Exception(sprintf("Token used too early, %s < %s: %s", $now, $earliest, $json_body));
511
+ }
512
+ if ($now > $latest) {
513
+ throw new Google_Auth_Exception(sprintf("Token used too late, %s > %s: %s", $now, $latest, $json_body));
514
+ }
515
+ $iss = $payload['iss'];
516
+ if ($issuer && $iss != $issuer) {
517
+ throw new Google_Auth_Exception(sprintf("Invalid issuer, %s != %s: %s", $iss, $issuer, $json_body));
518
+ }
519
+ // Check audience
520
+ $aud = $payload["aud"];
521
+ if ($aud != $required_audience) {
522
+ throw new Google_Auth_Exception(sprintf("Wrong recipient, %s != %s:", $aud, $required_audience, $json_body));
523
+ }
524
+ // All good.
525
+ return new Google_Auth_LoginTicket($envelope, $payload);
526
+ }
527
+
528
+ /**
529
+ * Add a parameter to the auth params if not empty string.
530
+ */
531
+ private function maybeAddParam($params, $name)
532
+ {
533
+ $param = $this->client->getClassConfig($this, $name);
534
+ if ($param != '') {
535
+ $params[$name] = $param;
536
+ }
537
+ return $params;
538
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
539
  }
tools/src/Google/Auth/Simple.php CHANGED
@@ -1,64 +1,63 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * Simple API access implementation. Can either be used to make requests
22
- * completely unauthenticated, or by using a Simple API Access developer
23
- * key.
24
- * @author Chris Chabot <chabotc@google.com>
25
- * @author Chirag Shah <chirags@google.com>
26
- */
27
- class Google_Auth_Simple extends Google_Auth_Abstract
28
- {
29
- private $key = null;
30
- private $client;
31
-
32
- public function __construct(Google_Client $client, $config = null)
33
- {
34
- $this->client = $client;
35
- }
36
-
37
- /**
38
- * Perform an authenticated / signed apiHttpRequest.
39
- * This function takes the apiHttpRequest, calls apiAuth->sign on it
40
- * (which can modify the request in what ever way fits the auth mechanism)
41
- * and then calls apiCurlIO::makeRequest on the signed request
42
- *
43
- * @param Google_Http_Request $request
44
- * @return Google_Http_Request The resulting HTTP response including the
45
- * responseHttpCode, responseHeaders and responseBody.
46
- */
47
- public function authenticatedRequest(Google_Http_Request $request)
48
- {
49
- $request = $this->sign($request);
50
- return $this->io->makeRequest($request);
51
- }
52
-
53
- public function sign(Google_Http_Request $request)
54
- {
55
- $key = $this->client->getClassConfig($this, 'developer_key');
56
- if ($key) {
57
- $this->client->getLogger()->debug(
58
- 'Simple API Access developer key authentication'
59
- );
60
- $request->setQueryParam('key', $key);
61
- }
62
- return $request;
63
- }
64
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * Simple API access implementation.
21
+ * Can either be used to make requests
22
+ * completely unauthenticated, or by using a Simple API Access developer
23
+ * key.
24
+ *
25
+ * @author Chris Chabot <chabotc@google.com>
26
+ * @author Chirag Shah <chirags@google.com>
27
+ */
28
+ class Google_Auth_Simple extends Google_Auth_Abstract
29
+ {
30
+ private $key = null;
31
+ private $client;
32
+
33
+ public function __construct(Google_Client $client, $config = null)
34
+ {
35
+ $this->client = $client;
36
+ }
37
+
38
+ /**
39
+ * Perform an authenticated / signed apiHttpRequest.
40
+ * This function takes the apiHttpRequest, calls apiAuth->sign on it
41
+ * (which can modify the request in what ever way fits the auth mechanism)
42
+ * and then calls apiCurlIO::makeRequest on the signed request
43
+ *
44
+ * @param Google_Http_Request $request
45
+ * @return Google_Http_Request The resulting HTTP response including the
46
+ * responseHttpCode, responseHeaders and responseBody.
47
+ */
48
+ public function authenticatedRequest(Google_Http_Request $request)
49
+ {
50
+ $request = $this->sign($request);
51
+ return $this->io->makeRequest($request);
52
+ }
53
+
54
+ public function sign(Google_Http_Request $request)
55
+ {
56
+ $key = $this->client->getClassConfig($this, 'developer_key');
57
+ if ($key) {
58
+ $this->client->getLogger()->debug('Simple API Access developer key authentication');
59
+ $request->setQueryParam('key', $key);
60
+ }
61
+ return $request;
62
+ }
 
63
  }
tools/src/Google/Cache/Abstract.php CHANGED
@@ -1,53 +1,58 @@
1
- <?php
2
- /*
3
- * Copyright 2008 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * Abstract storage class
20
- *
21
- * @author Chris Chabot <chabotc@google.com>
22
- */
23
- abstract class Google_Cache_Abstract
24
- {
25
-
26
- abstract public function __construct(Google_Client $client);
27
-
28
- /**
29
- * Retrieves the data for the given key, or false if they
30
- * key is unknown or expired
31
- *
32
- * @param String $key The key who's data to retrieve
33
- * @param boolean|int $expiration Expiration time in seconds
34
- *
35
- */
36
- abstract public function get($key, $expiration = false);
37
-
38
- /**
39
- * Store the key => $value set. The $value is serialized
40
- * by this function so can be of any type
41
- *
42
- * @param string $key Key of the data
43
- * @param string $value data
44
- */
45
- abstract public function set($key, $value);
46
-
47
- /**
48
- * Removes the key/data pair for the given $key
49
- *
50
- * @param String $key
51
- */
52
- abstract public function delete($key);
 
 
 
 
 
53
  }
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2008 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ /**
19
+ * Abstract storage class
20
+ *
21
+ * @author Chris Chabot <chabotc@google.com>
22
+ */
23
+ abstract class Google_Cache_Abstract
24
+ {
25
+
26
+ abstract public function __construct(Google_Client $client);
27
+
28
+ /**
29
+ * Retrieves the data for the given key, or false if they
30
+ * key is unknown or expired
31
+ *
32
+ * @param String $key
33
+ * The key who's data to retrieve
34
+ * @param boolean|int $expiration
35
+ * Expiration time in seconds
36
+ *
37
+ */
38
+ abstract public function get($key, $expiration = false);
39
+
40
+ /**
41
+ * Store the key => $value set.
42
+ * The $value is serialized
43
+ * by this function so can be of any type
44
+ *
45
+ * @param string $key
46
+ * Key of the data
47
+ * @param string $value
48
+ * data
49
+ */
50
+ abstract public function set($key, $value);
51
+
52
+ /**
53
+ * Removes the key/data pair for the given $key
54
+ *
55
+ * @param String $key
56
+ */
57
+ abstract public function delete($key);
58
  }
tools/src/Google/Cache/Apc.php CHANGED
@@ -1,111 +1,107 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * A persistent storage class based on the APC cache, which is not
22
- * really very persistent, as soon as you restart your web server
23
- * the storage will be wiped, however for debugging and/or speed
24
- * it can be useful, and cache is a lot cheaper then storage.
25
- *
26
- * @author Chris Chabot <chabotc@google.com>
27
- */
28
- class Google_Cache_Apc extends Google_Cache_Abstract
29
- {
30
- /**
31
- * @var Google_Client the current client
32
- */
33
- private $client;
34
-
35
- public function __construct(Google_Client $client)
36
- {
37
- if (! function_exists('apc_add') ) {
38
- $error = "Apc functions not available";
39
-
40
- $client->getLogger()->error($error);
41
- throw new Google_Cache_Exception($error);
42
- }
43
-
44
- $this->client = $client;
45
- }
46
-
47
- /**
48
- * @inheritDoc
49
- */
50
- public function get($key, $expiration = false)
51
- {
52
- $ret = apc_fetch($key);
53
- if ($ret === false) {
54
- $this->client->getLogger()->debug(
55
- 'APC cache miss',
56
- array('key' => $key)
57
- );
58
- return false;
59
- }
60
- if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) {
61
- $this->client->getLogger()->debug(
62
- 'APC cache miss (expired)',
63
- array('key' => $key, 'var' => $ret)
64
- );
65
- $this->delete($key);
66
- return false;
67
- }
68
-
69
- $this->client->getLogger()->debug(
70
- 'APC cache hit',
71
- array('key' => $key, 'var' => $ret)
72
- );
73
-
74
- return $ret['data'];
75
- }
76
-
77
- /**
78
- * @inheritDoc
79
- */
80
- public function set($key, $value)
81
- {
82
- $var = array('time' => time(), 'data' => $value);
83
- $rc = apc_store($key, $var);
84
-
85
- if ($rc == false) {
86
- $this->client->getLogger()->error(
87
- 'APC cache set failed',
88
- array('key' => $key, 'var' => $var)
89
- );
90
- throw new Google_Cache_Exception("Couldn't store data");
91
- }
92
-
93
- $this->client->getLogger()->debug(
94
- 'APC cache set',
95
- array('key' => $key, 'var' => $var)
96
- );
97
- }
98
-
99
- /**
100
- * @inheritDoc
101
- * @param String $key
102
- */
103
- public function delete($key)
104
- {
105
- $this->client->getLogger()->debug(
106
- 'APC cache delete',
107
- array('key' => $key)
108
- );
109
- apc_delete($key);
110
- }
111
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * A persistent storage class based on the APC cache, which is not
21
+ * really very persistent, as soon as you restart your web server
22
+ * the storage will be wiped, however for debugging and/or speed
23
+ * it can be useful, and cache is a lot cheaper then storage.
24
+ *
25
+ * @author Chris Chabot <chabotc@google.com>
26
+ */
27
+ class Google_Cache_Apc extends Google_Cache_Abstract
28
+ {
29
+ /**
30
+ *
31
+ * @var Google_Client the current client
32
+ */
33
+ private $client;
34
+
35
+ public function __construct(Google_Client $client)
36
+ {
37
+ if (! function_exists('apc_add')) {
38
+ $error = "Apc functions not available";
39
+ $client->getLogger()->error($error);
40
+ throw new Google_Cache_Exception($error);
41
+ }
42
+ $this->client = $client;
43
+ }
44
+
45
+ /**
46
+ * @inheritDoc
47
+ */
48
+ public function get($key, $expiration = false)
49
+ {
50
+ $ret = apc_fetch($key);
51
+ if ($ret === false) {
52
+ $this->client->getLogger()->debug('APC cache miss', array(
53
+ 'key' => $key
54
+ ));
55
+ return false;
56
+ }
57
+ if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) {
58
+ $this->client->getLogger()->debug('APC cache miss (expired)', array(
59
+ 'key' => $key,
60
+ 'var' => $ret
61
+ ));
62
+ $this->delete($key);
63
+ return false;
64
+ }
65
+ $this->client->getLogger()->debug('APC cache hit', array(
66
+ 'key' => $key,
67
+ 'var' => $ret
68
+ ));
69
+ return $ret['data'];
70
+ }
71
+
72
+ /**
73
+ * @inheritDoc
74
+ */
75
+ public function set($key, $value)
76
+ {
77
+ $var = array(
78
+ 'time' => time(),
79
+ 'data' => $value
80
+ );
81
+ $rc = apc_store($key, $var);
82
+ if ($rc == false) {
83
+ $this->client->getLogger()->error('APC cache set failed', array(
84
+ 'key' => $key,
85
+ 'var' => $var
86
+ ));
87
+ throw new Google_Cache_Exception("Couldn't store data");
88
+ }
89
+ $this->client->getLogger()->debug('APC cache set', array(
90
+ 'key' => $key,
91
+ 'var' => $var
92
+ ));
93
+ }
94
+
95
+ /**
96
+ * @inheritDoc
97
+ *
98
+ * @param String $key
99
+ */
100
+ public function delete($key)
101
+ {
102
+ $this->client->getLogger()->debug('APC cache delete', array(
103
+ 'key' => $key
104
+ ));
105
+ apc_delete($key);
106
+ }
 
 
 
 
107
  }
tools/src/Google/Cache/Exception.php CHANGED
@@ -1,22 +1,21 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- class Google_Cache_Exception extends Google_Exception
21
- {
22
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2013 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ class Google_Cache_Exception extends Google_Exception
20
+ {
 
21
  }
tools/src/Google/Cache/File.php CHANGED
@@ -1,190 +1,182 @@
1
- <?php
2
- /*
3
- * Copyright 2008 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /*
21
- * This class implements a basic on disk storage. While that does
22
- * work quite well it's not the most elegant and scalable solution.
23
- * It will also get you into a heap of trouble when you try to run
24
- * this in a clustered environment.
25
- *
26
- * @author Chris Chabot <chabotc@google.com>
27
- */
28
- class Google_Cache_File extends Google_Cache_Abstract
29
- {
30
- const MAX_LOCK_RETRIES = 10;
31
- private $path;
32
- private $fh;
33
-
34
- /**
35
- * @var Google_Client the current client
36
- */
37
- private $client;
38
-
39
- public function __construct(Google_Client $client)
40
- {
41
- $this->client = $client;
42
- $this->path = $this->client->getClassConfig($this, 'directory');
43
- }
44
-
45
- public function get($key, $expiration = false)
46
- {
47
- $storageFile = $this->getCacheFile($key);
48
- $data = false;
49
-
50
- if (!file_exists($storageFile)) {
51
- $this->client->getLogger()->debug(
52
- 'File cache miss',
53
- array('key' => $key, 'file' => $storageFile)
54
- );
55
- return false;
56
- }
57
-
58
- if ($expiration) {
59
- $mtime = filemtime($storageFile);
60
- if ((time() - $mtime) >= $expiration) {
61
- $this->client->getLogger()->debug(
62
- 'File cache miss (expired)',
63
- array('key' => $key, 'file' => $storageFile)
64
- );
65
- $this->delete($key);
66
- return false;
67
- }
68
- }
69
-
70
- if ($this->acquireReadLock($storageFile)) {
71
- $data = fread($this->fh, filesize($storageFile));
72
- $data = unserialize($data);
73
- $this->unlock($storageFile);
74
- }
75
-
76
- $this->client->getLogger()->debug(
77
- 'File cache hit',
78
- array('key' => $key, 'file' => $storageFile, 'var' => $data)
79
- );
80
-
81
- return $data;
82
- }
83
-
84
- public function set($key, $value)
85
- {
86
- $storageFile = $this->getWriteableCacheFile($key);
87
- if ($this->acquireWriteLock($storageFile)) {
88
- // We serialize the whole request object, since we don't only want the
89
- // responseContent but also the postBody used, headers, size, etc.
90
- $data = serialize($value);
91
- $result = fwrite($this->fh, $data);
92
- $this->unlock($storageFile);
93
-
94
- $this->client->getLogger()->debug(
95
- 'File cache set',
96
- array('key' => $key, 'file' => $storageFile, 'var' => $value)
97
- );
98
- } else {
99
- $this->client->getLogger()->notice(
100
- 'File cache set failed',
101
- array('key' => $key, 'file' => $storageFile)
102
- );
103
- }
104
- }
105
-
106
- public function delete($key)
107
- {
108
- $file = $this->getCacheFile($key);
109
- if (file_exists($file) && !unlink($file)) {
110
- $this->client->getLogger()->error(
111
- 'File cache delete failed',
112
- array('key' => $key, 'file' => $file)
113
- );
114
- throw new Google_Cache_Exception("Cache file could not be deleted");
115
- }
116
-
117
- $this->client->getLogger()->debug(
118
- 'File cache delete',
119
- array('key' => $key, 'file' => $file)
120
- );
121
- }
122
-
123
- private function getWriteableCacheFile($file)
124
- {
125
- return $this->getCacheFile($file, true);
126
- }
127
-
128
- private function getCacheFile($file, $forWrite = false)
129
- {
130
- return $this->getCacheDir($file, $forWrite) . '/' . md5($file);
131
- }
132
-
133
- private function getCacheDir($file, $forWrite)
134
- {
135
- // use the first 2 characters of the hash as a directory prefix
136
- // this should prevent slowdowns due to huge directory listings
137
- // and thus give some basic amount of scalability
138
- $storageDir = $this->path . '/' . substr(md5($file), 0, 2);
139
- if ($forWrite && ! is_dir($storageDir)) {
140
- if (! mkdir($storageDir, 0755, true)) {
141
- $this->client->getLogger()->error(
142
- 'File cache creation failed',
143
- array('dir' => $storageDir)
144
- );
145
- throw new Google_Cache_Exception("Could not create storage directory: $storageDir");
146
- }
147
- }
148
- return $storageDir;
149
- }
150
-
151
- private function acquireReadLock($storageFile)
152
- {
153
- return $this->acquireLock(LOCK_SH, $storageFile);
154
- }
155
-
156
- private function acquireWriteLock($storageFile)
157
- {
158
- $rc = $this->acquireLock(LOCK_EX, $storageFile);
159
- if (!$rc) {
160
- $this->client->getLogger()->notice(
161
- 'File cache write lock failed',
162
- array('file' => $storageFile)
163
- );
164
- $this->delete($storageFile);
165
- }
166
- return $rc;
167
- }
168
-
169
- private function acquireLock($type, $storageFile)
170
- {
171
- $mode = $type == LOCK_EX ? "w" : "r";
172
- $this->fh = fopen($storageFile, $mode);
173
- $count = 0;
174
- while (!flock($this->fh, $type | LOCK_NB)) {
175
- // Sleep for 10ms.
176
- usleep(10000);
177
- if (++$count < self::MAX_LOCK_RETRIES) {
178
- return false;
179
- }
180
- }
181
- return true;
182
- }
183
-
184
- public function unlock($storageFile)
185
- {
186
- if ($this->fh) {
187
- flock($this->fh, LOCK_UN);
188
- }
189
- }
190
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2008 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /*
20
+ * This class implements a basic on disk storage. While that does
21
+ * work quite well it's not the most elegant and scalable solution.
22
+ * It will also get you into a heap of trouble when you try to run
23
+ * this in a clustered environment.
24
+ *
25
+ * @author Chris Chabot <chabotc@google.com>
26
+ */
27
+ class Google_Cache_File extends Google_Cache_Abstract
28
+ {
29
+ const MAX_LOCK_RETRIES = 10;
30
+ private $path;
31
+ private $fh;
32
+ /**
33
+ *
34
+ * @var Google_Client the current client
35
+ */
36
+ private $client;
37
+
38
+ public function __construct(Google_Client $client)
39
+ {
40
+ $this->client = $client;
41
+ $this->path = $this->client->getClassConfig($this, 'directory');
42
+ }
43
+
44
+ public function get($key, $expiration = false)
45
+ {
46
+ $storageFile = $this->getCacheFile($key);
47
+ $data = false;
48
+ if (! file_exists($storageFile)) {
49
+ $this->client->getLogger()->debug('File cache miss', array(
50
+ 'key' => $key,
51
+ 'file' => $storageFile
52
+ ));
53
+ return false;
54
+ }
55
+ if ($expiration) {
56
+ $mtime = filemtime($storageFile);
57
+ if ((time() - $mtime) >= $expiration) {
58
+ $this->client->getLogger()->debug('File cache miss (expired)', array(
59
+ 'key' => $key,
60
+ 'file' => $storageFile
61
+ ));
62
+ $this->delete($key);
63
+ return false;
64
+ }
65
+ }
66
+ if ($this->acquireReadLock($storageFile)) {
67
+ $data = fread($this->fh, filesize($storageFile));
68
+ $data = unserialize($data);
69
+ $this->unlock($storageFile);
70
+ }
71
+ $this->client->getLogger()->debug('File cache hit', array(
72
+ 'key' => $key,
73
+ 'file' => $storageFile,
74
+ 'var' => $data
75
+ ));
76
+ return $data;
77
+ }
78
+
79
+ public function set($key, $value)
80
+ {
81
+ $storageFile = $this->getWriteableCacheFile($key);
82
+ if ($this->acquireWriteLock($storageFile)) {
83
+ // We serialize the whole request object, since we don't only want the
84
+ // responseContent but also the postBody used, headers, size, etc.
85
+ $data = serialize($value);
86
+ $result = fwrite($this->fh, $data);
87
+ $this->unlock($storageFile);
88
+ $this->client->getLogger()->debug('File cache set', array(
89
+ 'key' => $key,
90
+ 'file' => $storageFile,
91
+ 'var' => $value
92
+ ));
93
+ } else {
94
+ $this->client->getLogger()->notice('File cache set failed', array(
95
+ 'key' => $key,
96
+ 'file' => $storageFile
97
+ ));
98
+ }
99
+ }
100
+
101
+ public function delete($key)
102
+ {
103
+ $file = $this->getCacheFile($key);
104
+ if (file_exists($file) && ! unlink($file)) {
105
+ $this->client->getLogger()->error('File cache delete failed', array(
106
+ 'key' => $key,
107
+ 'file' => $file
108
+ ));
109
+ throw new Google_Cache_Exception("Cache file could not be deleted");
110
+ }
111
+ $this->client->getLogger()->debug('File cache delete', array(
112
+ 'key' => $key,
113
+ 'file' => $file
114
+ ));
115
+ }
116
+
117
+ private function getWriteableCacheFile($file)
118
+ {
119
+ return $this->getCacheFile($file, true);
120
+ }
121
+
122
+ private function getCacheFile($file, $forWrite = false)
123
+ {
124
+ return $this->getCacheDir($file, $forWrite) . '/' . md5($file);
125
+ }
126
+
127
+ private function getCacheDir($file, $forWrite)
128
+ {
129
+ // use the first 2 characters of the hash as a directory prefix
130
+ // this should prevent slowdowns due to huge directory listings
131
+ // and thus give some basic amount of scalability
132
+ $storageDir = $this->path . '/' . substr(md5($file), 0, 2);
133
+ if ($forWrite && ! is_dir($storageDir)) {
134
+ if (! mkdir($storageDir, 0755, true)) {
135
+ $this->client->getLogger()->error('File cache creation failed', array(
136
+ 'dir' => $storageDir
137
+ ));
138
+ throw new Google_Cache_Exception("Could not create storage directory: $storageDir");
139
+ }
140
+ }
141
+ return $storageDir;
142
+ }
143
+
144
+ private function acquireReadLock($storageFile)
145
+ {
146
+ return $this->acquireLock(LOCK_SH, $storageFile);
147
+ }
148
+
149
+ private function acquireWriteLock($storageFile)
150
+ {
151
+ $rc = $this->acquireLock(LOCK_EX, $storageFile);
152
+ if (! $rc) {
153
+ $this->client->getLogger()->notice('File cache write lock failed', array(
154
+ 'file' => $storageFile
155
+ ));
156
+ $this->delete($storageFile);
157
+ }
158
+ return $rc;
159
+ }
160
+
161
+ private function acquireLock($type, $storageFile)
162
+ {
163
+ $mode = $type == LOCK_EX ? "w" : "r";
164
+ $this->fh = fopen($storageFile, $mode);
165
+ $count = 0;
166
+ while (! flock($this->fh, $type | LOCK_NB)) {
167
+ // Sleep for 10ms.
168
+ usleep(10000);
169
+ if (++ $count < self::MAX_LOCK_RETRIES) {
170
+ return false;
171
+ }
172
+ }
173
+ return true;
174
+ }
175
+
176
+ public function unlock($storageFile)
177
+ {
178
+ if ($this->fh) {
179
+ flock($this->fh, LOCK_UN);
180
+ }
181
+ }
 
 
 
 
 
 
 
 
182
  }
tools/src/Google/Cache/Memcache.php CHANGED
@@ -1,182 +1,173 @@
1
- <?php
2
- /*
3
- * Copyright 2008 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * A persistent storage class based on the memcache, which is not
22
- * really very persistent, as soon as you restart your memcache daemon
23
- * the storage will be wiped.
24
- *
25
- * Will use either the memcache or memcached extensions, preferring
26
- * memcached.
27
- *
28
- * @author Chris Chabot <chabotc@google.com>
29
- */
30
- class Google_Cache_Memcache extends Google_Cache_Abstract
31
- {
32
- private $connection = false;
33
- private $mc = false;
34
- private $host;
35
- private $port;
36
-
37
- /**
38
- * @var Google_Client the current client
39
- */
40
- private $client;
41
-
42
- public function __construct(Google_Client $client)
43
- {
44
- if (!function_exists('memcache_connect') && !class_exists("Memcached")) {
45
- $error = "Memcache functions not available";
46
-
47
- $client->getLogger()->error($error);
48
- throw new Google_Cache_Exception($error);
49
- }
50
-
51
- $this->client = $client;
52
-
53
- if ($client->isAppEngine()) {
54
- // No credentials needed for GAE.
55
- $this->mc = new Memcached();
56
- $this->connection = true;
57
- } else {
58
- $this->host = $client->getClassConfig($this, 'host');
59
- $this->port = $client->getClassConfig($this, 'port');
60
- if (empty($this->host) || (empty($this->port) && (string) $this->port != "0")) {
61
- $error = "You need to supply a valid memcache host and port";
62
-
63
- $client->getLogger()->error($error);
64
- throw new Google_Cache_Exception($error);
65
- }
66
- }
67
- }
68
-
69
- /**
70
- * @inheritDoc
71
- */
72
- public function get($key, $expiration = false)
73
- {
74
- $this->connect();
75
- $ret = false;
76
- if ($this->mc) {
77
- $ret = $this->mc->get($key);
78
- } else {
79
- $ret = memcache_get($this->connection, $key);
80
- }
81
- if ($ret === false) {
82
- $this->client->getLogger()->debug(
83
- 'Memcache cache miss',
84
- array('key' => $key)
85
- );
86
- return false;
87
- }
88
- if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) {
89
- $this->client->getLogger()->debug(
90
- 'Memcache cache miss (expired)',
91
- array('key' => $key, 'var' => $ret)
92
- );
93
- $this->delete($key);
94
- return false;
95
- }
96
-
97
- $this->client->getLogger()->debug(
98
- 'Memcache cache hit',
99
- array('key' => $key, 'var' => $ret)
100
- );
101
-
102
- return $ret['data'];
103
- }
104
-
105
- /**
106
- * @inheritDoc
107
- * @param string $key
108
- * @param string $value
109
- * @throws Google_Cache_Exception
110
- */
111
- public function set($key, $value)
112
- {
113
- $this->connect();
114
- // we store it with the cache_time default expiration so objects will at
115
- // least get cleaned eventually.
116
- $data = array('time' => time(), 'data' => $value);
117
- $rc = false;
118
- if ($this->mc) {
119
- $rc = $this->mc->set($key, $data);
120
- } else {
121
- $rc = memcache_set($this->connection, $key, $data, false);
122
- }
123
- if ($rc == false) {
124
- $this->client->getLogger()->error(
125
- 'Memcache cache set failed',
126
- array('key' => $key, 'var' => $data)
127
- );
128
-
129
- throw new Google_Cache_Exception("Couldn't store data in cache");
130
- }
131
-
132
- $this->client->getLogger()->debug(
133
- 'Memcache cache set',
134
- array('key' => $key, 'var' => $data)
135
- );
136
- }
137
-
138
- /**
139
- * @inheritDoc
140
- * @param String $key
141
- */
142
- public function delete($key)
143
- {
144
- $this->connect();
145
- if ($this->mc) {
146
- $this->mc->delete($key, 0);
147
- } else {
148
- memcache_delete($this->connection, $key, 0);
149
- }
150
-
151
- $this->client->getLogger()->debug(
152
- 'Memcache cache delete',
153
- array('key' => $key)
154
- );
155
- }
156
-
157
- /**
158
- * Lazy initialiser for memcache connection. Uses pconnect for to take
159
- * advantage of the persistence pool where possible.
160
- */
161
- private function connect()
162
- {
163
- if ($this->connection) {
164
- return;
165
- }
166
-
167
- if (class_exists("Memcached")) {
168
- $this->mc = new Memcached();
169
- $this->mc->addServer($this->host, $this->port);
170
- $this->connection = true;
171
- } else {
172
- $this->connection = memcache_pconnect($this->host, $this->port);
173
- }
174
-
175
- if (! $this->connection) {
176
- $error = "Couldn't connect to memcache server";
177
-
178
- $this->client->getLogger()->error($error);
179
- throw new Google_Cache_Exception($error);
180
- }
181
- }
182
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2008 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * A persistent storage class based on the memcache, which is not
21
+ * really very persistent, as soon as you restart your memcache daemon
22
+ * the storage will be wiped.
23
+ *
24
+ * Will use either the memcache or memcached extensions, preferring
25
+ * memcached.
26
+ *
27
+ * @author Chris Chabot <chabotc@google.com>
28
+ */
29
+ class Google_Cache_Memcache extends Google_Cache_Abstract
30
+ {
31
+ private $connection = false;
32
+ private $mc = false;
33
+ private $host;
34
+ private $port;
35
+ /**
36
+ *
37
+ * @var Google_Client the current client
38
+ */
39
+ private $client;
40
+
41
+ public function __construct(Google_Client $client)
42
+ {
43
+ if (! function_exists('memcache_connect') && ! class_exists("Memcached")) {
44
+ $error = "Memcache functions not available";
45
+ $client->getLogger()->error($error);
46
+ throw new Google_Cache_Exception($error);
47
+ }
48
+ $this->client = $client;
49
+ if ($client->isAppEngine()) {
50
+ // No credentials needed for GAE.
51
+ $this->mc = new Memcached();
52
+ $this->connection = true;
53
+ } else {
54
+ $this->host = $client->getClassConfig($this, 'host');
55
+ $this->port = $client->getClassConfig($this, 'port');
56
+ if (empty($this->host) || (empty($this->port) && (string) $this->port != "0")) {
57
+ $error = "You need to supply a valid memcache host and port";
58
+ $client->getLogger()->error($error);
59
+ throw new Google_Cache_Exception($error);
60
+ }
61
+ }
62
+ }
63
+
64
+ /**
65
+ * @inheritDoc
66
+ */
67
+ public function get($key, $expiration = false)
68
+ {
69
+ $this->connect();
70
+ $ret = false;
71
+ if ($this->mc) {
72
+ $ret = $this->mc->get($key);
73
+ } else {
74
+ $ret = memcache_get($this->connection, $key);
75
+ }
76
+ if ($ret === false) {
77
+ $this->client->getLogger()->debug('Memcache cache miss', array(
78
+ 'key' => $key
79
+ ));
80
+ return false;
81
+ }
82
+ if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) {
83
+ $this->client->getLogger()->debug('Memcache cache miss (expired)', array(
84
+ 'key' => $key,
85
+ 'var' => $ret
86
+ ));
87
+ $this->delete($key);
88
+ return false;
89
+ }
90
+ $this->client->getLogger()->debug('Memcache cache hit', array(
91
+ 'key' => $key,
92
+ 'var' => $ret
93
+ ));
94
+ return $ret['data'];
95
+ }
96
+
97
+ /**
98
+ * @inheritDoc
99
+ *
100
+ * @param string $key
101
+ * @param string $value
102
+ * @throws Google_Cache_Exception
103
+ */
104
+ public function set($key, $value)
105
+ {
106
+ $this->connect();
107
+ // we store it with the cache_time default expiration so objects will at
108
+ // least get cleaned eventually.
109
+ $data = array(
110
+ 'time' => time(),
111
+ 'data' => $value
112
+ );
113
+ $rc = false;
114
+ if ($this->mc) {
115
+ $rc = $this->mc->set($key, $data);
116
+ } else {
117
+ $rc = memcache_set($this->connection, $key, $data, false);
118
+ }
119
+ if ($rc == false) {
120
+ $this->client->getLogger()->error('Memcache cache set failed', array(
121
+ 'key' => $key,
122
+ 'var' => $data
123
+ ));
124
+ throw new Google_Cache_Exception("Couldn't store data in cache");
125
+ }
126
+ $this->client->getLogger()->debug('Memcache cache set', array(
127
+ 'key' => $key,
128
+ 'var' => $data
129
+ ));
130
+ }
131
+
132
+ /**
133
+ * @inheritDoc
134
+ *
135
+ * @param String $key
136
+ */
137
+ public function delete($key)
138
+ {
139
+ $this->connect();
140
+ if ($this->mc) {
141
+ $this->mc->delete($key, 0);
142
+ } else {
143
+ memcache_delete($this->connection, $key, 0);
144
+ }
145
+ $this->client->getLogger()->debug('Memcache cache delete', array(
146
+ 'key' => $key
147
+ ));
148
+ }
149
+
150
+ /**
151
+ * Lazy initialiser for memcache connection.
152
+ * Uses pconnect for to take
153
+ * advantage of the persistence pool where possible.
154
+ */
155
+ private function connect()
156
+ {
157
+ if ($this->connection) {
158
+ return;
159
+ }
160
+ if (class_exists("Memcached")) {
161
+ $this->mc = new Memcached();
162
+ $this->mc->addServer($this->host, $this->port);
163
+ $this->connection = true;
164
+ } else {
165
+ $this->connection = memcache_pconnect($this->host, $this->port);
166
+ }
167
+ if (! $this->connection) {
168
+ $error = "Couldn't connect to memcache server";
169
+ $this->client->getLogger()->error($error);
170
+ throw new Google_Cache_Exception($error);
171
+ }
172
+ }
 
 
 
 
 
 
 
 
 
173
  }
tools/src/Google/Cache/Null.php CHANGED
@@ -1,55 +1,54 @@
1
- <?php
2
- /*
3
- * Copyright 2014 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * A blank storage class, for cases where caching is not
22
- * required.
23
- */
24
- class Google_Cache_Null extends Google_Cache_Abstract
25
- {
26
- public function __construct(Google_Client $client)
27
- {
28
-
29
- }
30
-
31
- /**
32
- * @inheritDoc
33
- */
34
- public function get($key, $expiration = false)
35
- {
36
- return false;
37
- }
38
-
39
- /**
40
- * @inheritDoc
41
- */
42
- public function set($key, $value)
43
- {
44
- // Nop.
45
- }
46
-
47
- /**
48
- * @inheritDoc
49
- * @param String $key
50
- */
51
- public function delete($key)
52
- {
53
- // Nop.
54
- }
55
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * A blank storage class, for cases where caching is not
21
+ * required.
22
+ */
23
+ class Google_Cache_Null extends Google_Cache_Abstract
24
+ {
25
+
26
+ public function __construct(Google_Client $client)
27
+ {}
28
+
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ public function get($key, $expiration = false)
33
+ {
34
+ return false;
35
+ }
36
+
37
+ /**
38
+ * @inheritDoc
39
+ */
40
+ public function set($key, $value)
41
+ {
42
+ // Nop.
43
+ }
44
+
45
+ /**
46
+ * @inheritDoc
47
+ *
48
+ * @param String $key
49
+ */
50
+ public function delete($key)
51
+ {
52
+ // Nop.
53
+ }
 
54
  }
tools/src/Google/Client.php CHANGED
@@ -1,686 +1,752 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../autoload.php');
19
-
20
- /**
21
- * The Google API Client
22
- * http://code.google.com/p/google-api-php-client/
23
- *
24
- * @author Chris Chabot <chabotc@google.com>
25
- * @author Chirag Shah <chirags@google.com>
26
- */
27
- class Google_Client
28
- {
29
- const LIBVER = "1.1.2";
30
- const USER_AGENT_SUFFIX = "google-api-php-client/";
31
- /**
32
- * @var Google_Auth_Abstract $auth
33
- */
34
- private $auth;
35
-
36
- /**
37
- * @var Google_IO_Abstract $io
38
- */
39
- private $io;
40
-
41
- /**
42
- * @var Google_Cache_Abstract $cache
43
- */
44
- private $cache;
45
-
46
- /**
47
- * @var Google_Config $config
48
- */
49
- private $config;
50
-
51
- /**
52
- * @var Google_Logger_Abstract $logger
53
- */
54
- private $logger;
55
-
56
- /**
57
- * @var boolean $deferExecution
58
- */
59
- private $deferExecution = false;
60
-
61
- /** @var array $scopes */
62
- // Scopes requested by the client
63
- protected $requestedScopes = array();
64
-
65
- // definitions of services that are discovered.
66
- protected $services = array();
67
-
68
- // Used to track authenticated state, can't discover services after doing authenticate()
69
- private $authenticated = false;
70
-
71
- /**
72
- * Construct the Google Client.
73
- *
74
- * @param $config Google_Config or string for the ini file to load
75
- */
76
- public function __construct($config = null)
77
- {
78
- if (is_string($config) && strlen($config)) {
79
- $config = new Google_Config($config);
80
- } else if ( !($config instanceof Google_Config)) {
81
- $config = new Google_Config();
82
-
83
- if ($this->isAppEngine()) {
84
- // Automatically use Memcache if we're in AppEngine.
85
- $config->setCacheClass('Google_Cache_Memcache');
86
- }
87
-
88
- if (version_compare(phpversion(), "5.3.4", "<=") || $this->isAppEngine()) {
89
- // Automatically disable compress.zlib, as currently unsupported.
90
- $config->setClassConfig('Google_Http_Request', 'disable_gzip', true);
91
- }
92
- }
93
-
94
- if ($config->getIoClass() == Google_Config::USE_AUTO_IO_SELECTION) {
95
- if (function_exists('curl_version') && function_exists('curl_exec')
96
- && !$this->isAppEngine()) {
97
- $config->setIoClass("Google_IO_Curl");
98
- } else {
99
- $config->setIoClass("Google_IO_Stream");
100
- }
101
- }
102
-
103
- $this->config = $config;
104
- }
105
-
106
- /**
107
- * Get a string containing the version of the library.
108
- *
109
- * @return string
110
- */
111
- public function getLibraryVersion()
112
- {
113
- return self::LIBVER;
114
- }
115
-
116
- /**
117
- * Attempt to exchange a code for an valid authentication token.
118
- * Helper wrapped around the OAuth 2.0 implementation.
119
- *
120
- * @param $code string code from accounts.google.com
121
- * @return string token
122
- */
123
- public function authenticate($code)
124
- {
125
- $this->authenticated = true;
126
- return $this->getAuth()->authenticate($code);
127
- }
128
-
129
- /**
130
- * Set the auth config from the JSON string provided.
131
- * This structure should match the file downloaded from
132
- * the "Download JSON" button on in the Google Developer
133
- * Console.
134
- * @param string $json the configuration json
135
- * @throws Google_Exception
136
- */
137
- public function setAuthConfig($json)
138
- {
139
- $data = json_decode($json);
140
- $key = isset($data->installed) ? 'installed' : 'web';
141
- if (!isset($data->$key)) {
142
- throw new Google_Exception("Invalid client secret JSON file.");
143
- }
144
- $this->setClientId($data->$key->client_id);
145
- $this->setClientSecret($data->$key->client_secret);
146
- if (isset($data->$key->redirect_uris)) {
147
- $this->setRedirectUri($data->$key->redirect_uris[0]);
148
- }
149
- }
150
-
151
- /**
152
- * Set the auth config from the JSON file in the path
153
- * provided. This should match the file downloaded from
154
- * the "Download JSON" button on in the Google Developer
155
- * Console.
156
- * @param string $file the file location of the client json
157
- */
158
- public function setAuthConfigFile($file)
159
- {
160
- $this->setAuthConfig(file_get_contents($file));
161
- }
162
-
163
- /**
164
- * @throws Google_Auth_Exception
165
- * @return array
166
- * @visible For Testing
167
- */
168
- public function prepareScopes()
169
- {
170
- if (empty($this->requestedScopes)) {
171
- throw new Google_Auth_Exception("No scopes specified");
172
- }
173
- $scopes = implode(' ', $this->requestedScopes);
174
- return $scopes;
175
- }
176
-
177
- /**
178
- * Set the OAuth 2.0 access token using the string that resulted from calling createAuthUrl()
179
- * or Google_Client#getAccessToken().
180
- * @param string $accessToken JSON encoded string containing in the following format:
181
- * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer",
182
- * "expires_in":3600, "id_token":"TOKEN", "created":1320790426}
183
- */
184
- public function setAccessToken($accessToken)
185
- {
186
- if ($accessToken == 'null') {
187
- $accessToken = null;
188
- }
189
- $this->getAuth()->setAccessToken($accessToken);
190
- }
191
-
192
-
193
-
194
- /**
195
- * Set the authenticator object
196
- * @param Google_Auth_Abstract $auth
197
- */
198
- public function setAuth(Google_Auth_Abstract $auth)
199
- {
200
- $this->config->setAuthClass(get_class($auth));
201
- $this->auth = $auth;
202
- }
203
-
204
- /**
205
- * Set the IO object
206
- * @param Google_IO_Abstract $io
207
- */
208
- public function setIo(Google_IO_Abstract $io)
209
- {
210
- $this->config->setIoClass(get_class($io));
211
- $this->io = $io;
212
- }
213
-
214
- /**
215
- * Set the Cache object
216
- * @param Google_Cache_Abstract $cache
217
- */
218
- public function setCache(Google_Cache_Abstract $cache)
219
- {
220
- $this->config->setCacheClass(get_class($cache));
221
- $this->cache = $cache;
222
- }
223
-
224
- /**
225
- * Set the Logger object
226
- * @param Google_Logger_Abstract $logger
227
- */
228
- public function setLogger(Google_Logger_Abstract $logger)
229
- {
230
- $this->config->setLoggerClass(get_class($logger));
231
- $this->logger = $logger;
232
- }
233
-
234
- /**
235
- * Construct the OAuth 2.0 authorization request URI.
236
- * @return string
237
- */
238
- public function createAuthUrl()
239
- {
240
- $scopes = $this->prepareScopes();
241
- return $this->getAuth()->createAuthUrl($scopes);
242
- }
243
-
244
- /**
245
- * Get the OAuth 2.0 access token.
246
- * @return string $accessToken JSON encoded string in the following format:
247
- * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer",
248
- * "expires_in":3600,"id_token":"TOKEN", "created":1320790426}
249
- */
250
- public function getAccessToken()
251
- {
252
- $token = $this->getAuth()->getAccessToken();
253
- // The response is json encoded, so could be the string null.
254
- // It is arguable whether this check should be here or lower
255
- // in the library.
256
- return (null == $token || 'null' == $token || '[]' == $token) ? null : $token;
257
- }
258
-
259
- /**
260
- * Get the OAuth 2.0 refresh token.
261
- * @return string $refreshToken refresh token or null if not available
262
- */
263
- public function getRefreshToken()
264
- {
265
- return $this->getAuth()->getRefreshToken();
266
- }
267
-
268
- /**
269
- * Returns if the access_token is expired.
270
- * @return bool Returns True if the access_token is expired.
271
- */
272
- public function isAccessTokenExpired()
273
- {
274
- return $this->getAuth()->isAccessTokenExpired();
275
- }
276
-
277
- /**
278
- * Set OAuth 2.0 "state" parameter to achieve per-request customization.
279
- * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-3.1.2.2
280
- * @param string $state
281
- */
282
- public function setState($state)
283
- {
284
- $this->getAuth()->setState($state);
285
- }
286
-
287
- /**
288
- * @param string $accessType Possible values for access_type include:
289
- * {@code "offline"} to request offline access from the user.
290
- * {@code "online"} to request online access from the user.
291
- */
292
- public function setAccessType($accessType)
293
- {
294
- $this->config->setAccessType($accessType);
295
- }
296
-
297
- /**
298
- * @param string $approvalPrompt Possible values for approval_prompt include:
299
- * {@code "force"} to force the approval UI to appear. (This is the default value)
300
- * {@code "auto"} to request auto-approval when possible.
301
- */
302
- public function setApprovalPrompt($approvalPrompt)
303
- {
304
- $this->config->setApprovalPrompt($approvalPrompt);
305
- }
306
-
307
- /**
308
- * Set the login hint, email address or sub id.
309
- * @param string $loginHint
310
- */
311
- public function setLoginHint($loginHint)
312
- {
313
- $this->config->setLoginHint($loginHint);
314
- }
315
-
316
- /**
317
- * Set the application name, this is included in the User-Agent HTTP header.
318
- * @param string $applicationName
319
- */
320
- public function setApplicationName($applicationName)
321
- {
322
- $this->config->setApplicationName($applicationName);
323
- }
324
-
325
- /**
326
- * Set the OAuth 2.0 Client ID.
327
- * @param string $clientId
328
- */
329
- public function setClientId($clientId)
330
- {
331
- $this->config->setClientId($clientId);
332
- }
333
-
334
- /**
335
- * Set the OAuth 2.0 Client Secret.
336
- * @param string $clientSecret
337
- */
338
- public function setClientSecret($clientSecret)
339
- {
340
- $this->config->setClientSecret($clientSecret);
341
- }
342
-
343
- /**
344
- * Set the OAuth 2.0 Redirect URI.
345
- * @param string $redirectUri
346
- */
347
- public function setRedirectUri($redirectUri)
348
- {
349
- $this->config->setRedirectUri($redirectUri);
350
- }
351
-
352
- /**
353
- * If 'plus.login' is included in the list of requested scopes, you can use
354
- * this method to define types of app activities that your app will write.
355
- * You can find a list of available types here:
356
- * @link https://developers.google.com/+/api/moment-types
357
- *
358
- * @param array $requestVisibleActions Array of app activity types
359
- */
360
- public function setRequestVisibleActions($requestVisibleActions)
361
- {
362
- if (is_array($requestVisibleActions)) {
363
- $requestVisibleActions = join(" ", $requestVisibleActions);
364
- }
365
- $this->config->setRequestVisibleActions($requestVisibleActions);
366
- }
367
-
368
- /**
369
- * Set the developer key to use, these are obtained through the API Console.
370
- * @see http://code.google.com/apis/console-help/#generatingdevkeys
371
- * @param string $developerKey
372
- */
373
- public function setDeveloperKey($developerKey)
374
- {
375
- $this->config->setDeveloperKey($developerKey);
376
- }
377
-
378
- /**
379
- * Set the hd (hosted domain) parameter streamlines the login process for
380
- * Google Apps hosted accounts. By including the domain of the user, you
381
- * restrict sign-in to accounts at that domain.
382
- * @param $hd string - the domain to use.
383
- */
384
- public function setHostedDomain($hd)
385
- {
386
- $this->config->setHostedDomain($hd);
387
- }
388
-
389
- /**
390
- * Set the prompt hint. Valid values are none, consent and select_account.
391
- * If no value is specified and the user has not previously authorized
392
- * access, then the user is shown a consent screen.
393
- * @param $prompt string
394
- */
395
- public function setPrompt($prompt)
396
- {
397
- $this->config->setPrompt($prompt);
398
- }
399
-
400
- /**
401
- * openid.realm is a parameter from the OpenID 2.0 protocol, not from OAuth
402
- * 2.0. It is used in OpenID 2.0 requests to signify the URL-space for which
403
- * an authentication request is valid.
404
- * @param $realm string - the URL-space to use.
405
- */
406
- public function setOpenidRealm($realm)
407
- {
408
- $this->config->setOpenidRealm($realm);
409
- }
410
-
411
- /**
412
- * If this is provided with the value true, and the authorization request is
413
- * granted, the authorization will include any previous authorizations
414
- * granted to this user/application combination for other scopes.
415
- * @param $include boolean - the URL-space to use.
416
- */
417
- public function setIncludeGrantedScopes($include)
418
- {
419
- $this->config->setIncludeGrantedScopes($include);
420
- }
421
-
422
- /**
423
- * Fetches a fresh OAuth 2.0 access token with the given refresh token.
424
- * @param string $refreshToken
425
- */
426
- public function refreshToken($refreshToken)
427
- {
428
- $this->getAuth()->refreshToken($refreshToken);
429
- }
430
-
431
- /**
432
- * Revoke an OAuth2 access token or refresh token. This method will revoke the current access
433
- * token, if a token isn't provided.
434
- * @throws Google_Auth_Exception
435
- * @param string|null $token The token (access token or a refresh token) that should be revoked.
436
- * @return boolean Returns True if the revocation was successful, otherwise False.
437
- */
438
- public function revokeToken($token = null)
439
- {
440
- return $this->getAuth()->revokeToken($token);
441
- }
442
-
443
- /**
444
- * Verify an id_token. This method will verify the current id_token, if one
445
- * isn't provided.
446
- * @throws Google_Auth_Exception
447
- * @param string|null $token The token (id_token) that should be verified.
448
- * @return Google_Auth_LoginTicket Returns an apiLoginTicket if the verification was
449
- * successful.
450
- */
451
- public function verifyIdToken($token = null)
452
- {
453
- return $this->getAuth()->verifyIdToken($token);
454
- }
455
-
456
- /**
457
- * Verify a JWT that was signed with your own certificates.
458
- *
459
- * @param $id_token string The JWT token
460
- * @param $cert_location array of certificates
461
- * @param $audience string the expected consumer of the token
462
- * @param $issuer string the expected issuer, defaults to Google
463
- * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS
464
- * @return mixed token information if valid, false if not
465
- */
466
- public function verifySignedJwt($id_token, $cert_location, $audience, $issuer, $max_expiry = null)
467
- {
468
- $auth = new Google_Auth_OAuth2($this);
469
- $certs = $auth->retrieveCertsFromLocation($cert_location);
470
- return $auth->verifySignedJwtWithCerts($id_token, $certs, $audience, $issuer, $max_expiry);
471
- }
472
-
473
- /**
474
- * @param $creds Google_Auth_AssertionCredentials
475
- */
476
- public function setAssertionCredentials(Google_Auth_AssertionCredentials $creds)
477
- {
478
- $this->getAuth()->setAssertionCredentials($creds);
479
- }
480
-
481
- /**
482
- * Set the scopes to be requested. Must be called before createAuthUrl().
483
- * Will remove any previously configured scopes.
484
- * @param array $scopes, ie: array('https://www.googleapis.com/auth/plus.login',
485
- * 'https://www.googleapis.com/auth/moderator')
486
- */
487
- public function setScopes($scopes)
488
- {
489
- $this->requestedScopes = array();
490
- $this->addScope($scopes);
491
- }
492
-
493
- /**
494
- * This functions adds a scope to be requested as part of the OAuth2.0 flow.
495
- * Will append any scopes not previously requested to the scope parameter.
496
- * A single string will be treated as a scope to request. An array of strings
497
- * will each be appended.
498
- * @param $scope_or_scopes string|array e.g. "profile"
499
- */
500
- public function addScope($scope_or_scopes)
501
- {
502
- if (is_string($scope_or_scopes) && !in_array($scope_or_scopes, $this->requestedScopes)) {
503
- $this->requestedScopes[] = $scope_or_scopes;
504
- } else if (is_array($scope_or_scopes)) {
505
- foreach ($scope_or_scopes as $scope) {
506
- $this->addScope($scope);
507
- }
508
- }
509
- }
510
-
511
- /**
512
- * Returns the list of scopes requested by the client
513
- * @return array the list of scopes
514
- *
515
- */
516
- public function getScopes()
517
- {
518
- return $this->requestedScopes;
519
- }
520
-
521
- /**
522
- * Declare whether batch calls should be used. This may increase throughput
523
- * by making multiple requests in one connection.
524
- *
525
- * @param boolean $useBatch True if the batch support should
526
- * be enabled. Defaults to False.
527
- */
528
- public function setUseBatch($useBatch)
529
- {
530
- // This is actually an alias for setDefer.
531
- $this->setDefer($useBatch);
532
- }
533
-
534
- /**
535
- * Declare whether making API calls should make the call immediately, or
536
- * return a request which can be called with ->execute();
537
- *
538
- * @param boolean $defer True if calls should not be executed right away.
539
- */
540
- public function setDefer($defer)
541
- {
542
- $this->deferExecution = $defer;
543
- }
544
-
545
- /**
546
- * Helper method to execute deferred HTTP requests.
547
- *
548
- * @param $request Google_Http_Request|Google_Http_Batch
549
- * @throws Google_Exception
550
- * @return object of the type of the expected class or array.
551
- */
552
- public function execute($request)
553
- {
554
- if ($request instanceof Google_Http_Request) {
555
- $request->setUserAgent(
556
- $this->getApplicationName()
557
- . " " . self::USER_AGENT_SUFFIX
558
- . $this->getLibraryVersion()
559
- );
560
- if (!$this->getClassConfig("Google_Http_Request", "disable_gzip")) {
561
- $request->enableGzip();
562
- }
563
- $request->maybeMoveParametersToBody();
564
- return Google_Http_REST::execute($this, $request);
565
- } else if ($request instanceof Google_Http_Batch) {
566
- return $request->execute();
567
- } else {
568
- throw new Google_Exception("Do not know how to execute this type of object.");
569
- }
570
- }
571
-
572
- /**
573
- * Whether or not to return raw requests
574
- * @return boolean
575
- */
576
- public function shouldDefer()
577
- {
578
- return $this->deferExecution;
579
- }
580
-
581
- /**
582
- * @return Google_Auth_Abstract Authentication implementation
583
- */
584
- public function getAuth()
585
- {
586
- if (!isset($this->auth)) {
587
- $class = $this->config->getAuthClass();
588
- $this->auth = new $class($this);
589
- }
590
- return $this->auth;
591
- }
592
-
593
- /**
594
- * @return Google_IO_Abstract IO implementation
595
- */
596
- public function getIo()
597
- {
598
- if (!isset($this->io)) {
599
- $class = $this->config->getIoClass();
600
- $this->io = new $class($this);
601
- }
602
- return $this->io;
603
- }
604
-
605
- /**
606
- * @return Google_Cache_Abstract Cache implementation
607
- */
608
- public function getCache()
609
- {
610
- if (!isset($this->cache)) {
611
- $class = $this->config->getCacheClass();
612
- $this->cache = new $class($this);
613
- }
614
- return $this->cache;
615
- }
616
-
617
- /**
618
- * @return Google_Logger_Abstract Logger implementation
619
- */
620
- public function getLogger()
621
- {
622
- if (!isset($this->logger)) {
623
- $class = $this->config->getLoggerClass();
624
- $this->logger = new $class($this);
625
- }
626
- return $this->logger;
627
- }
628
-
629
- /**
630
- * Retrieve custom configuration for a specific class.
631
- * @param $class string|object - class or instance of class to retrieve
632
- * @param $key string optional - key to retrieve
633
- * @return array
634
- */
635
- public function getClassConfig($class, $key = null)
636
- {
637
- if (!is_string($class)) {
638
- $class = get_class($class);
639
- }
640
- return $this->config->getClassConfig($class, $key);
641
- }
642
-
643
- /**
644
- * Set configuration specific to a given class.
645
- * $config->setClassConfig('Google_Cache_File',
646
- * array('directory' => '/tmp/cache'));
647
- * @param $class string|object - The class name for the configuration
648
- * @param $config string key or an array of configuration values
649
- * @param $value string optional - if $config is a key, the value
650
- *
651
- */
652
- public function setClassConfig($class, $config, $value = null)
653
- {
654
- if (!is_string($class)) {
655
- $class = get_class($class);
656
- }
657
- $this->config->setClassConfig($class, $config, $value);
658
-
659
- }
660
-
661
- /**
662
- * @return string the base URL to use for calls to the APIs
663
- */
664
- public function getBasePath()
665
- {
666
- return $this->config->getBasePath();
667
- }
668
-
669
- /**
670
- * @return string the name of the application
671
- */
672
- public function getApplicationName()
673
- {
674
- return $this->config->getApplicationName();
675
- }
676
-
677
- /**
678
- * Are we running in Google AppEngine?
679
- * return bool
680
- */
681
- public function isAppEngine()
682
- {
683
- return (isset($_SERVER['SERVER_SOFTWARE']) &&
684
- strpos($_SERVER['SERVER_SOFTWARE'], 'Google App Engine') !== false);
685
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
686
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../autoload.php');
18
+
19
+ /**
20
+ * The Google API Client
21
+ * http://code.google.com/p/google-api-php-client/
22
+ *
23
+ * @author Chris Chabot <chabotc@google.com>
24
+ * @author Chirag Shah <chirags@google.com>
25
+ */
26
+ class Google_Client
27
+ {
28
+ const LIBVER = "1.1.2";
29
+ const USER_AGENT_SUFFIX = "google-api-php-client/";
30
+ /**
31
+ *
32
+ * @var Google_Auth_Abstract $auth
33
+ */
34
+ private $auth;
35
+ /**
36
+ *
37
+ * @var Google_IO_Abstract $io
38
+ */
39
+ private $io;
40
+ /**
41
+ *
42
+ * @var Google_Cache_Abstract $cache
43
+ */
44
+ private $cache;
45
+ /**
46
+ *
47
+ * @var Google_Config $config
48
+ */
49
+ private $config;
50
+ /**
51
+ *
52
+ * @var Google_Logger_Abstract $logger
53
+ */
54
+ private $logger;
55
+ /**
56
+ *
57
+ * @var boolean $deferExecution
58
+ */
59
+ private $deferExecution = false;
60
+ /**
61
+ *
62
+ * @var array $scopes
63
+ */
64
+ // Scopes requested by the client
65
+ protected $requestedScopes = array();
66
+ // definitions of services that are discovered.
67
+ protected $services = array();
68
+ // Used to track authenticated state, can't discover services after doing authenticate()
69
+ private $authenticated = false;
70
+
71
+ /**
72
+ * Construct the Google Client.
73
+ *
74
+ * @param $config Google_Config
75
+ * or string for the ini file to load
76
+ */
77
+ public function __construct($config = null)
78
+ {
79
+ if (is_string($config) && strlen($config)) {
80
+ $config = new Google_Config($config);
81
+ } else
82
+ if (! ($config instanceof Google_Config)) {
83
+ $config = new Google_Config();
84
+ if ($this->isAppEngine()) {
85
+ // Automatically use Memcache if we're in AppEngine.
86
+ $config->setCacheClass('Google_Cache_Memcache');
87
+ }
88
+ if (version_compare(phpversion(), "5.3.4", "<=") || $this->isAppEngine()) {
89
+ // Automatically disable compress.zlib, as currently unsupported.
90
+ $config->setClassConfig('Google_Http_Request', 'disable_gzip', true);
91
+ }
92
+ }
93
+ if ($config->getIoClass() == Google_Config::USE_AUTO_IO_SELECTION) {
94
+ if (function_exists('curl_version') && function_exists('curl_exec') && ! $this->isAppEngine()) {
95
+ $config->setIoClass("Google_IO_Curl");
96
+ } else {
97
+ $config->setIoClass("Google_IO_Stream");
98
+ }
99
+ }
100
+ $this->config = $config;
101
+ }
102
+
103
+ /**
104
+ * Get a string containing the version of the library.
105
+ *
106
+ * @return string
107
+ */
108
+ public function getLibraryVersion()
109
+ {
110
+ return self::LIBVER;
111
+ }
112
+
113
+ /**
114
+ * Attempt to exchange a code for an valid authentication token.
115
+ * Helper wrapped around the OAuth 2.0 implementation.
116
+ *
117
+ * @param $code string
118
+ * code from accounts.google.com
119
+ * @return string token
120
+ */
121
+ public function authenticate($code)
122
+ {
123
+ $this->authenticated = true;
124
+ return $this->getAuth()->authenticate($code);
125
+ }
126
+
127
+ /**
128
+ * Set the auth config from the JSON string provided.
129
+ * This structure should match the file downloaded from
130
+ * the "Download JSON" button on in the Google Developer
131
+ * Console.
132
+ *
133
+ * @param string $json
134
+ * the configuration json
135
+ * @throws Google_Exception
136
+ */
137
+ public function setAuthConfig($json)
138
+ {
139
+ $data = json_decode($json);
140
+ $key = isset($data->installed) ? 'installed' : 'web';
141
+ if (! isset($data->$key)) {
142
+ throw new Google_Exception("Invalid client secret JSON file.");
143
+ }
144
+ $this->setClientId($data->$key->client_id);
145
+ $this->setClientSecret($data->$key->client_secret);
146
+ if (isset($data->$key->redirect_uris)) {
147
+ $this->setRedirectUri($data->$key->redirect_uris[0]);
148
+ }
149
+ }
150
+
151
+ /**
152
+ * Set the auth config from the JSON file in the path
153
+ * provided.
154
+ * This should match the file downloaded from
155
+ * the "Download JSON" button on in the Google Developer
156
+ * Console.
157
+ *
158
+ * @param string $file
159
+ * the file location of the client json
160
+ */
161
+ public function setAuthConfigFile($file)
162
+ {
163
+ $this->setAuthConfig(file_get_contents($file));
164
+ }
165
+
166
+ /**
167
+ *
168
+ * @throws Google_Auth_Exception
169
+ * @return array @visible For Testing
170
+ */
171
+ public function prepareScopes()
172
+ {
173
+ if (empty($this->requestedScopes)) {
174
+ throw new Google_Auth_Exception("No scopes specified");
175
+ }
176
+ $scopes = implode(' ', $this->requestedScopes);
177
+ return $scopes;
178
+ }
179
+
180
+ /**
181
+ * Set the OAuth 2.0 access token using the string that resulted from calling createAuthUrl()
182
+ * or Google_Client#getAccessToken().
183
+ *
184
+ * @param string $accessToken
185
+ * JSON encoded string containing in the following format:
186
+ * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer",
187
+ * "expires_in":3600, "id_token":"TOKEN", "created":1320790426}
188
+ */
189
+ public function setAccessToken($accessToken)
190
+ {
191
+ if ($accessToken == 'null') {
192
+ $accessToken = null;
193
+ }
194
+ $this->getAuth()->setAccessToken($accessToken);
195
+ }
196
+
197
+ /**
198
+ * Set the authenticator object
199
+ *
200
+ * @param Google_Auth_Abstract $auth
201
+ */
202
+ public function setAuth(Google_Auth_Abstract $auth)
203
+ {
204
+ $this->config->setAuthClass(get_class($auth));
205
+ $this->auth = $auth;
206
+ }
207
+
208
+ /**
209
+ * Set the IO object
210
+ *
211
+ * @param Google_IO_Abstract $io
212
+ */
213
+ public function setIo(Google_IO_Abstract $io)
214
+ {
215
+ $this->config->setIoClass(get_class($io));
216
+ $this->io = $io;
217
+ }
218
+
219
+ /**
220
+ * Set the Cache object
221
+ *
222
+ * @param Google_Cache_Abstract $cache
223
+ */
224
+ public function setCache(Google_Cache_Abstract $cache)
225
+ {
226
+ $this->config->setCacheClass(get_class($cache));
227
+ $this->cache = $cache;
228
+ }
229
+
230
+ /**
231
+ * Set the Logger object
232
+ *
233
+ * @param Google_Logger_Abstract $logger
234
+ */
235
+ public function setLogger(Google_Logger_Abstract $logger)
236
+ {
237
+ $this->config->setLoggerClass(get_class($logger));
238
+ $this->logger = $logger;
239
+ }
240
+
241
+ /**
242
+ * Construct the OAuth 2.0 authorization request URI.
243
+ *
244
+ * @return string
245
+ */
246
+ public function createAuthUrl()
247
+ {
248
+ $scopes = $this->prepareScopes();
249
+ return $this->getAuth()->createAuthUrl($scopes);
250
+ }
251
+
252
+ /**
253
+ * Get the OAuth 2.0 access token.
254
+ *
255
+ * @return string $accessToken JSON encoded string in the following format:
256
+ * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer",
257
+ * "expires_in":3600,"id_token":"TOKEN", "created":1320790426}
258
+ */
259
+ public function getAccessToken()
260
+ {
261
+ $token = $this->getAuth()->getAccessToken();
262
+ // The response is json encoded, so could be the string null.
263
+ // It is arguable whether this check should be here or lower
264
+ // in the library.
265
+ return (null == $token || 'null' == $token || '[]' == $token) ? null : $token;
266
+ }
267
+
268
+ /**
269
+ * Get the OAuth 2.0 refresh token.
270
+ *
271
+ * @return string $refreshToken refresh token or null if not available
272
+ */
273
+ public function getRefreshToken()
274
+ {
275
+ return $this->getAuth()->getRefreshToken();
276
+ }
277
+
278
+ /**
279
+ * Returns if the access_token is expired.
280
+ *
281
+ * @return bool Returns True if the access_token is expired.
282
+ */
283
+ public function isAccessTokenExpired()
284
+ {
285
+ return $this->getAuth()->isAccessTokenExpired();
286
+ }
287
+
288
+ /**
289
+ * Set OAuth 2.0 "state" parameter to achieve per-request customization.
290
+ *
291
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-3.1.2.2
292
+ * @param string $state
293
+ */
294
+ public function setState($state)
295
+ {
296
+ $this->getAuth()->setState($state);
297
+ }
298
+
299
+ /**
300
+ *
301
+ * @param string $accessType
302
+ * Possible values for access_type include:
303
+ * {@code "offline"} to request offline access from the user.
304
+ * {@code "online"} to request online access from the user.
305
+ */
306
+ public function setAccessType($accessType)
307
+ {
308
+ $this->config->setAccessType($accessType);
309
+ }
310
+
311
+ /**
312
+ *
313
+ * @param string $approvalPrompt
314
+ * Possible values for approval_prompt include:
315
+ * {@code "force"} to force the approval UI to appear. (This is the default value)
316
+ * {@code "auto"} to request auto-approval when possible.
317
+ */
318
+ public function setApprovalPrompt($approvalPrompt)
319
+ {
320
+ $this->config->setApprovalPrompt($approvalPrompt);
321
+ }
322
+
323
+ /**
324
+ * Set the login hint, email address or sub id.
325
+ *
326
+ * @param string $loginHint
327
+ */
328
+ public function setLoginHint($loginHint)
329
+ {
330
+ $this->config->setLoginHint($loginHint);
331
+ }
332
+
333
+ /**
334
+ * Set the application name, this is included in the User-Agent HTTP header.
335
+ *
336
+ * @param string $applicationName
337
+ */
338
+ public function setApplicationName($applicationName)
339
+ {
340
+ $this->config->setApplicationName($applicationName);
341
+ }
342
+
343
+ /**
344
+ * Set the OAuth 2.0 Client ID.
345
+ *
346
+ * @param string $clientId
347
+ */
348
+ public function setClientId($clientId)
349
+ {
350
+ $this->config->setClientId($clientId);
351
+ }
352
+
353
+ /**
354
+ * Set the OAuth 2.0 Client Secret.
355
+ *
356
+ * @param string $clientSecret
357
+ */
358
+ public function setClientSecret($clientSecret)
359
+ {
360
+ $this->config->setClientSecret($clientSecret);
361
+ }
362
+
363
+ /**
364
+ * Set the OAuth 2.0 Redirect URI.
365
+ *
366
+ * @param string $redirectUri
367
+ */
368
+ public function setRedirectUri($redirectUri)
369
+ {
370
+ $this->config->setRedirectUri($redirectUri);
371
+ }
372
+
373
+ /**
374
+ * If 'plus.login' is included in the list of requested scopes, you can use
375
+ * this method to define types of app activities that your app will write.
376
+ * You can find a list of available types here:
377
+ *
378
+ * @link https://developers.google.com/+/api/moment-types
379
+ *
380
+ * @param array $requestVisibleActions
381
+ * Array of app activity types
382
+ */
383
+ public function setRequestVisibleActions($requestVisibleActions)
384
+ {
385
+ if (is_array($requestVisibleActions)) {
386
+ $requestVisibleActions = join(" ", $requestVisibleActions);
387
+ }
388
+ $this->config->setRequestVisibleActions($requestVisibleActions);
389
+ }
390
+
391
+ /**
392
+ * Set the developer key to use, these are obtained through the API Console.
393
+ *
394
+ * @see http://code.google.com/apis/console-help/#generatingdevkeys
395
+ * @param string $developerKey
396
+ */
397
+ public function setDeveloperKey($developerKey)
398
+ {
399
+ $this->config->setDeveloperKey($developerKey);
400
+ }
401
+
402
+ /**
403
+ * Set the hd (hosted domain) parameter streamlines the login process for
404
+ * Google Apps hosted accounts.
405
+ * By including the domain of the user, you
406
+ * restrict sign-in to accounts at that domain.
407
+ *
408
+ * @param $hd string
409
+ * - the domain to use.
410
+ */
411
+ public function setHostedDomain($hd)
412
+ {
413
+ $this->config->setHostedDomain($hd);
414
+ }
415
+
416
+ /**
417
+ * Set the prompt hint.
418
+ * Valid values are none, consent and select_account.
419
+ * If no value is specified and the user has not previously authorized
420
+ * access, then the user is shown a consent screen.
421
+ *
422
+ * @param $prompt string
423
+ */
424
+ public function setPrompt($prompt)
425
+ {
426
+ $this->config->setPrompt($prompt);
427
+ }
428
+
429
+ /**
430
+ * openid.realm is a parameter from the OpenID 2.0 protocol, not from OAuth
431
+ * 2.0.
432
+ * It is used in OpenID 2.0 requests to signify the URL-space for which
433
+ * an authentication request is valid.
434
+ *
435
+ * @param $realm string
436
+ * - the URL-space to use.
437
+ */
438
+ public function setOpenidRealm($realm)
439
+ {
440
+ $this->config->setOpenidRealm($realm);
441
+ }
442
+
443
+ /**
444
+ * If this is provided with the value true, and the authorization request is
445
+ * granted, the authorization will include any previous authorizations
446
+ * granted to this user/application combination for other scopes.
447
+ *
448
+ * @param $include boolean
449
+ * - the URL-space to use.
450
+ */
451
+ public function setIncludeGrantedScopes($include)
452
+ {
453
+ $this->config->setIncludeGrantedScopes($include);
454
+ }
455
+
456
+ /**
457
+ * Fetches a fresh OAuth 2.0 access token with the given refresh token.
458
+ *
459
+ * @param string $refreshToken
460
+ */
461
+ public function refreshToken($refreshToken)
462
+ {
463
+ $this->getAuth()->refreshToken($refreshToken);
464
+ }
465
+
466
+ /**
467
+ * Revoke an OAuth2 access token or refresh token.
468
+ * This method will revoke the current access
469
+ * token, if a token isn't provided.
470
+ *
471
+ * @throws Google_Auth_Exception
472
+ * @param string|null $token
473
+ * The token (access token or a refresh token) that should be revoked.
474
+ * @return boolean Returns True if the revocation was successful, otherwise False.
475
+ */
476
+ public function revokeToken($token = null)
477
+ {
478
+ return $this->getAuth()->revokeToken($token);
479
+ }
480
+
481
+ /**
482
+ * Verify an id_token.
483
+ * This method will verify the current id_token, if one
484
+ * isn't provided.
485
+ *
486
+ * @throws Google_Auth_Exception
487
+ * @param string|null $token
488
+ * The token (id_token) that should be verified.
489
+ * @return Google_Auth_LoginTicket Returns an apiLoginTicket if the verification was
490
+ * successful.
491
+ */
492
+ public function verifyIdToken($token = null)
493
+ {
494
+ return $this->getAuth()->verifyIdToken($token);
495
+ }
496
+
497
+ /**
498
+ * Verify a JWT that was signed with your own certificates.
499
+ *
500
+ * @param $id_token string
501
+ * The JWT token
502
+ * @param $cert_location array
503
+ * of certificates
504
+ * @param $audience string
505
+ * the expected consumer of the token
506
+ * @param $issuer string
507
+ * the expected issuer, defaults to Google
508
+ * @param
509
+ * [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS
510
+ * @return mixed token information if valid, false if not
511
+ */
512
+ public function verifySignedJwt($id_token, $cert_location, $audience, $issuer, $max_expiry = null)
513
+ {
514
+ $auth = new Google_Auth_OAuth2($this);
515
+ $certs = $auth->retrieveCertsFromLocation($cert_location);
516
+ return $auth->verifySignedJwtWithCerts($id_token, $certs, $audience, $issuer, $max_expiry);
517
+ }
518
+
519
+ /**
520
+ *
521
+ * @param $creds Google_Auth_AssertionCredentials
522
+ */
523
+ public function setAssertionCredentials(Google_Auth_AssertionCredentials $creds)
524
+ {
525
+ $this->getAuth()->setAssertionCredentials($creds);
526
+ }
527
+
528
+ /**
529
+ * Set the scopes to be requested.
530
+ * Must be called before createAuthUrl().
531
+ * Will remove any previously configured scopes.
532
+ *
533
+ * @param array $scopes,
534
+ * ie: array('https://www.googleapis.com/auth/plus.login',
535
+ * 'https://www.googleapis.com/auth/moderator')
536
+ */
537
+ public function setScopes($scopes)
538
+ {
539
+ $this->requestedScopes = array();
540
+ $this->addScope($scopes);
541
+ }
542
+
543
+ /**
544
+ * This functions adds a scope to be requested as part of the OAuth2.0 flow.
545
+ * Will append any scopes not previously requested to the scope parameter.
546
+ * A single string will be treated as a scope to request. An array of strings
547
+ * will each be appended.
548
+ *
549
+ * @param $scope_or_scopes string|array
550
+ * e.g. "profile"
551
+ */
552
+ public function addScope($scope_or_scopes)
553
+ {
554
+ if (is_string($scope_or_scopes) && ! in_array($scope_or_scopes, $this->requestedScopes)) {
555
+ $this->requestedScopes[] = $scope_or_scopes;
556
+ } else
557
+ if (is_array($scope_or_scopes)) {
558
+ foreach ($scope_or_scopes as $scope) {
559
+ $this->addScope($scope);
560
+ }
561
+ }
562
+ }
563
+
564
+ /**
565
+ * Returns the list of scopes requested by the client
566
+ *
567
+ * @return array the list of scopes
568
+ *
569
+ */
570
+ public function getScopes()
571
+ {
572
+ return $this->requestedScopes;
573
+ }
574
+
575
+ /**
576
+ * Declare whether batch calls should be used.
577
+ * This may increase throughput
578
+ * by making multiple requests in one connection.
579
+ *
580
+ * @param boolean $useBatch
581
+ * True if the batch support should
582
+ * be enabled. Defaults to False.
583
+ */
584
+ public function setUseBatch($useBatch)
585
+ {
586
+ // This is actually an alias for setDefer.
587
+ $this->setDefer($useBatch);
588
+ }
589
+
590
+ /**
591
+ * Declare whether making API calls should make the call immediately, or
592
+ * return a request which can be called with ->execute();
593
+ *
594
+ * @param boolean $defer
595
+ * True if calls should not be executed right away.
596
+ */
597
+ public function setDefer($defer)
598
+ {
599
+ $this->deferExecution = $defer;
600
+ }
601
+
602
+ /**
603
+ * Helper method to execute deferred HTTP requests.
604
+ *
605
+ * @param $request Google_Http_Request|Google_Http_Batch
606
+ * @throws Google_Exception
607
+ * @return object of the type of the expected class or array.
608
+ */
609
+ public function execute($request)
610
+ {
611
+ if ($request instanceof Google_Http_Request) {
612
+ $request->setUserAgent($this->getApplicationName() . " " . self::USER_AGENT_SUFFIX . $this->getLibraryVersion());
613
+ if (! $this->getClassConfig("Google_Http_Request", "disable_gzip")) {
614
+ $request->enableGzip();
615
+ }
616
+ $request->maybeMoveParametersToBody();
617
+ return Google_Http_REST::execute($this, $request);
618
+ } else
619
+ if ($request instanceof Google_Http_Batch) {
620
+ return $request->execute();
621
+ } else {
622
+ throw new Google_Exception("Do not know how to execute this type of object.");
623
+ }
624
+ }
625
+
626
+ /**
627
+ * Whether or not to return raw requests
628
+ *
629
+ * @return boolean
630
+ */
631
+ public function shouldDefer()
632
+ {
633
+ return $this->deferExecution;
634
+ }
635
+
636
+ /**
637
+ *
638
+ * @return Google_Auth_Abstract Authentication implementation
639
+ */
640
+ public function getAuth()
641
+ {
642
+ if (! isset($this->auth)) {
643
+ $class = $this->config->getAuthClass();
644
+ $this->auth = new $class($this);
645
+ }
646
+ return $this->auth;
647
+ }
648
+
649
+ /**
650
+ *
651
+ * @return Google_IO_Abstract IO implementation
652
+ */
653
+ public function getIo()
654
+ {
655
+ if (! isset($this->io)) {
656
+ $class = $this->config->getIoClass();
657
+ $this->io = new $class($this);
658
+ }
659
+ return $this->io;
660
+ }
661
+
662
+ /**
663
+ *
664
+ * @return Google_Cache_Abstract Cache implementation
665
+ */
666
+ public function getCache()
667
+ {
668
+ if (! isset($this->cache)) {
669
+ $class = $this->config->getCacheClass();
670
+ $this->cache = new $class($this);
671
+ }
672
+ return $this->cache;
673
+ }
674
+
675
+ /**
676
+ *
677
+ * @return Google_Logger_Abstract Logger implementation
678
+ */
679
+ public function getLogger()
680
+ {
681
+ if (! isset($this->logger)) {
682
+ $class = $this->config->getLoggerClass();
683
+ $this->logger = new $class($this);
684
+ }
685
+ return $this->logger;
686
+ }
687
+
688
+ /**
689
+ * Retrieve custom configuration for a specific class.
690
+ *
691
+ * @param $class string|object
692
+ * - class or instance of class to retrieve
693
+ * @param $key string
694
+ * optional - key to retrieve
695
+ * @return array
696
+ */
697
+ public function getClassConfig($class, $key = null)
698
+ {
699
+ if (! is_string($class)) {
700
+ $class = get_class($class);
701
+ }
702
+ return $this->config->getClassConfig($class, $key);
703
+ }
704
+
705
+ /**
706
+ * Set configuration specific to a given class.
707
+ * $config->setClassConfig('Google_Cache_File',
708
+ * array('directory' => '/tmp/cache'));
709
+ *
710
+ * @param $class string|object
711
+ * - The class name for the configuration
712
+ * @param $config string
713
+ * key or an array of configuration values
714
+ * @param $value string
715
+ * optional - if $config is a key, the value
716
+ *
717
+ */
718
+ public function setClassConfig($class, $config, $value = null)
719
+ {
720
+ if (! is_string($class)) {
721
+ $class = get_class($class);
722
+ }
723
+ $this->config->setClassConfig($class, $config, $value);
724
+ }
725
+
726
+ /**
727
+ *
728
+ * @return string the base URL to use for calls to the APIs
729
+ */
730
+ public function getBasePath()
731
+ {
732
+ return $this->config->getBasePath();
733
+ }
734
+
735
+ /**
736
+ *
737
+ * @return string the name of the application
738
+ */
739
+ public function getApplicationName()
740
+ {
741
+ return $this->config->getApplicationName();
742
+ }
743
+
744
+ /**
745
+ * Are we running in Google AppEngine?
746
+ * return bool
747
+ */
748
+ public function isAppEngine()
749
+ {
750
+ return (isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Google App Engine') !== false);
751
+ }
752
  }
tools/src/Google/Collection.php CHANGED
@@ -1,96 +1,92 @@
1
- <?php
2
-
3
- require_once realpath(dirname(__FILE__) . '/../../autoload.php');
4
-
5
- /**
6
- * Extension to the regular Google_Model that automatically
7
- * exposes the items array for iteration, so you can just
8
- * iterate over the object rather than a reference inside.
9
- */
10
- class Google_Collection extends Google_Model implements Iterator, Countable
11
- {
12
- protected $collection_key = 'items';
13
-
14
- public function rewind()
15
- {
16
- if (isset($this->modelData[$this->collection_key])
17
- && is_array($this->modelData[$this->collection_key])) {
18
- reset($this->modelData[$this->collection_key]);
19
- }
20
- }
21
-
22
- public function current()
23
- {
24
- $this->coerceType($this->key());
25
- if (is_array($this->modelData[$this->collection_key])) {
26
- return current($this->modelData[$this->collection_key]);
27
- }
28
- }
29
-
30
- public function key()
31
- {
32
- if (isset($this->modelData[$this->collection_key])
33
- && is_array($this->modelData[$this->collection_key])) {
34
- return key($this->modelData[$this->collection_key]);
35
- }
36
- }
37
-
38
- public function next()
39
- {
40
- return next($this->modelData[$this->collection_key]);
41
- }
42
-
43
- public function valid()
44
- {
45
- $key = $this->key();
46
- return $key !== null && $key !== false;
47
- }
48
-
49
- public function count()
50
- {
51
- return count($this->modelData[$this->collection_key]);
52
- }
53
-
54
- public function offsetExists ($offset)
55
- {
56
- if (!is_numeric($offset)) {
57
- return parent::offsetExists($offset);
58
- }
59
- return isset($this->modelData[$this->collection_key][$offset]);
60
- }
61
-
62
- public function offsetGet($offset)
63
- {
64
- if (!is_numeric($offset)) {
65
- return parent::offsetGet($offset);
66
- }
67
- $this->coerceType($offset);
68
- return $this->modelData[$this->collection_key][$offset];
69
- }
70
-
71
- public function offsetSet($offset, $value)
72
- {
73
- if (!is_numeric($offset)) {
74
- return parent::offsetSet($offset, $value);
75
- }
76
- $this->modelData[$this->collection_key][$offset] = $value;
77
- }
78
-
79
- public function offsetUnset($offset)
80
- {
81
- if (!is_numeric($offset)) {
82
- return parent::offsetUnset($offset);
83
- }
84
- unset($this->modelData[$this->collection_key][$offset]);
85
- }
86
-
87
- private function coerceType($offset)
88
- {
89
- $typeKey = $this->keyType($this->collection_key);
90
- if (isset($this->$typeKey) && !is_object($this->modelData[$this->collection_key][$offset])) {
91
- $type = $this->$typeKey;
92
- $this->modelData[$this->collection_key][$offset] =
93
- new $type($this->modelData[$this->collection_key][$offset]);
94
- }
95
- }
96
  }
1
+ <?php
2
+ require_once realpath(dirname(__FILE__) . '/../../autoload.php');
3
+
4
+ /**
5
+ * Extension to the regular Google_Model that automatically
6
+ * exposes the items array for iteration, so you can just
7
+ * iterate over the object rather than a reference inside.
8
+ */
9
+ class Google_Collection extends Google_Model implements Iterator, Countable
10
+ {
11
+ protected $collection_key = 'items';
12
+
13
+ public function rewind()
14
+ {
15
+ if (isset($this->modelData[$this->collection_key]) && is_array($this->modelData[$this->collection_key])) {
16
+ reset($this->modelData[$this->collection_key]);
17
+ }
18
+ }
19
+
20
+ public function current()
21
+ {
22
+ $this->coerceType($this->key());
23
+ if (is_array($this->modelData[$this->collection_key])) {
24
+ return current($this->modelData[$this->collection_key]);
25
+ }
26
+ }
27
+
28
+ public function key()
29
+ {
30
+ if (isset($this->modelData[$this->collection_key]) && is_array($this->modelData[$this->collection_key])) {
31
+ return key($this->modelData[$this->collection_key]);
32
+ }
33
+ }
34
+
35
+ public function next()
36
+ {
37
+ return next($this->modelData[$this->collection_key]);
38
+ }
39
+
40
+ public function valid()
41
+ {
42
+ $key = $this->key();
43
+ return $key !== null && $key !== false;
44
+ }
45
+
46
+ public function count()
47
+ {
48
+ return count($this->modelData[$this->collection_key]);
49
+ }
50
+
51
+ public function offsetExists($offset)
52
+ {
53
+ if (! is_numeric($offset)) {
54
+ return parent::offsetExists($offset);
55
+ }
56
+ return isset($this->modelData[$this->collection_key][$offset]);
57
+ }
58
+
59
+ public function offsetGet($offset)
60
+ {
61
+ if (! is_numeric($offset)) {
62
+ return parent::offsetGet($offset);
63
+ }
64
+ $this->coerceType($offset);
65
+ return $this->modelData[$this->collection_key][$offset];
66
+ }
67
+
68
+ public function offsetSet($offset, $value)
69
+ {
70
+ if (! is_numeric($offset)) {
71
+ return parent::offsetSet($offset, $value);
72
+ }
73
+ $this->modelData[$this->collection_key][$offset] = $value;
74
+ }
75
+
76
+ public function offsetUnset($offset)
77
+ {
78
+ if (! is_numeric($offset)) {
79
+ return parent::offsetUnset($offset);
80
+ }
81
+ unset($this->modelData[$this->collection_key][$offset]);
82
+ }
83
+
84
+ private function coerceType($offset)
85
+ {
86
+ $typeKey = $this->keyType($this->collection_key);
87
+ if (isset($this->$typeKey) && ! is_object($this->modelData[$this->collection_key][$offset])) {
88
+ $type = $this->$typeKey;
89
+ $this->modelData[$this->collection_key][$offset] = new $type($this->modelData[$this->collection_key][$offset]);
90
+ }
91
+ }
 
 
 
 
92
  }
tools/src/Google/Config.php CHANGED
@@ -1,414 +1,441 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * A class to contain the library configuration for the Google API client.
20
- */
21
- class Google_Config
22
- {
23
- const GZIP_DISABLED = true;
24
- const GZIP_ENABLED = false;
25
- const GZIP_UPLOADS_ENABLED = true;
26
- const GZIP_UPLOADS_DISABLED = false;
27
- const USE_AUTO_IO_SELECTION = "auto";
28
- protected $configuration;
29
-
30
- /**
31
- * Create a new Google_Config. Can accept an ini file location with the
32
- * local configuration. For example:
33
- * application_name="My App"
34
- *
35
- * @param [$ini_file_location] - optional - The location of the ini file to load
36
- */
37
- public function __construct($ini_file_location = null)
38
- {
39
- $this->configuration = array(
40
- // The application_name is included in the User-Agent HTTP header.
41
- 'application_name' => '',
42
-
43
- // Which Authentication, Storage and HTTP IO classes to use.
44
- 'auth_class' => 'Google_Auth_OAuth2',
45
- 'io_class' => self::USE_AUTO_IO_SELECTION,
46
- 'cache_class' => 'Google_Cache_File',
47
- 'logger_class' => 'Google_Logger_Null',
48
-
49
- // Don't change these unless you're working against a special development
50
- // or testing environment.
51
- 'base_path' => 'https://www.googleapis.com',
52
-
53
- // Definition of class specific values, like file paths and so on.
54
- 'classes' => array(
55
- 'Google_IO_Abstract' => array(
56
- 'request_timeout_seconds' => 100,
57
- ),
58
- 'Google_Logger_Abstract' => array(
59
- 'level' => 'debug',
60
- 'log_format' => "[%datetime%] %level%: %message% %context%\n",
61
- 'date_format' => 'd/M/Y:H:i:s O',
62
- 'allow_newlines' => true
63
- ),
64
- 'Google_Logger_File' => array(
65
- 'file' => 'php://stdout',
66
- 'mode' => 0640,
67
- 'lock' => false,
68
- ),
69
- 'Google_Http_Request' => array(
70
- // Disable the use of gzip on calls if set to true. Defaults to false.
71
- 'disable_gzip' => self::GZIP_ENABLED,
72
-
73
- // We default gzip to disabled on uploads even if gzip is otherwise
74
- // enabled, due to some issues seen with small packet sizes for uploads.
75
- // Please test with this option before enabling gzip for uploads in
76
- // a production environment.
77
- 'enable_gzip_for_uploads' => self::GZIP_UPLOADS_DISABLED,
78
- ),
79
- // If you want to pass in OAuth 2.0 settings, they will need to be
80
- // structured like this.
81
- 'Google_Auth_OAuth2' => array(
82
- // Keys for OAuth 2.0 access, see the API console at
83
- // https://developers.google.com/console
84
- 'client_id' => '',
85
- 'client_secret' => '',
86
- 'redirect_uri' => '',
87
-
88
- // Simple API access key, also from the API console. Ensure you get
89
- // a Server key, and not a Browser key.
90
- 'developer_key' => '',
91
-
92
- // Other parameters.
93
- 'hd' => '',
94
- 'prompt' => '',
95
- 'openid.realm' => '',
96
- 'include_granted_scopes' => '',
97
- 'login_hint' => '',
98
- 'request_visible_actions' => '',
99
- 'access_type' => 'online',
100
- 'approval_prompt' => 'auto',
101
- 'federated_signon_certs_url' =>
102
- 'https://www.googleapis.com/oauth2/v1/certs',
103
- ),
104
- // Set a default directory for the file cache.
105
- 'Google_Cache_File' => array(
106
- 'directory' => sys_get_temp_dir() . '/Google_Client'
107
- )
108
- ),
109
- );
110
- if ($ini_file_location) {
111
- $ini = parse_ini_file($ini_file_location, true);
112
- if (is_array($ini) && count($ini)) {
113
- $merged_configuration = $ini + $this->configuration;
114
- if (isset($ini['classes']) && isset($this->configuration['classes'])) {
115
- $merged_configuration['classes'] = $ini['classes'] + $this->configuration['classes'];
116
- }
117
- $this->configuration = $merged_configuration;
118
- }
119
- }
120
- }
121
-
122
- /**
123
- * Set configuration specific to a given class.
124
- * $config->setClassConfig('Google_Cache_File',
125
- * array('directory' => '/tmp/cache'));
126
- * @param $class string The class name for the configuration
127
- * @param $config string key or an array of configuration values
128
- * @param $value string optional - if $config is a key, the value
129
- */
130
- public function setClassConfig($class, $config, $value = null)
131
- {
132
- if (!is_array($config)) {
133
- if (!isset($this->configuration['classes'][$class])) {
134
- $this->configuration['classes'][$class] = array();
135
- }
136
- $this->configuration['classes'][$class][$config] = $value;
137
- } else {
138
- $this->configuration['classes'][$class] = $config;
139
- }
140
- }
141
-
142
- public function getClassConfig($class, $key = null)
143
- {
144
- if (!isset($this->configuration['classes'][$class])) {
145
- return null;
146
- }
147
- if ($key === null) {
148
- return $this->configuration['classes'][$class];
149
- } else {
150
- return $this->configuration['classes'][$class][$key];
151
- }
152
- }
153
-
154
- /**
155
- * Return the configured cache class.
156
- * @return string
157
- */
158
- public function getCacheClass()
159
- {
160
- return $this->configuration['cache_class'];
161
- }
162
-
163
- /**
164
- * Return the configured logger class.
165
- * @return string
166
- */
167
- public function getLoggerClass()
168
- {
169
- return $this->configuration['logger_class'];
170
- }
171
-
172
- /**
173
- * Return the configured Auth class.
174
- * @return string
175
- */
176
- public function getAuthClass()
177
- {
178
- return $this->configuration['auth_class'];
179
- }
180
-
181
- /**
182
- * Set the auth class.
183
- *
184
- * @param $class string the class name to set
185
- */
186
- public function setAuthClass($class)
187
- {
188
- $prev = $this->configuration['auth_class'];
189
- if (!isset($this->configuration['classes'][$class]) &&
190
- isset($this->configuration['classes'][$prev])) {
191
- $this->configuration['classes'][$class] =
192
- $this->configuration['classes'][$prev];
193
- }
194
- $this->configuration['auth_class'] = $class;
195
- }
196
-
197
- /**
198
- * Set the IO class.
199
- *
200
- * @param $class string the class name to set
201
- */
202
- public function setIoClass($class)
203
- {
204
- $prev = $this->configuration['io_class'];
205
- if (!isset($this->configuration['classes'][$class]) &&
206
- isset($this->configuration['classes'][$prev])) {
207
- $this->configuration['classes'][$class] =
208
- $this->configuration['classes'][$prev];
209
- }
210
- $this->configuration['io_class'] = $class;
211
- }
212
-
213
- /**
214
- * Set the cache class.
215
- *
216
- * @param $class string the class name to set
217
- */
218
- public function setCacheClass($class)
219
- {
220
- $prev = $this->configuration['cache_class'];
221
- if (!isset($this->configuration['classes'][$class]) &&
222
- isset($this->configuration['classes'][$prev])) {
223
- $this->configuration['classes'][$class] =
224
- $this->configuration['classes'][$prev];
225
- }
226
- $this->configuration['cache_class'] = $class;
227
- }
228
-
229
- /**
230
- * Set the logger class.
231
- *
232
- * @param $class string the class name to set
233
- */
234
- public function setLoggerClass($class)
235
- {
236
- $prev = $this->configuration['logger_class'];
237
- if (!isset($this->configuration['classes'][$class]) &&
238
- isset($this->configuration['classes'][$prev])) {
239
- $this->configuration['classes'][$class] =
240
- $this->configuration['classes'][$prev];
241
- }
242
- $this->configuration['logger_class'] = $class;
243
- }
244
-
245
- /**
246
- * Return the configured IO class.
247
- *
248
- * @return string
249
- */
250
- public function getIoClass()
251
- {
252
- return $this->configuration['io_class'];
253
- }
254
-
255
- /**
256
- * Set the application name, this is included in the User-Agent HTTP header.
257
- * @param string $name
258
- */
259
- public function setApplicationName($name)
260
- {
261
- $this->configuration['application_name'] = $name;
262
- }
263
-
264
- /**
265
- * @return string the name of the application
266
- */
267
- public function getApplicationName()
268
- {
269
- return $this->configuration['application_name'];
270
- }
271
-
272
- /**
273
- * Set the client ID for the auth class.
274
- * @param $clientId string - the API console client ID
275
- */
276
- public function setClientId($clientId)
277
- {
278
- $this->setAuthConfig('client_id', $clientId);
279
- }
280
-
281
- /**
282
- * Set the client secret for the auth class.
283
- * @param $secret string - the API console client secret
284
- */
285
- public function setClientSecret($secret)
286
- {
287
- $this->setAuthConfig('client_secret', $secret);
288
- }
289
-
290
- /**
291
- * Set the redirect uri for the auth class. Note that if using the
292
- * Javascript based sign in flow, this should be the string 'postmessage'.
293
- *
294
- * @param $uri string - the URI that users should be redirected to
295
- */
296
- public function setRedirectUri($uri)
297
- {
298
- $this->setAuthConfig('redirect_uri', $uri);
299
- }
300
-
301
- /**
302
- * Set the app activities for the auth class.
303
- * @param $rva string a space separated list of app activity types
304
- */
305
- public function setRequestVisibleActions($rva)
306
- {
307
- $this->setAuthConfig('request_visible_actions', $rva);
308
- }
309
-
310
- /**
311
- * Set the the access type requested (offline or online.)
312
- * @param $access string - the access type
313
- */
314
- public function setAccessType($access)
315
- {
316
- $this->setAuthConfig('access_type', $access);
317
- }
318
-
319
- /**
320
- * Set when to show the approval prompt (auto or force)
321
- * @param $approval string - the approval request
322
- */
323
- public function setApprovalPrompt($approval)
324
- {
325
- $this->setAuthConfig('approval_prompt', $approval);
326
- }
327
-
328
- /**
329
- * Set the login hint (email address or sub identifier)
330
- * @param $hint string
331
- */
332
- public function setLoginHint($hint)
333
- {
334
- $this->setAuthConfig('login_hint', $hint);
335
- }
336
-
337
- /**
338
- * Set the developer key for the auth class. Note that this is separate value
339
- * from the client ID - if it looks like a URL, its a client ID!
340
- * @param $key string - the API console developer key
341
- */
342
- public function setDeveloperKey($key)
343
- {
344
- $this->setAuthConfig('developer_key', $key);
345
- }
346
-
347
- /**
348
- * Set the hd (hosted domain) parameter streamlines the login process for
349
- * Google Apps hosted accounts. By including the domain of the user, you
350
- * restrict sign-in to accounts at that domain.
351
- * @param $hd string - the domain to use.
352
- */
353
- public function setHostedDomain($hd)
354
- {
355
- $this->setAuthConfig('hd', $hd);
356
- }
357
-
358
- /**
359
- * Set the prompt hint. Valid values are none, consent and select_account.
360
- * If no value is specified and the user has not previously authorized
361
- * access, then the user is shown a consent screen.
362
- * @param $prompt string
363
- */
364
- public function setPrompt($prompt)
365
- {
366
- $this->setAuthConfig('prompt', $prompt);
367
- }
368
-
369
- /**
370
- * openid.realm is a parameter from the OpenID 2.0 protocol, not from OAuth
371
- * 2.0. It is used in OpenID 2.0 requests to signify the URL-space for which
372
- * an authentication request is valid.
373
- * @param $realm string - the URL-space to use.
374
- */
375
- public function setOpenidRealm($realm)
376
- {
377
- $this->setAuthConfig('openid.realm', $realm);
378
- }
379
-
380
- /**
381
- * If this is provided with the value true, and the authorization request is
382
- * granted, the authorization will include any previous authorizations
383
- * granted to this user/application combination for other scopes.
384
- * @param $include boolean - the URL-space to use.
385
- */
386
- public function setIncludeGrantedScopes($include)
387
- {
388
- $this->setAuthConfig(
389
- 'include_granted_scopes',
390
- $include ? "true" : "false"
391
- );
392
- }
393
-
394
- /**
395
- * @return string the base URL to use for API calls
396
- */
397
- public function getBasePath()
398
- {
399
- return $this->configuration['base_path'];
400
- }
401
-
402
- /**
403
- * Set the auth configuration for the current auth class.
404
- * @param $key - the key to set
405
- * @param $value - the parameter value
406
- */
407
- private function setAuthConfig($key, $value)
408
- {
409
- if (!isset($this->configuration['classes'][$this->getAuthClass()])) {
410
- $this->configuration['classes'][$this->getAuthClass()] = array();
411
- }
412
- $this->configuration['classes'][$this->getAuthClass()][$key] = $value;
413
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  }
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2010 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ /**
19
+ * A class to contain the library configuration for the Google API client.
20
+ */
21
+ class Google_Config
22
+ {
23
+ const GZIP_DISABLED = true;
24
+ const GZIP_ENABLED = false;
25
+ const GZIP_UPLOADS_ENABLED = true;
26
+ const GZIP_UPLOADS_DISABLED = false;
27
+ const USE_AUTO_IO_SELECTION = "auto";
28
+ protected $configuration;
29
+
30
+ /**
31
+ * Create a new Google_Config.
32
+ * Can accept an ini file location with the
33
+ * local configuration. For example:
34
+ * application_name="My App"
35
+ *
36
+ * @param
37
+ * [$ini_file_location] - optional - The location of the ini file to load
38
+ */
39
+ public function __construct($ini_file_location = null)
40
+ {
41
+ $this->configuration = array(
42
+ // The application_name is included in the User-Agent HTTP header.
43
+ 'application_name' => '',
44
+ // Which Authentication, Storage and HTTP IO classes to use.
45
+ 'auth_class' => 'Google_Auth_OAuth2',
46
+ 'io_class' => self::USE_AUTO_IO_SELECTION,
47
+ 'cache_class' => 'Google_Cache_File',
48
+ 'logger_class' => 'Google_Logger_Null',
49
+ // Don't change these unless you're working against a special development
50
+ // or testing environment.
51
+ 'base_path' => 'https://www.googleapis.com',
52
+ // Definition of class specific values, like file paths and so on.
53
+ 'classes' => array(
54
+ 'Google_IO_Abstract' => array(
55
+ 'request_timeout_seconds' => 100
56
+ ),
57
+ 'Google_Logger_Abstract' => array(
58
+ 'level' => 'debug',
59
+ 'log_format' => "[%datetime%] %level%: %message% %context%\n",
60
+ 'date_format' => 'd/M/Y:H:i:s O',
61
+ 'allow_newlines' => true
62
+ ),
63
+ 'Google_Logger_File' => array(
64
+ 'file' => 'php://stdout',
65
+ 'mode' => 0640,
66
+ 'lock' => false
67
+ ),
68
+ 'Google_Http_Request' => array(
69
+ // Disable the use of gzip on calls if set to true. Defaults to false.
70
+ 'disable_gzip' => self::GZIP_ENABLED,
71
+ // We default gzip to disabled on uploads even if gzip is otherwise
72
+ // enabled, due to some issues seen with small packet sizes for uploads.
73
+ // Please test with this option before enabling gzip for uploads in
74
+ // a production environment.
75
+ 'enable_gzip_for_uploads' => self::GZIP_UPLOADS_DISABLED
76
+ ),
77
+ // If you want to pass in OAuth 2.0 settings, they will need to be
78
+ // structured like this.
79
+ 'Google_Auth_OAuth2' => array(
80
+ // Keys for OAuth 2.0 access, see the API console at
81
+ // https://developers.google.com/console
82
+ 'client_id' => '',
83
+ 'client_secret' => '',
84
+ 'redirect_uri' => '',
85
+ // Simple API access key, also from the API console. Ensure you get
86
+ // a Server key, and not a Browser key.
87
+ 'developer_key' => '',
88
+ // Other parameters.
89
+ 'hd' => '',
90
+ 'prompt' => '',
91
+ 'openid.realm' => '',
92
+ 'include_granted_scopes' => '',
93
+ 'login_hint' => '',
94
+ 'request_visible_actions' => '',
95
+ 'access_type' => 'online',
96
+ 'approval_prompt' => 'auto',
97
+ 'federated_signon_certs_url' => 'https://www.googleapis.com/oauth2/v1/certs'
98
+ ),
99
+ // Set a default directory for the file cache.
100
+ 'Google_Cache_File' => array(
101
+ 'directory' => sys_get_temp_dir() . '/Google_Client'
102
+ )
103
+ )
104
+ );
105
+ if ($ini_file_location) {
106
+ $ini = parse_ini_file($ini_file_location, true);
107
+ if (is_array($ini) && count($ini)) {
108
+ $merged_configuration = $ini + $this->configuration;
109
+ if (isset($ini['classes']) && isset($this->configuration['classes'])) {
110
+ $merged_configuration['classes'] = $ini['classes'] + $this->configuration['classes'];
111
+ }
112
+ $this->configuration = $merged_configuration;
113
+ }
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Set configuration specific to a given class.
119
+ * $config->setClassConfig('Google_Cache_File',
120
+ * array('directory' => '/tmp/cache'));
121
+ *
122
+ * @param $class string
123
+ * The class name for the configuration
124
+ * @param $config string
125
+ * key or an array of configuration values
126
+ * @param $value string
127
+ * optional - if $config is a key, the value
128
+ */
129
+ public function setClassConfig($class, $config, $value = null)
130
+ {
131
+ if (! is_array($config)) {
132
+ if (! isset($this->configuration['classes'][$class])) {
133
+ $this->configuration['classes'][$class] = array();
134
+ }
135
+ $this->configuration['classes'][$class][$config] = $value;
136
+ } else {
137
+ $this->configuration['classes'][$class] = $config;
138
+ }
139
+ }
140
+
141
+ public function getClassConfig($class, $key = null)
142
+ {
143
+ if (! isset($this->configuration['classes'][$class])) {
144
+ return null;
145
+ }
146
+ if ($key === null) {
147
+ return $this->configuration['classes'][$class];
148
+ } else {
149
+ return $this->configuration['classes'][$class][$key];
150
+ }
151
+ }
152
+
153
+ /**
154
+ * Return the configured cache class.
155
+ *
156
+ * @return string
157
+ */
158
+ public function getCacheClass()
159
+ {
160
+ return $this->configuration['cache_class'];
161
+ }
162
+
163
+ /**
164
+ * Return the configured logger class.
165
+ *
166
+ * @return string
167
+ */
168
+ public function getLoggerClass()
169
+ {
170
+ return $this->configuration['logger_class'];
171
+ }
172
+
173
+ /**
174
+ * Return the configured Auth class.
175
+ *
176
+ * @return string
177
+ */
178
+ public function getAuthClass()
179
+ {
180
+ return $this->configuration['auth_class'];
181
+ }
182
+
183
+ /**
184
+ * Set the auth class.
185
+ *
186
+ * @param $class string
187
+ * the class name to set
188
+ */
189
+ public function setAuthClass($class)
190
+ {
191
+ $prev = $this->configuration['auth_class'];
192
+ if (! isset($this->configuration['classes'][$class]) && isset($this->configuration['classes'][$prev])) {
193
+ $this->configuration['classes'][$class] = $this->configuration['classes'][$prev];
194
+ }
195
+ $this->configuration['auth_class'] = $class;
196
+ }
197
+
198
+ /**
199
+ * Set the IO class.
200
+ *
201
+ * @param $class string
202
+ * the class name to set
203
+ */
204
+ public function setIoClass($class)
205
+ {
206
+ $prev = $this->configuration['io_class'];
207
+ if (! isset($this->configuration['classes'][$class]) && isset($this->configuration['classes'][$prev])) {
208
+ $this->configuration['classes'][$class] = $this->configuration['classes'][$prev];
209
+ }
210
+ $this->configuration['io_class'] = $class;
211
+ }
212
+
213
+ /**
214
+ * Set the cache class.
215
+ *
216
+ * @param $class string
217
+ * the class name to set
218
+ */
219
+ public function setCacheClass($class)
220
+ {
221
+ $prev = $this->configuration['cache_class'];
222
+ if (! isset($this->configuration['classes'][$class]) && isset($this->configuration['classes'][$prev])) {
223
+ $this->configuration['classes'][$class] = $this->configuration['classes'][$prev];
224
+ }
225
+ $this->configuration['cache_class'] = $class;
226
+ }
227
+
228
+ /**
229
+ * Set the logger class.
230
+ *
231
+ * @param $class string
232
+ * the class name to set
233
+ */
234
+ public function setLoggerClass($class)
235
+ {
236
+ $prev = $this->configuration['logger_class'];
237
+ if (! isset($this->configuration['classes'][$class]) && isset($this->configuration['classes'][$prev])) {
238
+ $this->configuration['classes'][$class] = $this->configuration['classes'][$prev];
239
+ }
240
+ $this->configuration['logger_class'] = $class;
241
+ }
242
+
243
+ /**
244
+ * Return the configured IO class.
245
+ *
246
+ * @return string
247
+ */
248
+ public function getIoClass()
249
+ {
250
+ return $this->configuration['io_class'];
251
+ }
252
+
253
+ /**
254
+ * Set the application name, this is included in the User-Agent HTTP header.
255
+ *
256
+ * @param string $name
257
+ */
258
+ public function setApplicationName($name)
259
+ {
260
+ $this->configuration['application_name'] = $name;
261
+ }
262
+
263
+ /**
264
+ *
265
+ * @return string the name of the application
266
+ */
267
+ public function getApplicationName()
268
+ {
269
+ return $this->configuration['application_name'];
270
+ }
271
+
272
+ /**
273
+ * Set the client ID for the auth class.
274
+ *
275
+ * @param $clientId string
276
+ * - the API console client ID
277
+ */
278
+ public function setClientId($clientId)
279
+ {
280
+ $this->setAuthConfig('client_id', $clientId);
281
+ }
282
+
283
+ /**
284
+ * Set the client secret for the auth class.
285
+ *
286
+ * @param $secret string
287
+ * - the API console client secret
288
+ */
289
+ public function setClientSecret($secret)
290
+ {
291
+ $this->setAuthConfig('client_secret', $secret);
292
+ }
293
+
294
+ /**
295
+ * Set the redirect uri for the auth class.
296
+ * Note that if using the
297
+ * Javascript based sign in flow, this should be the string 'postmessage'.
298
+ *
299
+ * @param $uri string
300
+ * - the URI that users should be redirected to
301
+ */
302
+ public function setRedirectUri($uri)
303
+ {
304
+ $this->setAuthConfig('redirect_uri', $uri);
305
+ }
306
+
307
+ /**
308
+ * Set the app activities for the auth class.
309
+ *
310
+ * @param $rva string
311
+ * a space separated list of app activity types
312
+ */
313
+ public function setRequestVisibleActions($rva)
314
+ {
315
+ $this->setAuthConfig('request_visible_actions', $rva);
316
+ }
317
+
318
+ /**
319
+ * Set the the access type requested (offline or online.)
320
+ *
321
+ * @param $access string
322
+ * - the access type
323
+ */
324
+ public function setAccessType($access)
325
+ {
326
+ $this->setAuthConfig('access_type', $access);
327
+ }
328
+
329
+ /**
330
+ * Set when to show the approval prompt (auto or force)
331
+ *
332
+ * @param $approval string
333
+ * - the approval request
334
+ */
335
+ public function setApprovalPrompt($approval)
336
+ {
337
+ $this->setAuthConfig('approval_prompt', $approval);
338
+ }
339
+
340
+ /**
341
+ * Set the login hint (email address or sub identifier)
342
+ *
343
+ * @param $hint string
344
+ */
345
+ public function setLoginHint($hint)
346
+ {
347
+ $this->setAuthConfig('login_hint', $hint);
348
+ }
349
+
350
+ /**
351
+ * Set the developer key for the auth class.
352
+ * Note that this is separate value
353
+ * from the client ID - if it looks like a URL, its a client ID!
354
+ *
355
+ * @param $key string
356
+ * - the API console developer key
357
+ */
358
+ public function setDeveloperKey($key)
359
+ {
360
+ $this->setAuthConfig('developer_key', $key);
361
+ }
362
+
363
+ /**
364
+ * Set the hd (hosted domain) parameter streamlines the login process for
365
+ * Google Apps hosted accounts.
366
+ * By including the domain of the user, you
367
+ * restrict sign-in to accounts at that domain.
368
+ *
369
+ * @param $hd string
370
+ * - the domain to use.
371
+ */
372
+ public function setHostedDomain($hd)
373
+ {
374
+ $this->setAuthConfig('hd', $hd);
375
+ }
376
+
377
+ /**
378
+ * Set the prompt hint.
379
+ * Valid values are none, consent and select_account.
380
+ * If no value is specified and the user has not previously authorized
381
+ * access, then the user is shown a consent screen.
382
+ *
383
+ * @param $prompt string
384
+ */
385
+ public function setPrompt($prompt)
386
+ {
387
+ $this->setAuthConfig('prompt', $prompt);
388
+ }
389
+
390
+ /**
391
+ * openid.realm is a parameter from the OpenID 2.0 protocol, not from OAuth
392
+ * 2.0.
393
+ * It is used in OpenID 2.0 requests to signify the URL-space for which
394
+ * an authentication request is valid.
395
+ *
396
+ * @param $realm string
397
+ * - the URL-space to use.
398
+ */
399
+ public function setOpenidRealm($realm)
400
+ {
401
+ $this->setAuthConfig('openid.realm', $realm);
402
+ }
403
+
404
+ /**
405
+ * If this is provided with the value true, and the authorization request is
406
+ * granted, the authorization will include any previous authorizations
407
+ * granted to this user/application combination for other scopes.
408
+ *
409
+ * @param $include boolean
410
+ * - the URL-space to use.
411
+ */
412
+ public function setIncludeGrantedScopes($include)
413
+ {
414
+ $this->setAuthConfig('include_granted_scopes', $include ? "true" : "false");
415
+ }
416
+
417
+ /**
418
+ *
419
+ * @return string the base URL to use for API calls
420
+ */
421
+ public function getBasePath()
422
+ {
423
+ return $this->configuration['base_path'];
424
+ }
425
+
426
+ /**
427
+ * Set the auth configuration for the current auth class.
428
+ *
429
+ * @param $key -
430
+ * the key to set
431
+ * @param $value -
432
+ * the parameter value
433
+ */
434
+ private function setAuthConfig($key, $value)
435
+ {
436
+ if (! isset($this->configuration['classes'][$this->getAuthClass()])) {
437
+ $this->configuration['classes'][$this->getAuthClass()] = array();
438
+ }
439
+ $this->configuration['classes'][$this->getAuthClass()][$key] = $value;
440
+ }
441
  }
tools/src/Google/Exception.php CHANGED
@@ -1,20 +1,20 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- class Google_Exception extends Exception
19
- {
20
  }
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2013 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ class Google_Exception extends Exception
19
+ {
20
  }
tools/src/Google/Http/Batch.php CHANGED
@@ -1,141 +1,133 @@
1
- <?php
2
- /*
3
- * Copyright 2012 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * @author Chirag Shah <chirags@google.com>
22
- */
23
- class Google_Http_Batch
24
- {
25
- /** @var string Multipart Boundary. */
26
- private $boundary;
27
-
28
- /** @var array service requests to be executed. */
29
- private $requests = array();
30
-
31
- /** @var Google_Client */
32
- private $client;
33
-
34
- private $expected_classes = array();
35
-
36
- private $base_path;
37
-
38
- public function __construct(Google_Client $client, $boundary = false)
39
- {
40
- $this->client = $client;
41
- $this->base_path = $this->client->getBasePath();
42
- $this->expected_classes = array();
43
- $boundary = (false == $boundary) ? mt_rand() : $boundary;
44
- $this->boundary = str_replace('"', '', $boundary);
45
- }
46
-
47
- public function add(Google_Http_Request $request, $key = false)
48
- {
49
- if (false == $key) {
50
- $key = mt_rand();
51
- }
52
-
53
- $this->requests[$key] = $request;
54
- }
55
-
56
- public function execute()
57
- {
58
- $body = '';
59
-
60
- /** @var Google_Http_Request $req */
61
- foreach ($this->requests as $key => $req) {
62
- $body .= "--{$this->boundary}\n";
63
- $body .= $req->toBatchString($key) . "\n";
64
- $this->expected_classes["response-" . $key] = $req->getExpectedClass();
65
- }
66
-
67
- $body = rtrim($body);
68
- $body .= "\n--{$this->boundary}--";
69
-
70
- $url = $this->base_path . '/batch';
71
- $httpRequest = new Google_Http_Request($url, 'POST');
72
- $httpRequest->setRequestHeaders(
73
- array('Content-Type' => 'multipart/mixed; boundary=' . $this->boundary)
74
- );
75
-
76
- $httpRequest->setPostBody($body);
77
- $response = $this->client->getIo()->makeRequest($httpRequest);
78
-
79
- return $this->parseResponse($response);
80
- }
81
-
82
- public function parseResponse(Google_Http_Request $response)
83
- {
84
- $contentType = $response->getResponseHeader('content-type');
85
- $contentType = explode(';', $contentType);
86
- $boundary = false;
87
- foreach ($contentType as $part) {
88
- $part = (explode('=', $part, 2));
89
- if (isset($part[0]) && 'boundary' == trim($part[0])) {
90
- $boundary = $part[1];
91
- }
92
- }
93
-
94
- $body = $response->getResponseBody();
95
- if ($body) {
96
- $body = str_replace("--$boundary--", "--$boundary", $body);
97
- $parts = explode("--$boundary", $body);
98
- $responses = array();
99
-
100
- foreach ($parts as $part) {
101
- $part = trim($part);
102
- if (!empty($part)) {
103
- list($metaHeaders, $part) = explode("\r\n\r\n", $part, 2);
104
- $metaHeaders = $this->client->getIo()->getHttpResponseHeaders($metaHeaders);
105
-
106
- $status = substr($part, 0, strpos($part, "\n"));
107
- $status = explode(" ", $status);
108
- $status = $status[1];
109
-
110
- list($partHeaders, $partBody) = $this->client->getIo()->ParseHttpResponse($part, false);
111
- $response = new Google_Http_Request("");
112
- $response->setResponseHttpCode($status);
113
- $response->setResponseHeaders($partHeaders);
114
- $response->setResponseBody($partBody);
115
-
116
- // Need content id.
117
- $key = $metaHeaders['content-id'];
118
-
119
- if (isset($this->expected_classes[$key]) &&
120
- strlen($this->expected_classes[$key]) > 0) {
121
- $class = $this->expected_classes[$key];
122
- $response->setExpectedClass($class);
123
- }
124
-
125
- try {
126
- $response = Google_Http_REST::decodeHttpResponse($response, $this->client);
127
- $responses[$key] = $response;
128
- } catch (Google_Service_Exception $e) {
129
- // Store the exception as the response, so successful responses
130
- // can be processed.
131
- $responses[$key] = $e;
132
- }
133
- }
134
- }
135
-
136
- return $responses;
137
- }
138
-
139
- return null;
140
- }
141
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2012 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ *
21
+ * @author Chirag Shah <chirags@google.com>
22
+ */
23
+ class Google_Http_Batch
24
+ {
25
+ /**
26
+ *
27
+ * @var string Multipart Boundary.
28
+ */
29
+ private $boundary;
30
+ /**
31
+ *
32
+ * @var array service requests to be executed.
33
+ */
34
+ private $requests = array();
35
+ /**
36
+ *
37
+ * @var Google_Client
38
+ */
39
+ private $client;
40
+ private $expected_classes = array();
41
+ private $base_path;
42
+
43
+ public function __construct(Google_Client $client, $boundary = false)
44
+ {
45
+ $this->client = $client;
46
+ $this->base_path = $this->client->getBasePath();
47
+ $this->expected_classes = array();
48
+ $boundary = (false == $boundary) ? mt_rand() : $boundary;
49
+ $this->boundary = str_replace('"', '', $boundary);
50
+ }
51
+
52
+ public function add(Google_Http_Request $request, $key = false)
53
+ {
54
+ if (false == $key) {
55
+ $key = mt_rand();
56
+ }
57
+ $this->requests[$key] = $request;
58
+ }
59
+
60
+ public function execute()
61
+ {
62
+ $body = '';
63
+ /**
64
+ *
65
+ * @var Google_Http_Request $req
66
+ */
67
+ foreach ($this->requests as $key => $req) {
68
+ $body .= "--{$this->boundary}\n";
69
+ $body .= $req->toBatchString($key) . "\n";
70
+ $this->expected_classes["response-" . $key] = $req->getExpectedClass();
71
+ }
72
+ $body = rtrim($body);
73
+ $body .= "\n--{$this->boundary}--";
74
+ $url = $this->base_path . '/batch';
75
+ $httpRequest = new Google_Http_Request($url, 'POST');
76
+ $httpRequest->setRequestHeaders(array(
77
+ 'Content-Type' => 'multipart/mixed; boundary=' . $this->boundary
78
+ ));
79
+ $httpRequest->setPostBody($body);
80
+ $response = $this->client->getIo()->makeRequest($httpRequest);
81
+ return $this->parseResponse($response);
82
+ }
83
+
84
+ public function parseResponse(Google_Http_Request $response)
85
+ {
86
+ $contentType = $response->getResponseHeader('content-type');
87
+ $contentType = explode(';', $contentType);
88
+ $boundary = false;
89
+ foreach ($contentType as $part) {
90
+ $part = (explode('=', $part, 2));
91
+ if (isset($part[0]) && 'boundary' == trim($part[0])) {
92
+ $boundary = $part[1];
93
+ }
94
+ }
95
+ $body = $response->getResponseBody();
96
+ if ($body) {
97
+ $body = str_replace("--$boundary--", "--$boundary", $body);
98
+ $parts = explode("--$boundary", $body);
99
+ $responses = array();
100
+ foreach ($parts as $part) {
101
+ $part = trim($part);
102
+ if (! empty($part)) {
103
+ list ($metaHeaders, $part) = explode("\r\n\r\n", $part, 2);
104
+ $metaHeaders = $this->client->getIo()->getHttpResponseHeaders($metaHeaders);
105
+ $status = substr($part, 0, strpos($part, "\n"));
106
+ $status = explode(" ", $status);
107
+ $status = $status[1];
108
+ list ($partHeaders, $partBody) = $this->client->getIo()->ParseHttpResponse($part, false);
109
+ $response = new Google_Http_Request("");
110
+ $response->setResponseHttpCode($status);
111
+ $response->setResponseHeaders($partHeaders);
112
+ $response->setResponseBody($partBody);
113
+ // Need content id.
114
+ $key = $metaHeaders['content-id'];
115
+ if (isset($this->expected_classes[$key]) && strlen($this->expected_classes[$key]) > 0) {
116
+ $class = $this->expected_classes[$key];
117
+ $response->setExpectedClass($class);
118
+ }
119
+ try {
120
+ $response = Google_Http_REST::decodeHttpResponse($response, $this->client);
121
+ $responses[$key] = $response;
122
+ } catch (Google_Service_Exception $e) {
123
+ // Store the exception as the response, so successful responses
124
+ // can be processed.
125
+ $responses[$key] = $e;
126
+ }
127
+ }
128
+ }
129
+ return $responses;
130
+ }
131
+ return null;
132
+ }
 
 
 
 
 
 
 
 
133
  }
tools/src/Google/Http/CacheParser.php CHANGED
@@ -1,184 +1,180 @@
1
- <?php
2
- /*
3
- * Copyright 2012 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * Implement the caching directives specified in rfc2616. This
22
- * implementation is guided by the guidance offered in rfc2616-sec13.
23
- * @author Chirag Shah <chirags@google.com>
24
- */
25
- class Google_Http_CacheParser
26
- {
27
- public static $CACHEABLE_HTTP_METHODS = array('GET', 'HEAD');
28
- public static $CACHEABLE_STATUS_CODES = array('200', '203', '300', '301');
29
-
30
- /**
31
- * Check if an HTTP request can be cached by a private local cache.
32
- *
33
- * @static
34
- * @param Google_Http_Request $resp
35
- * @return bool True if the request is cacheable.
36
- * False if the request is uncacheable.
37
- */
38
- public static function isRequestCacheable(Google_Http_Request $resp)
39
- {
40
- $method = $resp->getRequestMethod();
41
- if (! in_array($method, self::$CACHEABLE_HTTP_METHODS)) {
42
- return false;
43
- }
44
-
45
- // Don't cache authorized requests/responses.
46
- // [rfc2616-14.8] When a shared cache receives a request containing an
47
- // Authorization field, it MUST NOT return the corresponding response
48
- // as a reply to any other request...
49
- if ($resp->getRequestHeader("authorization")) {
50
- return false;
51
- }
52
-
53
- return true;
54
- }
55
-
56
- /**
57
- * Check if an HTTP response can be cached by a private local cache.
58
- *
59
- * @static
60
- * @param Google_Http_Request $resp
61
- * @return bool True if the response is cacheable.
62
- * False if the response is un-cacheable.
63
- */
64
- public static function isResponseCacheable(Google_Http_Request $resp)
65
- {
66
- // First, check if the HTTP request was cacheable before inspecting the
67
- // HTTP response.
68
- if (false == self::isRequestCacheable($resp)) {
69
- return false;
70
- }
71
-
72
- $code = $resp->getResponseHttpCode();
73
- if (! in_array($code, self::$CACHEABLE_STATUS_CODES)) {
74
- return false;
75
- }
76
-
77
- // The resource is uncacheable if the resource is already expired and
78
- // the resource doesn't have an ETag for revalidation.
79
- $etag = $resp->getResponseHeader("etag");
80
- if (self::isExpired($resp) && $etag == false) {
81
- return false;
82
- }
83
-
84
- // [rfc2616-14.9.2] If [no-store is] sent in a response, a cache MUST NOT
85
- // store any part of either this response or the request that elicited it.
86
- $cacheControl = $resp->getParsedCacheControl();
87
- if (isset($cacheControl['no-store'])) {
88
- return false;
89
- }
90
-
91
- // Pragma: no-cache is an http request directive, but is occasionally
92
- // used as a response header incorrectly.
93
- $pragma = $resp->getResponseHeader('pragma');
94
- if ($pragma == 'no-cache' || strpos($pragma, 'no-cache') !== false) {
95
- return false;
96
- }
97
-
98
- // [rfc2616-14.44] Vary: * is extremely difficult to cache. "It implies that
99
- // a cache cannot determine from the request headers of a subsequent request
100
- // whether this response is the appropriate representation."
101
- // Given this, we deem responses with the Vary header as uncacheable.
102
- $vary = $resp->getResponseHeader('vary');
103
- if ($vary) {
104
- return false;
105
- }
106
-
107
- return true;
108
- }
109
-
110
- /**
111
- * @static
112
- * @param Google_Http_Request $resp
113
- * @return bool True if the HTTP response is considered to be expired.
114
- * False if it is considered to be fresh.
115
- */
116
- public static function isExpired(Google_Http_Request $resp)
117
- {
118
- // HTTP/1.1 clients and caches MUST treat other invalid date formats,
119
- // especially including the value “0”, as in the past.
120
- $parsedExpires = false;
121
- $responseHeaders = $resp->getResponseHeaders();
122
-
123
- if (isset($responseHeaders['expires'])) {
124
- $rawExpires = $responseHeaders['expires'];
125
- // Check for a malformed expires header first.
126
- if (empty($rawExpires) || (is_numeric($rawExpires) && $rawExpires <= 0)) {
127
- return true;
128
- }
129
-
130
- // See if we can parse the expires header.
131
- $parsedExpires = strtotime($rawExpires);
132
- if (false == $parsedExpires || $parsedExpires <= 0) {
133
- return true;
134
- }
135
- }
136
-
137
- // Calculate the freshness of an http response.
138
- $freshnessLifetime = false;
139
- $cacheControl = $resp->getParsedCacheControl();
140
- if (isset($cacheControl['max-age'])) {
141
- $freshnessLifetime = $cacheControl['max-age'];
142
- }
143
-
144
- $rawDate = $resp->getResponseHeader('date');
145
- $parsedDate = strtotime($rawDate);
146
-
147
- if (empty($rawDate) || false == $parsedDate) {
148
- // We can't default this to now, as that means future cache reads
149
- // will always pass with the logic below, so we will require a
150
- // date be injected if not supplied.
151
- throw new Google_Exception("All cacheable requests must have creation dates.");
152
- }
153
-
154
- if (false == $freshnessLifetime && isset($responseHeaders['expires'])) {
155
- $freshnessLifetime = $parsedExpires - $parsedDate;
156
- }
157
-
158
- if (false == $freshnessLifetime) {
159
- return true;
160
- }
161
-
162
- // Calculate the age of an http response.
163
- $age = max(0, time() - $parsedDate);
164
- if (isset($responseHeaders['age'])) {
165
- $age = max($age, strtotime($responseHeaders['age']));
166
- }
167
-
168
- return $freshnessLifetime <= $age;
169
- }
170
-
171
- /**
172
- * Determine if a cache entry should be revalidated with by the origin.
173
- *
174
- * @param Google_Http_Request $response
175
- * @return bool True if the entry is expired, else return false.
176
- */
177
- public static function mustRevalidate(Google_Http_Request $response)
178
- {
179
- // [13.3] When a cache has a stale entry that it would like to use as a
180
- // response to a client's request, it first has to check with the origin
181
- // server to see if its cached entry is still usable.
182
- return self::isExpired($response);
183
- }
184
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2012 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * Implement the caching directives specified in rfc2616.
21
+ * This
22
+ * implementation is guided by the guidance offered in rfc2616-sec13.
23
+ *
24
+ * @author Chirag Shah <chirags@google.com>
25
+ */
26
+ class Google_Http_CacheParser
27
+ {
28
+ public static $CACHEABLE_HTTP_METHODS = array(
29
+ 'GET',
30
+ 'HEAD'
31
+ );
32
+ public static $CACHEABLE_STATUS_CODES = array(
33
+ '200',
34
+ '203',
35
+ '300',
36
+ '301'
37
+ );
38
+
39
+ /**
40
+ * Check if an HTTP request can be cached by a private local cache.
41
+ *
42
+ * @static
43
+ *
44
+ * @param Google_Http_Request $resp
45
+ * @return bool True if the request is cacheable.
46
+ * False if the request is uncacheable.
47
+ */
48
+ public static function isRequestCacheable(Google_Http_Request $resp)
49
+ {
50
+ $method = $resp->getRequestMethod();
51
+ if (! in_array($method, self::$CACHEABLE_HTTP_METHODS)) {
52
+ return false;
53
+ }
54
+ // Don't cache authorized requests/responses.
55
+ // [rfc2616-14.8] When a shared cache receives a request containing an
56
+ // Authorization field, it MUST NOT return the corresponding response
57
+ // as a reply to any other request...
58
+ if ($resp->getRequestHeader("authorization")) {
59
+ return false;
60
+ }
61
+ return true;
62
+ }
63
+
64
+ /**
65
+ * Check if an HTTP response can be cached by a private local cache.
66
+ *
67
+ * @static
68
+ *
69
+ * @param Google_Http_Request $resp
70
+ * @return bool True if the response is cacheable.
71
+ * False if the response is un-cacheable.
72
+ */
73
+ public static function isResponseCacheable(Google_Http_Request $resp)
74
+ {
75
+ // First, check if the HTTP request was cacheable before inspecting the
76
+ // HTTP response.
77
+ if (false == self::isRequestCacheable($resp)) {
78
+ return false;
79
+ }
80
+ $code = $resp->getResponseHttpCode();
81
+ if (! in_array($code, self::$CACHEABLE_STATUS_CODES)) {
82
+ return false;
83
+ }
84
+ // The resource is uncacheable if the resource is already expired and
85
+ // the resource doesn't have an ETag for revalidation.
86
+ $etag = $resp->getResponseHeader("etag");
87
+ if (self::isExpired($resp) && $etag == false) {
88
+ return false;
89
+ }
90
+ // [rfc2616-14.9.2] If [no-store is] sent in a response, a cache MUST NOT
91
+ // store any part of either this response or the request that elicited it.
92
+ $cacheControl = $resp->getParsedCacheControl();
93
+ if (isset($cacheControl['no-store'])) {
94
+ return false;
95
+ }
96
+ // Pragma: no-cache is an http request directive, but is occasionally
97
+ // used as a response header incorrectly.
98
+ $pragma = $resp->getResponseHeader('pragma');
99
+ if ($pragma == 'no-cache' || strpos($pragma, 'no-cache') !== false) {
100
+ return false;
101
+ }
102
+ // [rfc2616-14.44] Vary: * is extremely difficult to cache. "It implies that
103
+ // a cache cannot determine from the request headers of a subsequent request
104
+ // whether this response is the appropriate representation."
105
+ // Given this, we deem responses with the Vary header as uncacheable.
106
+ $vary = $resp->getResponseHeader('vary');
107
+ if ($vary) {
108
+ return false;
109
+ }
110
+ return true;
111
+ }
112
+
113
+ /**
114
+ *
115
+ * @static
116
+ *
117
+ * @param Google_Http_Request $resp
118
+ * @return bool True if the HTTP response is considered to be expired.
119
+ * False if it is considered to be fresh.
120
+ */
121
+ public static function isExpired(Google_Http_Request $resp)
122
+ {
123
+ // HTTP/1.1 clients and caches MUST treat other invalid date formats,
124
+ // especially including the value “0”, as in the past.
125
+ $parsedExpires = false;
126
+ $responseHeaders = $resp->getResponseHeaders();
127
+ if (isset($responseHeaders['expires'])) {
128
+ $rawExpires = $responseHeaders['expires'];
129
+ // Check for a malformed expires header first.
130
+ if (empty($rawExpires) || (is_numeric($rawExpires) && $rawExpires <= 0)) {
131
+ return true;
132
+ }
133
+ // See if we can parse the expires header.
134
+ $parsedExpires = strtotime($rawExpires);
135
+ if (false == $parsedExpires || $parsedExpires <= 0) {
136
+ return true;
137
+ }
138
+ }
139
+ // Calculate the freshness of an http response.
140
+ $freshnessLifetime = false;
141
+ $cacheControl = $resp->getParsedCacheControl();
142
+ if (isset($cacheControl['max-age'])) {
143
+ $freshnessLifetime = $cacheControl['max-age'];
144
+ }
145
+ $rawDate = $resp->getResponseHeader('date');
146
+ $parsedDate = strtotime($rawDate);
147
+ if (empty($rawDate) || false == $parsedDate) {
148
+ // We can't default this to now, as that means future cache reads
149
+ // will always pass with the logic below, so we will require a
150
+ // date be injected if not supplied.
151
+ throw new Google_Exception("All cacheable requests must have creation dates.");
152
+ }
153
+ if (false == $freshnessLifetime && isset($responseHeaders['expires'])) {
154
+ $freshnessLifetime = $parsedExpires - $parsedDate;
155
+ }
156
+ if (false == $freshnessLifetime) {
157
+ return true;
158
+ }
159
+ // Calculate the age of an http response.
160
+ $age = max(0, time() - $parsedDate);
161
+ if (isset($responseHeaders['age'])) {
162
+ $age = max($age, strtotime($responseHeaders['age']));
163
+ }
164
+ return $freshnessLifetime <= $age;
165
+ }
166
+
167
+ /**
168
+ * Determine if a cache entry should be revalidated with by the origin.
169
+ *
170
+ * @param Google_Http_Request $response
171
+ * @return bool True if the entry is expired, else return false.
172
+ */
173
+ public static function mustRevalidate(Google_Http_Request $response)
174
+ {
175
+ // [13.3] When a cache has a stale entry that it would like to use as a
176
+ // response to a client's request, it first has to check with the origin
177
+ // server to see if its cached entry is still usable.
178
+ return self::isExpired($response);
179
+ }
 
 
 
 
180
  }
tools/src/Google/Http/MediaFileUpload.php CHANGED
@@ -1,300 +1,301 @@
1
- <?php
2
- /**
3
- * Copyright 2012 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * @author Chirag Shah <chirags@google.com>
22
- *
23
- */
24
- class Google_Http_MediaFileUpload
25
- {
26
- const UPLOAD_MEDIA_TYPE = 'media';
27
- const UPLOAD_MULTIPART_TYPE = 'multipart';
28
- const UPLOAD_RESUMABLE_TYPE = 'resumable';
29
-
30
- /** @var string $mimeType */
31
- private $mimeType;
32
-
33
- /** @var string $data */
34
- private $data;
35
-
36
- /** @var bool $resumable */
37
- private $resumable;
38
-
39
- /** @var int $chunkSize */
40
- private $chunkSize;
41
-
42
- /** @var int $size */
43
- private $size;
44
-
45
- /** @var string $resumeUri */
46
- private $resumeUri;
47
-
48
- /** @var int $progress */
49
- private $progress;
50
-
51
- /** @var Google_Client */
52
- private $client;
53
-
54
- /** @var Google_Http_Request */
55
- private $request;
56
-
57
- /** @var string */
58
- private $boundary;
59
-
60
- /**
61
- * Result code from last HTTP call
62
- * @var int
63
- */
64
- private $httpResultCode;
65
-
66
- /**
67
- * @param $mimeType string
68
- * @param $data string The bytes you want to upload.
69
- * @param $resumable bool
70
- * @param bool $chunkSize File will be uploaded in chunks of this many bytes.
71
- * only used if resumable=True
72
- */
73
- public function __construct(
74
- Google_Client $client,
75
- Google_Http_Request $request,
76
- $mimeType,
77
- $data,
78
- $resumable = false,
79
- $chunkSize = false,
80
- $boundary = false
81
- ) {
82
- $this->client = $client;
83
- $this->request = $request;
84
- $this->mimeType = $mimeType;
85
- $this->data = $data;
86
- $this->size = strlen($this->data);
87
- $this->resumable = $resumable;
88
- if (!$chunkSize) {
89
- $chunkSize = 256 * 1024;
90
- }
91
- $this->chunkSize = $chunkSize;
92
- $this->progress = 0;
93
- $this->boundary = $boundary;
94
-
95
- // Process Media Request
96
- $this->process();
97
- }
98
-
99
- /**
100
- * Set the size of the file that is being uploaded.
101
- * @param $size - int file size in bytes
102
- */
103
- public function setFileSize($size)
104
- {
105
- $this->size = $size;
106
- }
107
-
108
- /**
109
- * Return the progress on the upload
110
- * @return int progress in bytes uploaded.
111
- */
112
- public function getProgress()
113
- {
114
- return $this->progress;
115
- }
116
-
117
- /**
118
- * Return the HTTP result code from the last call made.
119
- * @return int code
120
- */
121
- public function getHttpResultCode()
122
- {
123
- return $this->httpResultCode;
124
- }
125
-
126
- /**
127
- * Send the next part of the file to upload.
128
- * @param [$chunk] the next set of bytes to send. If false will used $data passed
129
- * at construct time.
130
- */
131
- public function nextChunk($chunk = false)
132
- {
133
- if (false == $this->resumeUri) {
134
- $this->resumeUri = $this->getResumeUri();
135
- }
136
-
137
- if (false == $chunk) {
138
- $chunk = substr($this->data, $this->progress, $this->chunkSize);
139
- }
140
-
141
- $lastBytePos = $this->progress + strlen($chunk) - 1;
142
- $headers = array(
143
- 'content-range' => "bytes $this->progress-$lastBytePos/$this->size",
144
- 'content-type' => $this->request->getRequestHeader('content-type'),
145
- 'content-length' => $this->chunkSize,
146
- 'expect' => '',
147
- );
148
-
149
- $httpRequest = new Google_Http_Request(
150
- $this->resumeUri,
151
- 'PUT',
152
- $headers,
153
- $chunk
154
- );
155
-
156
- if ($this->client->getClassConfig("Google_Http_Request", "enable_gzip_for_uploads")) {
157
- $httpRequest->enableGzip();
158
- } else {
159
- $httpRequest->disableGzip();
160
- }
161
-
162
- $response = $this->client->getIo()->makeRequest($httpRequest);
163
- $response->setExpectedClass($this->request->getExpectedClass());
164
- $code = $response->getResponseHttpCode();
165
- $this->httpResultCode = $code;
166
-
167
- if (308 == $code) {
168
- // Track the amount uploaded.
169
- $range = explode('-', $response->getResponseHeader('range'));
170
- $this->progress = $range[1] + 1;
171
-
172
- // Allow for changing upload URLs.
173
- $location = $response->getResponseHeader('location');
174
- if ($location) {
175
- $this->resumeUri = $location;
176
- }
177
-
178
- // No problems, but upload not complete.
179
- return false;
180
- } else {
181
- return Google_Http_REST::decodeHttpResponse($response, $this->client);
182
- }
183
- }
184
-
185
- /**
186
- * @param $meta
187
- * @param $params
188
- * @return array|bool
189
- * @visible for testing
190
- */
191
- private function process()
192
- {
193
- $postBody = false;
194
- $contentType = false;
195
-
196
- $meta = $this->request->getPostBody();
197
- $meta = is_string($meta) ? json_decode($meta, true) : $meta;
198
-
199
- $uploadType = $this->getUploadType($meta);
200
- $this->request->setQueryParam('uploadType', $uploadType);
201
- $this->transformToUploadUrl();
202
- $mimeType = $this->mimeType ?
203
- $this->mimeType :
204
- $this->request->getRequestHeader('content-type');
205
-
206
- if (self::UPLOAD_RESUMABLE_TYPE == $uploadType) {
207
- $contentType = $mimeType;
208
- $postBody = is_string($meta) ? $meta : json_encode($meta);
209
- } else if (self::UPLOAD_MEDIA_TYPE == $uploadType) {
210
- $contentType = $mimeType;
211
- $postBody = $this->data;
212
- } else if (self::UPLOAD_MULTIPART_TYPE == $uploadType) {
213
- // This is a multipart/related upload.
214
- $boundary = $this->boundary ? $this->boundary : mt_rand();
215
- $boundary = str_replace('"', '', $boundary);
216
- $contentType = 'multipart/related; boundary=' . $boundary;
217
- $related = "--$boundary\r\n";
218
- $related .= "Content-Type: application/json; charset=UTF-8\r\n";
219
- $related .= "\r\n" . json_encode($meta) . "\r\n";
220
- $related .= "--$boundary\r\n";
221
- $related .= "Content-Type: $mimeType\r\n";
222
- $related .= "Content-Transfer-Encoding: base64\r\n";
223
- $related .= "\r\n" . base64_encode($this->data) . "\r\n";
224
- $related .= "--$boundary--";
225
- $postBody = $related;
226
- }
227
-
228
- $this->request->setPostBody($postBody);
229
-
230
- if (isset($contentType) && $contentType) {
231
- $contentTypeHeader['content-type'] = $contentType;
232
- $this->request->setRequestHeaders($contentTypeHeader);
233
- }
234
- }
235
-
236
- private function transformToUploadUrl()
237
- {
238
- $base = $this->request->getBaseComponent();
239
- $this->request->setBaseComponent($base . '/upload');
240
- }
241
-
242
- /**
243
- * Valid upload types:
244
- * - resumable (UPLOAD_RESUMABLE_TYPE)
245
- * - media (UPLOAD_MEDIA_TYPE)
246
- * - multipart (UPLOAD_MULTIPART_TYPE)
247
- * @param $meta
248
- * @return string
249
- * @visible for testing
250
- */
251
- public function getUploadType($meta)
252
- {
253
- if ($this->resumable) {
254
- return self::UPLOAD_RESUMABLE_TYPE;
255
- }
256
-
257
- if (false == $meta && $this->data) {
258
- return self::UPLOAD_MEDIA_TYPE;
259
- }
260
-
261
- return self::UPLOAD_MULTIPART_TYPE;
262
- }
263
-
264
- private function getResumeUri()
265
- {
266
- $result = null;
267
- $body = $this->request->getPostBody();
268
- if ($body) {
269
- $headers = array(
270
- 'content-type' => 'application/json; charset=UTF-8',
271
- 'content-length' => Google_Utils::getStrLen($body),
272
- 'x-upload-content-type' => $this->mimeType,
273
- 'x-upload-content-length' => $this->size,
274
- 'expect' => '',
275
- );
276
- $this->request->setRequestHeaders($headers);
277
- }
278
-
279
- $response = $this->client->getIo()->makeRequest($this->request);
280
- $location = $response->getResponseHeader('location');
281
- $code = $response->getResponseHttpCode();
282
-
283
- if (200 == $code && true == $location) {
284
- return $location;
285
- }
286
- $message = $code;
287
- $body = @json_decode($response->getResponseBody());
288
- if (!empty( $body->error->errors ) ) {
289
- $message .= ': ';
290
- foreach ($body->error->errors as $error) {
291
- $message .= "{$error->domain}, {$error->message};";
292
- }
293
- $message = rtrim($message, ';');
294
- }
295
-
296
- $error = "Failed to start the resumable upload (HTTP {$message})";
297
- $this->client->getLogger()->error($error);
298
- throw new Google_Exception($error);
299
- }
 
300
  }
1
+ <?php
2
+ /**
3
+ * Copyright 2012 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ *
21
+ * @author Chirag Shah <chirags@google.com>
22
+ *
23
+ */
24
+ class Google_Http_MediaFileUpload
25
+ {
26
+ const UPLOAD_MEDIA_TYPE = 'media';
27
+ const UPLOAD_MULTIPART_TYPE = 'multipart';
28
+ const UPLOAD_RESUMABLE_TYPE = 'resumable';
29
+ /**
30
+ *
31
+ * @var string $mimeType
32
+ */
33
+ private $mimeType;
34
+ /**
35
+ *
36
+ * @var string $data
37
+ */
38
+ private $data;
39
+ /**
40
+ *
41
+ * @var bool $resumable
42
+ */
43
+ private $resumable;
44
+ /**
45
+ *
46
+ * @var int $chunkSize
47
+ */
48
+ private $chunkSize;
49
+ /**
50
+ *
51
+ * @var int $size
52
+ */
53
+ private $size;
54
+ /**
55
+ *
56
+ * @var string $resumeUri
57
+ */
58
+ private $resumeUri;
59
+ /**
60
+ *
61
+ * @var int $progress
62
+ */
63
+ private $progress;
64
+ /**
65
+ *
66
+ * @var Google_Client
67
+ */
68
+ private $client;
69
+ /**
70
+ *
71
+ * @var Google_Http_Request
72
+ */
73
+ private $request;
74
+ /**
75
+ *
76
+ * @var string
77
+ */
78
+ private $boundary;
79
+ /**
80
+ * Result code from last HTTP call
81
+ *
82
+ * @var int
83
+ */
84
+ private $httpResultCode;
85
+
86
+ /**
87
+ *
88
+ * @param $mimeType string
89
+ * @param $data string
90
+ * The bytes you want to upload.
91
+ * @param $resumable bool
92
+ * @param bool $chunkSize
93
+ * File will be uploaded in chunks of this many bytes.
94
+ * only used if resumable=True
95
+ */
96
+ public function __construct(Google_Client $client, Google_Http_Request $request, $mimeType, $data, $resumable = false, $chunkSize = false, $boundary = false)
97
+ {
98
+ $this->client = $client;
99
+ $this->request = $request;
100
+ $this->mimeType = $mimeType;
101
+ $this->data = $data;
102
+ $this->size = strlen($this->data);
103
+ $this->resumable = $resumable;
104
+ if (! $chunkSize) {
105
+ $chunkSize = 256 * 1024;
106
+ }
107
+ $this->chunkSize = $chunkSize;
108
+ $this->progress = 0;
109
+ $this->boundary = $boundary;
110
+ // Process Media Request
111
+ $this->process();
112
+ }
113
+
114
+ /**
115
+ * Set the size of the file that is being uploaded.
116
+ *
117
+ * @param $size -
118
+ * int file size in bytes
119
+ */
120
+ public function setFileSize($size)
121
+ {
122
+ $this->size = $size;
123
+ }
124
+
125
+ /**
126
+ * Return the progress on the upload
127
+ *
128
+ * @return int progress in bytes uploaded.
129
+ */
130
+ public function getProgress()
131
+ {
132
+ return $this->progress;
133
+ }
134
+
135
+ /**
136
+ * Return the HTTP result code from the last call made.
137
+ *
138
+ * @return int code
139
+ */
140
+ public function getHttpResultCode()
141
+ {
142
+ return $this->httpResultCode;
143
+ }
144
+
145
+ /**
146
+ * Send the next part of the file to upload.
147
+ *
148
+ * @param
149
+ * [$chunk] the next set of bytes to send. If false will used $data passed
150
+ * at construct time.
151
+ */
152
+ public function nextChunk($chunk = false)
153
+ {
154
+ if (false == $this->resumeUri) {
155
+ $this->resumeUri = $this->getResumeUri();
156
+ }
157
+ if (false == $chunk) {
158
+ $chunk = substr($this->data, $this->progress, $this->chunkSize);
159
+ }
160
+ $lastBytePos = $this->progress + strlen($chunk) - 1;
161
+ $headers = array(
162
+ 'content-range' => "bytes $this->progress-$lastBytePos/$this->size",
163
+ 'content-type' => $this->request->getRequestHeader('content-type'),
164
+ 'content-length' => $this->chunkSize,
165
+ 'expect' => ''
166
+ );
167
+ $httpRequest = new Google_Http_Request($this->resumeUri, 'PUT', $headers, $chunk);
168
+ if ($this->client->getClassConfig("Google_Http_Request", "enable_gzip_for_uploads")) {
169
+ $httpRequest->enableGzip();
170
+ } else {
171
+ $httpRequest->disableGzip();
172
+ }
173
+ $response = $this->client->getIo()->makeRequest($httpRequest);
174
+ $response->setExpectedClass($this->request->getExpectedClass());
175
+ $code = $response->getResponseHttpCode();
176
+ $this->httpResultCode = $code;
177
+ if (308 == $code) {
178
+ // Track the amount uploaded.
179
+ $range = explode('-', $response->getResponseHeader('range'));
180
+ $this->progress = $range[1] + 1;
181
+ // Allow for changing upload URLs.
182
+ $location = $response->getResponseHeader('location');
183
+ if ($location) {
184
+ $this->resumeUri = $location;
185
+ }
186
+ // No problems, but upload not complete.
187
+ return false;
188
+ } else {
189
+ return Google_Http_REST::decodeHttpResponse($response, $this->client);
190
+ }
191
+ }
192
+
193
+ /**
194
+ *
195
+ * @param
196
+ * $meta
197
+ * @param
198
+ * $params
199
+ * @return array|bool @visible for testing
200
+ */
201
+ private function process()
202
+ {
203
+ $postBody = false;
204
+ $contentType = false;
205
+ $meta = $this->request->getPostBody();
206
+ $meta = is_string($meta) ? json_decode($meta, true) : $meta;
207
+ $uploadType = $this->getUploadType($meta);
208
+ $this->request->setQueryParam('uploadType', $uploadType);
209
+ $this->transformToUploadUrl();
210
+ $mimeType = $this->mimeType ? $this->mimeType : $this->request->getRequestHeader('content-type');
211
+ if (self::UPLOAD_RESUMABLE_TYPE == $uploadType) {
212
+ $contentType = $mimeType;
213
+ $postBody = is_string($meta) ? $meta : json_encode($meta);
214
+ } else
215
+ if (self::UPLOAD_MEDIA_TYPE == $uploadType) {
216
+ $contentType = $mimeType;
217
+ $postBody = $this->data;
218
+ } else
219
+ if (self::UPLOAD_MULTIPART_TYPE == $uploadType) {
220
+ // This is a multipart/related upload.
221
+ $boundary = $this->boundary ? $this->boundary : mt_rand();
222
+ $boundary = str_replace('"', '', $boundary);
223
+ $contentType = 'multipart/related; boundary=' . $boundary;
224
+ $related = "--$boundary\r\n";
225
+ $related .= "Content-Type: application/json; charset=UTF-8\r\n";
226
+ $related .= "\r\n" . json_encode($meta) . "\r\n";
227
+ $related .= "--$boundary\r\n";
228
+ $related .= "Content-Type: $mimeType\r\n";
229
+ $related .= "Content-Transfer-Encoding: base64\r\n";
230
+ $related .= "\r\n" . base64_encode($this->data) . "\r\n";
231
+ $related .= "--$boundary--";
232
+ $postBody = $related;
233
+ }
234
+ $this->request->setPostBody($postBody);
235
+ if (isset($contentType) && $contentType) {
236
+ $contentTypeHeader['content-type'] = $contentType;
237
+ $this->request->setRequestHeaders($contentTypeHeader);
238
+ }
239
+ }
240
+
241
+ private function transformToUploadUrl()
242
+ {
243
+ $base = $this->request->getBaseComponent();
244
+ $this->request->setBaseComponent($base . '/upload');
245
+ }
246
+
247
+ /**
248
+ * Valid upload types:
249
+ * - resumable (UPLOAD_RESUMABLE_TYPE)
250
+ * - media (UPLOAD_MEDIA_TYPE)
251
+ * - multipart (UPLOAD_MULTIPART_TYPE)
252
+ *
253
+ * @param
254
+ * $meta
255
+ * @return string @visible for testing
256
+ */
257
+ public function getUploadType($meta)
258
+ {
259
+ if ($this->resumable) {
260
+ return self::UPLOAD_RESUMABLE_TYPE;
261
+ }
262
+ if (false == $meta && $this->data) {
263
+ return self::UPLOAD_MEDIA_TYPE;
264
+ }
265
+ return self::UPLOAD_MULTIPART_TYPE;
266
+ }
267
+
268
+ private function getResumeUri()
269
+ {
270
+ $result = null;
271
+ $body = $this->request->getPostBody();
272
+ if ($body) {
273
+ $headers = array(
274
+ 'content-type' => 'application/json; charset=UTF-8',
275
+ 'content-length' => Google_Utils::getStrLen($body),
276
+ 'x-upload-content-type' => $this->mimeType,
277
+ 'x-upload-content-length' => $this->size,
278
+ 'expect' => ''
279
+ );
280
+ $this->request->setRequestHeaders($headers);
281
+ }
282
+ $response = $this->client->getIo()->makeRequest($this->request);
283
+ $location = $response->getResponseHeader('location');
284
+ $code = $response->getResponseHttpCode();
285
+ if (200 == $code && true == $location) {
286
+ return $location;
287
+ }
288
+ $message = $code;
289
+ $body = @json_decode($response->getResponseBody());
290
+ if (! empty($body->error->errors)) {
291
+ $message .= ': ';
292
+ foreach ($body->error->errors as $error) {
293
+ $message .= "{$error->domain}, {$error->message};";
294
+ }
295
+ $message = rtrim($message, ';');
296
+ }
297
+ $error = "Failed to start the resumable upload (HTTP {$message})";
298
+ $this->client->getLogger()->error($error);
299
+ throw new Google_Exception($error);
300
+ }
301
  }
tools/src/Google/Http/REST.php CHANGED
@@ -1,147 +1,143 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * This class implements the RESTful transport of apiServiceRequest()'s
22
- *
23
- * @author Chris Chabot <chabotc@google.com>
24
- * @author Chirag Shah <chirags@google.com>
25
- */
26
- class Google_Http_REST
27
- {
28
- /**
29
- * Executes a Google_Http_Request
30
- *
31
- * @param Google_Client $client
32
- * @param Google_Http_Request $req
33
- * @return array decoded result
34
- * @throws Google_Service_Exception on server side error (ie: not authenticated,
35
- * invalid or malformed post body, invalid url)
36
- */
37
- public static function execute(Google_Client $client, Google_Http_Request $req)
38
- {
39
- $httpRequest = $client->getIo()->makeRequest($req);
40
- $httpRequest->setExpectedClass($req->getExpectedClass());
41
- return self::decodeHttpResponse($httpRequest, $client);
42
- }
43
-
44
- /**
45
- * Decode an HTTP Response.
46
- * @static
47
- * @throws Google_Service_Exception
48
- * @param Google_Http_Request $response The http response to be decoded.
49
- * @param Google_Client $client
50
- * @return mixed|null
51
- */
52
- public static function decodeHttpResponse($response, Google_Client $client = null)
53
- {
54
- $code = $response->getResponseHttpCode();
55
- $body = $response->getResponseBody();
56
- $decoded = null;
57
-
58
- if ((intVal($code)) >= 300) {
59
- $decoded = json_decode($body, true);
60
- $err = 'Error calling ' . $response->getRequestMethod() . ' ' . $response->getUrl();
61
- if (isset($decoded['error']) &&
62
- isset($decoded['error']['message']) &&
63
- isset($decoded['error']['code'])) {
64
- // if we're getting a json encoded error definition, use that instead of the raw response
65
- // body for improved readability
66
- $err .= ": ({$decoded['error']['code']}) {$decoded['error']['message']}";
67
- } else {
68
- $err .= ": ($code) $body";
69
- }
70
-
71
- $errors = null;
72
- // Specific check for APIs which don't return error details, such as Blogger.
73
- if (isset($decoded['error']) && isset($decoded['error']['errors'])) {
74
- $errors = $decoded['error']['errors'];
75
- }
76
-
77
- if ($client) {
78
- $client->getLogger()->error(
79
- $err,
80
- array('code' => $code, 'errors' => $errors)
81
- );
82
- }
83
- throw new Google_Service_Exception($err, $code, null, $errors);
84
- }
85
-
86
- // Only attempt to decode the response, if the response code wasn't (204) 'no content'
87
- if ($code != '204') {
88
- $decoded = json_decode($body, true);
89
- if ($decoded === null || $decoded === "") {
90
- $error = "Invalid json in service response: $body";
91
- if ($client) {
92
- $client->getLogger()->error($error);
93
- }
94
- throw new Google_Service_Exception($error);
95
- }
96
-
97
- if ($response->getExpectedClass()) {
98
- $class = $response->getExpectedClass();
99
- $decoded = new $class($decoded);
100
- }
101
- }
102
- return $decoded;
103
- }
104
-
105
- /**
106
- * Parse/expand request parameters and create a fully qualified
107
- * request uri.
108
- * @static
109
- * @param string $servicePath
110
- * @param string $restPath
111
- * @param array $params
112
- * @return string $requestUrl
113
- */
114
- public static function createRequestUri($servicePath, $restPath, $params)
115
- {
116
- $requestUrl = $servicePath . $restPath;
117
- $uriTemplateVars = array();
118
- $queryVars = array();
119
- foreach ($params as $paramName => $paramSpec) {
120
- if ($paramSpec['type'] == 'boolean') {
121
- $paramSpec['value'] = ($paramSpec['value']) ? 'true' : 'false';
122
- }
123
- if ($paramSpec['location'] == 'path') {
124
- $uriTemplateVars[$paramName] = $paramSpec['value'];
125
- } else if ($paramSpec['location'] == 'query') {
126
- if (isset($paramSpec['repeated']) && is_array($paramSpec['value'])) {
127
- foreach ($paramSpec['value'] as $value) {
128
- $queryVars[] = $paramName . '=' . rawurlencode($value);
129
- }
130
- } else {
131
- $queryVars[] = $paramName . '=' . rawurlencode($paramSpec['value']);
132
- }
133
- }
134
- }
135
-
136
- if (count($uriTemplateVars)) {
137
- $uriTemplateParser = new Google_Utils_URITemplate();
138
- $requestUrl = $uriTemplateParser->parse($requestUrl, $uriTemplateVars);
139
- }
140
-
141
- if (count($queryVars)) {
142
- $requestUrl .= '?' . implode($queryVars, '&');
143
- }
144
-
145
- return $requestUrl;
146
- }
147
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * This class implements the RESTful transport of apiServiceRequest()'s
21
+ *
22
+ * @author Chris Chabot <chabotc@google.com>
23
+ * @author Chirag Shah <chirags@google.com>
24
+ */
25
+ class Google_Http_REST
26
+ {
27
+
28
+ /**
29
+ * Executes a Google_Http_Request
30
+ *
31
+ * @param Google_Client $client
32
+ * @param Google_Http_Request $req
33
+ * @return array decoded result
34
+ * @throws Google_Service_Exception on server side error (ie: not authenticated,
35
+ * invalid or malformed post body, invalid url)
36
+ */
37
+ public static function execute(Google_Client $client, Google_Http_Request $req)
38
+ {
39
+ $httpRequest = $client->getIo()->makeRequest($req);
40
+ $httpRequest->setExpectedClass($req->getExpectedClass());
41
+ return self::decodeHttpResponse($httpRequest, $client);
42
+ }
43
+
44
+ /**
45
+ * Decode an HTTP Response.
46
+ *
47
+ * @static
48
+ *
49
+ * @throws Google_Service_Exception
50
+ * @param Google_Http_Request $response
51
+ * The http response to be decoded.
52
+ * @param Google_Client $client
53
+ * @return mixed|null
54
+ */
55
+ public static function decodeHttpResponse($response, Google_Client $client = null)
56
+ {
57
+ $code = $response->getResponseHttpCode();
58
+ $body = $response->getResponseBody();
59
+ $decoded = null;
60
+ if ((intVal($code)) >= 300) {
61
+ $decoded = json_decode($body, true);
62
+ $err = 'Error calling ' . $response->getRequestMethod() . ' ' . $response->getUrl();
63
+ if (isset($decoded['error']) && isset($decoded['error']['message']) && isset($decoded['error']['code'])) {
64
+ // if we're getting a json encoded error definition, use that instead of the raw response
65
+ // body for improved readability
66
+ $err .= ": ({$decoded['error']['code']}) {$decoded['error']['message']}";
67
+ } else {
68
+ $err .= ": ($code) $body";
69
+ }
70
+ $errors = null;
71
+ // Specific check for APIs which don't return error details, such as Blogger.
72
+ if (isset($decoded['error']) && isset($decoded['error']['errors'])) {
73
+ $errors = $decoded['error']['errors'];
74
+ }
75
+ if ($client) {
76
+ $client->getLogger()->error($err, array(
77
+ 'code' => $code,
78
+ 'errors' => $errors
79
+ ));
80
+ }
81
+ throw new Google_Service_Exception($err, $code, null, $errors);
82
+ }
83
+ // Only attempt to decode the response, if the response code wasn't (204) 'no content'
84
+ if ($code != '204') {
85
+ $decoded = json_decode($body, true);
86
+ if ($decoded === null || $decoded === "") {
87
+ $error = "Invalid json in service response: $body";
88
+ if ($client) {
89
+ $client->getLogger()->error($error);
90
+ }
91
+ throw new Google_Service_Exception($error);
92
+ }
93
+ if ($response->getExpectedClass()) {
94
+ $class = $response->getExpectedClass();
95
+ $decoded = new $class($decoded);
96
+ }
97
+ }
98
+ return $decoded;
99
+ }
100
+
101
+ /**
102
+ * Parse/expand request parameters and create a fully qualified
103
+ * request uri.
104
+ *
105
+ * @static
106
+ *
107
+ * @param string $servicePath
108
+ * @param string $restPath
109
+ * @param array $params
110
+ * @return string $requestUrl
111
+ */
112
+ public static function createRequestUri($servicePath, $restPath, $params)
113
+ {
114
+ $requestUrl = $servicePath . $restPath;
115
+ $uriTemplateVars = array();
116
+ $queryVars = array();
117
+ foreach ($params as $paramName => $paramSpec) {
118
+ if ($paramSpec['type'] == 'boolean') {
119
+ $paramSpec['value'] = ($paramSpec['value']) ? 'true' : 'false';
120
+ }
121
+ if ($paramSpec['location'] == 'path') {
122
+ $uriTemplateVars[$paramName] = $paramSpec['value'];
123
+ } else
124
+ if ($paramSpec['location'] == 'query') {
125
+ if (isset($paramSpec['repeated']) && is_array($paramSpec['value'])) {
126
+ foreach ($paramSpec['value'] as $value) {
127
+ $queryVars[] = $paramName . '=' . rawurlencode($value);
128
+ }
129
+ } else {
130
+ $queryVars[] = $paramName . '=' . rawurlencode($paramSpec['value']);
131
+ }
132
+ }
133
+ }
134
+ if (count($uriTemplateVars)) {
135
+ $uriTemplateParser = new Google_Utils_URITemplate();
136
+ $requestUrl = $uriTemplateParser->parse($requestUrl, $uriTemplateVars);
137
+ }
138
+ if (count($queryVars)) {
139
+ $requestUrl .= '?' . implode($queryVars, '&');
140
+ }
141
+ return $requestUrl;
142
+ }
 
 
 
 
143
  }
tools/src/Google/Http/Request.php CHANGED
@@ -1,476 +1,483 @@
1
- <?php
2
- /*
3
- * Copyright 2010 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * HTTP Request to be executed by IO classes. Upon execution, the
22
- * responseHttpCode, responseHeaders and responseBody will be filled in.
23
- *
24
- * @author Chris Chabot <chabotc@google.com>
25
- * @author Chirag Shah <chirags@google.com>
26
- *
27
- */
28
- class Google_Http_Request
29
- {
30
- const GZIP_UA = " (gzip)";
31
-
32
- private $batchHeaders = array(
33
- 'Content-Type' => 'application/http',
34
- 'Content-Transfer-Encoding' => 'binary',
35
- 'MIME-Version' => '1.0',
36
- );
37
-
38
- protected $queryParams;
39
- protected $requestMethod;
40
- protected $requestHeaders;
41
- protected $baseComponent = null;
42
- protected $path;
43
- protected $postBody;
44
- protected $userAgent;
45
- protected $canGzip = null;
46
-
47
- protected $responseHttpCode;
48
- protected $responseHeaders;
49
- protected $responseBody;
50
-
51
- protected $expectedClass;
52
-
53
- public $accessKey;
54
-
55
- public function __construct(
56
- $url,
57
- $method = 'GET',
58
- $headers = array(),
59
- $postBody = null
60
- ) {
61
- $this->setUrl($url);
62
- $this->setRequestMethod($method);
63
- $this->setRequestHeaders($headers);
64
- $this->setPostBody($postBody);
65
- }
66
-
67
- /**
68
- * Misc function that returns the base url component of the $url
69
- * used by the OAuth signing class to calculate the base string
70
- * @return string The base url component of the $url.
71
- */
72
- public function getBaseComponent()
73
- {
74
- return $this->baseComponent;
75
- }
76
-
77
- /**
78
- * Set the base URL that path and query parameters will be added to.
79
- * @param $baseComponent string
80
- */
81
- public function setBaseComponent($baseComponent)
82
- {
83
- $this->baseComponent = $baseComponent;
84
- }
85
-
86
- /**
87
- * Enable support for gzipped responses with this request.
88
- */
89
- public function enableGzip()
90
- {
91
- $this->setRequestHeaders(array("Accept-Encoding" => "gzip"));
92
- $this->canGzip = true;
93
- $this->setUserAgent($this->userAgent);
94
- }
95
-
96
- /**
97
- * Disable support for gzip responses with this request.
98
- */
99
- public function disableGzip()
100
- {
101
- if (
102
- isset($this->requestHeaders['accept-encoding']) &&
103
- $this->requestHeaders['accept-encoding'] == "gzip"
104
- ) {
105
- unset($this->requestHeaders['accept-encoding']);
106
- }
107
- $this->canGzip = false;
108
- $this->userAgent = str_replace(self::GZIP_UA, "", $this->userAgent);
109
- }
110
-
111
- /**
112
- * Can this request accept a gzip response?
113
- * @return bool
114
- */
115
- public function canGzip()
116
- {
117
- return $this->canGzip;
118
- }
119
-
120
- /**
121
- * Misc function that returns an array of the query parameters of the current
122
- * url used by the OAuth signing class to calculate the signature
123
- * @return array Query parameters in the query string.
124
- */
125
- public function getQueryParams()
126
- {
127
- return $this->queryParams;
128
- }
129
-
130
- /**
131
- * Set a new query parameter.
132
- * @param $key - string to set, does not need to be URL encoded
133
- * @param $value - string to set, does not need to be URL encoded
134
- */
135
- public function setQueryParam($key, $value)
136
- {
137
- $this->queryParams[$key] = $value;
138
- }
139
-
140
- /**
141
- * @return string HTTP Response Code.
142
- */
143
- public function getResponseHttpCode()
144
- {
145
- return (int) $this->responseHttpCode;
146
- }
147
-
148
- /**
149
- * @param int $responseHttpCode HTTP Response Code.
150
- */
151
- public function setResponseHttpCode($responseHttpCode)
152
- {
153
- $this->responseHttpCode = $responseHttpCode;
154
- }
155
-
156
- /**
157
- * @return $responseHeaders (array) HTTP Response Headers.
158
- */
159
- public function getResponseHeaders()
160
- {
161
- return $this->responseHeaders;
162
- }
163
-
164
- /**
165
- * @return string HTTP Response Body
166
- */
167
- public function getResponseBody()
168
- {
169
- return $this->responseBody;
170
- }
171
-
172
- /**
173
- * Set the class the response to this request should expect.
174
- *
175
- * @param $class string the class name
176
- */
177
- public function setExpectedClass($class)
178
- {
179
- $this->expectedClass = $class;
180
- }
181
-
182
- /**
183
- * Retrieve the expected class the response should expect.
184
- * @return string class name
185
- */
186
- public function getExpectedClass()
187
- {
188
- return $this->expectedClass;
189
- }
190
-
191
- /**
192
- * @param array $headers The HTTP response headers
193
- * to be normalized.
194
- */
195
- public function setResponseHeaders($headers)
196
- {
197
- $headers = Google_Utils::normalize($headers);
198
- if ($this->responseHeaders) {
199
- $headers = array_merge($this->responseHeaders, $headers);
200
- }
201
-
202
- $this->responseHeaders = $headers;
203
- }
204
-
205
- /**
206
- * @param string $key
207
- * @return array|boolean Returns the requested HTTP header or
208
- * false if unavailable.
209
- */
210
- public function getResponseHeader($key)
211
- {
212
- return isset($this->responseHeaders[$key])
213
- ? $this->responseHeaders[$key]
214
- : false;
215
- }
216
-
217
- /**
218
- * @param string $responseBody The HTTP response body.
219
- */
220
- public function setResponseBody($responseBody)
221
- {
222
- $this->responseBody = $responseBody;
223
- }
224
-
225
- /**
226
- * @return string $url The request URL.
227
- */
228
- public function getUrl()
229
- {
230
- return $this->baseComponent . $this->path .
231
- (count($this->queryParams) ?
232
- "?" . $this->buildQuery($this->queryParams) :
233
- '');
234
- }
235
-
236
- /**
237
- * @return string $method HTTP Request Method.
238
- */
239
- public function getRequestMethod()
240
- {
241
- return $this->requestMethod;
242
- }
243
-
244
- /**
245
- * @return array $headers HTTP Request Headers.
246
- */
247
- public function getRequestHeaders()
248
- {
249
- return $this->requestHeaders;
250
- }
251
-
252
- /**
253
- * @param string $key
254
- * @return array|boolean Returns the requested HTTP header or
255
- * false if unavailable.
256
- */
257
- public function getRequestHeader($key)
258
- {
259
- return isset($this->requestHeaders[$key])
260
- ? $this->requestHeaders[$key]
261
- : false;
262
- }
263
-
264
- /**
265
- * @return string $postBody HTTP Request Body.
266
- */
267
- public function getPostBody()
268
- {
269
- return $this->postBody;
270
- }
271
-
272
- /**
273
- * @param string $url the url to set
274
- */
275
- public function setUrl($url)
276
- {
277
- if (substr($url, 0, 4) != 'http') {
278
- // Force the path become relative.
279
- if (substr($url, 0, 1) !== '/') {
280
- $url = '/' . $url;
281
- }
282
- }
283
- $parts = parse_url($url);
284
- if (isset($parts['host'])) {
285
- $this->baseComponent = sprintf(
286
- "%s%s%s",
287
- isset($parts['scheme']) ? $parts['scheme'] . "://" : '',
288
- isset($parts['host']) ? $parts['host'] : '',
289
- isset($parts['port']) ? ":" . $parts['port'] : ''
290
- );
291
- }
292
- $this->path = isset($parts['path']) ? $parts['path'] : '';
293
- $this->queryParams = array();
294
- if (isset($parts['query'])) {
295
- $this->queryParams = $this->parseQuery($parts['query']);
296
- }
297
- }
298
-
299
- /**
300
- * @param string $method Set he HTTP Method and normalize
301
- * it to upper-case, as required by HTTP.
302
- *
303
- */
304
- public function setRequestMethod($method)
305
- {
306
- $this->requestMethod = strtoupper($method);
307
- }
308
-
309
- /**
310
- * @param array $headers The HTTP request headers
311
- * to be set and normalized.
312
- */
313
- public function setRequestHeaders($headers)
314
- {
315
- $headers = Google_Utils::normalize($headers);
316
- if ($this->requestHeaders) {
317
- $headers = array_merge($this->requestHeaders, $headers);
318
- }
319
- $this->requestHeaders = $headers;
320
- }
321
-
322
- /**
323
- * @param string $postBody the postBody to set
324
- */
325
- public function setPostBody($postBody)
326
- {
327
- $this->postBody = $postBody;
328
- }
329
-
330
- /**
331
- * Set the User-Agent Header.
332
- * @param string $userAgent The User-Agent.
333
- */
334
- public function setUserAgent($userAgent)
335
- {
336
- $this->userAgent = $userAgent;
337
- if ($this->canGzip) {
338
- $this->userAgent = $userAgent . self::GZIP_UA;
339
- }
340
- }
341
-
342
- /**
343
- * @return string The User-Agent.
344
- */
345
- public function getUserAgent()
346
- {
347
- return $this->userAgent;
348
- }
349
-
350
- /**
351
- * Returns a cache key depending on if this was an OAuth signed request
352
- * in which case it will use the non-signed url and access key to make this
353
- * cache key unique per authenticated user, else use the plain request url
354
- * @return string The md5 hash of the request cache key.
355
- */
356
- public function getCacheKey()
357
- {
358
- $key = $this->getUrl();
359
-
360
- if (isset($this->accessKey)) {
361
- $key .= $this->accessKey;
362
- }
363
-
364
- if (isset($this->requestHeaders['authorization'])) {
365
- $key .= $this->requestHeaders['authorization'];
366
- }
367
-
368
- return md5($key);
369
- }
370
-
371
- public function getParsedCacheControl()
372
- {
373
- $parsed = array();
374
- $rawCacheControl = $this->getResponseHeader('cache-control');
375
- if ($rawCacheControl) {
376
- $rawCacheControl = str_replace(', ', '&', $rawCacheControl);
377
- parse_str($rawCacheControl, $parsed);
378
- }
379
-
380
- return $parsed;
381
- }
382
-
383
- /**
384
- * @param string $id
385
- * @return string A string representation of the HTTP Request.
386
- */
387
- public function toBatchString($id)
388
- {
389
- $str = '';
390
- $path = parse_url($this->getUrl(), PHP_URL_PATH) . "?" .
391
- http_build_query($this->queryParams);
392
- $str .= $this->getRequestMethod() . ' ' . $path . " HTTP/1.1\n";
393
-
394
- foreach ($this->getRequestHeaders() as $key => $val) {
395
- $str .= $key . ': ' . $val . "\n";
396
- }
397
-
398
- if ($this->getPostBody()) {
399
- $str .= "\n";
400
- $str .= $this->getPostBody();
401
- }
402
-
403
- $headers = '';
404
- foreach ($this->batchHeaders as $key => $val) {
405
- $headers .= $key . ': ' . $val . "\n";
406
- }
407
-
408
- $headers .= "Content-ID: $id\n";
409
- $str = $headers . "\n" . $str;
410
-
411
- return $str;
412
- }
413
-
414
- /**
415
- * Our own version of parse_str that allows for multiple variables
416
- * with the same name.
417
- * @param $string - the query string to parse
418
- */
419
- private function parseQuery($string)
420
- {
421
- $return = array();
422
- $parts = explode("&", $string);
423
- foreach ($parts as $part) {
424
- list($key, $value) = explode('=', $part, 2);
425
- $value = urldecode($value);
426
- if (isset($return[$key])) {
427
- if (!is_array($return[$key])) {
428
- $return[$key] = array($return[$key]);
429
- }
430
- $return[$key][] = $value;
431
- } else {
432
- $return[$key] = $value;
433
- }
434
- }
435
- return $return;
436
- }
437
-
438
- /**
439
- * A version of build query that allows for multiple
440
- * duplicate keys.
441
- * @param $parts array of key value pairs
442
- */
443
- private function buildQuery($parts)
444
- {
445
- $return = array();
446
- foreach ($parts as $key => $value) {
447
- if (is_array($value)) {
448
- foreach ($value as $v) {
449
- $return[] = urlencode($key) . "=" . urlencode($v);
450
- }
451
- } else {
452
- $return[] = urlencode($key) . "=" . urlencode($value);
453
- }
454
- }
455
- return implode('&', $return);
456
- }
457
-
458
- /**
459
- * If we're POSTing and have no body to send, we can send the query
460
- * parameters in there, which avoids length issues with longer query
461
- * params.
462
- */
463
- public function maybeMoveParametersToBody()
464
- {
465
- if ($this->getRequestMethod() == "POST" && empty($this->postBody)) {
466
- $this->setRequestHeaders(
467
- array(
468
- "content-type" =>
469
- "application/x-www-form-urlencoded; charset=UTF-8"
470
- )
471
- );
472
- $this->setPostBody($this->buildQuery($this->queryParams));
473
- $this->queryParams = array();
474
- }
475
- }
 
 
 
 
 
 
 
476
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * HTTP Request to be executed by IO classes.
21
+ * Upon execution, the
22
+ * responseHttpCode, responseHeaders and responseBody will be filled in.
23
+ *
24
+ * @author Chris Chabot <chabotc@google.com>
25
+ * @author Chirag Shah <chirags@google.com>
26
+ *
27
+ */
28
+ class Google_Http_Request
29
+ {
30
+ const GZIP_UA = " (gzip)";
31
+ private $batchHeaders = array(
32
+ 'Content-Type' => 'application/http',
33
+ 'Content-Transfer-Encoding' => 'binary',
34
+ 'MIME-Version' => '1.0'
35
+ );
36
+ protected $queryParams;
37
+ protected $requestMethod;
38
+ protected $requestHeaders;
39
+ protected $baseComponent = null;
40
+ protected $path;
41
+ protected $postBody;
42
+ protected $userAgent;
43
+ protected $canGzip = null;
44
+ protected $responseHttpCode;
45
+ protected $responseHeaders;
46
+ protected $responseBody;
47
+ protected $expectedClass;
48
+ public $accessKey;
49
+
50
+ public function __construct($url, $method = 'GET', $headers = array(), $postBody = null)
51
+ {
52
+ $this->setUrl($url);
53
+ $this->setRequestMethod($method);
54
+ $this->setRequestHeaders($headers);
55
+ $this->setPostBody($postBody);
56
+ }
57
+
58
+ /**
59
+ * Misc function that returns the base url component of the $url
60
+ * used by the OAuth signing class to calculate the base string
61
+ *
62
+ * @return string The base url component of the $url.
63
+ */
64
+ public function getBaseComponent()
65
+ {
66
+ return $this->baseComponent;
67
+ }
68
+
69
+ /**
70
+ * Set the base URL that path and query parameters will be added to.
71
+ *
72
+ * @param $baseComponent string
73
+ */
74
+ public function setBaseComponent($baseComponent)
75
+ {
76
+ $this->baseComponent = $baseComponent;
77
+ }
78
+
79
+ /**
80
+ * Enable support for gzipped responses with this request.
81
+ */
82
+ public function enableGzip()
83
+ {
84
+ $this->setRequestHeaders(array(
85
+ "Accept-Encoding" => "gzip"
86
+ ));
87
+ $this->canGzip = true;
88
+ $this->setUserAgent($this->userAgent);
89
+ }
90
+
91
+ /**
92
+ * Disable support for gzip responses with this request.
93
+ */
94
+ public function disableGzip()
95
+ {
96
+ if (isset($this->requestHeaders['accept-encoding']) && $this->requestHeaders['accept-encoding'] == "gzip") {
97
+ unset($this->requestHeaders['accept-encoding']);
98
+ }
99
+ $this->canGzip = false;
100
+ $this->userAgent = str_replace(self::GZIP_UA, "", $this->userAgent);
101
+ }
102
+
103
+ /**
104
+ * Can this request accept a gzip response?
105
+ *
106
+ * @return bool
107
+ */
108
+ public function canGzip()
109
+ {
110
+ return $this->canGzip;
111
+ }
112
+
113
+ /**
114
+ * Misc function that returns an array of the query parameters of the current
115
+ * url used by the OAuth signing class to calculate the signature
116
+ *
117
+ * @return array Query parameters in the query string.
118
+ */
119
+ public function getQueryParams()
120
+ {
121
+ return $this->queryParams;
122
+ }
123
+
124
+ /**
125
+ * Set a new query parameter.
126
+ *
127
+ * @param $key -
128
+ * string to set, does not need to be URL encoded
129
+ * @param $value -
130
+ * string to set, does not need to be URL encoded
131
+ */
132
+ public function setQueryParam($key, $value)
133
+ {
134
+ $this->queryParams[$key] = $value;
135
+ }
136
+
137
+ /**
138
+ *
139
+ * @return string HTTP Response Code.
140
+ */
141
+ public function getResponseHttpCode()
142
+ {
143
+ return (int) $this->responseHttpCode;
144
+ }
145
+
146
+ /**
147
+ *
148
+ * @param int $responseHttpCode
149
+ * HTTP Response Code.
150
+ */
151
+ public function setResponseHttpCode($responseHttpCode)
152
+ {
153
+ $this->responseHttpCode = $responseHttpCode;
154
+ }
155
+
156
+ /**
157
+ *
158
+ * @return $responseHeaders (array) HTTP Response Headers.
159
+ */
160
+ public function getResponseHeaders()
161
+ {
162
+ return $this->responseHeaders;
163
+ }
164
+
165
+ /**
166
+ *
167
+ * @return string HTTP Response Body
168
+ */
169
+ public function getResponseBody()
170
+ {
171
+ return $this->responseBody;
172
+ }
173
+
174
+ /**
175
+ * Set the class the response to this request should expect.
176
+ *
177
+ * @param $class string
178
+ * the class name
179
+ */
180
+ public function setExpectedClass($class)
181
+ {
182
+ $this->expectedClass = $class;
183
+ }
184
+
185
+ /**
186
+ * Retrieve the expected class the response should expect.
187
+ *
188
+ * @return string class name
189
+ */
190
+ public function getExpectedClass()
191
+ {
192
+ return $this->expectedClass;
193
+ }
194
+
195
+ /**
196
+ *
197
+ * @param array $headers
198
+ * The HTTP response headers
199
+ * to be normalized.
200
+ */
201
+ public function setResponseHeaders($headers)
202
+ {
203
+ $headers = Google_Utils::normalize($headers);
204
+ if ($this->responseHeaders) {
205
+ $headers = array_merge($this->responseHeaders, $headers);
206
+ }
207
+ $this->responseHeaders = $headers;
208
+ }
209
+
210
+ /**
211
+ *
212
+ * @param string $key
213
+ * @return array|boolean Returns the requested HTTP header or
214
+ * false if unavailable.
215
+ */
216
+ public function getResponseHeader($key)
217
+ {
218
+ return isset($this->responseHeaders[$key]) ? $this->responseHeaders[$key] : false;
219
+ }
220
+
221
+ /**
222
+ *
223
+ * @param string $responseBody
224
+ * The HTTP response body.
225
+ */
226
+ public function setResponseBody($responseBody)
227
+ {
228
+ $this->responseBody = $responseBody;
229
+ }
230
+
231
+ /**
232
+ *
233
+ * @return string $url The request URL.
234
+ */
235
+ public function getUrl()
236
+ {
237
+ return $this->baseComponent . $this->path . (count($this->queryParams) ? "?" . $this->buildQuery($this->queryParams) : '');
238
+ }
239
+
240
+ /**
241
+ *
242
+ * @return string $method HTTP Request Method.
243
+ */
244
+ public function getRequestMethod()
245
+ {
246
+ return $this->requestMethod;
247
+ }
248
+
249
+ /**
250
+ *
251
+ * @return array $headers HTTP Request Headers.
252
+ */
253
+ public function getRequestHeaders()
254
+ {
255
+ return $this->requestHeaders;
256
+ }
257
+
258
+ /**
259
+ *
260
+ * @param string $key
261
+ * @return array|boolean Returns the requested HTTP header or
262
+ * false if unavailable.
263
+ */
264
+ public function getRequestHeader($key)
265
+ {
266
+ return isset($this->requestHeaders[$key]) ? $this->requestHeaders[$key] : false;
267
+ }
268
+
269
+ /**
270
+ *
271
+ * @return string $postBody HTTP Request Body.
272
+ */
273
+ public function getPostBody()
274
+ {
275
+ return $this->postBody;
276
+ }
277
+
278
+ /**
279
+ *
280
+ * @param string $url
281
+ * the url to set
282
+ */
283
+ public function setUrl($url)
284
+ {
285
+ if (substr($url, 0, 4) != 'http') {
286
+ // Force the path become relative.
287
+ if (substr($url, 0, 1) !== '/') {
288
+ $url = '/' . $url;
289
+ }
290
+ }
291
+ $parts = parse_url($url);
292
+ if (isset($parts['host'])) {
293
+ $this->baseComponent = sprintf("%s%s%s", isset($parts['scheme']) ? $parts['scheme'] . "://" : '', isset($parts['host']) ? $parts['host'] : '', isset($parts['port']) ? ":" . $parts['port'] : '');
294
+ }
295
+ $this->path = isset($parts['path']) ? $parts['path'] : '';
296
+ $this->queryParams = array();
297
+ if (isset($parts['query'])) {
298
+ $this->queryParams = $this->parseQuery($parts['query']);
299
+ }
300
+ }
301
+
302
+ /**
303
+ *
304
+ * @param string $method
305
+ * Set he HTTP Method and normalize
306
+ * it to upper-case, as required by HTTP.
307
+ *
308
+ */
309
+ public function setRequestMethod($method)
310
+ {
311
+ $this->requestMethod = strtoupper($method);
312
+ }
313
+
314
+ /**
315
+ *
316
+ * @param array $headers
317
+ * The HTTP request headers
318
+ * to be set and normalized.
319
+ */
320
+ public function setRequestHeaders($headers)
321
+ {
322
+ $headers = Google_Utils::normalize($headers);
323
+ if ($this->requestHeaders) {
324
+ $headers = array_merge($this->requestHeaders, $headers);
325
+ }
326
+ $this->requestHeaders = $headers;
327
+ }
328
+
329
+ /**
330
+ *
331
+ * @param string $postBody
332
+ * the postBody to set
333
+ */
334
+ public function setPostBody($postBody)
335
+ {
336
+ $this->postBody = $postBody;
337
+ }
338
+
339
+ /**
340
+ * Set the User-Agent Header.
341
+ *
342
+ * @param string $userAgent
343
+ * The User-Agent.
344
+ */
345
+ public function setUserAgent($userAgent)
346
+ {
347
+ $this->userAgent = $userAgent;
348
+ if ($this->canGzip) {
349
+ $this->userAgent = $userAgent . self::GZIP_UA;
350
+ }
351
+ }
352
+
353
+ /**
354
+ *
355
+ * @return string The User-Agent.
356
+ */
357
+ public function getUserAgent()
358
+ {
359
+ return $this->userAgent;
360
+ }
361
+
362
+ /**
363
+ * Returns a cache key depending on if this was an OAuth signed request
364
+ * in which case it will use the non-signed url and access key to make this
365
+ * cache key unique per authenticated user, else use the plain request url
366
+ *
367
+ * @return string The md5 hash of the request cache key.
368
+ */
369
+ public function getCacheKey()
370
+ {
371
+ $key = $this->getUrl();
372
+ if (isset($this->accessKey)) {
373
+ $key .= $this->accessKey;
374
+ }
375
+ if (isset($this->requestHeaders['authorization'])) {
376
+ $key .= $this->requestHeaders['authorization'];
377
+ }
378
+ return md5($key);
379
+ }
380
+
381
+ public function getParsedCacheControl()
382
+ {
383
+ $parsed = array();
384
+ $rawCacheControl = $this->getResponseHeader('cache-control');
385
+ if ($rawCacheControl) {
386
+ $rawCacheControl = str_replace(', ', '&', $rawCacheControl);
387
+ parse_str($rawCacheControl, $parsed);
388
+ }
389
+ return $parsed;
390
+ }
391
+
392
+ /**
393
+ *
394
+ * @param string $id
395
+ * @return string A string representation of the HTTP Request.
396
+ */
397
+ public function toBatchString($id)
398
+ {
399
+ $str = '';
400
+ $path = parse_url($this->getUrl(), PHP_URL_PATH) . "?" . http_build_query($this->queryParams);
401
+ $str .= $this->getRequestMethod() . ' ' . $path . " HTTP/1.1\n";
402
+ foreach ($this->getRequestHeaders() as $key => $val) {
403
+ $str .= $key . ': ' . $val . "\n";
404
+ }
405
+ if ($this->getPostBody()) {
406
+ $str .= "\n";
407
+ $str .= $this->getPostBody();
408
+ }
409
+ $headers = '';
410
+ foreach ($this->batchHeaders as $key => $val) {
411
+ $headers .= $key . ': ' . $val . "\n";
412
+ }
413
+ $headers .= "Content-ID: $id\n";
414
+ $str = $headers . "\n" . $str;
415
+ return $str;
416
+ }
417
+
418
+ /**
419
+ * Our own version of parse_str that allows for multiple variables
420
+ * with the same name.
421
+ *
422
+ * @param $string -
423
+ * the query string to parse
424
+ */
425
+ private function parseQuery($string)
426
+ {
427
+ $return = array();
428
+ $parts = explode("&", $string);
429
+ foreach ($parts as $part) {
430
+ list ($key, $value) = explode('=', $part, 2);
431
+ $value = urldecode($value);
432
+ if (isset($return[$key])) {
433
+ if (! is_array($return[$key])) {
434
+ $return[$key] = array(
435
+ $return[$key]
436
+ );
437
+ }
438
+ $return[$key][] = $value;
439
+ } else {
440
+ $return[$key] = $value;
441
+ }
442
+ }
443
+ return $return;
444
+ }
445
+
446
+ /**
447
+ * A version of build query that allows for multiple
448
+ * duplicate keys.
449
+ *
450
+ * @param $parts array
451
+ * of key value pairs
452
+ */
453
+ private function buildQuery($parts)
454
+ {
455
+ $return = array();
456
+ foreach ($parts as $key => $value) {
457
+ if (is_array($value)) {
458
+ foreach ($value as $v) {
459
+ $return[] = urlencode($key) . "=" . urlencode($v);
460
+ }
461
+ } else {
462
+ $return[] = urlencode($key) . "=" . urlencode($value);
463
+ }
464
+ }
465
+ return implode('&', $return);
466
+ }
467
+
468
+ /**
469
+ * If we're POSTing and have no body to send, we can send the query
470
+ * parameters in there, which avoids length issues with longer query
471
+ * params.
472
+ */
473
+ public function maybeMoveParametersToBody()
474
+ {
475
+ if ($this->getRequestMethod() == "POST" && empty($this->postBody)) {
476
+ $this->setRequestHeaders(array(
477
+ "content-type" => "application/x-www-form-urlencoded; charset=UTF-8"
478
+ ));
479
+ $this->setPostBody($this->buildQuery($this->queryParams));
480
+ $this->queryParams = array();
481
+ }
482
+ }
483
  }
tools/src/Google/IO/Abstract.php CHANGED
@@ -1,329 +1,335 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * Abstract IO base class
20
- */
21
-
22
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
23
-
24
- abstract class Google_IO_Abstract
25
- {
26
- const UNKNOWN_CODE = 0;
27
- const FORM_URLENCODED = 'application/x-www-form-urlencoded';
28
- private static $CONNECTION_ESTABLISHED_HEADERS = array(
29
- "HTTP/1.0 200 Connection established\r\n\r\n",
30
- "HTTP/1.1 200 Connection established\r\n\r\n",
31
- );
32
- private static $ENTITY_HTTP_METHODS = array("POST" => null, "PUT" => null);
33
-
34
- /** @var Google_Client */
35
- protected $client;
36
-
37
- public function __construct(Google_Client $client)
38
- {
39
- $this->client = $client;
40
- $timeout = $client->getClassConfig('Google_IO_Abstract', 'request_timeout_seconds');
41
- if ($timeout > 0) {
42
- $this->setTimeout($timeout);
43
- }
44
- }
45
-
46
- /**
47
- * Executes a Google_Http_Request and returns the resulting populated Google_Http_Request
48
- * @param Google_Http_Request $request
49
- * @return Google_Http_Request $request
50
- */
51
- abstract public function executeRequest(Google_Http_Request $request);
52
-
53
- /**
54
- * Set options that update the transport implementation's behavior.
55
- * @param $options
56
- */
57
- abstract public function setOptions($options);
58
-
59
- /**
60
- * Set the maximum request time in seconds.
61
- * @param $timeout in seconds
62
- */
63
- abstract public function setTimeout($timeout);
64
-
65
- /**
66
- * Get the maximum request time in seconds.
67
- * @return timeout in seconds
68
- */
69
- abstract public function getTimeout();
70
-
71
- /**
72
- * Test for the presence of a cURL header processing bug
73
- *
74
- * The cURL bug was present in versions prior to 7.30.0 and caused the header
75
- * length to be miscalculated when a "Connection established" header added by
76
- * some proxies was present.
77
- *
78
- * @return boolean
79
- */
80
- abstract protected function needsQuirk();
81
-
82
- /**
83
- * @visible for testing.
84
- * Cache the response to an HTTP request if it is cacheable.
85
- * @param Google_Http_Request $request
86
- * @return bool Returns true if the insertion was successful.
87
- * Otherwise, return false.
88
- */
89
- public function setCachedRequest(Google_Http_Request $request)
90
- {
91
- // Determine if the request is cacheable.
92
- if (Google_Http_CacheParser::isResponseCacheable($request)) {
93
- $this->client->getCache()->set($request->getCacheKey(), $request);
94
- return true;
95
- }
96
-
97
- return false;
98
- }
99
-
100
- /**
101
- * Execute an HTTP Request
102
- *
103
- * @param Google_HttpRequest $request the http request to be executed
104
- * @return Google_HttpRequest http request with the response http code,
105
- * response headers and response body filled in
106
- * @throws Google_IO_Exception on curl or IO error
107
- */
108
- public function makeRequest(Google_Http_Request $request)
109
- {
110
- // First, check to see if we have a valid cached version.
111
- $cached = $this->getCachedRequest($request);
112
- if ($cached !== false && $cached instanceof Google_Http_Request) {
113
- if (!$this->checkMustRevalidateCachedRequest($cached, $request)) {
114
- return $cached;
115
- }
116
- }
117
-
118
- if (array_key_exists($request->getRequestMethod(), self::$ENTITY_HTTP_METHODS)) {
119
- $request = $this->processEntityRequest($request);
120
- }
121
-
122
- list($responseData, $responseHeaders, $respHttpCode) = $this->executeRequest($request);
123
-
124
- if ($respHttpCode == 304 && $cached) {
125
- // If the server responded NOT_MODIFIED, return the cached request.
126
- $this->updateCachedRequest($cached, $responseHeaders);
127
- return $cached;
128
- }
129
-
130
- if (!isset($responseHeaders['Date']) && !isset($responseHeaders['date'])) {
131
- $responseHeaders['Date'] = date("r");
132
- }
133
-
134
- $request->setResponseHttpCode($respHttpCode);
135
- $request->setResponseHeaders($responseHeaders);
136
- $request->setResponseBody($responseData);
137
- // Store the request in cache (the function checks to see if the request
138
- // can actually be cached)
139
- $this->setCachedRequest($request);
140
- return $request;
141
- }
142
-
143
- /**
144
- * @visible for testing.
145
- * @param Google_Http_Request $request
146
- * @return Google_Http_Request|bool Returns the cached object or
147
- * false if the operation was unsuccessful.
148
- */
149
- public function getCachedRequest(Google_Http_Request $request)
150
- {
151
- if (false === Google_Http_CacheParser::isRequestCacheable($request)) {
152
- return false;
153
- }
154
-
155
- return $this->client->getCache()->get($request->getCacheKey());
156
- }
157
-
158
- /**
159
- * @visible for testing
160
- * Process an http request that contains an enclosed entity.
161
- * @param Google_Http_Request $request
162
- * @return Google_Http_Request Processed request with the enclosed entity.
163
- */
164
- public function processEntityRequest(Google_Http_Request $request)
165
- {
166
- $postBody = $request->getPostBody();
167
- $contentType = $request->getRequestHeader("content-type");
168
-
169
- // Set the default content-type as application/x-www-form-urlencoded.
170
- if (false == $contentType) {
171
- $contentType = self::FORM_URLENCODED;
172
- $request->setRequestHeaders(array('content-type' => $contentType));
173
- }
174
-
175
- // Force the payload to match the content-type asserted in the header.
176
- if ($contentType == self::FORM_URLENCODED && is_array($postBody)) {
177
- $postBody = http_build_query($postBody, '', '&');
178
- $request->setPostBody($postBody);
179
- }
180
-
181
- // Make sure the content-length header is set.
182
- if (!$postBody || is_string($postBody)) {
183
- $postsLength = strlen($postBody);
184
- $request->setRequestHeaders(array('content-length' => $postsLength));
185
- }
186
-
187
- return $request;
188
- }
189
-
190
- /**
191
- * Check if an already cached request must be revalidated, and if so update
192
- * the request with the correct ETag headers.
193
- * @param Google_Http_Request $cached A previously cached response.
194
- * @param Google_Http_Request $request The outbound request.
195
- * return bool If the cached object needs to be revalidated, false if it is
196
- * still current and can be re-used.
197
- */
198
- protected function checkMustRevalidateCachedRequest($cached, $request)
199
- {
200
- if (Google_Http_CacheParser::mustRevalidate($cached)) {
201
- $addHeaders = array();
202
- if ($cached->getResponseHeader('etag')) {
203
- // [13.3.4] If an entity tag has been provided by the origin server,
204
- // we must use that entity tag in any cache-conditional request.
205
- $addHeaders['If-None-Match'] = $cached->getResponseHeader('etag');
206
- } elseif ($cached->getResponseHeader('date')) {
207
- $addHeaders['If-Modified-Since'] = $cached->getResponseHeader('date');
208
- }
209
-
210
- $request->setRequestHeaders($addHeaders);
211
- return true;
212
- } else {
213
- return false;
214
- }
215
- }
216
-
217
- /**
218
- * Update a cached request, using the headers from the last response.
219
- * @param Google_HttpRequest $cached A previously cached response.
220
- * @param mixed Associative array of response headers from the last request.
221
- */
222
- protected function updateCachedRequest($cached, $responseHeaders)
223
- {
224
- if (isset($responseHeaders['connection'])) {
225
- $hopByHop = array_merge(
226
- self::$HOP_BY_HOP,
227
- explode(
228
- ',',
229
- $responseHeaders['connection']
230
- )
231
- );
232
-
233
- $endToEnd = array();
234
- foreach ($hopByHop as $key) {
235
- if (isset($responseHeaders[$key])) {
236
- $endToEnd[$key] = $responseHeaders[$key];
237
- }
238
- }
239
- $cached->setResponseHeaders($endToEnd);
240
- }
241
- }
242
-
243
- /**
244
- * Used by the IO lib and also the batch processing.
245
- *
246
- * @param $respData
247
- * @param $headerSize
248
- * @return array
249
- */
250
- public function parseHttpResponse($respData, $headerSize)
251
- {
252
- // check proxy header
253
- foreach (self::$CONNECTION_ESTABLISHED_HEADERS as $established_header) {
254
- if (stripos($respData, $established_header) !== false) {
255
- // existed, remove it
256
- $respData = str_ireplace($established_header, '', $respData);
257
- // Subtract the proxy header size unless the cURL bug prior to 7.30.0
258
- // is present which prevented the proxy header size from being taken into
259
- // account.
260
- if (!$this->needsQuirk()) {
261
- $headerSize -= strlen($established_header);
262
- }
263
- break;
264
- }
265
- }
266
-
267
- if ($headerSize) {
268
- $responseBody = substr($respData, $headerSize);
269
- $responseHeaders = substr($respData, 0, $headerSize);
270
- } else {
271
- $responseSegments = explode("\r\n\r\n", $respData, 2);
272
- $responseHeaders = $responseSegments[0];
273
- $responseBody = isset($responseSegments[1]) ? $responseSegments[1] :
274
- null;
275
- }
276
-
277
- $responseHeaders = $this->getHttpResponseHeaders($responseHeaders);
278
- return array($responseHeaders, $responseBody);
279
- }
280
-
281
- /**
282
- * Parse out headers from raw headers
283
- * @param rawHeaders array or string
284
- * @return array
285
- */
286
- public function getHttpResponseHeaders($rawHeaders)
287
- {
288
- if (is_array($rawHeaders)) {
289
- return $this->parseArrayHeaders($rawHeaders);
290
- } else {
291
- return $this->parseStringHeaders($rawHeaders);
292
- }
293
- }
294
-
295
- private function parseStringHeaders($rawHeaders)
296
- {
297
- $headers = array();
298
- $responseHeaderLines = explode("\r\n", $rawHeaders);
299
- foreach ($responseHeaderLines as $headerLine) {
300
- if ($headerLine && strpos($headerLine, ':') !== false) {
301
- list($header, $value) = explode(': ', $headerLine, 2);
302
- $header = strtolower($header);
303
- if (isset($headers[$header])) {
304
- $headers[$header] .= "\n" . $value;
305
- } else {
306
- $headers[$header] = $value;
307
- }
308
- }
309
- }
310
- return $headers;
311
- }
312
-
313
- private function parseArrayHeaders($rawHeaders)
314
- {
315
- $header_count = count($rawHeaders);
316
- $headers = array();
317
-
318
- for ($i = 0; $i < $header_count; $i++) {
319
- $header = $rawHeaders[$i];
320
- // Times will have colons in - so we just want the first match.
321
- $header_parts = explode(': ', $header, 2);
322
- if (count($header_parts) == 2) {
323
- $headers[$header_parts[0]] = $header_parts[1];
324
- }
325
- }
326
-
327
- return $headers;
328
- }
 
 
 
 
 
 
329
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2013 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Abstract IO base class
19
+ */
20
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
21
+
22
+ abstract class Google_IO_Abstract
23
+ {
24
+ const UNKNOWN_CODE = 0;
25
+ const FORM_URLENCODED = 'application/x-www-form-urlencoded';
26
+ private static $CONNECTION_ESTABLISHED_HEADERS = array(
27
+ "HTTP/1.0 200 Connection established\r\n\r\n",
28
+ "HTTP/1.1 200 Connection established\r\n\r\n"
29
+ );
30
+ private static $ENTITY_HTTP_METHODS = array(
31
+ "POST" => null,
32
+ "PUT" => null
33
+ );
34
+ /**
35
+ *
36
+ * @var Google_Client
37
+ */
38
+ protected $client;
39
+
40
+ public function __construct(Google_Client $client)
41
+ {
42
+ $this->client = $client;
43
+ $timeout = $client->getClassConfig('Google_IO_Abstract', 'request_timeout_seconds');
44
+ if ($timeout > 0) {
45
+ $this->setTimeout($timeout);
46
+ }
47
+ }
48
+
49
+ /**
50
+ * Executes a Google_Http_Request and returns the resulting populated Google_Http_Request
51
+ *
52
+ * @param Google_Http_Request $request
53
+ * @return Google_Http_Request $request
54
+ */
55
+ abstract public function executeRequest(Google_Http_Request $request);
56
+
57
+ /**
58
+ * Set options that update the transport implementation's behavior.
59
+ *
60
+ * @param
61
+ * $options
62
+ */
63
+ abstract public function setOptions($options);
64
+
65
+ /**
66
+ * Set the maximum request time in seconds.
67
+ *
68
+ * @param $timeout in
69
+ * seconds
70
+ */
71
+ abstract public function setTimeout($timeout);
72
+
73
+ /**
74
+ * Get the maximum request time in seconds.
75
+ *
76
+ * @return timeout in seconds
77
+ */
78
+ abstract public function getTimeout();
79
+
80
+ /**
81
+ * Test for the presence of a cURL header processing bug
82
+ *
83
+ * The cURL bug was present in versions prior to 7.30.0 and caused the header
84
+ * length to be miscalculated when a "Connection established" header added by
85
+ * some proxies was present.
86
+ *
87
+ * @return boolean
88
+ */
89
+ abstract protected function needsQuirk();
90
+
91
+ /**
92
+ * @visible for testing.
93
+ * Cache the response to an HTTP request if it is cacheable.
94
+ *
95
+ * @param Google_Http_Request $request
96
+ * @return bool Returns true if the insertion was successful.
97
+ * Otherwise, return false.
98
+ */
99
+ public function setCachedRequest(Google_Http_Request $request)
100
+ {
101
+ // Determine if the request is cacheable.
102
+ if (Google_Http_CacheParser::isResponseCacheable($request)) {
103
+ $this->client->getCache()->set($request->getCacheKey(), $request);
104
+ return true;
105
+ }
106
+ return false;
107
+ }
108
+
109
+ /**
110
+ * Execute an HTTP Request
111
+ *
112
+ * @param Google_HttpRequest $request
113
+ * the http request to be executed
114
+ * @return Google_HttpRequest http request with the response http code,
115
+ * response headers and response body filled in
116
+ * @throws Google_IO_Exception on curl or IO error
117
+ */
118
+ public function makeRequest(Google_Http_Request $request)
119
+ {
120
+ // First, check to see if we have a valid cached version.
121
+ $cached = $this->getCachedRequest($request);
122
+ if ($cached !== false && $cached instanceof Google_Http_Request) {
123
+ if (! $this->checkMustRevalidateCachedRequest($cached, $request)) {
124
+ return $cached;
125
+ }
126
+ }
127
+ if (array_key_exists($request->getRequestMethod(), self::$ENTITY_HTTP_METHODS)) {
128
+ $request = $this->processEntityRequest($request);
129
+ }
130
+ list ($responseData, $responseHeaders, $respHttpCode) = $this->executeRequest($request);
131
+ if ($respHttpCode == 304 && $cached) {
132
+ // If the server responded NOT_MODIFIED, return the cached request.
133
+ $this->updateCachedRequest($cached, $responseHeaders);
134
+ return $cached;
135
+ }
136
+ if (! isset($responseHeaders['Date']) && ! isset($responseHeaders['date'])) {
137
+ $responseHeaders['Date'] = date("r");
138
+ }
139
+ $request->setResponseHttpCode($respHttpCode);
140
+ $request->setResponseHeaders($responseHeaders);
141
+ $request->setResponseBody($responseData);
142
+ // Store the request in cache (the function checks to see if the request
143
+ // can actually be cached)
144
+ $this->setCachedRequest($request);
145
+ return $request;
146
+ }
147
+
148
+ /**
149
+ * @visible for testing.
150
+ *
151
+ * @param Google_Http_Request $request
152
+ * @return Google_Http_Request|bool Returns the cached object or
153
+ * false if the operation was unsuccessful.
154
+ */
155
+ public function getCachedRequest(Google_Http_Request $request)
156
+ {
157
+ if (false === Google_Http_CacheParser::isRequestCacheable($request)) {
158
+ return false;
159
+ }
160
+ return $this->client->getCache()->get($request->getCacheKey());
161
+ }
162
+
163
+ /**
164
+ * @visible for testing
165
+ * Process an http request that contains an enclosed entity.
166
+ *
167
+ * @param Google_Http_Request $request
168
+ * @return Google_Http_Request Processed request with the enclosed entity.
169
+ */
170
+ public function processEntityRequest(Google_Http_Request $request)
171
+ {
172
+ $postBody = $request->getPostBody();
173
+ $contentType = $request->getRequestHeader("content-type");
174
+ // Set the default content-type as application/x-www-form-urlencoded.
175
+ if (false == $contentType) {
176
+ $contentType = self::FORM_URLENCODED;
177
+ $request->setRequestHeaders(array(
178
+ 'content-type' => $contentType
179
+ ));
180
+ }
181
+ // Force the payload to match the content-type asserted in the header.
182
+ if ($contentType == self::FORM_URLENCODED && is_array($postBody)) {
183
+ $postBody = http_build_query($postBody, '', '&');
184
+ $request->setPostBody($postBody);
185
+ }
186
+ // Make sure the content-length header is set.
187
+ if (! $postBody || is_string($postBody)) {
188
+ $postsLength = strlen($postBody);
189
+ $request->setRequestHeaders(array(
190
+ 'content-length' => $postsLength
191
+ ));
192
+ }
193
+ return $request;
194
+ }
195
+
196
+ /**
197
+ * Check if an already cached request must be revalidated, and if so update
198
+ * the request with the correct ETag headers.
199
+ *
200
+ * @param Google_Http_Request $cached
201
+ * A previously cached response.
202
+ * @param Google_Http_Request $request
203
+ * The outbound request.
204
+ * return bool If the cached object needs to be revalidated, false if it is
205
+ * still current and can be re-used.
206
+ */
207
+ protected function checkMustRevalidateCachedRequest($cached, $request)
208
+ {
209
+ if (Google_Http_CacheParser::mustRevalidate($cached)) {
210
+ $addHeaders = array();
211
+ if ($cached->getResponseHeader('etag')) {
212
+ // [13.3.4] If an entity tag has been provided by the origin server,
213
+ // we must use that entity tag in any cache-conditional request.
214
+ $addHeaders['If-None-Match'] = $cached->getResponseHeader('etag');
215
+ } elseif ($cached->getResponseHeader('date')) {
216
+ $addHeaders['If-Modified-Since'] = $cached->getResponseHeader('date');
217
+ }
218
+ $request->setRequestHeaders($addHeaders);
219
+ return true;
220
+ } else {
221
+ return false;
222
+ }
223
+ }
224
+
225
+ /**
226
+ * Update a cached request, using the headers from the last response.
227
+ *
228
+ * @param Google_HttpRequest $cached
229
+ * A previously cached response.
230
+ * @param
231
+ * mixed Associative array of response headers from the last request.
232
+ */
233
+ protected function updateCachedRequest($cached, $responseHeaders)
234
+ {
235
+ if (isset($responseHeaders['connection'])) {
236
+ $hopByHop = array_merge(self::$HOP_BY_HOP, explode(',', $responseHeaders['connection']));
237
+ $endToEnd = array();
238
+ foreach ($hopByHop as $key) {
239
+ if (isset($responseHeaders[$key])) {
240
+ $endToEnd[$key] = $responseHeaders[$key];
241
+ }
242
+ }
243
+ $cached->setResponseHeaders($endToEnd);
244
+ }
245
+ }
246
+
247
+ /**
248
+ * Used by the IO lib and also the batch processing.
249
+ *
250
+ * @param
251
+ * $respData
252
+ * @param
253
+ * $headerSize
254
+ * @return array
255
+ */
256
+ public function parseHttpResponse($respData, $headerSize)
257
+ {
258
+ // check proxy header
259
+ foreach (self::$CONNECTION_ESTABLISHED_HEADERS as $established_header) {
260
+ if (stripos($respData, $established_header) !== false) {
261
+ // existed, remove it
262
+ $respData = str_ireplace($established_header, '', $respData);
263
+ // Subtract the proxy header size unless the cURL bug prior to 7.30.0
264
+ // is present which prevented the proxy header size from being taken into
265
+ // account.
266
+ if (! $this->needsQuirk()) {
267
+ $headerSize -= strlen($established_header);
268
+ }
269
+ break;
270
+ }
271
+ }
272
+ if ($headerSize) {
273
+ $responseBody = substr($respData, $headerSize);
274
+ $responseHeaders = substr($respData, 0, $headerSize);
275
+ } else {
276
+ $responseSegments = explode("\r\n\r\n", $respData, 2);
277
+ $responseHeaders = $responseSegments[0];
278
+ $responseBody = isset($responseSegments[1]) ? $responseSegments[1] : null;
279
+ }
280
+ $responseHeaders = $this->getHttpResponseHeaders($responseHeaders);
281
+ return array(
282
+ $responseHeaders,
283
+ $responseBody
284
+ );
285
+ }
286
+
287
+ /**
288
+ * Parse out headers from raw headers
289
+ *
290
+ * @param
291
+ * rawHeaders array or string
292
+ * @return array
293
+ */
294
+ public function getHttpResponseHeaders($rawHeaders)
295
+ {
296
+ if (is_array($rawHeaders)) {
297
+ return $this->parseArrayHeaders($rawHeaders);
298
+ } else {
299
+ return $this->parseStringHeaders($rawHeaders);
300
+ }
301
+ }
302
+
303
+ private function parseStringHeaders($rawHeaders)
304
+ {
305
+ $headers = array();
306
+ $responseHeaderLines = explode("\r\n", $rawHeaders);
307
+ foreach ($responseHeaderLines as $headerLine) {
308
+ if ($headerLine && strpos($headerLine, ':') !== false) {
309
+ list ($header, $value) = explode(': ', $headerLine, 2);
310
+ $header = strtolower($header);
311
+ if (isset($headers[$header])) {
312
+ $headers[$header] .= "\n" . $value;
313
+ } else {
314
+ $headers[$header] = $value;
315
+ }
316
+ }
317
+ }
318
+ return $headers;
319
+ }
320
+
321
+ private function parseArrayHeaders($rawHeaders)
322
+ {
323
+ $header_count = count($rawHeaders);
324
+ $headers = array();
325
+ for ($i = 0; $i < $header_count; $i ++) {
326
+ $header = $rawHeaders[$i];
327
+ // Times will have colons in - so we just want the first match.
328
+ $header_parts = explode(': ', $header, 2);
329
+ if (count($header_parts) == 2) {
330
+ $headers[$header_parts[0]] = $header_parts[1];
331
+ }
332
+ }
333
+ return $headers;
334
+ }
335
  }
tools/src/Google/IO/Curl.php CHANGED
@@ -1,167 +1,152 @@
1
- <?php
2
- /*
3
- * Copyright 2014 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * Curl based implementation of Google_IO.
20
- *
21
- * @author Stuart Langley <slangley@google.com>
22
- */
23
-
24
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
25
-
26
- class Google_IO_Curl extends Google_IO_Abstract
27
- {
28
- // cURL hex representation of version 7.30.0
29
- const NO_QUIRK_VERSION = 0x071E00;
30
-
31
- private $options = array();
32
- /**
33
- * Execute an HTTP Request
34
- *
35
- * @param Google_HttpRequest $request the http request to be executed
36
- * @return Google_HttpRequest http request with the response http code,
37
- * response headers and response body filled in
38
- * @throws Google_IO_Exception on curl or IO error
39
- */
40
- public function executeRequest(Google_Http_Request $request)
41
- {
42
-
43
- $curl = curl_init();
44
-
45
- if ($request->getPostBody()) {
46
- curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getPostBody());
47
- }
48
-
49
- $requestHeaders = $request->getRequestHeaders();
50
- if ($requestHeaders && is_array($requestHeaders)) {
51
- $curlHeaders = array();
52
- foreach ($requestHeaders as $k => $v) {
53
- $curlHeaders[] = "$k: $v";
54
- }
55
- curl_setopt($curl, CURLOPT_HTTPHEADER, $curlHeaders);
56
- }
57
-
58
- curl_setopt($curl, CURLOPT_URL, $request->getUrl());
59
-
60
- curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request->getRequestMethod());
61
- curl_setopt($curl, CURLOPT_USERAGENT, $request->getUserAgent());
62
-
63
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
64
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
65
- // 1 is CURL_SSLVERSION_TLSv1, which is not always defined in PHP.
66
- curl_setopt($curl, CURLOPT_SSLVERSION, 1);
67
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
68
- curl_setopt($curl, CURLOPT_HEADER, true);
69
-
70
- if ($request->canGzip()) {
71
- curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
72
- }
73
-
74
- $options = $this->client->getClassConfig('Google_IO_Curl', 'options');
75
-
76
- if (is_array($options)){
77
- $this->setOptions($options);
78
- }
79
-
80
- foreach ($this->options as $key => $var) {
81
- curl_setopt($curl, $key, $var);
82
- }
83
-
84
- if (!isset($this->options[CURLOPT_CAINFO])) {
85
- curl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__) . '/cacerts.pem');
86
- }
87
-
88
- $this->client->getLogger()->debug(
89
- 'cURL request',
90
- array(
91
- 'url' => $request->getUrl(),
92
- 'method' => $request->getRequestMethod(),
93
- 'headers' => $requestHeaders,
94
- 'body' => $request->getPostBody()
95
- )
96
- );
97
-
98
- $response = curl_exec($curl);
99
- if ($response === false) {
100
- $error = curl_error($curl);
101
-
102
- $this->client->getLogger()->error('cURL ' . $error);
103
- throw new Google_IO_Exception($error);
104
- }
105
- $headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
106
-
107
- list($responseHeaders, $responseBody) = $this->parseHttpResponse($response, $headerSize);
108
- $responseCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
109
-
110
- $this->client->getLogger()->debug(
111
- 'cURL response',
112
- array(
113
- 'code' => $responseCode,
114
- 'headers' => $responseHeaders,
115
- 'body' => $responseBody,
116
- )
117
- );
118
-
119
- return array($responseBody, $responseHeaders, $responseCode);
120
- }
121
-
122
- /**
123
- * Set options that update the transport implementation's behavior.
124
- * @param $options
125
- */
126
- public function setOptions($options)
127
- {
128
- $this->options = $options + $this->options;
129
- }
130
-
131
- /**
132
- * Set the maximum request time in seconds.
133
- * @param $timeout in seconds
134
- */
135
- public function setTimeout($timeout)
136
- {
137
- // Since this timeout is really for putting a bound on the time
138
- // we'll set them both to the same. If you need to specify a longer
139
- // CURLOPT_TIMEOUT, or a tigher CONNECTTIMEOUT, the best thing to
140
- // do is use the setOptions method for the values individually.
141
- $this->options[CURLOPT_CONNECTTIMEOUT] = $timeout;
142
- $this->options[CURLOPT_TIMEOUT] = $timeout;
143
- }
144
-
145
- /**
146
- * Get the maximum request time in seconds.
147
- * @return timeout in seconds
148
- */
149
- public function getTimeout()
150
- {
151
- return $this->options[CURLOPT_TIMEOUT];
152
- }
153
-
154
- /**
155
- * Test for the presence of a cURL header processing bug
156
- *
157
- * {@inheritDoc}
158
- *
159
- * @return boolean
160
- */
161
- protected function needsQuirk()
162
- {
163
- $ver = curl_version();
164
- $versionNum = $ver['version_number'];
165
- return $versionNum < Google_IO_Curl::NO_QUIRK_VERSION;
166
- }
167
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Curl based implementation of Google_IO.
19
+ *
20
+ * @author Stuart Langley <slangley@google.com>
21
+ */
22
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
23
+
24
+ class Google_IO_Curl extends Google_IO_Abstract
25
+ {
26
+ // cURL hex representation of version 7.30.0
27
+ const NO_QUIRK_VERSION = 0x071E00;
28
+ private $options = array();
29
+
30
+ /**
31
+ * Execute an HTTP Request
32
+ *
33
+ * @param Google_HttpRequest $request
34
+ * the http request to be executed
35
+ * @return Google_HttpRequest http request with the response http code,
36
+ * response headers and response body filled in
37
+ * @throws Google_IO_Exception on curl or IO error
38
+ */
39
+ public function executeRequest(Google_Http_Request $request)
40
+ {
41
+ $curl = curl_init();
42
+ if ($request->getPostBody()) {
43
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getPostBody());
44
+ }
45
+ $requestHeaders = $request->getRequestHeaders();
46
+ if ($requestHeaders && is_array($requestHeaders)) {
47
+ $curlHeaders = array();
48
+ foreach ($requestHeaders as $k => $v) {
49
+ $curlHeaders[] = "$k: $v";
50
+ }
51
+ curl_setopt($curl, CURLOPT_HTTPHEADER, $curlHeaders);
52
+ }
53
+ curl_setopt($curl, CURLOPT_URL, $request->getUrl());
54
+ curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request->getRequestMethod());
55
+ curl_setopt($curl, CURLOPT_USERAGENT, $request->getUserAgent());
56
+ curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
57
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
58
+ // 1 is CURL_SSLVERSION_TLSv1, which is not always defined in PHP.
59
+ curl_setopt($curl, CURLOPT_SSLVERSION, 1);
60
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
61
+ curl_setopt($curl, CURLOPT_HEADER, true);
62
+ if ($request->canGzip()) {
63
+ curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
64
+ }
65
+ $options = $this->client->getClassConfig('Google_IO_Curl', 'options');
66
+ if (is_array($options)) {
67
+ $this->setOptions($options);
68
+ }
69
+ foreach ($this->options as $key => $var) {
70
+ curl_setopt($curl, $key, $var);
71
+ }
72
+ if (! isset($this->options[CURLOPT_CAINFO])) {
73
+ curl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__) . '/cacerts.pem');
74
+ }
75
+ $this->client->getLogger()->debug('cURL request', array(
76
+ 'url' => $request->getUrl(),
77
+ 'method' => $request->getRequestMethod(),
78
+ 'headers' => $requestHeaders,
79
+ 'body' => $request->getPostBody()
80
+ ));
81
+ $response = curl_exec($curl);
82
+ if ($response === false) {
83
+ $error = curl_error($curl);
84
+ $this->client->getLogger()->error('cURL ' . $error);
85
+ throw new Google_IO_Exception($error);
86
+ }
87
+ $headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
88
+ list ($responseHeaders, $responseBody) = $this->parseHttpResponse($response, $headerSize);
89
+ $responseCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
90
+ $this->client->getLogger()->debug('cURL response', array(
91
+ 'code' => $responseCode,
92
+ 'headers' => $responseHeaders,
93
+ 'body' => $responseBody
94
+ ));
95
+ return array(
96
+ $responseBody,
97
+ $responseHeaders,
98
+ $responseCode
99
+ );
100
+ }
101
+
102
+ /**
103
+ * Set options that update the transport implementation's behavior.
104
+ *
105
+ * @param
106
+ * $options
107
+ */
108
+ public function setOptions($options)
109
+ {
110
+ $this->options = $options + $this->options;
111
+ }
112
+
113
+ /**
114
+ * Set the maximum request time in seconds.
115
+ *
116
+ * @param $timeout in
117
+ * seconds
118
+ */
119
+ public function setTimeout($timeout)
120
+ {
121
+ // Since this timeout is really for putting a bound on the time
122
+ // we'll set them both to the same. If you need to specify a longer
123
+ // CURLOPT_TIMEOUT, or a tigher CONNECTTIMEOUT, the best thing to
124
+ // do is use the setOptions method for the values individually.
125
+ $this->options[CURLOPT_CONNECTTIMEOUT] = $timeout;
126
+ $this->options[CURLOPT_TIMEOUT] = $timeout;
127
+ }
128
+
129
+ /**
130
+ * Get the maximum request time in seconds.
131
+ *
132
+ * @return timeout in seconds
133
+ */
134
+ public function getTimeout()
135
+ {
136
+ return $this->options[CURLOPT_TIMEOUT];
137
+ }
138
+
139
+ /**
140
+ * Test for the presence of a cURL header processing bug
141
+ *
142
+ * {@inheritDoc}
143
+ *
144
+ * @return boolean
145
+ */
146
+ protected function needsQuirk()
147
+ {
148
+ $ver = curl_version();
149
+ $versionNum = $ver['version_number'];
150
+ return $versionNum < Google_IO_Curl::NO_QUIRK_VERSION;
151
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  }
tools/src/Google/IO/Exception.php CHANGED
@@ -1,22 +1,21 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- class Google_IO_Exception extends Google_Exception
21
- {
22
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2013 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ class Google_IO_Exception extends Google_Exception
20
+ {
 
21
  }
tools/src/Google/IO/Stream.php CHANGED
@@ -1,230 +1,195 @@
1
- <?php
2
- /*
3
- * Copyright 2013 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * Http Streams based implementation of Google_IO.
20
- *
21
- * @author Stuart Langley <slangley@google.com>
22
- */
23
-
24
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
25
-
26
- class Google_IO_Stream extends Google_IO_Abstract
27
- {
28
- const TIMEOUT = "timeout";
29
- const ZLIB = "compress.zlib://";
30
- private $options = array();
31
- private $trappedErrorNumber;
32
- private $trappedErrorString;
33
-
34
- private static $DEFAULT_HTTP_CONTEXT = array(
35
- "follow_location" => 0,
36
- "ignore_errors" => 1,
37
- );
38
-
39
- private static $DEFAULT_SSL_CONTEXT = array(
40
- "verify_peer" => true,
41
- );
42
-
43
- /**
44
- * Execute an HTTP Request
45
- *
46
- * @param Google_HttpRequest $request the http request to be executed
47
- * @return Google_HttpRequest http request with the response http code,
48
- * response headers and response body filled in
49
- * @throws Google_IO_Exception on curl or IO error
50
- */
51
- public function executeRequest(Google_Http_Request $request)
52
- {
53
- $default_options = stream_context_get_options(stream_context_get_default());
54
-
55
- $requestHttpContext = array_key_exists('http', $default_options) ?
56
- $default_options['http'] : array();
57
-
58
- if ($request->getPostBody()) {
59
- $requestHttpContext["content"] = $request->getPostBody();
60
- }
61
-
62
- $requestHeaders = $request->getRequestHeaders();
63
- if ($requestHeaders && is_array($requestHeaders)) {
64
- $headers = "";
65
- foreach ($requestHeaders as $k => $v) {
66
- $headers .= "$k: $v\r\n";
67
- }
68
- $requestHttpContext["header"] = $headers;
69
- }
70
-
71
- $requestHttpContext["method"] = $request->getRequestMethod();
72
- $requestHttpContext["user_agent"] = $request->getUserAgent();
73
-
74
- $requestSslContext = array_key_exists('ssl', $default_options) ?
75
- $default_options['ssl'] : array();
76
-
77
- if (!array_key_exists("cafile", $requestSslContext)) {
78
- $requestSslContext["cafile"] = dirname(__FILE__) . '/cacerts.pem';
79
- }
80
-
81
- $options = array(
82
- "http" => array_merge(
83
- self::$DEFAULT_HTTP_CONTEXT,
84
- $requestHttpContext
85
- ),
86
- "ssl" => array_merge(
87
- self::$DEFAULT_SSL_CONTEXT,
88
- $requestSslContext
89
- )
90
- );
91
-
92
- $context = stream_context_create($options);
93
-
94
- $url = $request->getUrl();
95
-
96
- if ($request->canGzip()) {
97
- $url = self::ZLIB . $url;
98
- }
99
-
100
- $this->client->getLogger()->debug(
101
- 'Stream request',
102
- array(
103
- 'url' => $url,
104
- 'method' => $request->getRequestMethod(),
105
- 'headers' => $requestHeaders,
106
- 'body' => $request->getPostBody()
107
- )
108
- );
109
-
110
- // We are trapping any thrown errors in this method only and
111
- // throwing an exception.
112
- $this->trappedErrorNumber = null;
113
- $this->trappedErrorString = null;
114
-
115
- // START - error trap.
116
- set_error_handler(array($this, 'trapError'));
117
- $fh = fopen($url, 'r', false, $context);
118
- restore_error_handler();
119
- // END - error trap.
120
-
121
- if ($this->trappedErrorNumber) {
122
- $error = sprintf(
123
- "HTTP Error: Unable to connect: '%s'",
124
- $this->trappedErrorString
125
- );
126
-
127
- $this->client->getLogger()->error('Stream ' . $error);
128
- throw new Google_IO_Exception($error, $this->trappedErrorNumber);
129
- }
130
-
131
- $response_data = false;
132
- $respHttpCode = self::UNKNOWN_CODE;
133
- if ($fh) {
134
- if (isset($this->options[self::TIMEOUT])) {
135
- stream_set_timeout($fh, $this->options[self::TIMEOUT]);
136
- }
137
-
138
- $response_data = stream_get_contents($fh);
139
- fclose($fh);
140
-
141
- $respHttpCode = $this->getHttpResponseCode($http_response_header);
142
- }
143
-
144
- if (false === $response_data) {
145
- $error = sprintf(
146
- "HTTP Error: Unable to connect: '%s'",
147
- $respHttpCode
148
- );
149
-
150
- $this->client->getLogger()->error('Stream ' . $error);
151
- throw new Google_IO_Exception($error, $respHttpCode);
152
- }
153
-
154
- $responseHeaders = $this->getHttpResponseHeaders($http_response_header);
155
-
156
- $this->client->getLogger()->debug(
157
- 'Stream response',
158
- array(
159
- 'code' => $respHttpCode,
160
- 'headers' => $responseHeaders,
161
- 'body' => $response_data,
162
- )
163
- );
164
-
165
- return array($response_data, $responseHeaders, $respHttpCode);
166
- }
167
-
168
- /**
169
- * Set options that update the transport implementation's behavior.
170
- * @param $options
171
- */
172
- public function setOptions($options)
173
- {
174
- $this->options = $options + $this->options;
175
- }
176
-
177
- /**
178
- * Method to handle errors, used for error handling around
179
- * stream connection methods.
180
- */
181
- public function trapError($errno, $errstr)
182
- {
183
- $this->trappedErrorNumber = $errno;
184
- $this->trappedErrorString = $errstr;
185
- }
186
-
187
- /**
188
- * Set the maximum request time in seconds.
189
- * @param $timeout in seconds
190
- */
191
- public function setTimeout($timeout)
192
- {
193
- $this->options[self::TIMEOUT] = $timeout;
194
- }
195
-
196
- /**
197
- * Get the maximum request time in seconds.
198
- * @return timeout in seconds
199
- */
200
- public function getTimeout()
201
- {
202
- return $this->options[self::TIMEOUT];
203
- }
204
-
205
- /**
206
- * Test for the presence of a cURL header processing bug
207
- *
208
- * {@inheritDoc}
209
- *
210
- * @return boolean
211
- */
212
- protected function needsQuirk()
213
- {
214
- return false;
215
- }
216
-
217
- protected function getHttpResponseCode($response_headers)
218
- {
219
- $header_count = count($response_headers);
220
-
221
- for ($i = 0; $i < $header_count; $i++) {
222
- $header = $response_headers[$i];
223
- if (strncasecmp("HTTP", $header, strlen("HTTP")) == 0) {
224
- $response = explode(' ', $header);
225
- return $response[1];
226
- }
227
- }
228
- return self::UNKNOWN_CODE;
229
- }
230
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2013 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Http Streams based implementation of Google_IO.
19
+ *
20
+ * @author Stuart Langley <slangley@google.com>
21
+ */
22
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
23
+
24
+ class Google_IO_Stream extends Google_IO_Abstract
25
+ {
26
+ const TIMEOUT = "timeout";
27
+ const ZLIB = "compress.zlib://";
28
+ private $options = array();
29
+ private $trappedErrorNumber;
30
+ private $trappedErrorString;
31
+ private static $DEFAULT_HTTP_CONTEXT = array(
32
+ "follow_location" => 0,
33
+ "ignore_errors" => 1
34
+ );
35
+ private static $DEFAULT_SSL_CONTEXT = array(
36
+ "verify_peer" => true
37
+ );
38
+
39
+ /**
40
+ * Execute an HTTP Request
41
+ *
42
+ * @param Google_HttpRequest $request
43
+ * the http request to be executed
44
+ * @return Google_HttpRequest http request with the response http code,
45
+ * response headers and response body filled in
46
+ * @throws Google_IO_Exception on curl or IO error
47
+ */
48
+ public function executeRequest(Google_Http_Request $request)
49
+ {
50
+ $default_options = stream_context_get_options(stream_context_get_default());
51
+ $requestHttpContext = array_key_exists('http', $default_options) ? $default_options['http'] : array();
52
+ if ($request->getPostBody()) {
53
+ $requestHttpContext["content"] = $request->getPostBody();
54
+ }
55
+ $requestHeaders = $request->getRequestHeaders();
56
+ if ($requestHeaders && is_array($requestHeaders)) {
57
+ $headers = "";
58
+ foreach ($requestHeaders as $k => $v) {
59
+ $headers .= "$k: $v\r\n";
60
+ }
61
+ $requestHttpContext["header"] = $headers;
62
+ }
63
+ $requestHttpContext["method"] = $request->getRequestMethod();
64
+ $requestHttpContext["user_agent"] = $request->getUserAgent();
65
+ $requestSslContext = array_key_exists('ssl', $default_options) ? $default_options['ssl'] : array();
66
+ if (! array_key_exists("cafile", $requestSslContext)) {
67
+ $requestSslContext["cafile"] = dirname(__FILE__) . '/cacerts.pem';
68
+ }
69
+ $options = array(
70
+ "http" => array_merge(self::$DEFAULT_HTTP_CONTEXT, $requestHttpContext),
71
+ "ssl" => array_merge(self::$DEFAULT_SSL_CONTEXT, $requestSslContext)
72
+ );
73
+ $context = stream_context_create($options);
74
+ $url = $request->getUrl();
75
+ if ($request->canGzip()) {
76
+ $url = self::ZLIB . $url;
77
+ }
78
+ $this->client->getLogger()->debug('Stream request', array(
79
+ 'url' => $url,
80
+ 'method' => $request->getRequestMethod(),
81
+ 'headers' => $requestHeaders,
82
+ 'body' => $request->getPostBody()
83
+ ));
84
+ // We are trapping any thrown errors in this method only and
85
+ // throwing an exception.
86
+ $this->trappedErrorNumber = null;
87
+ $this->trappedErrorString = null;
88
+ // START - error trap.
89
+ set_error_handler(array(
90
+ $this,
91
+ 'trapError'
92
+ ));
93
+ $fh = fopen($url, 'r', false, $context);
94
+ restore_error_handler();
95
+ // END - error trap.
96
+ if ($this->trappedErrorNumber) {
97
+ $error = sprintf("HTTP Error: Unable to connect: '%s'", $this->trappedErrorString);
98
+ $this->client->getLogger()->error('Stream ' . $error);
99
+ throw new Google_IO_Exception($error, $this->trappedErrorNumber);
100
+ }
101
+ $response_data = false;
102
+ $respHttpCode = self::UNKNOWN_CODE;
103
+ if ($fh) {
104
+ if (isset($this->options[self::TIMEOUT])) {
105
+ stream_set_timeout($fh, $this->options[self::TIMEOUT]);
106
+ }
107
+ $response_data = stream_get_contents($fh);
108
+ fclose($fh);
109
+ $respHttpCode = $this->getHttpResponseCode($http_response_header);
110
+ }
111
+ if (false === $response_data) {
112
+ $error = sprintf("HTTP Error: Unable to connect: '%s'", $respHttpCode);
113
+ $this->client->getLogger()->error('Stream ' . $error);
114
+ throw new Google_IO_Exception($error, $respHttpCode);
115
+ }
116
+ $responseHeaders = $this->getHttpResponseHeaders($http_response_header);
117
+ $this->client->getLogger()->debug('Stream response', array(
118
+ 'code' => $respHttpCode,
119
+ 'headers' => $responseHeaders,
120
+ 'body' => $response_data
121
+ ));
122
+ return array(
123
+ $response_data,
124
+ $responseHeaders,
125
+ $respHttpCode
126
+ );
127
+ }
128
+
129
+ /**
130
+ * Set options that update the transport implementation's behavior.
131
+ *
132
+ * @param
133
+ * $options
134
+ */
135
+ public function setOptions($options)
136
+ {
137
+ $this->options = $options + $this->options;
138
+ }
139
+
140
+ /**
141
+ * Method to handle errors, used for error handling around
142
+ * stream connection methods.
143
+ */
144
+ public function trapError($errno, $errstr)
145
+ {
146
+ $this->trappedErrorNumber = $errno;
147
+ $this->trappedErrorString = $errstr;
148
+ }
149
+
150
+ /**
151
+ * Set the maximum request time in seconds.
152
+ *
153
+ * @param $timeout in
154
+ * seconds
155
+ */
156
+ public function setTimeout($timeout)
157
+ {
158
+ $this->options[self::TIMEOUT] = $timeout;
159
+ }
160
+
161
+ /**
162
+ * Get the maximum request time in seconds.
163
+ *
164
+ * @return timeout in seconds
165
+ */
166
+ public function getTimeout()
167
+ {
168
+ return $this->options[self::TIMEOUT];
169
+ }
170
+
171
+ /**
172
+ * Test for the presence of a cURL header processing bug
173
+ *
174
+ * {@inheritDoc}
175
+ *
176
+ * @return boolean
177
+ */
178
+ protected function needsQuirk()
179
+ {
180
+ return false;
181
+ }
182
+
183
+ protected function getHttpResponseCode($response_headers)
184
+ {
185
+ $header_count = count($response_headers);
186
+ for ($i = 0; $i < $header_count; $i ++) {
187
+ $header = $response_headers[$i];
188
+ if (strncasecmp("HTTP", $header, strlen("HTTP")) == 0) {
189
+ $response = explode(' ', $header);
190
+ return $response[1];
191
+ }
192
+ }
193
+ return self::UNKNOWN_CODE;
194
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  }
tools/src/Google/Logger/Abstract.php CHANGED
@@ -1,406 +1,395 @@
1
- <?php
2
- /*
3
- * Copyright 2014 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * Abstract logging class based on the PSR-3 standard.
22
- *
23
- * NOTE: We don't implement `Psr\Log\LoggerInterface` because we need to
24
- * maintain PHP 5.2 support.
25
- *
26
- * @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
27
- */
28
- abstract class Google_Logger_Abstract
29
- {
30
- /**
31
- * Default log format
32
- */
33
- const DEFAULT_LOG_FORMAT = "[%datetime%] %level%: %message% %context%\n";
34
- /**
35
- * Default date format
36
- *
37
- * Example: 16/Nov/2014:03:26:16 -0500
38
- */
39
- const DEFAULT_DATE_FORMAT = 'd/M/Y:H:i:s O';
40
-
41
- /**
42
- * System is unusable
43
- */
44
- const EMERGENCY = 'emergency';
45
- /**
46
- * Action must be taken immediately
47
- *
48
- * Example: Entire website down, database unavailable, etc. This should
49
- * trigger the SMS alerts and wake you up.
50
- */
51
- const ALERT = 'alert';
52
- /**
53
- * Critical conditions
54
- *
55
- * Example: Application component unavailable, unexpected exception.
56
- */
57
- const CRITICAL = 'critical';
58
- /**
59
- * Runtime errors that do not require immediate action but should typically
60
- * be logged and monitored.
61
- */
62
- const ERROR = 'error';
63
- /**
64
- * Exceptional occurrences that are not errors.
65
- *
66
- * Example: Use of deprecated APIs, poor use of an API, undesirable things
67
- * that are not necessarily wrong.
68
- */
69
- const WARNING = 'warning';
70
- /**
71
- * Normal but significant events.
72
- */
73
- const NOTICE = 'notice';
74
- /**
75
- * Interesting events.
76
- *
77
- * Example: User logs in, SQL logs.
78
- */
79
- const INFO = 'info';
80
- /**
81
- * Detailed debug information.
82
- */
83
- const DEBUG = 'debug';
84
-
85
- /**
86
- * @var array $levels Logging levels
87
- */
88
- protected static $levels = array(
89
- self::EMERGENCY => 600,
90
- self::ALERT => 550,
91
- self::CRITICAL => 500,
92
- self::ERROR => 400,
93
- self::WARNING => 300,
94
- self::NOTICE => 250,
95
- self::INFO => 200,
96
- self::DEBUG => 100,
97
- );
98
-
99
- /**
100
- * @var integer $level The minimum logging level
101
- */
102
- protected $level = self::DEBUG;
103
-
104
- /**
105
- * @var string $logFormat The current log format
106
- */
107
- protected $logFormat = self::DEFAULT_LOG_FORMAT;
108
- /**
109
- * @var string $dateFormat The current date format
110
- */
111
- protected $dateFormat = self::DEFAULT_DATE_FORMAT;
112
-
113
- /**
114
- * @var boolean $allowNewLines If newlines are allowed
115
- */
116
- protected $allowNewLines = false;
117
-
118
- /**
119
- * @param Google_Client $client The current Google client
120
- */
121
- public function __construct(Google_Client $client)
122
- {
123
- $this->setLevel(
124
- $client->getClassConfig('Google_Logger_Abstract', 'level')
125
- );
126
-
127
- $format = $client->getClassConfig('Google_Logger_Abstract', 'log_format');
128
- $this->logFormat = $format ? $format : self::DEFAULT_LOG_FORMAT;
129
-
130
- $format = $client->getClassConfig('Google_Logger_Abstract', 'date_format');
131
- $this->dateFormat = $format ? $format : self::DEFAULT_DATE_FORMAT;
132
-
133
- $this->allowNewLines = (bool) $client->getClassConfig(
134
- 'Google_Logger_Abstract',
135
- 'allow_newlines'
136
- );
137
- }
138
-
139
- /**
140
- * Sets the minimum logging level that this logger handles.
141
- *
142
- * @param integer $level
143
- */
144
- public function setLevel($level)
145
- {
146
- $this->level = $this->normalizeLevel($level);
147
- }
148
-
149
- /**
150
- * Checks if the logger should handle messages at the provided level.
151
- *
152
- * @param integer $level
153
- * @return boolean
154
- */
155
- public function shouldHandle($level)
156
- {
157
- return $this->normalizeLevel($level) >= $this->level;
158
- }
159
-
160
- /**
161
- * System is unusable.
162
- *
163
- * @param string $message The log message
164
- * @param array $context The log context
165
- */
166
- public function emergency($message, array $context = array())
167
- {
168
- $this->log(self::EMERGENCY, $message, $context);
169
- }
170
-
171
- /**
172
- * Action must be taken immediately.
173
- *
174
- * Example: Entire website down, database unavailable, etc. This should
175
- * trigger the SMS alerts and wake you up.
176
- *
177
- * @param string $message The log message
178
- * @param array $context The log context
179
- */
180
- public function alert($message, array $context = array())
181
- {
182
- $this->log(self::ALERT, $message, $context);
183
- }
184
-
185
- /**
186
- * Critical conditions.
187
- *
188
- * Example: Application component unavailable, unexpected exception.
189
- *
190
- * @param string $message The log message
191
- * @param array $context The log context
192
- */
193
- public function critical($message, array $context = array())
194
- {
195
- $this->log(self::CRITICAL, $message, $context);
196
- }
197
-
198
- /**
199
- * Runtime errors that do not require immediate action but should typically
200
- * be logged and monitored.
201
- *
202
- * @param string $message The log message
203
- * @param array $context The log context
204
- */
205
- public function error($message, array $context = array())
206
- {
207
- $this->log(self::ERROR, $message, $context);
208
- }
209
-
210
- /**
211
- * Exceptional occurrences that are not errors.
212
- *
213
- * Example: Use of deprecated APIs, poor use of an API, undesirable things
214
- * that are not necessarily wrong.
215
- *
216
- * @param string $message The log message
217
- * @param array $context The log context
218
- */
219
- public function warning($message, array $context = array())
220
- {
221
- $this->log(self::WARNING, $message, $context);
222
- }
223
-
224
- /**
225
- * Normal but significant events.
226
- *
227
- * @param string $message The log message
228
- * @param array $context The log context
229
- */
230
- public function notice($message, array $context = array())
231
- {
232
- $this->log(self::NOTICE, $message, $context);
233
- }
234
-
235
- /**
236
- * Interesting events.
237
- *
238
- * Example: User logs in, SQL logs.
239
- *
240
- * @param string $message The log message
241
- * @param array $context The log context
242
- */
243
- public function info($message, array $context = array())
244
- {
245
- $this->log(self::INFO, $message, $context);
246
- }
247
-
248
- /**
249
- * Detailed debug information.
250
- *
251
- * @param string $message The log message
252
- * @param array $context The log context
253
- */
254
- public function debug($message, array $context = array())
255
- {
256
- $this->log(self::DEBUG, $message, $context);
257
- }
258
-
259
- /**
260
- * Logs with an arbitrary level.
261
- *
262
- * @param mixed $level The log level
263
- * @param string $message The log message
264
- * @param array $context The log context
265
- */
266
- public function log($level, $message, array $context = array())
267
- {
268
- if (!$this->shouldHandle($level)) {
269
- return false;
270
- }
271
-
272
- $levelName = is_int($level) ? array_search($level, self::$levels) : $level;
273
- $message = $this->interpolate(
274
- array(
275
- 'message' => $message,
276
- 'context' => $context,
277
- 'level' => strtoupper($levelName),
278
- 'datetime' => new DateTime(),
279
- )
280
- );
281
-
282
- $this->write($message);
283
- }
284
-
285
- /**
286
- * Interpolates log variables into the defined log format.
287
- *
288
- * @param array $variables The log variables.
289
- * @return string
290
- */
291
- protected function interpolate(array $variables = array())
292
- {
293
- $template = $this->logFormat;
294
-
295
- if (!$variables['context']) {
296
- $template = str_replace('%context%', '', $template);
297
- unset($variables['context']);
298
- } else {
299
- $this->reverseJsonInContext($variables['context']);
300
- }
301
-
302
- foreach ($variables as $key => $value) {
303
- if (strpos($template, '%'. $key .'%') !== false) {
304
- $template = str_replace(
305
- '%' . $key . '%',
306
- $this->export($value),
307
- $template
308
- );
309
- }
310
- }
311
-
312
- return $template;
313
- }
314
-
315
- /**
316
- * Reverses JSON encoded PHP arrays and objects so that they log better.
317
- *
318
- * @param array $context The log context
319
- */
320
- protected function reverseJsonInContext(array &$context)
321
- {
322
- if (!$context) {
323
- return;
324
- }
325
-
326
- foreach ($context as $key => $val) {
327
- if (!$val || !is_string($val) || !($val[0] == '{' || $val[0] == '[')) {
328
- continue;
329
- }
330
-
331
- $json = @json_decode($val);
332
- if (is_object($json) || is_array($json)) {
333
- $context[$key] = $json;
334
- }
335
- }
336
- }
337
-
338
- /**
339
- * Exports a PHP value for logging to a string.
340
- *
341
- * @param mixed $value The value to
342
- */
343
- protected function export($value)
344
- {
345
- if (is_string($value)) {
346
- if ($this->allowNewLines) {
347
- return $value;
348
- }
349
-
350
- return preg_replace('/[\r\n]+/', ' ', $value);
351
- }
352
-
353
- if (is_resource($value)) {
354
- return sprintf(
355
- 'resource(%d) of type (%s)',
356
- $value,
357
- get_resource_type($value)
358
- );
359
- }
360
-
361
- if ($value instanceof DateTime) {
362
- return $value->format($this->dateFormat);
363
- }
364
-
365
- if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
366
- $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
367
-
368
- if ($this->allowNewLines) {
369
- $options |= JSON_PRETTY_PRINT;
370
- }
371
-
372
- return @json_encode($value, $options);
373
- }
374
-
375
- return str_replace('\\/', '/', @json_encode($value));
376
- }
377
-
378
- /**
379
- * Converts a given log level to the integer form.
380
- *
381
- * @param mixed $level The logging level
382
- * @return integer $level The normalized level
383
- * @throws Google_Logger_Exception If $level is invalid
384
- */
385
- protected function normalizeLevel($level)
386
- {
387
- if (is_int($level) && array_search($level, self::$levels) !== false) {
388
- return $level;
389
- }
390
-
391
- if (is_string($level) && isset(self::$levels[$level])) {
392
- return self::$levels[$level];
393
- }
394
-
395
- throw new Google_Logger_Exception(
396
- sprintf("Unknown LogLevel: '%s'", $level)
397
- );
398
- }
399
-
400
- /**
401
- * Writes a message to the current log implementation.
402
- *
403
- * @param string $message The message
404
- */
405
- abstract protected function write($message);
406
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * Abstract logging class based on the PSR-3 standard.
21
+ *
22
+ * NOTE: We don't implement `Psr\Log\LoggerInterface` because we need to
23
+ * maintain PHP 5.2 support.
24
+ *
25
+ * @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
26
+ */
27
+ abstract class Google_Logger_Abstract
28
+ {
29
+ /**
30
+ * Default log format
31
+ */
32
+ const DEFAULT_LOG_FORMAT = "[%datetime%] %level%: %message% %context%\n";
33
+ /**
34
+ * Default date format
35
+ *
36
+ * Example: 16/Nov/2014:03:26:16 -0500
37
+ */
38
+ const DEFAULT_DATE_FORMAT = 'd/M/Y:H:i:s O';
39
+ /**
40
+ * System is unusable
41
+ */
42
+ const EMERGENCY = 'emergency';
43
+ /**
44
+ * Action must be taken immediately
45
+ *
46
+ * Example: Entire website down, database unavailable, etc. This should
47
+ * trigger the SMS alerts and wake you up.
48
+ */
49
+ const ALERT = 'alert';
50
+ /**
51
+ * Critical conditions
52
+ *
53
+ * Example: Application component unavailable, unexpected exception.
54
+ */
55
+ const CRITICAL = 'critical';
56
+ /**
57
+ * Runtime errors that do not require immediate action but should typically
58
+ * be logged and monitored.
59
+ */
60
+ const ERROR = 'error';
61
+ /**
62
+ * Exceptional occurrences that are not errors.
63
+ *
64
+ * Example: Use of deprecated APIs, poor use of an API, undesirable things
65
+ * that are not necessarily wrong.
66
+ */
67
+ const WARNING = 'warning';
68
+ /**
69
+ * Normal but significant events.
70
+ */
71
+ const NOTICE = 'notice';
72
+ /**
73
+ * Interesting events.
74
+ *
75
+ * Example: User logs in, SQL logs.
76
+ */
77
+ const INFO = 'info';
78
+ /**
79
+ * Detailed debug information.
80
+ */
81
+ const DEBUG = 'debug';
82
+ /**
83
+ *
84
+ * @var array $levels Logging levels
85
+ */
86
+ protected static $levels = array(
87
+ self::EMERGENCY => 600,
88
+ self::ALERT => 550,
89
+ self::CRITICAL => 500,
90
+ self::ERROR => 400,
91
+ self::WARNING => 300,
92
+ self::NOTICE => 250,
93
+ self::INFO => 200,
94
+ self::DEBUG => 100
95
+ );
96
+ /**
97
+ *
98
+ * @var integer $level The minimum logging level
99
+ */
100
+ protected $level = self::DEBUG;
101
+ /**
102
+ *
103
+ * @var string $logFormat The current log format
104
+ */
105
+ protected $logFormat = self::DEFAULT_LOG_FORMAT;
106
+ /**
107
+ *
108
+ * @var string $dateFormat The current date format
109
+ */
110
+ protected $dateFormat = self::DEFAULT_DATE_FORMAT;
111
+ /**
112
+ *
113
+ * @var boolean $allowNewLines If newlines are allowed
114
+ */
115
+ protected $allowNewLines = false;
116
+
117
+ /**
118
+ *
119
+ * @param Google_Client $client
120
+ * The current Google client
121
+ */
122
+ public function __construct(Google_Client $client)
123
+ {
124
+ $this->setLevel($client->getClassConfig('Google_Logger_Abstract', 'level'));
125
+ $format = $client->getClassConfig('Google_Logger_Abstract', 'log_format');
126
+ $this->logFormat = $format ? $format : self::DEFAULT_LOG_FORMAT;
127
+ $format = $client->getClassConfig('Google_Logger_Abstract', 'date_format');
128
+ $this->dateFormat = $format ? $format : self::DEFAULT_DATE_FORMAT;
129
+ $this->allowNewLines = (bool) $client->getClassConfig('Google_Logger_Abstract', 'allow_newlines');
130
+ }
131
+
132
+ /**
133
+ * Sets the minimum logging level that this logger handles.
134
+ *
135
+ * @param integer $level
136
+ */
137
+ public function setLevel($level)
138
+ {
139
+ $this->level = $this->normalizeLevel($level);
140
+ }
141
+
142
+ /**
143
+ * Checks if the logger should handle messages at the provided level.
144
+ *
145
+ * @param integer $level
146
+ * @return boolean
147
+ */
148
+ public function shouldHandle($level)
149
+ {
150
+ return $this->normalizeLevel($level) >= $this->level;
151
+ }
152
+
153
+ /**
154
+ * System is unusable.
155
+ *
156
+ * @param string $message
157
+ * The log message
158
+ * @param array $context
159
+ * The log context
160
+ */
161
+ public function emergency($message, array $context = array())
162
+ {
163
+ $this->log(self::EMERGENCY, $message, $context);
164
+ }
165
+
166
+ /**
167
+ * Action must be taken immediately.
168
+ *
169
+ * Example: Entire website down, database unavailable, etc. This should
170
+ * trigger the SMS alerts and wake you up.
171
+ *
172
+ * @param string $message
173
+ * The log message
174
+ * @param array $context
175
+ * The log context
176
+ */
177
+ public function alert($message, array $context = array())
178
+ {
179
+ $this->log(self::ALERT, $message, $context);
180
+ }
181
+
182
+ /**
183
+ * Critical conditions.
184
+ *
185
+ * Example: Application component unavailable, unexpected exception.
186
+ *
187
+ * @param string $message
188
+ * The log message
189
+ * @param array $context
190
+ * The log context
191
+ */
192
+ public function critical($message, array $context = array())
193
+ {
194
+ $this->log(self::CRITICAL, $message, $context);
195
+ }
196
+
197
+ /**
198
+ * Runtime errors that do not require immediate action but should typically
199
+ * be logged and monitored.
200
+ *
201
+ * @param string $message
202
+ * The log message
203
+ * @param array $context
204
+ * The log context
205
+ */
206
+ public function error($message, array $context = array())
207
+ {
208
+ $this->log(self::ERROR, $message, $context);
209
+ }
210
+
211
+ /**
212
+ * Exceptional occurrences that are not errors.
213
+ *
214
+ * Example: Use of deprecated APIs, poor use of an API, undesirable things
215
+ * that are not necessarily wrong.
216
+ *
217
+ * @param string $message
218
+ * The log message
219
+ * @param array $context
220
+ * The log context
221
+ */
222
+ public function warning($message, array $context = array())
223
+ {
224
+ $this->log(self::WARNING, $message, $context);
225
+ }
226
+
227
+ /**
228
+ * Normal but significant events.
229
+ *
230
+ * @param string $message
231
+ * The log message
232
+ * @param array $context
233
+ * The log context
234
+ */
235
+ public function notice($message, array $context = array())
236
+ {
237
+ $this->log(self::NOTICE, $message, $context);
238
+ }
239
+
240
+ /**
241
+ * Interesting events.
242
+ *
243
+ * Example: User logs in, SQL logs.
244
+ *
245
+ * @param string $message
246
+ * The log message
247
+ * @param array $context
248
+ * The log context
249
+ */
250
+ public function info($message, array $context = array())
251
+ {
252
+ $this->log(self::INFO, $message, $context);
253
+ }
254
+
255
+ /**
256
+ * Detailed debug information.
257
+ *
258
+ * @param string $message
259
+ * The log message
260
+ * @param array $context
261
+ * The log context
262
+ */
263
+ public function debug($message, array $context = array())
264
+ {
265
+ $this->log(self::DEBUG, $message, $context);
266
+ }
267
+
268
+ /**
269
+ * Logs with an arbitrary level.
270
+ *
271
+ * @param mixed $level
272
+ * The log level
273
+ * @param string $message
274
+ * The log message
275
+ * @param array $context
276
+ * The log context
277
+ */
278
+ public function log($level, $message, array $context = array())
279
+ {
280
+ if (! $this->shouldHandle($level)) {
281
+ return false;
282
+ }
283
+ $levelName = is_int($level) ? array_search($level, self::$levels) : $level;
284
+ $message = $this->interpolate(array(
285
+ 'message' => $message,
286
+ 'context' => $context,
287
+ 'level' => strtoupper($levelName),
288
+ 'datetime' => new DateTime()
289
+ ));
290
+ $this->write($message);
291
+ }
292
+
293
+ /**
294
+ * Interpolates log variables into the defined log format.
295
+ *
296
+ * @param array $variables
297
+ * The log variables.
298
+ * @return string
299
+ */
300
+ protected function interpolate(array $variables = array())
301
+ {
302
+ $template = $this->logFormat;
303
+ if (! $variables['context']) {
304
+ $template = str_replace('%context%', '', $template);
305
+ unset($variables['context']);
306
+ } else {
307
+ $this->reverseJsonInContext($variables['context']);
308
+ }
309
+ foreach ($variables as $key => $value) {
310
+ if (strpos($template, '%' . $key . '%') !== false) {
311
+ $template = str_replace('%' . $key . '%', $this->export($value), $template);
312
+ }
313
+ }
314
+ return $template;
315
+ }
316
+
317
+ /**
318
+ * Reverses JSON encoded PHP arrays and objects so that they log better.
319
+ *
320
+ * @param array $context
321
+ * The log context
322
+ */
323
+ protected function reverseJsonInContext(array &$context)
324
+ {
325
+ if (! $context) {
326
+ return;
327
+ }
328
+ foreach ($context as $key => $val) {
329
+ if (! $val || ! is_string($val) || ! ($val[0] == '{' || $val[0] == '[')) {
330
+ continue;
331
+ }
332
+ $json = @json_decode($val);
333
+ if (is_object($json) || is_array($json)) {
334
+ $context[$key] = $json;
335
+ }
336
+ }
337
+ }
338
+
339
+ /**
340
+ * Exports a PHP value for logging to a string.
341
+ *
342
+ * @param mixed $value
343
+ * The value to
344
+ */
345
+ protected function export($value)
346
+ {
347
+ if (is_string($value)) {
348
+ if ($this->allowNewLines) {
349
+ return $value;
350
+ }
351
+ return preg_replace('/[\r\n]+/', ' ', $value);
352
+ }
353
+ if (is_resource($value)) {
354
+ return sprintf('resource(%d) of type (%s)', $value, get_resource_type($value));
355
+ }
356
+ if ($value instanceof DateTime) {
357
+ return $value->format($this->dateFormat);
358
+ }
359
+ if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
360
+ $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
361
+ if ($this->allowNewLines) {
362
+ $options |= JSON_PRETTY_PRINT;
363
+ }
364
+ return @json_encode($value, $options);
365
+ }
366
+ return str_replace('\\/', '/', @json_encode($value));
367
+ }
368
+
369
+ /**
370
+ * Converts a given log level to the integer form.
371
+ *
372
+ * @param mixed $level
373
+ * The logging level
374
+ * @return integer $level The normalized level
375
+ * @throws Google_Logger_Exception If $level is invalid
376
+ */
377
+ protected function normalizeLevel($level)
378
+ {
379
+ if (is_int($level) && array_search($level, self::$levels) !== false) {
380
+ return $level;
381
+ }
382
+ if (is_string($level) && isset(self::$levels[$level])) {
383
+ return self::$levels[$level];
384
+ }
385
+ throw new Google_Logger_Exception(sprintf("Unknown LogLevel: '%s'", $level));
386
+ }
387
+
388
+ /**
389
+ * Writes a message to the current log implementation.
390
+ *
391
+ * @param string $message
392
+ * The message
393
+ */
394
+ abstract protected function write($message);
 
 
 
 
 
 
 
 
 
 
 
395
  }
tools/src/Google/Logger/Exception.php CHANGED
@@ -1,22 +1,21 @@
1
- <?php
2
- /*
3
- * Copyright 2014 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- class Google_Logger_Exception extends Google_Exception
21
- {
22
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ class Google_Logger_Exception extends Google_Exception
20
+ {
 
21
  }
tools/src/Google/Logger/File.php CHANGED
@@ -1,156 +1,144 @@
1
- <?php
2
- /*
3
- * Copyright 2014 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * File logging class based on the PSR-3 standard.
22
- *
23
- * This logger writes to a PHP stream resource.
24
- */
25
- class Google_Logger_File extends Google_Logger_Abstract
26
- {
27
- /**
28
- * @var string|resource $file Where logs are written
29
- */
30
- private $file;
31
- /**
32
- * @var integer $mode The mode to use if the log file needs to be created
33
- */
34
- private $mode = 0640;
35
- /**
36
- * @var boolean $lock If a lock should be attempted before writing to the log
37
- */
38
- private $lock = false;
39
-
40
- /**
41
- * @var integer $trappedErrorNumber Trapped error number
42
- */
43
- private $trappedErrorNumber;
44
- /**
45
- * @var string $trappedErrorString Trapped error string
46
- */
47
- private $trappedErrorString;
48
-
49
- /**
50
- * {@inheritdoc}
51
- */
52
- public function __construct(Google_Client $client)
53
- {
54
- parent::__construct($client);
55
-
56
- $file = $client->getClassConfig('Google_Logger_File', 'file');
57
- if (!is_string($file) && !is_resource($file)) {
58
- throw new Google_Logger_Exception(
59
- 'File logger requires a filename or a valid file pointer'
60
- );
61
- }
62
-
63
- $mode = $client->getClassConfig('Google_Logger_File', 'mode');
64
- if (!$mode) {
65
- $this->mode = $mode;
66
- }
67
-
68
- $this->lock = (bool) $client->getClassConfig('Google_Logger_File', 'lock');
69
- $this->file = $file;
70
- }
71
-
72
- /**
73
- * {@inheritdoc}
74
- */
75
- protected function write($message)
76
- {
77
- if (is_string($this->file)) {
78
- $this->open();
79
- } elseif (!is_resource($this->file)) {
80
- throw new Google_Logger_Exception('File pointer is no longer available');
81
- }
82
-
83
- if ($this->lock) {
84
- flock($this->file, LOCK_EX);
85
- }
86
-
87
- fwrite($this->file, (string) $message);
88
-
89
- if ($this->lock) {
90
- flock($this->file, LOCK_UN);
91
- }
92
- }
93
-
94
- /**
95
- * Opens the log for writing.
96
- *
97
- * @return resource
98
- */
99
- private function open()
100
- {
101
- // Used for trapping `fopen()` errors.
102
- $this->trappedErrorNumber = null;
103
- $this->trappedErrorString = null;
104
-
105
- $old = set_error_handler(array($this, 'trapError'));
106
-
107
- $needsChmod = !file_exists($this->file);
108
- $fh = fopen($this->file, 'a');
109
-
110
- restore_error_handler();
111
-
112
- // Handles trapped `fopen()` errors.
113
- if ($this->trappedErrorNumber) {
114
- throw new Google_Logger_Exception(
115
- sprintf(
116
- "Logger Error: '%s'",
117
- $this->trappedErrorString
118
- ),
119
- $this->trappedErrorNumber
120
- );
121
- }
122
-
123
- if ($needsChmod) {
124
- @chmod($this->file, $this->mode & ~umask());
125
- }
126
-
127
- return $this->file = $fh;
128
- }
129
-
130
- /**
131
- * Closes the log stream resource.
132
- */
133
- private function close()
134
- {
135
- if (is_resource($this->file)) {
136
- fclose($this->file);
137
- }
138
- }
139
-
140
- /**
141
- * Traps `fopen()` errors.
142
- *
143
- * @param integer $errno The error number
144
- * @param string $errstr The error string
145
- */
146
- private function trapError($errno, $errstr)
147
- {
148
- $this->trappedErrorNumber = $errno;
149
- $this->trappedErrorString = $errstr;
150
- }
151
-
152
- public function __destruct()
153
- {
154
- $this->close();
155
- }
156
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * File logging class based on the PSR-3 standard.
21
+ *
22
+ * This logger writes to a PHP stream resource.
23
+ */
24
+ class Google_Logger_File extends Google_Logger_Abstract
25
+ {
26
+ /**
27
+ *
28
+ * @var string|resource $file Where logs are written
29
+ */
30
+ private $file;
31
+ /**
32
+ *
33
+ * @var integer $mode The mode to use if the log file needs to be created
34
+ */
35
+ private $mode = 0640;
36
+ /**
37
+ *
38
+ * @var boolean $lock If a lock should be attempted before writing to the log
39
+ */
40
+ private $lock = false;
41
+ /**
42
+ *
43
+ * @var integer $trappedErrorNumber Trapped error number
44
+ */
45
+ private $trappedErrorNumber;
46
+ /**
47
+ *
48
+ * @var string $trappedErrorString Trapped error string
49
+ */
50
+ private $trappedErrorString;
51
+
52
+ /**
53
+ * @ERROR!!!
54
+ */
55
+ public function __construct(Google_Client $client)
56
+ {
57
+ parent::__construct($client);
58
+ $file = $client->getClassConfig('Google_Logger_File', 'file');
59
+ if (! is_string($file) && ! is_resource($file)) {
60
+ throw new Google_Logger_Exception('File logger requires a filename or a valid file pointer');
61
+ }
62
+ $mode = $client->getClassConfig('Google_Logger_File', 'mode');
63
+ if (! $mode) {
64
+ $this->mode = $mode;
65
+ }
66
+ $this->lock = (bool) $client->getClassConfig('Google_Logger_File', 'lock');
67
+ $this->file = $file;
68
+ }
69
+
70
+ /**
71
+ * @ERROR!!!
72
+ */
73
+ protected function write($message)
74
+ {
75
+ if (is_string($this->file)) {
76
+ $this->open();
77
+ } elseif (! is_resource($this->file)) {
78
+ throw new Google_Logger_Exception('File pointer is no longer available');
79
+ }
80
+ if ($this->lock) {
81
+ flock($this->file, LOCK_EX);
82
+ }
83
+ fwrite($this->file, (string) $message);
84
+ if ($this->lock) {
85
+ flock($this->file, LOCK_UN);
86
+ }
87
+ }
88
+
89
+ /**
90
+ * Opens the log for writing.
91
+ *
92
+ * @return resource
93
+ */
94
+ private function open()
95
+ {
96
+ // Used for trapping `fopen()` errors.
97
+ $this->trappedErrorNumber = null;
98
+ $this->trappedErrorString = null;
99
+ $old = set_error_handler(array(
100
+ $this,
101
+ 'trapError'
102
+ ));
103
+ $needsChmod = ! file_exists($this->file);
104
+ $fh = fopen($this->file, 'a');
105
+ restore_error_handler();
106
+ // Handles trapped `fopen()` errors.
107
+ if ($this->trappedErrorNumber) {
108
+ throw new Google_Logger_Exception(sprintf("Logger Error: '%s'", $this->trappedErrorString), $this->trappedErrorNumber);
109
+ }
110
+ if ($needsChmod) {
111
+ @chmod($this->file, $this->mode & ~ umask());
112
+ }
113
+ return $this->file = $fh;
114
+ }
115
+
116
+ /**
117
+ * Closes the log stream resource.
118
+ */
119
+ private function close()
120
+ {
121
+ if (is_resource($this->file)) {
122
+ fclose($this->file);
123
+ }
124
+ }
125
+
126
+ /**
127
+ * Traps `fopen()` errors.
128
+ *
129
+ * @param integer $errno
130
+ * The error number
131
+ * @param string $errstr
132
+ * The error string
133
+ */
134
+ private function trapError($errno, $errstr)
135
+ {
136
+ $this->trappedErrorNumber = $errno;
137
+ $this->trappedErrorString = $errstr;
138
+ }
139
+
140
+ public function __destruct()
141
+ {
142
+ $this->close();
143
+ }
 
 
 
 
 
 
 
 
 
 
 
 
144
  }
tools/src/Google/Logger/Null.php CHANGED
@@ -1,41 +1,40 @@
1
- <?php
2
- /*
3
- * Copyright 2014 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * Null logger based on the PSR-3 standard.
22
- *
23
- * This logger simply discards all messages.
24
- */
25
- class Google_Logger_Null extends Google_Logger_Abstract
26
- {
27
- /**
28
- * {@inheritdoc}
29
- */
30
- public function shouldHandle($level)
31
- {
32
- return false;
33
- }
34
-
35
- /**
36
- * {@inheritdoc}
37
- */
38
- protected function write($message, array $context = array())
39
- {
40
- }
41
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * Null logger based on the PSR-3 standard.
21
+ *
22
+ * This logger simply discards all messages.
23
+ */
24
+ class Google_Logger_Null extends Google_Logger_Abstract
25
+ {
26
+
27
+ /**
28
+ * @ERROR!!!
29
+ */
30
+ public function shouldHandle($level)
31
+ {
32
+ return false;
33
+ }
34
+
35
+ /**
36
+ * @ERROR!!!
37
+ */
38
+ protected function write($message, array $context = array())
39
+ {}
 
40
  }
tools/src/Google/Logger/Psr.php CHANGED
@@ -1,91 +1,92 @@
1
- <?php
2
- /*
3
- * Copyright 2014 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
19
-
20
- /**
21
- * Psr logging class based on the PSR-3 standard.
22
- *
23
- * This logger will delegate all logging to a PSR-3 compatible logger specified
24
- * with the `Google_Logger_Psr::setLogger()` method.
25
- */
26
- class Google_Logger_Psr extends Google_Logger_Abstract
27
- {
28
- /**
29
- * @param Psr\Log\LoggerInterface $logger The PSR-3 logger
30
- */
31
- private $logger;
32
-
33
- /**
34
- * @param Google_Client $client The current Google client
35
- * @param Psr\Log\LoggerInterface $logger PSR-3 logger where logging will be delegated.
36
- */
37
- public function __construct(Google_Client $client, /*Psr\Log\LoggerInterface*/ $logger = null)
38
- {
39
- parent::__construct($client);
40
-
41
- if ($logger) {
42
- $this->setLogger($logger);
43
- }
44
- }
45
-
46
- /**
47
- * Sets the PSR-3 logger where logging will be delegated.
48
- *
49
- * NOTE: The `$logger` should technically implement
50
- * `Psr\Log\LoggerInterface`, but we don't explicitly require this so that
51
- * we can be compatible with PHP 5.2.
52
- *
53
- * @param Psr\Log\LoggerInterface $logger The PSR-3 logger
54
- */
55
- public function setLogger(/*Psr\Log\LoggerInterface*/ $logger)
56
- {
57
- $this->logger = $logger;
58
- }
59
-
60
- /**
61
- * {@inheritdoc}
62
- */
63
- public function shouldHandle($level)
64
- {
65
- return isset($this->logger) && parent::shouldHandle($level);
66
- }
67
-
68
- /**
69
- * {@inheritdoc}
70
- */
71
- public function log($level, $message, array $context = array())
72
- {
73
- if (!$this->shouldHandle($level)) {
74
- return false;
75
- }
76
-
77
- if ($context) {
78
- $this->reverseJsonInContext($context);
79
- }
80
-
81
- $levelName = is_int($level) ? array_search($level, self::$levels) : $level;
82
- $this->logger->log($levelName, $message, $context);
83
- }
84
-
85
- /**
86
- * {@inheritdoc}
87
- */
88
- protected function write($message, array $context = array())
89
- {
90
- }
 
91
  }
1
+ <?php
2
+ /*
3
+ * Copyright 2014 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ require_once realpath(dirname(__FILE__) . '/../../../autoload.php');
18
+
19
+ /**
20
+ * Psr logging class based on the PSR-3 standard.
21
+ *
22
+ * This logger will delegate all logging to a PSR-3 compatible logger specified
23
+ * with the `Google_Logger_Psr::setLogger()` method.
24
+ */
25
+ class Google_Logger_Psr extends Google_Logger_Abstract
26
+ {
27
+ /**
28
+ *
29
+ * @param Psr\Log\LoggerInterface $logger
30
+ * The PSR-3 logger
31
+ */
32
+ private $logger;
33
+
34
+ /**
35
+ *
36
+ * @param Google_Client $client
37
+ * The current Google client
38
+ * @param Psr\Log\LoggerInterface $logger
39
+ * PSR-3 logger where logging will be delegated.
40
+ */
41
+ public function __construct(Google_Client $client, /*Psr\Log\LoggerInterface*/ $logger = null)
42
+ {
43
+ parent::__construct($client);
44
+ if ($logger) {
45
+ $this->setLogger($logger);
46
+ }
47
+ }
48
+
49
+ /**
50
+ * Sets the PSR-3 logger where logging will be delegated.
51
+ *
52
+ * NOTE: The `$logger` should technically implement
53
+ * `Psr\Log\LoggerInterface`, but we don't explicitly require this so that
54
+ * we can be compatible with PHP 5.2.
55
+ *
56
+ * @param Psr\Log\LoggerInterface $logger
57
+ * The PSR-3 logger
58
+ */
59
+ public function setLogger(/*Psr\Log\LoggerInterface*/ $logger)
60
+ {
61
+ $this->logger = $logger;
62
+ }
63
+
64
+ /**
65
+ * @ERROR!!!
66
+ */
67
+ public function shouldHandle($level)
68
+ {
69
+ return isset($this->logger) && parent::shouldHandle($level);
70
+ }
71
+
72
+ /**
73
+ * @ERROR!!!
74
+ */
75
+ public function log($level, $message, array $context = array())
76
+ {
77
+ if (! $this->shouldHandle($level)) {
78
+ return false;
79
+ }
80
+ if ($context) {
81
+ $this->reverseJsonInContext($context);
82
+ }
83
+ $levelName = is_int($level) ? array_search($level, self::$levels) : $level;
84
+ $this->logger->log($levelName, $message, $context);
85
+ }
86
+
87
+ /**
88
+ * @ERROR!!!
89
+ */
90
+ protected function write($message, array $context = array())
91
+ {}
92
  }
tools/src/Google/Model.php CHANGED
@@ -1,281 +1,280 @@
1
- <?php
2
- /*
3
- * Copyright 2011 Google Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * This class defines attributes, valid values, and usage which is generated
20
- * from a given json schema.
21
- * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5
22
- *
23
- * @author Chirag Shah <chirags@google.com>
24
- *
25
- */
26
- class Google_Model implements ArrayAccess
27
- {
28
- protected $internal_gapi_mappings = array();
29
- protected $modelData = array();
30
- protected $processed = array();
31
-
32
- /**
33
- * Polymorphic - accepts a variable number of arguments dependent
34
- * on the type of the model subclass.
35
- */
36
- final public function __construct()
37
- {
38
- if (func_num_args() == 1 && is_array(func_get_arg(0))) {
39
- // Initialize the model with the array's contents.
40
- $array = func_get_arg(0);
41
- $this->mapTypes($array);
42
- }
43
- $this->gapiInit();
44
- }
45
-
46
- /**
47
- * Getter that handles passthrough access to the data array, and lazy object creation.
48
- * @param string $key Property name.
49
- * @return mixed The value if any, or null.
50
- */
51
- public function __get($key)
52
- {
53
- $keyTypeName = $this->keyType($key);
54
- $keyDataType = $this->dataType($key);
55
- if (isset($this->$keyTypeName) && !isset($this->processed[$key])) {
56
- if (isset($this->modelData[$key])) {
57
- $val = $this->modelData[$key];
58
- } else if (isset($this->$keyDataType) &&
59
- ($this->$keyDataType == 'array' || $this->$keyDataType == 'map')) {
60
- $val = array();
61
- } else {
62
- $val = null;
63
- }
64
-
65
- if ($this->isAssociativeArray($val)) {
66
- if (isset($this->$keyDataType) && 'map' == $this->$keyDataType) {
67
- foreach ($val as $arrayKey => $arrayItem) {
68
- $this->modelData[$key][$arrayKey] =
69
- $this->createObjectFromName($keyTypeName, $arrayItem);
70
- }
71
- } else {
72
- $this->modelData[$key] = $this->createObjectFromName($keyTypeName, $val);
73
- }
74
- } else if (is_array($val)) {
75
- $arrayObject = array();
76
- foreach ($val as $arrayIndex => $arrayItem) {
77
- $arrayObject[$arrayIndex] =
78
- $this->createObjectFromName($keyTypeName, $arrayItem);
79
- }
80
- $this->modelData[$key] = $arrayObject;
81
- }
82
- $this->processed[$key] = true;
83
- }
84
-
85
- return isset($this->modelData[$key]) ? $this->modelData[$key] : null;
86
- }
87
-
88
- /**
89
- * Initialize this object's properties from an array.
90
- *
91
- * @param array $array Used to seed this object's properties.
92
- * @return void
93
- */
94
- protected function mapTypes($array)
95
- {
96
- // Hard initilise simple types, lazy load more complex ones.
97
- foreach ($array as $key => $val) {
98
- if ( !property_exists($this, $this->keyType($key)) &&
99
- property_exists($this, $key)) {
100
- $this->$key = $val;
101
- unset($array[$key]);
102
- } elseif (property_exists($this, $camelKey = Google_Utils::camelCase($key))) {
103
- // This checks if property exists as camelCase, leaving it in array as snake_case
104
- // in case of backwards compatibility issues.
105
- $this->$camelKey = $val;
106
- }
107
- }
108
- $this->modelData = $array;
109
- }
110
-
111
- /**
112
- * Blank initialiser to be used in subclasses to do post-construction initialisation - this
113
- * avoids the need for subclasses to have to implement the variadics handling in their
114
- * constructors.
115
- */
116
- protected function gapiInit()
117
- {
118
- return;
119
- }
120
-
121
- /**
122
- * Create a simplified object suitable for straightforward
123
- * conversion to JSON. This is relatively expensive
124
- * due to the usage of reflection, but shouldn't be called
125
- * a whole lot, and is the most straightforward way to filter.
126
- */
127
- public function toSimpleObject()
128
- {
129
- $object = new stdClass();
130
-
131
- // Process all other data.
132
- foreach ($this->modelData as $key => $val) {
133
- $result = $this->getSimpleValue($val);
134
- if ($result !== null) {
135
- $object->$key = $result;
136
- }
137
- }
138
-
139
- // Process all public properties.
140
- $reflect = new ReflectionObject($this);
141
- $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);
142
- foreach ($props as $member) {
143
- $name = $member->getName();
144
- $result = $this->getSimpleValue($this->$name);
145
- if ($result !== null) {
146
- $name = $this->getMappedName($name);
147
- $object->$name = $result;
148
- }
149
- }
150
-
151
- return $object;
152
- }
153
-
154
- /**
155
- * Handle different types of values, primarily
156
- * other objects and map and array data types.
157
- */
158
- private function getSimpleValue($value)
159
- {
160
- if ($value instanceof Google_Model) {
161
- return $value->toSimpleObject();
162
- } else if (is_array($value)) {
163
- $return = array();
164
- foreach ($value as $key => $a_value) {
165
- $a_value = $this->getSimpleValue($a_value);
166
- if ($a_value !== null) {
167
- $key = $this->getMappedName($key);
168
- $return[$key] = $a_value;
169
- }
170
- }
171
- return $return;
172
- }
173
- return $value;
174
- }
175
-
176
- /**
177
- * If there is an internal name mapping, use that.
178
- */
179
- private function getMappedName($key)
180
- {
181
- if (isset($this->internal_gapi_mappings) &&
182
- isset($this->internal_gapi_mappings[$key])) {
183
- $key = $this->internal_gapi_mappings[$key];
184
- }
185
- return $key;
186
- }
187
-
188
- /**
189
- * Returns true only if the array is associative.
190
- * @param array $array
191
- * @return bool True if the array is associative.
192
- */
193
- protected function isAssociativeArray($array)
194
- {
195
- if (!is_array($array)) {
196
- return false;
197
- }
198
- $keys = array_keys($array);
199
- foreach ($keys as $key) {
200
- if (is_string($key)) {
201
- return true;
202
- }
203
- }
204
- return false;
205
- }
206
-
207
- /**
208
- * Given a variable name, discover its type.
209
- *
210
- * @param $name
211
- * @param $item
212
- * @return object The object from the item.
213
- */
214
- private function createObjectFromName($name, $item)
215
- {
216
- $type = $this->$name;
217
- return new $type($item);
218
- }
219
-
220
- /**
221
- * Verify if $obj is an array.
222
- * @throws Google_Exception Thrown if $obj isn't an array.
223
- * @param array $obj Items that should be validated.
224
- * @param string $method Method expecting an array as an argument.
225
- */
226
- public function assertIsArray($obj, $method)
227
- {
228
- if ($obj && !is_array($obj)) {
229
- throw new Google_Exception(
230
- "Incorrect parameter type passed to $method(). Expected an array."
231
- );
232
- }
233
- }
234
-
235
- public function offsetExists($offset)
236
- {
237
- return isset($this->$offset) || isset($this->modelData[$offset]);
238
- }
239
-
240
- public function offsetGet($offset)
241
- {
242
- return isset($this->$offset) ?
243
- $this->$offset :
244
- $this->__get($offset);
245
- }
246
-
247
- public function offsetSet($offset, $value)
248
- {
249
- if (property_exists($this, $offset)) {
250
- $this->$offset = $value;
251
- } else {
252
- $this->modelData[$offset] = $value;
253
- $this->processed[$offset] = true;
254
- }
255
- }
256
-
257
- public function offsetUnset($offset)
258
- {
259
- unset($this->modelData[$offset]);
260
- }
261
-
262
- protected function keyType($key)
263
- {
264
- return $key . "Type";
265
- }
266
-
267
- protected function dataType($key)
268
- {
269
- return $key . "DataType";
270
- }
271
-
272
- public function __isset($key)
273
- {
274
- return isset($this->modelData[$key]);
275
- }
276
-
277
- public function __unset($key)
278
- {
279
- unset($this->modelData[$key]);
280
- }
1
+ <?php
2
+
3
+ /*
4
+ * Copyright 2011 Google Inc.
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ /**
19
+ * This class defines attributes, valid values, and usage which is generated
20
+ * from a given json schema.
21
+ * http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5
22
+ *
23
+ * @author Chirag Shah <chirags@google.com>
24
+ *
25
+ */
26
+ class Google_Model implements ArrayAccess
27
+ {
28
+ protected $internal_gapi_mappings = array();
29
+ protected $modelData = array();
30
+ protected $processed = array();
31
+
32
+ /**
33
+ * Polymorphic - accepts a variable number of arguments dependent
34
+ * on the type of the model subclass.
35
+ */
36
+ final public function __construct()
37
+ {
38
+ if (func_num_args() == 1 && is_array(func_get_arg(0))) {
39
+ // Initialize the model with the array's contents.
40
+ $array = func_get_arg(0);
41
+ $this->mapTypes($array);
42
+ }
43
+ $this->gapiInit();
44
+ }
45
+
46
+ /**
47
+ * Getter that handles passthrough access to the data array, and lazy object creation.
48
+ *
49
+ * @param string $key
50
+ * Property name.
51
+ * @return mixed The value if any, or null.
52
+ */
53
+ public function __get($key)
54
+ {
55
+ $keyTypeName = $this->keyType($key);
56
+ $keyDataType = $this->dataType($key);
57
+ if (isset($this->$keyTypeName) && ! isset($this->processed[$key])) {
58
+ if (isset($this->modelData[$key])) {
59
+ $val = $this->modelData[$key];
60
+ } else
61
+ if (isset($this->$keyDataType) && ($this->$keyDataType == 'array' || $this->$keyDataType == 'map')) {
62
+ $val = array();
63
+ } else {
64
+ $val = null;
65
+ }
66
+ if ($this->isAssociativeArray($val)) {
67
+ if (isset($this->$keyDataType) && 'map' == $this->$keyDataType) {
68
+ foreach ($val as $arrayKey => $arrayItem) {
69
+ $this->modelData[$key][$arrayKey] = $this->createObjectFromName($keyTypeName, $arrayItem);
70
+ }
71
+ } else {
72
+ $this->modelData[$key] = $this->createObjectFromName($keyTypeName, $val);
73
+ }
74
+ } else
75
+ if (is_array($val)) {
76
+ $arrayObject = array();
77
+ foreach ($val as $arrayIndex => $arrayItem) {
78
+ $arrayObject[$arrayIndex] = $this->createObjectFromName($keyTypeName, $arrayItem);
79
+ }
80
+ $this->modelData[$key] = $arrayObject;
81
+ }
82
+ $this->processed[$key] = true;
83
+ }
84
+ return isset($this->modelData[$key]) ? $this->modelData[$key] : null;
85
+ }
86
+
87
+ /**
88
+ * Initialize this object's properties from an array.
89
+ *
90
+ * @param array $array
91
+ * Used to seed this object's properties.
92
+ * @return void
93
+ */
94
+ protected function mapTypes($array)
95
+ {
96
+ // Hard initilise simple types, lazy load more complex ones.
97
+ foreach ($array as $key => $val) {
98
+ if (! property_exists($this, $this->keyType($key)) && property_exists($this, $key)) {
99
+ $this->$key = $val;
100
+ unset($array[$key]);
101
+ } elseif (property_exists($this, $camelKey = Google_Utils::camelCase($key))) {
102
+ // This checks if property exists as camelCase, leaving it in array as snake_case
103
+ // in case of backwards compatibility issues.
104
+ $this->$camelKey = $val;
105
+ }
106
+ }
107
+ $this->modelData = $array;
108
+ }
109
+
110
+ /**
111
+ * Blank initialiser to be used in subclasses to do post-construction initialisation - this
112
+ * avoids the need for subclasses to have to implement the variadics handling in their
113
+ * constructors.
114
+ */
115
+ protected function gapiInit()
116
+ {
117
+ return;
118
+ }
119
+
120
+ /**
121
+ * Create a simplified object suitable for straightforward
122
+ * conversion to JSON.
123
+ * This is relatively expensive
124
+ * due to the usage of reflection, but shouldn't be called
125
+ * a whole lot, and is the most straightforward way to filter.
126
+ */
127
+ public function toSimpleObject()
128
+ {
129
+ $object = new stdClass();
130
+ // Process all other data.
131
+ foreach ($this->modelData as $key => $val) {
132
+ $result = $this->getSimpleValue($val);
133
+ if ($result !== null) {
134
+ $object->$key = $result;
135
+ }
136
+ }
137
+ // Process all public properties.
138
+ $reflect = new ReflectionObject($this);
139
+ $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);
140
+ foreach ($props as $member) {
141
+ $name = $member->getName();
142
+ $result = $this->getSimpleValue($this->$name);
143
+ if ($result !== null) {
144
+ $name = $this->getMappedName($name);
145
+ $object->$name = $result;
146
+ }
147
+ }
148
+ return $object;
149
+ }
150
+
151
+ /**
152
+ * Handle different types of values, primarily
153
+ * other objects and map and array data types.
154
+ */
155
+ private function getSimpleValue($value)
156
+ {
157
+ if ($value instanceof Google_Model) {
158
+ return $value->toSimpleObject();
159
+ } else
160
+ if (is_array($value)) {
161
+ $return = array();
162
+ foreach ($value as $key => $a_value) {
163
+ $a_value = $this->getSimpleValue($a_value);
164
+ if ($a_value !== null) {
165
+ $key = $this->getMappedName($key);
166
+ $return[$key] = $a_value;
167
+ }
168
+ }
169
+ return $return;
170
+ }
171
+ return $value;
172
+ }
173
+
174
+ /**
175
+ * If there is an internal name mapping, use that.
176
+ */
177
+ private function getMappedName($key)
178
+ {
179
+ if (isset($this->internal_gapi_mappings) && isset($this->internal_gapi_mappings[$key])) {
180
+ $key = $this->internal_gapi_mappings[$key];
181
+ }
182
+ return $key;
183
+ }