WD Google Analytics - Version 1.0.0

Version Description

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 WD Google Analytics
Version 1.0.0
Comparing to
See all releases

Version 1.0.0

Files changed (133) hide show
  1. admin/gawd_google_class.php +1578 -0
  2. admin/licensing.php +88 -0
  3. admin/pages/browser.php +10 -0
  4. admin/pages/custom_dimensions.php +82 -0
  5. admin/pages/custom_reports.php +6 -0
  6. admin/pages/dashboard.php +671 -0
  7. admin/pages/dashboard_menu.php +120 -0
  8. admin/pages/dashboard_widget.php +43 -0
  9. admin/pages/date.php +60 -0
  10. admin/pages/goals.php +261 -0
  11. admin/pages/location.php +11 -0
  12. admin/pages/overview.php +76 -0
  13. admin/pages/real_time.php +17 -0
  14. admin/pages/settings.php +546 -0
  15. admin/pages/tracking.php +253 -0
  16. admin/pages/uninstall.php +81 -0
  17. admin/pages/visitors.php +10 -0
  18. admin/post_page_view.php +62 -0
  19. admin/tracking.php +148 -0
  20. assets/ajax_loader.gif +0 -0
  21. assets/arrow-down.png +0 -0
  22. assets/arrow-up.png +0 -0
  23. assets/back_logo.png +0 -0
  24. assets/cleardot.gif +0 -0
  25. assets/closedot.png +0 -0
  26. assets/dashicons-migrate.png +0 -0
  27. assets/dashicons-update.png +0 -0
  28. assets/ecommerce-analityc.png +0 -0
  29. assets/freePages/alerts.png +0 -0
  30. assets/freePages/custom_dimensions.png +0 -0
  31. assets/freePages/custom_reports.png +0 -0
  32. assets/freePages/exclude_tracking.png +0 -0
  33. assets/freePages/pushovers.png +0 -0
  34. assets/icons-menu.png +0 -0
  35. assets/icons-menu1.png +0 -0
  36. assets/icons-settings.png +0 -0
  37. assets/icons.png +0 -0
  38. assets/infinity.png +0 -0
  39. assets/info.png +0 -0
  40. assets/lines.png +0 -0
  41. assets/main_icon.png +0 -0
  42. assets/menu.png +0 -0
  43. assets/uninstall-icon.png +0 -0
  44. assets/vs.png +0 -0
  45. assets/vs_rev.png +0 -0
  46. assets/web-dorado.png +0 -0
  47. featured/featured.php +171 -0
  48. featured/featured_themes.php +302 -0
  49. featured/images/best_magazine.jpg +0 -0
  50. featured/images/business_elite.jpg +0 -0
  51. featured/images/business_world.jpg +0 -0
  52. featured/images/catalog.png +0 -0
  53. featured/images/contact.builder.png +0 -0
  54. featured/images/contact.maker.png +0 -0
  55. featured/images/contacts.png +0 -0
  56. featured/images/down.png +0 -0
  57. featured/images/download_plugins.png +0 -0
  58. featured/images/download_themes.png +0 -0
  59. featured/images/events-wd.png +0 -0
  60. featured/images/exclusive.jpg +0 -0
  61. featured/images/expert.jpg +0 -0
  62. featured/images/facebook.png +0 -0
  63. featured/images/faq.png +0 -0
  64. featured/images/faq_wd.png +0 -0
  65. featured/images/flash.calendar.png +0 -0
  66. featured/images/fm-import.png +0 -0
  67. featured/images/folder.menu.png +0 -0
  68. featured/images/form.png +0 -0
  69. featured/images/google-maps.png +0 -0
  70. featured/images/instagram_feed.png +0 -0
  71. featured/images/magazine.jpg +0 -0
  72. featured/images/mottomag.jpg +0 -0
  73. featured/images/news_magazine.jpg +0 -0
  74. featured/images/photo-gallery.png +0 -0
  75. featured/images/player.png +0 -0
  76. featured/images/portfolio.png +0 -0
  77. featured/images/portfolio_gallery.jpg +0 -0
  78. featured/images/post-slider.png +0 -0
  79. featured/images/random.post.png +0 -0
  80. featured/images/sauron.jpg +0 -0
  81. featured/images/slider.png +0 -0
  82. featured/images/spider.calendar.png +0 -0
  83. featured/images/twittertools.png +0 -0
  84. featured/images/wedding.jpg +0 -0
  85. featured/images/wedding_style.jpg +0 -0
  86. featured/images/zoom.png +0 -0
  87. featured/style.css +205 -0
  88. gawd_class.php +2133 -0
  89. google-analytics-wd.php +37 -0
  90. google/Auth/Abstract.php +38 -0
  91. google/Auth/AppIdentity.php +120 -0
  92. google/Auth/AssertionCredentials.php +136 -0
  93. google/Auth/ComputeEngine.php +146 -0
  94. google/Auth/Exception.php +24 -0
  95. google/Auth/LoginTicket.php +71 -0
  96. google/Auth/OAuth2.php +646 -0
  97. google/Auth/Simple.php +63 -0
  98. google/Cache/Abstract.php +53 -0
  99. google/Cache/Apc.php +113 -0
  100. google/Cache/Exception.php +24 -0
  101. google/Cache/File.php +209 -0
  102. google/Cache/Memcache.php +184 -0
  103. google/Cache/Null.php +57 -0
  104. google/Client.php +715 -0
  105. google/Collection.php +101 -0
  106. google/Config.php +452 -0
  107. google/Exception.php +20 -0
  108. google/Http/Batch.php +145 -0
  109. google/Http/CacheParser.php +185 -0
  110. google/Http/MediaFileUpload.php +341 -0
  111. google/Http/REST.php +178 -0
  112. google/Http/Request.php +504 -0
  113. google/IO/Abstract.php +339 -0
  114. google/IO/Curl.php +182 -0
  115. google/IO/Exception.php +69 -0
  116. google/IO/Stream.php +243 -0
  117. google/IO/cacerts.pem +2183 -0
  118. google/Logger/Abstract.php +408 -0
  119. google/Logger/Exception.php +24 -0
  120. google/Logger/File.php +158 -0
  121. google/Logger/Null.php +43 -0
  122. google/Logger/Psr.php +93 -0
  123. google/Model.php +295 -0
  124. google/Service.php +56 -0
  125. google/Service/Analytics.php +9900 -0
  126. google/Service/Exception.php +105 -0
  127. google/Service/Oauth2.php +503 -0
  128. google/Service/Resource.php +255 -0
  129. google/Signer/Abstract.php +29 -0
  130. google/Signer/P12.php +94 -0
  131. google/Task/Exception.php +24 -0
  132. google/Task/Retryable.php +36 -0
  133. google/Task/Runner.php +242 -0
admin/gawd_google_class.php ADDED
@@ -0,0 +1,1578 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once(GAWD_DIR . '/google/autoload.php');
4
+
5
+ class GAWD_google_client {
6
+
7
+ private static $instance;
8
+ private $google_client;
9
+ public $analytics_member;
10
+ private $gawd_user_data;
11
+
12
+ protected function __construct() {
13
+ $this->gawd_user_data = get_option('gawd_user_data');
14
+ try{
15
+ $this->google_client = new Google_Client();
16
+ $this->set_google_client();
17
+ $this->analytics_member = new Google_Service_Analytics($this->google_client);
18
+
19
+ }catch(Google_Service_Exception $e){
20
+
21
+ return $e->getErrors()[0]["message"];
22
+ }catch(Exception $e){
23
+ return $e->getMessage();
24
+ }
25
+ }
26
+
27
+ /**
28
+ * Sets the google class member.
29
+ */
30
+ private function set_google_client() {
31
+
32
+ $access_token = $this->gawd_user_data['access_token'];
33
+ $this->google_client->setAccessToken($access_token);
34
+
35
+ if ($this->google_client->isAccessTokenExpired()) {
36
+ $refresh_token = $this->gawd_user_data['refresh_token'];
37
+
38
+ $this->google_client->setClientId(GAWD::get_instance()->get_project_client_id());
39
+ $this->google_client->setClientSecret(GAWD::get_instance()->get_project_client_secret());
40
+ $this->google_client->setRedirectUri(GAWD::get_instance()->redirect_uri);
41
+ // $this->google_client->setAuthConfigFile(GAWD_DIR . '/client_secrets.json');
42
+ $this->google_client->refreshToken($refresh_token);
43
+ }
44
+ }
45
+
46
+ public static function create_authentication_url() {
47
+ $client = new Google_Client();
48
+ // $client->setAuthConfigFile(GAWD_DIR . '/client_secrets.json');
49
+ $client->setClientId(GAWD::get_instance()->get_project_client_id());
50
+ $client->setClientSecret(GAWD::get_instance()->get_project_client_secret());
51
+ $client->setRedirectUri(GAWD::get_instance()->redirect_uri);
52
+ $client->addScope(array(Google_Service_Analytics::ANALYTICS_EDIT, Google_Service_Analytics::ANALYTICS_READONLY));
53
+ $client->setApprovalPrompt('force');
54
+ $client->setAccessType('offline');
55
+ return "'" . $client->createAuthUrl() . "'";
56
+ }
57
+
58
+ public static function authenticate($code) {
59
+
60
+ $client = new Google_Client();
61
+ // $client->setAuthConfigFile(GAWD_DIR . '/client_secrets.json');
62
+ $client->setClientId(GAWD::get_instance()->get_project_client_id());
63
+ $client->setClientSecret(GAWD::get_instance()->get_project_client_secret());
64
+ $client->setRedirectUri(GAWD::get_instance()->redirect_uri);
65
+ try {
66
+ $client->authenticate($code);
67
+
68
+ if ($client->isAccessTokenExpired()) {
69
+ return false;
70
+ }
71
+ else {
72
+ $access_token = $client->getAccessToken();
73
+ $refresh_token = $client->getRefreshToken();
74
+ update_option('gawd_user_data', array(
75
+ 'access_token' => $access_token,
76
+ 'refresh_token' => $refresh_token
77
+ )
78
+ );
79
+
80
+ $gawd_client = self::get_instance();
81
+ delete_transient('gawd_user_profiles');
82
+ $profiles = $gawd_client->get_profiles();
83
+
84
+ if ($profiles instanceof Google_Service_Exception) {
85
+
86
+ delete_option('gawd_user_data');
87
+
88
+ return $profiles->getErrors()[0]["message"];
89
+ }
90
+
91
+
92
+ update_option('gawd_user_data', array(
93
+ 'access_token' => $access_token,
94
+ 'refresh_token' => $refresh_token,
95
+ 'gawd_profiles' => $profiles,
96
+ )
97
+ );
98
+ return true;
99
+ }
100
+ } catch (Google_Service_Exception $e) {
101
+ delete_option('gawd_user_data');
102
+ return $e->getErrors()[0]["message"];
103
+ } catch (Exception $e) {
104
+ return $e->getMessage();
105
+ }
106
+ }
107
+
108
+ public function get_management_accounts() {
109
+ $accounts_light = array();
110
+ try{
111
+ $accounts = $this->analytics_member->management_accounts->listManagementAccounts()->getItems();
112
+
113
+ foreach ($accounts as $account) {
114
+ $edit_flag = FALSE;
115
+ $permissions = $account['modelData']['permissions']['effective'];
116
+ foreach ($permissions as $permission) {
117
+ if ($permission == 'EDIT') {
118
+ $edit_flag = TRUE;
119
+ }
120
+ }
121
+ $accounts_light[] = array(
122
+ 'name' => $account['name'],
123
+ 'id' => $account['id'],
124
+ 'edit_permissions' => $edit_flag
125
+ );
126
+ /*if ($edit_flag == TRUE) {
127
+ $accounts_light[] = array(
128
+ 'name' => $account['name'],
129
+ 'id' => $account['id']
130
+ );
131
+ }*/
132
+ }
133
+ }catch (Google_Service_Exception $e) {
134
+ //return $e->getErrors()[0]["message"];
135
+ } catch (Exception $e) {
136
+ //return $e->getMessage();
137
+ }
138
+ return $accounts_light;
139
+ }
140
+
141
+ public function property_exists() {
142
+ try{
143
+ $web_properties = $this->analytics_member->management_webproperties->listManagementWebproperties('~all')->getItems();
144
+ }catch(Google_Service_Exception $e){
145
+ return 'no_matches';
146
+
147
+ }catch(Exception $e){
148
+ return 'no_matches';
149
+ }
150
+ $exact_properties = array();
151
+ $site_url = get_site_url() . '/';
152
+
153
+ foreach ($web_properties as $web_property) {
154
+ $current_url = $web_property['websiteUrl'];
155
+ if (($current_url == $site_url) || (($current_url . '/') == $site_url)) {
156
+ $exact_properties[] = $web_property;
157
+ }
158
+ }
159
+ if (!empty($exact_properties)) {
160
+ return $exact_properties;
161
+ } else {
162
+ return 'no_matches';
163
+ }
164
+ }
165
+
166
+ public function get_default_profiles() {
167
+ $gawd_user_data = get_option('gawd_user_data');
168
+ $accountId = $this->get_default_accountId();
169
+ $webPropertyId = $this->get_default_webPropertyId();
170
+ $webProperty = $this->analytics_member->management_webproperties->get($accountId, $webPropertyId);
171
+ $webPropertyName = $webProperty['name'];
172
+ $profiles = $this->analytics_member->management_profiles->listManagementProfiles($accountId, $webPropertyId)->getItems();
173
+ $profiles_light = array();
174
+ foreach ($profiles as $profile) {
175
+ $profiles_light[] = array(
176
+ 'id' => $profile['id'],
177
+ 'name' => $profile['name'],
178
+ 'webPropertyName' => $webPropertyName
179
+ );
180
+ }
181
+ return $profiles_light;
182
+ }
183
+
184
+ public function add_webproperty($accountId, $name) {
185
+
186
+ $analytics = $this->analytics_member;
187
+ $websiteUrl = get_site_url();
188
+ try {
189
+ $property = new Google_Service_Analytics_Webproperty();
190
+ $property->setName($name);
191
+ $property->setWebsiteUrl($websiteUrl);
192
+ $analytics->management_webproperties->insert($accountId, $property);
193
+ } catch (apiServiceException $e) {
194
+ print 'There was an Analytics API service error '
195
+ . $e->getCode() . ':' . $e->getMessage();
196
+ } catch (apiException $e) {
197
+ print 'There was a general API error '
198
+ . $e->getCode() . ':' . $e->getMessage();
199
+ }
200
+ catch (Google_Service_Exception $e) {
201
+ return 'There was a general API error '
202
+ . $e->getCode() . ':' . $e->getMessage();
203
+ }catch (Exception $e) {
204
+ echo $e->getCode() . ':' . $e->getMessage();
205
+ }
206
+
207
+ $web_properties = $this->analytics_member->management_webproperties->listManagementWebproperties($accountId)->getItems();
208
+
209
+ foreach ($web_properties as $web_property) {
210
+ if ($web_property['name'] == $name) {
211
+ $profile = new Google_Service_Analytics_Profile();
212
+ $profile->setName('All Web Site Data');
213
+ try {
214
+ $analytics->management_profiles->insert($accountId, $web_property['id'], $profile);
215
+ } catch (apiServiceException $e) {
216
+ print 'There was an Analytics API service error '
217
+ . $e->getCode() . ':' . $e->getMessage();
218
+ } catch (apiException $e) {
219
+ print 'There was a general API error '
220
+ . $e->getCode() . ':' . $e->getMessage();
221
+ }
222
+ }
223
+ }
224
+ }
225
+
226
+ /**
227
+ * Get all the managment profiles of the authenticated user.
228
+ *
229
+ * @return array
230
+ */
231
+ public function get_profiles() {
232
+ $profiles_light = get_transient('gawd_user_profiles') ? get_transient('gawd_user_profiles') : '';
233
+ if ($profiles_light && $profiles_light != ''){
234
+ return $profiles_light;
235
+ }
236
+ $profiles_light = array();
237
+ $gawd_user_data = get_option('gawd_user_data');
238
+ try{
239
+
240
+ $web_properties = $this->analytics_member->management_webproperties->listManagementWebproperties('~all')->getItems();
241
+ $profiles = $this->analytics_member->management_profiles->listManagementProfiles('~all', '~all')->getItems();
242
+ $profiles_count = count($profiles);
243
+ $web_properties_count = count($web_properties);
244
+ for ($i = 0; $i < $web_properties_count; $i++) {
245
+ for ($j = 0; $j < $profiles_count; $j++) {
246
+ if ($web_properties[$i]['id'] == $profiles[$j]['webPropertyId']) {
247
+ $profiles_light[$web_properties[$i]['name']][] = array(
248
+ 'id' => $profiles[$j]['id'],
249
+ 'name' => $profiles[$j]['name'],
250
+ 'webPropertyId' => $profiles[$j]['webPropertyId'],
251
+ 'websiteUrl' => $profiles[$j]['websiteUrl'],
252
+ 'accountId' => $profiles[$j]['accountId']
253
+ );
254
+ }
255
+ }
256
+ }
257
+ if (!isset($gawd_user_data['gawd_id']) || $gawd_user_data['gawd_id'] == '' || $gawd_user_data['gawd_id'] == NULL) {
258
+ if (!empty($profiles_light)) {
259
+ $first_profile = reset($profiles_light)[0];
260
+ $gawd_user_data['gawd_id'] = $first_profile['id'];
261
+ $gawd_user_data['webPropertyId'] = $first_profile['webPropertyId'];
262
+ $gawd_user_data['accountId'] = $first_profile['accountId'];
263
+ $gawd_user_data['web_property_name'] = $web_properties[0]['name'];
264
+ }
265
+ }
266
+
267
+ $gawd_user_data['gawd_profiles'] = $profiles_light;
268
+ update_option('gawd_user_data', $gawd_user_data);
269
+ set_transient('gawd_user_profiles',$profiles_light, 60);
270
+ return $profiles_light;
271
+ }catch(Google_Service_Exception $e){
272
+ return $e;
273
+ }catch(Exception $e){
274
+ return $e;
275
+ }
276
+ }
277
+
278
+ public function get_custom_dimensions($default = '') {
279
+ $this->gawd_user_data = get_option('gawd_user_data');
280
+ if ($default == 'default') {
281
+ $webPropertyId = $this->get_default_webPropertyId();
282
+ $accountId = $this->get_default_accountId();
283
+ }
284
+ else {
285
+ $webPropertyId = $this->get_profile_webPropertyId();
286
+ $accountId = $this->get_profile_accountId();
287
+ $transient = get_transient('gawd-custom-dimensions-' . $webPropertyId);
288
+ if ($transient) {
289
+ if ($transient != 'no_custom_dimensions_exist') {
290
+ return json_decode($transient, true);
291
+ } else {
292
+ return $transient;
293
+ }
294
+ }
295
+ }
296
+
297
+ $all_dimensions = $this->analytics_member->management_customDimensions->listManagementCustomDimensions($accountId, $webPropertyId)->getItems();
298
+ if (0 == sizeof($all_dimensions)) {
299
+ if ($default == 'default') {
300
+ update_option('gawd_custom_dimensions', "no_custom_dimensions_exist");
301
+ }
302
+ set_transient('gawd-custom-dimensions-' . $webPropertyId, "no_custom_dimensions_exist", 12 * HOUR_IN_SECONDS);
303
+ return "no_custom_dimensions_exist";
304
+ }
305
+ else {
306
+ foreach ($all_dimensions as $dimension) {
307
+ $dimensions_light[] = array(
308
+ 'name' => $dimension['name'],
309
+ 'id' => $dimension['id']
310
+ );
311
+ }
312
+ $supported_dimensions = array("Logged in", "Post type", "Author", "Category", "Tags", "Published Month", "Published Year");
313
+ $dimensions = array();
314
+ foreach ($dimensions_light as $dimension) {
315
+ foreach ($supported_dimensions as $supported_dimension) {
316
+ if (trim(strtolower($dimension['name'])) == strtolower($supported_dimension)) {
317
+ $dimension['name'] = $supported_dimension;
318
+ $dimension['id'] = substr($dimension['id'], -1);
319
+ $dimensions[] = $dimension;
320
+ }
321
+ }
322
+ }
323
+ if ($default == 'default') {
324
+ update_option('gawd_custom_dimensions', $dimensions);
325
+ }
326
+ set_transient('gawd-custom-dimensions-' . $webPropertyId, json_encode($dimensions_light), 12 * HOUR_IN_SECONDS);
327
+ return $dimensions_light;
328
+ }
329
+ }
330
+
331
+ public function get_custom_dimensions_tracking() {
332
+ $all_dimensions = get_option('gawd_custom_dimensions');
333
+ if ($all_dimensions) {
334
+ return $all_dimensions;
335
+ }
336
+ $all_dimensions = $this->get_custom_dimensions('default');
337
+ if ($all_dimensions == 'no_custom_dimensions_exist') {
338
+ return 'no_custom_dimensions_exist';
339
+ }
340
+ $supported_dimensions = array("Logged in", "Post type", "Author", "Category", "Tags", "Published Month", "Published Year");
341
+ $dimensions = array();
342
+ foreach ($all_dimensions as $dimension) {
343
+ foreach ($supported_dimensions as $supported_dimension) {
344
+ if (trim(strtolower($dimension['name'])) == strtolower($supported_dimension)) {
345
+ $dimension['id'] = substr($dimension['id'], -1);
346
+ $dimension['name'] = $supported_dimension;
347
+ $dimensions[] = $dimension;
348
+ }
349
+ }
350
+ }
351
+ update_option('gawd_custom_dimensions', $dimensions);
352
+ if ($dimensions) {
353
+ return $dimensions;
354
+ } else {
355
+ return "no_custom_dimensions_exist";
356
+ }
357
+ }
358
+
359
+ public static function gawd_cd_logged_in() {
360
+ $value = var_export(is_user_logged_in(), true);
361
+ $value = $value == 'true' ? 'yes' : 'no';
362
+ return $value;
363
+ }
364
+
365
+ public static function gawd_cd_post_type() {
366
+ if (is_singular()) {
367
+ $post_type = get_post_type(get_the_ID());
368
+
369
+ if ($post_type) {
370
+ return $post_type;
371
+ }
372
+ }
373
+ }
374
+
375
+ public static function gawd_cd_author() {
376
+ if (is_singular()) {
377
+ if (have_posts()) {
378
+ while (have_posts()) {
379
+ the_post();
380
+ }
381
+ }
382
+ $name = get_the_author_meta('user_nicename');
383
+ $value = trim($name);
384
+ return $value;
385
+ }
386
+ }
387
+
388
+ public static function gawd_cd_category() {
389
+ if (is_single()) {
390
+ $categories = get_the_category(get_the_ID());
391
+
392
+ if ($categories) {
393
+ foreach ($categories as $category) {
394
+ $category_names[] = $category->slug;
395
+ }
396
+
397
+ return implode(',', $category_names);
398
+ }
399
+ }
400
+ }
401
+
402
+ public static function gawd_cd_tags() {
403
+ if (is_single()) {
404
+ $tag_names = 'untagged';
405
+
406
+ $tags = get_the_tags(get_the_ID());
407
+
408
+ if ($tags) {
409
+ $tag_names = implode(',', wp_list_pluck($tags, 'name'));
410
+ }
411
+
412
+ return $tag_names;
413
+ }
414
+ }
415
+
416
+
417
+ public static function gawd_cd_published_month() {
418
+ if (is_singular()) {
419
+ return get_the_date('M-Y');
420
+ }
421
+ }
422
+ public static function gawd_cd_published_year() {
423
+ if (is_singular()) {
424
+ return get_the_date('Y');
425
+ }
426
+ }
427
+
428
+ public function get_management_filters() {
429
+ $analytics = $this->analytics_member;
430
+ $this->gawd_user_data = get_option('gawd_user_data');
431
+ $accountId = $this->get_profile_accountId();
432
+ $profileId = $this->get_profile_id();
433
+ $webPropertyId = $this->get_profile_webPropertyId();
434
+
435
+ try {
436
+ $view_filters = $analytics->management_profileFilterLinks->listManagementProfileFilterLinks($accountId, $webPropertyId, $profileId);
437
+ $filters = $view_filters->getItems();
438
+ foreach ($filters as $filter) {
439
+ $filter_info = $analytics->management_filters->get($accountId,$filter['modelData']['filterRef']['id']);
440
+ $all_filters[] = array(
441
+ 'name' => $filter['modelData']['filterRef']['name'],
442
+ 'id' => $filter['modelData']['filterRef']['id'],
443
+ 'type' => $filter_info['excludeDetails']['field'],
444
+ 'value' => $filter_info['excludeDetails']['expressionValue'],
445
+ 'view' => $filter['modelData']['profileRef']['name']
446
+ );
447
+ }
448
+ if (isset($all_filters)) {
449
+ return $all_filters;
450
+ }
451
+ } catch (Exception $e) {
452
+ $error = array('error_message' => 'Error');
453
+ if (strpos($e->getMessage(), 'User does not have sufficient permissions for this ')) {
454
+ $error['error_message'] = 'User does not have sufficient permissions for this profile';
455
+ }
456
+ return json_encode($error);
457
+ }
458
+ }
459
+
460
+ public function get_management_goals() {
461
+ $this->gawd_user_data = get_option('gawd_user_data');
462
+ $profileId = $this->get_profile_id();
463
+ $accountId = $this->get_profile_accountId();
464
+ $webPropertyId = $this->get_profile_webPropertyId();
465
+ $goals = array();
466
+ try {
467
+ $goals = $this->analytics_member->management_goals->listManagementGoals($accountId, $webPropertyId, $profileId)->getItems();
468
+ } catch (Exception $e) {
469
+
470
+ }
471
+ if (0 == sizeof($goals)) {
472
+ return "no_goals_exist";
473
+ } else {
474
+ foreach ($goals as $goal) {
475
+ $goals_light[] = array(
476
+ 'name' => $goal['name'],
477
+ 'id' => $goal['id']
478
+ );
479
+ }
480
+ return $goals_light;
481
+ }
482
+ }
483
+
484
+ public function get_default_goals() {
485
+ $this->gawd_user_data = get_option('gawd_user_data');
486
+ $accountId = $this->get_default_accountId();
487
+ $webPropertyId = $this->get_default_webPropertyId();
488
+ $goals = array();
489
+ try {
490
+ $goals = $this->analytics_member->management_goals->listManagementGoals($accountId, $webPropertyId, '~all')->getItems();
491
+ } catch (Exception $e) {
492
+
493
+ }
494
+ if (0 == sizeof($goals)) {
495
+ return "no_goals_exist";
496
+ } else {
497
+ $profiles = array();
498
+ foreach ($goals as $goal) {
499
+ $flag = false;
500
+ foreach ($profiles as $profile) {
501
+ if ($profile == $goal['profileId']) {
502
+ $flag = true;
503
+ }
504
+ }
505
+ if ($flag == false) {
506
+ $profiles[] = $goal['profileId'];
507
+ }
508
+ }
509
+ $goals_light = array();
510
+ $caseSensitive = '';
511
+ foreach ($profiles as $profile) {
512
+ foreach ($goals as $goal) {
513
+ if ($goal['profileId'] == $profile) {
514
+ if($goal['type'] == 'URL_DESTINATION'){
515
+ $type = 'Destination';
516
+ if($goal["modelData"]['urlDestinationDetails']['matchType'] == 'EXACT'){
517
+ $match_type = 'Equals';
518
+ }
519
+ elseif($goal["modelData"]['urlDestinationDetails']['matchType'] == 'HEAD'){
520
+ $match_type = 'Begin with';
521
+ }
522
+ else{
523
+ $match_type = 'Regular expresion';
524
+ }
525
+ $value = $goal["modelData"]['urlDestinationDetails']['url'];
526
+ $caseSensitive = $goal["modelData"]['urlDestinationDetails']['caseSensitive'];
527
+ }
528
+ elseif($goal['type'] == 'VISIT_TIME_ON_SITE'){
529
+ $type = 'Duration';
530
+ if($goal["modelData"]['visitTimeOnSiteDetails']['comparisonType'] == 'GREATER_THAN'){
531
+ $match_type = 'Greater than';
532
+ }
533
+ $value = $goal["modelData"]['visitTimeOnSiteDetails']['comparisonValue'];
534
+ $hours = strlen(floor($value / 3600)) < 2 ? '0' . floor($value / 3600) : floor($value / 3600);
535
+ $mins = strlen(floor($value / 60 % 60)) < 2 ? '0' . floor($value / 60 % 60) : floor($value / 60 % 60);
536
+ $secs = strlen(floor($value % 60)) < 2 ? '0' . floor($value % 60) : floor($value % 60);
537
+ $value = $hours.':'.$mins.':'.$secs;
538
+ }
539
+ else{
540
+ $type = 'Pages/Screens per session';
541
+ if($goal["modelData"]['visitNumPagesDetails']['comparisonType'] == 'GREATER_THAN'){
542
+ $match_type = 'Greater than';
543
+ }
544
+ $value = $goal["modelData"]['visitNumPagesDetails']['comparisonValue'];
545
+ }
546
+
547
+ $goals_light[$profile][] = array(
548
+ 'name' => $goal['name'],
549
+ 'id' => $goal['id'],
550
+ 'type' => $type,
551
+ 'match_type' => $match_type,
552
+ 'profileID' => $goal['profileId'],
553
+ 'caseSensitive' => $caseSensitive,
554
+ 'value' => $value,
555
+ );
556
+ }
557
+ }
558
+ }
559
+ return $goals_light;
560
+ }
561
+ }
562
+
563
+ public function add_custom_dimension($name, $id) {
564
+
565
+ $custom_dimension = new Google_Service_Analytics_CustomDimension();
566
+ $custom_dimension->setId($id);
567
+ $custom_dimension->setActive(TRUE);
568
+ $custom_dimension->setScope('Hit');
569
+ $custom_dimension->setName($name);
570
+
571
+ $accountId = $this->get_default_accountId();
572
+ $webPropertyId = $this->get_default_webPropertyId();
573
+ $analytics = $this->analytics_member;
574
+ delete_transient('gawd-custom-dimensions-' . $webPropertyId);
575
+ try {
576
+ $analytics->management_customDimensions->insert($accountId, $webPropertyId, $custom_dimension);
577
+ } catch (apiServiceException $e) {
578
+ print 'There was an Analytics API service error '
579
+ . $e->getCode() . ':' . $e->getMessage();
580
+ } catch (apiException $e) {
581
+ print 'There was a general API error '
582
+ . $e->getCode() . ':' . $e->getMessage();
583
+ }
584
+ }
585
+
586
+ public function add_goal($gawd_goal_profile, $goal_max_id, $gawd_goal_type, $gawd_goal_name, $gawd_goal_comparison = "GREATER_THAN", $gawd_goal_value, $url_case_sensitve = 'false') {
587
+ $this->gawd_user_data = get_option('gawd_user_data');
588
+ /* This request creates a new Goal. */
589
+ // Construct the body of the request.
590
+ $goal = new Google_Service_Analytics_Goal();
591
+ $goal->setId($goal_max_id); //ID
592
+ $goal->setActive(True); //ACTIVE/INACTIVE
593
+ $goal->setType($gawd_goal_type); //URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT
594
+ $goal->setName($gawd_goal_name); //NAME
595
+ // Construct the time on site details.
596
+ if ($gawd_goal_type == 'VISIT_TIME_ON_SITE') {
597
+ $details = new Google_Service_Analytics_GoalVisitTimeOnSiteDetails();
598
+ $details->setComparisonType($gawd_goal_comparison); //VISIT_TIME_ON_SITE -------- LESS_THAN/ GREATER_THAN------
599
+ $details->setComparisonValue($gawd_goal_value);
600
+ $goal->setVisitTimeOnSiteDetails($details);
601
+ } elseif ($gawd_goal_type == 'URL_DESTINATION') {
602
+ if($url_case_sensitve != ''){
603
+ $url_case_sensitve = true;
604
+ }
605
+ $details = new Google_Service_Analytics_GoalUrlDestinationDetails();
606
+ $details->setCaseSensitive($url_case_sensitve);
607
+ $details->setFirstStepRequired('false');
608
+ $details->setMatchType($gawd_goal_comparison);
609
+ $details->setUrl($gawd_goal_value);
610
+ $goal->setUrlDestinationDetails($details);
611
+ } elseif ($gawd_goal_type == 'VISIT_NUM_PAGES') {
612
+ $details = new Google_Service_Analytics_GoalVisitNumPagesDetails();
613
+ $details->setComparisonType($gawd_goal_comparison); //VISIT_TIME_ON_SITE -------- LESS_THAN/ GREATER_THAN------
614
+ $details->setComparisonValue($gawd_goal_value);
615
+ $goal->setVisitNumPagesDetails($details);
616
+ } elseif ($gawd_goal_type == 'EVENT') {
617
+ /* $details = new Google_Service_Analytics_GoalEventDetails();
618
+ $details = new Google_Service_Analytics_GoalEventDetailsEventConditions();
619
+ $detailssetComparisonType
620
+ //$details->setEventConditions($gawd_goal_comparison);//VISIT_TIME_ON_SITE -------- LESS_THAN/ GREATER_THAN------
621
+ //$details->setUseEventValue($gawd_goal_value); */
622
+ $goal->setEventDetails($details);
623
+ }
624
+
625
+ //Set the time on site details.
626
+ $this->analytics_member;
627
+ $this->gawd_user_data = get_option('gawd_user_data');
628
+ $accountId = $this->get_default_accountId();
629
+ $webPropertyId = $this->get_default_webPropertyId();
630
+ $profileId = $gawd_goal_profile;
631
+ $analytics = $this->analytics_member;
632
+ try {
633
+ $analytics->management_goals->insert($accountId, $webPropertyId, $profileId, $goal);
634
+ } catch (apiServiceException $e) {
635
+ print 'There was an Analytics API service error '
636
+ . $e->getCode() . ':' . $e->getMessage();
637
+ } catch (apiException $e) {
638
+ print 'There was a general API error '
639
+ . $e->getCode() . ':' . $e->getMessage();
640
+ }
641
+ catch (Exception $e) {
642
+ $error = array('error_message' => $e->getMessage());
643
+ if (strpos($e->getMessage(), 'User does not have permission to perform this operation')) {
644
+ $error['error_message'] = 'User does not have permission to perform this operation';
645
+ }
646
+ return json_encode($error);
647
+ }
648
+ }
649
+
650
+ public function add_filter($name, $type, $value) {
651
+ $this->gawd_user_data = get_option('gawd_user_data');
652
+ $accountId = $this->get_profile_accountId();
653
+ $profileId = $this->get_profile_id();
654
+ $webPropertyId = $this->get_profile_webPropertyId();
655
+ $analytics = $this->analytics_member;
656
+ $condition = $type == 'GEO_IP_ADDRESS' ? 'EQUAL' : 'MATCHES';
657
+ /**
658
+ * Note: This code assumes you have an authorized Analytics service object.
659
+ * See the Filters Developer Guide for details.
660
+ */
661
+ /**
662
+ * This request creates a new filter.
663
+ */
664
+ try {
665
+ // Construct the filter expression object.
666
+ $details = new Google_Service_Analytics_FilterExpression();
667
+ $details->setField($type);
668
+ $details->setMatchType($type);
669
+ $details->setExpressionValue($value);
670
+ $details->setCaseSensitive(false);
671
+ // Construct the filter and set the details.
672
+ $filter = new Google_Service_Analytics_Filter();
673
+ $filter->setName($name);
674
+ $filter->setType("EXCLUDE");
675
+ $filter->setExcludeDetails($details);
676
+
677
+ $insertedFilter = $analytics->management_filters->insert($accountId, $filter);
678
+ $analyticsFilterRef = new Google_Service_Analytics_FilterRef();
679
+ $analyticsFilterRef->setId($insertedFilter->id);
680
+ $filterData = new Google_Service_Analytics_ProfileFilterLink();
681
+ $filterData->setFilterRef($analyticsFilterRef );
682
+ // Add view to inserted filter
683
+ $res = $analytics->management_profileFilterLinks->insert($accountId, $webPropertyId, $profileId, $filterData);
684
+
685
+ } catch (apiServiceException $e) {
686
+ print 'There was an Analytics API service error '
687
+ . $e->getCode() . ':' . $e->getMessage();
688
+ } catch (apiException $e) {
689
+ print 'There was a general API error '
690
+ . $e->getCode() . ':' . $e->getMessage();
691
+ } catch (Exception $e) {
692
+ echo '<script>window.location.href="' . admin_url() . 'admin.php?page=gawd_settings&errorMsg=1#gawd_filters_tab";</script>';
693
+ }
694
+ }
695
+
696
+ public function get_country_data($metric, $dimension, $start_date, $end_date, $country_filter, $geo_type, $timezone) {
697
+ $profileId = $this->get_profile_id();
698
+ $analytics = $this->analytics_member;
699
+ $metric = 'ga:users,ga:sessions,ga:percentNewSessions,ga:bounceRate,ga:pageviews,ga:avgSessionDuration';
700
+
701
+ try {
702
+ $results = $analytics->data_ga->get(
703
+ 'ga:' . $profileId, $start_date, $end_date, $metric, array(
704
+ 'dimensions' => 'ga:' . $dimension,
705
+ 'sort' => 'ga:' . $dimension,
706
+ 'filters' => 'ga:' . $geo_type . '==' . $country_filter
707
+ )
708
+ );
709
+ } catch (Exception $e) {
710
+ $error = array('error_message' => 'Error');
711
+ if (strpos($e->getMessage(), 'User does not have sufficient permissions for this profile')) {
712
+ $error['error_message'] = 'User does not have sufficient permissions for this profile';
713
+ }
714
+ return json_encode($error);
715
+ }
716
+ $rows = $results->getRows();
717
+ $metric = explode(',', $metric);
718
+ if ($rows) {
719
+ $data_sum = array();
720
+ foreach($results->getTotalsForAllResults() as $key => $value){
721
+ $data_sum[trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($key,3))))] = $value;
722
+ }
723
+ $j = 0;
724
+ foreach ($rows as $row) {
725
+ $data[$j] = array(
726
+ ucfirst($dimension) => $row[0]
727
+ );
728
+ $data[$j]['No'] = floatval($j + 1);
729
+ for ($i = 0; $i < count($metric); $i++) {
730
+ $data[$j][trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i], 3))))] = floatval($row[$i + 1]);
731
+ }
732
+ $j++;
733
+ }
734
+ } else {
735
+ $empty[0] = array(
736
+ trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension))) => 0
737
+ );
738
+ $empty[0]['No'] = 1;
739
+ for ($i = 0; $i < count($metric); $i++) {
740
+ $empty[0][trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i], 3))))] = 0;
741
+ }
742
+
743
+ return json_encode($empty);
744
+ }
745
+ $expiration = strtotime(date("Y-m-d 23:59:59")) - strtotime(gmdate("Y-m-d H:i:s") . '+' . $timezone . ' hours');
746
+ $result = $data;
747
+ if ($data_sum != '') {
748
+ $result = array('data_sum' => $data_sum, 'chart_data' => $data);
749
+ }
750
+ set_transient( 'gawd-country-'.$profileId.'-'.$country_filter.'-'.$start_date.'-'.$end_date, json_encode($result), $expiration );
751
+ return json_encode($result);
752
+ }
753
+
754
+ public function get_post_page_data($metric, $dimension, $start_date, $end_date, $filter, $timezone, $chart) {
755
+ $profileId = $this->get_profile_id();
756
+ $analytics = $this->analytics_member;
757
+ $metric = 'ga:users,ga:sessions,ga:percentNewSessions,ga:bounceRate,ga:pageviews,ga:avgSessionDuration,ga:pageviewsPerSession';
758
+ if($chart == 'pie'){
759
+ $diff = date_diff(date_create($start_date),date_create($end_date));
760
+ if(intval($diff->format("%a")) > 7){
761
+ $dimension = 'week';
762
+ }
763
+ if(intval($diff->format("%a")) > 60){
764
+ $dimension = 'month';
765
+ }
766
+ }
767
+ // Get the results from the Core Reporting API and print the results.
768
+ // Calls the Core Reporting API and queries for the number of sessions
769
+ // for the last seven days.
770
+
771
+ $filter_type = 'pagePath';
772
+ $results = $analytics->data_ga->get(
773
+ 'ga:' . $profileId, $start_date, $end_date, $metric, array(
774
+ 'dimensions' => 'ga:' . $dimension,
775
+ 'sort' => 'ga:' . $dimension,
776
+ 'filters' => 'ga:' . $filter_type . '=~' . $filter
777
+ )
778
+ );
779
+ $rows = $results->getRows();
780
+ $metric = explode(',', $metric);
781
+ if ($rows) {
782
+ $j = 0;
783
+ $data_sum = array();
784
+ /*if ($dimension == 'week') {
785
+ $date = $start_date;
786
+ $_end_date = date("M d,Y", strtotime('next Saturday ' . $date));
787
+ if (strtotime($end_date) > strtotime(date('Y-m-d'))) {
788
+ $end_date = date("M d,Y");
789
+ }
790
+ foreach ($rows as $row) {
791
+ if (strtotime($_end_date) <= strtotime(date('Y-m-d'))) {
792
+
793
+ $dimension_value = date("M d,Y", strtotime($date)) . '-' . $_end_date;
794
+ // echo $date;
795
+ }
796
+ else {
797
+
798
+ if (strtotime($date) != strtotime($end_date)) {
799
+ $dimension_value = date("M d,Y", strtotime($date)) . '-' . $_end_date;
800
+ } else {
801
+ break;
802
+ }
803
+ }
804
+ $data[] = array(trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension))) => $dimension_value);
805
+ $data[$j]['No'] = floatval($j + 1);
806
+ for ($i = 0; $i < count($metric); $i++) {
807
+ $val = $i + 1;
808
+ $metric_val = floatval($row[$val]);
809
+ if(substr($metric[$i], 3) == 'bounceRate'){
810
+ $metric_val = $metric_val;
811
+ }
812
+ $data[$j][trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i], 3))))] = $metric_val;
813
+ }
814
+ $j++;
815
+ $date = date("M d,Y", strtotime('next Sunday ' . $_end_date));
816
+ $_end_date = date("M d,Y", strtotime('next Saturday ' . $date));
817
+ if (isset($_end_date) && (strtotime($_end_date) > strtotime($end_date))) {
818
+ $_end_date = $end_date;
819
+ }
820
+ }
821
+ }*/
822
+ if ($dimension == 'week' || $dimension == 'month') {
823
+ $date = $start_date;
824
+ if ($dimension == 'week') {
825
+ $_end_date = date("l", strtotime($date)) == 'Saturday' ? date("M d,Y", strtotime($date)) : date("M d,Y", strtotime('next Saturday ' . $date));
826
+ }
827
+ elseif ($dimension == 'month') {
828
+ $_end_date = date("M t,Y", strtotime($date));
829
+ if(strtotime($_end_date) > strtotime(date('Y-m-d'))){
830
+ $_end_date = date("M d,Y",strtotime('-1 day ' . date('Y-m-d')));
831
+ }
832
+ }
833
+ if (strtotime($end_date) > strtotime(date('Y-m-d'))) {
834
+ $end_date = date("M d,Y");
835
+ }
836
+ foreach ($rows as $row) {
837
+ if ($dimension == 'hour') {
838
+ $dimension_value = date("M d,Y", strtotime($row[0])) . ' ' . $row[1] . ':00';
839
+ }
840
+ else {
841
+ if (strtotime($_end_date) <= strtotime(date('Y-m-d'))) {
842
+
843
+ $dimension_value = date("M d,Y", strtotime($date)) . '-' . $_end_date;
844
+ // echo $date;
845
+ } else {
846
+ if ($dimension == 'month') {
847
+ //continue;
848
+ }
849
+ if (strtotime($date) != strtotime($end_date) ) {
850
+ $dimension_value = date("M d,Y", strtotime($date)) . '-' . $_end_date;
851
+ } else {
852
+ break;
853
+ }
854
+ }
855
+ }
856
+ $data[] = array(trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension))) => $dimension_value);
857
+ $data[$j]['No'] = floatval($j + 1);
858
+ for ($i = 0; $i < count($metric); $i++) {
859
+ $val = $i + 1;
860
+ if ($dimension == 'hour') {
861
+ $val = $i + 2;
862
+ }
863
+ $metric_val = floatval($row[$val]);
864
+ if(substr($metric[$i], 3) == 'bounceRate'){
865
+ $metric_val = $metric_val;
866
+ }
867
+ $data[$j][trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i], 3))))] = $metric_val;
868
+ }
869
+
870
+ $j++;
871
+
872
+ if(isset($break) && $break){
873
+ break;
874
+ }
875
+
876
+ if ($dimension == 'week') {
877
+ $date = date("M d,Y", strtotime('next Sunday ' . $_end_date));
878
+ $_end_date = date("M d,Y", strtotime('next Saturday ' . $date));
879
+ } elseif ($dimension == 'month') {
880
+ $date = date("M d,Y", strtotime('+1 day ' . $_end_date));
881
+ $_end_date = date("M t,Y", strtotime($date));
882
+ }
883
+ if (isset($_end_date) && (strtotime($_end_date) > strtotime($end_date))) {
884
+ $_end_date = date("M d,Y", strtotime($end_date));
885
+ $break = true;
886
+ }
887
+ }
888
+ }
889
+ else{
890
+ foreach ($rows as $row) {
891
+
892
+ if ($dimension == 'date') {
893
+ $row[0] = date('Y-m-d', strtotime($row[0]));
894
+ }
895
+ $data[$j] = array(
896
+ $dimension => $row[0]
897
+ );
898
+ for ($i = 0; $i < count($metric); $i++) {
899
+ $data[$j][substr($metric[$i], 3)] = floatval($row[$i + 1]);
900
+ if (isset($data_sum[substr($metric[$i], 3)])) {
901
+ $data_sum[substr($metric[$i], 3)] += floatval($row[$i + 1]);
902
+ } else {
903
+ if (substr($metric[$i], 3) != 'percentNewSessions' && substr($metric[$i], 3) != 'bounceRate') {
904
+ $data_sum[substr($metric[$i], 3)] = floatval($row[$i + 1]);
905
+ }
906
+ }
907
+ }
908
+ $j++;
909
+ }
910
+ }
911
+ $expiration = strtotime(date("Y-m-d 23:59:59")) - strtotime(gmdate("Y-m-d H:i:s") . '+' . $timezone . ' hours');
912
+ if (isset($same_dimension) && $same_dimension != null) {
913
+ $dimension = $same_dimension;
914
+ }
915
+ $result = array('data_sum' => $data_sum, 'chart_data' => $data);
916
+ set_transient('gawd-page-post-' . $profileId . '-' . $filter . '-' . '-' . $dimension . '-' . $start_date . '-' . $end_date . '-' . $chart, json_encode($result), $expiration);
917
+ return json_encode($result);
918
+ } else {
919
+ $empty[] = array(
920
+ $dimension => 0,
921
+ substr($metric[0], 3) => 0);
922
+ return json_encode($empty);
923
+ }
924
+ }
925
+
926
+ public function get_data($metric, $dimension, $start_date, $end_date, $filter_type, $timezone, $same_dimension = null) {
927
+ $dimension = lcfirst($dimension);
928
+
929
+ $metric = lcfirst($metric);
930
+ $profileId = $this->get_profile_id();
931
+ $analytics = $this->analytics_member;
932
+ $selected_metric = $metric;
933
+ if (strpos($selected_metric, 'ga:') > -1) {
934
+ $selected_metric = substr($selected_metric,3);
935
+ }
936
+ if (strpos($metric, 'ga:') === false) {
937
+ $metric = 'ga:' . $metric;
938
+ }
939
+ if ($dimension == 'interestInMarketCategory' || $dimension == 'interestAffinityCategory' || $dimension == 'interestOtherCategory' || $dimension == 'country' || $dimension == 'language' || $dimension == 'userType' || $dimension == 'sessionDurationBucket' || $dimension == 'userAgeBracket' || $dimension == 'userGender' || $dimension == 'mobileDeviceInfo' || $dimension == 'deviceCategory' || $dimension == 'operatingSystem' || $dimension == 'browser' || $dimension == 'date' || $dimension == "source") {
940
+ $metrics = 'ga:users,ga:sessions,ga:percentNewSessions,ga:bounceRate,ga:pageviews,ga:avgSessionDuration,ga:pageviewsPerSession';
941
+
942
+ if (strpos($metrics, $metric) !== false) {
943
+ $metric = $metrics;
944
+ }
945
+ }
946
+ elseif ($dimension == 'siteSpeed') {
947
+ $dimension = 'date';
948
+ $metrics = 'ga:avgPageLoadTime,ga:avgRedirectionTime,ga:avgServerResponseTime,ga:avgPageDownloadTime';
949
+ if (strpos($metrics, $metric) !== false) {
950
+ $metric = $metrics;
951
+ }
952
+ }
953
+ elseif ($dimension == 'eventLabel' || $dimension == 'eventAction' || $dimension == 'eventCategory') {
954
+ $metrics = 'ga:eventsPerSessionWithEvent,ga:sessionsWithEvent,ga:avgEventValue,ga:eventValue,ga:uniqueEvents,ga:totalEvents';
955
+ if (strpos($metrics, $metric) !== false) {
956
+ $metric = $metrics;
957
+ }
958
+ }
959
+
960
+ $dimension = $dimension == 'date' ? $filter_type != '' ? $filter_type : 'date' : $dimension;
961
+ if ($same_dimension == 'sales_performance' && ($dimension == 'week' || $dimension == 'month' || $dimension == 'hour')) {
962
+ $metrics = 'ga:transactionRevenue, ga:transactionsPerSession';
963
+ if (strpos($metrics, $metric) !== false) {
964
+ $metric = $metrics;
965
+ }
966
+ } elseif ($same_dimension == 'adsense' && ($dimension == 'week' || $dimension == 'month' || $dimension == 'hour')) {
967
+ $metrics = 'ga:adsenseRevenue,ga:adsenseAdsClicks';
968
+ if (strpos($metrics, $metric) !== false) {
969
+ $metric = $metrics;
970
+ }
971
+ } elseif ($same_dimension == 'siteSpeed' && ($dimension == 'week' || $dimension == 'month' || $dimension == 'hour')) {
972
+ $metrics = 'ga:avgPageLoadTime,ga:avgRedirectionTime,ga:avgServerResponseTime,ga:avgPageDownloadTime';
973
+ if (strpos($metrics, $metric) !== false) {
974
+ $metric = $metrics;
975
+ }
976
+ }
977
+
978
+ if ($same_dimension == 'week' || $same_dimension == 'month' || $same_dimension == 'hour') {
979
+ $metrics = 'ga:users,ga:sessions,ga:percentNewSessions,ga:bounceRate,ga:pageviews,ga:avgSessionDuration';
980
+ if (strpos($metrics, $metric) !== false) {
981
+ $metric = $metrics;
982
+ }
983
+ }
984
+
985
+ /* if(!is_array($metric)){
986
+ if (strpos($metric, 'ga') === false) {
987
+ $metric = 'ga:' . $metric;
988
+ }
989
+ } */
990
+ // Get the results from the Core Reporting API and print the results.
991
+ // Calls the Core Reporting API and queries for the number of sessions
992
+ // for the last seven days.
993
+ if ($dimension == 'hour') {
994
+
995
+ $gawd_dimension = array(
996
+ 'dimensions' => 'ga:date, ga:hour',
997
+ 'sort' => 'ga:date',
998
+ );
999
+ }
1000
+ else {
1001
+ $gawd_dimension = array(
1002
+ 'dimensions' => 'ga:' . $dimension,
1003
+ 'sort' => '-ga:' . $selected_metric,
1004
+ );
1005
+ }
1006
+
1007
+ try {
1008
+ $results = $analytics->data_ga->get(
1009
+ 'ga:' . $profileId, $start_date, $end_date, $metric, $gawd_dimension
1010
+ );
1011
+
1012
+ } catch (Exception $e) {
1013
+ $error = array('error_message' => 'Error');
1014
+ if (strpos($e->getMessage(), 'Selected dimensions and metrics cannot be queried together')) {
1015
+ $error['error_message'] = 'Selected dimensions and metrics cannot be queried together';
1016
+ } else if (strpos($e->getMessage(), 'User does not have sufficient permissions for this profile')) {
1017
+ $error['error_message'] = 'User does not have sufficient permissions for this profile';
1018
+ }
1019
+ return json_encode($error);
1020
+ }
1021
+
1022
+ $metric = explode(',', $metric);
1023
+ $rows = $results->getRows();
1024
+ if ($rows) {
1025
+
1026
+ $j = 0;
1027
+ $data_sum = array();
1028
+ foreach($results->getTotalsForAllResults() as $key => $value){
1029
+ $data_sum[trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($key,3))))] = $value;
1030
+ }
1031
+
1032
+ if ($dimension == 'week' || $dimension == 'month' || $dimension == 'hour') {
1033
+
1034
+ $date = $start_date;
1035
+ if ($dimension == 'week') {
1036
+ $_end_date = date("l", strtotime($date)) == 'Saturday' ? date("M d,Y", strtotime($date)) : date("M d,Y", strtotime('next Saturday ' . $date));
1037
+ }
1038
+ elseif ($dimension == 'month') {
1039
+ $_end_date = date("M t,Y", strtotime($date));
1040
+ if(strtotime($_end_date) > strtotime(date('Y-m-d'))){
1041
+ $_end_date = date("M d,Y",strtotime('-1 day ' . date('Y-m-d')));
1042
+ }
1043
+ }
1044
+ if (strtotime($end_date) > strtotime(date('Y-m-d'))) {
1045
+ $end_date = date("M d,Y");
1046
+ }
1047
+ foreach ($rows as $row) {
1048
+ if ($dimension == 'hour') {
1049
+ $dimension_value = date("M d,Y", strtotime($row[0])) . ' ' . $row[1] . ':00';
1050
+ }
1051
+ else {
1052
+ if (strtotime($_end_date) <= strtotime(date('Y-m-d'))) {
1053
+
1054
+ $dimension_value = date("M d,Y", strtotime($date)) . '-' . $_end_date;
1055
+ // echo $date;
1056
+ } else {
1057
+ if ($dimension == 'month') {
1058
+ //continue;
1059
+ }
1060
+ if (strtotime($date) != strtotime($end_date) ) {
1061
+ $dimension_value = date("M d,Y", strtotime($date)) . '-' . $_end_date;
1062
+ } else {
1063
+ break;
1064
+ }
1065
+ }
1066
+ }
1067
+ $data[] = array(trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension))) => $dimension_value);
1068
+ $data[$j]['No'] = floatval($j + 1);
1069
+ for ($i = 0; $i < count($metric); $i++) {
1070
+ $val = $i + 1;
1071
+ if ($dimension == 'hour') {
1072
+ $val = $i + 2;
1073
+ }
1074
+ $metric_val = floatval($row[$val]);
1075
+ if(substr($metric[$i], 3) == 'bounceRate'){
1076
+ $metric_val = $metric_val;
1077
+ }
1078
+ $data[$j][trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i], 3))))] = $metric_val;
1079
+ }
1080
+
1081
+ $j++;
1082
+
1083
+ if(isset($break) && $break){
1084
+ break;
1085
+ }
1086
+
1087
+ if ($dimension == 'week') {
1088
+ $date = date("M d,Y", strtotime('next Sunday ' . $_end_date));
1089
+ $_end_date = date("M d,Y", strtotime('next Saturday ' . $date));
1090
+ } elseif ($dimension == 'month') {
1091
+ $date = date("M d,Y", strtotime('+1 day ' . $_end_date));
1092
+ $_end_date = date("M t,Y", strtotime($date));
1093
+ }
1094
+ if (isset($_end_date) && (strtotime($_end_date) > strtotime($end_date))) {
1095
+ $_end_date = date("M d,Y", strtotime($end_date));
1096
+ $break = true;
1097
+ }
1098
+ }
1099
+ }
1100
+ else {
1101
+ foreach ($rows as $row) {
1102
+ if (strtolower($dimension) == 'date') {
1103
+ $row[0] = date('Y-m-d', strtotime($row[0]));
1104
+ }
1105
+ elseif(strtolower($dimension) == 'sessiondurationbucket'){
1106
+ if($row[0] >= 0 && $row[0] <= 10){
1107
+ $row[0] = '0-10';
1108
+ }
1109
+ elseif($row[0] >= 11 && $row[0] <= 30){
1110
+ $row[0] = '11-30';
1111
+ }
1112
+ elseif($row[0] >= 31 && $row[0] <= 40){
1113
+ $row[0] = '31-40';
1114
+ }
1115
+ elseif($row[0] >= 41 && $row[0] <= 60){
1116
+ $row[0] = '41-60';
1117
+ }
1118
+ elseif($row[0] >= 61 && $row[0] <= 180){
1119
+ $row[0] = '61-180';
1120
+ }
1121
+ elseif($row[0] >= 181 && $row[0] <= 600){
1122
+ $row[0] = '181-600';
1123
+ }
1124
+ elseif($row[0] >= 601 && $row[0] <= 1800){
1125
+ $row[0] = '601-1800';
1126
+ }
1127
+ elseif($row[0] >= 1801){
1128
+ $row[0] = '1801';
1129
+ }
1130
+ }
1131
+ elseif(strpos($dimension,'dimension') >-1){
1132
+ $dimension_data = $this->get_custom_dimensions();
1133
+ foreach($dimension_data as $key => $value){
1134
+ if($dimension == substr($value['id'],3)){
1135
+ $dimension = $value['name'];
1136
+ }
1137
+ }
1138
+ }
1139
+ $data[$j]['No'] = floatval($j + 1);
1140
+ $dimension_data = ctype_digit($row[0]) ? intval($row[0]) : $row[0];
1141
+ $dimension_data = strpos($dimension_data,'T') ? substr($dimension_data ,0,strpos($dimension_data,'T')) : $dimension_data;
1142
+ $data[$j][trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension)))] = $dimension_data;
1143
+
1144
+ for ($i = 0; $i < count($metric); $i++) {
1145
+ $metric_val = floatval($row[$i + 1]);
1146
+ if(substr($metric[$i], 3) == 'avgSessionDuration'){
1147
+ $metric_val = ceil($row[$i + 1]);
1148
+ }
1149
+ $data[$j][trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i], 3))))] = $metric_val;
1150
+ }
1151
+ $j++;
1152
+ }
1153
+ }
1154
+ $expiration = strtotime(date("Y-m-d 23:59:59")) - strtotime(gmdate("Y-m-d H:i:s") . '+' . $timezone . ' hours');
1155
+ if (isset($same_dimension) && $same_dimension != null) {
1156
+ $dimension = $filter_type == 'date' || $filter_type == '' ? $same_dimension : $same_dimension . '_' . $filter_type;
1157
+ }
1158
+ if($dimension == "daysToTransaction"){
1159
+ foreach ($data as $key => $row) {
1160
+ $daysToTransaction[$key] = $row['Days To Transaction'];
1161
+ }
1162
+ array_multisort($daysToTransaction, SORT_ASC, $data);
1163
+ foreach($data as $j=>$val){
1164
+ $val["No"] = ($j+1);
1165
+ $data[$j] = $val;
1166
+ }
1167
+ }
1168
+ elseif($dimension == "sessionDurationBucket"){
1169
+ $_data = array();
1170
+ //$j = 1;
1171
+ foreach($data as $val){
1172
+ if(isset($_data[$val["Session Duration Bucket"]])){
1173
+ $_data[$val["Session Duration Bucket"]]["Users"] += floatval($val["Users"]);
1174
+ $_data[$val["Session Duration Bucket"]]["Sessions"] += floatval($val["Sessions"]);
1175
+ $_data[$val["Session Duration Bucket"]]["Percent New Sessions"] += floatval($val["Percent New Sessions"]);
1176
+ $_data[$val["Session Duration Bucket"]]["Bounce Rate"] += floatval($val["Bounce Rate"]);
1177
+ $_data[$val["Session Duration Bucket"]]["Pageviews"] += floatval($val["Pageviews"]);
1178
+ $_data[$val["Session Duration Bucket"]]["Avg Session Duration"] += $val["Avg Session Duration"];
1179
+ }
1180
+ else{
1181
+ // $val["No"] = $j;
1182
+ // $j++;
1183
+ $_data[$val["Session Duration Bucket"]] = $val;
1184
+ $_data[$val["Session Duration Bucket"]]["order"] = intval($val["Session Duration Bucket"]);
1185
+ }
1186
+
1187
+
1188
+ }
1189
+ $data = array_values($_data);
1190
+ foreach ($data as $key => $row) {
1191
+ $yyy[$key] = $row['order'];
1192
+ }
1193
+ array_multisort($yyy, SORT_ASC, $data);
1194
+ foreach($data as $j=>$val){
1195
+ $val["No"] = ($j+1);
1196
+ $data[$j] = $val;
1197
+ }
1198
+ }
1199
+ else{
1200
+ if(strpos($dimension,'dimension') < 0){
1201
+ foreach ($data as $key => $row) {
1202
+ $new_data[$key] = $row[trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension)))];
1203
+ }
1204
+ array_multisort($new_data, SORT_ASC, $data);
1205
+ foreach($data as $j=>$val){
1206
+ $val["No"] = ($j+1);
1207
+ $data[$j] = $val;
1208
+ }
1209
+ }
1210
+ }
1211
+ $result = $data;
1212
+ if ($data_sum != '') {
1213
+ $result = array('data_sum' => $data_sum, 'chart_data' => $data);
1214
+ }
1215
+ set_transient( 'gawd-'.$profileId.'-'.$dimension.'-'.$start_date.'-'.$end_date, json_encode($result), $expiration );
1216
+ return json_encode($result);
1217
+ }
1218
+ else {
1219
+ if(strpos($dimension,'dimension') >-1){
1220
+ $dimension_data = $this->get_custom_dimensions();
1221
+ foreach($dimension_data as $key => $value){
1222
+ if($dimension == substr($value['id'],3)){
1223
+ $dimension = $value['name'];
1224
+ }
1225
+ }
1226
+ }
1227
+ $empty[0] = array(
1228
+ trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension))) => 0
1229
+ );
1230
+ $empty[0]['No'] = 1;
1231
+ for ($i = 0; $i < count($metric); $i++) {
1232
+ $empty[0][trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i], 3))))] = 0;
1233
+ }
1234
+
1235
+ return json_encode(array('chart_data' => $empty));
1236
+ }
1237
+ }
1238
+
1239
+ public function get_data_compact($metric, $dimension, $start_date, $end_date, $timezone) {
1240
+ $profileId = $this->get_profile_id();
1241
+ $metric_sort = $metric;
1242
+ //var_dump($profileId);exit;
1243
+ $analytics = $this->analytics_member;
1244
+ // Get the results from the Core Reporting API and print the results.
1245
+ // Calls the Core Reporting API and queries for the number of sessions
1246
+ // for the last seven days.
1247
+ if ($dimension == 'date') {
1248
+ $metric = 'ga:users,ga:sessions,ga:percentNewSessions,ga:bounceRate,ga:pageviews,ga:avgSessionDuration,ga:pageviewsPerSession';
1249
+ }
1250
+ $results = $analytics->data_ga->get(
1251
+ 'ga:' . $profileId, $start_date, $end_date, $metric, array(
1252
+ 'dimensions' => 'ga:' . $dimension,
1253
+ 'sort' => 'ga:' . $dimension,
1254
+ )
1255
+ );
1256
+ $rows = $results->getRows();
1257
+ $metric = explode(',', $metric);
1258
+ if ($rows) {
1259
+ $j = 0;
1260
+ $data_sum = array();
1261
+ foreach($results->getTotalsForAllResults() as $key => $value){
1262
+ $data_sum[trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($key,3))))] = $value;
1263
+ }
1264
+
1265
+ foreach ($rows as $row) {
1266
+ if ($dimension == 'date') {
1267
+ $row[0] = date('Y-m-d', strtotime($row[0]));
1268
+ }
1269
+ $data[$j] = array(
1270
+ trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension))) => $row[0]
1271
+ );
1272
+ for ($i = 0; $i < count($metric); $i++) {
1273
+ $metric_val = floatval($row[$i + 1]);
1274
+
1275
+ $data[$j][trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i], 3))))] = $metric_val;
1276
+ }
1277
+ $j++;
1278
+ }
1279
+ if($dimension == "country"){
1280
+ foreach ($data as $key => $row) {
1281
+ $country[$key] = $row[trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric_sort, 3))))];
1282
+ }
1283
+ array_multisort($country, SORT_DESC, $data);
1284
+ foreach($data as $j=>$val){
1285
+ $val["No"] = ($j+1);
1286
+ $data[$j] = $val;
1287
+ }
1288
+ }
1289
+ }
1290
+ else {
1291
+ $data_sum = array();
1292
+ $empty[0] = array(
1293
+ trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension))) => 0
1294
+ );
1295
+ $data_sum[trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension)))] = 0;
1296
+ $empty[0]['No'] = 1;
1297
+ for ($i = 0; $i < count($metric); $i++) {
1298
+ $empty[0][trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i], 3))))] = 0;
1299
+ $data_sum[trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i], 3))))] = 0;
1300
+ }
1301
+ $result = array('data_sum' => $data_sum, 'chart_data' => $empty);
1302
+ return json_encode($result);
1303
+ }
1304
+ if ($data_sum != '') {
1305
+ $result = array('data_sum' => $data_sum, 'chart_data' => $data);
1306
+ }
1307
+ $expiration = strtotime(date("Y-m-d 23:59:59")) - strtotime(gmdate("Y-m-d H:i:s") . '+' . $timezone . ' hours');
1308
+ set_transient('gawd-compact-' . $profileId . '-' . $dimension . '-' . $start_date . '-' . $end_date, json_encode($result), $expiration);
1309
+ return json_encode($result);
1310
+ }
1311
+
1312
+ public function get_data_alert($metric, $dimension, $start_date, $end_date, $gawd_alert_view) {
1313
+ $profileId = $gawd_alert_view == '' ? $this->get_profile_id() : $gawd_alert_view;
1314
+ $analytics = $this->analytics_member;
1315
+ // Get the results from the Core Reporting API and print the results.
1316
+ // Calls the Core Reporting API and queries for the number of sessions
1317
+ // for the last seven days.
1318
+ $results = $analytics->data_ga->get(
1319
+ 'ga:' . $profileId, $start_date, $end_date, $metric, array(
1320
+ 'dimensions' => 'ga:' . $dimension,
1321
+ 'sort' => 'ga:' . $dimension,
1322
+ )
1323
+ );
1324
+ $rows = $results->getRows();
1325
+
1326
+ $data = '';
1327
+ foreach ($rows as $row) {
1328
+ $data += floatval($row[1]);
1329
+ }
1330
+ return ($data);
1331
+ }
1332
+
1333
+ public function get_profile_id() {
1334
+ $this->gawd_user_data = get_option('gawd_user_data');
1335
+ $profiles_light = get_transient('gawd_user_profiles') ? get_transient('gawd_user_profiles') : $this->gawd_user_data['gawd_profiles'];
1336
+ if (!isset($this->gawd_user_data['gawd_id']) || $this->gawd_user_data['gawd_id'] == '') {
1337
+ if (!empty($profiles_light)) {
1338
+ $first_profile = reset($profiles_light)[0];
1339
+ $this->gawd_user_data['gawd_id'] = $first_profile['id'];
1340
+ }
1341
+ }
1342
+ return $this->gawd_user_data['gawd_id'];
1343
+ }
1344
+
1345
+ public function get_profile_webPropertyId() {
1346
+ $this->gawd_user_data = get_option('gawd_user_data');
1347
+ return $this->gawd_user_data['webPropertyId'];
1348
+ }
1349
+
1350
+ public function get_profile_accountId() {
1351
+ $this->gawd_user_data = get_option('gawd_user_data');
1352
+ return isset($this->gawd_user_data['accountId']) ? $this->gawd_user_data['accountId'] : '';
1353
+ }
1354
+
1355
+ public function get_default_webPropertyId() {
1356
+ $this->gawd_user_data = get_option('gawd_user_data');
1357
+ return $this->gawd_user_data['default_webPropertyId'];
1358
+ }
1359
+
1360
+ public function get_default_accountId() {
1361
+ $this->gawd_user_data = get_option('gawd_user_data');
1362
+ return $this->gawd_user_data['default_accountId'];
1363
+ }
1364
+
1365
+ public function get_page_data($dimension, $start_date, $end_date, $timezone) {
1366
+ $analytics = $this->analytics_member;
1367
+ $profileId = $this->get_profile_id();
1368
+ $metric = $dimension == 'pagePath' || $dimension == 'PagePath' ? 'ga:pageviews,ga:uniquePageviews,ga:avgTimeOnPage,ga:entrances,ga:bounceRate,ga:exitRate,ga:pageValue,ga:avgPageLoadTime' : 'ga:sessions,ga:percentNewSessions,ga:newUsers,ga:bounceRate,ga:pageviewsPerSession,ga:avgSessionDuration,ga:transactions,ga:transactionRevenue,ga:transactionsPerSession';
1369
+ $sort = '-'.explode(',', $metric)[0];
1370
+
1371
+ try {
1372
+ $results = $analytics->data_ga->get(
1373
+ 'ga:' . $profileId, $start_date, $end_date, $metric, array(
1374
+ 'dimensions' => 'ga:'.$dimension,
1375
+ 'sort' => $sort,
1376
+ )
1377
+ );
1378
+ } catch (Exception $e) {
1379
+
1380
+ $error = array('error_message' => 'Error');
1381
+ if (strpos($e->getMessage(), 'User does not have sufficient permissions for this profile')) {
1382
+ $error['error_message'] = 'User does not have sufficient permissions for this profile';
1383
+ }
1384
+ return json_encode($error);
1385
+ }
1386
+ $rows = $results->getRows();
1387
+ $metric = explode(',', $metric);
1388
+ if ($rows) {
1389
+ $data_sum = array();
1390
+ foreach($results->getTotalsForAllResults() as $key => $value){
1391
+ $data_sum[trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($key,3))))] = $value;
1392
+ }
1393
+ foreach ($rows as $key => $row) {
1394
+ $hours = strlen(floor($row[3] / 3600)) < 2 ? '0' . floor($row[3] / 3600) : floor($row[3] / 3600);
1395
+ $mins = strlen(floor($row[3] / 60 % 60)) < 2 ? '0' . floor($row[3] / 60 % 60) : floor($row[3] / 60 % 60);
1396
+ $secs = strlen(floor($row[3] % 60)) < 2 ? '0' . floor($row[3] % 60) : floor($row[3] % 60);
1397
+ $time_on_page = $hours.':'.$mins.':'.$secs;
1398
+ if($dimension == 'pagePath' || $dimension == 'PagePath'){
1399
+ $data[] = array(
1400
+ 'No' => floatval($key + 1),
1401
+ 'Page Path' => $row[0],
1402
+ 'Pageviews' => intval($row[1]),
1403
+ 'Unique Pageviews' => intval($row[2]),
1404
+ 'Avg Time On Page' => $time_on_page,
1405
+ 'Entrances' => intval($row[4]),
1406
+ 'Bounce Rate' => floatval($row[5]),
1407
+ 'Exit Rate' => intval($row[6]),
1408
+ 'Page Value' => intval($row[7]),
1409
+ 'Avg Page Load Time' => intval($row[8])
1410
+ );
1411
+ }
1412
+ else{
1413
+ $data[] = array(
1414
+ 'No' => floatval($key + 1),
1415
+ 'Landing Page' => $row[0],
1416
+ 'Sessions' => intval($row[1]),
1417
+ 'Percent New Sessions' => intval($row[2]),
1418
+ 'New Users' => intval($row[3]),
1419
+ 'Bounce Rate' => intval($row[4]),
1420
+ 'Pageviews Per Session' => floatval($row[5]),
1421
+ 'Avg Session Duration' => intval($row[6]),
1422
+ 'Transactions' => intval($row[7]),
1423
+ 'Transaction Revenue' => intval($row[8]),
1424
+ 'Transactions Per Session' => intval($row[9])
1425
+ );
1426
+ }
1427
+ }
1428
+
1429
+ }
1430
+ else {
1431
+ $empty[0] = array(
1432
+ trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension))) => 0
1433
+ );
1434
+ $empty[0]['No'] = 1;
1435
+ for ($i = 0; $i < count($metric); $i++) {
1436
+ $empty[0][trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i], 3))))] = 0;
1437
+ $data_sum[trim(ucfirst(preg_replace('/([A-Z])/', ' $1', substr($metric[$i],3))))] = 0;
1438
+ }
1439
+
1440
+ return json_encode(array('data_sum' => $data_sum, 'chart_data' => $empty));
1441
+ }
1442
+ if ($data_sum != '') {
1443
+ $result = array('data_sum' => $data_sum, 'chart_data' => $data);
1444
+ }
1445
+ $expiration = strtotime(date("Y-m-d 23:59:59")) - strtotime(gmdate("Y-m-d H:i:s") . '+' . $timezone . ' hours');
1446
+ set_transient('gawd-' . $profileId . '-' . $dimension . '-' . $start_date . '-' . $end_date, json_encode($result), $expiration);
1447
+ return json_encode($result);
1448
+ }
1449
+
1450
+ public function get_goal_data($dimension, $start_date, $end_date, $timezone, $same_dimension) {
1451
+ $goals = $this->get_management_goals();
1452
+ if ('no_goals_exist' != $goals) {
1453
+ $analytics = $this->analytics_member;
1454
+ $profileId = $this->get_profile_id();
1455
+ $metric = array();
1456
+ $all_metric = '';
1457
+ $counter = 1;
1458
+ foreach ($goals as $goal) {
1459
+ $all_metric .= 'ga:goal' . $goal['id'] . 'Completions,';
1460
+ if($counter <= 10){
1461
+ $metrics[0][] = 'ga:goal' . $goal['id'] . 'Completions';
1462
+ }
1463
+ else{
1464
+ $metrics[1][] = 'ga:goal' . $goal['id'] . 'Completions';
1465
+ }
1466
+ $counter++;
1467
+ }
1468
+ $rows = array();
1469
+ foreach($metrics as $metric){
1470
+ $metric = implode(',',$metric);
1471
+ $results = $analytics->data_ga->get(
1472
+ 'ga:' . $profileId, $start_date, $end_date, $metric, array(
1473
+ 'dimensions' => 'ga:' . $dimension,
1474
+ 'sort' => 'ga:' . $dimension,
1475
+ )
1476
+ );
1477
+
1478
+ $temp_rows = $results->getRows();
1479
+ if(empty($temp_rows)){
1480
+ continue;
1481
+ }
1482
+
1483
+ foreach($temp_rows as $key=>$value){
1484
+ if(!isset($rows[$key])){
1485
+ $rows[$key] = $value;
1486
+ }
1487
+ else{
1488
+ unset($value[0]);
1489
+ $rows[$key] = array_merge($rows[$key],$value);
1490
+ }
1491
+ }
1492
+
1493
+ }
1494
+ $all_metric = explode(',', $all_metric);
1495
+ if ($rows) {
1496
+ $j = 0;
1497
+ $data_sum = array();
1498
+ foreach ($rows as $row) {
1499
+ if ($dimension == 'date') {
1500
+ $row[0] = date('Y-m-d', strtotime($row[0]));
1501
+ }
1502
+ $data[$j] = array(
1503
+ preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $dimension))))=> $row[0]
1504
+ );
1505
+ $data[$j]['No'] = floatval($j + 1);
1506
+ for ($i = 0; $i < count($goals); $i++) {
1507
+ $data[$j][preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $goals[$i]['name']))))] = floatval($row[$i + 1]);
1508
+ if (isset($data_sum[preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $goals[$i]['name']))))])) {
1509
+ $data_sum[preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $goals[$i]['name']))))] += floatval($row[$i + 1]);
1510
+ } else {
1511
+ if (substr($all_metric[$i], 3) != 'percentNewSessions' && substr($all_metric[$i], 3) != 'bounceRate') {
1512
+ $data_sum[preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $goals[$i]['name']))))] = floatval($row[$i + 1]);
1513
+ }
1514
+ }
1515
+ }
1516
+ $j++;
1517
+ }
1518
+ $expiration = strtotime(date("Y-m-d 23:59:59")) - strtotime(gmdate("Y-m-d H:i:s") . '+' . $timezone . ' hours');
1519
+ if (isset($same_dimension) && $same_dimension != null) {
1520
+ $dimension = $same_dimension;
1521
+ }
1522
+ $result = $data;
1523
+ if ($data_sum != '') {
1524
+ $result = array('data_sum' => $data_sum, 'chart_data' => $data);
1525
+ }
1526
+ set_transient('gawd-' . $profileId . '-' . $dimension . '-' . $start_date . '-' . $end_date, json_encode($result), $expiration);
1527
+ return json_encode($result);
1528
+ } else {
1529
+ return $goals;
1530
+ }
1531
+ } else {
1532
+ return json_encode(array('error_message' => 'No goals exist'));
1533
+ }
1534
+ }
1535
+
1536
+ public function gawd_realtime_data() {
1537
+ $analytics = $this->analytics_member;
1538
+ $profileId = $this->get_profile_id();
1539
+ $metrics = 'rt:activeUsers';
1540
+ $dimensions = 'rt:pagePath,rt:source,rt:keyword,rt:trafficType,rt:country,rt:pageTitle,rt:deviceCategory';
1541
+ $managequota = 'u' . get_current_user_id() . 's' . get_current_blog_id();
1542
+
1543
+ try {
1544
+ $data = $analytics->data_realtime->get('ga:' . $profileId, $metrics, array('dimensions' => $dimensions, 'quotaUser' => $managequota . 'p' . $profileId));
1545
+ } catch (Exception $e) {
1546
+ $error = array('error_message' => 'Error');
1547
+ if (strpos($e->getMessage(), 'User does not have sufficient permissions for this profile')) {
1548
+ $error['error_message'] = 'User does not have sufficient permissions for this profile';
1549
+ }
1550
+ return json_encode($error);
1551
+ }
1552
+ $expiration = 5 ;
1553
+ if ($data->getRows() != '') {
1554
+ $i = 0;
1555
+ $gawd_data = $data;
1556
+ foreach ($data->getRows() as $row) {
1557
+ $gawd_data[$i] = $row;
1558
+ $i++;
1559
+ }
1560
+ set_transient('gawd-real-' . $profileId, json_encode($gawd_data), $expiration);
1561
+ echo json_encode($gawd_data);
1562
+ wp_die();
1563
+ }
1564
+ else {
1565
+ return 0;
1566
+ }
1567
+ }
1568
+
1569
+ public static function get_instance() {
1570
+ if (null === static::$instance) {
1571
+ static::$instance = new static();
1572
+ }
1573
+ return static::$instance;
1574
+ }
1575
+
1576
+ }
1577
+
1578
+ ?>
admin/licensing.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <div id="featurs_tables">
3
+ <div id="featurs_table1">
4
+ <span>WordPress 3.5+ <?php _e("ready", 'gawd'); ?></span>
5
+ <span><?php _e("Overview reports", 'gawd'); ?></span>
6
+ <span><?php _e("Analytics on WordPress dashboard", 'gawd'); ?></span>
7
+ <span><?php _e("All Analytics reports", 'gawd'); ?></span>
8
+ <span><?php _e("Metrics report comparison", 'gawd'); ?></span>
9
+ <span><?php _e("Date range report comparison", 'gawd'); ?></span>
10
+ <span><?php _e("Line, Pie and Column chart reports", 'gawd'); ?></span>
11
+ <span><?php _e("CSV and PDF export", 'gawd'); ?></span>
12
+ <span><?php _e("Scheduled email notifications", 'gawd'); ?></span>
13
+ <span><?php _e("Page and post reports", 'gawd'); ?></span>
14
+ <span><?php _e("Frontend reports", 'gawd'); ?></span>
15
+ <span><?php _e("Google Analytics tracking code and options", 'gawd'); ?></span>
16
+ <span><?php _e("Goal management", 'gawd'); ?></span>
17
+ <span><?php _e("Google Analytics Filters management", 'gawd'); ?></span>
18
+ <span><?php _e("User and Role permissions to access reports", 'gawd'); ?></span>
19
+ <span><?php _e("Custom Dimensions", 'gawd'); ?></span>
20
+ <span><?php _e("Custom Reports", 'gawd'); ?></span>
21
+ <span><?php _e("Ecommerce reports", 'gawd'); ?></span>
22
+ <span><?php _e("Google AdSense report", 'gawd'); ?></span>
23
+ <span><?php _e("Google AdWords report", 'gawd'); ?></span>
24
+ <span><?php _e("Tracking exclusions by roles and users", 'gawd'); ?></span>
25
+ <span><?php _e("Google Analytics alerts", 'gawd'); ?></span>
26
+ <span><?php _e("Pushover notifications", 'gawd'); ?></span>
27
+ </div>
28
+ <div id="featurs_table2">
29
+ <span style="padding-top: 18px;height: 39px;"><?php _e("Free", 'gawd'); ?></span>
30
+ <span class="yes"></span>
31
+ <span class="yes"></span>
32
+ <span class="yes"></span>
33
+ <span class="yes"></span>
34
+ <span class="yes"></span>
35
+ <span class="yes"></span>
36
+ <span class="yes"></span>
37
+ <span class="yes"></span>
38
+ <span class="yes"></span>
39
+ <span class="yes"></span>
40
+ <span class="yes"></span>
41
+ <span class="yes"></span>
42
+ <span class="yes"></span>
43
+ <span class="yes"></span>
44
+ <span class="yes"></span>
45
+ <span class="no"></span>
46
+ <span class="no"></span>
47
+ <span class="no"></span>
48
+ <span class="no"></span>
49
+ <span class="no"></span>
50
+ <span class="no"></span>
51
+ <span class="no"></span>
52
+ <span class="no"></span>
53
+ </div>
54
+ <div id="featurs_table3">
55
+ <span><?php _e("Pro Version", 'gawd'); ?></span>
56
+ <span class="yes"></span>
57
+ <span class="yes"></span>
58
+ <span class="yes"></span>
59
+ <span class="yes"></span>
60
+ <span class="yes"></span>
61
+ <span class="yes"></span>
62
+ <span class="yes"></span>
63
+ <span class="yes"></span>
64
+ <span class="yes"></span>
65
+ <span class="yes"></span>
66
+ <span class="yes"></span>
67
+ <span class="yes"></span>
68
+ <span class="yes"></span>
69
+ <span class="yes"></span>
70
+ <span class="yes"></span>
71
+ <span class="yes"></span>
72
+ <span class="yes"></span>
73
+ <span class="yes"></span>
74
+ <span class="yes"></span>
75
+ <span class="yes"></span>
76
+ <span class="yes"></span>
77
+ <span class="yes"></span>
78
+ <span class="yes"></span>
79
+ </div>
80
+ </div>
81
+ <div style="float: left; clear: both;">
82
+ <p><?php _e("After purchasing the commercial version follow these steps:", 'gawd'); ?></p>
83
+ <ol>
84
+ <li><?php _e("Deactivate WD Google Analytics plugin.", 'gawd'); ?></li>
85
+ <li><?php _e("Delete WD Google Analytics plugin.", 'gawd'); ?></li>
86
+ <li><?php _e("Install the downloaded commercial version of the plugin.", 'gawd'); ?></li>
87
+ </ol>
88
+ </div>
admin/pages/browser.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ <div class="">
4
+ <div class="opacity_div_compact">
5
+ <div class="loading_div_compact">
6
+ <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 200px; width:50px;">
7
+ </div>
8
+ </div>
9
+ <div id="gawd_browser_meta"></div>
10
+ </div>
admin/pages/custom_dimensions.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $existing_custom_dimensions = $gawd_client->get_custom_dimensions('default');
3
+ if (!is_array($existing_custom_dimensions)) {
4
+ $existing_custom_dimensions = array();
5
+ }
6
+ $tracking_dimensions = $gawd_client->get_custom_dimensions_tracking();
7
+ $supported_dimensions = array("Logged in","Post type","Author","Category","Tags", "Published Month", "Published Year");
8
+ ?>
9
+ <div class="dimension_wrapper">
10
+ <form action="" method="post" id="gawd_dimensions_form">
11
+ <div class="gawd_dimension_row">
12
+ <span class="gawd_dimension_label">Name</span>
13
+ <span class="gawd_dimension_input">
14
+ <select name="gawd_custom_dimension_name" id="gawd_custom_dimension_name">
15
+ <?php
16
+ foreach ($supported_dimensions as $supported_dimension) {
17
+ $disabled = '';
18
+ if (is_array($tracking_dimensions) && !empty($tracking_dimensions)) {
19
+ foreach ($tracking_dimensions as $tracking_dimension) {
20
+ if ($supported_dimension == $tracking_dimension['name']) {
21
+ $disabled = 'disabled="disabled"';
22
+ break;
23
+ }
24
+ }
25
+ }
26
+ ?>
27
+ <option value="<?php echo $supported_dimension; ?>" <?php echo $disabled; ?>><?php echo $supported_dimension; ?></option>
28
+ <?php } ?>
29
+ </select>
30
+ </span>
31
+ <div class="gawd_info" title="Pick a name for your custom dimension."></div>
32
+ <div class="clear"></div>
33
+ </div>
34
+ <div class="gawd_dimension_row">
35
+ <span class="gawd_dimension_label">Scope</span>
36
+ <span class="gawd_dimension_input">
37
+ <select name="gawd_custom_dimension_scope" id="gawd_custom_dimension_scope">
38
+ <option value="Hit">Hit</option>
39
+ <option value="Session">Session</option>
40
+ <option value="User">User</option>
41
+ <option value="Product">Product</option>
42
+ </select>
43
+ </span>
44
+ <div class="gawd_info" title="Select a scope, hit, session, user or product."></div>
45
+ <div class="clear"></div>
46
+ </div>
47
+ <div class="gawd_dimension_row">
48
+ <div class="onoffswitch">
49
+ <input type="checkbox" name="gawd_custom_dimension_tracking" class="onoffswitch-checkbox" id="gawd_custom_dimension_tracking" checked>
50
+ <label class="onoffswitch-label" for="gawd_custom_dimension_tracking">
51
+ <span class="onoffswitch-inner"></span>
52
+ <span class="onoffswitch-switch"></span>
53
+ </label>
54
+ </div>
55
+ <div class="gawd_info" title="Enable this option to track relevant activity and view statistics based on this custom dimension on Reports page."></div>
56
+ <div class="onoffswitch_text">
57
+ Tracking for this custom dimension
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+ <div class="gawd_buttons" id="goal_submit">
62
+ <input class="button_gawd" type="submit" value="Save"/>
63
+ <input name="gawd_custom_dimension_id" type="hidden" value="<?php echo count($existing_custom_dimensions);?>"/>
64
+ <div class="clear"></div>
65
+ </div>
66
+ <?php wp_nonce_field('gawd_save_form', 'gawd_save_form_fild'); ?>
67
+ </form>
68
+ <?php if (!empty($existing_custom_dimensions)) { ?>
69
+ <table border="1" class="gawd_table">
70
+ <tr>
71
+ <th>Name</th>
72
+ <th>Id</th>
73
+ </tr>
74
+ <?php foreach($existing_custom_dimensions as $existing_custom_dimension) { ?>
75
+ <tr>
76
+ <td><?php echo $existing_custom_dimension['name']; ?></td>
77
+ <td><?php echo substr($existing_custom_dimension['id'],-1); ?></td>
78
+ </tr>
79
+ <?php } ?>
80
+ </table>
81
+ <?php } ?>
82
+ </div>
admin/pages/custom_reports.php ADDED
@@ -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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $goals = $gawd_client->get_management_goals();
3
+ if (!is_array($goals)) {
4
+ $goals = array();
5
+ }
6
+ $get_custom_reports = get_option('gawd_custom_reports');
7
+ if(!isset($_GET['tab'])){
8
+ $_GET['tab'] = 'general';
9
+ }
10
+ $tabs = get_option('gawd_menu_items');
11
+ $gawd_zoom_message = get_option('gawd_zoom_message');
12
+ $current_user = get_current_user_id();
13
+ $saved_user_menues = get_option('gawd_menu_for_user');
14
+ if($current_user != 1 && isset($saved_user_menues[$current_user])){
15
+ $tabs = array_intersect_key($tabs, $saved_user_menues[$current_user]);
16
+ }
17
+ ?>
18
+ <form method="post" id="gawd_view">
19
+
20
+ <div class="gawd_profiles" id="gawd_profile_wrapper">
21
+ <?php if($gawd_zoom_message === false){
22
+ ?>
23
+ <div class="gawd_zoom_message">
24
+ <span>You can zoom chart by dragging the mouse over it</span><input class="button_gawd" type="button" id="gawd_got_it" value="GOT IT"/>
25
+ </div>
26
+ <?php
27
+ }
28
+ ?>
29
+ <select class="gawd_profile_select" id="gawd_id" name="gawd_id" onchange="change_account(this)">
30
+ <?php foreach ($profiles as $property_name => $property): ?>
31
+ <optgroup label="<?php echo $property_name; ?>">
32
+ <?php foreach ($property as $profile):
33
+ $webPropertyId = $profile['webPropertyId'];
34
+ $id = $profile['id'];
35
+ $name = $profile['name'];
36
+ $selected = '';
37
+ if($id == $gawd_user_data['gawd_id']){
38
+ $selected = 'selected="selected"';
39
+ }
40
+ ?>
41
+ <option value="<?php echo $id; ?>" <?php echo $selected; ?>><?php echo $property_name.' - '.$name ; ?></option>
42
+ <?php endforeach ?>
43
+ </optgroup>
44
+ <?php endforeach ?>
45
+ </select>
46
+ <div class="clear"></div>
47
+ <input type="hidden" name='web_property_name' id='web_property_name'/>
48
+ </div>
49
+ <div id="gawd_body">
50
+ <?php
51
+ include_once('dashboard_menu.php');
52
+ $page = isset($_GET['tab']) ? $_GET['tab'] : 'overview';
53
+ if(strpos($page,'custom_report')!==false){
54
+ $tab = $page;
55
+ }
56
+ else{
57
+ switch ($page) {
58
+ case 'general':
59
+ $tab = 'date';
60
+ break;
61
+ case 'location':
62
+ $tab = 'country';
63
+ break;
64
+ case 'behaviour':
65
+ $tab = 'userType';
66
+ break;
67
+ case 'engagement':
68
+ $tab = 'sessionDurationBucket';
69
+ break;
70
+ case 'pagePath':
71
+ $tab = 'pagePath';
72
+ break;
73
+ case 'landingPagePath':
74
+ $tab = 'landingPagePath';
75
+ break;
76
+ case 'language':
77
+ $tab = 'language';
78
+ break;
79
+ case 'browser':
80
+ $tab = 'browser';
81
+ break;
82
+ case 'os':
83
+ $tab = 'operatingSystem';
84
+ break;
85
+ case 'device_overview':
86
+ $tab = 'deviceCategory';
87
+ break;
88
+ case 'devices':
89
+ $tab = 'mobileDeviceInfo';
90
+ break;
91
+ case 'realtime':
92
+ $tab = 'realTime';
93
+ break;
94
+ case 'custom':
95
+ $tab = 'custom';
96
+ break;
97
+ case 'eventsCategory':
98
+ $tab = 'eventCategory';
99
+ break;
100
+ case 'eventsAction':
101
+ $tab = 'eventAction';
102
+ break;
103
+ case 'eventsLabel':
104
+ $tab = 'eventLabel';
105
+ break;
106
+ case 'goals':
107
+ $tab = 'goals';
108
+ break;
109
+ case 'userGender':
110
+ $tab = 'userGender';
111
+ break;
112
+ case 'userAge':
113
+ $tab = 'userAgeBracket';
114
+ break;
115
+ case 'adWords':
116
+ $tab = 'adGroup';
117
+ break;
118
+ case 'otherCategory':
119
+ $tab = 'interestOtherCategory';
120
+ break;
121
+ case 'affinityCategory':
122
+ $tab = 'interestAffinityCategory';
123
+ break;
124
+ case 'inMarket':
125
+ $tab = 'interestInMarketCategory';
126
+ break;
127
+ case 'trafficSource':
128
+ $tab = 'source';
129
+ break;
130
+ case 'siteSpeed':
131
+ $tab = 'siteSpeed';
132
+ break;
133
+ case 'adsense':
134
+ $tab = 'adsense';
135
+ break;
136
+ case 'productName':
137
+ $tab = 'productName';
138
+ break;
139
+ case 'productCategory':
140
+ $tab = 'productCategory';
141
+ break;
142
+ case 'productSku':
143
+ $tab = 'productSku';
144
+ break;
145
+ case 'transactionId':
146
+ $tab = 'transactionId';
147
+ break;
148
+ case 'daysToTransaction':
149
+ $tab = 'daysToTransaction';
150
+ break;
151
+ case 'sales_performance':
152
+ $tab = 'sales_performance';
153
+ break;
154
+ default:
155
+ if($tabs != ''){
156
+ $tab = key($tabs);
157
+ }
158
+ else{
159
+ $tab = 'date';
160
+ }
161
+ break;
162
+ }
163
+ }
164
+ ?>
165
+ <input id="gawd_filter_val" type="hidden" value="">
166
+ <div class="resp_metrics_menu"><div class="menu_metrics_img"></div><div class="button_label">FILTERS</div><div class="clear"></div></div>
167
+ <div id="gawd_right_conteiner">
168
+ <h3 id="gawd_page_title">Audience</h3>
169
+ <div class="filter_conteiner">
170
+ <div id="metric_conteiner" class="float_conteiner">
171
+ <div class="gawd_metrics">
172
+ <?php
173
+ if($tab == 'date'){
174
+ ?>
175
+ <div id="first_metric" >
176
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
177
+ <option value="sessions"><?php echo __('Sessions', 'gawd'); ?></option>
178
+ <option value="percentNewSessions"><?php echo __('% New Sessions', 'gawd'); ?></option>
179
+ <option value="users" ><?php echo __('Users', 'gawd'); ?></option>
180
+ <option value="bounceRate" ><?php echo __('Bounce Rate', 'gawd'); ?></option>
181
+ <option value="avgSessionDuration" ><?php echo __('Avg Session Duration', 'gawd'); ?></option>
182
+ <option value="pageviews" ><?php echo __('Pageviews', 'gawd'); ?></option>
183
+ <option value="pageviewsPerSession" ><?php echo __('Pages/Session', 'gawd'); ?></option>
184
+ </select>
185
+ </div>
186
+ <div id="metric_compare">
187
+ <select name="gawd_metric_compare" id="gawd_metric_compare" class="gawd_draw_analytics load_tooltip" data-hint="Select the second metric to compare reports.">
188
+ <option value="0"><?php echo __('None', 'gawd'); ?></option>
189
+ <option value="sessions"><?php echo __('Sessions', 'gawd'); ?></option>
190
+ <option value="percentNewSessions"><?php echo __('% New Sessions', 'gawd'); ?></option>
191
+ <option value="users" ><?php echo __('Users', 'gawd'); ?></option>
192
+ <option value="bounceRate" ><?php echo __('Bounce Rate', 'gawd'); ?></option>
193
+ <option value="avgSessionDuration" ><?php echo __('Avg Session Duration', 'gawd'); ?></option>
194
+ <option value="pageviews" ><?php echo __('Pageviews', 'gawd'); ?></option>
195
+ <option value="pageviewsPerSession" ><?php echo __('Pages/Session', 'gawd'); ?></option>
196
+ </select>
197
+ <img src="<?php echo GAWD_URL. '/assets/cleardot.gif';?>"/>
198
+ </div>
199
+ <?php
200
+ }
201
+ elseif($tab == 'inMarket' || $tab == 'affinityCategory' || $tab == 'otherCategory' || $tab == 'country' || $tab == 'language' || $tab == 'userType' || $tab == 'sessionDurationBucket' || $tab == 'userAgeBracket' || $tab == 'userGender' || $tab == 'mobileDeviceInfo' || $tab == 'deviceCategory' || $tab == 'operatingSystem' || $tab == 'browser' || $tab =='interestInMarketCategory' || $tab == 'interestAffinityCategory' || $tab == 'interestOtherCategory' || $tab == 'source'){
202
+ ?>
203
+ <div id="first_metric" >
204
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
205
+ <option value="sessions"><?php echo __('Sessions', 'gawd'); ?></option>
206
+ <option value="percentNewSessions"><?php echo __('% New Sessions', 'gawd'); ?></option>
207
+ <option value="users" ><?php echo __('Users', 'gawd'); ?></option>
208
+ <option value="bounceRate" ><?php echo __('Bounce Rate', 'gawd'); ?></option>
209
+ <option value="avgSessionDuration" ><?php echo __('Avg Session Duration', 'gawd'); ?></option>
210
+ <option value="pageviews" ><?php echo __('Pageviews', 'gawd'); ?></option>
211
+ <option value="pageviewsPerSession" ><?php echo __('Pages/Session', 'gawd'); ?></option>
212
+ </select>
213
+ </div>
214
+ <div id="metric_compare">
215
+ <select name="gawd_metric_compare" id="gawd_metric_compare" class="gawd_draw_analytics load_tooltip" data-hint="Select the second metric to compare reports.">
216
+ <option value="0"><?php echo __('None', 'gawd'); ?></option>
217
+ <option value="sessions"><?php echo __('Sessions', 'gawd'); ?></option>
218
+ <option value="percentNewSessions"><?php echo __('% New Sessions', 'gawd'); ?></option>
219
+ <option value="users" ><?php echo __('Users', 'gawd'); ?></option>
220
+ <option value="bounceRate" ><?php echo __('Bounce Rate', 'gawd'); ?></option>
221
+ <option value="avgSessionDuration" ><?php echo __('Avg Session Duration', 'gawd'); ?></option>
222
+ <option value="pageviews" ><?php echo __('Pageviews', 'gawd'); ?></option>
223
+ <option value="pageviewsPerSession" ><?php echo __('Pages/Session', 'gawd'); ?></option>
224
+ </select>
225
+ <img src="<?php echo GAWD_URL. '/assets/cleardot.gif';?>"/>
226
+ </div>
227
+ <?php
228
+ }
229
+ elseif($tab == 'eventLabel' || $tab == 'eventAction' || $tab == 'eventCategory'){
230
+ ?>
231
+ <div id="first_metric" >
232
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
233
+ <option value="totalEvents" ><?php echo __('Total Events', 'gawd'); ?></option>
234
+ <option value="uniqueEvents" ><?php echo __('Unique Events', 'gawd'); ?></option>
235
+ <option value="eventValue" ><?php echo __('Event Value', 'gawd'); ?></option>
236
+ <option value="avgEventValue" ><?php echo __('Average Event Value', 'gawd'); ?></option>
237
+ <option value="sessionsWithEvent" ><?php echo __('Session with Event', 'gawd'); ?></option>
238
+ <option value="eventsPerSessionWithEvent" ><?php echo __('Events per Session with Event ', 'gawd'); ?></option>
239
+ </select>
240
+ </div>
241
+ <div id="metric_compare">
242
+ <select name="gawd_metric_compare" id="gawd_metric_compare" class="gawd_draw_analytics load_tooltip" data-hint="Select the second metric to compare reports.">
243
+ <option value="0"><?php echo __('None', 'gawd'); ?></option>
244
+ <option value="totalEvents" ><?php echo __('Total Events', 'gawd'); ?></option>
245
+ <option value="uniqueEvents" ><?php echo __('Unique Events', 'gawd'); ?></option>
246
+ <option value="eventValue" ><?php echo __('Event Value', 'gawd'); ?></option>
247
+ <option value="avgEventValue" ><?php echo __('Average Event Value', 'gawd'); ?></option>
248
+ <option value="sessionsWithEvent" ><?php echo __('Session with Event', 'gawd'); ?></option>
249
+ <option value="eventsPerSessionWithEvent" ><?php echo __('Events per Session with Event ', 'gawd'); ?></option>
250
+ </select>
251
+ <img src="<?php echo GAWD_URL. '/assets/cleardot.gif';?>"/>
252
+ </div>
253
+ <?php
254
+ }
255
+ elseif($tab == 'goals'){
256
+ ?>
257
+ <div id="first_metric" >
258
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
259
+ <?php
260
+ if (!empty($goals)) {
261
+ foreach ($goals as $goal) {
262
+ echo '<option value="'. $goal['name'] . '">' . $goal['name'] . ' (Goal' . $goal['id'] . ' Completions)' . '</option>';
263
+ }
264
+ }
265
+ ?>
266
+ </select>
267
+ </div>
268
+ <div id="metric_compare">
269
+ <select name="gawd_metric_compare" id="gawd_metric_compare" class="gawd_draw_analytics load_tooltip" data-hint="Select the second metric to compare reports.">
270
+ <option value="0"><?php echo __('None', 'gawd'); ?></option>
271
+ <?php
272
+ if (!empty($goals)) {
273
+ foreach ($goals as $goal) {
274
+ echo '<option value="' . $goal['name'] . '">' . $goal['name'] . ' (Goal' . $goal['id'] . ' Completions)' . '</option>';
275
+ }
276
+ }
277
+ ?>
278
+ </select>
279
+ <img src="<?php echo GAWD_URL. '/assets/cleardot.gif';?>"/>
280
+ </div>
281
+ <?php
282
+ }
283
+ elseif($tab == 'siteSpeed'){
284
+ ?>
285
+ <div id="first_metric" >
286
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
287
+ <option value="avgPageLoadTime" ><?php echo __('Avg. Page Load Time', 'gawd'); ?></option>
288
+ <option value="avgRedirectionTime" ><?php echo __('Avg. Redirection Time', 'gawd'); ?></option>
289
+ <option value="avgServerResponseTime" ><?php echo __('Avg. Server Response Time', 'gawd'); ?></option>
290
+ <option value="avgPageDownloadTime" ><?php echo __('Avg. Page Download Time', 'gawd'); ?></option>
291
+ </select>
292
+ </div>
293
+ <div id="metric_compare">
294
+ <select name="gawd_metric_compare" id="gawd_metric_compare" class="gawd_draw_analytics load_tooltip" data-hint="Select the second metric to compare reports.">
295
+ <option value="0"><?php echo __('None', 'gawd'); ?></option>
296
+ <option value="avgPageLoadTime" ><?php echo __('Avg. Page Load Time', 'gawd'); ?></option>
297
+ <option value="avgRedirectionTime" ><?php echo __('Avg. Redirection Time', 'gawd'); ?></option>
298
+ <option value="avgServerResponseTime" ><?php echo __('Avg. Server Response Time', 'gawd'); ?></option>
299
+ <option value="avgPageDownloadTime" ><?php echo __('Avg. Page Download Time', 'gawd'); ?></option>
300
+ </select>
301
+ <img src="<?php echo GAWD_URL. '/assets/cleardot.gif';?>"/>
302
+ </div>
303
+ <?php
304
+ }
305
+ elseif($tab == 'adsense'){
306
+ ?>
307
+ <div id="first_metric" >
308
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
309
+ <option value="adsenseRevenue" ><?php echo __('AdSense Revenue', 'gawd'); ?></option>
310
+ <option value="adsenseAdsClicks" ><?php echo __('AdSense Ads Clicked', 'gawd'); ?></option>
311
+ </select>
312
+ </div>
313
+ <div id="metric_compare">
314
+ <select name="gawd_metric_compare" id="gawd_metric_compare" class="gawd_draw_analytics load_tooltip" data-hint="Select the second metric to compare reports.">
315
+ <option value="0"><?php echo __('None', 'gawd'); ?></option>
316
+ <option value="adsenseRevenue" ><?php echo __('AdSense Revenue', 'gawd'); ?></option>
317
+ <option value="adsenseAdsClicks" ><?php echo __('AdSense Ads Clicked', 'gawd'); ?></option>
318
+ </select>
319
+ <img src="<?php echo GAWD_URL. '/assets/cleardot.gif';?>"/>
320
+ </div>
321
+ <?php
322
+ }
323
+ elseif($tab == 'socialActivityNetworkAction' || $tab == 'socialActivityAction' || $tab == 'socialActivityTagsSummary' || $tab == 'socialActivityPost' || $tab == 'socialActivityTimestamp' || $tab == 'socialActivityUserProfileUrl' || $tab == 'socialActivityContentUrl' || $tab == 'socialActivityUserPhotoUrl' || $tab == 'socialActivityUserHandle' || $tab == 'socialActivityEndorsingUrl' || $tab == 'socialEndorsingUrl' || $tab == 'socialActivityDisplayName'){
324
+ ?>
325
+ <div id="first_metric" >
326
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
327
+ <option value="socialActivities" ><?php echo __('Social Activity', 'gawd'); ?></option>
328
+ </select>
329
+ </div>
330
+ <?php
331
+ }
332
+ elseif($tab == 'adGroup'){
333
+ ?>
334
+ <div id="first_metric" >
335
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
336
+ <option value="adClicks" ><?php echo __('Clicks', 'gawd'); ?></option>
337
+ <option value="adCost" ><?php echo __('Cost', 'gawd'); ?></option>
338
+ </select>
339
+ </div>
340
+ <div id="metric_compare">
341
+ <select name="gawd_metric_compare" id="gawd_metric_compare" class="gawd_draw_analytics load_tooltip" data-hint="Select the second metric to compare reports.">
342
+ <option value="0"><?php echo __('None', 'gawd'); ?></option>
343
+ <option value="adClicks" ><?php echo __('Clicks', 'gawd'); ?></option>
344
+ <option value="adCost" ><?php echo __('Cost', 'gawd'); ?></option>
345
+ </select>
346
+ <img src="<?php echo GAWD_URL. '/assets/cleardot.gif';?>"/>
347
+ </div>
348
+ <?php
349
+ }
350
+ elseif($tab == 'productCategory' || $tab == 'productName' || $tab == 'productSku'){
351
+ ?>
352
+ <div id="first_metric" >
353
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
354
+ <option value="itemRevenue" ><?php echo __('Revenue', 'gawd'); ?></option>
355
+ <option value="uniquePurchases" ><?php echo __('Unique Purchases', 'gawd'); ?></option>
356
+ <option value="itemQuantity" ><?php echo __('Quantity', 'gawd'); ?></option>
357
+ <option value="itemsPerPurchase" ><?php echo __('Average QTY', 'gawd'); ?></option>
358
+ </select>
359
+ </div>
360
+ <div id="metric_compare">
361
+ <select name="gawd_metric_compare" id="gawd_metric_compare" class="gawd_draw_analytics load_tooltip" data-hint="Select the second metric to compare reports.">
362
+ <option value="0"><?php echo __('None', 'gawd'); ?></option>
363
+ <option value="itemRevenue" ><?php echo __('Revenue', 'gawd'); ?></option>
364
+ <option value="uniquePurchases" ><?php echo __('Unique Purchases', 'gawd'); ?></option>
365
+ <option value="itemQuantity" ><?php echo __('Quantity', 'gawd'); ?></option>
366
+ <option value="itemsPerPurchase" ><?php echo __('Average QTY', 'gawd'); ?></option>
367
+ </select>
368
+ <img src="<?php echo GAWD_URL. '/assets/cleardot.gif';?>"/>
369
+ </div>
370
+ <?php
371
+ }
372
+ elseif($tab == 'transactionId'){
373
+ ?>
374
+ <div id="first_metric" >
375
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
376
+ <option value="transactionRevenue" ><?php echo __('Revenue', 'gawd'); ?></option>
377
+ <option value="transactionTax" ><?php echo __('Tax', 'gawd'); ?></option>
378
+ <option value="transactionShipping" ><?php echo __('Shipping', 'gawd'); ?></option>
379
+ <option value="itemQuantity" ><?php echo __('Quantity', 'gawd'); ?></option>
380
+ </select>
381
+ </div>
382
+ <div id="metric_compare">
383
+ <select name="gawd_metric_compare" id="gawd_metric_compare" class="gawd_draw_analytics load_tooltip" data-hint="Select the second metric to compare reports.">
384
+ <option value="0"><?php echo __('None', 'gawd'); ?></option>
385
+ <option value="transactionRevenue" ><?php echo __('Revenue', 'gawd'); ?></option>
386
+ <option value="transactionTax" ><?php echo __('Tax', 'gawd'); ?></option>
387
+ <option value="transactionShipping" ><?php echo __('Shipping', 'gawd'); ?></option>
388
+ <option value="itemQuantity" ><?php echo __('Quantity', 'gawd'); ?></option>
389
+ </select>
390
+ <img src="<?php echo GAWD_URL. '/assets/cleardot.gif';?>"/>
391
+ </div>
392
+ <?php
393
+ }
394
+ elseif($tab == 'sales_performance'){
395
+ ?>
396
+ <div id="first_metric" >
397
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
398
+ <option value="transactionRevenue" ><?php echo __('Revenue', 'gawd'); ?></option>
399
+ <option value="transactionsPerSession" ><?php echo __('Ecommerce Conversion Rate', 'gawd'); ?></option>
400
+ </select>
401
+ </div>
402
+
403
+ <?php
404
+ }
405
+ elseif($tab == 'daysToTransaction'){
406
+ ?>
407
+ <div id="first_metric" >
408
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
409
+ <option value="transactions" ><?php echo __('Transactions', 'gawd'); ?></option>
410
+ </select>
411
+ </div>
412
+
413
+ <?php
414
+ }
415
+ elseif(strpos($tab,'custom_report')!==false){
416
+ $tab = substr($page,14);
417
+ ?>
418
+ <div id="first_metric" >
419
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
420
+ <option value="<?php echo $get_custom_reports[$tab]['metric'];?>" ><?php echo __(preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $get_custom_reports[$tab]['metric'])))), 'gawd'); ?></option>
421
+
422
+ </select>
423
+ </div>
424
+ <?php
425
+ $tab = $get_custom_reports[$tab]['dimension'];
426
+ }
427
+ elseif($tab == 'custom') { ?>
428
+ <div id="first_metric" >
429
+ <select name="gawd_metric" id="gawd_metric" class="gawd_draw_analytics load_tooltip" data-hint="Choose a metric to view overview graph.">
430
+ <option value="sessions"><?php echo __('Sessions', 'gawd'); ?></option>
431
+ <option value="percentNewSessions"><?php echo __('% New Sessions', 'gawd'); ?></option>
432
+ <option value="users" ><?php echo __('Users', 'gawd'); ?></option>
433
+ <option value="bounceRate" ><?php echo __('Bounce Rate', 'gawd'); ?></option>
434
+ <option value="avgSessionDuration" ><?php echo __('Avg Session Duration', 'gawd'); ?></option>
435
+ <option value="pageviews" ><?php echo __('Pageviews', 'gawd'); ?></option>
436
+ <option value="pageviewsPerSession" ><?php echo __('Pages/Session', 'gawd'); ?></option>
437
+ </select>
438
+ </div>
439
+ <div id="metric_compare">
440
+ <?php
441
+ $dimensions = $gawd_client->get_custom_dimensions();
442
+ if('no_custom_dimensions_exist' == $dimensions) { ?>
443
+ <select class="load_tooltip" data-hint="Select the second metric to compare reports.">
444
+ <option value="0">There are no custom dimensions set for current profile.</option>
445
+ </select>
446
+ <?php } else { ?>
447
+ <select name="gawd_custom_option" id="gawd_custom_option" class="gawd_draw_analytics">
448
+ <?php foreach ($dimensions as $dimension) : ?>
449
+ <option value="<?php echo $dimension['id'] ?>"><?php echo $dimension['name'] ?></option>
450
+ <?php endforeach; ?>
451
+ </select>
452
+ <img src="<?php echo GAWD_URL. '/assets/cleardot.gif';?>"/>
453
+ <?php }
454
+ ?>
455
+ </div>
456
+ <?php } ?>
457
+ </div>
458
+
459
+ <input id="gawd_tab" type="hidden" value="<?php echo $tab; ?>">
460
+
461
+ <?php if($tab != 'custom' && $tab != 'pagePath' && $tab != 'landingPagePath' && $tab != 'realTime' && $tab != 'daysToTransaction' && $tab != 'sales_performance' && strpos($_GET['tab'],'custom_report') === false) { ?>
462
+ <div class="vs_image" class="gawd_metrics">
463
+ <img width="30px" src="<?php echo GAWD_URL;?>/assets/vs.png">
464
+ </div>
465
+ <?php } ?>
466
+ <div class='clear'></div>
467
+ </div>
468
+ <?php if($tab != 'realTime') { ?>
469
+ <div id="date_chart_conteiner" class="float_conteiner">
470
+ <div class="gawd_row load_tooltip" data-hint="Choose Line, Pie or Column chart type to view your Google Analytics report with.">
471
+ <div id="gawd_text" class="gawd_text">
472
+ CHART
473
+ </div>
474
+ <div class="gawd_content" id="gawd_content_chart" >
475
+ <select name="gawd_chart_type" id="gawd_chart_type" class="gawd_draw_analytics">
476
+ <?php if($tab == 'userGender' || $tab == 'userAgeBracket' || $tab == 'userType' || $tab == 'country' || $tab == 'language' || $tab == 'mobileDeviceInfo' || $tab == 'deviceCategory' || $tab == 'operatingSystem' || $tab == 'browser'){
477
+ ?>
478
+ <option value="pie" ><?php echo __('Pie Chart', 'gawd'); ?></option>
479
+ <option value="column" ><?php echo __('Columns', 'gawd'); ?></option>
480
+ <option value="line" ><?php echo __('Line Chart', 'gawd'); ?></option>
481
+ <?php
482
+ }
483
+ else{
484
+ ?>
485
+ <option value="line" ><?php echo __('Line Chart', 'gawd'); ?></option>
486
+ <option value="pie" ><?php echo __('Pie Chart', 'gawd'); ?></option>
487
+ <option value="column" ><?php echo __('Columns', 'gawd'); ?></option>
488
+ <?php };?>
489
+ </select>
490
+ </div>
491
+ <div class='clear'></div>
492
+ </div >
493
+ <div class="gawd_row load_tooltip" data-hint="Select one of predefined date ranges or specify a custom period for your report.">
494
+ <div class="gawd_text" >
495
+ DATE
496
+ </div>
497
+ <div class="gawd_content" id="gawd_content_range" >
498
+ <div id="reportrange" class="pull-right" style="float:none !important">
499
+ <span></span> <b class="caret"></b>
500
+ </div>
501
+ <input type="hidden" id="gawd_start_end_date"/>
502
+ </div>
503
+ <div class='clear'></div>
504
+ </div>
505
+ <div class='clear'></div>
506
+ </div>
507
+ <?php } ?>
508
+ <div id="compare_time_conteiner" class="float_conteiner">
509
+ <?php if(($tab == 'date') || ($tab == 'adsense') || ($tab == 'siteSpeed') || $tab == 'sales_performance' || $tab == 'pagePath' || $tab == 'landingPagePath'){ ?>
510
+ <div class="gawd_date_filter_container load_tooltip" data-hint="Set the scale of your statistics graph. It will separate graph results hourly, daily, weekly and monthly.">
511
+ <ul class="gawd_list">
512
+ <li class="gawd_list_item" id="gawd_hour"><a href='#' class="gawd_filter_item" data-type="hour">Hour</a></li>
513
+ <li class="gawd_list_item" id="gawd_day"><a href='#' class="gawd_filter_item" data-type="date">Day</a></li>
514
+ <li class="gawd_list_item" id="gawd_week"><a href='#' class="gawd_filter_item" data-type="week">Week</a></li>
515
+ <li class="gawd_list_item" id="gawd_month"><a href='#' class="gawd_filter_item" data-type="month">Month</a></li>
516
+ </ul>
517
+ </div>
518
+ <div id="compare_datepicker_wraper" class="load_tooltip" data-hint="Measure the results of Google Analytics tracking of two periods. Select Previous Period, Previous Year, or define a custom period using the datepicker.">COMPARE DATE</div>
519
+ <div id="" class="pull-right" style="float:none !important">
520
+ </div>
521
+ <input type="hidden" id="gawd_start_end_date_compare"/>
522
+ <div class='clear'></div>
523
+ <?php } ?>
524
+ </div>
525
+ <div class='clear'></div>
526
+ </div>
527
+ <?php wp_nonce_field('gawd_save_form', 'gawd_save_form_fild'); ?>
528
+ </form>
529
+
530
+ <div class="gawd_chart_conteiner">
531
+ <div id="opacity_div" style="display: none; background-color: rgba(0, 0, 0, 0.2); position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99998;"></div>
532
+ <div id="loading_div" style="display:none; text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
533
+ <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 200px; width:50px;">
534
+ </div>
535
+ <div id="chartdiv"></div>
536
+ <?php if($tab != 'realTime'){
537
+ ?>
538
+ <div id="gawd_buttons">
539
+ <span id="country_filter_reset" class="button_gawd">Back</span>
540
+ <span class='clear'></span>
541
+ <input class="button_gawd" type="button" id="gawd_export_buttons" value="EXPORT"/>
542
+ <input class="button_gawd load_tooltip" type="button" id="gawd_email_button" data-hint="Click to forward this report to selected email recipients, or schedule emails to be sent out periodically." value="EMAIL"/>
543
+ <div class="gawd_exports">
544
+ <a class='button gawd_export_button_csv' href="">CSV</a>
545
+ <a class='button gawd_export_button_pdf' href="#">PDF</a>
546
+ </div>
547
+ </div>
548
+ <?php };?>
549
+ <table id="griddiv"></table>
550
+ <div id="pager"></div>
551
+ </div>
552
+ </div>
553
+ <div class='clear'></div>
554
+
555
+ </div>
556
+ <?php //get parameters for export?>
557
+
558
+ <div class="gawd_email_popup_overlay">
559
+ </div>
560
+ <div class="gawd_email_popup">
561
+ <a href="#" class="gawd_btn">X</a>
562
+ <div class="gawd_email_body">
563
+ <form method="post" action="" id="gawd_email_form">
564
+ <div class="gawd_email_row load_tooltip" data-hint="E-mail to send reports from. You can change it from WordPress Settings > General > Email Address.">
565
+ <div class="gawd_email_label">From</div>
566
+ <div class="gawd_email_input gawd_email_input_from">
567
+ <?php echo get_option('admin_email'); ?>
568
+ </div>
569
+ <div class='clear'></div>
570
+ </div>
571
+ <div class="gawd_email_row load_tooltip" data-hint="Define one or more email report recipients separated by commas.">
572
+ <div class="gawd_email_label">To</div>
573
+ <div class="gawd_email_input">
574
+ <input id="gawd_email_to" name="gawd_email_to" class="" type="text" value="">
575
+ </div>
576
+ <div class='clear'></div>
577
+ </div>
578
+ <div class="gawd_email_row load_tooltip" data-hint="Set the subject for email reports.">
579
+ <div class="gawd_email_label">Subject</div>
580
+ <div class="gawd_email_input">
581
+ <input class="gawd_email_subject" name="gawd_email_subject" class="" type="text" value="">
582
+ </div>
583
+ <div class='clear'></div>
584
+ </div>
585
+ <div class="gawd_email_row">
586
+ <div class="gawd_email_attachemnt load_tooltip" data-hint="Select type for report attachments, CSV or PDF.">Attachment</div>
587
+ <div class="gawd_email_input_attachment" >
588
+ <select id="gawd_attachment_type" name="export_type">
589
+ <option value='csv'>CSV</option>
590
+ <option value='pdf'>PDF</option>
591
+ </select>
592
+ </div>
593
+ <div class="gawd_email_input gawd_email_month_day_div" id="gawd_email_month_day" data-hint="Select the day of month to send report on.">
594
+ <div class="gawd_email_day_of_week">Day of Month</div>
595
+ </div>
596
+ <div class="gawd_email_input gawd_email_week_day_div" data-hint="Click on weekday to choose email report sending day." id="gawd_email_week_day">
597
+ <div class="gawd_email_day_of_week">Day of Week</div>
598
+ <input type="hidden" name="gawd_email_week_day" id="gawd_email_week_day_hidden" >
599
+ </div>
600
+ <div class='clear'></div>
601
+ </div>
602
+ <div class="gawd_email_row">
603
+ <div class="gawd_email_frequency" data-hint="Send email report Once or set its frequency to Daily, Weekly or Monthly.">Frequency</div>
604
+ <div class="gawd_email_input_frequency" id="gawd_email_period">
605
+ <select name="gawd_email_period">
606
+ <option value="once">Once</option>
607
+ <option value="daily">Daily</option>
608
+ <option value="gawd_weekly">Weekly</option>
609
+ <option value="gawd_monthly">Monthly</option>
610
+ </select>
611
+ </div>
612
+ <div class="gawd_email_input gawd_email_month_day_div" id="gawd_email_month_day">
613
+ <div class="gawd_email_month_day">
614
+ <select id="gawd_email_month_day_select" name="gawd_email_month_day">
615
+ <?php
616
+ for($i=1; $i<29; $i++){
617
+
618
+ echo '<option value="'.$i.'">'.$i.'</option>';
619
+ }
620
+ ?>
621
+ <option value="last">Last Day</option>
622
+ </select>
623
+ </div>
624
+ <div class='clear'></div>
625
+ </div>
626
+ <div class="gawd_email_input gawd_email_week_day_div" id="gawd_email_week_day">
627
+ <div class="gawd_email_week_days">
628
+ <ul class="gawd_email_week_day_ul">
629
+ <li class="gawd_email_week_day" data-atribute="sunday">Sun</li>
630
+ <li class="gawd_email_week_day" data-atribute="monday">Mon</li>
631
+ <li class="gawd_email_week_day" data-atribute="tuesday">Tue</li>
632
+ <li class="gawd_email_week_day" data-atribute="wednsday">Wed</li>
633
+ <li class="gawd_email_week_day" data-atribute="thursday">Thu</li>
634
+ <li class="gawd_email_week_day" data-atribute="friday">Fri</li>
635
+ <li class="gawd_email_week_day" data-atribute="saturday">Sat</li>
636
+ </ul>
637
+ </div>
638
+ <input type="hidden" name="gawd_email_week_day" id="gawd_email_week_day_hidden" >
639
+ </div>
640
+ <div class='clear'></div>
641
+ </div>
642
+ <div class="gawd_email_row gawd_email_message_label" data-hint="Compose email content to be sent with your report.">
643
+ Additional Message
644
+ </div>
645
+ <div class="gawd_email_row gawd_email_message">
646
+ <textarea name="gawd_email_body" id="gawd_email_body"></textarea>
647
+ </div>
648
+ <input name="gawd_email_from" id="gawd_email_from" class="" type="hidden" value="<?php echo get_option('admin_email'); ?>">
649
+ <input name="gawd_metric" id="gawd_email_metric" class="" type="hidden" value="">
650
+ <input name="gawd_metric_compare" id="gawd_metric_compare" class="" type="hidden" value="">
651
+ <input name="gawd_dimension" id="gawd_dimension" class="" type="hidden" value="<?php echo $tab; ?>">
652
+ <input name="gawd_start_date" id="gawd_start_date" class="" type="hidden" value="">
653
+ <input name="gawd_end_date" id="gawd_end_date" class="" type="hidden" value="">
654
+ <input name="action" id="" class="" type="hidden" value="gawd_export">
655
+ <input name="report_type" id="report_type" class="" type="hidden" value="email">
656
+ <div class="gawd_email_send" id="email_submit">
657
+ Send
658
+ </div>
659
+ <?php wp_nonce_field('gawd_save_form', 'gawd_save_form_fild'); ?>
660
+ </form>
661
+ </div>
662
+ <div class="email_message_cont"></div>
663
+ </div>
664
+ <canvas id='canvass' style="display:none"></canvas>
665
+ <input id="first_data" class="" type="hidden" value="">
666
+ <input id="second_data" class="" type="hidden" value="">
667
+ <input id="dimension" class="" type="hidden" value="">
668
+ <input id="first_data_sum" class="" type="hidden" value="">
669
+ <input id="second_data_sum" class="" type="hidden" value="">
670
+ <input id="second_start_date" class="" type="hidden" value="">
671
+ <input id="second_end_date" class="" type="hidden" value="">
admin/pages/dashboard_menu.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function gawd_write_menu($tabs, $title = true){
3
+ $sub_arrow = '<span class="gawd_menu_li_sub_arrow"></span>';
4
+ foreach ($tabs as $tab_key => $tab_data){
5
+ if(!$title){
6
+ $tab_data["title"] = "";
7
+ $sub_arrow = '';
8
+ }
9
+ if($tab_data["childs"] == array()){
10
+ $active_tab = $_GET['tab'] == $tab_key ? 'gawd_active_li' : '';
11
+ if($tab_key == 'customReport'){
12
+ echo ' <li class="gawd_menu_li load_tooltip '.$active_tab.'" id="gawd_'.$tab_key.'" data-hint="'.$tab_data["desc"].'">
13
+ <a class="gawd_menu_item " href="'.admin_url().'admin.php?page=gawd_custom_reports">'.$tab_data["title"].'</a>
14
+ </li>';
15
+ }
16
+ elseif($tab_key == 'custom'){
17
+ echo ' <li class="gawd_menu_li load_tooltip '.$active_tab.'" id="gawd_'.$tab_key.'" data-hint="'.$tab_data["desc"].'">
18
+ <a class="gawd_menu_item " href="'.admin_url().'admin.php?page=gawd_tracking">'.$tab_data["title"].'</a>
19
+ </li>';
20
+ }
21
+ elseif($tab_key == 'adsense' || $tab_key == 'adWords'){
22
+ echo ' <li class="gawd_menu_li load_tooltip '.$active_tab.'" id="gawd_'.$tab_key.'" data-hint="'.$tab_data["desc"].'">
23
+ <a class="gawd_menu_item " href="#">'.$tab_data["title"].'</a>
24
+ </li>';
25
+ }
26
+ else{
27
+ echo ' <li class="gawd_menu_li load_tooltip '.$active_tab.'" id="gawd_'.$tab_key.'" data-hint="'.$tab_data["desc"].'">
28
+ <a class="gawd_menu_item " href="'.admin_url().'admin.php?page=gawd_reports&tab='.$tab_key.'">'.$tab_data["title"].'</a>
29
+ </li>';
30
+ }
31
+ }
32
+ else{
33
+ if($tab_key == 'customReport'){
34
+ echo ' <li class="gawd_menu_li " id="gawd_'.$tab_key.'_li">
35
+ <span id="gawd_'.$tab_key.'s" class="gawd_menu_li_sub">'.$tab_data["title"].$sub_arrow.'
36
+ </span>
37
+ <ul id="gawd_'.$tab_key.'_ul">';
38
+ }
39
+ else{
40
+ echo ' <li class="gawd_menu_li load_tooltip" id="gawd_'.$tab_key.'_li" data-hint="'.$tab_data["desc"].'">
41
+ <span id="gawd_'.$tab_key.'" class="gawd_menu_li_sub">'.$tab_data["title"].$sub_arrow.'
42
+ </span>
43
+ <ul id="gawd_'.$tab_key.'_ul">';
44
+ }
45
+ foreach($tab_data["childs"] as $child_key => $child_title) {
46
+ if(!$title){
47
+ $child_title = "";
48
+ }
49
+ $active_tab = $_GET['tab'] == $child_key ? 'gawd_active_li' : '';
50
+ if($child_key == 'productCategory' || $child_key == 'productName' || $child_key == 'productSku' || $child_key == 'transactionId' || $child_key == 'sales_performance' || $child_key == 'daysToTransaction'){
51
+ echo ' <li class="gawd_menu_ul_li '.$active_tab.'">
52
+ <a class="gawd_menu_item " href="#">'.$child_title.'</a>
53
+ </li> ';
54
+ }
55
+ else{
56
+ echo ' <li class="gawd_menu_ul_li '.$active_tab.'">
57
+ <a class="gawd_menu_item " href="'.admin_url().'admin.php?page=gawd_reports&tab='.$child_key.'">'.$child_title.'</a>
58
+ </li> ';
59
+ }
60
+ }
61
+ echo '</ul>
62
+ </li>';
63
+ }
64
+ }
65
+ }
66
+ function gawd_write_menu_collapse($tabs, $title = true){
67
+ $sub_arrow = '<span class="gawd_menu_li_sub_arrow"></span>';
68
+ foreach ($tabs as $tab_key => $tab_data){
69
+ if(!$title){
70
+ $tab_data["title"] = "";
71
+ $sub_arrow = '';
72
+ }
73
+ if($tab_data["childs"] == array()){
74
+ $active_tab = $_GET['tab'] == $tab_key ? 'gawd_active_li' : '';
75
+ if($tab_key == 'customReport'){
76
+ echo '<a id="gawd_'.$tab_key.'" class="'.$active_tab.' gawd_menu_item " href="'.admin_url().'admin.php?page=gawd_custom_reports">'.$tab_data["title"].'</a>';
77
+ }
78
+ else{
79
+ echo '<a id="gawd_'.$tab_key.'" class="'.$active_tab.' gawd_menu_item " href="'.admin_url().'admin.php?page=gawd_reports&tab='.$tab_key.'">'.$tab_data["title"].'</a>';
80
+ }
81
+ }
82
+ else{
83
+ if($tab_key == 'customReport'){
84
+ echo '<span id="gawd_'.$tab_key.'_li" id="gawd_'.$tab_key.'s" class="gawd_menu_li_sub">'.$tab_data["title"].$sub_arrow.'
85
+ <div class="collapse_ul" id="gawd_'.$tab_key.'_ul">';
86
+ }
87
+ else{
88
+ echo '<span id="gawd_'.$tab_key.'_li" id="gawd_'.$tab_key.'" class="gawd_menu_li_sub">'.$tab_data["title"].$sub_arrow.'
89
+ <div class="collapse_ul" id="gawd_'.$tab_key.'_ul">';
90
+ }
91
+ foreach($tab_data["childs"] as $child_key => $child_title) {
92
+ $active_tab = $_GET['tab'] == $child_key ? 'gawd_active_li_text' : '';
93
+ echo '<a class="'.$active_tab.' gawd_menu_item " href="'.admin_url().'admin.php?page=gawd_reports&tab='.$child_key.'">'.$child_title.'</a>';
94
+ }
95
+ echo '</div></span>';
96
+ }
97
+ }
98
+
99
+ }
100
+ ?>
101
+ <div class="resp_menu"><div class="menu_img"></div><div class="button_label">REPORTS</div><div class="clear"></div></div>
102
+
103
+ <div class="gawd_menu_coteiner_collapse">
104
+ <div class="gawd_menu_ul">
105
+ <?php
106
+ gawd_write_menu_collapse($tabs,false);
107
+ ?>
108
+ <span class='gawd_collapsed'></span>
109
+ </div>
110
+ </div>
111
+ <div class="gawd_menu_coteiner">
112
+ <input style="width: 100%; margin-bottom: 5px;" onkeyup="gawd_search()" type="text" class='gawd_search_input'/>
113
+ <ul class="gawd_menu_ul">
114
+ <?php
115
+
116
+ gawd_write_menu($tabs);
117
+ ?>
118
+ <li class='gawd_collapse'>Collapse menu</li>
119
+ </ul>
120
+ </div>
admin/pages/dashboard_widget.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <form method="post" id="gawd_dashboard_wp">
2
+ <select title="Click to pick the website, audience report of which you’d like to display." style="width: 41%; margin-right: 20px;" class="gawd_profile_select" name="gawd_id" onchange="change_account(this)">
3
+ <?php foreach ($profiles as $property_name => $property): ?>
4
+ <optgroup label="<?php echo $property_name; ?>">
5
+ <?php foreach ($property as $profile):
6
+ $webPropertyId = $profile['webPropertyId'];
7
+ $id = $profile['id'];
8
+ $name = $profile['name'];
9
+ $selected = '';
10
+ if($id == $gawd_user_data['gawd_id']){
11
+ $selected = 'selected="selected"';
12
+ }
13
+ ?>
14
+ <option value="<?php echo $id; ?>" <?php echo $selected; ?>><?php echo $property_name.' - '.$name ; ?></option>
15
+ <?php endforeach ?>
16
+ </optgroup>
17
+ <?php endforeach ?>
18
+ </select>
19
+ <input type="hidden" name='web_property_name' id='web_property_name'/>
20
+ <select name="gawd_widget_date" id="gawd_widget_date" onchange="gawd_draw_analytics_widget()">
21
+ <option value="<?php echo date('Y-m-d', strtotime('-7 days')); ?>"><?php echo __('Last 7 Days', 'gawd'); ?></option>
22
+ <option value="<?php echo date('Y-m-d', strtotime('-30 days')); ?>"><?php echo __('Last 30 Days', 'gawd'); ?></option>
23
+ <option value="realTime" ><?php echo __('Real Time', 'gawd'); ?></option>
24
+ </select>
25
+ <select name="gawd_metric_widget" id="gawd_metric_widget" onchange="gawd_draw_analytics_widget()">
26
+ <option value="sessions"><?php echo __('Sessions', 'gawd'); ?></option>
27
+ <option value="users" ><?php echo __('Users', 'gawd'); ?></option>
28
+ <option value="bounceRate" ><?php echo __('Bounce Rate', 'gawd'); ?></option>
29
+ <option value="pageviews" ><?php echo __('Pageviews', 'gawd'); ?></option>
30
+ <option value="percentNewSessions">% New Sessions</option>
31
+ <option value="avgSessionDuration">Avg Session Duration</option>
32
+ <option value="pageviewsPerSession" ><?php echo __('Pages/Session', 'gawd'); ?></option>
33
+ </select>
34
+ </form>
35
+
36
+ <div id="chart_widget"></div>
37
+
38
+ <script>
39
+ function change_account(that){
40
+ jQuery('#web_property_name').val(jQuery(that).find(':selected').closest('optgroup').attr('label'));
41
+ jQuery('#gawd_dashboard_wp').submit();
42
+ }
43
+ </script>
admin/pages/date.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="gawd_wrapper">
2
+ <div class="opacity_div_compact"> </div>
3
+ <div class="loading_div_compact">
4
+ <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 200px; width:50px;">
5
+ </div>
6
+ <div style="float:left">
7
+ <div id="first_metric" >
8
+ <select class="gawd_compact_metric_change" name="gawd_metric_compact" id="gawd_metric_compact" >
9
+ <option value="sessions"><?php echo __('Sessions', 'gawd'); ?></option>
10
+ <option value="percentNewSessions"><?php echo __('% New Sessions', 'gawd'); ?></option>
11
+ <option value="users" ><?php echo __('Users', 'gawd'); ?></option>
12
+ <option value="bounceRate" ><?php echo __('Bounce Rate', 'gawd'); ?></option>
13
+ <option value="avgSessionDuration" ><?php echo __('Avg Session Duration', 'gawd'); ?></option>
14
+ <option value="pageviews" ><?php echo __('Pageviews', 'gawd'); ?></option>
15
+ <option value="pageviewsPerSession" ><?php echo __('Pages/Session', 'gawd'); ?></option>
16
+ </select>
17
+ </div>
18
+ <div id="metric_compare">
19
+ <select class="gawd_compact_metric_change" name="gawd_metric_compare" id="gawd_metric_compare_compact">
20
+ <option value="users" ><?php echo __('Users', 'gawd'); ?></option>
21
+ <option value="sessions"><?php echo __('Sessions', 'gawd'); ?></option>
22
+ <option value="percentNewSessions"><?php echo __('% New Sessions', 'gawd'); ?></option>
23
+ <option value="bounceRate" ><?php echo __('Bounce Rate', 'gawd'); ?></option>
24
+ <option value="avgSessionDuration" ><?php echo __('Avg Session Duration', 'gawd'); ?></option>
25
+ <option value="pageviews" ><?php echo __('Pageviews', 'gawd'); ?></option>
26
+ <option value="pageviewsPerSession" ><?php echo __('Pages/Session', 'gawd'); ?></option>
27
+ <option value="0"><?php echo __('None', 'gawd'); ?></option>
28
+ </select>
29
+ </div>
30
+ </div>
31
+ <div style="float:left;margin:16px 0 0 0 " class="vs_image" class="gawd_metrics">
32
+ <img width="30px" src="<?php echo GAWD_URL; ?>/assets/vs.png">
33
+ </div>
34
+ <div class="clear"></div>
35
+
36
+ <div id="gawd_date_meta"></div>
37
+ </div>
38
+ <script>
39
+ jQuery(document).ready(function(){
40
+ hide_same_metric(jQuery('#gawd_metric_compare_compact'));
41
+ hide_same_metric(jQuery('#gawd_metric_compact'));
42
+ var _end_date = (Date.today().add(-1).days()).toString("yyyy-MM-dd");
43
+ var start_date_7 = (Date.today().add(-1).days()).add(-7).days().toString("yyyy-MM-dd");
44
+ var start_end_date = typeof jQuery('#gawd_start_end_date_compact').val() != 'undefined' ? jQuery('#gawd_start_end_date_compact').val() : start_date_7 + '/-/' + _end_date;
45
+
46
+ var start_end_date = start_end_date.split('/-/');
47
+ var start_date = start_end_date[0];
48
+ var end_date = start_end_date[1];
49
+ jQuery('#gawd_metric_compact').on('change', function () {
50
+ hide_same_metric(this);
51
+ gawd_draw_analytics_compact(jQuery('#gawd_metric_compact').val(), jQuery('#gawd_metric_compare_compact').val(), 'date', 'line', 'gawd_date_meta');
52
+ })
53
+ jQuery('#gawd_metric_compare_compact').on('change', function () {
54
+ hide_same_metric(this);
55
+ gawd_draw_analytics_compact(jQuery('#gawd_metric_compact').val(), jQuery('#gawd_metric_compare_compact').val(), 'date', 'line', 'gawd_date_meta');
56
+ })
57
+ //gawd_draw_analytics_compact('sessions', 'users', 'date', 'line', start_date, end_date, 'gawd_date_meta');
58
+
59
+ });
60
+ </script>
admin/pages/goals.php ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $profiles = $gawd_client->get_default_profiles();
3
+ $goals = $gawd_client->get_default_goals();
4
+ if (!is_array($goals)) {
5
+ $goals = array();
6
+ }
7
+ ?>
8
+ <div class="goal_wrap">
9
+ <h3 class="gawd_page_titles">Goal Management</h3>
10
+
11
+ <p>You can set and manage goals for your website tracking. Select the View that you’re going to track and configure these options based on the type of goal you would like to set.</p>
12
+ <form action='' method="post" id="gawd_goal_form">
13
+ <div class="gawd_goal_row">
14
+ <span class="gawd_goal_label">View</span>
15
+ <span class="gawd_goal_input">
16
+ <select name="gawd_goal_profile" class="gawd_goal_profile">
17
+ <?php foreach ($profiles as $profile) {
18
+ echo '<option value="' . $profile['id'] . '">' . $profile['webPropertyName'] . ' - ' . $profile['name'] . '</option>';
19
+ } ?>
20
+ </select>
21
+ </span>
22
+ <div class="gawd_info" title="Choose the website, to which you would like to set Google Analytics Goals. "></div>
23
+ <div class='clear'></div>
24
+ </div>
25
+ <div class="gawd_goal_row">
26
+ <span class="gawd_goal_label">Name</span>
27
+ <span class="gawd_goal_input">
28
+ <input id="gawd_goal_name" name="gawd_goal_name" class="" type="text" value="">
29
+ </span>
30
+ <div class="gawd_info" title="Provide a name for this goal"></div>
31
+ <div class='clear'></div>
32
+ </div>
33
+ <div class="gawd_goal_row">
34
+ <span class="gawd_goal_label">Type</span>
35
+ <span class="gawd_goal_input">
36
+ <select name="gawd_goal_type" class="gawd_goal_type">
37
+ <option value="URL_DESTINATION">Destination</option>
38
+ <option value="VISIT_TIME_ON_SITE">Duration</option>
39
+ <option value="VISIT_NUM_PAGES">Pages/Screens per session</option>
40
+ <!-- <option value="EVENT">Event</option> -->
41
+ </select>
42
+ </span>
43
+ <div class="gawd_info" title="Select its type (Destination, Duration, Pages/Screens per session or Event)."></div>
44
+ <div class='clear'></div>
45
+ </div>
46
+ <div class="gawd_goal_duration_wrap" id="gawd_goal_duration_wrap">
47
+ <div class="gawd_duration_label">Duration</div>
48
+ <div class="gawd_comparison_input">
49
+ <select name="gawd_goal_duration_comparison" class="gawd_goal_duration_comparison">
50
+ <option value="GREATER_THAN">Greater than</option>
51
+ </select>
52
+ </div>
53
+ <div class="gawd_duration">
54
+ <div class="time_wrap">
55
+ <!--<div class="time_label">Hour</div> -->
56
+ <div class="time_input"><input placeholder="hour" type="number" min='0' name="gawd_visit_hour"/></div>
57
+ </div>
58
+ <div class="time_wrap">
59
+ <!--<div class="time_label">Minute</div> -->
60
+ <div class="time_input"><input placeholder="min." type="number" min='0' name="gawd_visit_minute"/></div>
61
+ </div>
62
+ <div class="time_wrap" id="time_wrap">
63
+ <!--<div class="time_label">Second</div> -->
64
+ <div class="time_input"><input placeholder="sec." type="number" min='0' name="gawd_visit_second"/></div>
65
+ </div>
66
+ <div class='clear'></div>
67
+ </div>
68
+ <div class="gawd_info" style="margin-left: 15px" title="Set a duration for this goal. For example, if you select 20 minutes, each time users spend 20 minutes or more on your site, it will be counted as goal completion."></div>
69
+ <div class='clear'></div>
70
+ </div>
71
+ <div class="gawd_page_sessions" id="gawd_page_sessions">
72
+ <div class="gawd_duration_label">Pages per session</div>
73
+ <div class="gawd_comparison_input">
74
+ <select name="gawd_goal_page_comparison" class="gawd_goal_duration_comparison">
75
+ <option value="GREATER_THAN">Greater than</option>
76
+ </select>
77
+ </div>
78
+ <div class="gawd_duration">
79
+ <div class="time_wrap">
80
+ <!--<div class="time_label">Hour</div> -->
81
+ <input type="number" min='0' name="gawd_page_sessions"/>
82
+ </div>
83
+ <div class='clear'></div>
84
+ </div>
85
+ <div class="gawd_info" style="margin-left: 15px" title="Choose the number of pages/screens users should view to complete this goal."></div>
86
+ <div class='clear'></div>
87
+ </div>
88
+ <div class="gawd_page_destination" id="gawd_page_destination">
89
+ <div class="gawd_duration_label">Destination</div>
90
+ <div class="gawd_url_comparison_input" >
91
+ <select name="gawd_goal_page_destination_match" class="gawd_goal_duration_comparison">
92
+ <option value="EXACT">Equals to</option>
93
+ <option value="HEAD">Begins with</option>
94
+ <option value="REGEX">Regular expression</option>
95
+ </select>
96
+ </div>
97
+ <div class="gawd_info" style="margin-left: 8px;" title="Set the destination of your goal. It can be equal to the specified value, as well as begin with it. You can also add a Regular Expression as destination value."></div>
98
+ <div class="gawd_destination_url">
99
+ <label for="gawd_case_sensitive" class="case_sensitive gawd_duration_label">URL</label>
100
+ <div class="time_wrap">
101
+ <div class="time_input"><input type="text" name="gawd_page_url"/></div>
102
+ </div>
103
+ <div class="gawd_info" title="Set destination URL."></div>
104
+ <div class='clear'></div>
105
+ </div>
106
+ <div class="gawd_destination_url">
107
+ <label for="gawd_case_sensitive" class="case_sensitive gawd_duration_label">URL Case sensitive</label>
108
+ <div class="time_wrap">
109
+ <div class="onoffswitch" style="margin: 3px 0 0 6px;">
110
+ <input type="checkbox" name="url_case_sensitve" class="onoffswitch-checkbox" id="gawd_case_sensitive">
111
+ <label class="onoffswitch-label" for="gawd_case_sensitive">
112
+ <span class="onoffswitch-inner"></span>
113
+ <span class="onoffswitch-switch"></span>
114
+ </label>
115
+ </div>
116
+ </div>
117
+ <div class="gawd_info" title="Enable this option to set destination URL case sensitive."></div>
118
+ </div>
119
+
120
+ <div class='clear'></div>
121
+ </div>
122
+ <!-- <div class="gawd_page_event" id="gawd_page_event">
123
+ <div class="event_type_row">
124
+ <div class="gawd_duration_label">Category</div>
125
+ <div class="gawd_event_comparison_input" >
126
+ <select name="gawd_goal_event_match" class="gawd_goal_duration_comparison">
127
+ <option value="EXACT">Equals to</option>
128
+ <option value="HEAD">Begins with</option>
129
+ <option value="REGEX">Regular expresion</option>
130
+ </select>
131
+ </div>
132
+ <div class="gawd_event_name">
133
+ <input type="text" name="gawd_category_name"/>
134
+ <div class='clear'></div>
135
+ </div>
136
+ <div class='clear'></div>
137
+ </div>
138
+ <div class="event_type_row">
139
+ <div class="gawd_duration_label">Action</div>
140
+ <div class="gawd_event_comparison_input" >
141
+ <select name="gawd_goal_event_match" class="gawd_goal_duration_comparison">
142
+ <option value="EXACT">Equals to</option>
143
+ <option value="HEAD">Begins with</option>
144
+ <option value="REGEX">Regular expresion</option>
145
+ </select>
146
+ </div>
147
+ <div class="gawd_event_name">
148
+ <input type="text" name="gawd_action_name"/>
149
+ <div class='clear'></div>
150
+ </div>
151
+ <div class='clear'></div>
152
+ </div>
153
+ <div class="event_type_row">
154
+ <div class="gawd_duration_label">Label</div>
155
+ <div class="gawd_event_comparison_input" >
156
+ <select name="gawd_goal_event_match" class="gawd_goal_duration_comparison">
157
+ <option value="EXACT">Equals to</option>
158
+ <option value="HEAD">Begins with</option>
159
+ <option value="REGEX">Regular expresion</option>
160
+ </select>
161
+ </div>
162
+ <div class="gawd_event_name">
163
+ <input type="text" name="gawd_label_name"/>
164
+ <div class='clear'></div>
165
+ </div>
166
+ <div class='clear'></div>
167
+ </div>
168
+ <div class="event_type_row">
169
+ <div class="gawd_duration_label">Value</div>
170
+ <div class="gawd_event_comparison_input" >
171
+ <select name="gawd_goal_event_match" class="gawd_goal_duration_comparison">
172
+ <option value="EXACT">Equals to</option>
173
+ <option value="GREATER_THAN">Greater than</option>
174
+ <option value="LESS_THAN">Less than</option>
175
+ </select>
176
+ </div>
177
+ <div class="gawd_event_name">
178
+ <input type="text" name="gawd_value_name"/>
179
+ <div class='clear'></div>
180
+ </div>
181
+ <div class='clear'></div>
182
+ </div>
183
+
184
+ </div>-->
185
+ <div class="gawd_buttons" id="goal_submit">
186
+ <input class="button_gawd" type="button" name="add_goal" value="Save"/>
187
+ </div>
188
+ <?php wp_nonce_field('gawd_save_form', 'gawd_save_form_fild'); ?>
189
+ <input class="goal_max_id" id="goal_max_id" name="goal_max_id" type="hidden" value="<?php echo count($goals[$profile_id]);?>"/>
190
+
191
+ </form>
192
+ <?php if (!empty($goals)) {
193
+ $counter = 0;
194
+ foreach ($goals as $profile_id => $profile_goals) { ?>
195
+ <table border="1" class="gawd_table" id="<?php echo $profile_id; ?>" style="<?php echo (($counter != 0) ? 'display:none;' : ''); ?>">
196
+ <tr>
197
+ <th>Id</th>
198
+ <th>Name</th>
199
+ <th>Type</th>
200
+ <th>Match Type</th>
201
+ <th>Value</th>
202
+ </tr>
203
+ <?php
204
+ foreach ($profile_goals as $goal) {
205
+ $case_sensitive = $goal['caseSensitive'] ? ' - case sensitive' : '';
206
+ ?>
207
+ <tr class="gawd_rows">
208
+ <td><?php echo $goal['id']; ?></td>
209
+ <td><?php echo $goal['name']; ?></td>
210
+ <td><?php echo $goal['type']; ?></td>
211
+ <td><?php echo $goal['match_type']; ?></td>
212
+ <td><?php echo $goal['value'].$case_sensitive; ?></td>
213
+ </tr>
214
+ <?php
215
+ }
216
+ ?>
217
+ </table>
218
+ <?php $counter++; }
219
+ } ?>
220
+
221
+ </div>
222
+ <script>
223
+ jQuery('.gawd_goal_type').on('change', function () {
224
+ if (jQuery('.gawd_goal_type :selected').val() == 'VISIT_TIME_ON_SITE') {
225
+ jQuery('.gawd_goal_duration_wrap').show();
226
+ jQuery('.gawd_page_sessions').hide();
227
+ jQuery('.gawd_page_destination').hide();
228
+ jQuery('.gawd_page_event').hide();
229
+ } else if (jQuery('.gawd_goal_type :selected').val() == 'VISIT_NUM_PAGES') {
230
+ jQuery('.gawd_goal_duration_wrap').hide();
231
+ jQuery('.gawd_page_destination').hide();
232
+ jQuery('.gawd_page_event').hide();
233
+ jQuery('.gawd_page_sessions').show();
234
+ } else if (jQuery('.gawd_goal_type :selected').val() == 'EVENT') {
235
+ jQuery('.gawd_goal_duration_wrap').hide();
236
+ jQuery('.gawd_page_sessions').hide();
237
+ jQuery('.gawd_page_destination').hide();
238
+ jQuery('.gawd_page_event').show();
239
+ } else {
240
+ jQuery('.gawd_goal_duration_wrap').hide();
241
+ jQuery('.gawd_page_sessions').hide();
242
+ jQuery('.gawd_page_event').hide();
243
+ jQuery('.gawd_page_destination').show();
244
+ }
245
+ });
246
+ jQuery('.button_gawd').on('click',function(){
247
+ if(jQuery('.gawd_table tr').length -1 >= 20){
248
+ alert('You have reached the maximum number of goals.')
249
+ return;
250
+ }
251
+ jQuery('#goal_max_id').val(jQuery('.gawd_rows').length);
252
+ jQuery('#gawd_goal_form').submit();
253
+ });
254
+ jQuery('.gawd_goal_profile').on('change', function(){
255
+ jQuery('.gawd_table').each(function(){
256
+ jQuery(this).hide();
257
+ });
258
+ var id = jQuery(this).val();
259
+ jQuery('#' + id).show();
260
+ });
261
+ </script>
admin/pages/location.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ <div class="gawd_wrapper">
4
+ <div class="opacity_div_compact">
5
+ <div class="loading_div_compact">
6
+ <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 200px; width:50px;">
7
+ </div>
8
+ </div>
9
+ <table id="griddiv"></table>
10
+ <div id="pager"></div>
11
+ </div>
admin/pages/overview.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <?php
3
+ wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false );
4
+ wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false );
5
+ $new_buttons_refresh = '<button data-hint="Click to refresh this report block." class="handlediv load_tooltip button-link gawd-refresh" type="button" id="{{refreshid}}">' . gawd_icons( 'dashicons-update' ) . '</button>';
6
+ $new_buttons_full = '<button data-hint="Click to navigate to Real Time report on your Reports page." class="handlediv load_tooltip button-link gawd-more" type="button" id="{{moreid}}">' . gawd_icons( 'dashicons-migrate' ) . '</button>';
7
+
8
+ function gawd_icons($dashicons) {
9
+
10
+ return '<img src="' . GAWD_URL . '/assets/' . $dashicons . '.png"/>';
11
+ }
12
+ ?>
13
+
14
+ <?php screen_icon('options-general'); ?>
15
+ <h2 style="margin-top:10px" class="gawd_page_titles"><?php echo get_admin_page_title(); ?></h2>
16
+ <div class="gawd_wrap">
17
+ <div class="gawd_row" style="float:left;width:35%; margin-bottom:0">
18
+ <div class="gawd_text" style="width: 20%;padding: 9px 12px 9px 14px;">
19
+ DATE RANGE
20
+ </div>
21
+ <div class="gawd_content load_tooltip" style="width: 42%;height: 22px;line-height: 22px;" id="gawd_content_range" data-hint="Choose a date range to display Google Analytics report. Select a predefined or custom period and click Apply.">
22
+ <div id="reportrange" class="pull-right" style="float:none !important">
23
+ <span></span> <b class="caret"></b>
24
+ </div>
25
+ <input type="hidden" id="gawd_start_end_date_compact"/>
26
+ </div>
27
+ <div class='clear'></div>
28
+ </div>
29
+ <div class="gawd_profiles" id="gawd_profile_wrapper" style="float:right;width: 63%; margin:0">
30
+ <form method="post" id="gawd_overview">
31
+ <select data-hint="Click to pick the website, overview reports of which you’d like to display." style="width: 41%;" class="gawd_profile_select load_tooltip" name="gawd_id" onchange="change_account(this)">
32
+ <?php foreach ($profiles as $property_name => $property): ?>
33
+ <optgroup label="<?php echo $property_name; ?>">
34
+ <?php foreach ($property as $profile):
35
+ $webPropertyId = $profile['webPropertyId'];
36
+ $id = $profile['id'];
37
+ $name = $profile['name'];
38
+ $selected = '';
39
+ if($id == $gawd_user_data['gawd_id']){
40
+ $selected = 'selected="selected"';
41
+ }
42
+ ?>
43
+ <option value="<?php echo $id; ?>" <?php echo $selected; ?>><?php echo $property_name.' - '.$name ; ?></option>
44
+ <?php endforeach ?>
45
+ </optgroup>
46
+ <?php endforeach ?>
47
+ </select>
48
+ <div class="clear"></div>
49
+ <input type="hidden" name='web_property_name' id='web_property_name'/>
50
+ </form>
51
+ </div>
52
+ <div class="clear"></div>
53
+ <?php wp_nonce_field('closedpostboxes', 'closedpostboxesnonce', false ); ?>
54
+ <?php wp_nonce_field('meta-box-order', 'meta-box-order-nonce', false ); ?>
55
+ <div class="metabox-holder" >
56
+ <div class="postbox-container gawd_normal_metabox_conteiner" >
57
+ <?php do_meta_boxes( 'gawd_analytics', 'normal', '' ); ?>
58
+ </div>
59
+ <div class="postbox-container gawd_side_metabox_conteiner" >
60
+ <?php do_meta_boxes( 'gawd_analytics', 'side', '' ); ?>
61
+ </div>
62
+ </div>
63
+ </div>
64
+
65
+ <script>
66
+ function change_account(that){
67
+ jQuery('#web_property_name').val(jQuery(that).find(':selected').closest('optgroup').attr('label'));
68
+ jQuery('#gawd_overview').submit();
69
+ }
70
+ var buttons_refresh = '<?php echo $new_buttons_refresh; ?>';
71
+ var buttons_full = '<?php echo $new_buttons_full; ?>';
72
+ datepicker_js_compact();
73
+
74
+ </script>
75
+
76
+
admin/pages/real_time.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ <div class="">
4
+ <div class="opacity_div_compact">
5
+ <div class="loading_div_compact">
6
+ <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 30px; width:50px;">
7
+ </div>
8
+ </div>
9
+
10
+ <div id="gawd_real_time_meta"></div>
11
+ </div>
12
+ <script>
13
+ jQuery(document).ready(function(){
14
+ gawd_widget_real_time('#gawd_real_time_meta');
15
+
16
+ })
17
+ </script>
admin/pages/settings.php ADDED
@@ -0,0 +1,546 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $gawd_settings = get_option('gawd_settings');
3
+ $gawd_own_project = get_option('gawd_own_project');
4
+ $gawd_client = GAWD_google_client::get_instance();
5
+ $profiles = $gawd_client->get_profiles();
6
+ $accounts = $gawd_client->get_management_accounts();
7
+ $tabs = get_option('gawd_menu_items');
8
+ $current_user = get_current_user_id();
9
+ $saved_user_menues = get_option('gawd_menu_for_user');
10
+
11
+ if(isset($gawd_own_project) && $gawd_own_project && intval($gawd_own_project)==1){
12
+ $own_credentials = get_option("gawd_credentials");
13
+ $own_cliend_secret = $own_credentials['project_secret'];
14
+ $own_cliend_id = $own_credentials['project_id'];
15
+ echo'<form method="post" style="width: 92.9%;">
16
+ <div class="">
17
+ <input type="hidden" name="reset_data" id="reset_data"/>
18
+ <input type="button" class="button_gawd" id="gawd_reset_button" value="RESET"/>
19
+ <div class="clear"></div>
20
+ </div>
21
+ </form>';
22
+ }
23
+ $filters = $gawd_client->get_management_filters();
24
+ if (!is_array($filters)) {
25
+ $filters = array();
26
+ }
27
+
28
+ $gawd_permissions = isset($gawd_settings['gawd_permissions']) ? $gawd_settings['gawd_permissions'] : array();
29
+ $gawd_excluded_users = isset($gawd_settings['gawd_excluded_users']) ? $gawd_settings['gawd_excluded_users'] : array();
30
+ $gawd_excluded_roles = isset($gawd_settings['gawd_excluded_roles']) ? $gawd_settings['gawd_excluded_roles'] : array();
31
+ $gawd_backend_roles = isset($gawd_settings['gawd_backend_roles']) ? $gawd_settings['gawd_backend_roles'] : array();
32
+ $gawd_frontend_roles = isset($gawd_settings['gawd_frontend_roles']) ? $gawd_settings['gawd_frontend_roles'] : array();
33
+ $gawd_post_page_roles = isset($gawd_settings['gawd_post_page_roles']) ? $gawd_settings['gawd_post_page_roles'] : array();
34
+ $gawd_file_formats = isset($gawd_settings['gawd_file_formats']) ? $gawd_settings['gawd_file_formats'] : '';
35
+ $enable_hover_tooltip = isset($gawd_settings['enable_hover_tooltip']) ? $gawd_settings['enable_hover_tooltip'] : 'on';
36
+ $exclude_events = isset($gawd_settings['exclude_events']) ? $gawd_settings['exclude_events'] : '';
37
+ $enable_cross_domain = isset($gawd_settings['enable_cross_domain']) ? $gawd_settings['enable_cross_domain'] : '';
38
+ $default_date = isset($gawd_settings['default_date']) ? $gawd_settings['default_date'] : '';
39
+ $default_date_format = isset($gawd_settings['default_date_format']) ? $gawd_settings['default_date_format'] : '';
40
+ $post_page_chart = isset($gawd_settings['post_page_chart']) ? $gawd_settings['post_page_chart'] : '';
41
+
42
+ ?>
43
+
44
+ <div id="gawd_body">
45
+ <div class="resp_menu"><div class="menu_img"></div><div class="button_label">SETTINGS</div><div class="clear"></div></div>
46
+ <div class="gawd_menu_coteiner gawd_settings_menu_coteiner">
47
+ <ul class="gawd_menu_ul">
48
+ <li class="gawd_menu_li" id="gawd_authenicate">
49
+ Authenticate
50
+ </li>
51
+ <li class="gawd_menu_li" id="gawd_alerts">
52
+ Alerts
53
+ </li>
54
+ <li class="gawd_menu_li" id="gawd_pushover">
55
+ Pushover
56
+ </li>
57
+ <li class="gawd_menu_li" id="gawd_filters">
58
+ Filters
59
+ </li>
60
+ <li class="gawd_menu_li" id="gawd_emails">
61
+ Emails
62
+ </li>
63
+ <li class=" gawd_menu_li" id="gawd_advanced">
64
+ Advanced
65
+ </li>
66
+ </ul>
67
+ </div>
68
+ <div id="gawd_right_conteiner">
69
+ <h3 class="gawd_page_titles">Settings</h3>
70
+
71
+ <form method="post" id="gawd_form">
72
+ <div class="gawd_authenicate">
73
+ <div id="opacity_div" style="display: none; background-color: rgba(0, 0, 0, 0.2); position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99998;"></div>
74
+ <div id="loading_div" style="display:none; text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
75
+ <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 200px; width:50px;">
76
+ </div>
77
+ <div id="gawd_auth_url" onclick="gawd_auth_popup(<?php echo GAWD_google_client::create_authentication_url();?>, 800,400)" style="cursor: pointer;"> REAUTHENTICATE
78
+ </div>
79
+ <div id="gawd_auth_code">
80
+ <input id="gawd_token" type="text">
81
+ <div id="gawd_auth_code_submit">SUBMIT</div>
82
+ </div>
83
+
84
+ <div class="gawd_own_wrap">
85
+ <label for="gawd_own_project">
86
+ <input type="checkbox" <?php echo $gawd_own_project != '' ? 'checked disabled' : '';?> name="gawd_own_project" id="gawd_own_project"/>
87
+ <span>Use your own project</span>
88
+ <div class="gawd_info" title="Mark as checked to use your project, which you created on console.developers.google.com"></div>
89
+ </label>
90
+ <div class="own_inputs" <?php echo $gawd_own_project != '' ? 'checked' : 'style="display:none"';?>>
91
+ <div class="gawd_goal_row">
92
+ <div class="gawd_goal_label">Client ID</div>
93
+ <div class="gawd_goal_input">
94
+ <input type="text" value="<?php echo isset($own_cliend_id) ? $own_cliend_id : '';?>" name="gawd_own_client_id"/>
95
+ </div>
96
+ <div class="gawd_info" title="Paste Client ID key. For more information about getting project keys please check the plugin documentation."></div>
97
+ <div class='clear'></div>
98
+ </div>
99
+ <div class="gawd_goal_row">
100
+ <div class="gawd_goal_label">Client Secret</div>
101
+ <div class="gawd_goal_input">
102
+ <input type="text" value="<?php echo isset($own_cliend_secret) ? $own_cliend_secret : '';?>" name="gawd_own_client_secret"/>
103
+ </div>
104
+ <div class="gawd_info" title="Paste Client Secret key. For more information about getting project keys please check the plugin documentation."></div>
105
+ <div class='clear'></div>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ <div class="gawd_alerts">
111
+ <img style="margin-top:10px" src="<?php echo GAWD_URL . '/assets/freePages/alerts.png';?>"/>
112
+ </div>
113
+ <div class="gawd_pushover">
114
+ <img style="margin-top:10px" src="<?php echo GAWD_URL . '/assets/freePages/pushovers.png';?>"/>
115
+ </div>
116
+ <div class="gawd_filters">
117
+ <div class="gawd_goal_row">
118
+ <span class="gawd_goal_label">View</span>
119
+
120
+ <span class="gawd_goal_input">
121
+ <!--<select title="Click to pick the website, filters of which you’d like to display." name="gawd_id" onchange="change_filter_account(this)">
122
+ <?php
123
+
124
+ /* foreach ($accounts as $account_name ){
125
+ $selected = $account_name['id'] == $gawd_user_data['accountId'] ? 'selected="selected"' : "";
126
+ */
127
+ ?>
128
+ <option value="<?php echo $account_name['id']; ?>" <?php echo $selected; ?>><?php echo $account_name['name'] ; ?></option>
129
+ <?php //} ?>-->
130
+ </select>
131
+ <select title="Click to pick the website, filters of which you’d like to display." name="gawd_id" onchange="change_filter_account(this)">
132
+ <?php
133
+ foreach ($profiles as $property_name => $property): ?>
134
+ <optgroup label="<?php echo $property_name; ?>">
135
+ <?php foreach ($property as $profile):
136
+ $webPropertyId = $profile['webPropertyId'];
137
+ $id = $profile['id'];
138
+ $name = $profile['name'];
139
+ $selected = '';
140
+ if($id == $gawd_user_data['gawd_id']){
141
+ $selected = 'selected="selected"';
142
+ $filter_account_name = $property_name;
143
+ }
144
+ ?>
145
+ <option value="<?php echo $id; ?>" <?php echo $selected; ?>><?php echo $property_name.' - '.$name ; ?></option>
146
+ <?php endforeach ?>
147
+ </optgroup>
148
+ <?php endforeach ?>
149
+ </select>
150
+ <input type="hidden" name='account_name' id='account_name'/>
151
+ <input type="hidden" name='web_property_name' id='web_property_name'/>
152
+ </span>
153
+ <div class="gawd_info" title="Select the website, to which you would like to configure this filter."></div>
154
+ <div class='clear'></div>
155
+ </div>
156
+ <div class="gawd_goal_row">
157
+ <span class="gawd_goal_label">Name</span>
158
+ <span class="gawd_goal_input">
159
+ <input id="gawd_goal_name " class="gawd_filter_name_fild" name="gawd_filter_name" type="text">
160
+ </span>
161
+ <div class="gawd_info" title="Write a title for the filter."></div>
162
+ <div class='clear'></div>
163
+ </div>
164
+ <div class="gawd_goal_row">
165
+ <span class="gawd_goal_label">Type</span>
166
+ <span class="gawd_goal_input">
167
+ <select name="gawd_filter_type" id="gawd_filter_type">
168
+ <option data-name="IP" value="GEO_IP_ADDRESS">Exclude Traffic From IP Address</option>
169
+ <option data-name="Country" value="GEO_COUNTRY">Exclude Traffic From Country</option>
170
+ <option data-name="Region" value="GEO_REGION">Exclude Traffic From Region</option>
171
+ <option data-name="City" value="GEO_CITY">Exclude Traffic From City</option>
172
+ </select>
173
+ </span>
174
+ <div class="gawd_info" title="Choose a type for tracking exclusions: IP address, Country, Region or City."></div>
175
+ <div class='clear'></div>
176
+ </div>
177
+ <div class="gawd_goal_row" id="gawd_filter_value_cont">
178
+ <span class="gawd_goal_label" id="gawd_filter_name">IP</span>
179
+ <span class="gawd_goal_input">
180
+ <div class="time_input"><input id="gawd_filter_value" type="text" name="gawd_filter_value"/></div>
181
+ </span>
182
+ <div class="gawd_info" title="Define IP address to filter from Google Analytics tracking."></div>
183
+ <div class='clear'></div>
184
+ </div>
185
+ <?php
186
+ if (!empty($filters)) {
187
+ ?>
188
+ <table border="1" class="gawd_table">
189
+ <tr>
190
+ <th>Name</th>
191
+ <th>Type</th>
192
+ <th>Value</th>
193
+ <th>View</th>
194
+ <th>Action</th>
195
+
196
+ </tr>
197
+ <?php
198
+ foreach ($filters as $filter) {
199
+ $filter_type = 'Not Supported';
200
+ $filter_value = $filter['value'] != "" ? $filter['value'] : 'Not Suported';
201
+ if($filter['type'] == "GEO_COUNTRY"){
202
+ $filter_type = 'Exclude Traffic From Country';
203
+ }
204
+ elseif($filter['type'] == "GEO_REGION"){
205
+ $filter_type = 'Exclude Traffic From Region';
206
+ }
207
+ elseif($filter['type'] == "GEO_CITY"){
208
+ $filter_type = 'Exclude Traffic From City';
209
+ }
210
+ elseif($filter['type'] == "GEO_IP_ADDRESS"){
211
+ $filter_type = 'Exclude Traffic From IP Address';
212
+ }
213
+ ?>
214
+ <tr data-key="<?php echo $filter['id']; ?>" >
215
+ <td><?php echo $filter['name']; ?></td>
216
+ <td><?php echo $filter_type; ?></td>
217
+ <td><?php echo $filter_value; ?></td>
218
+ <td><?php echo $filter['view']; ?></td>
219
+ <td><a href="" class="gawd_filter_remove" onclick="if (confirm('<?php echo addslashes(__("Do you want to delete selected item?", 'gawd')); ?>')) {gawd_remove_item('<?php echo $filter['id']; ?>','gawd_filter_remove');return false;} else {return false;}">remove</a></td>
220
+ </tr>
221
+ <?php
222
+ }
223
+ ?>
224
+ </table>
225
+ <?php
226
+ }
227
+ else{
228
+ echo 'There is no data for this view.';
229
+ }
230
+ ?>
231
+ </div>
232
+ <div class="gawd_emails">
233
+ <?php
234
+ $gawd_emails = get_option('gawd_email');
235
+
236
+ if($gawd_emails){
237
+ ?>
238
+ <table border="1" class="gawd_table">
239
+ <tr>
240
+ <th>Subject</th>
241
+ <th>Frequency</th>
242
+ <th>Start Date</th>
243
+ <th>Recipients</th>
244
+ <th>View</th>
245
+ <th>Action</th>
246
+ </tr>
247
+ <?php
248
+ foreach($gawd_emails as $key => $email){
249
+ if($email['period'] == 'gawd_weekly'){
250
+ $email['period'] = 'Weekly';
251
+ }
252
+ elseif($email['period'] == 'gawd_monthly'){
253
+ $email['period'] = 'Monthly';
254
+ }
255
+ else{
256
+ $email['period'] = 'Daily';
257
+ }
258
+ ?>
259
+ <tr data-key="<?php echo $key +1; ?>" >
260
+ <td><?php echo $email['name']; ?></td>
261
+ <td><?php echo $email['period']; ?></td>
262
+ <td><?php echo $email['creation_date']; ?></td>
263
+ <td><span class="gawd_break"><?php echo implode(', ',$email['emails']); ?></span></td>
264
+ <td><span class="gawd_break"><?php echo $email['view_id']; ?></span></td>
265
+ <td><a href="" class="gawd_remove_emails" onclick="if (confirm('<?php echo addslashes(__("Do you want to delete selected item?", 'gawd')); ?>')) {gawd_remove_item('<?php echo $key +1; ?>','gawd_email_remove');return false;} else {return false;}">remove</a></td>
266
+ </tr>
267
+ <?php
268
+ }
269
+ ?>
270
+ </table>
271
+ <?php
272
+ }
273
+ else{
274
+ echo '<a href="' . admin_url() . 'admin.php?page=gawd_reports">You can setup sending e-mail to recipients for any report.</a>';
275
+ }
276
+ ?>
277
+ </div>
278
+ <div class="gawd_advanced">
279
+ <div class="settings_row">
280
+ <div class="onoffswitch">
281
+ <input type="checkbox" name="gawd_show_in_dashboard" class="onoffswitch-checkbox" id="gawd_show_in_dashboard" <?php echo isset($gawd_settings['gawd_show_in_dashboard']) && 'on' == $gawd_settings['gawd_show_in_dashboard'] ? 'checked' : '';?>>
282
+ <label class="onoffswitch-label" for="gawd_show_in_dashboard">
283
+ <span class="onoffswitch-inner"></span>
284
+ <span class="onoffswitch-switch"></span>
285
+ </label>
286
+ </div>
287
+ <div class="gawd_info" title="Enable this option to display Google Analytics overview report on WordPress Dashboard."></div>
288
+ <div class="onoffswitch_text">
289
+ Analytics on WordPress Dashboard
290
+ </div>
291
+ <div class="clear"></div>
292
+ </div>
293
+ <div class="settings_row">
294
+ <div class="onoffswitch">
295
+ <input type="checkbox" name="enable_hover_tooltip" class="onoffswitch-checkbox" id="enable_hover_tooltip" <?php echo $enable_hover_tooltip != '' ? 'checked' : '';?>>
296
+ <label class="onoffswitch-label" for="enable_hover_tooltip">
297
+ <span class="onoffswitch-inner"></span>
298
+ <span class="onoffswitch-switch"></span>
299
+ </label>
300
+ </div>
301
+ <div class="gawd_info" title="Click to enable/disable help text for WD Google Analytics reports."></div>
302
+ <div class="onoffswitch_text">
303
+ Enable reports tooltips
304
+ </div>
305
+ <div class="clear"></div>
306
+ </div>
307
+ <div class="settings_row">
308
+ <div class="onoffswitch onoffswitch_disabled">
309
+ <input disabled type="checkbox" name="adsense_acc_linking" class="onoffswitch-checkbox" id="adsense_acc_linking" >
310
+ <label class="onoffswitch-label" for="adsense_acc_linking">
311
+ <span class="onoffswitch-inner"></span>
312
+ <span class="onoffswitch-switch"></span>
313
+ </label>
314
+ </div>
315
+ <div class="gawd_info" title="Turn this option on to get AdSense tracking reports. Make sure to link your Google AdSense to Google Analytics first (find out more in plugin documentation)"></div>
316
+ <div class="onoffswitch_text">
317
+ Enable AdSense link tracking <a target="_blank" href="https://web-dorado.com/products/wordpress-google-analytics-plugin.html" class="gawd_pro"> ( This feature is available in Google Analytics WD Pro. )</a>
318
+ </div>
319
+ <div class="clear"></div>
320
+ </div>
321
+ <div class="settings_row">
322
+ <div class="onoffswitch">
323
+ <input type="checkbox" name="post_page_chart" class="onoffswitch-checkbox" id="post_page_chart" <?php echo $post_page_chart != '' ? 'checked' : '';?>>
324
+ <label class="onoffswitch-label" for="post_page_chart">
325
+ <span class="onoffswitch-inner"></span>
326
+ <span class="onoffswitch-switch"></span>
327
+ </label>
328
+ </div>
329
+ <div class="gawd_info" title="Enable this option to display individual page and post reports on frontend and backend."></div>
330
+ <div class="onoffswitch_text">
331
+ Enable reports on posts/pages (frontend and backend)
332
+ </div>
333
+ <div class="clear"></div>
334
+ </div>
335
+ <div class="settings_row">
336
+ <div class="onoffswitch">
337
+ <input type="checkbox" name="exclude_events" class="onoffswitch-checkbox" id="exclude_events" <?php echo $exclude_events != '' ? 'checked' : '';?>>
338
+ <label class="onoffswitch-label" for="exclude_events">
339
+ <span class="onoffswitch-inner"></span>
340
+ <span class="onoffswitch-switch"></span>
341
+ </label>
342
+ </div>
343
+ <div class="gawd_info" title="For example, watching a video is a non-interactive event, whereas submitting a form is interactive. Enable this option to filter non-interactive events while calculating bounce-rate."></div>
344
+ <div class="onoffswitch_text">
345
+ Exclude non-interactive events from bounce-rate calculation
346
+ </div>
347
+ <div class="clear"></div>
348
+ </div>
349
+ <div class="settings_row">
350
+ <div class="onoffswitch">
351
+ <input type="checkbox" name="enable_cross_domain" class="onoffswitch-checkbox" id="enable_cross_domain" <?php echo $enable_cross_domain != '' ? 'checked' : '';?>>
352
+ <label class="onoffswitch-label" for="enable_cross_domain">
353
+ <span class="onoffswitch-inner"></span>
354
+ <span class="onoffswitch-switch"></span>
355
+ </label>
356
+ </div>
357
+ <div class="gawd_info" title="Enable Cross domain tracking to let Google Analytics see similar activities on two related websites as single session."></div>
358
+ <div class="onoffswitch_text">
359
+ Enable Cross Domain Tracking
360
+ </div>
361
+ <div class="clear"></div>
362
+ </div>
363
+ <?php
364
+ $cross_dom_show = $enable_cross_domain == '' ? 'style="display:none"' : '';
365
+ ?>
366
+ <div id="cross_domains" class="gawd_goal_row" <?php echo $cross_dom_show;?>>
367
+ <span class="gawd_goal_label">Cross Domains</span>
368
+ <span class="gawd_goal_input">
369
+ <div class="time_input">
370
+ <?php $gawd_settings_cross_domains = get_option("gawd_settings");
371
+ if(isset($gawd_settings_cross_domains) && isset($gawd_settings_cross_domains["cross_domains"])){
372
+ $gawd_settings_cross_domains = $gawd_settings_cross_domains["cross_domains"];
373
+ }else{
374
+ $gawd_settings_cross_domains = "";
375
+ }
376
+ ?>
377
+ <input type="text" value="<?php echo $gawd_settings_cross_domains;?>" name="cross_domains">
378
+ </div>
379
+ </span>
380
+ <div class="gawd_info" title="Provide cross domain links separated by commas. The links should have the following format: http://example.com"></div>
381
+ <div class="clear"></div>
382
+ </div>
383
+
384
+ <div class="gawd_goal_row">
385
+ <?php $gawd_settings_site_speed_rate = get_option("gawd_settings");
386
+ if(isset($gawd_settings_site_speed_rate) && isset($gawd_settings_site_speed_rate["site_speed_rate"])){
387
+ $gawd_settings_site_speed_rate = intval($gawd_settings_site_speed_rate["site_speed_rate"]);
388
+ }else{
389
+ $gawd_settings_site_speed_rate = 1;
390
+ }
391
+ ?>
392
+ <span class="gawd_goal_label">Site Speed SR (%)</span>
393
+ <span class="gawd_goal_input">
394
+ <div class="time_input"><input value="<?php echo $gawd_settings_site_speed_rate;?>" type="number" min="1" name="site_speed_rate"></div>
395
+ </span>
396
+ <div class="gawd_info" title="Define the percentage of users, which activity should be evaluated for Site Speed report."></div>
397
+ <div class="clear"></div>
398
+ </div>
399
+ <div class="gawd_goal_row">
400
+ <div class="gawd_goal_label">Back end plugin permissions</div>
401
+ <div class="checkbox_wrap">
402
+ <?php
403
+ $roles = new WP_Roles();
404
+ $settings_label_count = 0;
405
+ foreach($roles->role_names as $key => $name){
406
+ $settings_label_count++;
407
+ if($name == 'Administrator'){
408
+ $key = 'manage_options';
409
+ }
410
+ elseif($name == 'Editor'){
411
+ $key = 'moderate_comments';
412
+ }
413
+ elseif($name == 'Author'){
414
+ $key = 'publish_posts';
415
+ }
416
+ elseif($name == 'Contributor'){
417
+ $key = 'edit_posts';
418
+ }
419
+ else{
420
+ $key = 'read';
421
+ }
422
+ ?>
423
+ <div class="setting_time_wrap time_wrap">
424
+ <input id="inp<?php echo $settings_label_count;?>"<?php echo $key == 'manage_options' ? 'disabled' : '';?> class="gawd_perm" type="checkbox" name="gawd_permissions[]" <?php echo in_array($key,$gawd_permissions) || $key == 'manage_options' ? 'checked' : '';?> value="<?php echo $key;?>"/>
425
+ <label for="inp<?php echo $settings_label_count;?>"><?php echo $name;?></label>
426
+ </div>
427
+ <?php
428
+ }
429
+ ?>
430
+ <div class='clear'></div>
431
+ </div>
432
+ <div class="gawd_info" title="Select user roles to permit access to WD Google Analytics plugin. Only Administrator users can view it by default."></div>
433
+ <div class='clear'></div>
434
+ </div>
435
+ <div class="gawd_goal_row">
436
+ <div class="gawd_goal_label">Dashboard overview permissions</div>
437
+ <div class="checkbox_wrap">
438
+ <?php $roles = new WP_Roles();
439
+ $inp_id = 0;
440
+ foreach($roles->role_names as $key => $name){
441
+ $inp_id++;
442
+ ?>
443
+ <div class="time_wrap">
444
+ <input id="dashboard_overview_permissions<?php echo $inp_id;?>" <?php echo $key == 'administrator' ? 'disabled' : '';?> class="gawd_perm" type="checkbox" name="gawd_backend_roles[]" <?php echo in_array($key,$gawd_backend_roles) || $key == 'administrator' ? 'checked' : '';?> value="<?php echo $key;?>"/>
445
+ <label for="dashboard_overview_permissions<?php echo $inp_id;?>"><?php echo $name;?></label>
446
+ </div>
447
+ <?php
448
+ }
449
+ ?>
450
+ <div class='clear'></div>
451
+ </div>
452
+ <div class="gawd_info" title="Select user roles, which will have access to view WordPress Dashboard report."></div>
453
+ <div class='clear'></div>
454
+ </div>
455
+ <div class="gawd_goal_row">
456
+ <div class="gawd_goal_label">Post/Page report permissions</div>
457
+ <div class="checkbox_wrap">
458
+ <?php $roles = new WP_Roles();
459
+ $inp_id = 0;
460
+ foreach($roles->role_names as $key => $name){
461
+ $inp_id++;
462
+ ?>
463
+ <div class="time_wrap">
464
+ <input id="gawd_post_page_roles<?php echo $inp_id?>" <?php echo $key == 'administrator' ? 'disabled' : '';?> class="gawd_perm" type="checkbox" name="gawd_post_page_roles[]" <?php echo in_array($key,$gawd_post_page_roles) || $key == 'administrator' ? 'checked' : '';?> value="<?php echo $key;?>"/>
465
+ <label for="gawd_post_page_roles<?php echo $inp_id?>"><?php echo $name;?></label>
466
+ </div>
467
+ <?php
468
+ }
469
+ ?>
470
+ <div class='clear'></div>
471
+ </div>
472
+ <div class="gawd_info" title="Select user roles, which will have access to view reports from frontend of your website."></div>
473
+ <div class='clear'></div>
474
+ </div>
475
+ <div class="gawd_goal_row">
476
+ <div class="gawd_goal_label">Frontend report permissions</div>
477
+ <div class="checkbox_wrap">
478
+ <?php $roles = new WP_Roles();
479
+ $inp_id = 0;
480
+ foreach($roles->role_names as $key => $name){
481
+ $inp_id++;
482
+ ?>
483
+ <div class="time_wrap">
484
+ <input id="frontend_report_permissions<?php echo $inp_id?>" <?php echo $key == 'administrator' ? 'disabled' : '';?> class="gawd_perm" type="checkbox" name="gawd_frontend_roles[]" <?php echo in_array($key,$gawd_frontend_roles) || $key == 'administrator' ? 'checked' : '';?> value="<?php echo $key;?>"/>
485
+ <label for="frontend_report_permissions<?php echo $inp_id?>"><?php echo $name;?></label>
486
+ </div>
487
+ <?php
488
+ }
489
+ ?>
490
+ <div class='clear'></div>
491
+ </div>
492
+ <div class="gawd_info" title="Select user roles, which will have access to view reports from frontend of your website."></div>
493
+ <div class='clear'></div>
494
+ </div>
495
+ <div class="gawd_goal_row">
496
+ <span class="gawd_goal_label">Date format</span>
497
+ <span class="gawd_goal_input">
498
+ <select name="default_date_format" id="default_date_format">
499
+ <option <?php selected($default_date_format,'ymd_with_week');?> value="ymd_with_week">l, Y-m-d</option>
500
+ <option <?php selected($default_date_format,'ymd_without_week');?> value="ymd_without_week">Y-m-d</option>
501
+ <option <?php selected($default_date_format,'month_name_with_week');?> value="month_name_with_week">l, F d, Y</option>
502
+ <option <?php selected($default_date_format,'month_name_without_week');?> value="month_name_without_week">F d, Y</option>
503
+ </select>
504
+ </span>
505
+ <div class="gawd_info" title="Choose the date format"></div>
506
+ <div class='clear'></div>
507
+ </div>
508
+ <div class="gawd_goal_row">
509
+ <span class="gawd_goal_label">Default Date</span>
510
+ <span class="gawd_goal_input">
511
+ <select name="default_date" id="default_date">
512
+ <option id='gawd_last_30days' <?php selected($default_date,'last_30days');?> value="last_30days">Last 30 Days</option>
513
+ <option id='gawd_last_7days' <?php selected($default_date,'last_7days');?> value="last_7days">Last 7 Days</option>
514
+ <option id='gawd_last_week' <?php selected($default_date,'last_week');?> value="last_week">Last Week</option>
515
+ <option id='gawd_this_month' <?php selected($default_date,'this_month');?> value="this_month">This Month</option>
516
+ <option id='gawd_last_month' <?php selected($default_date,'last_month');?> value="last_month">Last Month</option>
517
+ <option id='gawd_today' <?php selected($default_date,'today');?> value="today">Today</option>
518
+ <option id='gawd_yesterday' <?php selected($default_date,'yesterday');?> value="yesterday">Yesterday</option>
519
+ </select>
520
+ </span>
521
+ <div class="gawd_info" title="Choose the initial time period, which will be applied to all reports as their date range."></div>
522
+ <div class='clear'></div>
523
+ </div>
524
+ </div>
525
+ <div class="gawd_submit">
526
+ <input type="button" class="button_gawd" id="gawd_settings_button"value="SAVE"/>
527
+ <input type="button" style="display:none;" class="button_gawd" id="gawd_settings_logout"value="Logout"/>
528
+ </div>
529
+ <input type='hidden' name="gawd_alert_remove" id="gawd_alert_remove"/>
530
+ <input type='hidden' name="gawd_menu_remove" id="gawd_menu_remove"/>
531
+ <input type='hidden' name="gawd_pushover_remove" id="gawd_pushover_remove"/>
532
+ <input type='hidden' name="gawd_email_remove" id="gawd_email_remove"/>
533
+ <input type='hidden' name="gawd_filter_remove" id="gawd_filter_remove"/>
534
+ <input type='hidden' name="gawd_settings_tab" id="gawd_settings_tab"/>
535
+ <input type='hidden' name="settings_submit" id="gawd_settings_submit"/>
536
+ <input type='hidden' name="gawd_settings_logout" id="gawd_settings_logout_val"/>
537
+ <?php wp_nonce_field('gawd_save_form', 'gawd_save_form_fild'); ?>
538
+ </form>
539
+ </div>
540
+
541
+ <div class="clear"></div>
542
+ </div>
543
+
544
+ <script>
545
+
546
+ </script>
admin/pages/tracking.php ADDED
@@ -0,0 +1,253 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $gawd_settings = get_option('gawd_settings');
3
+ if (isset($gawd_user_data['default_webPropertyId'])) {
4
+ $tracking_dimensions = $gawd_client->get_custom_dimensions_tracking();
5
+ } else {
6
+ $tracking_dimensions = 'no_custom_dimensions_exist';
7
+ }
8
+ $existing_custom_dimensions = $gawd_client->get_custom_dimensions('default');
9
+ if (!is_array($existing_custom_dimensions)) {
10
+ $existing_custom_dimensions = array();
11
+ }
12
+ $supported_dimensions = array("Logged in","Post type","Author","Category","Tags","Published Month","Published Year");
13
+ $ua_code = isset($gawd_user_data['default_webPropertyId']) ? $gawd_user_data['default_webPropertyId'] : '';
14
+ $gawd_permissions = isset($gawd_settings['gawd_permissions']) ? $gawd_settings['gawd_permissions'] : array();
15
+ $gawd_anonymize = isset($gawd_settings['gawd_anonymize']) ? $gawd_settings['gawd_anonymize'] : '';
16
+ $gawd_tracking_enable = isset($gawd_settings['gawd_tracking_enable']) ? $gawd_settings['gawd_tracking_enable'] : 'on';
17
+ $gawd_outbound = isset($gawd_settings['gawd_outbound']) ? $gawd_settings['gawd_outbound'] : '';
18
+
19
+ $gawd_enhanced = isset($gawd_settings['gawd_enhanced']) ? $gawd_settings['gawd_enhanced'] : '';
20
+ $gawd_file_formats = isset($gawd_settings['gawd_file_formats']) ? $gawd_settings['gawd_file_formats'] : '';
21
+ $gawd_tracking_enable = isset($_GET['enableTracking']) ? 'on' : $gawd_tracking_enable;
22
+ $domain = GAWD::get_domain(esc_html(get_option('siteurl')));
23
+ ?>
24
+
25
+ <div id="gawd_body">
26
+ <div class="resp_menu"><div class="menu_img"></div><div class="button_label">TRACKING</div><div class="clear"></div></div>
27
+ <div class="gawd_menu_coteiner gawd_settings_menu_coteiner">
28
+ <ul class="gawd_menu_ul">
29
+ <li class=" gawd_menu_li_tracking" id="gawd_tracking">
30
+ Tracking
31
+ </li>
32
+ <li class=" gawd_menu_li_tracking" id="gawd_exclude_tracking">
33
+ Exclude
34
+ </li>
35
+ </ul>
36
+ </div>
37
+ <div id="gawd_right_conteiner">
38
+ <h3 class="gawd_page_titles">Tracking</h3>
39
+
40
+ <form method="post" id="gawd_form">
41
+ <div class="gawd_tracking">
42
+ <div class="gawd_settings_wrapper">
43
+ <div class="settings_row">
44
+ <div class="onoffswitch">
45
+ <input type="checkbox" name="gawd_tracking_enable" class="onoffswitch-checkbox" id="gawd_tracking_enable" <?php echo $gawd_tracking_enable != '' ? 'checked' : '';?>>
46
+ <label class="onoffswitch-label" for="gawd_tracking_enable">
47
+ <span class="onoffswitch-inner"></span>
48
+ <span class="onoffswitch-switch"></span>
49
+ </label>
50
+ </div>
51
+ <div class="gawd_info" title="Enable to add Google Analytics tracking code to <head> tag of your website HTML."></div>
52
+ <div class="onoffswitch_text">
53
+ Enable Tracking
54
+ </div>
55
+ <div class="clear"></div>
56
+ </div>
57
+ <div class="settings_row independent_setting">
58
+ <div class="onoffswitch <?php echo (($gawd_tracking_enable == '') ? 'onoffswitch_disabled' : ''); ?> independent_switch">
59
+ <input type="checkbox" name="gawd_anonymize" class="onoffswitch-checkbox independent_input" id="gawd_anonymize" <?php echo $gawd_anonymize != '' ? 'checked' : '';?> <?php echo (($gawd_tracking_enable == '') ? 'disabled' : ''); ?>>
60
+ <label class="onoffswitch-label" for="gawd_anonymize">
61
+ <span class="onoffswitch-inner"></span>
62
+ <span class="onoffswitch-switch"></span>
63
+ </label>
64
+ </div>
65
+ <div class="gawd_info" title="Turn this option on, in case you’d like to hide the last block of users’ IP addresses."></div>
66
+ <div class="onoffswitch_text">
67
+ Anonymize IP address
68
+ </div>
69
+ <div class="clear"></div>
70
+ </div>
71
+ <div class="settings_row independent_setting">
72
+ <div class="onoffswitch <?php echo (($gawd_tracking_enable == '') ? 'onoffswitch_disabled' : ''); ?> independent_switch">
73
+ <input type="checkbox" name="gawd_enhanced" class="onoffswitch-checkbox independent_input" id="gawd_enhanced" <?php echo $gawd_enhanced != '' ? 'checked' : '';?> <?php echo (($gawd_tracking_enable == '') ? 'disabled' : ''); ?>>
74
+ <label class="onoffswitch-label" for="gawd_enhanced">
75
+ <span class="onoffswitch-inner"></span>
76
+ <span class="onoffswitch-switch"></span>
77
+ </label>
78
+ </div>
79
+ <div class="gawd_info" title="Enable this option to track multiple links with the same destination. Get information for buttons, menus, as well as elements with multiple destinations, e.g. search boxes. You can find out more about Enhanced Link Attribution in the plugin documentation."></div>
80
+ <div class="onoffswitch_text">
81
+ Enhanced Link Attribution
82
+ </div>
83
+ <div class="clear"></div>
84
+ </div>
85
+ <div class="settings_row independent_setting">
86
+ <div class="onoffswitch <?php echo (($gawd_tracking_enable == '') ? 'onoffswitch_disabled' : ''); ?> independent_switch">
87
+ <input type="checkbox" name="gawd_outbound" class="onoffswitch-checkbox independent_input" id="gawd_outbound" <?php echo $gawd_outbound != '' ? 'checked' : '';?> <?php echo (($gawd_tracking_enable == '') ? 'disabled' : ''); ?>>
88
+ <label class="onoffswitch-label" for="gawd_outbound">
89
+ <span class="onoffswitch-inner"></span>
90
+ <span class="onoffswitch-switch"></span>
91
+ </label>
92
+ </div>
93
+ <div class="gawd_info" title="Turn outbound clicks tracking on to track the links users click to leave your website."></div>
94
+ <div class="onoffswitch_text">
95
+ Outbound clicks tracking
96
+ </div>
97
+ <div class="clear"></div>
98
+ </div>
99
+ <div class="settings_row independent_setting">
100
+ <div class="onoffswitch <?php echo (($gawd_tracking_enable == '') ? 'onoffswitch_disabled' : ''); ?> independent_switch">
101
+ <input type="checkbox" name="gawd_file_formats" value="zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*" class="onoffswitch-checkbox independent_input" id="gawd_file_formats" <?php echo $gawd_file_formats != '' ? 'checked' : '';?> <?php echo (($gawd_tracking_enable == '') ? 'disabled' : ''); ?>>
102
+ <label class="onoffswitch-label" for="gawd_file_formats">
103
+ <span class="onoffswitch-inner"></span>
104
+ <span class="onoffswitch-switch"></span>
105
+ </label>
106
+ </div>
107
+ <div class="gawd_info" title="Enable to track file downloads and mailing links."></div>
108
+ <div class="onoffswitch_text track_label">
109
+ Mailto, Download tracking (ex.: .doc, .pdf, .jpg, etc.)
110
+ </div>
111
+ <div class="clear"></div>
112
+ </div>
113
+ <div style="margin-top:25px">
114
+ <img src="<?php echo GAWD_URL.'/assets/freePages/custom_dimensions.png';?>"/>
115
+ </div>
116
+ </div>
117
+ <input name="gawd_custom_dimension_id" type="hidden" value="<?php echo count($existing_custom_dimensions);?>"/>
118
+ <div class="gawd_tracking_display">
119
+ <p>CODE ADDED TO SITE:</p>
120
+ <div id="gawd_tracking_enable_code" <?php if('on' != $gawd_tracking_enable): ?>style="display: none;"<?php endif; ?>>
121
+ <code class="html">&#60;script&#62;</code>
122
+ <code class="javascript">
123
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
124
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
125
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
126
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
127
+ <br /><br />
128
+ ga('create', '<?php echo $ua_code ?>', 'auto');
129
+ </code>
130
+ <code id="gawd_anonymize_code" class="javascript" <?php if('on' != $gawd_anonymize): ?>style="display: none;"<?php endif; ?>>
131
+ ga('set', 'anonymizeIp', true);
132
+ </code>
133
+ <code id="gawd_enhanced_code" class="javascript" <?php if('on' != $gawd_enhanced): ?>style="display: none;"<?php endif; ?>>
134
+ ga('require', 'linkid', 'linkid.js');
135
+ </code>
136
+ <code id="gawd_outbound_code" class="javascript" <?php echo $gawd_outbound != '' && isset($domain) && $domain != '' ? '' : 'style="display: none;"';?>>
137
+ jQuery(a[href^="http"]).filter(function () {
138
+ if (!this.href.match(/.*\.(zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*)(\?.*)?$/)) {
139
+ if (this.href.indexOf('devops.web-dorado.info') == -1) {
140
+ return this.href
141
+ };
142
+ }
143
+ }).click(function (e) {
144
+ ga('send', 'event', 'outbound', 'click', this.href, {'nonInteraction': 1});
145
+ });
146
+ </code>
147
+ <code id="gawd_file_formats_code" class="javascript" <?php echo isset($gawd_file_formats) && $gawd_file_formats != '' ? '' : 'style="display: none"';?>>
148
+ jQuery('a').filter(function () {
149
+ return this.href.match(/.*\.(zip|mp3*|mpe*g|pdf|docx*|pptx*|xlsx*|rar*)(\?.*)?$/);
150
+ }).click(function (e) {
151
+ ga('send', 'event', 'download', 'click', this.href, {'nonInteraction': 1});
152
+ });
153
+ jQuery('a[href^="mailto"]').click(function (e) {
154
+ ga('send', 'event', 'email', 'send', this.href, {'nonInteraction': 1});
155
+ });
156
+ </code>
157
+ <code class="javascript">
158
+ ga('send', 'pageview');
159
+ </code>
160
+ <code class="html">&#60;/script&#62;</code>
161
+ </div>
162
+ </div>
163
+ <div class="clear"></div>
164
+ </div>
165
+ <div class="gawd_exclude_tracking">
166
+ <img src="<?php echo GAWD_URL.'/assets/freePages/exclude_tracking.png';?>"/>
167
+ </div>
168
+ <input type='hidden' name="settings_submit" id="settings_submit"/>
169
+ <div class="gawd_submit"><input type="submit" name="settings_submit" class="button_gawd" value="SAVE"/></div>
170
+ <input type='hidden' name="gawd_settings_tab" id="gawd_settings_tab"/>
171
+ <input type='hidden' name="add_dimension_value" id="add_dimension_value"/>
172
+ <?php wp_nonce_field('gawd_save_form', 'gawd_save_form_fild'); ?>
173
+ </form>
174
+ </div>
175
+
176
+ <div class="clear"></div>
177
+ </div>
178
+ <script>
179
+ jQuery(function() {
180
+ jQuery('.chosen-select').chosen();
181
+ jQuery('.chosen-select-deselect').chosen({ allow_single_deselect: true });
182
+ });
183
+ jQuery(document).ready(function(){
184
+ jQuery('.button_gawd_add').on('click',function(){
185
+ jQuery('#add_dimension_value').val(jQuery(this).data('name'));
186
+ jQuery('#settings_submit').val('1');
187
+ jQuery('#gawd_form').submit();
188
+ })
189
+ jQuery("#gawd_right_conteiner").show();
190
+ if(window.location.hash===''){
191
+ jQuery('.gawd_submit').width('92.9%');
192
+ jQuery('.gawd_tracking').show();
193
+ jQuery('#gawd_tracking').addClass('gawd_active_li');
194
+ if(jQuery(window).width() < 720){
195
+ jQuery('#gawd_tracking').addClass('gawd_resp_active_li');
196
+ }
197
+ }
198
+
199
+ else if(window.location.hash==='#gawd_exclude_tracking_tab'){
200
+ jQuery('.gawd_submit').width('92.9%');
201
+ jQuery('#gawd_exclude_tracking').addClass('gawd_active_li');
202
+ jQuery('.gawd_submit').hide();
203
+ jQuery('.gawd_exclude_tracking').show();
204
+ if(jQuery(window).width() < 720){
205
+ jQuery('#gawd_exclude_tracking').addClass('gawd_resp_active_li');
206
+ }
207
+ }
208
+ else if(window.location.hash==='#gawd_tracking_tab'){
209
+ jQuery('.gawd_submit').width('92.9%');
210
+ jQuery('#gawd_tracking').addClass('gawd_active_li');
211
+ jQuery('.gawd_submit').show();
212
+ jQuery('.gawd_tracking').show();
213
+ if(jQuery(window).width() < 720){
214
+ jQuery('#gawd_tracking').addClass('gawd_resp_active_li');
215
+ }
216
+ }
217
+
218
+ else{
219
+ jQuery('.gawd_submit').hide();
220
+ jQuery('.gawd_tracking').show();
221
+ jQuery('#gawd_tracking').addClass('gawd_active_li');
222
+ if(jQuery(window).width() < 720){
223
+ jQuery('#gawd_tracking').addClass('gawd_resp_active_li');
224
+ }
225
+ }
226
+ })
227
+ jQuery('.gawd_menu_li_tracking').on('click',function(){
228
+ var tab = jQuery(this).attr('id');
229
+ jQuery('.gawd_menu_li_tracking').removeClass('gawd_active_li');
230
+ jQuery('.gawd_menu_li_tracking').removeClass('gawd_resp_active_li');
231
+ jQuery(this).addClass('gawd_active_li');
232
+ if(jQuery(window).width() < 720){
233
+ jQuery(this).addClass('gawd_resp_active_li');
234
+ }
235
+
236
+ jQuery('#gawd_settings_tab').val(tab);
237
+ if(tab == 'gawd_tracking'){
238
+ window.location.hash = "gawd_tracking_tab";
239
+ jQuery(this).addClass('gawd_active_li');
240
+ jQuery('.gawd_exclude_tracking').hide();
241
+ jQuery('.gawd_submit').show();
242
+ jQuery('.gawd_tracking').show();
243
+ }
244
+ else if(tab == 'gawd_exclude_tracking'){
245
+ window.location.hash = "gawd_exclude_tracking_tab";
246
+ jQuery(this).addClass('gawd_active_li');
247
+ jQuery('.gawd_tracking').hide();
248
+ jQuery('.gawd_submit').hide();
249
+ jQuery('.gawd_exclude_tracking').show();
250
+ }
251
+ })
252
+ </script>
253
+
admin/pages/uninstall.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class GAWDUninstall{
4
+
5
+ public function uninstall(){
6
+ ?>
7
+ <form method="post" action="" id="adminForm">
8
+ <div class="gawd">
9
+ <h2>
10
+ <img src="<?php echo GAWD_URL . '/assets/uninstall-icon.png';?>" width="30" style="vertical-align:middle;">
11
+ <span><?php _e("Uninstall WD Google Analytics","gawd"); ?></span>
12
+ </h2>
13
+ <div class="goodbye-text">
14
+ <?php
15
+ $support_team = '<a href="https://web-dorado.com/support/contact-us.html?source=google-analytics-wd" target="_blank">' . __('support team', 'gawd') . '</a>';
16
+ $contact_us = '<a href="https://web-dorado.com/support/contact-us.html?source=google-analytics-wd" target="_blank">' . __('Contact us', 'gawd') . '</a>';
17
+ echo sprintf(__("Before uninstalling the plugin, please Contact our %s. We'll do our best to help you out with your issue. We value each and every user and value what's right for our users in everything we do.<br />
18
+ However, if anyway you have made a decision to uninstall the plugin, please take a minute to %s and tell what you didn't like for our plugins further improvement and development. Thank you !!!", "gawd"), $support_team, $contact_us); ?>
19
+ </div>
20
+ <p style="color: red;">
21
+ <strong><?php _e("WARNING:","gawd"); ?></strong>
22
+ <?php _e("Once uninstalled, this can't be undone. You should use a Database Backup plugin of WordPress to back up all the data first.","gawd"); ?>
23
+ </p>
24
+ <p style="color: red">
25
+ <strong><?php _e("The following Database options will be deleted:","gawd"); ?></strong>
26
+ </p>
27
+ <table class="widefat">
28
+ <thead>
29
+ <tr>
30
+ <th><?php _e("Database options","gawd"); ?></th>
31
+ </tr>
32
+ </thead>
33
+ <tr>
34
+ <td valign="top">
35
+ <ol>
36
+ <li>gawd_custom_reports</li>
37
+ <li>gawd_menu_for_user</li>
38
+ <li>gawd_all_metrics</li>
39
+ <li>gawd_all_dimensions</li>
40
+ <li>gawd_custom_dimensions</li>
41
+ <li>gawd_settings</li>
42
+ <li>gawd_user_data</li>
43
+ <li>gawd_credentials</li>
44
+ <li>gawd_menu_items</li>
45
+ <li>gawd_export_chart_data</li>
46
+ <li>gawd_email</li>
47
+ <li>gawd_custom_reports</li>
48
+ <li>gawd_alerts</li>
49
+ <li>gawd_pushovers</li>
50
+ <li>gawd_menu_for_users</li>
51
+ <li>gawd_own_project</li>
52
+ <li>gawd_zoom_message</li>
53
+ </ol>
54
+ </td>
55
+ </tr>
56
+
57
+ </table>
58
+ <p style="text-align: center;"> <?php _e("Do you really want to uninstall WD Google Analytics?","gawd"); ?></p>
59
+ <p style="text-align: center;">
60
+ <input type="checkbox" name="unistall_gawd" id="check_yes" value="yes" />&nbsp;
61
+ <label for="check_yes"><?php _e("Yes","gawd"); ?></label>
62
+ </p>
63
+ <p style="text-align: center;">
64
+ <input type="button" id="gawd_uninstall" value="<?php _e("UNINSTALL","gawd"); ?>" onclick="if (check_yes.checked) {
65
+ if (confirm('You are About to Uninstall WD Google Analytics from WordPress.\nThis Action Is Not Reversible.')) {
66
+ jQuery('#adminForm').submit();;
67
+ } else {
68
+ return false;
69
+ }
70
+ }
71
+ else {
72
+ return false;
73
+ }" class="wd-btn wd-btn-primary" />
74
+ </p>
75
+ </div>
76
+ <?php wp_nonce_field('gawd_save_form', 'gawd_save_form_fild'); ?>
77
+ </form>
78
+ <?php
79
+ }
80
+
81
+ }
admin/pages/visitors.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ <div class="">
4
+ <div class="opacity_div_compact">
5
+ <div class="loading_div_compact">
6
+ <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 200px; width:50px;">
7
+ </div>
8
+ </div>
9
+ <div id="gawd_visitors_meta"></div>
10
+ </div>
admin/post_page_view.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $id = isset($_GET['post']) ? $_GET['post'] : '';
3
+ $uri_parts = explode( '/', get_permalink( $id ), 4 );
4
+ if ( isset( $uri_parts[3] ) ) {
5
+ $uri = '/' . $uri_parts[3];
6
+ }
7
+ $uri = explode( '/',$uri);
8
+ end($uri);
9
+ $key = key($uri);
10
+ $uri = '/' . $uri[$key-1];
11
+ $filter = rawurlencode( rawurldecode( $uri ) );
12
+ $filter = rawurlencode( rawurldecode(get_the_title()));
13
+ ?>
14
+ <a href="#" class="gawd_btn">X</a>
15
+ <!--<select name="gawd_post_page_date" id="gawd_post_page_date" >
16
+ <option value="<?php echo date('Y-m-d', strtotime('-30 days')); ?>"><?php _e('Last 30 Days', 'gawd'); ?></option>
17
+ <option value="<?php echo date('Y-m-d', strtotime('-7 days')); ?>"><?php _e('Last 7 Days', 'gawd'); ?></option>
18
+ </select> -->
19
+ <div class="gawd_content" id="gawd_content_range" >
20
+ <div id="reportrange" class="pull-right" style="float:none !important">
21
+ <span></span> <b class="caret"></b>
22
+ </div>
23
+ <input type="hidden" id="gawd_start_end_date"/>
24
+ </div>
25
+ <select name="gawd_metric_post_page" id="gawd_metric_post_page" >
26
+ <option value="sessions"><?php _e('Sessions', 'gawd'); ?></option>
27
+ <option value="users" ><?php _e('Users', 'gawd'); ?></option>
28
+ <option value="bounceRate" ><?php _e('Bounce Rate', 'gawd'); ?></option>
29
+ <option value="pageviews" ><?php _e('Pageviews', 'gawd'); ?></option>
30
+ <option value="percentNewSessions"><?php _e('% New Sessions', 'gawd'); ?></option>
31
+ <option value="avgSessionDuration"><?php _e('Avg Session Duration', 'gawd'); ?></option>
32
+ <option value="pageviewsPerSession" ><?php echo __('Pages/Session', 'gawd'); ?></option>
33
+ </select>
34
+ <select name="gawd_chart_type_post_page" id="gawd_chart_type_post_page" class="gawd_draw_analytics">
35
+ <option value="line" ><?php _e('Line Chart', 'gawd'); ?></option>
36
+ <option value="pie" ><?php _e('Pie Chart', 'gawd'); ?></option>
37
+ <option value="column" ><?php _e('Columns', 'gawd'); ?></option>
38
+ </select>
39
+ <div class="clear"></div>
40
+
41
+ <div class="">
42
+ <div class="opacity_div_compact">
43
+ <div class="loading_div_compact">
44
+ <img src="<?php echo GAWD_URL . '/assets/ajax_loader.gif'; ?>" style="margin-top: 200px; width:50px;">
45
+ </div>
46
+ </div>
47
+ <div class="gawd_post_page_meta" id="gawd_post_page_meta"></div>
48
+ </div>
49
+ <script>
50
+ jQuery(document).ready(function(){
51
+ datepicker_js('right','gawd_chart_type_post_page_callback');
52
+ jQuery('#gawd_metric_post_page, #gawd_post_page_date, #gawd_chart_type_post_page').on('change',function(){
53
+ gawd_chart_type_post_page('#<?php echo $filter;?>','gawd_post_page_meta');
54
+ })
55
+ })
56
+ function gawd_chart_type_post_page_callback(start, end){
57
+ jQuery('#reportrange span').html(start.format('Y-MM-DD') + ' - ' + end.format('Y-MM-DD'));
58
+ jQuery('#gawd_start_end_date').val(start.format('Y-MM-DD') + '/-/' + end.format('Y-MM-DD'));
59
+ gawd_chart_type_post_page('#<?php echo $filter;?>','gawd_post_page_meta');
60
+ }
61
+
62
+ </script>
admin/tracking.php ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $custom_dimensions = $gawd_client->get_custom_dimensions_tracking();
3
+ $gawd_settings = get_option('gawd_settings');
4
+ require_once(GAWD_DIR . '/gawd_class.php');
5
+ $domain = GAWD::get_domain(esc_html(get_option('siteurl')));
6
+ $all_users = get_users();
7
+ $compare_users = array();
8
+ foreach ($all_users as $user) {
9
+ $compare_users[] = $user->user_nicename;
10
+ }
11
+ $gawd_user_data = get_option('gawd_user_data');
12
+ $ua_code = $gawd_user_data['default_webPropertyId'];
13
+
14
+
15
+
16
+ $cross_domain_list = '';
17
+ if (isset($gawd_settings['enable_cross_domain']) && isset($gawd_settings['cross_domains']) && $gawd_settings['cross_domains'] != '' && $gawd_settings['enable_cross_domain'] != '') {
18
+ $cross_domain_list = $gawd_settings['cross_domains'];
19
+ }
20
+ $gawd_outbound = isset($gawd_settings['gawd_outbound']) ? $gawd_settings['gawd_outbound'] : '';
21
+
22
+ ?>
23
+
24
+
25
+ <script>
26
+ <?php if ('on' == $gawd_settings['gawd_tracking_enable']) { ?>
27
+ (function (i, s, o, g, r, a, m) {
28
+ i['GoogleAnalyticsObject'] = r;
29
+ i[r] = i[r] || function () {
30
+ (i[r].q = i[r].q || []).push(arguments)
31
+ }, i[r].l = 1 * new Date();
32
+ a = s.createElement(o),
33
+ m = s.getElementsByTagName(o)[0];
34
+ a.async = 1;
35
+ a.src = g;
36
+ m.parentNode.insertBefore(a, m)
37
+ })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
38
+ ga('create', '<?php echo $ua_code ?>', 'auto', {'siteSpeedSampleRate': '<?php echo isset($gawd_settings['site_speed_rate']) ? $gawd_settings['site_speed_rate'] : 1; ?>' <?php echo $cross_domain_list != '' ? ",'allowLinker' : true" : ""; ?>});
39
+ <?php if ($cross_domain_list != '') { ?>
40
+ ga('require', 'linker');
41
+ ga('linker:autoLink', [' <?php echo $cross_domain_list; ?>']);
42
+ <?php }; ?>
43
+
44
+ <?php if (isset($gawd_settings['gawd_anonymize']) && 'on' == $gawd_settings['gawd_anonymize']) : ?>
45
+ ga('set', 'anonymizeIp', true);
46
+ <?php
47
+ endif;
48
+ if ($custom_dimensions != "no_custom_dimensions_exist") {
49
+ foreach ($custom_dimensions as $custom_dimension) {
50
+ $optname = 'gawd_custom_dimension_' . str_replace(' ', '_', $custom_dimension['name']);
51
+ if ($gawd_settings[$optname] == 'on') {
52
+ switch ($custom_dimension['name']) {
53
+ case 'Logged in': {
54
+ if (GAWD_google_client::gawd_cd_logged_in()) {
55
+ echo "ga('set', 'dimension" . $custom_dimension['id'] . "', '" . GAWD_google_client::gawd_cd_logged_in() . "');\n";
56
+ }
57
+ break;
58
+ }
59
+ case 'Post type': {
60
+ if (GAWD_google_client::gawd_cd_post_type()) {
61
+ echo "ga('set', 'dimension" . $custom_dimension['id'] . "', '" . GAWD_google_client::gawd_cd_post_type() . "');\n";
62
+ }
63
+ break;
64
+ }
65
+ case 'Author': {
66
+ if (GAWD_google_client::gawd_cd_author()) {
67
+ echo "ga('set', 'dimension" . $custom_dimension['id'] . "', '" . GAWD_google_client::gawd_cd_author() . "');\n";
68
+ }
69
+ break;
70
+ }
71
+ case 'Category': {
72
+ if (GAWD_google_client::gawd_cd_category()) {
73
+ echo "ga('set', 'dimension" . $custom_dimension['id'] . "', '" . GAWD_google_client::gawd_cd_category() . "');\n";
74
+ }
75
+ break;
76
+ }
77
+ case 'Published Month': {
78
+ if (GAWD_google_client::gawd_cd_published_month()) {
79
+ echo "ga('set', 'dimension" . $custom_dimension['id'] . "', '" . GAWD_google_client::gawd_cd_published_month() . "');\n";
80
+ }
81
+ break;
82
+ }
83
+ case 'Published Year': {
84
+ if (GAWD_google_client::gawd_cd_published_year()) {
85
+ echo "ga('set', 'dimension" . $custom_dimension['id'] . "', '" . GAWD_google_client::gawd_cd_published_year() . "');\n";
86
+ }
87
+ break;
88
+ }
89
+ case 'Tags': {
90
+ if (GAWD_google_client::gawd_cd_tags()) {
91
+ echo "ga('set', 'dimension" . $custom_dimension['id'] . "', '" . GAWD_google_client::gawd_cd_tags() . "');\n";
92
+ }
93
+ break;
94
+ }
95
+ default: break;
96
+ }
97
+ }
98
+ }
99
+ }
100
+ ?>
101
+ ga('send', 'pageview');
102
+ <?php } ?>
103
+ jQuery(document).ready(function () {
104
+ jQuery(window).load(function () {
105
+ <?php if (isset($gawd_settings['gawd_file_formats']) && $gawd_settings['gawd_file_formats'] != '') { ?>
106
+ //Track Downloads
107
+ jQuery('a').filter(function () {
108
+ return this.href.match(/.*\.(<?php echo esc_js($gawd_settings['gawd_file_formats']); ?>)(\?.*)?$/);
109
+ }).click(function (e) {
110
+ ga('send', 'event', 'download', 'click', this.href<?php
111
+ if (isset($gawd_settings['exclude_events']) && $gawd_settings['exclude_events']) {
112
+ echo ", {'nonInteraction': 1}";
113
+ }
114
+ ?>);
115
+ });
116
+
117
+ //Track Mailto
118
+ jQuery('a[href^="mailto"]').click(function (e) {
119
+ ga('send', 'event', 'email', 'send', this.href<?php
120
+ if (isset($gawd_settings['exclude_events']) && $gawd_settings['exclude_events']) {
121
+ echo ", {'nonInteraction': 1}";
122
+ }
123
+ ?>);
124
+ });
125
+ <?php }
126
+ if($gawd_outbound != ''){
127
+ if (isset($domain) && $domain ) { ?>
128
+ //Track Outbound Links
129
+ jQuery('a[href^="http"]').filter(function () {
130
+ if (!this.href.match(/.*\.(<?php echo esc_js(isset($gawd_settings['gawd_file_formats']) && $gawd_settings['gawd_file_formats'] != ''); ?>)(\?.*)?$/)) {
131
+ if (this.href.indexOf('<?php echo $domain; ?>') == -1) {
132
+ return this.href
133
+ }
134
+ ;
135
+ }
136
+ }).click(function (e) {
137
+ ga('send', 'event', 'outbound', 'click', this.href<?php
138
+ if (isset($gawd_settings['exclude_events']) && $gawd_settings['exclude_events']) {
139
+ echo ", {'nonInteraction': 1}";
140
+ }
141
+ ?>);
142
+ });
143
+ <?php } ?>
144
+ <?php } ?>
145
+ });
146
+ });
147
+
148
+ </script>
assets/ajax_loader.gif ADDED
Binary file
assets/arrow-down.png ADDED
Binary file
assets/arrow-up.png ADDED
Binary file
assets/back_logo.png ADDED
Binary file
assets/cleardot.gif ADDED
Binary file
assets/closedot.png ADDED
Binary file
assets/dashicons-migrate.png ADDED
Binary file
assets/dashicons-update.png ADDED
Binary file
assets/ecommerce-analityc.png ADDED
Binary file
assets/freePages/alerts.png ADDED
Binary file
assets/freePages/custom_dimensions.png ADDED
Binary file
assets/freePages/custom_reports.png ADDED
Binary file
assets/freePages/exclude_tracking.png ADDED
Binary file
assets/freePages/pushovers.png ADDED
Binary file
assets/icons-menu.png ADDED
Binary file
assets/icons-menu1.png ADDED
Binary file
assets/icons-settings.png ADDED
Binary file
assets/icons.png ADDED
Binary file
assets/infinity.png ADDED
Binary file
assets/info.png ADDED
Binary file
assets/lines.png ADDED
Binary file
assets/main_icon.png ADDED
Binary file
assets/menu.png ADDED
Binary file
assets/uninstall-icon.png ADDED
Binary file
assets/vs.png ADDED
Binary file
assets/vs_rev.png ADDED
Binary file
assets/web-dorado.png ADDED
Binary file
featured/featured.php ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function gawd_featured_plugins($current_plugin = '') {
3
+ $plugins = array(
4
+ "form-maker" => array(
5
+ 'title' => 'Form Maker',
6
+ 'text' => 'Wordpress form builder plugin',
7
+ 'content' => 'Form Maker is a modern and advanced tool for creating WordPress forms easily and fast.',
8
+ 'href' => 'https://web-dorado.com/products/wordpress-form.html'
9
+ ),
10
+ "photo-gallery" => array(
11
+ 'title' => 'Photo Gallery',
12
+ 'text' => 'WordPress Photo Gallery plugin',
13
+ 'content' => 'Photo Gallery is a fully responsive WordPress Gallery plugin with advanced functionality.',
14
+ 'href' => 'https://web-dorado.com/products/wordpress-photo-gallery-plugin.html'
15
+ ),
16
+ "contact_form_bulder" => array(
17
+ 'title' => 'Contact Form Builder',
18
+ 'text' => 'WordPress contact form builder plugin',
19
+ 'content' => 'Contact Form Builder is the best tool for quickly arranging a contact form for your clients and visitors.',
20
+ 'href' => 'https://web-dorado.com/products/wordpress-contact-form-builder.html'
21
+ ),
22
+ "slider_wd" => array(
23
+ 'title' => 'Slider WD',
24
+ 'text' => 'WordPress slider plugin',
25
+ 'content' => 'Create responsive, highly configurable sliders with various effects for your WordPress site.',
26
+ 'href' => 'https://web-dorado.com/products/wordpress-slider-plugin.html'
27
+ ),
28
+ "events-wd" => array(
29
+ 'title' => 'Event Calendar WD',
30
+ 'text' => 'WordPress calendar plugin',
31
+ 'content' => 'Organize and publish your events in an easy and elegant way using Event Calendar WD.',
32
+ 'href' => 'https://web-dorado.com/products/wordpress-event-calendar-wd.html'
33
+ ),
34
+ "contact-maker" => array(
35
+ 'title' => 'Contact Form Maker',
36
+ 'text' => 'WordPress contact form maker plugin',
37
+ 'content' => 'WordPress Contact Form Maker is an advanced and easy-to-use tool for creating forms.',
38
+ 'href' => 'https://web-dorado.com/products/wordpress-contact-form-maker-plugin.html'
39
+ ),
40
+ "spider-calendar" => array(
41
+ 'title' => 'Spider Calendar',
42
+ 'text' => 'WordPress event calendar plugin',
43
+ 'content' => 'Spider Event Calendar is a highly configurable product which allows you to have multiple organized events.',
44
+ 'href' => 'https://web-dorado.com/products/wordpress-calendar.html'
45
+ ),
46
+ "catalog" => array(
47
+ 'title' => 'Spider Catalog',
48
+ 'text' => 'WordPress product catalog plugin',
49
+ 'content' => 'Spider Catalog for WordPress is a convenient tool for organizing the products represented on your website into catalogs.',
50
+ 'href' => 'https://web-dorado.com/products/wordpress-catalog.html'
51
+ ),
52
+ "player" => array(
53
+ 'title' => 'Video Player',
54
+ 'text' => 'WordPress Video player plugin',
55
+ 'content' => 'Spider Video Player for WordPress is a Flash & HTML5 video player plugin that allows you to easily add videos to your website with the possibility.',
56
+ 'href' => 'https://web-dorado.com/products/wordpress-player.html'
57
+ ),
58
+ "contacts" => array(
59
+ 'title' => 'Spider Contacts',
60
+ 'text' => 'Wordpress staff list plugin',
61
+ 'content' => 'Spider Contacts helps you to display information about the group of people more intelligible, effective and convenient.',
62
+ 'href' => 'https://web-dorado.com/products/wordpress-contacts-plugin.html'
63
+ ),
64
+ "facebook" => array(
65
+ 'title' => 'Spider Facebook',
66
+ 'text' => 'WordPress Facebook plugin',
67
+ 'content' => 'Spider Facebook is a WordPress integration tool for Facebook.It includes all the available Facebook social plugins and widgets.',
68
+ 'href' => 'https://web-dorado.com/products/wordpress-facebook.html'
69
+ ),
70
+ "twitter-widget" => array(
71
+ 'title' => 'Widget Twitter',
72
+ 'text' => 'WordPress Widget Twitter plugin',
73
+ 'content' => 'The Widget Twitter plugin lets you to fully integrate your WordPress site with your Twitter account.',
74
+ 'href' => 'https://web-dorado.com/products/wordpress-twitter-integration-plugin.html'
75
+ ),
76
+ "faq" => array(
77
+ 'title' => 'Spider FAQ',
78
+ 'text' => 'WordPress FAQ Plugin',
79
+ 'content' => 'The Spider FAQ WordPress plugin is for creating an FAQ (Frequently Asked Questions) section for your website.',
80
+ 'href' => 'https://web-dorado.com/products/wordpress-faq-plugin.html'
81
+ ),
82
+ "zoom" => array(
83
+ 'title' => 'Zoom',
84
+ 'text' => 'WordPress text zoom plugin',
85
+ 'content' => 'Zoom enables site users to resize the predefined areas of the web site.',
86
+ 'href' => 'https://web-dorado.com/products/wordpress-zoom.html'
87
+ ),
88
+ "flash-calendar" => array(
89
+ 'title' => 'Flash Calendar',
90
+ 'text' => 'WordPress flash calendar plugin',
91
+ 'content' => 'Spider Flash Calendar is a highly configurable Flash calendar plugin which allows you to have multiple organized events.',
92
+ 'href' => 'https://web-dorado.com/products/wordpress-events-calendar.html'
93
+ ),
94
+ "folder_menu" => array(
95
+ 'title' => 'Folder Menu',
96
+ 'text' => 'WordPress folder menu plugin',
97
+ 'content' => 'Folder Menu Vertical is a WordPress Flash menu module for your website, designed to meet your needs and preferences.',
98
+ 'href' => 'https://web-dorado.com/products/wordpress-menu-vertical.html'
99
+ ),
100
+ "random_post" => array(
101
+ 'title' => 'Random post',
102
+ 'text' => 'WordPress random post plugin',
103
+ 'content' => 'Spider Random Post is a small but very smart solution for your WordPress web site.',
104
+ 'href' => 'https://web-dorado.com/products/wordpress-random-post.html'
105
+ ),
106
+ "faq_wd" => array(
107
+ 'title' => 'FAQ WD',
108
+ 'text' => 'WordPress FAQ plugin',
109
+ 'content' => 'Organize and publish your FAQs in an easy and elegant way using FAQ WD.',
110
+ 'href' => 'https://web-dorado.com/products/wordpress-faq-wd.html'
111
+ ),
112
+ "instagram_feed" => array(
113
+ 'title' => 'Instagram Feed WD',
114
+ 'text' => 'WordPress Instagram Feed plugin',
115
+ 'content' => 'WD Instagram Feed is a user-friendly tool for displaying user or hashtag-based feeds on your website.',
116
+ 'href' => 'https://web-dorado.com/products/wordpress-instagram-feed-wd.html'
117
+ ),
118
+ "post-slider" => array(
119
+ 'title' => 'Post Slider',
120
+ 'text' => 'WordPress Post Slider plugin',
121
+ 'content' => 'Post Slider WD is designed to show off the selected posts of your website in a slider.',
122
+ 'href' => 'https://web-dorado.com/products/wordpress-post-slider-plugin.html'
123
+ ),
124
+ "google-maps" => array(
125
+ 'title' => 'Google Map',
126
+ 'text' => 'WordPress Google Maps Plugin',
127
+ 'content' => 'Google Maps WD is an intuitive tool for creating Google maps with advanced markers, custom layers and overlays for your website.',
128
+ 'href' => 'https://web-dorado.com/products/wordpress-google-maps-plugin.html'
129
+ ),
130
+ "wd-google-analytics" => array(
131
+ 'title' => 'Wd Google Analytics',
132
+ 'text' => 'WordPress Google Analytics Plugin',
133
+ 'content' => 'WD Google Analytics is a user-friendly all in one plugin, which allows to manage and monitor your website analytics from WordPress dashboard.',
134
+ 'href' => 'https://web-dorado.com/products/wordpress-google-analytics-plugin.html'
135
+ )
136
+ );
137
+ ?>
138
+ <div id="main_featured_plugins_page">
139
+ <h3>Featured Plugins</h3>
140
+ <div class="featured_header">
141
+ <a target="_blank" href="https://web-dorado.com/wordpress-plugins.html?source=<?php echo $current_plugin; ?>">
142
+ <h1>GET <?php echo $plugins[$current_plugin]["title"]; ?> +23 PLUGINS</h1>
143
+ <h1 class="get_plugins">FOR $100 ONLY <span>- SAVE 70%</span></h1>
144
+ <div class="try-now">
145
+ <span>TRY NOW</span>
146
+ </div>
147
+ </a>
148
+ </div>
149
+ <ul id="featured-plugins-list">
150
+ <?php
151
+ foreach ($plugins as $key => $plugins) {
152
+ if ($current_plugin != $key) {
153
+ ?>
154
+ <li class="<?php echo $key; ?>">
155
+ <div class="product"></div>
156
+ <div class="title">
157
+ <strong class="heading"><?php echo $plugins['title']; ?></strong>
158
+ </div>
159
+ <div class="description">
160
+ <p><?php echo $plugins['content']; ?></p>
161
+ </div>
162
+ <a target="_blank" href="<?php echo $plugins['href']; ?>?source=<?php echo $current_plugin; ?>" class="download">Download Plugin &#9658;</a>
163
+ </li>
164
+ <?php
165
+ }
166
+ }
167
+ ?>
168
+ </ul>
169
+ </div>
170
+ <?php
171
+ }
featured/featured_themes.php ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class gawd_featured_themes {
4
+
5
+
6
+ private $slug = 'wd-google-analytics';
7
+ private $lang_slug = 'gawd';
8
+
9
+ private $image_url = '';
10
+ private $demo_url = 'http://themedemo.web-dorado.com/';
11
+ private $site_url = 'https://web-dorado.com/wordpress-themes/';
12
+
13
+ public function __construct() {
14
+ $this->image_url = GAWD_URL . "/featured/images/";
15
+
16
+ }
17
+
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ public function display() {
23
+ ?>
24
+
25
+ <style>
26
+ @import url(https://fonts.googleapis.com/css?family=Oswald);
27
+
28
+ #main_featured_themes_page #featured-themes-list {
29
+ position:relative;
30
+ margin:0px auto;
31
+ height:auto;
32
+ display:table;
33
+ list-style:none;
34
+ text-align: center;
35
+ width: 100%;
36
+ }
37
+ #main_featured_themes_page #featured-themes-list li {
38
+ display: inline-table;
39
+ width: 300px;
40
+ margin: 20px 10px 0px 10px;
41
+ background: #FFFFFF;
42
+ border-right: 3px solid #E5E5E5;
43
+ border-bottom: 3px solid #E5E5E5;
44
+ position: relative;
45
+ }
46
+ @media screen and (min-width: 1600px) {
47
+ #main_featured_themes_page #featured-themes-list li {
48
+ width:400px;
49
+ }
50
+
51
+ }
52
+ #main_featured_themes_page .theme_img img {
53
+ max-width: 100%;
54
+ }
55
+ #main_featured_themes_page .theme_img {
56
+ display: inline-block;
57
+ overflow: hidden;
58
+ outline: 1px solid #D6D1D1;
59
+ position:relative;
60
+ /*height: 168px; */
61
+ }
62
+ #main_featured_themes_page #featured-themes-list li .title {
63
+ width: 91%;
64
+ text-align: center;
65
+ margin: 0 auto;
66
+ }
67
+ #main_featured_themes_page {
68
+ font-family: Oswald;
69
+ }
70
+ #main_featured_themes_page #featured-themes-list li .title .heading {
71
+ display: block;
72
+ position: relative;
73
+ font-size: 17px;
74
+ color: #666666;
75
+ margin: 13px 0px 13px 0px;
76
+ text-transform: uppercase;
77
+ }
78
+ #main_featured_themes_page #featured-themes-list li .title p {
79
+ font-size:14px;
80
+ color:#444;
81
+ margin-left:20px;
82
+ }
83
+ #main_featured_themes_page #featured-themes-list li .description {
84
+ height:130px;
85
+ width: 90%;
86
+ margin: 0 auto;
87
+ }
88
+ #main_featured_themes_page #featured-themes-list li .description p {
89
+ text-align: center;
90
+ width: 100%;
91
+ color: #666666;
92
+ font-family: "Open Sans",sans-serif;
93
+ font-size: 14px;
94
+ }
95
+ #main_featured_themes_page #featured-themes-list li .links {
96
+ border-top: 1px solid #d8d8d8;
97
+ width: 90%;
98
+ margin: 0 auto;
99
+ font-size: 14px;
100
+ line-height: 40px;
101
+ font-weight: bolder;
102
+ text-align: center;
103
+ padding-top: 9px;
104
+ padding-bottom: 12px;
105
+ }
106
+ #main_featured_themes_page .page_header h1 {
107
+ margin: 0px;
108
+ font-family: Segoe UI;
109
+ padding-bottom: 15px;
110
+ color: rgb(111, 111, 111);
111
+ font-size: 24px;
112
+ text-align:center;
113
+ }
114
+ #main_featured_themes_page .page_header {
115
+ height: 40px;
116
+ padding: 22px 0px 0px 0px;
117
+ margin-bottom: 15px;
118
+ /*border-bottom: rgb(111, 111, 111) solid 1px;*/
119
+ }
120
+ #main_featured_themes_page #featured-themes-list li a {
121
+ outline: none;
122
+ line-height: 29px;
123
+ text-decoration: none;
124
+ color: #134d68;
125
+ font-family: "Open Sans",sans-serif;
126
+ text-shadow: 1px 0;
127
+ display: inline-block;
128
+ font-size: 15px;
129
+ }
130
+ #main_featured_themes_page #featured-themes-list li a.demo {
131
+ color: #ffffff;
132
+ background: #F47629;
133
+ border-radius: 3px;
134
+ width: 76px;
135
+ text-align:center;
136
+ margin-right: 12px;
137
+ }
138
+ #main_featured_themes_page #featured-themes-list li a.download {
139
+ padding-right: 30px;
140
+ background:url(<?php echo $this->image_url; ?>down.png) no-repeat right;
141
+ }
142
+ #main_featured_themes_page .featured_header{
143
+ background: #11465F;
144
+ border-right: 3px solid #E5E5E5;
145
+ border-bottom: 3px solid #E5E5E5;
146
+ position: relative;
147
+ padding: 20px 0;
148
+ }
149
+ #main_featured_themes_page .featured_header .try-now {
150
+ text-align: center;
151
+ }
152
+ #main_featured_themes_page .featured_header .try-now span {
153
+ display: inline-block;
154
+ padding: 7px 16px;
155
+ background: #F47629;
156
+ border-radius: 10px;
157
+ color: #ffffff;
158
+ font-size: 23px;
159
+ }
160
+ #main_featured_themes_page .featured_container {
161
+ position: relative;
162
+ width: 90%;
163
+ margin: 15px auto 0px auto;
164
+ }
165
+ #main_featured_themes_page .featured_container .old_price{
166
+ color: rgba(180, 180, 180, 0.3);
167
+ text-decoration: line-through;
168
+ font-family: Oswald;
169
+ }
170
+ #main_featured_themes_page .featured_container .get_themes{
171
+ color: #FFFFFF;
172
+ height: 85px;
173
+ margin: 0;
174
+ background-size: 95% 100%;
175
+ background-position: center;
176
+ line-height: 60px;
177
+ font-size: 45px;
178
+ text-align: center;
179
+ letter-spacing: 3px;
180
+ }
181
+ #main_featured_themes_page .featured_header h1{
182
+ font-size: 45px;
183
+ text-align: center;
184
+ color: #ffffff;
185
+ letter-spacing: 3px;
186
+ line-height: 10px;
187
+ }
188
+ #main_featured_themes_page .featured_header a{
189
+ text-decoration: none;
190
+ }
191
+ @media screen and (max-width: 1035px) {
192
+ #main_featured_themes_page .featured_header h1{
193
+ font-size: 37px;
194
+ line-height: 0;
195
+ }
196
+ }
197
+ @media screen and (max-width: 835px) {
198
+ #main_featured_themes_page .get_themes span{
199
+ display: none;
200
+ }
201
+ }
202
+ @media screen and (max-width: 435px) {
203
+ #main_featured_themes_page .featured_header h1 {
204
+ font-size: 20px;
205
+ line-height: 17px;
206
+ }
207
+ }
208
+ </style>
209
+
210
+ <?php
211
+ $WDWThemes = array(
212
+ "business_elite" => array(
213
+ "title" => "Business Elite",
214
+ "description" => __("Business Elite is a robust parallax theme for business websites. The theme uses smooth transitions and many functional sections.",$this->lang_slug),
215
+ "link" => "business-elite.html",
216
+ "demo" => "theme-businesselite",
217
+ "image" => "business_elite.jpg"
218
+ ),
219
+ "portfolio" => array(
220
+ "title" => "Portfolio Gallery",
221
+ "description" => __("Portfolio Gallery helps to display images using various color schemes and layouts combined with elegant fonts and content parts.",$this->lang_slug),
222
+ "link" => "portfolio-gallery.html",
223
+ "demo" => "theme-portfoliogallery",
224
+ "image" => "portfolio_gallery.jpg"
225
+ ),
226
+ "sauron" => array(
227
+ "title" => "Sauron",
228
+ "description" => __("Sauron is a multipurpose parallax theme, which uses multiple interactive sections designed for the client-engagement.",$this->lang_slug),
229
+ "link" => "sauron.html",
230
+ "demo" => "theme-sauron",
231
+ "image" => "sauron.jpg"
232
+ ),
233
+ "business_world" => array(
234
+ "title" => "Business World",
235
+ "description" => __("Business World is an innovative WordPress theme great for Business websites.",$this->lang_slug),
236
+ "link" => "business-world.html",
237
+ "demo" => "theme-businessworld",
238
+ "image" => "business_world.jpg"
239
+ ),
240
+ "best_magazine" => array(
241
+ "title" => "Best Magazine",
242
+ "description" => __("Best Magazine is an ultimate selection when you are dealing with multi-category news websites.",$this->lang_slug),
243
+ "link" => "best-magazine.html",
244
+ "demo" => "theme-bestmagazine",
245
+ "image" => "best_magazine.jpg"
246
+ ),
247
+ "magazine" => array(
248
+ "title" => "News Magazine",
249
+ "description" => __("Magazine theme is a perfect solution when creating news and informational websites. It comes with a wide range of layout options.",$this->lang_slug),
250
+ "link" => "news-magazine.html",
251
+ "demo" => "theme-newsmagazine",
252
+ "image" => "news_magazine.jpg"
253
+ )
254
+ );
255
+ ?>
256
+ <div id="main_featured_themes_page">
257
+ <div class="featured_container">
258
+ <div class="page_header">
259
+ <h1><?php echo __("Featured Themes",$this->lang_slug); ?></h1>
260
+ </div>
261
+ <div class="featured_header">
262
+ <a target="_blank" href="https://web-dorado.com/wordpress-themes.html?source=<?php echo $this->slug; ?>">
263
+ <h1><?php echo __("WORDPRESS THEMES",$this->lang_slug); ?></h1>
264
+ <h2 class="get_themes"><?php echo __("ALL FOR $40 ONLY ",$this->lang_slug); ?><span>- <?php echo __("SAVE 80%",$this->lang_slug); ?></span></h2>
265
+ <div class="try-now">
266
+ <span><?php echo __("TRY NOW",$this->lang_slug); ?></span>
267
+ </div>
268
+ </a>
269
+ </div>
270
+ <ul id="featured-themes-list">
271
+ <?php foreach($WDWThemes as $key=>$WDWTheme) : ?>
272
+ <li class="<?php echo $key; ?>">
273
+ <div class="theme_img">
274
+ <img src="<?php echo $this->image_url . $WDWTheme["image"]; ?>">
275
+ </div>
276
+ <div class="title">
277
+ <h3 class="heading"><?php echo $WDWTheme["title"]; ?></h3>
278
+ </div>
279
+ <div class="description">
280
+ <p><?php echo $WDWTheme["description"]; ?></p>
281
+ </div>
282
+ <div class="links">
283
+ <a target="_blank" href="<?php echo $this->demo_url . $WDWTheme["demo"]."?source=".$this->slug; ?>" class="demo"><?php echo __("Demo",$this->lang_slug); ?></a>
284
+ <a target="_blank" href="<?php echo $this->site_url . $WDWTheme["link"]."?source=".$this->slug; ?>" class="download"><?php echo __("Free Download",$this->lang_slug); ?></a>
285
+ </div>
286
+ </li>
287
+ <?php endforeach; ?>
288
+ </ul>
289
+ </div>
290
+ </div>
291
+ <?php }
292
+
293
+ ////////////////////////////////////////////////////////////////////////////////////////
294
+ // Getters & Setters //
295
+ ////////////////////////////////////////////////////////////////////////////////////////
296
+ ////////////////////////////////////////////////////////////////////////////////////////
297
+ // Private Methods //
298
+ ////////////////////////////////////////////////////////////////////////////////////////
299
+ ////////////////////////////////////////////////////////////////////////////////////////
300
+ // Listeners //
301
+ ////////////////////////////////////////////////////////////////////////////////////////
302
+ }
featured/images/best_magazine.jpg ADDED
Binary file
featured/images/business_elite.jpg ADDED
Binary file
featured/images/business_world.jpg ADDED
Binary file
featured/images/catalog.png ADDED
Binary file
featured/images/contact.builder.png ADDED
Binary file
featured/images/contact.maker.png ADDED
Binary file
featured/images/contacts.png ADDED
Binary file
featured/images/down.png ADDED
Binary file
featured/images/download_plugins.png ADDED
Binary file
featured/images/download_themes.png ADDED
Binary file
featured/images/events-wd.png ADDED
Binary file
featured/images/exclusive.jpg ADDED
Binary file
featured/images/expert.jpg ADDED
Binary file
featured/images/facebook.png ADDED
Binary file
featured/images/faq.png ADDED
Binary file
featured/images/faq_wd.png ADDED
Binary file
featured/images/flash.calendar.png ADDED
Binary file
featured/images/fm-import.png ADDED
Binary file
featured/images/folder.menu.png ADDED
Binary file
featured/images/form.png ADDED
Binary file
featured/images/google-maps.png ADDED
Binary file
featured/images/instagram_feed.png ADDED
Binary file
featured/images/magazine.jpg ADDED
Binary file
featured/images/mottomag.jpg ADDED
Binary file
featured/images/news_magazine.jpg ADDED
Binary file
featured/images/photo-gallery.png ADDED
Binary file
featured/images/player.png ADDED
Binary file
featured/images/portfolio.png ADDED
Binary file
featured/images/portfolio_gallery.jpg ADDED
Binary file
featured/images/post-slider.png ADDED
Binary file
featured/images/random.post.png ADDED
Binary file
featured/images/sauron.jpg ADDED
Binary file
featured/images/slider.png ADDED
Binary file
featured/images/spider.calendar.png ADDED
Binary file
featured/images/twittertools.png ADDED
Binary file
featured/images/wedding.jpg ADDED
Binary file
featured/images/wedding_style.jpg ADDED
Binary file
featured/images/zoom.png ADDED
Binary file
featured/style.css ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import url(http://fonts.googleapis.com/css?family=Oswald);
2
+ #main_featured_plugins_page {
3
+ font-family: Oswald;
4
+ width: 90%;
5
+ margin: 15px auto 0px auto;
6
+ }
7
+
8
+ #main_featured_plugins_page h3 {
9
+ border-bottom: 2px solid #CECECE;
10
+ color: rgb(111, 111, 111);
11
+ font-family: Segoe UI;
12
+ font-size: 18px;
13
+ margin: 0px auto 15px auto;
14
+ padding: 20px 0;
15
+ }
16
+
17
+ #main_featured_plugins_page #featured-plugins-list {
18
+ position:relative;
19
+ margin:0px auto;
20
+ height:auto;
21
+ display:table;
22
+ list-style:none;
23
+ text-align: center;
24
+ width: 100%;
25
+ }
26
+
27
+ #main_featured_plugins_page #featured-plugins-list li {
28
+ display: inline-table;
29
+ width: 200px;
30
+ margin: 20px 10px 0px 10px;
31
+ background: #FFFFFF;
32
+ border-right: 3px solid #E5E5E5;
33
+ height: 335px;
34
+ border-bottom: 3px solid #E5E5E5;
35
+ position: relative;
36
+ }
37
+
38
+ #main_featured_plugins_page #featured-plugins-list li .product {
39
+ position:relative;
40
+ height:113px;
41
+ background-color: transparent !important;
42
+ background-position-x: 50% !important;
43
+ margin: 7px;
44
+ border-radius: 3px;
45
+ background-size: 115px !important;
46
+ }
47
+
48
+ #main_featured_plugins_page #featured-plugins-list li .title {
49
+ width: 90%;
50
+ text-align: center;
51
+ margin: 0 auto;
52
+ }
53
+
54
+ #main_featured_plugins_page #featured-plugins-list li.form-maker .product {background:url("images/form.png") center center no-repeat;}
55
+ #main_featured_plugins_page #featured-plugins-list li.catalog .product {background:url("images/catalog.png") center center no-repeat;}
56
+ #main_featured_plugins_page #featured-plugins-list li.contact-maker .product {background:url("images/contact.maker.png") center center no-repeat;}
57
+ #main_featured_plugins_page #featured-plugins-list li.contacts .product {background:url("images/contacts.png") center center no-repeat;}
58
+ #main_featured_plugins_page #featured-plugins-list li.facebook .product {background:url("images/facebook.png") center center no-repeat;}
59
+ #main_featured_plugins_page #featured-plugins-list li.faq .product {background:url("images/faq.png") center center no-repeat;}
60
+ #main_featured_plugins_page #featured-plugins-list li.flash-calendar .product {background:url("images/flash.calendar.png") center center no-repeat;}
61
+ #main_featured_plugins_page #featured-plugins-list li.player .product {background:url("images/player.png") center center no-repeat; }
62
+ #main_featured_plugins_page #featured-plugins-list li.spider-calendar .product {background:url("images/spider.calendar.png") center center no-repeat;}
63
+ #main_featured_plugins_page #featured-plugins-list li.contact_form_bulder .product {background:url("images/contact.builder.png") center center no-repeat;}
64
+ #main_featured_plugins_page #featured-plugins-list li.random_post .product {background:url("images/random.post.png") center center no-repeat;}
65
+ #main_featured_plugins_page #featured-plugins-list li.slider_wd .product {background:url("images/slider.png") center center no-repeat;}
66
+ #main_featured_plugins_page #featured-plugins-list li.folder_menu .product {background:url("images/folder.menu.png") center center no-repeat;}
67
+ #main_featured_plugins_page #featured-plugins-list li.zoom .product {background:url("images/zoom.png") center center no-repeat;}
68
+ #main_featured_plugins_page #featured-plugins-list li.fm-import .product {background:url("images/fm-import.png") center center no-repeat;}
69
+ #main_featured_plugins_page #featured-plugins-list li.photo-gallery .product {background:url("images/photo-gallery.png") center center no-repeat;}
70
+ #main_featured_plugins_page #featured-plugins-list li.twitter-widget .product {background:url("images/twittertools.png") center center no-repeat;}
71
+ #main_featured_plugins_page #featured-plugins-list li.events-wd .product {background:url("images/events-wd.png") center center no-repeat;}
72
+ #main_featured_plugins_page #featured-plugins-list li.faq_wd .product {background:url("images/faq_wd.png") center center no-repeat;}
73
+ #main_featured_plugins_page #featured-plugins-list li.instagram_feed .product {background:url("images/instagram_feed.png") center center no-repeat;}
74
+ #main_featured_plugins_page #featured-plugins-list li.post-slider .product {background:url("images/post-slider.png") center center no-repeat;}
75
+ #main_featured_plugins_page #featured-plugins-list li.google-maps .product {background:url("images/google-maps.png") center center no-repeat;}
76
+
77
+ #main_featured_plugins_page #featured-plugins-list li .title .heading {
78
+ display: block;
79
+ position: relative;
80
+ font-size: 17px;
81
+ color: #767676;
82
+ margin: 13px 0px 13px 0px;
83
+ text-transform: uppercase;
84
+ }
85
+
86
+ #main_featured_plugins_page #featured-plugins-list li .title p {
87
+ font-size:14px;
88
+ color:#444;
89
+ margin-left:20px;
90
+ }
91
+
92
+ #main_featured_plugins_page #featured-plugins-list li .description {
93
+ height: 127px;
94
+ width: 90%;
95
+ margin: 0 auto;
96
+ }
97
+
98
+ #main_featured_plugins_page #featured-plugins-list li .description p {
99
+ text-align: center;
100
+ width: 100%;
101
+ color: #9A9A9A;
102
+ font-family: Segoe UI Light;
103
+ }
104
+
105
+ #featured-plugins-list li a.download {
106
+ display: block;
107
+ border-top: 1px solid #CACACA;
108
+ outline: none;
109
+ width: 90%;
110
+ margin: 0 auto;
111
+ font-size: 14px;
112
+ line-height: 40px;
113
+ text-decoration: none;
114
+ font-weight: bolder;
115
+ text-align: center;
116
+ color: #134D68;
117
+ position: absolute;
118
+ text-transform: uppercase;
119
+ bottom: 0;
120
+ left: 10px;
121
+ font-family: Segoe UI Black;
122
+ text-shadow: 1px 0;
123
+ }
124
+
125
+ #featured-plugins-list li a.download:hover {
126
+ color: #F47629;
127
+ }
128
+
129
+ .featured_header {
130
+ background: #11465F;
131
+ border-right: 3px solid #E5E5E5;
132
+ border-bottom: 3px solid #E5E5E5;
133
+ position: relative;
134
+ padding: 20px 0;
135
+ }
136
+
137
+ .featured_header .old_price {
138
+ color: rgba(180, 180, 180, 0.3);
139
+ text-decoration: line-through;
140
+ font-family: Oswald;
141
+ }
142
+
143
+ .featured_header h1.get_plugins {
144
+ color: #FFFFFF;
145
+ height: 85px;
146
+ margin: 0;
147
+ background-size: 85% 100%;
148
+ background-position: center;
149
+ line-height: 60px;
150
+ }
151
+
152
+ .featured_header .try-now {
153
+ text-align: center;
154
+ }
155
+
156
+ .featured_header .try-now span {
157
+ display: inline-block;
158
+ padding: 7px 16px;
159
+ background: #F47629;
160
+ border-radius: 10px;
161
+ color: #ffffff;
162
+ font-size: 23px;
163
+ }
164
+
165
+ .featured_header h1 {
166
+ font-size: 50px;
167
+ text-align: center;
168
+ color: #FFFFFF;
169
+ letter-spacing: 3px;
170
+ text-transform: uppercase;
171
+ }
172
+
173
+ .featured_header a {
174
+ text-decoration: none;
175
+ }
176
+
177
+ .featured_header a:hover {
178
+ text-decoration: none;
179
+ }
180
+
181
+ @media screen and (max-width: 1105px) {
182
+ .featured_header h1 {
183
+ font-size: 37px;
184
+ line-height: 0;
185
+ }
186
+ }
187
+
188
+ @media screen and (max-width: 835px) {
189
+ .get_plugins span {
190
+ display: none;
191
+ }
192
+ }
193
+
194
+ @media screen and (max-width: 700px) {
195
+ .featured_header h1 {
196
+ line-height: 40px;
197
+ }
198
+ }
199
+
200
+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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
4
+
5
+ class GAWD {
6
+
7
+ /**
8
+ * @var GAWD The reference to Singleton instance of this class
9
+ */
10
+ private static $instance;
11
+ private $project_client_id = null;
12
+ private $project_client_secret = null;
13
+ public $redirect_uri = "urn:ietf:wg:oauth:2.0:oob";
14
+
15
+ /**
16
+ * Protected constructor to prevent creating a new instance of the
17
+ * Singleton via the `new` operator from outside of this class.
18
+ */
19
+ protected function __construct() {
20
+
21
+ if(isset($_POST["reset_data"]) && $_POST["reset_data"] != ''){
22
+ $this->reset_user_data();
23
+ }
24
+ add_action('admin_enqueue_scripts', array($this, 'gawd_check_id'));
25
+ add_action('admin_notices', array($this, 'upgrade_pro'));
26
+
27
+ add_action('admin_menu', array($this, 'gawd_add_menu'));
28
+ add_action('admin_enqueue_scripts', array($this, 'gawd_enqueue_scripts'));
29
+ add_action('wp_enqueue_scripts', array($this, 'gawd_front_scripts'));
30
+ add_action('wp_ajax_gawd_auth', array($this, 'gawd_auth'));
31
+ add_action('wp_ajax_create_pdf_file', array($this, 'create_pdf_file'));
32
+ add_action('wp_ajax_create_csv_file', array($this, 'create_csv_file'));
33
+ add_action('wp_ajax_show_data', array($this, 'show_data'));
34
+ add_action('wp_ajax_remove_zoom_message', array($this, 'remove_zoom_message'));
35
+ add_action('wp_ajax_show_page_post_data', array($this, 'show_page_post_data'));
36
+ add_action('wp_ajax_show_data_compact', array($this, 'show_data_compact'));
37
+ add_action('wp_ajax_get_realtime', array($this, 'get_realtime'));
38
+ add_action('wp_dashboard_setup', array($this, 'google_analytics_wd_dashboard_widget'));
39
+ add_action('admin_menu', array($this, 'overview_date_meta'));
40
+ add_filter('cron_schedules', array($this, 'gawd_my_schedule'));
41
+ add_action('admin_init', array($this, 'gawd_export'));
42
+ add_action('gawd_pushover_daily', array($this, 'gawd_pushover_daily'));
43
+ add_action('gawd_pushover_gawd_weekly', array($this, 'gawd_pushover_weekly'));
44
+ add_action('gawd_pushover_gawd_monthly', array($this, 'gawd_pushover_monthly'));
45
+ add_action('gawd_alert_daily', array($this, 'gawd_alert_daily'));
46
+ add_action('gawd_alert_gawd_monthly', array($this, 'gawd_alert_monthly'));
47
+ add_action('gawd_alert_gawd_weekly', array($this, 'gawd_alert_weekly'));
48
+ add_action('gawd_email_daily', array($this, 'gawd_daily_email'), 0);
49
+ add_action('gawd_email_gawd_weekly', array($this, 'gawd_weekly_email'));
50
+ add_action('gawd_email_gawd_monthly', array($this, 'gawd_monthly_email'));
51
+ //add_action('init', array($this, 'gawd_daily_email'));
52
+ add_action('wp_head', array($this, 'gawd_tracking_code'), 99);
53
+ $gawd_settings = get_option('gawd_settings');
54
+ $gawd_post_page_roles = isset($gawd_settings['gawd_post_page_roles']) ? $gawd_settings['gawd_post_page_roles'] : array();
55
+ $roles = $this->get_current_user_role();
56
+ if((isset($gawd_settings['gawd_tracking_enable']) && $gawd_settings['gawd_tracking_enable'] == 'on') && (isset($gawd_settings['post_page_chart']) && $gawd_settings['post_page_chart'] != '') && (in_array($roles, $gawd_post_page_roles) || current_user_can('manage_options'))){
57
+ add_filter('manage_posts_columns', array($this, 'gawd_add_columns'));
58
+ // Populate custom column in Posts List
59
+ add_action('manage_posts_custom_column', array($this, 'gawd_add_icons'), 10, 2);
60
+ // Add custom column in Pages List
61
+ add_filter('manage_pages_columns', array($this, 'gawd_add_columns'));
62
+ // Populate custom column in Pages List
63
+ add_action('manage_pages_custom_column', array($this, 'gawd_add_icons'), 10, 2);
64
+ add_action('add_meta_boxes', array($this, 'gawd_add_custom_box'));
65
+ add_action('admin_bar_menu', array($this, 'report_adminbar'), 999);
66
+ }
67
+
68
+
69
+ $this->update_credentials();
70
+ $credentials = get_option('gawd_credentials');
71
+
72
+
73
+ if (is_array($credentials)) {
74
+ $this->set_project_client_id($credentials['project_id']);
75
+ $this->set_project_client_secret($credentials['project_secret']);
76
+ } else {
77
+ //send error
78
+ return;
79
+ }
80
+
81
+ }
82
+
83
+ function get_current_user_role() {
84
+ global $wp_roles;
85
+ $current_user = wp_get_current_user();
86
+ $roles = $current_user->roles;
87
+ $role = array_shift($roles);
88
+ return $role;
89
+ }
90
+
91
+ function report_adminbar($wp_admin_bar) {
92
+ /* @formatter:off */
93
+ $gawd_settings = get_option('gawd_settings');
94
+ $gawd_frontend_roles = isset($gawd_settings['gawd_frontend_roles']) ? $gawd_settings['gawd_frontend_roles'] : array();
95
+ $roles = $this->get_current_user_role();
96
+ if (((in_array($roles, $gawd_frontend_roles) || current_user_can('manage_options')) && !is_admin()) && $gawd_settings['post_page_chart'] != '') {
97
+ $id = get_the_ID();
98
+ $uri_parts = explode('/', get_permalink($id), 4);
99
+ if ($uri_parts[0] != '') {
100
+ if (isset($uri_parts[3])) {
101
+ $uri = '/' . $uri_parts[3];
102
+ }
103
+ $uri = explode('/', $uri);
104
+ end($uri);
105
+ $key = key($uri);
106
+ $uri = '/' . $uri[$key - 1];
107
+ $filter = rawurlencode(rawurldecode($uri));
108
+
109
+ $args = array('id' => 'gawd',
110
+ 'title' => '<span data-url="' . $filter . '" class="ab-icon"></span><span class="">' . __("Analytics WD", 'gawd') . '</span>',
111
+ 'href' => '#1',
112
+ );
113
+ /* @formatter:on */
114
+ $wp_admin_bar->add_node($args);
115
+ }
116
+ }
117
+ }
118
+
119
+ public function update_credentials() {
120
+ //check_admin_referer('gawd_save_form', 'gawd_save_form_fild');
121
+ if ($_POST) {
122
+ $gawd_own_project = isset($_POST['gawd_own_project']) ? $_POST['gawd_own_project'] : '';
123
+ $gawd_own_client_id = isset($_POST['gawd_own_client_id']) ? $_POST['gawd_own_client_id'] : '';
124
+ $gawd_own_client_secret = isset($_POST['gawd_own_client_secret']) ? $_POST['gawd_own_client_secret'] : '';
125
+ $gawd_credentials['project_id'] = $gawd_own_client_id;
126
+ $gawd_credentials['project_secret'] = $gawd_own_client_secret;
127
+ if ($gawd_own_project && $gawd_own_client_id != '' && $gawd_own_client_secret != '') {
128
+ update_option('gawd_credentials', $gawd_credentials);
129
+ delete_option('gawd_user_data');
130
+ add_option('gawd_own_project' , 1);
131
+ }
132
+ }
133
+ }
134
+
135
+ public function set_project_client_id($id) {
136
+ $this->project_client_id = $id;
137
+ }
138
+
139
+ public function get_project_client_id() {
140
+ return $this->project_client_id;
141
+ }
142
+
143
+ public function set_project_client_secret($secret) {
144
+ $this->project_client_secret = $secret;
145
+ }
146
+
147
+ public function get_project_client_secret() {
148
+ return $this->project_client_secret;
149
+ }
150
+
151
+ function gawd_check_id() {
152
+ global $gawd_user_data;
153
+ $current_user = get_current_screen();
154
+
155
+ if (strpos($current_user->base, 'gawd')) {
156
+ $gawd_user_data = get_option('gawd_user_data');
157
+ if (!isset($gawd_user_data['refresh_token']) || ($gawd_user_data['refresh_token'] == '')) {
158
+ if (strpos($current_user->base, 'gawd_settings') === false && strpos($current_user->base, 'gawd_uninstall') === false) {
159
+ wp_redirect(admin_url() . 'admin.php?page=gawd_settings');
160
+ }
161
+ }
162
+ }
163
+ }
164
+
165
+ function gawd_add_custom_box() {
166
+ $screens = array('post', 'page');
167
+ foreach ($screens as $screen)
168
+ add_meta_box('gawd_page_post_meta', 'Sessions in month', array($this, 'gawd_add_custom_box_callback'), $screen, 'normal');
169
+ }
170
+
171
+ function gawd_add_custom_box_callback() {
172
+ require_once( 'admin/post_page_view.php' );
173
+ }
174
+
175
+ public function gawd_add_icons($column, $id) {
176
+ if ($column != 'gawd_stats') {
177
+ return;
178
+ }
179
+ $uri_parts = explode('/', get_permalink($id), 4);
180
+ if (isset($uri_parts[3])) {
181
+ $uri = '/' . $uri_parts[3];
182
+ }
183
+ $uri = explode('/', $uri);
184
+ end($uri);
185
+ $key = key($uri);
186
+ $uri = '/' . $uri[$key - 1];
187
+ $filter = rawurlencode(rawurldecode($uri));
188
+ echo '<a id="gawd-' . $id . '" class="gawd_page_post_stats" title="' . get_the_title($id) . '" href="#' . $filter . '"><img src="' . GAWD_URL . '/assets/back_logo.png"</a>';
189
+ }
190
+
191
+ public function gawd_add_columns($columns) {
192
+ return array_merge($columns, array('gawd_stats' => __('Analytics WD', 'gawd')));
193
+ }
194
+
195
+ public static function gawd_roles($access_level, $tracking = false) {
196
+ if (is_user_logged_in() && isset($access_level)) {
197
+ $current_user = wp_get_current_user();
198
+ $roles = (array) $current_user->roles;
199
+ if (( current_user_can('manage_options') ) && !$tracking) {
200
+ return true;
201
+ }
202
+ if (count(array_intersect($roles, $access_level)) > 0) {
203
+ return true;
204
+ } else {
205
+ return false;
206
+ }
207
+ }
208
+ return false;
209
+ }
210
+
211
+ public function gawd_tracking_code() {
212
+ $gawd_user_data = get_option('gawd_user_data');
213
+ if (isset($gawd_user_data['default_webPropertyId']) && ($gawd_user_data['default_webPropertyId'])) {
214
+ global $gawd_client;
215
+ $gawd_client = GAWD_google_client::get_instance();
216
+ require_once(GAWD_DIR . '/admin/tracking.php');
217
+ }
218
+ }
219
+
220
+ public function create_pdf_file($ajax=true,$data = null,$dimension = null, $start_date = null, $end_date = null,$metric_compare_recc = null, $metric_recc = null) {
221
+ $first_data = isset($_REQUEST["first_data"]) ? sanitize_text_field($_REQUEST["first_data"]) : '';
222
+ $_data_compare = isset($_REQUEST["_data_compare"]) ? ($_REQUEST["_data_compare"]) : '';
223
+ if($ajax == true){
224
+ $export_type = isset($_REQUEST["export_type"]) ? sanitize_text_field($_REQUEST["export_type"]) : '';
225
+ if ($export_type != 'pdf') {
226
+ return;
227
+ }
228
+
229
+ $report_type = isset($_REQUEST["report_type"]) ? sanitize_text_field($_REQUEST["report_type"]) : '';
230
+
231
+
232
+ if ($report_type !== 'alert') {
233
+ return;
234
+ }
235
+
236
+ }
237
+
238
+ include_once GAWD_DIR . '/include/gawd_pdf_file.php';
239
+ $file = new GAWD_PDF_FILE();
240
+
241
+ /*
242
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
243
+ $this->gawd_google_client = GAWD_google_client::get_instance();
244
+ */
245
+ $file->get_request_data($this,$ajax,$data,$dimension, $start_date, $end_date,$metric_compare_recc, $metric_recc );
246
+
247
+ $file->sort_data();
248
+ if($first_data != ''){
249
+ $file->create_file('pages');
250
+ }
251
+ elseif(($_data_compare) != ''){
252
+ $file->create_file('compare');
253
+ }
254
+ else{
255
+ $file->create_file(true);
256
+ }
257
+ if($ajax == true){
258
+ die();
259
+ }
260
+ else{
261
+ return $file->file_dir;
262
+ }
263
+ }
264
+ public function create_csv_file($ajax=true,$data = null,$dimension = null, $start_date = null, $end_date = null, $metric_compare_recc = null, $metric_recc = null){
265
+ if($ajax == true){
266
+ $export_type = isset($_REQUEST["export_type"]) ? sanitize_text_field($_REQUEST["export_type"]) : '';
267
+ if ($export_type != 'csv') {
268
+ return;
269
+ }
270
+ $report_type = isset($_REQUEST["report_type"]) ? sanitize_text_field($_REQUEST["report_type"]) : '';
271
+ if ($report_type !== 'alert') {
272
+ return;
273
+ }
274
+ }
275
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
276
+ $this->gawd_google_client = GAWD_google_client::get_instance();
277
+
278
+ $first_data = isset($_REQUEST["first_data"]) ? sanitize_text_field($_REQUEST["first_data"]) : '';
279
+
280
+
281
+
282
+ include_once GAWD_DIR . '/include/gawd_csv_file.php';
283
+
284
+ $file = new GAWD_CSV_FILE();
285
+ $file->get_request_data($this,$ajax,$data,$dimension, $start_date, $end_date,$metric_compare_recc, $metric_recc );
286
+
287
+ $file->sort_data();
288
+
289
+ //$file->get_request_data($this);
290
+
291
+ $file->sort_data();
292
+ if($first_data != ''){
293
+ $file->create_file(false);
294
+ }
295
+ else{
296
+ $file->create_file();
297
+ }
298
+ if($ajax == true){
299
+ die();
300
+ }
301
+ else{
302
+ return $file->file_dir;
303
+ }
304
+ }
305
+
306
+ public static function get_domain($domain) {
307
+ $root = explode('/', $domain);
308
+ $ret_domain = str_ireplace('www', '', isset($root[2]) ? $root[2] : $domain );
309
+ return $ret_domain;
310
+ }
311
+
312
+ public static function error_message($type,$message){
313
+ echo '<div style="width:99%"><div class="' . $type . '"><p><strong>' . $message . '</strong></p></div></div>';
314
+ }
315
+ public function gawd_export() {
316
+ if (!isset($_REQUEST['action']) || (isset($_REQUEST['action']) && $_REQUEST['action'] !== 'gawd_export')) {
317
+ return;
318
+ }
319
+
320
+ $export_type = isset($_REQUEST["export_type"]) ? sanitize_text_field($_REQUEST["export_type"]) : '';
321
+ if ($export_type != 'pdf' && $export_type != 'csv') {
322
+ return;
323
+ }
324
+
325
+ $report_type = isset($_REQUEST["report_type"]) ? sanitize_text_field($_REQUEST["report_type"]) : '';
326
+
327
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
328
+ $this->gawd_google_client = GAWD_google_client::get_instance();
329
+
330
+ if ($export_type == 'pdf') {
331
+ include_once GAWD_DIR . '/include/gawd_pdf_file.php';
332
+ $file = new GAWD_PDF_FILE();
333
+ } else {
334
+ include_once GAWD_DIR . '/include/gawd_csv_file.php';
335
+ $file = new GAWD_CSV_FILE();
336
+ }
337
+
338
+ if ($report_type == 'alert') {
339
+ if ($export_type == 'pdf') {
340
+ $file->export_file();
341
+ } else {
342
+ $file->export_file();
343
+ }
344
+ }
345
+
346
+ else {
347
+ $metric = isset($_REQUEST["gawd_metric"]) ? sanitize_text_field($_REQUEST["gawd_metric"]) : '';
348
+ $_data_compare = isset($_REQUEST["_data_compare"]) ? ($_REQUEST["_data_compare"]) : '';
349
+ $first_data = isset($_REQUEST["first_data"]) ? ($_REQUEST["first_data"]) : '';
350
+ $view_id = isset($_REQUEST["view_id"]) ? sanitize_text_field($_REQUEST["view_id"]) : '';
351
+ $metric_compare = isset($_REQUEST["gawd_metric_compare"]) ? sanitize_text_field($_REQUEST["gawd_metric_compare"]) : '';
352
+ $dimension = isset($_REQUEST["gawd_dimension"]) ? sanitize_text_field($_REQUEST["gawd_dimension"]) : '';
353
+ $tab_name = isset($_REQUEST["tab_name"]) ? sanitize_text_field($_REQUEST["tab_name"]) : '';
354
+ $img = isset($_REQUEST["img"]) ? sanitize_text_field($_REQUEST["img"]) : '';
355
+ $gawd_email_subject = isset($_REQUEST["gawd_email_subject"]) ? sanitize_text_field($_REQUEST["gawd_email_subject"]) : '';
356
+ $gawd_email_body = isset($_REQUEST["gawd_email_body"]) && $_REQUEST["gawd_email_body"] != '' ? sanitize_text_field($_REQUEST["gawd_email_body"]) : ' ';
357
+ $email_from = isset($_REQUEST["gawd_email_from"]) ? sanitize_email($_REQUEST["gawd_email_from"]) : '';
358
+ $email_to = isset($_REQUEST["gawd_email_to"]) ? sanitize_email($_REQUEST["gawd_email_to"]) : '';
359
+ $email_period = isset($_REQUEST["gawd_email_period"]) ? sanitize_text_field($_REQUEST["gawd_email_period"]) : '';
360
+ $week_day = isset($_REQUEST["gawd_email_week_day"]) ? sanitize_text_field($_REQUEST["gawd_email_week_day"]) : '';
361
+ $month_day = isset($_REQUEST["gawd_email_month_day"]) ? sanitize_text_field($_REQUEST["gawd_email_month_day"]) : '';
362
+ $emails = array();
363
+ $invalid_email = false;
364
+ $email_to = explode(',', $email_to);
365
+ foreach ($email_to as $email) {
366
+ if (is_email($email) == false) {
367
+ $emails = $email;
368
+ }
369
+ }
370
+ if (count($emails) > 0) {
371
+ $invalid_email = true;
372
+ }
373
+ if (($invalid_email != true) && is_email($email_from) && $gawd_email_subject != '') {
374
+ if ($email_period == "once") {
375
+ $file->get_request_data($this);
376
+ $file->sort_data();
377
+ if($export_type == 'csv'){
378
+ if($first_data != ''){
379
+ $file->create_file(false);
380
+ }
381
+ else{
382
+ $file->create_file();
383
+ }
384
+ }
385
+ else{
386
+ if($first_data != ''){
387
+ $file->create_file('pages');
388
+ }
389
+ elseif(($_data_compare) != ''){
390
+ $file->create_file('compare');
391
+ }
392
+ else{
393
+ $file->create_file(false);
394
+ }
395
+ }
396
+ $attachment = $file->file_dir;
397
+
398
+ if ($report_type == 'email') {
399
+ $headers = 'From: <' . $email_from . '>';
400
+ wp_mail($email_to, $gawd_email_subject, $gawd_email_body, $headers, $attachment);
401
+ }
402
+ echo json_encode( array('status'=>'success','msg'=>'Email successfuly sent'));
403
+ }
404
+ else {
405
+ if ($email_period == 'gawd_weekly') {
406
+ $period_day = $week_day;
407
+ $timestamp = strtotime('this ' . $period_day);
408
+ }
409
+ elseif ($email_period == 'gawd_monthly') {
410
+ $period_day = $month_day;
411
+ $timestamp = strtotime(date('Y-m-' . $period_day));
412
+ }
413
+ else {
414
+ $period_day = '';
415
+ $timestamp = time();
416
+ }
417
+ $saved_email = get_option('gawd_email');
418
+ if ($saved_email) {
419
+ $gawd_email_options = array('name' => $gawd_email_subject, 'period' => $email_period, 'metric' => $metric, 'metric_compare' => $metric_compare, 'dimension' => $dimension, 'creation_date' => date('Y-m-d'), 'emails' => $email_to, 'email_from' => $email_from, 'email_subject' => $gawd_email_subject, 'email_body' => $gawd_email_body, 'period_day' => $period_day, 'img' => $img, 'tab_name' => $tab_name, 'view_id' => $view_id, 'export_type' => $export_type);
420
+ $saved_email[] = $gawd_email_options;
421
+ update_option('gawd_email', $saved_email);
422
+ }
423
+ else {
424
+ $gawd_email_options = array(0 => array('name' => $gawd_email_subject, 'period' => $email_period, 'metric' => $metric, 'metric_compare' => $metric_compare, 'dimension' => $dimension, 'creation_date' => date('Y-m-d'), 'emails' => $email_to, 'email_from' => $email_from, 'email_subject' => $gawd_email_subject, 'email_body' => $gawd_email_body, 'period_day' => $period_day, 'img' => $img, 'tab_name' => $tab_name, 'view_id' => $view_id, 'export_type' => $export_type));
425
+ update_option('gawd_email', $gawd_email_options);
426
+ }
427
+ $saved_email = get_option('gawd_email');
428
+ if ($saved_email) {
429
+ foreach ($saved_email as $email) {
430
+ if (!wp_next_scheduled('gawd_email_' . $email['period'])) {
431
+ wp_schedule_event($timestamp, $email['period'], 'gawd_email_' . $email['period']);
432
+ }
433
+ }
434
+ }
435
+ $success_message = 'Email successfuly Scheduled </br> Go to <a href="'.admin_url() . 'admin.php?page=gawd_settings#gawd_emails_tab">Settings page</a> to delete scheduled e-mails.';
436
+ echo json_encode( array('status'=>'success','msg'=>$success_message));
437
+ }
438
+
439
+ die;
440
+ }
441
+ else {
442
+ if ($invalid_email == true) {
443
+ echo json_encode('Invalid email');
444
+ die;
445
+ }
446
+ else if ($gawd_email_subject == '') {
447
+ echo json_encode("Can't send email with empty subject");
448
+ die;
449
+ }
450
+ }
451
+ }
452
+ }
453
+
454
+ public function overview_date_meta($screen = null, $context = 'advanced') {
455
+ //righ side wide meta..
456
+ $orintation = wp_is_mobile() ? 'side' : 'normal';
457
+ add_meta_box('gawd-real-time', __('Real Time', 'gawd'), array($this, 'gawd_real_time'), 'gawd_analytics', 'side', 'high');
458
+ add_meta_box('gawd-date-meta', __('Audience', 'gawd'), array($this, 'gawd_date_box'), 'gawd_analytics', $orintation, null);
459
+ add_meta_box('gawd-country-box', __('Location', 'gawd'), array($this, 'gawd_country_box'), 'gawd_analytics', $orintation, null);
460
+ //left side thin meta.
461
+ add_meta_box('gawd-visitors-meta', __('Visitors', 'gawd'), array($this, 'gawd_visitors'), 'gawd_analytics', 'side', null);
462
+ add_meta_box('gawd-browser-meta', __('Browsers', 'gawd'), array($this, 'gawd_browser'), 'gawd_analytics', 'side', null);
463
+ }
464
+
465
+ public function gawd_date_box() {
466
+ require_once( 'admin/pages/date.php' );
467
+ }
468
+
469
+ public function gawd_country_box() {
470
+ require_once( 'admin/pages/location.php' );
471
+ }
472
+
473
+ public function gawd_real_time() {
474
+ require_once( 'admin/pages/real_time.php' );
475
+ }
476
+
477
+ public function gawd_visitors() {
478
+ require_once( 'admin/pages/visitors.php' );
479
+ }
480
+
481
+ public function gawd_browser() {
482
+ require_once( 'admin/pages/browser.php' );
483
+ }
484
+
485
+ /**
486
+ * Activation function needed for the activation hook.
487
+ */
488
+ public static function activate() {
489
+ $credentials['project_id'] = '115052745574-5vbr7tci4hjkr9clkflmnpto5jisgstg.apps.googleusercontent.com';
490
+ $credentials['project_secret'] = 'wtNiu3c_bA_g7res6chV0Trt';
491
+ if (!get_option('gawd_credentials')) {
492
+ update_option('gawd_credentials', $credentials);
493
+ }
494
+ self::gawd_settings_defaults();
495
+ self::add_dashboard_menu();
496
+ }
497
+
498
+ /**
499
+ * Deactivation function needed for the deactivation hook.
500
+ */
501
+ public static function deactivate() {
502
+
503
+ }
504
+
505
+ /**
506
+ * Enqueues the required styles and scripts, localizes some js variables.
507
+ */
508
+ public function gawd_front_scripts() {
509
+ wp_enqueue_style('admin_css', GAWD_URL . '/inc/css/gawd_admin.css', false, GAWD_VERSION);
510
+ wp_enqueue_script('gawd_amcharts', GAWD_URL . '/inc/js/amcharts.js', false, GAWD_VERSION);
511
+ wp_enqueue_script('gawd_pie', GAWD_URL . '/inc/js/pie.js', false, GAWD_VERSION);
512
+ wp_enqueue_script('gawd_serial', GAWD_URL . '/inc/js/serial.js', false, GAWD_VERSION);
513
+ wp_enqueue_script('gawd_light_theme', GAWD_URL . '/inc/js/light.js', array('jquery'), GAWD_VERSION);
514
+ wp_enqueue_script('gawd_dataloader', GAWD_URL . '/inc/js/dataloader.min.js', array('jquery'), GAWD_VERSION);
515
+ wp_enqueue_script('date-js', GAWD_URL . '/inc/js/date.js', array('jquery'), GAWD_VERSION);
516
+ wp_enqueue_script('gawd_front_js', GAWD_URL . '/inc/js/gawd_front.js', array('jquery'), GAWD_VERSION);
517
+ wp_localize_script('gawd_front_js', 'gawd_front', array(
518
+ 'ajaxurl' => admin_url('admin-ajax.php'),
519
+ 'ajaxnonce' => wp_create_nonce('gawd_admin_page_nonce'),
520
+ 'gawd_plugin_url' => GAWD_URL,
521
+ 'date_30' => date('Y-m-d',strtotime('-31 day')).'/-/'.date('Y-m-d',strtotime('-1 day')),
522
+ 'date_7' => date('Y-m-d',strtotime('-8 day')).'/-/'.date('Y-m-d',strtotime('-1 day')),
523
+ 'date_last_week' => date('Y-m-d',strtotime('last week -1day')).'/-/'.date('Y-m-d',strtotime('last week +5day')),
524
+ 'date_last_month' => date('Y-m-01',strtotime('last month')).'/-/'.date('Y-m-t',strtotime('last month')),
525
+ 'date_this_month' =>date('Y-m-01').'/-/'.date('Y-m-d'),
526
+ 'date_today' => date('Y-m-d').'/-/'.date('Y-m-d'),
527
+ 'date_yesterday' => date('Y-m-d',strtotime('-1 day')).'/-/'.date('Y-m-d',strtotime('-1 day')),
528
+ 'wp_admin_url' => admin_url(),
529
+ 'exportUrl' => add_query_arg(array('action' => 'gawd_export'), admin_url('admin-ajax.php'))
530
+ ));
531
+ }
532
+
533
+ public function gawd_enqueue_scripts() {
534
+ $options = get_option('gawd_settings');
535
+ $default_date = (isset($options['default_date']) && $options['default_date'] != '') ? $options['default_date'] : 'last_30days';
536
+ $default_date_format = (isset($options['default_date_format']) && $options['default_date_format'] != '') ? $options['default_date_format'] : 'ymd_with_week';
537
+ $enable_hover_tooltip = (isset($options['enable_hover_tooltip']) && $options['enable_hover_tooltip'] != '') ? $options['enable_hover_tooltip'] : '';
538
+ $screen = get_current_screen();
539
+ if (strpos($screen->base, 'gawd') !== false || strpos($screen->post_type, 'page') !== false || strpos($screen->post_type, 'post') !== false || strpos($screen->base, 'dashboard') !== false) {
540
+ wp_enqueue_script('common');
541
+ wp_enqueue_script('wp-lists');
542
+ wp_enqueue_script('postbox');
543
+ wp_enqueue_script('jquery-ui-tooltip');
544
+ wp_enqueue_script('gawd_paging', GAWD_URL . '/inc/js/paging.js',false,GAWD_VERSION);
545
+ wp_enqueue_script('jquery.cookie', GAWD_URL . '/inc/js/jquery.cookie.js',false,GAWD_VERSION);
546
+ wp_enqueue_style('admin_css', GAWD_URL . '/inc/css/gawd_admin.css', false, GAWD_VERSION);
547
+ wp_enqueue_style('gawd_licensing', GAWD_URL . '/inc/css/gawd_licensing.css', false, GAWD_VERSION);
548
+ wp_enqueue_style('gawd_featured', GAWD_URL . '/featured/style.css', array(), GAWD_VERSION);
549
+ wp_enqueue_style('font_awesome', GAWD_URL . '/inc/css/font_awesome.css', false, GAWD_VERSION);
550
+ wp_enqueue_style('jquery-ui.css', GAWD_URL . '/inc/css/jquery-ui.css', false, GAWD_VERSION);
551
+ wp_enqueue_style('gawd_bootstrap', GAWD_URL . '/inc/css/bootstrap.css', false, GAWD_VERSION);
552
+ wp_enqueue_style('gawd_bootstrap-chosen', GAWD_URL . '/inc/css/bootstrap-chosen.css', false, GAWD_VERSION);
553
+ wp_enqueue_style('gawd_bootstrap-select', GAWD_URL . '/inc/css/bootstrap-select.css', false, GAWD_VERSION);
554
+ wp_enqueue_style('gawd_datepicker', GAWD_URL . '/inc/css/daterangepicker.css', false, GAWD_VERSION);
555
+ wp_enqueue_style('ui.jqgrid.css', GAWD_URL . '/inc/css/ui.jqgrid.css', false, GAWD_VERSION);
556
+ wp_enqueue_script('gawd_moment', GAWD_URL . '/inc/js/moment.min.js', false, GAWD_VERSION);
557
+ wp_enqueue_script('gawd_daterangepicker', GAWD_URL . '/inc/js/daterangepicker.js', false, GAWD_VERSION);
558
+ wp_enqueue_script('gawd_amcharts', GAWD_URL . '/inc/js/amcharts.js', false, GAWD_VERSION);
559
+ wp_enqueue_script('ddd', 'http://www.amcharts.com/lib/3/plugins/responsive/responsive.min.js?0.9.1a', false, GAWD_VERSION);
560
+ wp_enqueue_script('gawd_pie', GAWD_URL . '/inc/js/pie.js', false, GAWD_VERSION);
561
+ wp_enqueue_script('gawd_serial', GAWD_URL . '/inc/js/serial.js', false, GAWD_VERSION);
562
+ /*Map*/
563
+ wp_enqueue_script('gawd_ammap', GAWD_URL . '/inc/js/ammap.js', false, GAWD_VERSION);
564
+ wp_enqueue_script('gawd_worldLow', GAWD_URL . '/inc/js/worldLow.js', false, GAWD_VERSION);
565
+ wp_enqueue_script('gawd_map_chart', GAWD_URL . '/inc/js/gawd_map_chart.js', false, GAWD_VERSION);
566
+ /*End Map*/
567
+ wp_enqueue_script('gawd_light_theme', GAWD_URL . '/inc/js/light.js', array('jquery'), GAWD_VERSION);
568
+ wp_enqueue_script('gawd_dataloader', GAWD_URL . '/inc/js/dataloader.min.js', array('jquery'), GAWD_VERSION);
569
+ wp_enqueue_script('rgbcolor.js', GAWD_URL . '/inc/js/rgbcolor.js', array('jquery'), GAWD_VERSION);
570
+ wp_enqueue_script('StackBlur.js', GAWD_URL . '/inc/js/StackBlur.js', array('jquery'), GAWD_VERSION);
571
+ wp_enqueue_script('canvg.js', GAWD_URL . '/inc/js/canvg.js', array('jquery'), GAWD_VERSION);
572
+ wp_enqueue_script('gawd_tables', GAWD_URL . '/inc/js/loader.js', array('jquery'), GAWD_VERSION);
573
+ wp_enqueue_script('gawd_grid', GAWD_URL . '/inc/js/jquery.jqGrid.min.js', array('jquery'), GAWD_VERSION);
574
+ wp_enqueue_script('gawd_grid_locale', GAWD_URL . '/inc/js/grid.locale-en.js', array('jquery'), GAWD_VERSION);
575
+ wp_enqueue_script('date-js', GAWD_URL . '/inc/js/date.js', array('jquery'), GAWD_VERSION);
576
+ wp_enqueue_script('admin_js', GAWD_URL . '/inc/js/gawd_admin.js', array('jquery'), GAWD_VERSION);
577
+ wp_enqueue_script('chosen.jquery.js', GAWD_URL . '/inc/js/chosen.jquery.js', array('jquery'), GAWD_VERSION);
578
+ wp_enqueue_script('bootstrap_js', GAWD_URL . '/inc/js/bootstrap_js.js', array('jquery'), GAWD_VERSION);
579
+ wp_enqueue_script('bootstrap-select', GAWD_URL . '/inc/js/bootstrap-select.js', array('jquery'), GAWD_VERSION);
580
+ wp_enqueue_script('highlight_js', GAWD_URL . '/inc/js/js_highlight.js', array('jquery'), GAWD_VERSION);
581
+ wp_enqueue_script('settings_js', GAWD_URL . '/inc/js/gawd_settings.js', array('jquery'), GAWD_VERSION);
582
+ wp_enqueue_script('overview', GAWD_URL . '/inc/js/gawd_overview.js', array('jquery'), GAWD_VERSION);
583
+ wp_localize_script('overview', 'gawd_overview', array(
584
+ 'ajaxurl' => admin_url('admin-ajax.php'),
585
+ 'ajaxnonce' => wp_create_nonce('gawd_admin_page_nonce'),
586
+ 'gawd_plugin_url' => GAWD_URL,
587
+ 'default_date' => $default_date,
588
+ 'enableHoverTooltip' => $enable_hover_tooltip,
589
+ 'wp_admin_url' => admin_url()
590
+ ));
591
+ wp_localize_script('admin_js', 'gawd_admin', array(
592
+ 'ajaxurl' => admin_url('admin-ajax.php'),
593
+ 'ajaxnonce' => wp_create_nonce('gawd_admin_page_nonce'),
594
+ 'gawd_plugin_url' => GAWD_URL,
595
+ 'wp_admin_url' => admin_url(),
596
+ 'enableHoverTooltip' => $enable_hover_tooltip,
597
+ 'default_date' => $default_date,
598
+ 'default_date_format' => $default_date_format,
599
+ 'date_30' => date('Y-m-d',strtotime('-31 day')).'/-/'.date('Y-m-d',strtotime('-1 day')),
600
+ 'date_7' => date('Y-m-d',strtotime('-8 day')).'/-/'.date('Y-m-d',strtotime('-1 day')),
601
+ 'date_last_week' => date('Y-m-d',strtotime('last week -1day')).'/-/'.date('Y-m-d',strtotime('last week +5day')),
602
+ 'date_last_month' => date('Y-m-01',strtotime('last month')).'/-/'.date('Y-m-t',strtotime('last month')),
603
+ 'date_this_month' =>date('Y-m-01').'/-/'.date('Y-m-d'),
604
+ 'date_today' => date('Y-m-d').'/-/'.date('Y-m-d'),
605
+ 'date_yesterday' => date('Y-m-d',strtotime('-1 day')).'/-/'.date('Y-m-d',strtotime('-1 day')),
606
+ 'exportUrl' => add_query_arg(array('action' => 'gawd_export'), admin_url('admin-ajax.php'))
607
+ ));
608
+ }
609
+ }
610
+
611
+ /**
612
+ * Adds the menu page with its submenus.
613
+ */
614
+ public function gawd_add_menu() {
615
+ $gawd_settings = get_option('gawd_settings');
616
+ $gawd_permissions = isset($gawd_settings['gawd_permissions']) ? $gawd_settings['gawd_permissions'] : array();
617
+ if (empty($gawd_permissions)) {
618
+ $permission = 'manage_options';
619
+ } else {
620
+ if (in_array('manage_options', $gawd_permissions)) {
621
+ $permission = 'manage_options';
622
+ }
623
+ if (in_array('moderate_comments', $gawd_permissions)) {
624
+ $permission = 'moderate_comments';
625
+ }
626
+ if (in_array('publish_posts', $gawd_permissions)) {
627
+ $permission = 'publish_posts';
628
+ }
629
+ if (in_array('edit_posts', $gawd_permissions)) {
630
+ $permission = 'edit_posts';
631
+ }
632
+ }
633
+ add_menu_page(
634
+ __('Analytics', 'gawd'), //$page_title
635
+ __('Analytics', 'gawd'), //$menu_title
636
+ $permission, //$capability
637
+ 'gawd_analytics', //$menu_slug
638
+ array($this, 'gawd_display_overview_page'), //$function = '',
639
+ GAWD_URL . '/assets/main_icon.png'
640
+ //$position = null
641
+ );
642
+
643
+ add_submenu_page(
644
+ 'gawd_analytics', //$parent_slug
645
+ __('Overview', 'gawd'), //$page_title
646
+ __('Overview', 'gawd'), //$menu_title
647
+ $permission, //$capability
648
+ 'gawd_analytics', //$menu_slug
649
+ array($this, 'gawd_display_overview_page') //$function = '',
650
+ );
651
+ add_submenu_page(
652
+ 'gawd_analytics', //$parent_slug
653
+ __('Reports', 'gawd'), //$page_title
654
+ __('Reports', 'gawd'), //$menu_title
655
+ $permission, //$capability
656
+ 'gawd_reports', //$menu_slug
657
+ array($this, 'gawd_display_reports_page') //$function = '',
658
+ );
659
+
660
+ add_submenu_page(
661
+ 'gawd_analytics', //$parent_slug
662
+ __('Settings', 'gawd'), //$page_title
663
+ __('Settings', 'gawd'), //$menu_title
664
+ $permission, //$capability
665
+ 'gawd_settings', //$menu_slug
666
+ array($this, 'gawd_display_settings_page') //$function = '',
667
+ );
668
+ add_submenu_page(
669
+ 'gawd_analytics', //$parent_slug
670
+ __('Tracking', 'gawd'), //$page_title
671
+ __('Tracking', 'gawd'), //$menu_title
672
+ $permission, //$capability
673
+ 'gawd_tracking', //$menu_slug
674
+ array($this, 'gawd_display_tracking_page') //$function = '',
675
+ );
676
+ add_submenu_page(
677
+ 'gawd_analytics', //$parent_slug
678
+ __('Goal Management', 'gawd'), //$page_title
679
+ __('Goal Management', 'gawd'), //$menu_title
680
+ $permission, //$capability
681
+ 'gawd_goals', //$menu_slug
682
+ array($this, 'gawd_display_goals_page') //$function = '',
683
+ );
684
+
685
+ add_submenu_page(
686
+ 'gawd_analytics', //$parent_slug
687
+ __('Custom Reports', 'gawd'), //$page_title
688
+ __('Custom Reports', 'gawd'), //$menu_title
689
+ $permission, //$capability
690
+ 'gawd_custom_reports', //$menu_slug
691
+ array($this, 'gawd_display_custom_reports_page') //$function = '',
692
+ );
693
+ add_submenu_page(
694
+ 'gawd_analytics', //$parent_slug
695
+ __('Featured plugins', 'gawd'), //$page_title
696
+ __('Featured plugins', 'gawd'), //$menu_title
697
+ $permission, //$capability
698
+ 'gawd_featured_plugins', //$menu_slug
699
+ array($this, 'gawd_display_featured_plugins_page') //$function = '',
700
+ );
701
+ add_submenu_page(
702
+ 'gawd_analytics', //$parent_slug
703
+ __('Get Pro', 'gawd'), //$page_title
704
+ __('Get Pro', 'gawd'), //$menu_title
705
+ $permission, //$capability
706
+ 'gawd_licensing', //$menu_slug
707
+ array($this, 'gawd_display_licensing_page') //$function = '',
708
+ );
709
+ add_submenu_page(
710
+ 'gawd_analytics', //$parent_slug
711
+ __('Featured themes', 'gawd'), //$page_title
712
+ __('Featured themes', 'gawd'), //$menu_title
713
+ $permission, //$capability
714
+ 'gawd_featured_themes', //$menu_slug
715
+ array($this, 'gawd_display_featured_themes_page') //$function = '',
716
+ );
717
+ add_submenu_page(
718
+ 'gawd_analytics', //$parent_slug
719
+ __('Uninstall', 'gawd'), //$page_title
720
+ __('Uninstall', 'gawd'), //$menu_title
721
+ $permission, //$capability
722
+ 'gawd_uninstall', //$menu_slug
723
+ array($this, 'gawd_display_uninstall_page') //$function = '',
724
+ );
725
+
726
+ }
727
+ public function gawd_display_licensing_page() {
728
+ require_once(GAWD_DIR . '/admin/licensing.php');
729
+ }
730
+ function upgrade_pro(){
731
+ $screen = get_current_screen();
732
+ if (strpos($screen->base, 'gawd') !== false && strpos($screen->base, 'gawd_featured') === false) {
733
+ ?>
734
+ <div class="gawd_upgrade wd-clear" >
735
+ <div class="wd-right">
736
+ <a href="https://web-dorado.com/products/wordpress-google-analytics-plugin.html" target="_blank">
737
+ <div class="wd-table">
738
+ <div class="wd-cell wd-cell-valign-middle">
739
+ <?php _e("Upgrade to paid version", "gawd"); ?>
740
+ </div>
741
+
742
+ <div class="wd-cell wd-cell-valign-middle">
743
+ <img src="<?php echo GAWD_URL; ?>/assets/web-dorado.png" >
744
+ </div>
745
+ </div>
746
+ </a>
747
+ </div>
748
+ </div>
749
+ <?php
750
+ }
751
+ }
752
+
753
+ public function gawd_display_featured_plugins_page() {
754
+ require_once(GAWD_DIR . '/featured/featured.php');
755
+ gawd_featured_plugins('wd-google-analytics');
756
+
757
+ }
758
+ public function gawd_display_featured_themes_page() {
759
+ require_once(GAWD_DIR . '/featured/featured_themes.php');
760
+ $controller = new gawd_featured_themes();
761
+ $controller->display();
762
+ }
763
+
764
+ public function gawd_auth() {
765
+ check_ajax_referer('gawd_admin_page_nonce', 'security');
766
+ $code = $_POST['token'];
767
+ $status = GAWD_google_client::authenticate($code);
768
+ if ($status === true) {
769
+ $res = array(
770
+ 'message' => 'successfully saved',
771
+ 'status' => $status,
772
+ );
773
+ } else {
774
+ $res = array(
775
+ 'message' => 'there is an error',
776
+ 'status' => $status
777
+ );
778
+ }
779
+ header('content-type: application/json');
780
+ echo json_encode($res);
781
+ wp_die();
782
+ }
783
+
784
+ /**
785
+ * Displays the Dashboard page.
786
+ */
787
+ public function gawd_display_uninstall_page() {
788
+ require_once( 'admin/pages/uninstall.php' );
789
+ $gawd_uninstall = new GAWDUninstall();
790
+ $deactivate_url = wp_nonce_url('plugins.php?action=deactivate&plugin='.GWD_NAME.'/google-analytics-wd.php', 'deactivate-plugin_'.GWD_NAME.'/google-analytics-wd.php');
791
+ $deactivate_url = str_replace('&amp;','&',$deactivate_url);
792
+ if (isset($_POST['unistall_gawd'])) {
793
+ check_admin_referer('gawd_save_form', 'gawd_save_form_fild');
794
+ delete_option('gawd_custom_reports');
795
+ delete_option('gawd_menu_for_user');
796
+ delete_option('gawd_all_metrics');
797
+ delete_option('gawd_all_dimensions');
798
+ delete_option('gawd_custom_dimensions');
799
+ delete_option('gawd_settings');
800
+ delete_option('gawd_user_data');
801
+ delete_option('gawd_credentials');
802
+ delete_option('gawd_menu_items');
803
+ delete_option('gawd_export_chart_data');
804
+ delete_option('gawd_email');
805
+ delete_option('gawd_custom_reports');
806
+ delete_option('gawd_alerts');
807
+ delete_option('gawd_pushovers');
808
+ delete_option('gawd_menu_for_users');
809
+ delete_option('gawd_own_project');
810
+ delete_option('gawd_zoom_message');
811
+ delete_transient('gawd_user_profiles');
812
+ echo '<script>window.location.href="'.$deactivate_url.'";</script>';
813
+ }
814
+ if (get_option('gawd_credentials')) {
815
+ $gawd_uninstall->uninstall();
816
+ }
817
+ }
818
+
819
+ public function gawd_display_goals_page() {
820
+ if($this->manage_ua_code_selection() != 'done') {
821
+ return;
822
+ }
823
+ global $gawd_client;
824
+ $gawd_client = GAWD_google_client::get_instance();
825
+ if (!empty($_POST)) {
826
+ check_admin_referer('gawd_save_form', 'gawd_save_form_fild');
827
+ }
828
+ $gawd_goal_profile = isset($_POST['gawd_goal_profile']) ? sanitize_text_field($_POST['gawd_goal_profile']) : '';
829
+ $gawd_goal_name = isset($_POST['gawd_goal_name']) ? sanitize_text_field($_POST['gawd_goal_name']) : '';
830
+ $gawd_goal_type = isset($_POST['gawd_goal_type']) ? sanitize_text_field($_POST['gawd_goal_type']) : '';
831
+ $gawd_visit_hour = isset($_POST['gawd_visit_hour']) ? sanitize_text_field($_POST['gawd_visit_hour']) : '';
832
+ $gawd_visit_minute = isset($_POST['gawd_visit_minute']) ? sanitize_text_field($_POST['gawd_visit_minute']) : '';
833
+ $gawd_visit_second = isset($_POST['gawd_visit_second']) ? sanitize_text_field($_POST['gawd_visit_second']) : '';
834
+ $gawd_goal_duration_comparison = isset($_POST['gawd_goal_duration_comparison']) ? sanitize_text_field($_POST['gawd_goal_duration_comparison']) : '';
835
+ $gawd_goal_page_comparison = isset($_POST['gawd_goal_page_comparison']) ? sanitize_text_field($_POST['gawd_goal_page_comparison']) : '';
836
+ $gawd_page_sessions = isset($_POST['gawd_page_sessions']) ? sanitize_text_field($_POST['gawd_page_sessions']) : '';
837
+ $goal_max_id = isset($_POST['goal_max_id']) ? $_POST['goal_max_id'] + 1 : 1;
838
+ $gawd_goal_page_destination_match = isset($_POST['gawd_goal_page_destination_match']) ? sanitize_text_field($_POST['gawd_goal_page_destination_match']) : '';
839
+ $gawd_page_url = isset($_POST['gawd_page_url']) ? sanitize_text_field($_POST['gawd_page_url']) : '';
840
+ $url_case_sensitve = isset($_POST['url_case_sensitve']) ? $_POST['url_case_sensitve'] : '';
841
+ if ($gawd_goal_type == 'VISIT_TIME_ON_SITE') {
842
+ if ($gawd_visit_hour != '' || $gawd_visit_minute != '' || $gawd_visit_second != '') {
843
+ $value = 0;
844
+ if ($gawd_visit_hour != '') {
845
+ $value += $gawd_visit_hour * 60 * 60;
846
+ }
847
+ if ($gawd_visit_minute != '') {
848
+ $value += $gawd_visit_minute * 60;
849
+ }
850
+ if ($gawd_visit_second != '') {
851
+ $value += $gawd_visit_second;
852
+ }
853
+ }
854
+ $gawd_client->add_goal($gawd_goal_profile, $goal_max_id, $gawd_goal_type, $gawd_goal_name, $gawd_goal_duration_comparison, $value);
855
+ } elseif ($gawd_goal_type == 'VISIT_NUM_PAGES') {
856
+ if ($gawd_page_sessions != '') {
857
+ $gawd_client->add_goal($gawd_goal_profile, $goal_max_id, $gawd_goal_type, $gawd_goal_name, $gawd_goal_page_comparison, $gawd_page_sessions);
858
+ }
859
+ } elseif ($gawd_goal_type == 'URL_DESTINATION') {
860
+ if ($gawd_page_url != '') {
861
+ $gawd_client->add_goal($gawd_goal_profile, $goal_max_id, $gawd_goal_type, $gawd_goal_name, $gawd_goal_page_destination_match, $gawd_page_url, $url_case_sensitve);
862
+ }
863
+ } elseif ($gawd_goal_type == 'EVENT') {
864
+ if ($gawd_page_url != '') {
865
+ $gawd_client->add_goal($gawd_goal_profile, $goal_max_id, $gawd_goal_type, $gawd_goal_name, $gawd_goal_page_comparison, $gawd_page_url, $url_case_sensitve);
866
+ }
867
+ }
868
+ require_once( 'admin/pages/goals.php' );
869
+
870
+ }
871
+
872
+ public function gawd_display_custom_reports_page() {
873
+ global $gawd_client;
874
+ if (!empty($_POST)) {
875
+ check_admin_referer('gawd_save_form', 'gawd_save_form_fild');
876
+ }
877
+ $gawd_client = GAWD_google_client::get_instance();
878
+ $gawd_remove_custom_report = isset($_POST['gawd_remove_custom_report']) ? sanitize_text_field($_POST['gawd_remove_custom_report']) : '';
879
+ if ($gawd_remove_custom_report) {
880
+ $all_reports = get_option("gawd_custom_reports");
881
+ if ($all_reports) {
882
+ unset($all_reports[$gawd_remove_custom_report]);
883
+ update_option('gawd_custom_reports', $all_reports);
884
+ self::add_dashboard_menu();
885
+ }
886
+ }
887
+ if (isset($_POST['gawd_add_custom_report'])) {
888
+ $gawd_custom_report_name = isset($_POST['gawd_custom_report_name']) ? sanitize_text_field($_POST['gawd_custom_report_name']) : '';
889
+ $gawd_custom_report_metric = isset($_POST['gawd_custom_report_metric']) ? sanitize_text_field($_POST['gawd_custom_report_metric']) : '';
890
+ $gawd_custom_report_dimension = isset($_POST['gawd_custom_report_dimension']) ? sanitize_text_field($_POST['gawd_custom_report_dimension']) : '';
891
+
892
+ if ($gawd_custom_report_name != '' && $gawd_custom_report_metric != '' && $gawd_custom_report_dimension != '') {
893
+ $saved_custom_reports = get_option("gawd_custom_reports");
894
+ if(!isset($saved_custom_reports[$gawd_custom_report_name])){
895
+ if ($saved_custom_reports) {
896
+ $custom_reports = array('metric' => $gawd_custom_report_metric, 'dimension' => $gawd_custom_report_dimension, 'id' => count($saved_custom_reports) + 1);
897
+ $saved_custom_reports[$gawd_custom_report_name] = $custom_reports;
898
+
899
+ update_option('gawd_custom_reports', $saved_custom_reports);
900
+ }
901
+ else {
902
+ $custom_reports = array($gawd_custom_report_name => array('metric' => $gawd_custom_report_metric, 'dimension' => $gawd_custom_report_dimension, 'id' => 1));
903
+ update_option('gawd_custom_reports', $custom_reports);
904
+ }
905
+ }
906
+ }
907
+ self::add_dashboard_menu();
908
+ }
909
+ require_once( 'admin/pages/custom_reports.php' );
910
+ }
911
+
912
+ public function gawd_display_overview_page() {
913
+ global $gawd_client, $gawd_user_data;
914
+ $gawd_client = GAWD_google_client::get_instance();
915
+ $profiles = $gawd_client->get_profiles();
916
+ $gawd_user_data = get_option('gawd_user_data');
917
+ if(isset($_POST['gawd_id'])){
918
+ $gawd_user_data['gawd_id'] = isset($_POST['gawd_id']) ? $_POST['gawd_id'] : '';
919
+ foreach ($gawd_user_data['gawd_profiles'] as $web_property_name => $web_property) {
920
+ foreach ($web_property as $profile) {
921
+ if ($profile['id'] == $gawd_user_data['gawd_id']) {
922
+ $gawd_user_data['web_property_name'] = $web_property_name;
923
+ $gawd_user_data['webPropertyId'] = $profile['webPropertyId'];
924
+ $gawd_user_data['accountId'] = $profile['accountId'];
925
+ }
926
+ }
927
+ }
928
+ $gawd_user_data['web_property_name'] = isset($_POST['web_property_name']) ? $_POST['web_property_name'] : '';
929
+ update_option('gawd_user_data', $gawd_user_data);
930
+ }
931
+ require_once( 'admin/pages/overview.php' );
932
+ }
933
+
934
+ public function gawd_display_reports_page() {
935
+ global $gawd_client, $gawd_user_data;
936
+ $gawd_client = GAWD_google_client::get_instance();
937
+ $profiles = $gawd_client->get_profiles();
938
+ $gawd_user_data = get_option('gawd_user_data');
939
+ if(isset($_POST['gawd_id'])){
940
+ $gawd_user_data['gawd_id'] = isset($_POST['gawd_id']) ? $_POST['gawd_id'] : '';
941
+ foreach ($gawd_user_data['gawd_profiles'] as $web_property_name => $web_property) {
942
+ foreach ($web_property as $profile) {
943
+ if ($profile['id'] == $gawd_user_data['gawd_id']) {
944
+ $gawd_user_data['web_property_name'] = $web_property_name;
945
+ $gawd_user_data['webPropertyId'] = $profile['webPropertyId'];
946
+ $gawd_user_data['accountId'] = $profile['accountId'];
947
+ }
948
+ }
949
+ }
950
+ $gawd_user_data['web_property_name'] = isset($_POST['web_property_name']) ? $_POST['web_property_name'] : '';
951
+ update_option('gawd_user_data', $gawd_user_data);
952
+ }
953
+ require_once( 'admin/pages/dashboard.php' );
954
+ }
955
+
956
+ public function gawd_daily_email() {
957
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
958
+ $gawd_client = GAWD_google_client::get_instance();
959
+ $emails = get_option('gawd_email');
960
+ $gawd_user_data = get_option('gawd_user_data');
961
+ $data = '';
962
+ foreach ($emails as $email) {
963
+ if (isset($email['period']) && $email['period'] == 'daily') {
964
+ //pls send email if ....
965
+ $date = date('Y-m-d', strtotime('yesterday'));
966
+ $email_subject = preg_match('/\(([0-9]{4}-[0-1][0-9]-[0-3][0-9] \- [0-9]{4}-[0-1][0-9]-[0-3][0-9])\)/', $email['email_subject']) ? preg_replace('/\(([0-9]{4}-[0-1][0-9]-[0-3][0-9] \- [0-9]{4}-[0-1][0-9]-[0-3][0-9])\)/', '(' . $date . ' - ' . $date . ')', $email['email_subject']) : $email['email_subject'] . ' (' . $date . ' - ' . $date . ')';
967
+ $data = $this->show_data(array('metric'=>'ga:' . $email['metric'], 'dimension'=>$email['dimension'], 'start_date'=>$date,'end_date'=> $date));
968
+ if($email['export_type'] == 'pdf'){
969
+ $filedir = $this->create_pdf_file(false,$data, $email['dimension'], $date, $date,$email['metric_compare'],$email['metric']);
970
+ }
971
+ else{
972
+ $filedir = $this->create_csv_file(false,$data, $email['dimension'], $date, $date,$email['metric_compare'],$email['metric']);
973
+ }
974
+ //$attachment = gawd_export_data($data, $export_type, 'email', $email['dimension'], $email['metric'], $email['metric_compare'], $email['img'], $email['tab_name'], $start_date, $end_date, $gawd_user_data['web_property_name'],$filter_type);
975
+ $attachment = $filedir;
976
+ $headers = 'From: <' . $email['email_from'] . '>';
977
+ wp_mail($email['emails'], $email_subject, $email['email_body'], $headers, $attachment);
978
+ }
979
+ }
980
+ }
981
+
982
+ public function gawd_weekly_email() {
983
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
984
+ $gawd_client = GAWD_google_client::get_instance();
985
+ $emails = get_option('gawd_email');
986
+ $gawd_user_data = get_option('gawd_user_data');
987
+ $data = '';
988
+ foreach ($emails as $email) {
989
+ if (isset($email['period']) && $email['period'] == 'gawd_weekly') {
990
+ //pls send email if ....
991
+ /*$start_date = date('Y-m-d', strtotime('last' . $email['period_day']));
992
+ $end_date = date('Y-m-d', strtotime('this' . $email['period_day']));*/
993
+ $start_date = date('Y-m-d', strtotime('last week -1 day'));
994
+ $end_date = date('l') != 'Sunday' ? date('Y-m-d',strtotime('last sunday -1 day')) : date('Y-m-d', strtotime('-1 day'));
995
+ $email_subject = preg_match('/\(([0-9]{4}-[0-1][0-9]-[0-3][0-9] \- [0-9]{4}-[0-1][0-9]-[0-3][0-9])\)/', $email['email_subject']) ? preg_replace('/\(([0-9]{4}-[0-1][0-9]-[0-3][0-9] \- [0-9]{4}-[0-1][0-9]-[0-3][0-9])\)/', '(' . $start_date . ' - ' . $end_date . ')', $email['email_subject']) : $email['email_subject'] . ' (' . $start_date . ' - ' . $end_date . ')';
996
+ $data = $this->show_data(array('metric'=>'ga:' . $email['metric'], 'dimension'=>$email['dimension'], 'start_date'=>$start_date,'end_date'=> $end_date));
997
+ if($email['export_type'] == 'pdf'){
998
+ $filedir = $this->create_pdf_file(false,$data, $email['dimension'], $start_date, $end_date,$email['metric_compare'],$email['metric']);
999
+ }
1000
+ else{
1001
+ $filedir = $this->create_csv_file(false,$data, $email['dimension'], $start_date, $end_date, $email['metric_compare'],$email['metric']);
1002
+ }
1003
+ //$attachment = gawd_export_data($data, $export_type, 'email', $email['dimension'], $email['metric'], $email['metric_compare'], $email['img'], $email['tab_name'], $start_date, $end_date, $gawd_user_data['web_property_name'],$filter_type);
1004
+ $attachment = $filedir;
1005
+
1006
+ $headers = 'From: <' . $email['email_from'] . '>';
1007
+ wp_mail($email['emails'], $email_subject, $email['email_body'], $headers, $attachment);
1008
+ }
1009
+ }
1010
+ }
1011
+
1012
+ public function gawd_monthly_email() {
1013
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
1014
+ $gawd_client = GAWD_google_client::get_instance();
1015
+ $emails = get_option('gawd_email');
1016
+ $gawd_user_data = get_option('gawd_user_data');
1017
+ $data = '';
1018
+ foreach ($emails as $email) {
1019
+ if (isset($email['period']) && $email['period'] == 'gawd_monthly') {
1020
+ //pls send email if ....
1021
+ $end_date = date('Y-m-d', strtotime(date('Y-' . date('m') . '-1') . '-1 day'));
1022
+ $start_date = date('Y-m-d', strtotime($end_date . '- 1 month'));
1023
+ $data = $this->show_data(array('metric'=>'ga:' . $email['metric'], 'dimension'=>$email['dimension'], 'start_date'=>$start_date,'end_date'=> $end_date));
1024
+ $email_subject = preg_match('/\(([0-9]{4}-[0-1][0-9]-[0-3][0-9] \- [0-9]{4}-[0-1][0-9]-[0-3][0-9])\)/', $email['email_subject']) ? preg_replace('/\(([0-9]{4}-[0-1][0-9]-[0-3][0-9] \- [0-9]{4}-[0-1][0-9]-[0-3][0-9])\)/', '(' . $start_date . ' - ' . $end_date . ')', $email['email_subject']) : $email['email_subject'] . ' (' . $start_date . ' - ' . $end_date . ')';
1025
+ if($email['export_type'] == 'pdf'){
1026
+ $filedir = $this->create_pdf_file(false,$data, $email['dimension'], $start_date, $end_date,$email['metric_compare'],$email['metric']);
1027
+ }
1028
+ else{
1029
+ $filedir = $this->create_csv_file(false,$data, $email['dimension'], $start_date, $end_date,$email['metric_compare'],$email['metric']);
1030
+ }
1031
+ //$attachment = gawd_export_data($data, $export_type, 'email', $email['dimension'], $email['metric'], $email['metric_compare'], $email['img'], $email['tab_name'], $start_date, $end_date, $gawd_user_data['web_property_name'],$filter_type);
1032
+ $attachment = $filedir;
1033
+ $headers = 'From: <' . $email['email_from'] . '>';
1034
+ wp_mail($email['emails'], $email_subject, $email['email_body'], $headers, $attachment);
1035
+ }
1036
+ }
1037
+ }
1038
+
1039
+ /**
1040
+ * Prepares the settings to be displayed then displays the settings page.
1041
+ */
1042
+ public static function gawd_settings_defaults() {
1043
+ $settings = get_option('gawd_settings');
1044
+ $settings['gawd_tracking_enable'] = 'on';
1045
+ $settings['gawd_custom_dimension_Logged_in'] = 'on';
1046
+ $settings['gawd_custom_dimension_Post_type'] = 'on';
1047
+ $settings['gawd_custom_dimension_Author'] = 'on';
1048
+ $settings['gawd_custom_dimension_Category'] = 'on';
1049
+ $settings['gawd_custom_dimension_Published_Month'] = 'on';
1050
+ $settings['gawd_custom_dimension_Published_Year'] = 'on';
1051
+ $settings['gawd_custom_dimension_Tags'] = 'on';
1052
+ $settings['enable_hover_tooltip'] = 'on';
1053
+ update_option('gawd_settings', $settings);
1054
+ }
1055
+
1056
+ public function manage_ua_code_selection() {
1057
+ global $gawd_user_data;
1058
+ if (isset($gawd_user_data['default_webPropertyId']) && $gawd_user_data['default_webPropertyId']) {
1059
+ return 'done';
1060
+ } else {
1061
+ $gawd_client = GAWD_google_client::get_instance();
1062
+ $property = $gawd_client->property_exists();
1063
+ if ($property == 'no_matches') {
1064
+ $this->gawd_admin_notice("<p class='gawd_notice'>You don't have any web-properties with current site url, go with <a href='" . admin_url('admin.php?page=gawd_tracking') . "'>this</a> link to add.</p>", 'error');
1065
+ // show notice that you don't have property with current site url
1066
+ // add account or property to an existing account
1067
+ } elseif (count($property) == 1) {
1068
+ $property = $property[0];
1069
+ $gawd_user_data['webPropertyId'] = $property['id'];
1070
+ $gawd_user_data['default_webPropertyId'] = $property['id'];
1071
+ $gawd_user_data['accountId'] = $property['accountId'];
1072
+ $gawd_user_data['default_accountId'] = $property['accountId'];
1073
+ $gawd_user_data['gawd_id'] = $property['defaultProfileId'];
1074
+ update_option('gawd_user_data', $gawd_user_data);
1075
+ $this->gawd_admin_notice("In order to enable tracking for your website, you have to go with
1076
+ <a href='" . admin_url('admin.php?page=gawd_tracking') . "'>this</a> link and turn the option on.", 'warning is-dismissible');
1077
+ // show notice that you have to enable tracking code, link to tracking submenu
1078
+ } else {
1079
+ $this->gawd_admin_notice("You have two or more web-properties configured with current site url. Please go with
1080
+ <a href='" . admin_url('admin.php?page=gawd_tracking') . "'>this</a> link to select the proper one.", 'error');
1081
+ // show notice that you have >=2 properties with current site url
1082
+ // select property from same url properties
1083
+ }
1084
+ }
1085
+ }
1086
+
1087
+ public function manage_ua_code_selection_tracking() {
1088
+ global $gawd_user_data;
1089
+ if (isset($gawd_user_data['default_webPropertyId']) && $gawd_user_data['default_webPropertyId']) {
1090
+ return 'done';
1091
+ } else {
1092
+ $gawd_client = GAWD_google_client::get_instance();
1093
+ $property = $gawd_client->property_exists();
1094
+ if ($property == 'no_matches') {
1095
+ $accounts = $gawd_client->get_management_accounts();
1096
+ if (!empty($accounts)) {
1097
+ echo "<h3 style='margin-top:10px' class='gawd_page_titles'>Tracking</h3>
1098
+ <p class='gawd_notice notice'>Here you can add a <b>web property</b> on your Google Analytics account using current WordPress website.<br>
1099
+ Provide a <b>Name</b> for the property and click <b>Add</b>. You can check and manage web properties from your Google Analytics account, <b>Admin</b> page.<br>
1100
+ Alternatively, you can click <b>Later</b> and configure the web property any other time.</p>
1101
+ <br/>
1102
+ <form method='post' id='gawd_property_add'>
1103
+ <div class='gawd_settings_wrapper'>
1104
+ <div class='gawd_goal_row'>
1105
+ <span class='gawd_goal_label'>Account</span>
1106
+ <span class='gawd_goal_input'>
1107
+ <select name='gawd_account_select' class='gawd_account_select' style='padding: 2px;width: 96%;line-height: 30px;height: 30px !important;'>";
1108
+ foreach ($accounts as $account) {
1109
+ echo "<option value='" . $account['id'] . "'>" . $account['name'] . "</option>";
1110
+ }
1111
+ echo "</select>
1112
+ </span>
1113
+ <div class='gawd_info' title='this_is_tooltip'></div>
1114
+ <div class='clear'></div>
1115
+ </div>
1116
+ <div class='gawd_goal_row'>
1117
+ <span class='gawd_goal_label'>Name</span>
1118
+ <span class='gawd_goal_input'>
1119
+ <input id='gawd_property_name' name='gawd_property_name' type='text'>
1120
+ </span>
1121
+ <div class='gawd_info' title='this_is_tooltip'></div>
1122
+ <div class='clear'></div>
1123
+ </div>
1124
+ </div>
1125
+ <div class='gawd_add_prop gawd_submit'>
1126
+ <a href='".admin_url() . "admin.php?page=gawd_analytics' class='gawd_later button_gawd'>Later</a>
1127
+ <input type='submit' name='add_property' class='button_gawd' value='ADD'/>
1128
+ </div>
1129
+ </form>";
1130
+ // account select to add web property and web property parameters
1131
+ // and add link to google analytics for manually creating an account
1132
+ // wp_die();
1133
+ } else {
1134
+ $this->gawd_admin_notice("You do not have any google analytics accounts set. Please go with <a href='https://analytics.google.com/' target='_blank'>this</a> link to add one.", "error");
1135
+ // link to google analytics to add account
1136
+ // wp_die();
1137
+ }
1138
+ } elseif (count($property) == 1) {
1139
+ $property = $property[0];
1140
+ $gawd_user_data['webPropertyId'] = $property['id'];
1141
+ $gawd_user_data['default_webPropertyId'] = $property['id'];
1142
+ $gawd_user_data['accountId'] = $property['accountId'];
1143
+ $gawd_user_data['default_accountId'] = $property['accountId'];
1144
+ $gawd_user_data['gawd_id'] = $property['defaultProfileId'];
1145
+ update_option('gawd_user_data', $gawd_user_data);
1146
+ } else {
1147
+ echo "<p class='notice'>You have multiple web-properties set with current site url. Please select the one which you want to use for tracking from the list below.</p>
1148
+ <br/>
1149
+ <form method='post' id='gawd_property_select'>
1150
+ <div class='gawd_settings_wrapper'>
1151
+ <div class='gawd_goal_row'>
1152
+ <span class='gawd_goal_label'>Web-property</span>
1153
+ <span class='gawd_goal_input'>
1154
+ <select name='gawd_property_select' class='gawd_property_select' style='padding: 2px;width: 96%;line-height: 30px;height: 30px !important;'>";
1155
+ foreach ($property as $select_property) {
1156
+ echo "<option value='" . $select_property['id'] . "'>" . $select_property['name'] . " (" . $select_property['id'] . ")</option>";
1157
+ }
1158
+ echo "</select>
1159
+ </span>
1160
+ <div class='gawd_info' title='this_is_tooltip'></div>
1161
+ <div class='clear'></div>
1162
+ </div>
1163
+ </div>
1164
+ <div class='gawd_submit'><input type='submit' name='lock_property' class='button_gawd' value='SAVE'/></div>
1165
+ </form>";
1166
+ // web property select to select from properties with same site url
1167
+ // wp_die();
1168
+ }
1169
+ }
1170
+ }
1171
+
1172
+ public function gawd_admin_notice($message, $type) {
1173
+ $class = 'notice notice-' . $type;
1174
+ echo '<div class="' . $class . '"><p>' . $message . '</p></div>';
1175
+ }
1176
+
1177
+ public function gawd_display_settings_page() {
1178
+ global $gawd_user_data;
1179
+ $gawd_user_data = get_option('gawd_user_data');
1180
+ if(isset($_GET['defaultExist']) && $_GET['defaultExist'] ==1){
1181
+ $redirect_url = admin_url() . 'admin.php?page=gawd_tracking';
1182
+ echo '<script>window.location.href="'.$redirect_url.'";</script>';
1183
+ }
1184
+ if(isset($_POST['gawd_settings_logout'])&& $_POST['gawd_settings_logout'] == 1){
1185
+ delete_option('gawd_user_data');
1186
+ $redirect_url = admin_url() . 'admin.php?page=gawd_settings';
1187
+ echo '<script>window.location.href="'.$redirect_url.'";</script>';
1188
+ }
1189
+ if(isset($_POST['web_property_name']) && $_POST['web_property_name'] != ''){
1190
+ $gawd_user_data['gawd_id'] = isset($_POST['gawd_id']) ? $_POST['gawd_id'] : '';
1191
+ foreach ($gawd_user_data['gawd_profiles'] as $web_property_name => $web_property) {
1192
+ foreach ($web_property as $profile) {
1193
+ if ($profile['id'] == $gawd_user_data['gawd_id']) {
1194
+ $gawd_user_data['web_property_name'] = $web_property_name;
1195
+ $gawd_user_data['webPropertyId'] = $profile['webPropertyId'];
1196
+ $gawd_user_data['accountId'] = $profile['accountId'];
1197
+ }
1198
+ }
1199
+ }
1200
+ $gawd_user_data['web_property_name'] = isset($_POST['web_property_name']) ? $_POST['web_property_name'] : '';
1201
+ update_option('gawd_user_data', $gawd_user_data);
1202
+ $redirect_url = admin_url() . 'admin.php?page=gawd_settings';
1203
+ //echo '<script>window.location.href="'.$redirect_url.'";</script>';
1204
+ }
1205
+ /* if(isset($_POST['account_name']) && $_POST['account_name'] != ''){
1206
+ $gawd_user_data['accountId'] = isset($_POST['gawd_id']) ? $_POST['gawd_id'] : '';
1207
+ foreach ($gawd_user_data['gawd_profiles'] as $web_property_name => $web_property) {
1208
+ foreach ($web_property as $profile) {
1209
+ if ($profile['accountId'] == $gawd_user_data['accountId']) {
1210
+ $gawd_user_data['web_property_name'] = $web_property_name;
1211
+ $gawd_user_data['webPropertyId'] = $profile['webPropertyId'];
1212
+ $gawd_user_data['accountId'] = $profile['accountId'];
1213
+ }
1214
+ }
1215
+ }
1216
+ $gawd_user_data['web_property_name'] = isset($_POST['web_property_name']) ? $_POST['web_property_name'] : '';
1217
+ update_option('gawd_user_data', $gawd_user_data);
1218
+ $redirect_url = admin_url() . 'admin.php?page=gawd_settings';
1219
+ //echo '<script>window.location.href="'.$redirect_url.'";</script>';
1220
+ } */
1221
+ if(isset($_GET['errorMsg'])){
1222
+ self::error_message('error','User does not have sufficient permissions for this account to add filter');
1223
+ }
1224
+ if (!isset($gawd_user_data['refresh_token']) || ($gawd_user_data['refresh_token'] == '')) {
1225
+ echo '<div class="gawd_auth_wrap"><p class="auth_description">Click <b>Authenticate</b> button and login to your Google account. A window asking for relevant permissions will appear. Click <b>Allow</b> and copy the authentication code from the text input.</p><div id="gawd_auth_url" onclick="gawd_auth_popup(' . GAWD_google_client::create_authentication_url() . ',800,400)" style="cursor: pointer;">AUTHENTICATE</div>';
1226
+ echo '<div id="gawd_auth_code"><form id="gawd_auth_code_paste" action="" method="post"><input id="gawd_token" type="text">';
1227
+ wp_nonce_field("gawd_save_form", "gawd_save_form_fild");
1228
+ echo '</form>
1229
+ <div id="gawd_auth_code_submit">SUBMIT</div></div>';
1230
+ $gawd_own_project = get_option('gawd_own_project');
1231
+ if(isset($gawd_own_project) && $gawd_own_project && intval($gawd_own_project)==1){
1232
+ echo'<form method="post">
1233
+ <div class="gawd_reset_button">
1234
+ <input type="hidden" name="reset_data" id="reset_data"/>
1235
+ <input type="button" class="button_gawd" id="gawd_reset_button" value="RESET"/>
1236
+ </div>
1237
+ </form>';
1238
+ }
1239
+ echo '</div><div id="opacity_div" style="display: none; background-color: rgba(0, 0, 0, 0.2); position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99998;"></div>
1240
+ <div id="loading_div" style="display:none; text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999;">
1241
+ <img src="' . GAWD_URL . '/assets/ajax_loader.gif" style="margin-top: 200px; width:50px;">
1242
+ </div>';
1243
+ }
1244
+ else {
1245
+ if($this->manage_ua_code_selection() != 'done') {
1246
+ // return;
1247
+ }
1248
+ try{
1249
+ $gawd_client = GAWD_google_client::get_instance();
1250
+ $gawd_client->get_profiles();
1251
+
1252
+ }catch(Google_Service_Exception $e){
1253
+ return $e->getErrors()[0]["message"];
1254
+ }catch(Exception $e){
1255
+ return $e->getMessage();
1256
+ }
1257
+
1258
+ $gawd_alert_remove = isset($_POST['gawd_alert_remove']) ? intval($_POST['gawd_alert_remove']) : false;
1259
+ $gawd_menu_remove = isset($_POST['gawd_menu_remove']) ? intval($_POST['gawd_menu_remove']) : false;
1260
+ $gawd_pushover_remove = isset($_POST['gawd_pushover_remove']) ? intval($_POST['gawd_pushover_remove']) : false;
1261
+ $gawd_email_remove = isset($_POST['gawd_email_remove']) ? intval($_POST['gawd_email_remove']) : false;
1262
+ $gawd_filter_remove = isset($_POST['gawd_filter_remove']) ? intval($_POST['gawd_filter_remove']) : false;
1263
+ if ($gawd_alert_remove) {
1264
+ $all_alerts = get_option('gawd_alerts');
1265
+ if ($all_alerts) {
1266
+ foreach ($all_alerts as $alert) {
1267
+ wp_unschedule_event(wp_next_scheduled('gawd_alert_' . $alert['period']), 'gawd_alert_' . $alert['period']);
1268
+ }
1269
+ unset($all_alerts[$gawd_alert_remove - 1]);
1270
+ update_option('gawd_alerts', $all_alerts);
1271
+ }
1272
+ }
1273
+ if ($gawd_menu_remove) {
1274
+ $all_menues = get_option('gawd_menu_for_user');
1275
+ if ($all_menues) {
1276
+ unset($all_menues[$gawd_menu_remove]);
1277
+ update_option('gawd_menu_for_user', $all_menues);
1278
+ }
1279
+ }
1280
+ if ($gawd_email_remove) {
1281
+ $all_emails = get_option('gawd_email');
1282
+ if ($all_emails) {
1283
+ foreach ($all_emails as $email) {
1284
+ wp_unschedule_event(wp_next_scheduled('gawd_email_' . $email['period']), 'gawd_email_' . $email['period']);
1285
+ }
1286
+ unset($all_emails[$gawd_email_remove - 1]);
1287
+ update_option('gawd_email', $all_emails);
1288
+ }
1289
+ }
1290
+ if ($gawd_filter_remove) {
1291
+ $analytics = $gawd_client->analytics_member;
1292
+ $accountId = $gawd_client->get_profile_accountId();
1293
+ try{
1294
+ $analytics->management_filters->delete($accountId, $gawd_filter_remove);
1295
+ } catch (apiServiceException $e) {
1296
+ print 'There was an Analytics API service error '
1297
+ . $e->getCode() . ':' . $e->getMessage();
1298
+ } catch (apiException $e) {
1299
+ print 'There was a general API error '
1300
+ . $e->getCode() . ':' . $e->getMessage();
1301
+ } catch (Exception $e) {
1302
+ echo '<script>window.location.href="' . admin_url() . 'admin.php?page=gawd_settings&errorMsg=1#gawd_filters_tab";</script>';
1303
+ }
1304
+ }
1305
+ $gawd_pushover_remove = isset($_POST['gawd_pushover_remove']) ? $_POST['gawd_pushover_remove'] : false;
1306
+ if ($gawd_pushover_remove) {
1307
+ $all_pushovers = get_option('gawd_pushovers');
1308
+ if ($all_pushovers) {
1309
+ foreach ($all_pushovers as $pushover) {
1310
+ wp_unschedule_event(wp_next_scheduled('gawd_pushover_' . $pushover['period']), 'gawd_pushover_' . $pushover['period']);
1311
+ }
1312
+ unset($all_pushovers[$gawd_pushover_remove - 1]);
1313
+ update_option('gawd_pushovers', $all_pushovers);
1314
+ }
1315
+ }
1316
+ if (isset($_POST['settings_submit'])) {
1317
+ check_admin_referer('gawd_save_form', 'gawd_save_form_fild');
1318
+ $gawd_user_data = get_option('gawd_user_data');
1319
+ $gawd_alert_name = isset($_POST['gawd_alert_name']) ? sanitize_text_field($_POST['gawd_alert_name']) : '';
1320
+ $gawd_alert_period = isset($_POST['gawd_alert_name']) ? sanitize_text_field($_POST['gawd_alert_period']) : '';
1321
+ $gawd_alert_metric = isset($_POST['gawd_alert_metric']) ? sanitize_text_field($_POST['gawd_alert_metric']) : '';
1322
+ $gawd_alert_condition = isset($_POST['gawd_alert_condition']) ? sanitize_text_field($_POST['gawd_alert_condition']) : '';
1323
+ $gawd_alert_value = isset($_POST['gawd_alert_value']) ? sanitize_text_field($_POST['gawd_alert_value']) : '';
1324
+ $gawd_alert_emails = isset($_POST['gawd_alert_emails']) ? sanitize_email($_POST['gawd_alert_emails']) : '';
1325
+ $gawd_alert_view = isset($_POST['gawd_alert_view']) ? sanitize_text_field($_POST['gawd_alert_view']) : '';
1326
+ $alert_view_name = isset($_POST['alert_view_name']) ? sanitize_text_field($_POST['alert_view_name']) : '';
1327
+ if ($gawd_alert_name != '' && $gawd_alert_period != '' && $gawd_alert_metric != '' && $gawd_alert_condition != '' && $gawd_alert_value != '' && $gawd_alert_emails != '') {
1328
+ $saved_alerts = get_option('gawd_alerts');
1329
+ if ($saved_alerts) {
1330
+ $gawd_alert_options = array('name' => $gawd_alert_name, 'period' => $gawd_alert_period, 'metric' => $gawd_alert_metric, 'condition' => $gawd_alert_condition, 'value' => $gawd_alert_value, 'creation_date' => date('Y-m-d'), 'emails' => $gawd_alert_emails, 'alert_view' => $gawd_alert_view, 'alert_view_name' => $alert_view_name);
1331
+ $saved_alerts[] = $gawd_alert_options;
1332
+ update_option('gawd_alerts', $saved_alerts);
1333
+ } else {
1334
+ $gawd_alert_options = array(0 => array('name' => $gawd_alert_name, 'period' => $gawd_alert_period, 'metric' => $gawd_alert_metric, 'condition' => $gawd_alert_condition, 'value' => $gawd_alert_value, 'creation_date' => date('Y-m-d'), 'emails' => $gawd_alert_emails, 'alert_view' => $gawd_alert_view, 'alert_view_name' => $alert_view_name));
1335
+ update_option('gawd_alerts', $gawd_alert_options);
1336
+ }
1337
+ $saved_alerts = get_option('gawd_alerts');
1338
+ if ($saved_alerts) {
1339
+ foreach ($saved_alerts as $alert) {
1340
+ if (!wp_next_scheduled('gawd_alert_' . $alert['period'])) {
1341
+ wp_schedule_event(time(), $alert['period'], 'gawd_alert_' . $alert['period']);
1342
+ }
1343
+ }
1344
+ }
1345
+ }
1346
+ $gawd_pushover_name = isset($_POST['gawd_pushover_name']) ? sanitize_text_field($_POST['gawd_pushover_name']) : '';
1347
+ $gawd_pushover_period = isset($_POST['gawd_pushover_period']) ? sanitize_text_field($_POST['gawd_pushover_period']) : '';
1348
+ $gawd_pushover_metric = isset($_POST['gawd_pushover_metric']) ? sanitize_text_field($_POST['gawd_pushover_metric']) : '';
1349
+ $gawd_pushover_condition = isset($_POST['gawd_pushover_condition']) ? sanitize_text_field($_POST['gawd_pushover_condition']) : '';
1350
+ $gawd_pushover_value = isset($_POST['gawd_pushover_value']) ? intval($_POST['gawd_pushover_value']) : '';
1351
+
1352
+ $gawd_pushover_user_keys = isset($_POST['gawd_pushover_user_keys']) ? sanitize_text_field($_POST['gawd_pushover_user_keys']) : '';
1353
+ $gawd_pushover_view = isset($_POST['gawd_pushover_view']) ? sanitize_text_field($_POST['gawd_pushover_view']) : '';
1354
+ $pushover_view_name = isset($_POST['pushover_view_name']) ? sanitize_text_field($_POST['pushover_view_name']) : '';
1355
+ if ($gawd_pushover_name != '' && $gawd_pushover_period != '' && $gawd_pushover_metric != '' && $gawd_pushover_condition != '' && $gawd_pushover_value !== '' && $gawd_pushover_user_keys != '') {
1356
+ $saved_pushovers = get_option('gawd_pushovers');
1357
+ if ($saved_pushovers) {
1358
+ $gawd_pushover_options = array('name' => $gawd_pushover_name, 'period' => $gawd_pushover_period, 'metric' => $gawd_pushover_metric, 'condition' => $gawd_pushover_condition, 'value' => $gawd_pushover_value, 'creation_date' => date('Y-m-d'), 'user_key' => $gawd_pushover_user_keys,'pushover_view' => $gawd_pushover_view, 'pushover_view_name' => $pushover_view_name);
1359
+ $saved_pushovers[] = $gawd_pushover_options;
1360
+ update_option('gawd_pushovers', $saved_pushovers);
1361
+ }
1362
+ else {
1363
+ $gawd_pushover_options = array(0 => array('name' => $gawd_pushover_name, 'period' => $gawd_pushover_period, 'metric' => $gawd_pushover_metric, 'condition' => $gawd_pushover_condition, 'value' => $gawd_pushover_value, 'creation_date' => date('Y-m-d'), 'user_key' => $gawd_pushover_user_keys,'pushover_view' => $gawd_pushover_view, 'pushover_view_name' => $pushover_view_name));
1364
+ update_option('gawd_pushovers', $gawd_pushover_options);
1365
+ }
1366
+ $saved_pushovers = get_option('gawd_pushovers');
1367
+ if ($saved_pushovers) {
1368
+
1369
+ foreach ($saved_pushovers as $pushover) {
1370
+ $this->gawd_pushover_api($pushover['user_key'], $pushover['metric'], $pushover['condition'], $pushover['value']);
1371
+ if(!wp_next_scheduled('gawd_pushover_'.$pushover['period'])){
1372
+ wp_schedule_event(time(),$pushover['period'], 'gawd_pushover_'.$pushover['period']) ;
1373
+ }
1374
+ }
1375
+ }
1376
+ }
1377
+ $gawd_show_in_dashboard = isset($_POST['gawd_show_in_dashboard']) ? sanitize_text_field($_POST['gawd_show_in_dashboard']) : '';
1378
+
1379
+ $gawd_permissions = isset($_POST['gawd_permissions']) ? $_POST['gawd_permissions'] : array();
1380
+ $gawd_own_project = isset($_POST['gawd_own_project']) ? sanitize_text_field($_POST['gawd_own_project']) : '';
1381
+ $site_speed_rate = isset($_POST['site_speed_rate']) ? intval($_POST['site_speed_rate']) : '1';
1382
+ $post_page_chart = isset($_POST['post_page_chart']) ? sanitize_text_field($_POST['post_page_chart']) : '';
1383
+ $enable_cross_domain = isset($_POST['enable_cross_domain']) ? sanitize_text_field($_POST['enable_cross_domain']) : '';
1384
+ $cross_domains = isset($_POST['cross_domains']) ? sanitize_text_field($_POST['cross_domains']) : '';
1385
+ $default_date = isset($_POST['default_date']) ? $_POST['default_date'] : 'last_7_days';
1386
+ $default_date_format = isset($_POST['default_date_format']) ? $_POST['default_date_format'] : 'ymd_with_week';
1387
+ $enable_hover_tooltip = isset($_POST['enable_hover_tooltip']) ? $_POST['enable_hover_tooltip'] : '';
1388
+ $gawd_backend_roles = isset($_POST['gawd_backend_roles']) ? ($_POST['gawd_backend_roles']) : array();
1389
+ $gawd_frontend_roles = isset($_POST['gawd_frontend_roles']) ? ($_POST['gawd_frontend_roles']) : array();
1390
+ $gawd_post_page_roles = isset($_POST['gawd_post_page_roles']) ? ($_POST['gawd_post_page_roles']) : array();
1391
+ $exclude_events = isset($_POST['exclude_events']) ? sanitize_text_field($_POST['exclude_events']) : array();
1392
+ $gawd_settings_exist = get_option('gawd_settings');
1393
+ $gawd_settings_exist['gawd_show_in_dashboard'] = $gawd_show_in_dashboard;
1394
+ $gawd_settings_exist['site_speed_rate'] = $site_speed_rate;
1395
+ $gawd_settings_exist['post_page_chart'] = $post_page_chart;
1396
+ $gawd_settings_exist['enable_cross_domain'] = $enable_cross_domain;
1397
+ $gawd_settings_exist['cross_domains'] = $cross_domains;
1398
+ $gawd_settings_exist['gawd_backend_roles'] = $gawd_backend_roles;
1399
+ $gawd_settings_exist['gawd_frontend_roles'] = $gawd_frontend_roles;
1400
+ $gawd_settings_exist['gawd_post_page_roles'] = $gawd_post_page_roles;
1401
+ $gawd_settings_exist['default_date'] = $default_date;
1402
+ $gawd_settings_exist['default_date_format'] = $default_date_format;
1403
+ $gawd_settings_exist['enable_hover_tooltip'] = $enable_hover_tooltip;
1404
+ $gawd_settings_exist['exclude_events'] = $exclude_events;
1405
+ $gawd_settings_exist['gawd_permissions'] = $gawd_permissions;
1406
+ update_option('gawd_settings', $gawd_settings_exist);
1407
+ $gawd_filter_name = isset($_POST['gawd_filter_name']) ? sanitize_text_field($_POST['gawd_filter_name']) : '';
1408
+ $gawd_filter_type = isset($_POST['gawd_filter_type']) ? sanitize_text_field($_POST['gawd_filter_type']) : '';
1409
+ $gawd_filter_value = isset($_POST['gawd_filter_value']) ? $gawd_filter_type == 'GEO_IP_ADDRESS' ? ($_POST['gawd_filter_value']) : sanitize_text_field($_POST['gawd_filter_value']) : '';
1410
+ if ($gawd_filter_name != '' && $gawd_filter_type != '' && $gawd_filter_value != '') {
1411
+ $gawd_client->add_filter($gawd_filter_name, $gawd_filter_type, $gawd_filter_value);
1412
+ }
1413
+ add_option("gawd_save_settings",1) ;
1414
+ }
1415
+ if(get_option('gawd_save_settings') == 1){
1416
+ $this->gawd_admin_notice('Your changes have been saved successfully.','success is-dismissible');
1417
+ }
1418
+ delete_option('gawd_save_settings');
1419
+ require_once( 'admin/pages/settings.php' );
1420
+ }
1421
+ }
1422
+
1423
+ public function reset_user_data(){
1424
+ delete_option("gawd_credentials");
1425
+ $credentials['project_id'] = '115052745574-5vbr7tci4hjkr9clkflmnpto5jisgstg.apps.googleusercontent.com';
1426
+ $credentials['project_secret'] = 'wtNiu3c_bA_g7res6chV0Trt';
1427
+ update_option('gawd_credentials', $credentials);
1428
+ delete_option('gawd_own_project');
1429
+ delete_option('gawd_user_data');
1430
+
1431
+ }
1432
+ public function gawd_display_tracking_page() {
1433
+ global $gawd_client, $gawd_user_data;
1434
+ $gawd_client = GAWD_google_client::get_instance();
1435
+ $gawd_user_data = get_option('gawd_user_data');
1436
+ $add_dimension_value = isset($_POST['add_dimension_value']) ? $_POST['add_dimension_value'] : '';
1437
+ if(isset($_GET['errorMsg'])){
1438
+ self::error_message('error','User does not have sufficient permissions for this account');
1439
+ }
1440
+ if (isset($_POST['add_property'])) {
1441
+ $gawd_account_select = isset($_POST['gawd_account_select']) ? $_POST['gawd_account_select'] : '';
1442
+ $gawd_property_name = isset($_POST['gawd_property_name']) ? $_POST['gawd_property_name'] : '';
1443
+ if ($gawd_account_select && $gawd_property_name) {
1444
+ $err_msg = $gawd_client->add_webproperty($gawd_account_select, $gawd_property_name);
1445
+ $redirect_url = admin_url() . 'admin.php?page=gawd_tracking&enableTracking=1';
1446
+ if($err_msg){
1447
+ $redirect_url .='&errorMsg=1';
1448
+ }
1449
+ echo '<script>window.location.href="'.$redirect_url.'";</script>';
1450
+ }
1451
+ }
1452
+ if (isset($_POST['lock_property'])) {
1453
+ $property = $gawd_client->property_exists();
1454
+ $gawd_property_select = $_POST['gawd_property_select'];
1455
+ foreach ($property as $property_select) {
1456
+ if ($property_select['id'] == $gawd_property_select) {
1457
+ $property = $property_select;
1458
+ break;
1459
+ }
1460
+ }
1461
+ $gawd_user_data['webPropertyId'] = $property['id'];
1462
+ $gawd_user_data['default_webPropertyId'] = $property['id'];
1463
+ $gawd_user_data['accountId'] = $property['accountId'];
1464
+ $gawd_user_data['default_accountId'] = $property['accountId'];
1465
+ $gawd_user_data['gawd_id'] = $property['defaultProfileId'];
1466
+ update_option('gawd_user_data', $gawd_user_data);
1467
+ }
1468
+ if($this->manage_ua_code_selection_tracking() != 'done') {
1469
+ $redirect_url = admin_url() . 'admin.php?page=gawd_tracking';
1470
+ //echo '<script>window.location.href="'.$redirect_url.'";</script>';
1471
+ return;
1472
+ }
1473
+ if ($add_dimension_value == 'add_dimension_Logged_in') {
1474
+ $id = isset($_POST['gawd_custom_dimension_id']) ? ($_POST['gawd_custom_dimension_id'] + 1) : 1;
1475
+ $gawd_client->add_custom_dimension('Logged in', $id);
1476
+ $settings = get_option('gawd_settings');
1477
+ $optname = 'gawd_custom_dimension_Logged_in';
1478
+ $settings[$optname] = isset($_POST['gawd_tracking_enable']) ? $_POST['gawd_tracking_enable'] : '';
1479
+ update_option('gawd_settings', $settings);
1480
+
1481
+ }
1482
+ if ($add_dimension_value == 'add_dimension_Post_type') {
1483
+ $id = isset($_POST['gawd_custom_dimension_id']) ? ($_POST['gawd_custom_dimension_id'] + 1) : 1;
1484
+ $gawd_client->add_custom_dimension('Post type', $id);
1485
+ $settings = get_option('gawd_settings');
1486
+ $optname = 'gawd_custom_dimension_Post_type';
1487
+ $settings[$optname] = isset($_POST['gawd_tracking_enable']) ? $_POST['gawd_tracking_enable'] : '';
1488
+ update_option('gawd_settings', $settings);
1489
+
1490
+ }
1491
+ if ($add_dimension_value == 'add_dimension_Author') {
1492
+ $id = isset($_POST['gawd_custom_dimension_id']) ? ($_POST['gawd_custom_dimension_id'] + 1) : 1;
1493
+ $gawd_client->add_custom_dimension('Author', $id);
1494
+ $settings = get_option('gawd_settings');
1495
+ $optname = 'gawd_custom_dimension_Author';
1496
+ $settings[$optname] = isset($_POST['gawd_tracking_enable']) ? $_POST['gawd_tracking_enable'] : '';
1497
+ update_option('gawd_settings', $settings);
1498
+
1499
+ }
1500
+ if ($add_dimension_value == 'add_dimension_Category') {
1501
+ $id = isset($_POST['gawd_custom_dimension_id']) ? ($_POST['gawd_custom_dimension_id'] + 1) : 1;
1502
+ $gawd_client->add_custom_dimension('Category', $id);
1503
+ $settings = get_option('gawd_settings');
1504
+ $optname = 'gawd_custom_dimension_Category';
1505
+
1506
+ $settings[$optname] = isset($_POST['gawd_tracking_enable']) ? $_POST['gawd_tracking_enable'] : '';
1507
+ update_option('gawd_settings', $settings);
1508
+ }
1509
+ if ($add_dimension_value == 'add_dimension_Published_Month') {
1510
+ $id = isset($_POST['gawd_custom_dimension_id']) ? ($_POST['gawd_custom_dimension_id'] + 1) : 1;
1511
+ $gawd_client->add_custom_dimension('Published Month', $id);
1512
+ $settings = get_option('gawd_settings');
1513
+ $optname = 'gawd_custom_dimension_Published_Month';
1514
+ $settings[$optname] = isset($_POST['gawd_tracking_enable']) ? $_POST['gawd_tracking_enable'] : '';
1515
+ update_option('gawd_settings', $settings);
1516
+
1517
+ }
1518
+ if ($add_dimension_value == 'add_dimension_Published_Year') {
1519
+ $id = isset($_POST['gawd_custom_dimension_id']) ? ($_POST['gawd_custom_dimension_id'] + 1) : 1;
1520
+ $gawd_client->add_custom_dimension('Published Year', $id);
1521
+ $settings = get_option('gawd_settings');
1522
+ $optname = 'gawd_custom_dimension_Published_Year';
1523
+ $settings[$optname] = isset($_POST['gawd_tracking_enable']) ? $_POST['gawd_tracking_enable'] : '';
1524
+ update_option('gawd_settings', $settings);
1525
+
1526
+ }
1527
+ if ($add_dimension_value == 'add_dimension_Tags') {
1528
+ $id = isset($_POST['gawd_custom_dimension_id']) ? ($_POST['gawd_custom_dimension_id'] + 1) : 1;
1529
+ $gawd_client->add_custom_dimension('Tags', $id);
1530
+ $settings = get_option('gawd_settings');
1531
+ $optname = 'gawd_custom_dimension_Tags';
1532
+ $settings[$optname] = isset($_POST['gawd_tracking_enable']) ? $_POST['gawd_tracking_enable'] : '';
1533
+ update_option('gawd_settings', $settings);
1534
+ }
1535
+ if (isset($_POST['settings_submit'])) {
1536
+ check_admin_referer('gawd_save_form', 'gawd_save_form_fild');
1537
+ $gawd_user_data = get_option('gawd_user_data');
1538
+ $gawd_file_formats = isset($_POST['gawd_file_formats']) ? sanitize_text_field($_POST['gawd_file_formats']) : '';
1539
+ $gawd_anonymize = isset($_POST['gawd_anonymize']) ? sanitize_text_field($_POST['gawd_anonymize']) : '';
1540
+ $gawd_tracking_enable = isset($_POST['gawd_tracking_enable']) ? sanitize_text_field($_POST['gawd_tracking_enable']) : '';
1541
+ $gawd_outbound = isset($_POST['gawd_outbound']) ? sanitize_text_field($_POST['gawd_outbound']) : '';
1542
+ $gawd_enhanced = isset($_POST['gawd_enhanced']) ? sanitize_text_field($_POST['gawd_enhanced']) : '';
1543
+ if($add_dimension_value == ''){
1544
+ $gawd_cd_Logged_in = isset($_POST['gawd_custom_dimension_Logged_in']) ? sanitize_text_field($_POST['gawd_custom_dimension_Logged_in']) : '';
1545
+ $gawd_cd_Post_type = isset($_POST['gawd_custom_dimension_Post_type']) ? sanitize_text_field($_POST['gawd_custom_dimension_Post_type']) : '';
1546
+ $gawd_cd_Author = isset($_POST['gawd_custom_dimension_Author']) ? sanitize_text_field($_POST['gawd_custom_dimension_Author']) : '';
1547
+ $gawd_cd_Category = isset($_POST['gawd_custom_dimension_Category']) ? sanitize_text_field($_POST['gawd_custom_dimension_Category']) : '';
1548
+ $gawd_cd_Published_Month = isset($_POST['gawd_custom_dimension_Published_Month']) ? sanitize_text_field($_POST['gawd_custom_dimension_Published_Month']) : '';
1549
+ $gawd_cd_Published_Year = isset($_POST['gawd_custom_dimension_Published_Year']) ? sanitize_text_field($_POST['gawd_custom_dimension_Published_Year']) : '';
1550
+ $gawd_cd_Tags = isset($_POST['gawd_custom_dimension_Tags']) ? sanitize_text_field($_POST['gawd_custom_dimension_Tags']) : '';
1551
+ $gawd_settings['gawd_custom_dimension_Logged_in'] = $gawd_cd_Logged_in;
1552
+ $gawd_settings['gawd_custom_dimension_Post_type'] = $gawd_cd_Post_type;
1553
+ $gawd_settings['gawd_custom_dimension_Author'] = $gawd_cd_Author;
1554
+ $gawd_settings['gawd_custom_dimension_Category'] = $gawd_cd_Category;
1555
+ $gawd_settings['gawd_custom_dimension_Published_Month'] = $gawd_cd_Published_Month;
1556
+ $gawd_settings['gawd_custom_dimension_Published_Year'] = $gawd_cd_Published_Year;
1557
+ $gawd_settings['gawd_custom_dimension_Tags'] = $gawd_cd_Tags;
1558
+ }
1559
+ $gawd_excluded_roles = isset($_POST['gawd_excluded_roles']) ? $_POST['gawd_excluded_roles'] : array();
1560
+ $gawd_excluded_users = isset($_POST['gawd_excluded_users']) ? $_POST['gawd_excluded_users'] : array();
1561
+ $gawd_settings = get_option('gawd_settings');
1562
+ $gawd_settings['gawd_file_formats'] = $gawd_file_formats;
1563
+ $gawd_settings['gawd_anonymize'] = $gawd_anonymize;
1564
+ $gawd_settings['gawd_file_formats'] = $gawd_file_formats;
1565
+ $gawd_settings['gawd_tracking_enable'] = $gawd_tracking_enable;
1566
+ $gawd_settings['gawd_outbound'] = $gawd_outbound;
1567
+ $gawd_settings['gawd_enhanced'] = $gawd_enhanced;
1568
+ $gawd_settings['gawd_excluded_roles'] = $gawd_excluded_roles;
1569
+ $gawd_settings['gawd_excluded_users'] = $gawd_excluded_users;
1570
+ update_option('gawd_settings', $gawd_settings);
1571
+ add_option("gawd_save_tracking",1) ;
1572
+ }
1573
+ if(get_option('gawd_save_tracking') == 1){
1574
+ $this->gawd_admin_notice('Your changes have been saved successfully.','success is-dismissible');
1575
+ }
1576
+ delete_option('gawd_save_tracking');
1577
+ $gawd_settings = get_option('gawd_settings');
1578
+ if($add_dimension_value != ''){
1579
+ $redirect_url = admin_url() . 'admin.php?page=gawd_tracking';
1580
+ echo '<script>window.location.href="'.$redirect_url.'";</script>';
1581
+ }
1582
+ require_once( 'admin/pages/tracking.php' );
1583
+ }
1584
+
1585
+ public function gawd_my_schedule() {
1586
+ $schedules['gawd_weekly'] = array(
1587
+ 'interval' => 604800,
1588
+ 'display' => __('Every week')
1589
+ );
1590
+ $schedules['gawd_monthly'] = array(
1591
+ 'interval' => 18748800,
1592
+ 'display' => __('Every month')
1593
+ );
1594
+ return $schedules;
1595
+ }
1596
+
1597
+ public function gawd_pushover_api($user_key, $metric, $condition, $value) {
1598
+ $ch = curl_init();
1599
+ curl_setopt($ch, CURLOPT_URL, "https://api.pushover.net/1/messages.json");
1600
+ curl_setopt($ch, CURLOPT_POSTFIELDS, array(
1601
+ "token" => "aJBDhTfhR87EaTzs7wpx1MMKwboBjB",
1602
+ "user" => $user_key,
1603
+ "message" => 'The ' . $metric . ' less ' . $value));
1604
+ // curl_setopt($ch, CURLOPT_SAFE_UPLOAD, true);
1605
+ curl_exec($ch);
1606
+ curl_close($ch);
1607
+ }
1608
+
1609
+ public function gawd_pushover_daily() {
1610
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
1611
+ $gawd_client = GAWD_google_client::get_instance();
1612
+ $pushovers = get_option('gawd_pushovers');
1613
+ $data = '';
1614
+ $condition = '';
1615
+
1616
+ foreach ($pushovers as $pushover) {
1617
+ if (isset($pushover['period']) && $pushover['period'] == 'daily') {
1618
+ //pls send email if ....
1619
+ $date = date('Y-m-d', strtotime('yesterday'));
1620
+ $data = $gawd_client->get_data_alert('ga:' . $pushover['metric'], 'date', $date, $date, $pushover['pushover_view']);
1621
+ $pushover_condition = $pushover['condition'] == 'greater' ? '>' : '<';
1622
+ if (!eval($data . $pushover_condition . $pushover['value'] . ';')) {
1623
+ $cond = ' '.$pushover['condition'] . ' than';
1624
+ $this->gawd_pushover_api($pushover['user_key'], $pushover['metric'], $pushover['condition'], $pushover['value']);
1625
+ }
1626
+ }
1627
+ }
1628
+ }
1629
+
1630
+ public function gawd_pushover_weekly() {
1631
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
1632
+ $gawd_client = GAWD_google_client::get_instance();
1633
+ $pushovers = get_option('gawd_pushovers');
1634
+ $data = '';
1635
+ $condition = '';
1636
+ foreach ($pushovers as $pushover) {
1637
+ if (isset($pushover['period']) && $pushover['period'] == 'gawd_weekly') {
1638
+ //pls send email if ....
1639
+ $start_date = date('Y-m-d', strtotime('last week -1 day'));
1640
+ $end_date = date('l') != 'Sunday' ? date('Y-m-d',strtotime('last sunday -1 day')) : date('Y-m-d', strtotime('-1 day'));
1641
+ $data = $gawd_client->get_data_alert('ga:' . $pushover['metric'], 'date', $start_date, $end_date, $pushover['pushover_view']);
1642
+ $pushover_condition = $pushover['condition'] == 'greater' ? '>' : '<';
1643
+ if (!eval($data . $pushover_condition . $pushover['value'] . ';')) {
1644
+ $cond = ' '.$pushover['condition'] . ' than';
1645
+ $this->gawd_pushover_api($pushover['user_key'], $pushover['metric'], $pushover['condition'], $pushover['value']);
1646
+ }
1647
+ }
1648
+ }
1649
+ }
1650
+
1651
+ public function gawd_pushover_monthly() {
1652
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
1653
+ $gawd_client = GAWD_google_client::get_instance();
1654
+ $pushovers = get_option('gawd_pushovers');
1655
+ $data = '';
1656
+ $condition = '';
1657
+ foreach ($pushovers as $pushover) {
1658
+ if (isset($pushover['period']) && $pushover['period'] == 'gawd_monthly') {
1659
+ //pls send email if ....
1660
+ $end_date = date('Y-m-t', strtotime('last month'));
1661
+ $start_date = date('Y-m-01', strtotime('last month'));
1662
+ $data = $gawd_client->get_data_alert('ga:' . $pushover['metric'], 'date', $start_date, $end_date, $pushover['pushover_view']);
1663
+ $pushover_condition = $pushover['condition'] == 'greater' ? '>' : '<';
1664
+ if (!eval($data . $pushover_condition . $pushover['value'] . ';')) {
1665
+ $cond = ' '.$pushover['condition'] . ' than';
1666
+ $this->gawd_pushover_api($pushover['user_key'], $pushover['metric'], $pushover['condition'], $pushover['value']);
1667
+ }
1668
+ }
1669
+ }
1670
+ }
1671
+
1672
+ public function gawd_alert_daily() {
1673
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
1674
+ $gawd_client = GAWD_google_client::get_instance();
1675
+ $alerts = get_option('gawd_alerts');
1676
+ $data = '';
1677
+ $condition = '';
1678
+ $email_from = get_option('admin_email');
1679
+ foreach ($alerts as $alert) {
1680
+ if (isset($alert['period']) && $alert['period'] == 'daily') {
1681
+ //pls send email if ....
1682
+ $date = date('Y-m-d', strtotime('yesterday'));
1683
+ $data = $gawd_client->get_data_alert('ga:' . $alert['metric'], 'date', $date, $date, $alert['alert_view']);
1684
+ $alert_condition = $alert['condition'] == 'greater' ? '>' : '<';
1685
+ $color_condition = $alert['condition'] == 'greater' ? 'rgb(157, 207, 172)' : 'rgb(251, 133, 131)';
1686
+ if (!eval($data . $alert_condition . $alert['value'] . ';')) {
1687
+ $cond = ' '.$alert['condition'] . ' than';
1688
+ $headers = array();
1689
+ $headers[] = 'From: <' . $email_from . '>';
1690
+ $headers[] = 'Content-Type: text/html';
1691
+ $content = '<div style="font-family: sans-serif;width:100%;height:50px;background-color:#FB8583;font-size:20px;color:#fff;margin-bottom:20px;text-align:center;line-height:50px">Google Analytics WD Alert!</div><p style="color:#808080;text-align: center;font-size: 26px;font-family: sans-serif;">' . preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $alert['metric'])))). ' in <a style="text-decoration:none;color:rgba(124,181,216,1);font-family: sans-serif;" href="' . $alert["alert_view_name"] . '" target="_blank">' . $alert["alert_view_name"] . '</a> are <span style="color:'.$color_condition.'">' . $cond . '</span></p><p style="color:rgba(124,181,216,1);font-size: 26px;font-family: sans-serif; text-align: center;">' . $alert['value'] . '</p>';
1692
+ wp_mail($alert['emails'], 'Analytics Alert',$content, $headers);
1693
+ }
1694
+ }
1695
+ }
1696
+ }
1697
+ public function gawd_alert_weekly() {
1698
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
1699
+ $gawd_client = GAWD_google_client::get_instance();
1700
+ $alerts = get_option('gawd_alerts');
1701
+ $data = '';
1702
+ $condition = '';
1703
+ $email_from = get_option('admin_email');
1704
+ foreach ($alerts as $alert) {
1705
+ if (isset($alert['period']) && $alert['period'] == 'gawd_weekly') {
1706
+ //pls send email if ....
1707
+ $start_date = date('Y-m-d', strtotime('last week -1 day'));
1708
+ $end_date = date('l') != 'Sunday' ? date('Y-m-d',strtotime('last sunday -1 day')) : date('Y-m-d', strtotime('-1 day'));
1709
+ $data = $gawd_client->get_data_alert('ga:' . $alert['metric'], 'date', $start_date, $end_date, $alert['alert_view']);
1710
+ $alert_condition = $alert['condition'] == 'greater' ? '>' : '<';
1711
+ if (!eval($data . $alert_condition . $alert['value'] . ';')) {
1712
+ $cond = ' '.$alert['condition'] . ' than';
1713
+ $headers = array();
1714
+ $headers[] = 'From: <' . $email_from . '>';
1715
+ $headers[] = 'Content-Type: text/html';
1716
+ $content = '<div style="font-family: sans-serif;width:100%;height:50px;background-color:#FB8583;font-size:20px;color:#fff;margin-bottom:20px;text-align:center;line-height:50px">Google Analytics WD Alert!</div><p style="color:#808080;text-align: center;font-size: 26px;font-family: sans-serif;">' . preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $alert['metric'])))). ' in <a style="text-decoration:none;color:rgba(124,181,216,1);font-family: sans-serif;" href="' . $alert["alert_view_name"] . '" target="_blank">' . $alert["alert_view_name"] . '</a> are <span style="color:'.$color_condition.'">' . $cond . '</span></p><p style="color:rgba(124,181,216,1);font-size: 26px;font-family: sans-serif; text-align: center;">' . $alert['value'] . '</p>';
1717
+ wp_mail($alert['emails'], 'Analytics Alert',$content, $headers);
1718
+ }
1719
+ }
1720
+ }
1721
+ }
1722
+
1723
+ public function gawd_alert_monthly() {
1724
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
1725
+ $gawd_client = GAWD_google_client::get_instance();
1726
+ $alerts = get_option('gawd_alerts');
1727
+ $data = '';
1728
+ $email_from = get_option('admin_email');
1729
+ foreach ($alerts as $alert) {
1730
+ if (isset($alert['period']) && $alert['period'] == 'gawd_monthly') {
1731
+ //pls send email if ....
1732
+ $end_date = date('Y-m-t', strtotime('last month'));
1733
+ $start_date = date('Y-m-01', strtotime('last month'));
1734
+ $data = $gawd_client->get_data_alert('ga:' . $alert['metric'], 'date', $start_date, $end_date, $alert['alert_view']);
1735
+ $alert_condition = $alert['condition'] == 'greater' ? '>' : '<';
1736
+ if (!eval($data . $alert_condition . $alert['value'] . ';')) {
1737
+ $cond = ' '.$alert['condition'] . ' than';
1738
+ $headers = array();
1739
+ $headers[] = 'From: <' . $email_from . '>';
1740
+ $headers[] = 'Content-Type: text/html';
1741
+ $content = '<div style="font-family: sans-serif;width:100%;height:50px;background-color:#FB8583;font-size:20px;color:#fff;margin-bottom:20px;text-align:center;line-height:50px">Google Analytics WD Alert!</div><p style="color:#808080;text-align: center;font-size: 26px;font-family: sans-serif;">' . preg_replace('!\s+!',' ',trim(ucfirst(preg_replace('/([A-Z])/', ' $1', $alert['metric'])))). ' in <a style="text-decoration:none;color:rgba(124,181,216,1);font-family: sans-serif;" href="' . $alert["alert_view_name"] . '" target="_blank">' . $alert["alert_view_name"] . '</a> are <span style="color:'.$color_condition.'">' . $cond . '</span></p><p style="color:rgba(124,181,216,1);font-size: 26px;font-family: sans-serif; text-align: center;">' . $alert['value'] . '</p>';
1742
+ wp_mail($alert['emails'], 'Analytics Alert',$content, $headers);
1743
+ }
1744
+ }
1745
+ }
1746
+ }
1747
+
1748
+ public function wd_dashboard_widget() {
1749
+ global $gawd_client, $gawd_user_data;
1750
+ $gawd_client = GAWD_google_client::get_instance();
1751
+ $profiles = $gawd_client->get_profiles();
1752
+ $gawd_user_data = get_option('gawd_user_data');
1753
+ if(isset($_POST['gawd_id'])){
1754
+ $gawd_user_data['gawd_id'] = isset($_POST['gawd_id']) ? $_POST['gawd_id'] : '';
1755
+ foreach ($gawd_user_data['gawd_profiles'] as $web_property_name => $web_property) {
1756
+ foreach ($web_property as $profile) {
1757
+ if ($profile['id'] == $gawd_user_data['gawd_id']) {
1758
+ $gawd_user_data['web_property_name'] = $web_property_name;
1759
+ $gawd_user_data['webPropertyId'] = $profile['webPropertyId'];
1760
+ $gawd_user_data['accountId'] = $profile['accountId'];
1761
+ }
1762
+ }
1763
+ }
1764
+ $gawd_user_data['web_property_name'] = isset($_POST['web_property_name']) ? $_POST['web_property_name'] : '';
1765
+ update_option('gawd_user_data', $gawd_user_data);
1766
+ }
1767
+ require_once( 'admin/pages/dashboard_widget.php' );
1768
+ }
1769
+
1770
+ public function google_analytics_wd_dashboard_widget() {
1771
+ $gawd_settings = get_option('gawd_settings');
1772
+ $gawd_backend_roles = isset($gawd_settings['gawd_backend_roles']) ? $gawd_settings['gawd_backend_roles'] : array();
1773
+ $roles = $this->get_current_user_role();
1774
+
1775
+ if (isset($gawd_settings['gawd_show_in_dashboard']) && $gawd_settings['gawd_show_in_dashboard'] == 'on') {
1776
+ if (in_array($roles, $gawd_backend_roles) || current_user_can('manage_options')) {
1777
+ wp_add_dashboard_widget('wd_dashboard_widget', 'WD Google Analytics', array($this, 'wd_dashboard_widget'));
1778
+ }
1779
+ }
1780
+ }
1781
+
1782
+ public function show_data($params = array()) {
1783
+ /* if (isset($_REQUEST['security'])) {
1784
+ check_ajax_referer('gawd_admin_page_nonce', 'security');
1785
+ } else {
1786
+ check_admin_referer('gawd_save_form', 'gawd_save_form_fild');
1787
+ } */
1788
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
1789
+ $return = true;
1790
+ if ($params == '') {
1791
+ $params = $_POST;
1792
+ $return = false;
1793
+ }
1794
+ $gawd_client = GAWD_google_client::get_instance();
1795
+ $start_date = isset($params["start_date"]) && $params["start_date"] != '' ? $params["start_date"] : date('Y-m-d', strtotime('-7 days'));
1796
+ $end_date = isset($params["end_date"]) && $params["end_date"] != '' ? $params["end_date"] : date('Y-m-d');
1797
+ $metric = isset($params["metric"]) ? $params["metric"] : 'ga:sessions';
1798
+ $metric = is_array($metric) ? count($metric) > 1 ? implode(",", $metric) : $metric[0] : $metric;
1799
+ $dimension = isset($params["dimension"]) ? $params["dimension"] : 'date';
1800
+
1801
+ $country_filter = isset($params["country_filter"]) ? $params["country_filter"] : '';
1802
+ $geo_type = isset($params["geo_type"]) ? $params["geo_type"] : '';
1803
+ $filter_type = isset($params["filter_type"]) && $params["filter_type"] != '' ? $params["filter_type"] : '';
1804
+ $custom = isset($params["custom"]) && $params["custom"] != '' ? $params["custom"] : '';
1805
+ $same_dimension = $dimension;
1806
+
1807
+ $dimension = $filter_type != '' && $dimension == 'date' ? $filter_type : $dimension;
1808
+ if ($dimension == 'week' || $dimension == 'month') {
1809
+ $same_dimension = $dimension;
1810
+ }
1811
+
1812
+
1813
+ $timezone = isset($params["timezone"]) && $params["timezone"] != '' ? $params["timezone"] : 0;
1814
+ if ($dimension == 'pagePath' || $dimension == 'PagePath' || $dimension == 'landingPagePath' || $dimension == 'LandingPagePath') {
1815
+ if (get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $dimension . '-' . $start_date . '-' . $end_date)) {
1816
+ $grid_data = get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $dimension . '-' . $start_date . '-' . $end_date);
1817
+ } else {
1818
+ $grid_data = $gawd_client->get_page_data($dimension, $start_date, $end_date, $timezone);
1819
+ }
1820
+ if ($return) {
1821
+ return $grid_data;
1822
+ }
1823
+ echo $grid_data;
1824
+ die();
1825
+ }
1826
+ elseif ($dimension == 'goals') {
1827
+ if (get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $dimension . '-' . $start_date . '-' . $end_date)) {
1828
+ $goal_data = get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $dimension . '-' . $start_date . '-' . $end_date);
1829
+ } else {
1830
+ $goal_data = $gawd_client->get_goal_data('date', $start_date, $end_date, $timezone,$same_dimension);
1831
+ }
1832
+ if ($return) {
1833
+ return $goal_data;
1834
+ }
1835
+ echo $goal_data;
1836
+ die();
1837
+ }
1838
+ elseif (($dimension == 'region' || $dimension == 'city') || ($dimension == 'Region' || $dimension == 'City')) {
1839
+ if (get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $country_filter . '-' . $start_date . '-' . $end_date)) {
1840
+ $chart_data = get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $country_filter . '-' . $start_date . '-' . $end_date);
1841
+ } else {
1842
+
1843
+ $chart_data = $gawd_client->get_country_data($metric, $dimension, $start_date, $end_date, $country_filter, $geo_type, $timezone);
1844
+ }
1845
+ if ($return) {
1846
+ return $chart_data;
1847
+ }
1848
+ echo $chart_data;
1849
+ die();
1850
+ }
1851
+ else {
1852
+ if($custom != ''){
1853
+ $chart_data = $gawd_client->get_data($metric, $dimension, $start_date, $end_date, $filter_type, $timezone, $same_dimension);
1854
+ }
1855
+ else{
1856
+ if($dimension == 'siteSpeed'){
1857
+ if (get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $same_dimension . '_' . $filter_type . '-' . $start_date . '-' . $end_date)) {
1858
+ $chart_data = get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $dimension . '-' . $start_date . '-' . $end_date);
1859
+ } else {
1860
+ $chart_data = $gawd_client->get_data($metric, $dimension, $start_date, $end_date, $filter_type, $timezone, $same_dimension);
1861
+ }
1862
+ if ($return) {
1863
+ return $chart_data;
1864
+ }
1865
+ }
1866
+ else{
1867
+
1868
+ /* if (get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $dimension . '-' . $start_date . '-' . $end_date)) {
1869
+ $chart_data = get_transient('gawd-' . $gawd_client->get_profile_id() . '-' . $dimension . '-' . $start_date . '-' . $end_date);
1870
+ } */
1871
+ //else {
1872
+
1873
+ $chart_data = $gawd_client->get_data($metric, $dimension, $start_date, $end_date, $filter_type, $timezone, $same_dimension);
1874
+ //}
1875
+ if ($return) {
1876
+ return $chart_data;
1877
+ }
1878
+ }
1879
+ }
1880
+ echo $chart_data;
1881
+ die();
1882
+ }
1883
+ }
1884
+
1885
+ public function show_data_compact() {
1886
+ check_ajax_referer('gawd_admin_page_nonce', 'security');
1887
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
1888
+ $gawd_client = GAWD_google_client::get_instance();
1889
+ $start_date = isset($_POST["start_date"]) && $_POST["start_date"] != '' ? $_POST["start_date"] : date('Y-m-d', strtotime('-30 days'));
1890
+ $end_date = isset($_POST["end_date"]) && $_POST["end_date"] != '' ? $_POST["end_date"] : date('Y-m-d');
1891
+ $metric = isset($_POST["metric"]) ? $_POST["metric"] : 'sessions';
1892
+ $metric = is_array($metric) ? count($metric) > 1 ? implode(",", $metric) : $metric[0] : 'ga:' . $metric;
1893
+ $dimension = isset($_POST["dimension"]) ? $_POST["dimension"] : 'date';
1894
+ $timezone = isset($_POST["timezone"]) ? $_POST["timezone"] : 0;
1895
+ if (get_transient('gawd-compact-' . $gawd_client->get_profile_id() . '-' . $dimension . '-' . $start_date . '-' . $end_date)) {
1896
+ $chart_data = get_transient('gawd-compact-' . $gawd_client->get_profile_id() . '-' . $dimension . '-' . $start_date . '-' . $end_date);
1897
+ } else {
1898
+ $chart_data = $gawd_client->get_data_compact($metric, $dimension, $start_date, $end_date, $timezone);
1899
+ }
1900
+ echo $chart_data;
1901
+ die();
1902
+ }
1903
+
1904
+ public function show_page_post_data() {
1905
+ check_ajax_referer('gawd_admin_page_nonce', 'security');
1906
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
1907
+ $gawd_client = GAWD_google_client::get_instance();
1908
+ $start_date = isset($_POST["start_date"]) && $_POST["start_date"] != '' ? $_POST["start_date"] : date('Y-m-d', strtotime('-30 days'));
1909
+ $end_date = isset($_POST["end_date"]) && $_POST["end_date"] != '' ? $_POST["end_date"] : date('Y-m-d');
1910
+ $metric = isset($_POST["metric"]) ? $_POST["metric"] : 'ga:sessions';
1911
+ $metric = is_array($metric) ? count($metric) > 1 ? implode(",", $metric) : $metric[0] : $metric;
1912
+ $dimension = isset($_POST["dimension"]) ? $_POST["dimension"] : 'date';
1913
+ $timezone = isset($_POST["timezone"]) ? $_POST["timezone"] : 0;
1914
+ $filter = isset($_POST["filter"]) ? substr($_POST["filter"], 1) : '';
1915
+ $chart = isset($_POST["chart"]) ? $_POST["chart"] : '';
1916
+ $chart_data = get_transient('gawd-page-post-' . $gawd_client->get_profile_id() . '-' . $filter . '-' . '-' . $dimension . '-' . $start_date . '-' . $end_date. '-' . $chart);
1917
+ if (!$chart_data) {
1918
+ $chart_data = $gawd_client->get_post_page_data($metric, $dimension, $start_date, $end_date, $filter, $timezone, $chart);
1919
+ }
1920
+ echo $chart_data;
1921
+ die();
1922
+ }
1923
+
1924
+ public function get_realtime() {
1925
+ check_ajax_referer('gawd_admin_page_nonce', 'security');
1926
+ require_once(GAWD_DIR . '/admin/gawd_google_class.php');
1927
+ $gawd_client = GAWD_google_client::get_instance();
1928
+ $chart_data = get_transient('gawd-real' . $gawd_client->get_profile_id());
1929
+ if (!$chart_data) {
1930
+ $chart_data = $gawd_client->gawd_realtime_data();
1931
+ }
1932
+ return $chart_data;
1933
+ }
1934
+
1935
+ /**
1936
+ * Checks if the protocol is secure.
1937
+ *
1938
+ * @return boolean
1939
+ */
1940
+ public static function is_ssl() {
1941
+ if (isset($_SERVER['HTTPS'])) {
1942
+ if ('on' == strtolower($_SERVER['HTTPS']))
1943
+ return true;
1944
+ if ('1' == $_SERVER['HTTPS'])
1945
+ return true;
1946
+ } elseif (isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] )) {
1947
+ return true;
1948
+ }
1949
+ return false;
1950
+ }
1951
+
1952
+ /**
1953
+ * Returns the Singleton instance of this class.
1954
+ *
1955
+ * @return GAWD The Singleton instance.
1956
+ */
1957
+ public static function get_instance() {
1958
+ if (null === static::$instance) {
1959
+ static::$instance = new static();
1960
+ }
1961
+ return static::$instance;
1962
+ }
1963
+
1964
+ /**
1965
+ * Private clone method to prevent cloning of the instance of the
1966
+ * Singleton instance.
1967
+ *
1968
+ * @return void
1969
+ */
1970
+ private function __clone() {
1971
+
1972
+ }
1973
+
1974
+ /**
1975
+ * Private unserialize method to prevent unserializing of the Singleton
1976
+ * instance.
1977
+ *
1978
+ * @return void
1979
+ */
1980
+ private function __wakeup() {
1981
+
1982
+ }
1983
+
1984
+ public static function add_dashboard_menu() {
1985
+ $get_custom_reports = get_option('gawd_custom_reports');
1986
+ if (!$get_custom_reports) {
1987
+ $custom_report = array();
1988
+ } else {
1989
+ foreach ($get_custom_reports as $name => $report) {
1990
+ $custom_report['custom_report_' . $name] = __($name, "gawd");
1991
+ }
1992
+ }
1993
+ $tabs = array(
1994
+ "general" => array(
1995
+ "title" => __("Audience", "gawd"),
1996
+ "childs" => array(),
1997
+ "desc" => "Report of your website audience. Provides details about new and returning users of your website, sessions, bounces, pageviews and session durations."
1998
+ ),
1999
+ "realtime" => array(
2000
+ "title" => __("Real Time", "gawd"),
2001
+ "childs" => array(),
2002
+ "desc" => "Real Time statistics show the number of active users currently visiting your website pages."
2003
+ ),
2004
+ "demographics" => array(
2005
+ "title" => __("Demographics", "gawd"),
2006
+ "childs" => array(
2007
+ "userGender" => __("User Gender", "gawd"),
2008
+ "userAge" => __("User Age", "gawd")
2009
+ ),
2010
+ "desc" => "Demographics display tracking statistics of your website users based on their age and gender. "
2011
+
2012
+ ),
2013
+ "interests" => array(
2014
+ "title" => __("Interests", "gawd"),
2015
+ "childs" => array(
2016
+ "inMarket" => __("In-Market Segment", "gawd"),
2017
+ "affinityCategory" => __("Affinity Category", "gawd"),
2018
+ "otherCategory" => __("Other Category", "gawd")
2019
+ ),
2020
+ "desc" => "Provides tracking information about site users depending on Affinity Categories (e.g. Music Lovers or Mobile Enthusiasts), In-Market Segments (based on online product purchase interests) and Other Categories (most specific identification, for example, tennis lovers among Sports Fans)."
2021
+ ),
2022
+ "geo" => array(
2023
+ "title" => __("GEO", "gawd"),
2024
+ "childs" => array(
2025
+ "location" => __("Location", "gawd"),
2026
+ "language" => __("Language", "gawd")
2027
+ ),
2028
+ "desc" => "Geo-identifier report is built from interactions of location (countries, cities) and language of your website users."
2029
+ ),
2030
+ "behavior" => array(
2031
+ "title" => __("Behavior", "gawd"),
2032
+ "childs" => array(
2033
+ "behaviour" => __("New vs Returning", "gawd"),
2034
+ "engagement" => __("Engagement", "gawd")
2035
+ ),
2036
+ "desc" => "Compares number of New visitors and Returning users of your website in percents. You can check the duration of sessions with Engagement report."
2037
+ ),
2038
+ "technology" => array(
2039
+ "title" => __("Technology", "gawd"),
2040
+ "childs" => array(
2041
+ "os" => __("OS", "gawd"),
2042
+ "browser" => __("Browser", "gawd")
2043
+ ),
2044
+ "desc" => "Identifies tracking of the site based on operating systems and browsers visitors use."
2045
+ ),
2046
+ "mobile" => array(
2047
+ "title" => __("Mobile", "gawd"),
2048
+ "childs" => array(
2049
+ "device_overview" => __("Overview", "gawd"),
2050
+ "devices" => __("Devices", "gawd")
2051
+ ),
2052
+ "desc" => "Shows statistics of mobile and desktop devices visitors have used while interacting with your website."
2053
+ ),
2054
+ "custom" => array(
2055
+ "title" => __("Custom Dimensions", "gawd"),
2056
+ "childs" => array(),
2057
+ "desc" => "Set up Custom Dimensions based on Users, Post type, Author, Category, Publication date and Tags in Custom Dimensions page, and view their report in this tab."
2058
+ ),
2059
+ "trafficSource" => array(
2060
+ "title" => __("Traffic Source", "gawd"),
2061
+ "childs" => array(),
2062
+ "desc" => "Displays overall graph of traffic sources directing to your website."
2063
+ ),
2064
+ "adWords" => array(
2065
+ "title" => __("AdWords", "gawd"),
2066
+ "childs" => array(),
2067
+ "desc" => "If your website is registered on Google AdWords, you can link its Google Analytics to AdWords, and gather relevant tracking information with this report."
2068
+ ),
2069
+ /* "pagePath" => array(
2070
+ "title" => __("Pages", "gawd"),
2071
+ "childs" => array(),
2072
+ "desc" => "Pages report table will provide you information about Bounces, Entrances, Pageviews, Unique Pageviews, time spent on pages, Exits and Average page loading time."
2073
+ ), */
2074
+ "siteContent" => array(
2075
+ "title" => __("Site Content", "gawd"),
2076
+ "childs" => array(
2077
+ "pagePath" => __("All Pages", "gawd"),
2078
+ "landingPagePath" => __("Landing Pages", "gawd"),
2079
+ ),
2080
+ "desc" => "Pages report table will provide you information about Bounces, Entrances, Pageviews, Unique Pageviews, time spent on pages, Exits and Average page loading time."
2081
+ ),
2082
+ "siteSpeed" => array(
2083
+ "title" => __("Site Speed", "gawd"),
2084
+ "childs" => array(),
2085
+ "desc" => "Shows the average load time of your website users experienced during specified date range."
2086
+ ),
2087
+ "events" => array(
2088
+ "title" => __("Events", "gawd"),
2089
+ "childs" => array(
2090
+ "eventsLabel" => __("Events by Label", "gawd"),
2091
+ "eventsAction" => __("Events by Action", "gawd"),
2092
+ "eventsCategory" => __("Events by Category", "gawd")
2093
+ ),
2094
+ "desc" => "Displays the report based on Events you set up on Google Analytics of your website. Graphs are built based on Event Labels, Categories and Actions."
2095
+ ),
2096
+ "goals" => array(
2097
+ "title" => __("Goals", "gawd"),
2098
+ "childs" => array(),
2099
+ "desc" => "Set Goals from Goal Management and review their Google Analytics reports under this tab."
2100
+ ),
2101
+ "ecommerce" => array(
2102
+ "title" => __("Ecommerce", "gawd"),
2103
+ "childs" => array(
2104
+ "daysToTransaction" => __("TIme to Purchase", "gawd"),
2105
+ "transactionId" => __("Transaction ID", "gawd"),
2106
+ "sales_performance" => __("Sales Performance", "gawd"),
2107
+ "productSku" => __("Product Sku", "gawd"),
2108
+ "productCategory" => __("Product Category ", "gawd"),
2109
+ "productName" => __("Product Name", "gawd"),
2110
+ ),
2111
+ "desc" => "Check sales statistics of your website identified by revenues, transactions, products and performance."
2112
+ ),
2113
+ "adsense" => array(
2114
+ "title" => __("AdSense", "gawd"),
2115
+ "childs" => array(),
2116
+ "desc" => "Link your Google Analytics and AdSense accounts from Google Analytics Admin setting and keep track of AdSense tracking under this report."
2117
+ ),
2118
+ "customReport" => array(
2119
+ "title" => __("Custom Report", "gawd"),
2120
+ "childs" => $custom_report,
2121
+ "desc" => "Add Custom Reports from any metric and dimension in Custom Reports page, and view relevant Google Analytics tracking information in this tab."
2122
+ ),
2123
+ );
2124
+ update_option('gawd_menu_items', $tabs);
2125
+ }
2126
+ public function remove_zoom_message(){
2127
+ check_ajax_referer('gawd_admin_page_nonce', 'security');
2128
+ $got_it = isset($_REQUEST["got_it"]) ? sanitize_text_field($_REQUEST["got_it"]) : '';
2129
+ if($got_it != ''){
2130
+ add_option('gawd_zoom_message',$got_it);
2131
+ }
2132
+ }
2133
+ }
google-analytics-wd.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Plugin Name: WD Google Analytics
5
+ * Plugin URI: https://web-dorado.com/products/wordpress-google-analytics-plugin.html
6
+ * Description: WD Google Analytics is a user-friendly all in one plugin, which allows to manage and monitor your website analytics from WordPress dashboard.
7
+ * Version: 1.0.0
8
+ * Author: WebDorado
9
+ * Author URI: https://web-dorado.com
10
+ * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
11
+ */
12
+ if (!defined('GAWD_DIR')) {
13
+ define('GAWD_DIR', dirname(__FILE__));
14
+ }
15
+
16
+ if (!defined('GWD_NAME')) {
17
+ define('GWD_NAME', plugin_basename(dirname(__FILE__)));
18
+ }
19
+
20
+ if (!defined('GAWD_URL')) {
21
+ define('GAWD_URL', plugins_url(plugin_basename(dirname(__FILE__))));
22
+ }
23
+
24
+ if (!defined('GAWD_INC')) {
25
+ define('GAWD_INC', GAWD_URL . '/inc');
26
+ }
27
+
28
+ if (!defined('GAWD_VERSION')) {
29
+ define('GAWD_VERSION', '0.0.0');
30
+ }
31
+
32
+ require_once( 'gawd_class.php' );
33
+
34
+ add_action('plugins_loaded', array('GAWD', 'get_instance'));
35
+
36
+ register_activation_hook(__FILE__, array('GAWD', 'activate'));
37
+ register_deactivation_hook(__FILE__, array('GAWD', 'deactivate'));
google/Auth/Abstract.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Abstract class for the Authentication in the API client
24
+ * @author Chris Chabot <chabotc@google.com>
25
+ *
26
+ */
27
+ abstract class Google_Auth_Abstract
28
+ {
29
+ /**
30
+ * An utility function that first calls $this->auth->sign($request) and then
31
+ * executes makeRequest() on that signed request. Used for when a request
32
+ * should be authenticated
33
+ * @param Google_Http_Request $request
34
+ * @return Google_Http_Request $request
35
+ */
36
+ abstract public function authenticatedRequest(Google_Http_Request $request);
37
+ abstract public function sign(Google_Http_Request $request);
38
+ }
google/Auth/AppIdentity.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
26
+ require_once dirname(__FILE__) . '/../autoload.php';
27
+ }
28
+
29
+ /**
30
+ * Authentication via the Google App Engine App Identity service.
31
+ */
32
+ class Google_Auth_AppIdentity extends Google_Auth_Abstract
33
+ {
34
+ const CACHE_PREFIX = "Google_Auth_AppIdentity::";
35
+ private $client;
36
+ private $token = false;
37
+ private $tokenScopes = false;
38
+
39
+ public function __construct(Google_Client $client, $config = null)
40
+ {
41
+ $this->client = $client;
42
+ }
43
+
44
+ /**
45
+ * Retrieve an access token for the scopes supplied.
46
+ */
47
+ public function authenticateForScope($scopes)
48
+ {
49
+ if ($this->token && $this->tokenScopes == $scopes) {
50
+ return $this->token;
51
+ }
52
+
53
+ $cacheKey = self::CACHE_PREFIX;
54
+ if (is_string($scopes)) {
55
+ $cacheKey .= $scopes;
56
+ } else if (is_array($scopes)) {
57
+ $cacheKey .= implode(":", $scopes);
58
+ }
59
+
60
+ $this->token = $this->client->getCache()->get($cacheKey);
61
+ if (!$this->token) {
62
+ $this->retrieveToken($scopes, $cacheKey);
63
+ } else if ($this->token['expiration_time'] < time()) {
64
+ $this->client->getCache()->delete($cacheKey);
65
+ $this->retrieveToken($scopes, $cacheKey);
66
+ }
67
+
68
+ $this->tokenScopes = $scopes;
69
+ return $this->token;
70
+ }
71
+
72
+ /**
73
+ * Retrieve a new access token and store it in cache
74
+ * @param mixed $scopes
75
+ * @param string $cacheKey
76
+ */
77
+ private function retrieveToken($scopes, $cacheKey)
78
+ {
79
+ $this->token = AppIdentityService::getAccessToken($scopes);
80
+ if ($this->token) {
81
+ $this->client->getCache()->set(
82
+ $cacheKey,
83
+ $this->token
84
+ );
85
+ }
86
+ }
87
+
88
+ /**
89
+ * Perform an authenticated / signed apiHttpRequest.
90
+ * This function takes the apiHttpRequest, calls apiAuth->sign on it
91
+ * (which can modify the request in what ever way fits the auth mechanism)
92
+ * and then calls apiCurlIO::makeRequest on the signed request
93
+ *
94
+ * @param Google_Http_Request $request
95
+ * @return Google_Http_Request The resulting HTTP response including the
96
+ * responseHttpCode, responseHeaders and responseBody.
97
+ */
98
+ public function authenticatedRequest(Google_Http_Request $request)
99
+ {
100
+ $request = $this->sign($request);
101
+ return $this->client->getIo()->makeRequest($request);
102
+ }
103
+
104
+ public function sign(Google_Http_Request $request)
105
+ {
106
+ if (!$this->token) {
107
+ // No token, so nothing to do.
108
+ return $request;
109
+ }
110
+
111
+ $this->client->getLogger()->debug('App Identity authentication');
112
+
113
+ // Add the OAuth2 header to the request
114
+ $request->setRequestHeaders(
115
+ array('Authorization' => 'Bearer ' . $this->token['access_token'])
116
+ );
117
+
118
+ return $request;
119
+ }
120
+ }
google/Auth/AssertionCredentials.php ADDED
@@ -0,0 +1,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
+
18
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Credentials object used for OAuth 2.0 Signed JWT assertion grants.
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
+ }
google/Auth/ComputeEngine.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Authentication via built-in Compute Engine service accounts.
24
+ * The instance must be pre-configured with a service account
25
+ * and the appropriate scopes.
26
+ * @author Jonathan Parrott <jon.wayne.parrott@gmail.com>
27
+ */
28
+ class Google_Auth_ComputeEngine extends Google_Auth_Abstract
29
+ {
30
+ const METADATA_AUTH_URL =
31
+ 'http://metadata/computeMetadata/v1/instance/service-accounts/default/token';
32
+ private $client;
33
+ private $token;
34
+
35
+ public function __construct(Google_Client $client, $config = null)
36
+ {
37
+ $this->client = $client;
38
+ }
39
+
40
+ /**
41
+ * Perform an authenticated / signed apiHttpRequest.
42
+ * This function takes the apiHttpRequest, calls apiAuth->sign on it
43
+ * (which can modify the request in what ever way fits the auth mechanism)
44
+ * and then calls apiCurlIO::makeRequest on the signed request
45
+ *
46
+ * @param Google_Http_Request $request
47
+ * @return Google_Http_Request The resulting HTTP response including the
48
+ * responseHttpCode, responseHeaders and responseBody.
49
+ */
50
+ public function authenticatedRequest(Google_Http_Request $request)
51
+ {
52
+ $request = $this->sign($request);
53
+ return $this->client->getIo()->makeRequest($request);
54
+ }
55
+
56
+ /**
57
+ * @param string $token
58
+ * @throws Google_Auth_Exception
59
+ */
60
+ public function setAccessToken($token)
61
+ {
62
+ $token = json_decode($token, true);
63
+ if ($token == null) {
64
+ throw new Google_Auth_Exception('Could not json decode the token');
65
+ }
66
+ if (! isset($token['access_token'])) {
67
+ throw new Google_Auth_Exception("Invalid token format");
68
+ }
69
+ $token['created'] = time();
70
+ $this->token = $token;
71
+ }
72
+
73
+ public function getAccessToken()
74
+ {
75
+ return json_encode($this->token);
76
+ }
77
+
78
+ /**
79
+ * Acquires a new access token from the compute engine metadata server.
80
+ * @throws Google_Auth_Exception
81
+ */
82
+ public function acquireAccessToken()
83
+ {
84
+ $request = new Google_Http_Request(
85
+ self::METADATA_AUTH_URL,
86
+ 'GET',
87
+ array(
88
+ 'Metadata-Flavor' => 'Google'
89
+ )
90
+ );
91
+ $request->disableGzip();
92
+ $response = $this->client->getIo()->makeRequest($request);
93
+
94
+ if ($response->getResponseHttpCode() == 200) {
95
+ $this->setAccessToken($response->getResponseBody());
96
+ $this->token['created'] = time();
97
+ return $this->getAccessToken();
98
+ } else {
99
+ throw new Google_Auth_Exception(
100
+ sprintf(
101
+ "Error fetching service account access token, message: '%s'",
102
+ $response->getResponseBody()
103
+ ),
104
+ $response->getResponseHttpCode()
105
+ );
106
+ }
107
+ }
108
+
109
+ /**
110
+ * Include an accessToken in a given apiHttpRequest.
111
+ * @param Google_Http_Request $request
112
+ * @return Google_Http_Request
113
+ * @throws Google_Auth_Exception
114
+ */
115
+ public function sign(Google_Http_Request $request)
116
+ {
117
+ if ($this->isAccessTokenExpired()) {
118
+ $this->acquireAccessToken();
119
+ }
120
+
121
+ $this->client->getLogger()->debug('Compute engine service account authentication');
122
+
123
+ $request->setRequestHeaders(
124
+ array('Authorization' => 'Bearer ' . $this->token['access_token'])
125
+ );
126
+
127
+ return $request;
128
+ }
129
+
130
+ /**
131
+ * Returns if the access_token is expired.
132
+ * @return bool Returns True if the access_token is expired.
133
+ */
134
+ public function isAccessTokenExpired()
135
+ {
136
+ if (!$this->token || !isset($this->token['created'])) {
137
+ return true;
138
+ }
139
+
140
+ // If the token is set to expire in the next 30 seconds.
141
+ $expired = ($this->token['created']
142
+ + ($this->token['expires_in'] - 30)) < time();
143
+
144
+ return $expired;
145
+ }
146
+ }
google/Auth/Exception.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ class Google_Auth_Exception extends Google_Exception
23
+ {
24
+ }
google/Auth/LoginTicket.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Class to hold information about an authenticated login.
24
+ *
25
+ * @author Brian Eaton <beaton@google.com>
26
+ */
27
+ class Google_Auth_LoginTicket
28
+ {
29
+ const USER_ATTR = "sub";
30
+
31
+ // Information from id token envelope.
32
+ private $envelope;
33
+
34
+ // Information from id token payload.
35
+ private $payload;
36
+
37
+ /**
38
+ * Creates a user based on the supplied token.
39
+ *
40
+ * @param string $envelope Header from a verified authentication token.
41
+ * @param string $payload Information from a verified authentication token.
42
+ */
43
+ public function __construct($envelope, $payload)
44
+ {
45
+ $this->envelope = $envelope;
46
+ $this->payload = $payload;
47
+ }
48
+
49
+ /**
50
+ * Returns the numeric identifier for the user.
51
+ * @throws Google_Auth_Exception
52
+ * @return
53
+ */
54
+ public function getUserId()
55
+ {
56
+ if (array_key_exists(self::USER_ATTR, $this->payload)) {
57
+ return $this->payload[self::USER_ATTR];
58
+ }
59
+ throw new Google_Auth_Exception("No user_id in token");
60
+ }
61
+
62
+ /**
63
+ * Returns attributes from the login ticket. This can contain
64
+ * various information about the user session.
65
+ * @return array
66
+ */
67
+ public function getAttributes()
68
+ {
69
+ return array("envelope" => $this->envelope, "payload" => $this->payload);
70
+ }
71
+ }
google/Auth/OAuth2.php ADDED
@@ -0,0 +1,646 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Authentication class that deals with the OAuth 2 web-server authentication flow
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; // five minutes in seconds
32
+ const AUTH_TOKEN_LIFETIME_SECS = 300; // five minutes in seconds
33
+ const MAX_TOKEN_LIFETIME_SECS = 86400; // one day in seconds
34
+ const OAUTH2_ISSUER = 'accounts.google.com';
35
+ const OAUTH2_ISSUER_HTTPS = 'https://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
+ * @param boolean $crossClient
83
+ * @throws Google_Auth_Exception
84
+ * @return string
85
+ */
86
+ public function authenticate($code, $crossClient = false)
87
+ {
88
+ if (strlen($code) == 0) {
89
+ throw new Google_Auth_Exception("Invalid code");
90
+ }
91
+
92
+ $arguments = array(
93
+ 'code' => $code,
94
+ 'grant_type' => 'authorization_code',
95
+ 'client_id' => $this->client->getClassConfig($this, 'client_id'),
96
+ 'client_secret' => $this->client->getClassConfig($this, 'client_secret')
97
+ );
98
+
99
+ if ($crossClient !== true) {
100
+ $arguments['redirect_uri'] = $this->client->getClassConfig($this, 'redirect_uri');
101
+ }
102
+
103
+ // We got here from the redirect from a successful authorization grant,
104
+ // fetch the access token
105
+ $request = new Google_Http_Request(
106
+ self::OAUTH2_TOKEN_URI,
107
+ 'POST',
108
+ array(),
109
+ $arguments
110
+ );
111
+ $request->disableGzip();
112
+ $response = $this->client->getIo()->makeRequest($request);
113
+
114
+ if ($response->getResponseHttpCode() == 200) {
115
+ $this->setAccessToken($response->getResponseBody());
116
+ $this->token['created'] = time();
117
+ return $this->getAccessToken();
118
+ } else {
119
+ $decodedResponse = json_decode($response->getResponseBody(), true);
120
+ if ($decodedResponse != null && $decodedResponse['error']) {
121
+ $errorText = $decodedResponse['error'];
122
+ if (isset($decodedResponse['error_description'])) {
123
+ $errorText .= ": " . $decodedResponse['error_description'];
124
+ }
125
+ }
126
+ throw new Google_Auth_Exception(
127
+ sprintf(
128
+ "Error fetching OAuth2 access token, message: '%s'",
129
+ $errorText
130
+ ),
131
+ $response->getResponseHttpCode()
132
+ );
133
+ }
134
+ }
135
+
136
+ /**
137
+ * Create a URL to obtain user authorization.
138
+ * The authorization endpoint allows the user to first
139
+ * authenticate, and then grant/deny the access request.
140
+ * @param string $scope The scope is expressed as a list of space-delimited strings.
141
+ * @return string
142
+ */
143
+ public function createAuthUrl($scope)
144
+ {
145
+ $params = array(
146
+ 'response_type' => 'code',
147
+ 'redirect_uri' => $this->client->getClassConfig($this, 'redirect_uri'),
148
+ 'client_id' => $this->client->getClassConfig($this, 'client_id'),
149
+ 'scope' => $scope,
150
+ 'access_type' => $this->client->getClassConfig($this, 'access_type'),
151
+ );
152
+
153
+ // Prefer prompt to approval prompt.
154
+ if ($this->client->getClassConfig($this, 'prompt')) {
155
+ $params = $this->maybeAddParam($params, 'prompt');
156
+ } else {
157
+ $params = $this->maybeAddParam($params, 'approval_prompt');
158
+ }
159
+ $params = $this->maybeAddParam($params, 'login_hint');
160
+ $params = $this->maybeAddParam($params, 'hd');
161
+ $params = $this->maybeAddParam($params, 'openid.realm');
162
+ $params = $this->maybeAddParam($params, 'include_granted_scopes');
163
+
164
+ // If the list of scopes contains plus.login, add request_visible_actions
165
+ // to auth URL.
166
+ $rva = $this->client->getClassConfig($this, 'request_visible_actions');
167
+ if (strpos($scope, 'plus.login') && strlen($rva) > 0) {
168
+ $params['request_visible_actions'] = $rva;
169
+ }
170
+
171
+ if (isset($this->state)) {
172
+ $params['state'] = $this->state;
173
+ }
174
+
175
+ return self::OAUTH2_AUTH_URL . "?" . http_build_query($params, '', '&');
176
+ }
177
+
178
+ /**
179
+ * @param string $token
180
+ * @throws Google_Auth_Exception
181
+ */
182
+ public function setAccessToken($token)
183
+ {
184
+ $token = json_decode($token, true);
185
+ if ($token == null) {
186
+ throw new Google_Auth_Exception('Could not json decode the token');
187
+ }
188
+ if (! isset($token['access_token'])) {
189
+ throw new Google_Auth_Exception("Invalid token format");
190
+ }
191
+ $this->token = $token;
192
+ }
193
+
194
+ public function getAccessToken()
195
+ {
196
+ return json_encode($this->token);
197
+ }
198
+
199
+ public function getRefreshToken()
200
+ {
201
+ if (array_key_exists('refresh_token', $this->token)) {
202
+ return $this->token['refresh_token'];
203
+ } else {
204
+ return null;
205
+ }
206
+ }
207
+
208
+ public function setState($state)
209
+ {
210
+ $this->state = $state;
211
+ }
212
+
213
+ public function setAssertionCredentials(Google_Auth_AssertionCredentials $creds)
214
+ {
215
+ $this->assertionCredentials = $creds;
216
+ }
217
+
218
+ /**
219
+ * Include an accessToken in a given apiHttpRequest.
220
+ * @param Google_Http_Request $request
221
+ * @return Google_Http_Request
222
+ * @throws Google_Auth_Exception
223
+ */
224
+ public function sign(Google_Http_Request $request)
225
+ {
226
+ // add the developer key to the request before signing it
227
+ if ($this->client->getClassConfig($this, 'developer_key')) {
228
+ $request->setQueryParam('key', $this->client->getClassConfig($this, 'developer_key'));
229
+ }
230
+
231
+ // Cannot sign the request without an OAuth access token.
232
+ if (null == $this->token && null == $this->assertionCredentials) {
233
+ return $request;
234
+ }
235
+
236
+ // Check if the token is set to expire in the next 30 seconds
237
+ // (or has already expired).
238
+ if ($this->isAccessTokenExpired()) {
239
+ if ($this->assertionCredentials) {
240
+ $this->refreshTokenWithAssertion();
241
+ } else {
242
+ $this->client->getLogger()->debug('OAuth2 access token expired');
243
+ if (! array_key_exists('refresh_token', $this->token)) {
244
+ $error = "The OAuth 2.0 access token has expired,"
245
+ ." and a refresh token is not available. Refresh tokens"
246
+ ." are not returned for responses that were auto-approved.";
247
+
248
+ $this->client->getLogger()->error($error);
249
+ throw new Google_Auth_Exception($error);
250
+ }
251
+ $this->refreshToken($this->token['refresh_token']);
252
+ }
253
+ }
254
+
255
+ $this->client->getLogger()->debug('OAuth2 authentication');
256
+
257
+ // Add the OAuth2 header to the request
258
+ $request->setRequestHeaders(
259
+ array('Authorization' => 'Bearer ' . $this->token['access_token'])
260
+ );
261
+
262
+ return $request;
263
+ }
264
+
265
+ /**
266
+ * Fetches a fresh access token with the given refresh token.
267
+ * @param string $refreshToken
268
+ * @return void
269
+ */
270
+ public function refreshToken($refreshToken)
271
+ {
272
+ $this->refreshTokenRequest(
273
+ array(
274
+ 'client_id' => $this->client->getClassConfig($this, 'client_id'),
275
+ 'client_secret' => $this->client->getClassConfig($this, 'client_secret'),
276
+ 'refresh_token' => $refreshToken,
277
+ 'grant_type' => 'refresh_token'
278
+ )
279
+ );
280
+ }
281
+
282
+ /**
283
+ * Fetches a fresh access token with a given assertion token.
284
+ * @param Google_Auth_AssertionCredentials $assertionCredentials optional.
285
+ * @return void
286
+ */
287
+ public function refreshTokenWithAssertion($assertionCredentials = null)
288
+ {
289
+ if (!$assertionCredentials) {
290
+ $assertionCredentials = $this->assertionCredentials;
291
+ }
292
+
293
+ $cacheKey = $assertionCredentials->getCacheKey();
294
+
295
+ if ($cacheKey) {
296
+ // We can check whether we have a token available in the
297
+ // cache. If it is expired, we can retrieve a new one from
298
+ // the assertion.
299
+ $token = $this->client->getCache()->get($cacheKey);
300
+ if ($token) {
301
+ $this->setAccessToken($token);
302
+ }
303
+ if (!$this->isAccessTokenExpired()) {
304
+ return;
305
+ }
306
+ }
307
+
308
+ $this->client->getLogger()->debug('OAuth2 access token expired');
309
+ $this->refreshTokenRequest(
310
+ array(
311
+ 'grant_type' => 'assertion',
312
+ 'assertion_type' => $assertionCredentials->assertionType,
313
+ 'assertion' => $assertionCredentials->generateAssertion(),
314
+ )
315
+ );
316
+
317
+ if ($cacheKey) {
318
+ // Attempt to cache the token.
319
+ $this->client->getCache()->set(
320
+ $cacheKey,
321
+ $this->getAccessToken()
322
+ );
323
+ }
324
+ }
325
+
326
+ private function refreshTokenRequest($params)
327
+ {
328
+ if (isset($params['assertion'])) {
329
+ $this->client->getLogger()->info(
330
+ 'OAuth2 access token refresh with Signed JWT assertion grants.'
331
+ );
332
+ } else {
333
+ $this->client->getLogger()->info('OAuth2 access token refresh');
334
+ }
335
+
336
+ $http = new Google_Http_Request(
337
+ self::OAUTH2_TOKEN_URI,
338
+ 'POST',
339
+ array(),
340
+ $params
341
+ );
342
+ $http->disableGzip();
343
+ $request = $this->client->getIo()->makeRequest($http);
344
+
345
+ $code = $request->getResponseHttpCode();
346
+ $body = $request->getResponseBody();
347
+ if (200 == $code) {
348
+ $token = json_decode($body, true);
349
+ if ($token == null) {
350
+ throw new Google_Auth_Exception("Could not json decode the access token");
351
+ }
352
+
353
+ if (! isset($token['access_token']) || ! isset($token['expires_in'])) {
354
+ throw new Google_Auth_Exception("Invalid token format");
355
+ }
356
+
357
+ if (isset($token['id_token'])) {
358
+ $this->token['id_token'] = $token['id_token'];
359
+ }
360
+ $this->token['access_token'] = $token['access_token'];
361
+ $this->token['expires_in'] = $token['expires_in'];
362
+ $this->token['created'] = time();
363
+ } else {
364
+ throw new Google_Auth_Exception("Error refreshing the OAuth2 token, message: '$body'", $code);
365
+ }
366
+ }
367
+
368
+ /**
369
+ * Revoke an OAuth2 access token or refresh token. This method will revoke the current access
370
+ * token, if a token isn't provided.
371
+ * @throws Google_Auth_Exception
372
+ * @param string|null $token The token (access token or a refresh token) that should be revoked.
373
+ * @return boolean Returns True if the revocation was successful, otherwise False.
374
+ */
375
+ public function revokeToken($token = null)
376
+ {
377
+ if (!$token) {
378
+ if (!$this->token) {
379
+ // Not initialized, no token to actually revoke
380
+ return false;
381
+ } elseif (array_key_exists('refresh_token', $this->token)) {
382
+ $token = $this->token['refresh_token'];
383
+ } else {
384
+ $token = $this->token['access_token'];
385
+ }
386
+ }
387
+ $request = new Google_Http_Request(
388
+ self::OAUTH2_REVOKE_URI,
389
+ 'POST',
390
+ array(),
391
+ "token=$token"
392
+ );
393
+ $request->disableGzip();
394
+ $response = $this->client->getIo()->makeRequest($request);
395
+ $code = $response->getResponseHttpCode();
396
+ if ($code == 200) {
397
+ $this->token = null;
398
+ return true;
399
+ }
400
+
401
+ return false;
402
+ }
403
+
404
+ /**
405
+ * Returns if the access_token is expired.
406
+ * @return bool Returns True if the access_token is expired.
407
+ */
408
+ public function isAccessTokenExpired()
409
+ {
410
+ if (!$this->token || !isset($this->token['created'])) {
411
+ return true;
412
+ }
413
+
414
+ // If the token is set to expire in the next 30 seconds.
415
+ $expired = ($this->token['created']
416
+ + ($this->token['expires_in'] - 30)) < time();
417
+
418
+ return $expired;
419
+ }
420
+
421
+ // Gets federated sign-on certificates to use for verifying identity tokens.
422
+ // Returns certs as array structure, where keys are key ids, and values
423
+ // are PEM encoded certificates.
424
+ private function getFederatedSignOnCerts()
425
+ {
426
+ return $this->retrieveCertsFromLocation(
427
+ $this->client->getClassConfig($this, 'federated_signon_certs_url')
428
+ );
429
+ }
430
+
431
+ /**
432
+ * Retrieve and cache a certificates file.
433
+ *
434
+ * @param $url string location
435
+ * @throws Google_Auth_Exception
436
+ * @return array certificates
437
+ */
438
+ public function retrieveCertsFromLocation($url)
439
+ {
440
+ // If we're retrieving a local file, just grab it.
441
+ if ("http" != substr($url, 0, 4)) {
442
+ $file = file_get_contents($url);
443
+ if ($file) {
444
+ return json_decode($file, true);
445
+ } else {
446
+ throw new Google_Auth_Exception(
447
+ "Failed to retrieve verification certificates: '" .
448
+ $url . "'."
449
+ );
450
+ }
451
+ }
452
+
453
+ // This relies on makeRequest caching certificate responses.
454
+ $request = $this->client->getIo()->makeRequest(
455
+ new Google_Http_Request(
456
+ $url
457
+ )
458
+ );
459
+ if ($request->getResponseHttpCode() == 200) {
460
+ $certs = json_decode($request->getResponseBody(), true);
461
+ if ($certs) {
462
+ return $certs;
463
+ }
464
+ }
465
+ throw new Google_Auth_Exception(
466
+ "Failed to retrieve verification certificates: '" .
467
+ $request->getResponseBody() . "'.",
468
+ $request->getResponseHttpCode()
469
+ );
470
+ }
471
+
472
+ /**
473
+ * Verifies an id token and returns the authenticated apiLoginTicket.
474
+ * Throws an exception if the id token is not valid.
475
+ * The audience parameter can be used to control which id tokens are
476
+ * accepted. By default, the id token must have been issued to this OAuth2 client.
477
+ *
478
+ * @param $id_token
479
+ * @param $audience
480
+ * @return Google_Auth_LoginTicket
481
+ */
482
+ public function verifyIdToken($id_token = null, $audience = null)
483
+ {
484
+ if (!$id_token) {
485
+ $id_token = $this->token['id_token'];
486
+ }
487
+ $certs = $this->getFederatedSignonCerts();
488
+ if (!$audience) {
489
+ $audience = $this->client->getClassConfig($this, 'client_id');
490
+ }
491
+
492
+ return $this->verifySignedJwtWithCerts(
493
+ $id_token,
494
+ $certs,
495
+ $audience,
496
+ array(self::OAUTH2_ISSUER, self::OAUTH2_ISSUER_HTTPS)
497
+ );
498
+ }
499
+
500
+ /**
501
+ * Verifies the id token, returns the verified token contents.
502
+ *
503
+ * @param $jwt string the token
504
+ * @param $certs array of certificates
505
+ * @param $required_audience string the expected consumer of the token
506
+ * @param [$issuer] the expected issues, defaults to Google
507
+ * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS
508
+ * @throws Google_Auth_Exception
509
+ * @return mixed token information if valid, false if not
510
+ */
511
+ public function verifySignedJwtWithCerts(
512
+ $jwt,
513
+ $certs,
514
+ $required_audience,
515
+ $issuer = null,
516
+ $max_expiry = null
517
+ ) {
518
+ if (!$max_expiry) {
519
+ // Set the maximum time we will accept a token for.
520
+ $max_expiry = self::MAX_TOKEN_LIFETIME_SECS;
521
+ }
522
+
523
+ $segments = explode(".", $jwt);
524
+ if (count($segments) != 3) {
525
+ throw new Google_Auth_Exception("Wrong number of segments in token: $jwt");
526
+ }
527
+ $signed = $segments[0] . "." . $segments[1];
528
+ $signature = Google_Utils::urlSafeB64Decode($segments[2]);
529
+
530
+ // Parse envelope.
531
+ $envelope = json_decode(Google_Utils::urlSafeB64Decode($segments[0]), true);
532
+ if (!$envelope) {
533
+ throw new Google_Auth_Exception("Can't parse token envelope: " . $segments[0]);
534
+ }
535
+
536
+ // Parse token
537
+ $json_body = Google_Utils::urlSafeB64Decode($segments[1]);
538
+ $payload = json_decode($json_body, true);
539
+ if (!$payload) {
540
+ throw new Google_Auth_Exception("Can't parse token payload: " . $segments[1]);
541
+ }
542
+
543
+ // Check signature
544
+ $verified = false;
545
+ foreach ($certs as $keyName => $pem) {
546
+ $public_key = new Google_Verifier_Pem($pem);
547
+ if ($public_key->verify($signed, $signature)) {
548
+ $verified = true;
549
+ break;
550
+ }
551
+ }
552
+
553
+ if (!$verified) {
554
+ throw new Google_Auth_Exception("Invalid token signature: $jwt");
555
+ }
556
+
557
+ // Check issued-at timestamp
558
+ $iat = 0;
559
+ if (array_key_exists("iat", $payload)) {
560
+ $iat = $payload["iat"];
561
+ }
562
+ if (!$iat) {
563
+ throw new Google_Auth_Exception("No issue time in token: $json_body");
564
+ }
565
+ $earliest = $iat - self::CLOCK_SKEW_SECS;
566
+
567
+ // Check expiration timestamp
568
+ $now = time();
569
+ $exp = 0;
570
+ if (array_key_exists("exp", $payload)) {
571
+ $exp = $payload["exp"];
572
+ }
573
+ if (!$exp) {
574
+ throw new Google_Auth_Exception("No expiration time in token: $json_body");
575
+ }
576
+ if ($exp >= $now + $max_expiry) {
577
+ throw new Google_Auth_Exception(
578
+ sprintf("Expiration time too far in future: %s", $json_body)
579
+ );
580
+ }
581
+
582
+ $latest = $exp + self::CLOCK_SKEW_SECS;
583
+ if ($now < $earliest) {
584
+ throw new Google_Auth_Exception(
585
+ sprintf(
586
+ "Token used too early, %s < %s: %s",
587
+ $now,
588
+ $earliest,
589
+ $json_body
590
+ )
591
+ );
592
+ }
593
+ if ($now > $latest) {
594
+ throw new Google_Auth_Exception(
595
+ sprintf(
596
+ "Token used too late, %s > %s: %s",
597
+ $now,
598
+ $latest,
599
+ $json_body
600
+ )
601
+ );
602
+ }
603
+
604
+ // support HTTP and HTTPS issuers
605
+ // @see https://developers.google.com/identity/sign-in/web/backend-auth
606
+ $iss = $payload['iss'];
607
+ if ($issuer && !in_array($iss, (array) $issuer)) {
608
+ throw new Google_Auth_Exception(
609
+ sprintf(
610
+ "Invalid issuer, %s not in %s: %s",
611
+ $iss,
612
+ "[".implode(",", (array) $issuer)."]",
613
+ $json_body
614
+ )
615
+ );
616
+ }
617
+
618
+ // Check audience
619
+ $aud = $payload["aud"];
620
+ if ($aud != $required_audience) {
621
+ throw new Google_Auth_Exception(
622
+ sprintf(
623
+ "Wrong recipient, %s != %s:",
624
+ $aud,
625
+ $required_audience,
626
+ $json_body
627
+ )
628
+ );
629
+ }
630
+
631
+ // All good.
632
+ return new Google_Auth_LoginTicket($envelope, $payload);
633
+ }
634
+
635
+ /**
636
+ * Add a parameter to the auth params if not empty string.
637
+ */
638
+ private function maybeAddParam($params, $name)
639
+ {
640
+ $param = $this->client->getClassConfig($this, $name);
641
+ if ($param != '') {
642
+ $params[$name] = $param;
643
+ }
644
+ return $params;
645
+ }
646
+ }
google/Auth/Simple.php ADDED
@@ -0,0 +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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Simple API access implementation. Can either be used to make requests
24
+ * completely unauthenticated, or by using a Simple API Access developer
25
+ * key.
26
+ */
27
+ class Google_Auth_Simple extends Google_Auth_Abstract
28
+ {
29
+ private $client;
30
+
31
+ public function __construct(Google_Client $client, $config = null)
32
+ {
33
+ $this->client = $client;
34
+ }
35
+
36
+ /**
37
+ * Perform an authenticated / signed apiHttpRequest.
38
+ * This function takes the apiHttpRequest, calls apiAuth->sign on it
39
+ * (which can modify the request in what ever way fits the auth mechanism)
40
+ * and then calls apiCurlIO::makeRequest on the signed request
41
+ *
42
+ * @param Google_Http_Request $request
43
+ * @return Google_Http_Request The resulting HTTP response including the
44
+ * responseHttpCode, responseHeaders and responseBody.
45
+ */
46
+ public function authenticatedRequest(Google_Http_Request $request)
47
+ {
48
+ $request = $this->sign($request);
49
+ return $this->io->makeRequest($request);
50
+ }
51
+
52
+ public function sign(Google_Http_Request $request)
53
+ {
54
+ $key = $this->client->getClassConfig($this, 'developer_key');
55
+ if ($key) {
56
+ $this->client->getLogger()->debug(
57
+ 'Simple API Access developer key authentication'
58
+ );
59
+ $request->setQueryParam('key', $key);
60
+ }
61
+ return $request;
62
+ }
63
+ }
google/Cache/Abstract.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ }
google/Cache/Apc.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * A persistent storage class based on the APC cache, which is not
24
+ * really very persistent, as soon as you restart your web server
25
+ * the storage will be wiped, however for debugging and/or speed
26
+ * it can be useful, and cache is a lot cheaper then storage.
27
+ *
28
+ * @author Chris Chabot <chabotc@google.com>
29
+ */
30
+ class Google_Cache_Apc extends Google_Cache_Abstract
31
+ {
32
+ /**
33
+ * @var Google_Client the current client
34
+ */
35
+ private $client;
36
+
37
+ public function __construct(Google_Client $client)
38
+ {
39
+ if (! function_exists('apc_add') ) {
40
+ $error = "Apc functions not available";
41
+
42
+ $client->getLogger()->error($error);
43
+ throw new Google_Cache_Exception($error);
44
+ }
45
+
46
+ $this->client = $client;
47
+ }
48
+
49
+ /**
50
+ * @inheritDoc
51
+ */
52
+ public function get($key, $expiration = false)
53
+ {
54
+ $ret = apc_fetch($key);
55
+ if ($ret === false) {
56
+ $this->client->getLogger()->debug(
57
+ 'APC cache miss',
58
+ array('key' => $key)
59
+ );
60
+ return false;
61
+ }
62
+ if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) {
63
+ $this->client->getLogger()->debug(
64
+ 'APC cache miss (expired)',
65
+ array('key' => $key, 'var' => $ret)
66
+ );
67
+ $this->delete($key);
68
+ return false;
69
+ }
70
+
71
+ $this->client->getLogger()->debug(
72
+ 'APC cache hit',
73
+ array('key' => $key, 'var' => $ret)
74
+ );
75
+
76
+ return $ret['data'];
77
+ }
78
+
79
+ /**
80
+ * @inheritDoc
81
+ */
82
+ public function set($key, $value)
83
+ {
84
+ $var = array('time' => time(), 'data' => $value);
85
+ $rc = apc_store($key, $var);
86
+
87
+ if ($rc == false) {
88
+ $this->client->getLogger()->error(
89
+ 'APC cache set failed',
90
+ array('key' => $key, 'var' => $var)
91
+ );
92
+ throw new Google_Cache_Exception("Couldn't store data");
93
+ }
94
+
95
+ $this->client->getLogger()->debug(
96
+ 'APC cache set',
97
+ array('key' => $key, 'var' => $var)
98
+ );
99
+ }
100
+
101
+ /**
102
+ * @inheritDoc
103
+ * @param String $key
104
+ */
105
+ public function delete($key)
106
+ {
107
+ $this->client->getLogger()->debug(
108
+ 'APC cache delete',
109
+ array('key' => $key)
110
+ );
111
+ apc_delete($key);
112
+ }
113
+ }
google/Cache/Exception.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ class Google_Cache_Exception extends Google_Exception
23
+ {
24
+ }
google/Cache/File.php ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /*
23
+ * This class implements a basic on disk storage. While that does
24
+ * work quite well it's not the most elegant and scalable solution.
25
+ * It will also get you into a heap of trouble when you try to run
26
+ * this in a clustered environment.
27
+ *
28
+ * @author Chris Chabot <chabotc@google.com>
29
+ */
30
+ class Google_Cache_File extends Google_Cache_Abstract
31
+ {
32
+ const MAX_LOCK_RETRIES = 10;
33
+ private $path;
34
+ private $fh;
35
+
36
+ /**
37
+ * @var Google_Client the current client
38
+ */
39
+ private $client;
40
+
41
+ public function __construct(Google_Client $client)
42
+ {
43
+ $this->client = $client;
44
+ $this->path = $this->client->getClassConfig($this, 'directory');
45
+ }
46
+
47
+ public function get($key, $expiration = false)
48
+ {
49
+ $storageFile = $this->getCacheFile($key);
50
+ $data = false;
51
+
52
+ if (!file_exists($storageFile)) {
53
+ $this->client->getLogger()->debug(
54
+ 'File cache miss',
55
+ array('key' => $key, 'file' => $storageFile)
56
+ );
57
+ return false;
58
+ }
59
+
60
+ if ($expiration) {
61
+ $mtime = filemtime($storageFile);
62
+ if ((time() - $mtime) >= $expiration) {
63
+ $this->client->getLogger()->debug(
64
+ 'File cache miss (expired)',
65
+ array('key' => $key, 'file' => $storageFile)
66
+ );
67
+ $this->delete($key);
68
+ return false;
69
+ }
70
+ }
71
+
72
+ if ($this->acquireReadLock($storageFile)) {
73
+ if (filesize($storageFile) > 0) {
74
+ $data = fread($this->fh, filesize($storageFile));
75
+ $data = unserialize($data);
76
+ } else {
77
+ $this->client->getLogger()->debug(
78
+ 'Cache file was empty',
79
+ array('file' => $storageFile)
80
+ );
81
+ }
82
+ $this->unlock($storageFile);
83
+ }
84
+
85
+ $this->client->getLogger()->debug(
86
+ 'File cache hit',
87
+ array('key' => $key, 'file' => $storageFile, 'var' => $data)
88
+ );
89
+
90
+ return $data;
91
+ }
92
+
93
+ public function set($key, $value)
94
+ {
95
+ $storageFile = $this->getWriteableCacheFile($key);
96
+ if ($this->acquireWriteLock($storageFile)) {
97
+ // We serialize the whole request object, since we don't only want the
98
+ // responseContent but also the postBody used, headers, size, etc.
99
+ $data = serialize($value);
100
+ $result = fwrite($this->fh, $data);
101
+ $this->unlock($storageFile);
102
+
103
+ $this->client->getLogger()->debug(
104
+ 'File cache set',
105
+ array('key' => $key, 'file' => $storageFile, 'var' => $value)
106
+ );
107
+ } else {
108
+ $this->client->getLogger()->notice(
109
+ 'File cache set failed',
110
+ array('key' => $key, 'file' => $storageFile)
111
+ );
112
+ }
113
+ }
114
+
115
+ public function delete($key)
116
+ {
117
+ $file = $this->getCacheFile($key);
118
+ if (file_exists($file) && !unlink($file)) {
119
+ $this->client->getLogger()->error(
120
+ 'File cache delete failed',
121
+ array('key' => $key, 'file' => $file)
122
+ );
123
+ throw new Google_Cache_Exception("Cache file could not be deleted");
124
+ }
125
+
126
+ $this->client->getLogger()->debug(
127
+ 'File cache delete',
128
+ array('key' => $key, 'file' => $file)
129
+ );
130
+ }
131
+
132
+ private function getWriteableCacheFile($file)
133
+ {
134
+ return $this->getCacheFile($file, true);
135
+ }
136
+
137
+ private function getCacheFile($file, $forWrite = false)
138
+ {
139
+ return $this->getCacheDir($file, $forWrite) . '/' . md5($file);
140
+ }
141
+
142
+ private function getCacheDir($file, $forWrite)
143
+ {
144
+ // use the first 2 characters of the hash as a directory prefix
145
+ // this should prevent slowdowns due to huge directory listings
146
+ // and thus give some basic amount of scalability
147
+ $storageDir = $this->path . '/' . substr(md5($file), 0, 2);
148
+ if ($forWrite && ! is_dir($storageDir)) {
149
+ if (! mkdir($storageDir, 0700, true)) {
150
+ $this->client->getLogger()->error(
151
+ 'File cache creation failed',
152
+ array('dir' => $storageDir)
153
+ );
154
+ throw new Google_Cache_Exception("Could not create storage directory: $storageDir");
155
+ }
156
+ }
157
+ return $storageDir;
158
+ }
159
+
160
+ private function acquireReadLock($storageFile)
161
+ {
162
+ return $this->acquireLock(LOCK_SH, $storageFile);
163
+ }
164
+
165
+ private function acquireWriteLock($storageFile)
166
+ {
167
+ $rc = $this->acquireLock(LOCK_EX, $storageFile);
168
+ if (!$rc) {
169
+ $this->client->getLogger()->notice(
170
+ 'File cache write lock failed',
171
+ array('file' => $storageFile)
172
+ );
173
+ $this->delete($storageFile);
174
+ }
175
+ return $rc;
176
+ }
177
+
178
+ private function acquireLock($type, $storageFile)
179
+ {
180
+ $mode = $type == LOCK_EX ? "w" : "r";
181
+ $this->fh = fopen($storageFile, $mode);
182
+ if (!$this->fh) {
183
+ $this->client->getLogger()->error(
184
+ 'Failed to open file during lock acquisition',
185
+ array('file' => $storageFile)
186
+ );
187
+ return false;
188
+ }
189
+ if ($type == LOCK_EX) {
190
+ chmod($storageFile, 0600);
191
+ }
192
+ $count = 0;
193
+ while (!flock($this->fh, $type | LOCK_NB)) {
194
+ // Sleep for 10ms.
195
+ usleep(10000);
196
+ if (++$count < self::MAX_LOCK_RETRIES) {
197
+ return false;
198
+ }
199
+ }
200
+ return true;
201
+ }
202
+
203
+ public function unlock($storageFile)
204
+ {
205
+ if ($this->fh) {
206
+ flock($this->fh, LOCK_UN);
207
+ }
208
+ }
209
+ }
google/Cache/Memcache.php ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * A persistent storage class based on the memcache, which is not
24
+ * really very persistent, as soon as you restart your memcache daemon
25
+ * the storage will be wiped.
26
+ *
27
+ * Will use either the memcache or memcached extensions, preferring
28
+ * memcached.
29
+ *
30
+ * @author Chris Chabot <chabotc@google.com>
31
+ */
32
+ class Google_Cache_Memcache extends Google_Cache_Abstract
33
+ {
34
+ private $connection = false;
35
+ private $mc = false;
36
+ private $host;
37
+ private $port;
38
+
39
+ /**
40
+ * @var Google_Client the current client
41
+ */
42
+ private $client;
43
+
44
+ public function __construct(Google_Client $client)
45
+ {
46
+ if (!function_exists('memcache_connect') && !class_exists("Memcached")) {
47
+ $error = "Memcache functions not available";
48
+
49
+ $client->getLogger()->error($error);
50
+ throw new Google_Cache_Exception($error);
51
+ }
52
+
53
+ $this->client = $client;
54
+
55
+ if ($client->isAppEngine()) {
56
+ // No credentials needed for GAE.
57
+ $this->mc = new Memcached();
58
+ $this->connection = true;
59
+ } else {
60
+ $this->host = $client->getClassConfig($this, 'host');
61
+ $this->port = $client->getClassConfig($this, 'port');
62
+ if (empty($this->host) || (empty($this->port) && (string) $this->port != "0")) {
63
+ $error = "You need to supply a valid memcache host and port";
64
+
65
+ $client->getLogger()->error($error);
66
+ throw new Google_Cache_Exception($error);
67
+ }
68
+ }
69
+ }
70
+
71
+ /**
72
+ * @inheritDoc
73
+ */
74
+ public function get($key, $expiration = false)
75
+ {
76
+ $this->connect();
77
+ $ret = false;
78
+ if ($this->mc) {
79
+ $ret = $this->mc->get($key);
80
+ } else {
81
+ $ret = memcache_get($this->connection, $key);
82
+ }
83
+ if ($ret === false) {
84
+ $this->client->getLogger()->debug(
85
+ 'Memcache cache miss',
86
+ array('key' => $key)
87
+ );
88
+ return false;
89
+ }
90
+ if (is_numeric($expiration) && (time() - $ret['time'] > $expiration)) {
91
+ $this->client->getLogger()->debug(
92
+ 'Memcache cache miss (expired)',
93
+ array('key' => $key, 'var' => $ret)
94
+ );
95
+ $this->delete($key);
96
+ return false;
97
+ }
98
+
99
+ $this->client->getLogger()->debug(
100
+ 'Memcache cache hit',
101
+ array('key' => $key, 'var' => $ret)
102
+ );
103
+
104
+ return $ret['data'];
105
+ }
106
+
107
+ /**
108
+ * @inheritDoc
109
+ * @param string $key
110
+ * @param string $value
111
+ * @throws Google_Cache_Exception
112
+ */
113
+ public function set($key, $value)
114
+ {
115
+ $this->connect();
116
+ // we store it with the cache_time default expiration so objects will at
117
+ // least get cleaned eventually.
118
+ $data = array('time' => time(), 'data' => $value);
119
+ $rc = false;
120
+ if ($this->mc) {
121
+ $rc = $this->mc->set($key, $data);
122
+ } else {
123
+ $rc = memcache_set($this->connection, $key, $data, false);
124
+ }
125
+ if ($rc == false) {
126
+ $this->client->getLogger()->error(
127
+ 'Memcache cache set failed',
128
+ array('key' => $key, 'var' => $data)
129
+ );
130
+
131
+ throw new Google_Cache_Exception("Couldn't store data in cache");
132
+ }
133
+
134
+ $this->client->getLogger()->debug(
135
+ 'Memcache cache set',
136
+ array('key' => $key, 'var' => $data)
137
+ );
138
+ }
139
+
140
+ /**
141
+ * @inheritDoc
142
+ * @param String $key
143
+ */
144
+ public function delete($key)
145
+ {
146
+ $this->connect();
147
+ if ($this->mc) {
148
+ $this->mc->delete($key, 0);
149
+ } else {
150
+ memcache_delete($this->connection, $key, 0);
151
+ }
152
+
153
+ $this->client->getLogger()->debug(
154
+ 'Memcache cache delete',
155
+ array('key' => $key)
156
+ );
157
+ }
158
+
159
+ /**
160
+ * Lazy initialiser for memcache connection. Uses pconnect for to take
161
+ * advantage of the persistence pool where possible.
162
+ */
163
+ private function connect()
164
+ {
165
+ if ($this->connection) {
166
+ return;
167
+ }
168
+
169
+ if (class_exists("Memcached")) {
170
+ $this->mc = new Memcached();
171
+ $this->mc->addServer($this->host, $this->port);
172
+ $this->connection = true;
173
+ } else {
174
+ $this->connection = memcache_pconnect($this->host, $this->port);
175
+ }
176
+
177
+ if (! $this->connection) {
178
+ $error = "Couldn't connect to memcache server";
179
+
180
+ $this->client->getLogger()->error($error);
181
+ throw new Google_Cache_Exception($error);
182
+ }
183
+ }
184
+ }
google/Cache/Null.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * A blank storage class, for cases where caching is not
24
+ * required.
25
+ */
26
+ class Google_Cache_Null extends Google_Cache_Abstract
27
+ {
28
+ public function __construct(Google_Client $client)
29
+ {
30
+
31
+ }
32
+
33
+ /**
34
+ * @inheritDoc
35
+ */
36
+ public function get($key, $expiration = false)
37
+ {
38
+ return false;
39
+ }
40
+
41
+ /**
42
+ * @inheritDoc
43
+ */
44
+ public function set($key, $value)
45
+ {
46
+ // Nop.
47
+ }
48
+
49
+ /**
50
+ * @inheritDoc
51
+ * @param String $key
52
+ */
53
+ public function delete($key)
54
+ {
55
+ // Nop.
56
+ }
57
+ }
google/Client.php ADDED
@@ -0,0 +1,715 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/autoload.php';
20
+ }
21
+
22
+ /**
23
+ * The Google API Client
24
+ * https://github.com/google/google-api-php-client
25
+ */
26
+ class Google_Client
27
+ {
28
+ const LIBVER = "1.1.5";
29
+ const USER_AGENT_SUFFIX = "google-api-php-client/";
30
+ /**
31
+ * @var Google_Auth_Abstract $auth
32
+ */
33
+ private $auth;
34
+
35
+ /**
36
+ * @var Google_IO_Abstract $io
37
+ */
38
+ private $io;
39
+
40
+ /**
41
+ * @var Google_Cache_Abstract $cache
42
+ */
43
+ private $cache;
44
+
45
+ /**
46
+ * @var Google_Config $config
47
+ */
48
+ private $config;
49
+
50
+ /**
51
+ * @var Google_Logger_Abstract $logger
52
+ */
53
+ private $logger;
54
+
55
+ /**
56
+ * @var boolean $deferExecution
57
+ */
58
+ private $deferExecution = false;
59
+
60
+ /** @var array $scopes */
61
+ // Scopes requested by the client
62
+ protected $requestedScopes = array();
63
+
64
+ // definitions of services that are discovered.
65
+ protected $services = array();
66
+
67
+ // Used to track authenticated state, can't discover services after doing authenticate()
68
+ private $authenticated = false;
69
+
70
+ /**
71
+ * Construct the Google Client.
72
+ *
73
+ * @param $config Google_Config or string for the ini file to load
74
+ */
75
+ public function __construct($config = null)
76
+ {
77
+ if (is_string($config) && strlen($config)) {
78
+ $config = new Google_Config($config);
79
+ } else if ( !($config instanceof Google_Config)) {
80
+ $config = new Google_Config();
81
+
82
+ if ($this->isAppEngine()) {
83
+ // Automatically use Memcache if we're in AppEngine.
84
+ $config->setCacheClass('Google_Cache_Memcache');
85
+ }
86
+
87
+ if (version_compare(phpversion(), "5.3.4", "<=") || $this->isAppEngine()) {
88
+ // Automatically disable compress.zlib, as currently unsupported.
89
+ $config->setClassConfig('Google_Http_Request', 'disable_gzip', true);
90
+ }
91
+ }
92
+
93
+ if ($config->getIoClass() == Google_Config::USE_AUTO_IO_SELECTION) {
94
+ if (function_exists('curl_version') && function_exists('curl_exec')
95
+ && !$this->isAppEngine()) {
96
+ $config->setIoClass("Google_IO_Curl");
97
+ } else {
98
+ $config->setIoClass("Google_IO_Stream");
99
+ }
100
+ }
101
+
102
+ $this->config = $config;
103
+ }
104
+
105
+ /**
106
+ * Get a string containing the version of the library.
107
+ *
108
+ * @return string
109
+ */
110
+ public function getLibraryVersion()
111
+ {
112
+ return self::LIBVER;
113
+ }
114
+
115
+ /**
116
+ * Attempt to exchange a code for an valid authentication token.
117
+ * If $crossClient is set to true, the request body will not include
118
+ * the request_uri argument
119
+ * Helper wrapped around the OAuth 2.0 implementation.
120
+ *
121
+ * @param $code string code from accounts.google.com
122
+ * @param $crossClient boolean, whether this is a cross-client authentication
123
+ * @return string token
124
+ */
125
+ public function authenticate($code, $crossClient = false)
126
+ {
127
+ $this->authenticated = true;
128
+ return $this->getAuth()->authenticate($code, $crossClient);
129
+ }
130
+
131
+ /**
132
+ * Loads a service account key and parameters from a JSON
133
+ * file from the Google Developer Console. Uses that and the
134
+ * given array of scopes to return an assertion credential for
135
+ * use with refreshTokenWithAssertionCredential.
136
+ *
137
+ * @param string $jsonLocation File location of the project-key.json.
138
+ * @param array $scopes The scopes to assert.
139
+ * @return Google_Auth_AssertionCredentials.
140
+ * @
141
+ */
142
+ public function loadServiceAccountJson($jsonLocation, $scopes)
143
+ {
144
+ $data = json_decode(file_get_contents($jsonLocation));
145
+ if (isset($data->type) && $data->type == 'service_account') {
146
+ // Service Account format.
147
+ $cred = new Google_Auth_AssertionCredentials(
148
+ $data->client_email,
149
+ $scopes,
150
+ $data->private_key
151
+ );
152
+ return $cred;
153
+ } else {
154
+ throw new Google_Exception("Invalid service account JSON file.");
155
+ }
156
+ }
157
+
158
+ /**
159
+ * Set the auth config from the JSON string provided.
160
+ * This structure should match the file downloaded from
161
+ * the "Download JSON" button on in the Google Developer
162
+ * Console.
163
+ * @param string $json the configuration json
164
+ * @throws Google_Exception
165
+ */
166
+ public function setAuthConfig($json)
167
+ {
168
+ $data = json_decode($json);
169
+ $key = isset($data->installed) ? 'installed' : 'web';
170
+ if (!isset($data->$key)) {
171
+ throw new Google_Exception("Invalid client secret JSON file.");
172
+ }
173
+ $this->setClientId($data->$key->client_id);
174
+ $this->setClientSecret($data->$key->client_secret);
175
+ if (isset($data->$key->redirect_uris)) {
176
+ $this->setRedirectUri($data->$key->redirect_uris[0]);
177
+ }
178
+ }
179
+
180
+ /**
181
+ * Set the auth config from the JSON file in the path
182
+ * provided. This should match the file downloaded from
183
+ * the "Download JSON" button on in the Google Developer
184
+ * Console.
185
+ * @param string $file the file location of the client json
186
+ */
187
+ public function setAuthConfigFile($file)
188
+ {
189
+ $this->setAuthConfig(file_get_contents($file));
190
+ }
191
+
192
+ /**
193
+ * @throws Google_Auth_Exception
194
+ * @return array
195
+ * @visible For Testing
196
+ */
197
+ public function prepareScopes()
198
+ {
199
+ if (empty($this->requestedScopes)) {
200
+ throw new Google_Auth_Exception("No scopes specified");
201
+ }
202
+ $scopes = implode(' ', $this->requestedScopes);
203
+ return $scopes;
204
+ }
205
+
206
+ /**
207
+ * Set the OAuth 2.0 access token using the string that resulted from calling createAuthUrl()
208
+ * or Google_Client#getAccessToken().
209
+ * @param string $accessToken JSON encoded string containing in the following format:
210
+ * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer",
211
+ * "expires_in":3600, "id_token":"TOKEN", "created":1320790426}
212
+ */
213
+ public function setAccessToken($accessToken)
214
+ {
215
+ if ($accessToken == 'null') {
216
+ $accessToken = null;
217
+ }
218
+ $this->getAuth()->setAccessToken($accessToken);
219
+ }
220
+
221
+
222
+
223
+ /**
224
+ * Set the authenticator object
225
+ * @param Google_Auth_Abstract $auth
226
+ */
227
+ public function setAuth(Google_Auth_Abstract $auth)
228
+ {
229
+ $this->config->setAuthClass(get_class($auth));
230
+ $this->auth = $auth;
231
+ }
232
+
233
+ /**
234
+ * Set the IO object
235
+ * @param Google_IO_Abstract $io
236
+ */
237
+ public function setIo(Google_IO_Abstract $io)
238
+ {
239
+ $this->config->setIoClass(get_class($io));
240
+ $this->io = $io;
241
+ }
242
+
243
+ /**
244
+ * Set the Cache object
245
+ * @param Google_Cache_Abstract $cache
246
+ */
247
+ public function setCache(Google_Cache_Abstract $cache)
248
+ {
249
+ $this->config->setCacheClass(get_class($cache));
250
+ $this->cache = $cache;
251
+ }
252
+
253
+ /**
254
+ * Set the Logger object
255
+ * @param Google_Logger_Abstract $logger
256
+ */
257
+ public function setLogger(Google_Logger_Abstract $logger)
258
+ {
259
+ $this->config->setLoggerClass(get_class($logger));
260
+ $this->logger = $logger;
261
+ }
262
+
263
+ /**
264
+ * Construct the OAuth 2.0 authorization request URI.
265
+ * @return string
266
+ */
267
+ public function createAuthUrl()
268
+ {
269
+ $scopes = $this->prepareScopes();
270
+ return $this->getAuth()->createAuthUrl($scopes);
271
+ }
272
+
273
+ /**
274
+ * Get the OAuth 2.0 access token.
275
+ * @return string $accessToken JSON encoded string in the following format:
276
+ * {"access_token":"TOKEN", "refresh_token":"TOKEN", "token_type":"Bearer",
277
+ * "expires_in":3600,"id_token":"TOKEN", "created":1320790426}
278
+ */
279
+ public function getAccessToken()
280
+ {
281
+ $token = $this->getAuth()->getAccessToken();
282
+ // The response is json encoded, so could be the string null.
283
+ // It is arguable whether this check should be here or lower
284
+ // in the library.
285
+ return (null == $token || 'null' == $token || '[]' == $token) ? null : $token;
286
+ }
287
+
288
+ /**
289
+ * Get the OAuth 2.0 refresh token.
290
+ * @return string $refreshToken refresh token or null if not available
291
+ */
292
+ public function getRefreshToken()
293
+ {
294
+ return $this->getAuth()->getRefreshToken();
295
+ }
296
+
297
+ /**
298
+ * Returns if the access_token is expired.
299
+ * @return bool Returns True if the access_token is expired.
300
+ */
301
+ public function isAccessTokenExpired()
302
+ {
303
+ return $this->getAuth()->isAccessTokenExpired();
304
+ }
305
+
306
+ /**
307
+ * Set OAuth 2.0 "state" parameter to achieve per-request customization.
308
+ * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-22#section-3.1.2.2
309
+ * @param string $state
310
+ */
311
+ public function setState($state)
312
+ {
313
+ $this->getAuth()->setState($state);
314
+ }
315
+
316
+ /**
317
+ * @param string $accessType Possible values for access_type include:
318
+ * {@code "offline"} to request offline access from the user.
319
+ * {@code "online"} to request online access from the user.
320
+ */
321
+ public function setAccessType($accessType)
322
+ {
323
+ $this->config->setAccessType($accessType);
324
+ }
325
+
326
+ /**
327
+ * @param string $approvalPrompt Possible values for approval_prompt include:
328
+ * {@code "force"} to force the approval UI to appear. (This is the default value)
329
+ * {@code "auto"} to request auto-approval when possible.
330
+ */
331
+ public function setApprovalPrompt($approvalPrompt)
332
+ {
333
+ $this->config->setApprovalPrompt($approvalPrompt);
334
+ }
335
+
336
+ /**
337
+ * Set the login hint, email address or sub id.
338
+ * @param string $loginHint
339
+ */
340
+ public function setLoginHint($loginHint)
341
+ {
342
+ $this->config->setLoginHint($loginHint);
343
+ }
344
+
345
+ /**
346
+ * Set the application name, this is included in the User-Agent HTTP header.
347
+ * @param string $applicationName
348
+ */
349
+ public function setApplicationName($applicationName)
350
+ {
351
+ $this->config->setApplicationName($applicationName);
352
+ }
353
+
354
+ /**
355
+ * Set the OAuth 2.0 Client ID.
356
+ * @param string $clientId
357
+ */
358
+ public function setClientId($clientId)
359
+ {
360
+ $this->config->setClientId($clientId);
361
+ }
362
+
363
+ /**
364
+ * Set the OAuth 2.0 Client Secret.
365
+ * @param string $clientSecret
366
+ */
367
+ public function setClientSecret($clientSecret)
368
+ {
369
+ $this->config->setClientSecret($clientSecret);
370
+ }
371
+
372
+ /**
373
+ * Set the OAuth 2.0 Redirect URI.
374
+ * @param string $redirectUri
375
+ */
376
+ public function setRedirectUri($redirectUri)
377
+ {
378
+ $this->config->setRedirectUri($redirectUri);
379
+ }
380
+
381
+ /**
382
+ * If 'plus.login' is included in the list of requested scopes, you can use
383
+ * this method to define types of app activities that your app will write.
384
+ * You can find a list of available types here:
385
+ * @link https://developers.google.com/+/api/moment-types
386
+ *
387
+ * @param array $requestVisibleActions Array of app activity types
388
+ */
389
+ public function setRequestVisibleActions($requestVisibleActions)
390
+ {
391
+ if (is_array($requestVisibleActions)) {
392
+ $requestVisibleActions = join(" ", $requestVisibleActions);
393
+ }
394
+ $this->config->setRequestVisibleActions($requestVisibleActions);
395
+ }
396
+
397
+ /**
398
+ * Set the developer key to use, these are obtained through the API Console.
399
+ * @see http://code.google.com/apis/console-help/#generatingdevkeys
400
+ * @param string $developerKey
401
+ */
402
+ public function setDeveloperKey($developerKey)
403
+ {
404
+ $this->config->setDeveloperKey($developerKey);
405
+ }
406
+
407
+ /**
408
+ * Set the hd (hosted domain) parameter streamlines the login process for
409
+ * Google Apps hosted accounts. By including the domain of the user, you
410
+ * restrict sign-in to accounts at that domain.
411
+ * @param $hd string - the domain to use.
412
+ */
413
+ public function setHostedDomain($hd)
414
+ {
415
+ $this->config->setHostedDomain($hd);
416
+ }
417
+
418
+ /**
419
+ * Set the prompt hint. Valid values are none, consent and select_account.
420
+ * If no value is specified and the user has not previously authorized
421
+ * access, then the user is shown a consent screen.
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. It is used in OpenID 2.0 requests to signify the URL-space for which
432
+ * an authentication request is valid.
433
+ * @param $realm string - the URL-space to use.
434
+ */
435
+ public function setOpenidRealm($realm)
436
+ {
437
+ $this->config->setOpenidRealm($realm);
438
+ }
439
+
440
+ /**
441
+ * If this is provided with the value true, and the authorization request is
442
+ * granted, the authorization will include any previous authorizations
443
+ * granted to this user/application combination for other scopes.
444
+ * @param $include boolean - the URL-space to use.
445
+ */
446
+ public function setIncludeGrantedScopes($include)
447
+ {
448
+ $this->config->setIncludeGrantedScopes($include);
449
+ }
450
+
451
+ /**
452
+ * Fetches a fresh OAuth 2.0 access token with the given refresh token.
453
+ * @param string $refreshToken
454
+ */
455
+ public function refreshToken($refreshToken)
456
+ {
457
+ $this->getAuth()->refreshToken($refreshToken);
458
+ }
459
+
460
+ /**
461
+ * Revoke an OAuth2 access token or refresh token. This method will revoke the current access
462
+ * token, if a token isn't provided.
463
+ * @throws Google_Auth_Exception
464
+ * @param string|null $token The token (access token or a refresh token) that should be revoked.
465
+ * @return boolean Returns True if the revocation was successful, otherwise False.
466
+ */
467
+ public function revokeToken($token = null)
468
+ {
469
+ return $this->getAuth()->revokeToken($token);
470
+ }
471
+
472
+ /**
473
+ * Verify an id_token. This method will verify the current id_token, if one
474
+ * isn't provided.
475
+ * @throws Google_Auth_Exception
476
+ * @param string|null $token The token (id_token) that should be verified.
477
+ * @return Google_Auth_LoginTicket Returns an apiLoginTicket if the verification was
478
+ * successful.
479
+ */
480
+ public function verifyIdToken($token = null)
481
+ {
482
+ return $this->getAuth()->verifyIdToken($token);
483
+ }
484
+
485
+ /**
486
+ * Verify a JWT that was signed with your own certificates.
487
+ *
488
+ * @param $id_token string The JWT token
489
+ * @param $cert_location array of certificates
490
+ * @param $audience string the expected consumer of the token
491
+ * @param $issuer string the expected issuer, defaults to Google
492
+ * @param [$max_expiry] the max lifetime of a token, defaults to MAX_TOKEN_LIFETIME_SECS
493
+ * @return mixed token information if valid, false if not
494
+ */
495
+ public function verifySignedJwt($id_token, $cert_location, $audience, $issuer, $max_expiry = null)
496
+ {
497
+ $auth = new Google_Auth_OAuth2($this);
498
+ $certs = $auth->retrieveCertsFromLocation($cert_location);
499
+ return $auth->verifySignedJwtWithCerts($id_token, $certs, $audience, $issuer, $max_expiry);
500
+ }
501
+
502
+ /**
503
+ * @param $creds Google_Auth_AssertionCredentials
504
+ */
505
+ public function setAssertionCredentials(Google_Auth_AssertionCredentials $creds)
506
+ {
507
+ $this->getAuth()->setAssertionCredentials($creds);
508
+ }
509
+
510
+ /**
511
+ * Set the scopes to be requested. Must be called before createAuthUrl().
512
+ * Will remove any previously configured scopes.
513
+ * @param array $scopes, ie: array('https://www.googleapis.com/auth/plus.login',
514
+ * 'https://www.googleapis.com/auth/moderator')
515
+ */
516
+ public function setScopes($scopes)
517
+ {
518
+ $this->requestedScopes = array();
519
+ $this->addScope($scopes);
520
+ }
521
+
522
+ /**
523
+ * This functions adds a scope to be requested as part of the OAuth2.0 flow.
524
+ * Will append any scopes not previously requested to the scope parameter.
525
+ * A single string will be treated as a scope to request. An array of strings
526
+ * will each be appended.
527
+ * @param $scope_or_scopes string|array e.g. "profile"
528
+ */
529
+ public function addScope($scope_or_scopes)
530
+ {
531
+ if (is_string($scope_or_scopes) && !in_array($scope_or_scopes, $this->requestedScopes)) {
532
+ $this->requestedScopes[] = $scope_or_scopes;
533
+ } else if (is_array($scope_or_scopes)) {
534
+ foreach ($scope_or_scopes as $scope) {
535
+ $this->addScope($scope);
536
+ }
537
+ }
538
+ }
539
+
540
+ /**
541
+ * Returns the list of scopes requested by the client
542
+ * @return array the list of scopes
543
+ *
544
+ */
545
+ public function getScopes()
546
+ {
547
+ return $this->requestedScopes;
548
+ }
549
+
550
+ /**
551
+ * Declare whether batch calls should be used. This may increase throughput
552
+ * by making multiple requests in one connection.
553
+ *
554
+ * @param boolean $useBatch True if the batch support should
555
+ * be enabled. Defaults to False.
556
+ */
557
+ public function setUseBatch($useBatch)
558
+ {
559
+ // This is actually an alias for setDefer.
560
+ $this->setDefer($useBatch);
561
+ }
562
+
563
+ /**
564
+ * Declare whether making API calls should make the call immediately, or
565
+ * return a request which can be called with ->execute();
566
+ *
567
+ * @param boolean $defer True if calls should not be executed right away.
568
+ */
569
+ public function setDefer($defer)
570
+ {
571
+ $this->deferExecution = $defer;
572
+ }
573
+
574
+ /**
575
+ * Helper method to execute deferred HTTP requests.
576
+ *
577
+ * @param $request Google_Http_Request|Google_Http_Batch
578
+ * @throws Google_Exception
579
+ * @return object of the type of the expected class or array.
580
+ */
581
+ public function execute($request)
582
+ {
583
+ if ($request instanceof Google_Http_Request) {
584
+ $request->setUserAgent(
585
+ $this->getApplicationName()
586
+ . " " . self::USER_AGENT_SUFFIX
587
+ . $this->getLibraryVersion()
588
+ );
589
+ if (!$this->getClassConfig("Google_Http_Request", "disable_gzip")) {
590
+ $request->enableGzip();
591
+ }
592
+ $request->maybeMoveParametersToBody();
593
+ return Google_Http_REST::execute($this, $request);
594
+ } else if ($request instanceof Google_Http_Batch) {
595
+ return $request->execute();
596
+ } else {
597
+ throw new Google_Exception("Do not know how to execute this type of object.");
598
+ }
599
+ }
600
+
601
+ /**
602
+ * Whether or not to return raw requests
603
+ * @return boolean
604
+ */
605
+ public function shouldDefer()
606
+ {
607
+ return $this->deferExecution;
608
+ }
609
+
610
+ /**
611
+ * @return Google_Auth_Abstract Authentication implementation
612
+ */
613
+ public function getAuth()
614
+ {
615
+ if (!isset($this->auth)) {
616
+ $class = $this->config->getAuthClass();
617
+ $this->auth = new $class($this);
618
+ }
619
+ return $this->auth;
620
+ }
621
+
622
+ /**
623
+ * @return Google_IO_Abstract IO implementation
624
+ */
625
+ public function getIo()
626
+ {
627
+ if (!isset($this->io)) {
628
+ $class = $this->config->getIoClass();
629
+ $this->io = new $class($this);
630
+ }
631
+ return $this->io;
632
+ }
633
+
634
+ /**
635
+ * @return Google_Cache_Abstract Cache implementation
636
+ */
637
+ public function getCache()
638
+ {
639
+ if (!isset($this->cache)) {
640
+ $class = $this->config->getCacheClass();
641
+ $this->cache = new $class($this);
642
+ }
643
+ return $this->cache;
644
+ }
645
+
646
+ /**
647
+ * @return Google_Logger_Abstract Logger implementation
648
+ */
649
+ public function getLogger()
650
+ {
651
+ if (!isset($this->logger)) {
652
+ $class = $this->config->getLoggerClass();
653
+ $this->logger = new $class($this);
654
+ }
655
+ return $this->logger;
656
+ }
657
+
658
+ /**
659
+ * Retrieve custom configuration for a specific class.
660
+ * @param $class string|object - class or instance of class to retrieve
661
+ * @param $key string optional - key to retrieve
662
+ * @return array
663
+ */
664
+ public function getClassConfig($class, $key = null)
665
+ {
666
+ if (!is_string($class)) {
667
+ $class = get_class($class);
668
+ }
669
+ return $this->config->getClassConfig($class, $key);
670
+ }
671
+
672
+ /**
673
+ * Set configuration specific to a given class.
674
+ * $config->setClassConfig('Google_Cache_File',
675
+ * array('directory' => '/tmp/cache'));
676
+ * @param $class string|object - The class name for the configuration
677
+ * @param $config string key or an array of configuration values
678
+ * @param $value string optional - if $config is a key, the value
679
+ *
680
+ */
681
+ public function setClassConfig($class, $config, $value = null)
682
+ {
683
+ if (!is_string($class)) {
684
+ $class = get_class($class);
685
+ }
686
+ $this->config->setClassConfig($class, $config, $value);
687
+
688
+ }
689
+
690
+ /**
691
+ * @return string the base URL to use for calls to the APIs
692
+ */
693
+ public function getBasePath()
694
+ {
695
+ return $this->config->getBasePath();
696
+ }
697
+
698
+ /**
699
+ * @return string the name of the application
700
+ */
701
+ public function getApplicationName()
702
+ {
703
+ return $this->config->getApplicationName();
704
+ }
705
+
706
+ /**
707
+ * Are we running in Google AppEngine?
708
+ * return bool
709
+ */
710
+ public function isAppEngine()
711
+ {
712
+ return (isset($_SERVER['SERVER_SOFTWARE']) &&
713
+ strpos($_SERVER['SERVER_SOFTWARE'], 'Google App Engine') !== false);
714
+ }
715
+ }
google/Collection.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!class_exists('Google_Client')) {
4
+ require_once dirname(__FILE__) . '/autoload.php';
5
+ }
6
+
7
+ /**
8
+ * Extension to the regular Google_Model that automatically
9
+ * exposes the items array for iteration, so you can just
10
+ * iterate over the object rather than a reference inside.
11
+ */
12
+ class Google_Collection extends Google_Model implements Iterator, Countable
13
+ {
14
+ protected $collection_key = 'items';
15
+
16
+ public function rewind()
17
+ {
18
+ if (isset($this->modelData[$this->collection_key])
19
+ && is_array($this->modelData[$this->collection_key])) {
20
+ reset($this->modelData[$this->collection_key]);
21
+ }
22
+ }
23
+
24
+ public function current()
25
+ {
26
+ $this->coerceType($this->key());
27
+ if (is_array($this->modelData[$this->collection_key])) {
28
+ return current($this->modelData[$this->collection_key]);
29
+ }
30
+ }
31
+
32
+ public function key()
33
+ {
34
+ if (isset($this->modelData[$this->collection_key])
35
+ && is_array($this->modelData[$this->collection_key])) {
36
+ return key($this->modelData[$this->collection_key]);
37
+ }
38
+ }
39
+
40
+ public function next()
41
+ {
42
+ return next($this->modelData[$this->collection_key]);
43
+ }
44
+
45
+ public function valid()
46
+ {
47
+ $key = $this->key();
48
+ return $key !== null && $key !== false;
49
+ }
50
+
51
+ public function count()
52
+ {
53
+ if (!isset($this->modelData[$this->collection_key])) {
54
+ return 0;
55
+ }
56
+ return count($this->modelData[$this->collection_key]);
57
+ }
58
+
59
+ public function offsetExists($offset)
60
+ {
61
+ if (!is_numeric($offset)) {
62
+ return parent::offsetExists($offset);
63
+ }
64
+ return isset($this->modelData[$this->collection_key][$offset]);
65
+ }
66
+
67
+ public function offsetGet($offset)
68
+ {
69
+ if (!is_numeric($offset)) {
70
+ return parent::offsetGet($offset);
71
+ }
72
+ $this->coerceType($offset);
73
+ return $this->modelData[$this->collection_key][$offset];
74
+ }
75
+
76
+ public function offsetSet($offset, $value)
77
+ {
78
+ if (!is_numeric($offset)) {
79
+ return parent::offsetSet($offset, $value);
80
+ }
81
+ $this->modelData[$this->collection_key][$offset] = $value;
82
+ }
83
+
84
+ public function offsetUnset($offset)
85
+ {
86
+ if (!is_numeric($offset)) {
87
+ return parent::offsetUnset($offset);
88
+ }
89
+ unset($this->modelData[$this->collection_key][$offset]);
90
+ }
91
+
92
+ private function coerceType($offset)
93
+ {
94
+ $typeKey = $this->keyType($this->collection_key);
95
+ if (isset($this->$typeKey) && !is_object($this->modelData[$this->collection_key][$offset])) {
96
+ $type = $this->$typeKey;
97
+ $this->modelData[$this->collection_key][$offset] =
98
+ new $type($this->modelData[$this->collection_key][$offset]);
99
+ }
100
+ }
101
+ }
google/Config.php ADDED
@@ -0,0 +1,452 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ const TASK_RETRY_NEVER = 0;
29
+ const TASK_RETRY_ONCE = 1;
30
+ const TASK_RETRY_ALWAYS = -1;
31
+ protected $configuration;
32
+
33
+ /**
34
+ * Create a new Google_Config. Can accept an ini file location with the
35
+ * local configuration. For example:
36
+ * application_name="My App"
37
+ *
38
+ * @param [$ini_file_location] - optional - The location of the ini file to load
39
+ */
40
+ public function __construct($ini_file_location = null)
41
+ {
42
+ $this->configuration = array(
43
+ // The application_name is included in the User-Agent HTTP header.
44
+ 'application_name' => '',
45
+
46
+ // Which Authentication, Storage and HTTP IO classes to use.
47
+ 'auth_class' => 'Google_Auth_OAuth2',
48
+ 'io_class' => self::USE_AUTO_IO_SELECTION,
49
+ 'cache_class' => 'Google_Cache_File',
50
+ 'logger_class' => 'Google_Logger_Null',
51
+
52
+ // Don't change these unless you're working against a special development
53
+ // or testing environment.
54
+ 'base_path' => 'https://www.googleapis.com',
55
+
56
+ // Definition of class specific values, like file paths and so on.
57
+ 'classes' => array(
58
+ 'Google_IO_Abstract' => array(
59
+ 'request_timeout_seconds' => 100,
60
+ ),
61
+ 'Google_Logger_Abstract' => array(
62
+ 'level' => 'debug',
63
+ 'log_format' => "[%datetime%] %level%: %message% %context%\n",
64
+ 'date_format' => 'd/M/Y:H:i:s O',
65
+ 'allow_newlines' => true
66
+ ),
67
+ 'Google_Logger_File' => array(
68
+ 'file' => 'php://stdout',
69
+ 'mode' => 0640,
70
+ 'lock' => false,
71
+ ),
72
+ 'Google_Http_Request' => array(
73
+ // Disable the use of gzip on calls if set to true. Defaults to false.
74
+ 'disable_gzip' => self::GZIP_ENABLED,
75
+
76
+ // We default gzip to disabled on uploads even if gzip is otherwise
77
+ // enabled, due to some issues seen with small packet sizes for uploads.
78
+ // Please test with this option before enabling gzip for uploads in
79
+ // a production environment.
80
+ 'enable_gzip_for_uploads' => self::GZIP_UPLOADS_DISABLED,
81
+ ),
82
+ // If you want to pass in OAuth 2.0 settings, they will need to be
83
+ // structured like this.
84
+ 'Google_Auth_OAuth2' => array(
85
+ // Keys for OAuth 2.0 access, see the API console at
86
+ // https://developers.google.com/console
87
+ 'client_id' => '',
88
+ 'client_secret' => '',
89
+ 'redirect_uri' => '',
90
+
91
+ // Simple API access key, also from the API console. Ensure you get
92
+ // a Server key, and not a Browser key.
93
+ 'developer_key' => '',
94
+
95
+ // Other parameters.
96
+ 'hd' => '',
97
+ 'prompt' => '',
98
+ 'openid.realm' => '',
99
+ 'include_granted_scopes' => '',
100
+ 'login_hint' => '',
101
+ 'request_visible_actions' => '',
102
+ 'access_type' => 'online',
103
+ 'approval_prompt' => 'auto',
104
+ 'federated_signon_certs_url' =>
105
+ 'https://www.googleapis.com/oauth2/v1/certs',
106
+ ),
107
+ 'Google_Task_Runner' => array(
108
+ // Delays are specified in seconds
109
+ 'initial_delay' => 1,
110
+ 'max_delay' => 60,
111
+ // Base number for exponential backoff
112
+ 'factor' => 2,
113
+ // A random number between -jitter and jitter will be added to the
114
+ // factor on each iteration to allow for better distribution of
115
+ // retries.
116
+ 'jitter' => .5,
117
+ // Maximum number of retries allowed
118
+ 'retries' => 0
119
+ ),
120
+ 'Google_Service_Exception' => array(
121
+ 'retry_map' => array(
122
+ '500' => self::TASK_RETRY_ALWAYS,
123
+ '503' => self::TASK_RETRY_ALWAYS,
124
+ 'rateLimitExceeded' => self::TASK_RETRY_ALWAYS,
125
+ 'userRateLimitExceeded' => self::TASK_RETRY_ALWAYS
126
+ )
127
+ ),
128
+ 'Google_IO_Exception' => array(
129
+ 'retry_map' => !extension_loaded('curl') ? array() : array(
130
+ CURLE_COULDNT_RESOLVE_HOST => self::TASK_RETRY_ALWAYS,
131
+ CURLE_COULDNT_CONNECT => self::TASK_RETRY_ALWAYS,
132
+ CURLE_OPERATION_TIMEOUTED => self::TASK_RETRY_ALWAYS,
133
+ CURLE_SSL_CONNECT_ERROR => self::TASK_RETRY_ALWAYS,
134
+ CURLE_GOT_NOTHING => self::TASK_RETRY_ALWAYS
135
+ )
136
+ ),
137
+ // Set a default directory for the file cache.
138
+ 'Google_Cache_File' => array(
139
+ 'directory' => sys_get_temp_dir() . '/Google_Client'
140
+ )
141
+ ),
142
+ );
143
+ if ($ini_file_location) {
144
+ $ini = parse_ini_file($ini_file_location, true);
145
+ if (is_array($ini) && count($ini)) {
146
+ $merged_configuration = $ini + $this->configuration;
147
+ if (isset($ini['classes']) && isset($this->configuration['classes'])) {
148
+ $merged_configuration['classes'] = $ini['classes'] + $this->configuration['classes'];
149
+ }
150
+ $this->configuration = $merged_configuration;
151
+ }
152
+ }
153
+ }
154
+
155
+ /**
156
+ * Set configuration specific to a given class.
157
+ * $config->setClassConfig('Google_Cache_File',
158
+ * array('directory' => '/tmp/cache'));
159
+ * @param $class string The class name for the configuration
160
+ * @param $config string key or an array of configuration values
161
+ * @param $value string optional - if $config is a key, the value
162
+ */
163
+ public function setClassConfig($class, $config, $value = null)
164
+ {
165
+ if (!is_array($config)) {
166
+ if (!isset($this->configuration['classes'][$class])) {
167
+ $this->configuration['classes'][$class] = array();
168
+ }
169
+ $this->configuration['classes'][$class][$config] = $value;
170
+ } else {
171
+ $this->configuration['classes'][$class] = $config;
172
+ }
173
+ }
174
+
175
+ public function getClassConfig($class, $key = null)
176
+ {
177
+ if (!isset($this->configuration['classes'][$class])) {
178
+ return null;
179
+ }
180
+ if ($key === null) {
181
+ return $this->configuration['classes'][$class];
182
+ } else {
183
+ return $this->configuration['classes'][$class][$key];
184
+ }
185
+ }
186
+
187
+ /**
188
+ * Return the configured cache class.
189
+ * @return string
190
+ */
191
+ public function getCacheClass()
192
+ {
193
+ return $this->configuration['cache_class'];
194
+ }
195
+
196
+ /**
197
+ * Return the configured logger class.
198
+ * @return string
199
+ */
200
+ public function getLoggerClass()
201
+ {
202
+ return $this->configuration['logger_class'];
203
+ }
204
+
205
+ /**
206
+ * Return the configured Auth class.
207
+ * @return string
208
+ */
209
+ public function getAuthClass()
210
+ {
211
+ return $this->configuration['auth_class'];
212
+ }
213
+
214
+ /**
215
+ * Set the auth class.
216
+ *
217
+ * @param $class string the class name to set
218
+ */
219
+ public function setAuthClass($class)
220
+ {
221
+ $prev = $this->configuration['auth_class'];
222
+ if (!isset($this->configuration['classes'][$class]) &&
223
+ isset($this->configuration['classes'][$prev])) {
224
+ $this->configuration['classes'][$class] =
225
+ $this->configuration['classes'][$prev];
226
+ }
227
+ $this->configuration['auth_class'] = $class;
228
+ }
229
+
230
+ /**
231
+ * Set the IO class.
232
+ *
233
+ * @param $class string the class name to set
234
+ */
235
+ public function setIoClass($class)
236
+ {
237
+ $prev = $this->configuration['io_class'];
238
+ if (!isset($this->configuration['classes'][$class]) &&
239
+ isset($this->configuration['classes'][$prev])) {
240
+ $this->configuration['classes'][$class] =
241
+ $this->configuration['classes'][$prev];
242
+ }
243
+ $this->configuration['io_class'] = $class;
244
+ }
245
+
246
+ /**
247
+ * Set the cache class.
248
+ *
249
+ * @param $class string the class name to set
250
+ */
251
+ public function setCacheClass($class)
252
+ {
253
+ $prev = $this->configuration['cache_class'];
254
+ if (!isset($this->configuration['classes'][$class]) &&
255
+ isset($this->configuration['classes'][$prev])) {
256
+ $this->configuration['classes'][$class] =
257
+ $this->configuration['classes'][$prev];
258
+ }
259
+ $this->configuration['cache_class'] = $class;
260
+ }
261
+
262
+ /**
263
+ * Set the logger class.
264
+ *
265
+ * @param $class string the class name to set
266
+ */
267
+ public function setLoggerClass($class)
268
+ {
269
+ $prev = $this->configuration['logger_class'];
270
+ if (!isset($this->configuration['classes'][$class]) &&
271
+ isset($this->configuration['classes'][$prev])) {
272
+ $this->configuration['classes'][$class] =
273
+ $this->configuration['classes'][$prev];
274
+ }
275
+ $this->configuration['logger_class'] = $class;
276
+ }
277
+
278
+ /**
279
+ * Return the configured IO class.
280
+ *
281
+ * @return string
282
+ */
283
+ public function getIoClass()
284
+ {
285
+ return $this->configuration['io_class'];
286
+ }
287
+
288
+ /**
289
+ * Set the application name, this is included in the User-Agent HTTP header.
290
+ * @param string $name
291
+ */
292
+ public function setApplicationName($name)
293
+ {
294
+ $this->configuration['application_name'] = $name;
295
+ }
296
+
297
+ /**
298
+ * @return string the name of the application
299
+ */
300
+ public function getApplicationName()
301
+ {
302
+ return $this->configuration['application_name'];
303
+ }
304
+
305
+ /**
306
+ * Set the client ID for the auth class.
307
+ * @param $clientId string - the API console client ID
308
+ */
309
+ public function setClientId($clientId)
310
+ {
311
+ $this->setAuthConfig('client_id', $clientId);
312
+ }
313
+
314
+ /**
315
+ * Set the client secret for the auth class.
316
+ * @param $secret string - the API console client secret
317
+ */
318
+ public function setClientSecret($secret)
319
+ {
320
+ $this->setAuthConfig('client_secret', $secret);
321
+ }
322
+
323
+ /**
324
+ * Set the redirect uri for the auth class. Note that if using the
325
+ * Javascript based sign in flow, this should be the string 'postmessage'.
326
+ *
327
+ * @param $uri string - the URI that users should be redirected to
328
+ */
329
+ public function setRedirectUri($uri)
330
+ {
331
+ $this->setAuthConfig('redirect_uri', $uri);
332
+ }
333
+
334
+ /**
335
+ * Set the app activities for the auth class.
336
+ * @param $rva string a space separated list of app activity types
337
+ */
338
+ public function setRequestVisibleActions($rva)
339
+ {
340
+ $this->setAuthConfig('request_visible_actions', $rva);
341
+ }
342
+
343
+ /**
344
+ * Set the the access type requested (offline or online.)
345
+ * @param $access string - the access type
346
+ */
347
+ public function setAccessType($access)
348
+ {
349
+ $this->setAuthConfig('access_type', $access);
350
+ }
351
+
352
+ /**
353
+ * Set when to show the approval prompt (auto or force)
354
+ * @param $approval string - the approval request
355
+ */
356
+ public function setApprovalPrompt($approval)
357
+ {
358
+ $this->setAuthConfig('approval_prompt', $approval);
359
+ }
360
+
361
+ /**
362
+ * Set the login hint (email address or sub identifier)
363
+ * @param $hint string
364
+ */
365
+ public function setLoginHint($hint)
366
+ {
367
+ $this->setAuthConfig('login_hint', $hint);
368
+ }
369
+
370
+ /**
371
+ * Set the developer key for the auth class. Note that this is separate value
372
+ * from the client ID - if it looks like a URL, its a client ID!
373
+ * @param $key string - the API console developer key
374
+ */
375
+ public function setDeveloperKey($key)
376
+ {
377
+ $this->setAuthConfig('developer_key', $key);
378
+ }
379
+
380
+ /**
381
+ * Set the hd (hosted domain) parameter streamlines the login process for
382
+ * Google Apps hosted accounts. By including the domain of the user, you
383
+ * restrict sign-in to accounts at that domain.
384
+ *
385
+ * This should not be used to ensure security on your application - check
386
+ * the hd values within an id token (@see Google_Auth_LoginTicket) after sign
387
+ * in to ensure that the user is from the domain you were expecting.
388
+ *
389
+ * @param $hd string - the domain to use.
390
+ */
391
+ public function setHostedDomain($hd)
392
+ {
393
+ $this->setAuthConfig('hd', $hd);
394
+ }
395
+
396
+ /**
397
+ * Set the prompt hint. Valid values are none, consent and select_account.
398
+ * If no value is specified and the user has not previously authorized
399
+ * access, then the user is shown a consent screen.
400
+ * @param $prompt string
401
+ */
402
+ public function setPrompt($prompt)
403
+ {
404
+ $this->setAuthConfig('prompt', $prompt);
405
+ }
406
+
407
+ /**
408
+ * openid.realm is a parameter from the OpenID 2.0 protocol, not from OAuth
409
+ * 2.0. It is used in OpenID 2.0 requests to signify the URL-space for which
410
+ * an authentication request is valid.
411
+ * @param $realm string - the URL-space to use.
412
+ */
413
+ public function setOpenidRealm($realm)
414
+ {
415
+ $this->setAuthConfig('openid.realm', $realm);
416
+ }
417
+
418
+ /**
419
+ * If this is provided with the value true, and the authorization request is
420
+ * granted, the authorization will include any previous authorizations
421
+ * granted to this user/application combination for other scopes.
422
+ * @param $include boolean - the URL-space to use.
423
+ */
424
+ public function setIncludeGrantedScopes($include)
425
+ {
426
+ $this->setAuthConfig(
427
+ 'include_granted_scopes',
428
+ $include ? "true" : "false"
429
+ );
430
+ }
431
+
432
+ /**
433
+ * @return string the base URL to use for API calls
434
+ */
435
+ public function getBasePath()
436
+ {
437
+ return $this->configuration['base_path'];
438
+ }
439
+
440
+ /**
441
+ * Set the auth configuration for the current auth class.
442
+ * @param $key - the key to set
443
+ * @param $value - the parameter value
444
+ */
445
+ private function setAuthConfig($key, $value)
446
+ {
447
+ if (!isset($this->configuration['classes'][$this->getAuthClass()])) {
448
+ $this->configuration['classes'][$this->getAuthClass()] = array();
449
+ }
450
+ $this->configuration['classes'][$this->getAuthClass()][$key] = $value;
451
+ }
452
+ }
google/Exception.php ADDED
@@ -0,0 +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
+ }
google/Http/Batch.php ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Class to handle batched requests to the Google API service.
24
+ */
25
+ class Google_Http_Batch
26
+ {
27
+ /** @var string Multipart Boundary. */
28
+ private $boundary;
29
+
30
+ /** @var array service requests to be executed. */
31
+ private $requests = array();
32
+
33
+ /** @var Google_Client */
34
+ private $client;
35
+
36
+ private $expected_classes = array();
37
+
38
+ private $root_url;
39
+
40
+ private $batch_path;
41
+
42
+ public function __construct(Google_Client $client, $boundary = false, $rootUrl = '', $batchPath = '')
43
+ {
44
+ $this->client = $client;
45
+ $this->root_url = rtrim($rootUrl ? $rootUrl : $this->client->getBasePath(), '/');
46
+ $this->batch_path = $batchPath ? $batchPath : 'batch';
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
+
58
+ $this->requests[$key] = $request;
59
+ }
60
+
61
+ public function execute()
62
+ {
63
+ $body = '';
64
+
65
+ /** @var Google_Http_Request $req */
66
+ foreach ($this->requests as $key => $req) {
67
+ $body .= "--{$this->boundary}\n";
68
+ $body .= $req->toBatchString($key) . "\n\n";
69
+ $this->expected_classes["response-" . $key] = $req->getExpectedClass();
70
+ }
71
+
72
+ $body .= "--{$this->boundary}--";
73
+
74
+ $url = $this->root_url . '/' . $this->batch_path;
75
+ $httpRequest = new Google_Http_Request($url, 'POST');
76
+ $httpRequest->setRequestHeaders(
77
+ array('Content-Type' => 'multipart/mixed; boundary=' . $this->boundary)
78
+ );
79
+
80
+ $httpRequest->setPostBody($body);
81
+ $response = $this->client->getIo()->makeRequest($httpRequest);
82
+
83
+ return $this->parseResponse($response);
84
+ }
85
+
86
+ public function parseResponse(Google_Http_Request $response)
87
+ {
88
+ $contentType = $response->getResponseHeader('content-type');
89
+ $contentType = explode(';', $contentType);
90
+ $boundary = false;
91
+ foreach ($contentType as $part) {
92
+ $part = (explode('=', $part, 2));
93
+ if (isset($part[0]) && 'boundary' == trim($part[0])) {
94
+ $boundary = $part[1];
95
+ }
96
+ }
97
+
98
+ $body = $response->getResponseBody();
99
+ if ($body) {
100
+ $body = str_replace("--$boundary--", "--$boundary", $body);
101
+ $parts = explode("--$boundary", $body);
102
+ $responses = array();
103
+
104
+ foreach ($parts as $part) {
105
+ $part = trim($part);
106
+ if (!empty($part)) {
107
+ list($metaHeaders, $part) = explode("\r\n\r\n", $part, 2);
108
+ $metaHeaders = $this->client->getIo()->getHttpResponseHeaders($metaHeaders);
109
+
110
+ $status = substr($part, 0, strpos($part, "\n"));
111
+ $status = explode(" ", $status);
112
+ $status = $status[1];
113
+
114
+ list($partHeaders, $partBody) = $this->client->getIo()->ParseHttpResponse($part, false);
115
+ $response = new Google_Http_Request("");
116
+ $response->setResponseHttpCode($status);
117
+ $response->setResponseHeaders($partHeaders);
118
+ $response->setResponseBody($partBody);
119
+
120
+ // Need content id.
121
+ $key = $metaHeaders['content-id'];
122
+
123
+ if (isset($this->expected_classes[$key]) &&
124
+ strlen($this->expected_classes[$key]) > 0) {
125
+ $class = $this->expected_classes[$key];
126
+ $response->setExpectedClass($class);
127
+ }
128
+
129
+ try {
130
+ $response = Google_Http_REST::decodeHttpResponse($response, $this->client);
131
+ $responses[$key] = $response;
132
+ } catch (Google_Service_Exception $e) {
133
+ // Store the exception as the response, so successful responses
134
+ // can be processed.
135
+ $responses[$key] = $e;
136
+ }
137
+ }
138
+ }
139
+
140
+ return $responses;
141
+ }
142
+
143
+ return null;
144
+ }
145
+ }
google/Http/CacheParser.php ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Implement the caching directives specified in rfc2616. This
24
+ * implementation is guided by the guidance offered in rfc2616-sec13.
25
+ */
26
+ class Google_Http_CacheParser
27
+ {
28
+ public static $CACHEABLE_HTTP_METHODS = array('GET', 'HEAD');
29
+ public static $CACHEABLE_STATUS_CODES = array('200', '203', '300', '301');
30
+
31
+ /**
32
+ * Check if an HTTP request can be cached by a private local cache.
33
+ *
34
+ * @static
35
+ * @param Google_Http_Request $resp
36
+ * @return bool True if the request is cacheable.
37
+ * False if the request is uncacheable.
38
+ */
39
+ public static function isRequestCacheable(Google_Http_Request $resp)
40
+ {
41
+ $method = $resp->getRequestMethod();
42
+ if (! in_array($method, self::$CACHEABLE_HTTP_METHODS)) {
43
+ return false;
44
+ }
45
+
46
+ // Don't cache authorized requests/responses.
47
+ // [rfc2616-14.8] When a shared cache receives a request containing an
48
+ // Authorization field, it MUST NOT return the corresponding response
49
+ // as a reply to any other request...
50
+ if ($resp->getRequestHeader("authorization")) {
51
+ return false;
52
+ }
53
+
54
+ return true;
55
+ }
56
+
57
+ /**
58
+ * Check if an HTTP response can be cached by a private local cache.
59
+ *
60
+ * @static
61
+ * @param Google_Http_Request $resp
62
+ * @return bool True if the response is cacheable.
63
+ * False if the response is un-cacheable.
64
+ */
65
+ public static function isResponseCacheable(Google_Http_Request $resp)
66
+ {
67
+ // First, check if the HTTP request was cacheable before inspecting the
68
+ // HTTP response.
69
+ if (false == self::isRequestCacheable($resp)) {
70
+ return false;
71
+ }
72
+
73
+ $code = $resp->getResponseHttpCode();
74
+ if (! in_array($code, self::$CACHEABLE_STATUS_CODES)) {
75
+ return false;
76
+ }
77
+
78
+ // The resource is uncacheable if the resource is already expired and
79
+ // the resource doesn't have an ETag for revalidation.
80
+ $etag = $resp->getResponseHeader("etag");
81
+ if (self::isExpired($resp) && $etag == false) {
82
+ return false;
83
+ }
84
+
85
+ // [rfc2616-14.9.2] If [no-store is] sent in a response, a cache MUST NOT
86
+ // store any part of either this response or the request that elicited it.
87
+ $cacheControl = $resp->getParsedCacheControl();
88
+ if (isset($cacheControl['no-store'])) {
89
+ return false;
90
+ }
91
+
92
+ // Pragma: no-cache is an http request directive, but is occasionally
93
+ // used as a response header incorrectly.
94
+ $pragma = $resp->getResponseHeader('pragma');
95
+ if ($pragma == 'no-cache' || strpos($pragma, 'no-cache') !== false) {
96
+ return false;
97
+ }
98
+
99
+ // [rfc2616-14.44] Vary: * is extremely difficult to cache. "It implies that
100
+ // a cache cannot determine from the request headers of a subsequent request
101
+ // whether this response is the appropriate representation."
102
+ // Given this, we deem responses with the Vary header as uncacheable.
103
+ $vary = $resp->getResponseHeader('vary');
104
+ if ($vary) {
105
+ return false;
106
+ }
107
+
108
+ return true;
109
+ }
110
+
111
+ /**
112
+ * @static
113
+ * @param Google_Http_Request $resp
114
+ * @return bool True if the HTTP response is considered to be expired.
115
+ * False if it is considered to be fresh.
116
+ */
117
+ public static function isExpired(Google_Http_Request $resp)
118
+ {
119
+ // HTTP/1.1 clients and caches MUST treat other invalid date formats,
120
+ // especially including the value “0”, as in the past.
121
+ $parsedExpires = false;
122
+ $responseHeaders = $resp->getResponseHeaders();
123
+
124
+ if (isset($responseHeaders['expires'])) {
125
+ $rawExpires = $responseHeaders['expires'];
126
+ // Check for a malformed expires header first.
127
+ if (empty($rawExpires) || (is_numeric($rawExpires) && $rawExpires <= 0)) {
128
+ return true;
129
+ }
130
+
131
+ // See if we can parse the expires header.
132
+ $parsedExpires = strtotime($rawExpires);
133
+ if (false == $parsedExpires || $parsedExpires <= 0) {
134
+ return true;
135
+ }
136
+ }
137
+
138
+ // Calculate the freshness of an http response.
139
+ $freshnessLifetime = false;
140
+ $cacheControl = $resp->getParsedCacheControl();
141
+ if (isset($cacheControl['max-age'])) {
142
+ $freshnessLifetime = $cacheControl['max-age'];
143
+ }
144
+
145
+ $rawDate = $resp->getResponseHeader('date');
146
+ $parsedDate = strtotime($rawDate);
147
+
148
+ if (empty($rawDate) || false == $parsedDate) {
149
+ // We can't default this to now, as that means future cache reads
150
+ // will always pass with the logic below, so we will require a
151
+ // date be injected if not supplied.
152
+ throw new Google_Exception("All cacheable requests must have creation dates.");
153
+ }
154
+
155
+ if (false == $freshnessLifetime && isset($responseHeaders['expires'])) {
156
+ $freshnessLifetime = $parsedExpires - $parsedDate;
157
+ }
158
+
159
+ if (false == $freshnessLifetime) {
160
+ return true;
161
+ }
162
+
163
+ // Calculate the age of an http response.
164
+ $age = max(0, time() - $parsedDate);
165
+ if (isset($responseHeaders['age'])) {
166
+ $age = max($age, strtotime($responseHeaders['age']));
167
+ }
168
+
169
+ return $freshnessLifetime <= $age;
170
+ }
171
+
172
+ /**
173
+ * Determine if a cache entry should be revalidated with by the origin.
174
+ *
175
+ * @param Google_Http_Request $response
176
+ * @return bool True if the entry is expired, else return false.
177
+ */
178
+ public static function mustRevalidate(Google_Http_Request $response)
179
+ {
180
+ // [13.3] When a cache has a stale entry that it would like to use as a
181
+ // response to a client's request, it first has to check with the origin
182
+ // server to see if its cached entry is still usable.
183
+ return self::isExpired($response);
184
+ }
185
+ }
google/Http/MediaFileUpload.php ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Manage large file uploads, which may be media but can be any type
24
+ * of sizable data.
25
+ */
26
+ class Google_Http_MediaFileUpload
27
+ {
28
+ const UPLOAD_MEDIA_TYPE = 'media';
29
+ const UPLOAD_MULTIPART_TYPE = 'multipart';
30
+ const UPLOAD_RESUMABLE_TYPE = 'resumable';
31
+
32
+ /** @var string $mimeType */
33
+ private $mimeType;
34
+
35
+ /** @var string $data */
36
+ private $data;
37
+
38
+ /** @var bool $resumable */
39
+ private $resumable;
40
+
41
+ /** @var int $chunkSize */
42
+ private $chunkSize;
43
+
44
+ /** @var int $size */
45
+ private $size;
46
+
47
+ /** @var string $resumeUri */
48
+ private $resumeUri;
49
+
50
+ /** @var int $progress */
51
+ private $progress;
52
+
53
+ /** @var Google_Client */
54
+ private $client;
55
+
56
+ /** @var Google_Http_Request */
57
+ private $request;
58
+
59
+ /** @var string */
60
+ private $boundary;
61
+
62
+ /**
63
+ * Result code from last HTTP call
64
+ * @var int
65
+ */
66
+ private $httpResultCode;
67
+
68
+ /**
69
+ * @param $mimeType string
70
+ * @param $data string The bytes you want to upload.
71
+ * @param $resumable bool
72
+ * @param bool $chunkSize File will be uploaded in chunks of this many bytes.
73
+ * only used if resumable=True
74
+ */
75
+ public function __construct(
76
+ Google_Client $client,
77
+ Google_Http_Request $request,
78
+ $mimeType,
79
+ $data,
80
+ $resumable = false,
81
+ $chunkSize = false,
82
+ $boundary = false
83
+ ) {
84
+ $this->client = $client;
85
+ $this->request = $request;
86
+ $this->mimeType = $mimeType;
87
+ $this->data = $data;
88
+ $this->size = strlen($this->data);
89
+ $this->resumable = $resumable;
90
+ if (!$chunkSize) {
91
+ $chunkSize = 256 * 1024;
92
+ }
93
+ $this->chunkSize = $chunkSize;
94
+ $this->progress = 0;
95
+ $this->boundary = $boundary;
96
+
97
+ // Process Media Request
98
+ $this->process();
99
+ }
100
+
101
+ /**
102
+ * Set the size of the file that is being uploaded.
103
+ * @param $size - int file size in bytes
104
+ */
105
+ public function setFileSize($size)
106
+ {
107
+ $this->size = $size;
108
+ }
109
+
110
+ /**
111
+ * Return the progress on the upload
112
+ * @return int progress in bytes uploaded.
113
+ */
114
+ public function getProgress()
115
+ {
116
+ return $this->progress;
117
+ }
118
+
119
+ /**
120
+ * Return the HTTP result code from the last call made.
121
+ * @return int code
122
+ */
123
+ public function getHttpResultCode()
124
+ {
125
+ return $this->httpResultCode;
126
+ }
127
+
128
+ /**
129
+ * Sends a PUT-Request to google drive and parses the response,
130
+ * setting the appropiate variables from the response()
131
+ *
132
+ * @param Google_Http_Request $httpRequest the Reuqest which will be send
133
+ *
134
+ * @return false|mixed false when the upload is unfinished or the decoded http response
135
+ *
136
+ */
137
+ private function makePutRequest(Google_Http_Request $httpRequest)
138
+ {
139
+ if ($this->client->getClassConfig("Google_Http_Request", "enable_gzip_for_uploads")) {
140
+ $httpRequest->enableGzip();
141
+ } else {
142
+ $httpRequest->disableGzip();
143
+ }
144
+
145
+ $response = $this->client->getIo()->makeRequest($httpRequest);
146
+ $response->setExpectedClass($this->request->getExpectedClass());
147
+ $code = $response->getResponseHttpCode();
148
+ $this->httpResultCode = $code;
149
+
150
+ if (308 == $code) {
151
+ // Track the amount uploaded.
152
+ $range = explode('-', $response->getResponseHeader('range'));
153
+ $this->progress = $range[1] + 1;
154
+
155
+ // Allow for changing upload URLs.
156
+ $location = $response->getResponseHeader('location');
157
+ if ($location) {
158
+ $this->resumeUri = $location;
159
+ }
160
+
161
+ // No problems, but upload not complete.
162
+ return false;
163
+ } else {
164
+ return Google_Http_REST::decodeHttpResponse($response, $this->client);
165
+ }
166
+ }
167
+
168
+ /**
169
+ * Send the next part of the file to upload.
170
+ * @param [$chunk] the next set of bytes to send. If false will used $data passed
171
+ * at construct time.
172
+ */
173
+ public function nextChunk($chunk = false)
174
+ {
175
+ if (false == $this->resumeUri) {
176
+ $this->resumeUri = $this->fetchResumeUri();
177
+ }
178
+
179
+ if (false == $chunk) {
180
+ $chunk = substr($this->data, $this->progress, $this->chunkSize);
181
+ }
182
+ $lastBytePos = $this->progress + strlen($chunk) - 1;
183
+ $headers = array(
184
+ 'content-range' => "bytes $this->progress-$lastBytePos/$this->size",
185
+ 'content-type' => $this->request->getRequestHeader('content-type'),
186
+ 'content-length' => $this->chunkSize,
187
+ 'expect' => '',
188
+ );
189
+
190
+ $httpRequest = new Google_Http_Request(
191
+ $this->resumeUri,
192
+ 'PUT',
193
+ $headers,
194
+ $chunk
195
+ );
196
+ return $this->makePutRequest($httpRequest);
197
+ }
198
+
199
+ /**
200
+ * Resume a previously unfinished upload
201
+ * @param $resumeUri the resume-URI of the unfinished, resumable upload.
202
+ */
203
+ public function resume($resumeUri)
204
+ {
205
+ $this->resumeUri = $resumeUri;
206
+ $headers = array(
207
+ 'content-range' => "bytes */$this->size",
208
+ 'content-length' => 0,
209
+ );
210
+ $httpRequest = new Google_Http_Request(
211
+ $this->resumeUri,
212
+ 'PUT',
213
+ $headers
214
+ );
215
+ return $this->makePutRequest($httpRequest);
216
+ }
217
+
218
+ /**
219
+ * @return array|bool
220
+ * @visible for testing
221
+ */
222
+ private function process()
223
+ {
224
+ $postBody = false;
225
+ $contentType = false;
226
+
227
+ $meta = $this->request->getPostBody();
228
+ $meta = is_string($meta) ? json_decode($meta, true) : $meta;
229
+
230
+ $uploadType = $this->getUploadType($meta);
231
+ $this->request->setQueryParam('uploadType', $uploadType);
232
+ $this->transformToUploadUrl();
233
+ $mimeType = $this->mimeType ?
234
+ $this->mimeType :
235
+ $this->request->getRequestHeader('content-type');
236
+
237
+ if (self::UPLOAD_RESUMABLE_TYPE == $uploadType) {
238
+ $contentType = $mimeType;
239
+ $postBody = is_string($meta) ? $meta : json_encode($meta);
240
+ } else if (self::UPLOAD_MEDIA_TYPE == $uploadType) {
241
+ $contentType = $mimeType;
242
+ $postBody = $this->data;
243
+ } else if (self::UPLOAD_MULTIPART_TYPE == $uploadType) {
244
+ // This is a multipart/related upload.
245
+ $boundary = $this->boundary ? $this->boundary : mt_rand();
246
+ $boundary = str_replace('"', '', $boundary);
247
+ $contentType = 'multipart/related; boundary=' . $boundary;
248
+ $related = "--$boundary\r\n";
249
+ $related .= "Content-Type: application/json; charset=UTF-8\r\n";
250
+ $related .= "\r\n" . json_encode($meta) . "\r\n";
251
+ $related .= "--$boundary\r\n";
252
+ $related .= "Content-Type: $mimeType\r\n";
253
+ $related .= "Content-Transfer-Encoding: base64\r\n";
254
+ $related .= "\r\n" . base64_encode($this->data) . "\r\n";
255
+ $related .= "--$boundary--";
256
+ $postBody = $related;
257
+ }
258
+
259
+ $this->request->setPostBody($postBody);
260
+
261
+ if (isset($contentType) && $contentType) {
262
+ $contentTypeHeader['content-type'] = $contentType;
263
+ $this->request->setRequestHeaders($contentTypeHeader);
264
+ }
265
+ }
266
+
267
+ private function transformToUploadUrl()
268
+ {
269
+ $base = $this->request->getBaseComponent();
270
+ $this->request->setBaseComponent($base . '/upload');
271
+ }
272
+
273
+ /**
274
+ * Valid upload types:
275
+ * - resumable (UPLOAD_RESUMABLE_TYPE)
276
+ * - media (UPLOAD_MEDIA_TYPE)
277
+ * - multipart (UPLOAD_MULTIPART_TYPE)
278
+ * @param $meta
279
+ * @return string
280
+ * @visible for testing
281
+ */
282
+ public function getUploadType($meta)
283
+ {
284
+ if ($this->resumable) {
285
+ return self::UPLOAD_RESUMABLE_TYPE;
286
+ }
287
+
288
+ if (false == $meta && $this->data) {
289
+ return self::UPLOAD_MEDIA_TYPE;
290
+ }
291
+
292
+ return self::UPLOAD_MULTIPART_TYPE;
293
+ }
294
+
295
+ public function getResumeUri()
296
+ {
297
+ return ( $this->resumeUri !== null ? $this->resumeUri : $this->fetchResumeUri() );
298
+ }
299
+
300
+ private function fetchResumeUri()
301
+ {
302
+ $result = null;
303
+ $body = $this->request->getPostBody();
304
+ if ($body) {
305
+ $headers = array(
306
+ 'content-type' => 'application/json; charset=UTF-8',
307
+ 'content-length' => Google_Utils::getStrLen($body),
308
+ 'x-upload-content-type' => $this->mimeType,
309
+ 'x-upload-content-length' => $this->size,
310
+ 'expect' => '',
311
+ );
312
+ $this->request->setRequestHeaders($headers);
313
+ }
314
+
315
+ $response = $this->client->getIo()->makeRequest($this->request);
316
+ $location = $response->getResponseHeader('location');
317
+ $code = $response->getResponseHttpCode();
318
+
319
+ if (200 == $code && true == $location) {
320
+ return $location;
321
+ }
322
+ $message = $code;
323
+ $body = @json_decode($response->getResponseBody());
324
+ if (!empty($body->error->errors) ) {
325
+ $message .= ': ';
326
+ foreach ($body->error->errors as $error) {
327
+ $message .= "{$error->domain}, {$error->message};";
328
+ }
329
+ $message = rtrim($message, ';');
330
+ }
331
+
332
+ $error = "Failed to start the resumable upload (HTTP {$message})";
333
+ $this->client->getLogger()->error($error);
334
+ throw new Google_Exception($error);
335
+ }
336
+
337
+ public function setChunkSize($chunkSize)
338
+ {
339
+ $this->chunkSize = $chunkSize;
340
+ }
341
+ }
google/Http/REST.php ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * This class implements the RESTful transport of apiServiceRequest()'s
24
+ */
25
+ class Google_Http_REST
26
+ {
27
+ /**
28
+ * Executes a Google_Http_Request and (if applicable) automatically retries
29
+ * when errors occur.
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
+ $runner = new Google_Task_Runner(
40
+ $client,
41
+ sprintf('%s %s', $req->getRequestMethod(), $req->getUrl()),
42
+ array(get_class(), 'doExecute'),
43
+ array($client, $req)
44
+ );
45
+
46
+ return $runner->run();
47
+ }
48
+
49
+ /**
50
+ * Executes a Google_Http_Request
51
+ *
52
+ * @param Google_Client $client
53
+ * @param Google_Http_Request $req
54
+ * @return array decoded result
55
+ * @throws Google_Service_Exception on server side error (ie: not authenticated,
56
+ * invalid or malformed post body, invalid url)
57
+ */
58
+ public static function doExecute(Google_Client $client, Google_Http_Request $req)
59
+ {
60
+ $httpRequest = $client->getIo()->makeRequest($req);
61
+ $httpRequest->setExpectedClass($req->getExpectedClass());
62
+ return self::decodeHttpResponse($httpRequest, $client);
63
+ }
64
+
65
+ /**
66
+ * Decode an HTTP Response.
67
+ * @static
68
+ * @throws Google_Service_Exception
69
+ * @param Google_Http_Request $response The http response to be decoded.
70
+ * @param Google_Client $client
71
+ * @return mixed|null
72
+ */
73
+ public static function decodeHttpResponse($response, Google_Client $client = null)
74
+ {
75
+ $code = $response->getResponseHttpCode();
76
+ $body = $response->getResponseBody();
77
+ $decoded = null;
78
+
79
+ if ((intVal($code)) >= 300) {
80
+ $decoded = json_decode($body, true);
81
+ $err = 'Error calling ' . $response->getRequestMethod() . ' ' . $response->getUrl();
82
+ if (isset($decoded['error']) &&
83
+ isset($decoded['error']['message']) &&
84
+ isset($decoded['error']['code'])) {
85
+ // if we're getting a json encoded error definition, use that instead of the raw response
86
+ // body for improved readability
87
+ $err .= ": ({$decoded['error']['code']}) {$decoded['error']['message']}";
88
+ } else {
89
+ $err .= ": ($code) $body";
90
+ }
91
+
92
+ $errors = null;
93
+ // Specific check for APIs which don't return error details, such as Blogger.
94
+ if (isset($decoded['error']) && isset($decoded['error']['errors'])) {
95
+ $errors = $decoded['error']['errors'];
96
+ }
97
+
98
+ $map = null;
99
+ if ($client) {
100
+ $client->getLogger()->error(
101
+ $err,
102
+ array('code' => $code, 'errors' => $errors)
103
+ );
104
+
105
+ $map = $client->getClassConfig(
106
+ 'Google_Service_Exception',
107
+ 'retry_map'
108
+ );
109
+ }
110
+ throw new Google_Service_Exception($err, $code, null, $errors, $map);
111
+ }
112
+
113
+ // Only attempt to decode the response, if the response code wasn't (204) 'no content'
114
+ if ($code != '204') {
115
+ if ($response->getExpectedRaw()) {
116
+ return $body;
117
+ }
118
+
119
+ $decoded = json_decode($body, true);
120
+ if ($decoded === null || $decoded === "") {
121
+ $error = "Invalid json in service response: $body";
122
+ if ($client) {
123
+ $client->getLogger()->error($error);
124
+ }
125
+ throw new Google_Service_Exception($error);
126
+ }
127
+
128
+ if ($response->getExpectedClass()) {
129
+ $class = $response->getExpectedClass();
130
+ $decoded = new $class($decoded);
131
+ }
132
+ }
133
+ return $decoded;
134
+ }
135
+
136
+ /**
137
+ * Parse/expand request parameters and create a fully qualified
138
+ * request uri.
139
+ * @static
140
+ * @param string $servicePath
141
+ * @param string $restPath
142
+ * @param array $params
143
+ * @return string $requestUrl
144
+ */
145
+ public static function createRequestUri($servicePath, $restPath, $params)
146
+ {
147
+ $requestUrl = $servicePath . $restPath;
148
+ $uriTemplateVars = array();
149
+ $queryVars = array();
150
+ foreach ($params as $paramName => $paramSpec) {
151
+ if ($paramSpec['type'] == 'boolean') {
152
+ $paramSpec['value'] = ($paramSpec['value']) ? 'true' : 'false';
153
+ }
154
+ if ($paramSpec['location'] == 'path') {
155
+ $uriTemplateVars[$paramName] = $paramSpec['value'];
156
+ } else if ($paramSpec['location'] == 'query') {
157
+ if (isset($paramSpec['repeated']) && is_array($paramSpec['value'])) {
158
+ foreach ($paramSpec['value'] as $value) {
159
+ $queryVars[] = $paramName . '=' . rawurlencode(rawurldecode($value));
160
+ }
161
+ } else {
162
+ $queryVars[] = $paramName . '=' . rawurlencode(rawurldecode($paramSpec['value']));
163
+ }
164
+ }
165
+ }
166
+
167
+ if (count($uriTemplateVars)) {
168
+ $uriTemplateParser = new Google_Utils_URITemplate();
169
+ $requestUrl = $uriTemplateParser->parse($requestUrl, $uriTemplateVars);
170
+ }
171
+
172
+ if (count($queryVars)) {
173
+ $requestUrl .= '?' . implode($queryVars, '&');
174
+ }
175
+
176
+ return $requestUrl;
177
+ }
178
+ }
google/Http/Request.php ADDED
@@ -0,0 +1,504 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * HTTP Request to be executed by IO classes. Upon execution, the
24
+ * responseHttpCode, responseHeaders and responseBody will be filled in.
25
+ *
26
+ * @author Chris Chabot <chabotc@google.com>
27
+ * @author Chirag Shah <chirags@google.com>
28
+ *
29
+ */
30
+ class Google_Http_Request
31
+ {
32
+ const GZIP_UA = " (gzip)";
33
+
34
+ private $batchHeaders = array(
35
+ 'Content-Type' => 'application/http',
36
+ 'Content-Transfer-Encoding' => 'binary',
37
+ 'MIME-Version' => '1.0',
38
+ );
39
+
40
+ protected $queryParams;
41
+ protected $requestMethod;
42
+ protected $requestHeaders;
43
+ protected $baseComponent = null;
44
+ protected $path;
45
+ protected $postBody;
46
+ protected $userAgent;
47
+ protected $canGzip = null;
48
+
49
+ protected $responseHttpCode;
50
+ protected $responseHeaders;
51
+ protected $responseBody;
52
+
53
+ protected $expectedClass;
54
+ protected $expectedRaw = false;
55
+
56
+ public $accessKey;
57
+
58
+ public function __construct(
59
+ $url,
60
+ $method = 'GET',
61
+ $headers = array(),
62
+ $postBody = null
63
+ ) {
64
+ $this->setUrl($url);
65
+ $this->setRequestMethod($method);
66
+ $this->setRequestHeaders($headers);
67
+ $this->setPostBody($postBody);
68
+ }
69
+
70
+ /**
71
+ * Misc function that returns the base url component of the $url
72
+ * used by the OAuth signing class to calculate the base string
73
+ * @return string The base url component of the $url.
74
+ */
75
+ public function getBaseComponent()
76
+ {
77
+ return $this->baseComponent;
78
+ }
79
+
80
+ /**
81
+ * Set the base URL that path and query parameters will be added to.
82
+ * @param $baseComponent string
83
+ */
84
+ public function setBaseComponent($baseComponent)
85
+ {
86
+ $this->baseComponent = rtrim($baseComponent, '/');
87
+ }
88
+
89
+ /**
90
+ * Enable support for gzipped responses with this request.
91
+ */
92
+ public function enableGzip()
93
+ {
94
+ $this->setRequestHeaders(array("Accept-Encoding" => "gzip"));
95
+ $this->canGzip = true;
96
+ $this->setUserAgent($this->userAgent);
97
+ }
98
+
99
+ /**
100
+ * Disable support for gzip responses with this request.
101
+ */
102
+ public function disableGzip()
103
+ {
104
+ if (
105
+ isset($this->requestHeaders['accept-encoding']) &&
106
+ $this->requestHeaders['accept-encoding'] == "gzip"
107
+ ) {
108
+ unset($this->requestHeaders['accept-encoding']);
109
+ }
110
+ $this->canGzip = false;
111
+ $this->userAgent = str_replace(self::GZIP_UA, "", $this->userAgent);
112
+ }
113
+
114
+ /**
115
+ * Can this request accept a gzip response?
116
+ * @return bool
117
+ */
118
+ public function canGzip()
119
+ {
120
+ return $this->canGzip;
121
+ }
122
+
123
+ /**
124
+ * Misc function that returns an array of the query parameters of the current
125
+ * url used by the OAuth signing class to calculate the signature
126
+ * @return array Query parameters in the query string.
127
+ */
128
+ public function getQueryParams()
129
+ {
130
+ return $this->queryParams;
131
+ }
132
+
133
+ /**
134
+ * Set a new query parameter.
135
+ * @param $key - string to set, does not need to be URL encoded
136
+ * @param $value - string to set, does not need to be URL encoded
137
+ */
138
+ public function setQueryParam($key, $value)
139
+ {
140
+ $this->queryParams[$key] = $value;
141
+ }
142
+
143
+ /**
144
+ * @return string HTTP Response Code.
145
+ */
146
+ public function getResponseHttpCode()
147
+ {
148
+ return (int) $this->responseHttpCode;
149
+ }
150
+
151
+ /**
152
+ * @param int $responseHttpCode HTTP Response Code.
153
+ */
154
+ public function setResponseHttpCode($responseHttpCode)
155
+ {
156
+ $this->responseHttpCode = $responseHttpCode;
157
+ }
158
+
159
+ /**
160
+ * @return $responseHeaders (array) HTTP Response Headers.
161
+ */
162
+ public function getResponseHeaders()
163
+ {
164
+ return $this->responseHeaders;
165
+ }
166
+
167
+ /**
168
+ * @return string HTTP Response Body
169
+ */
170
+ public function getResponseBody()
171
+ {
172
+ return $this->responseBody;
173
+ }
174
+
175
+ /**
176
+ * Set the class the response to this request should expect.
177
+ *
178
+ * @param $class string 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
+ * @return string class name
188
+ */
189
+ public function getExpectedClass()
190
+ {
191
+ return $this->expectedClass;
192
+ }
193
+
194
+ /**
195
+ * Enable expected raw response
196
+ */
197
+ public function enableExpectedRaw()
198
+ {
199
+ $this->expectedRaw = true;
200
+ }
201
+
202
+ /**
203
+ * Disable expected raw response
204
+ */
205
+ public function disableExpectedRaw()
206
+ {
207
+ $this->expectedRaw = false;
208
+ }
209
+
210
+ /**
211
+ * Expected raw response or not.
212
+ * @return boolean expected raw response
213
+ */
214
+ public function getExpectedRaw()
215
+ {
216
+ return $this->expectedRaw;
217
+ }
218
+
219
+ /**
220
+ * @param array $headers The HTTP response headers
221
+ * to be normalized.
222
+ */
223
+ public function setResponseHeaders($headers)
224
+ {
225
+ $headers = Google_Utils::normalize($headers);
226
+ if ($this->responseHeaders) {
227
+ $headers = array_merge($this->responseHeaders, $headers);
228
+ }
229
+
230
+ $this->responseHeaders = $headers;
231
+ }
232
+
233
+ /**
234
+ * @param string $key
235
+ * @return array|boolean Returns the requested HTTP header or
236
+ * false if unavailable.
237
+ */
238
+ public function getResponseHeader($key)
239
+ {
240
+ return isset($this->responseHeaders[$key])
241
+ ? $this->responseHeaders[$key]
242
+ : false;
243
+ }
244
+
245
+ /**
246
+ * @param string $responseBody The HTTP response body.
247
+ */
248
+ public function setResponseBody($responseBody)
249
+ {
250
+ $this->responseBody = $responseBody;
251
+ }
252
+
253
+ /**
254
+ * @return string $url The request URL.
255
+ */
256
+ public function getUrl()
257
+ {
258
+ return $this->baseComponent . $this->path .
259
+ (count($this->queryParams) ?
260
+ "?" . $this->buildQuery($this->queryParams) :
261
+ '');
262
+ }
263
+
264
+ /**
265
+ * @return string $method HTTP Request Method.
266
+ */
267
+ public function getRequestMethod()
268
+ {
269
+ return $this->requestMethod;
270
+ }
271
+
272
+ /**
273
+ * @return array $headers HTTP Request Headers.
274
+ */
275
+ public function getRequestHeaders()
276
+ {
277
+ return $this->requestHeaders;
278
+ }
279
+
280
+ /**
281
+ * @param string $key
282
+ * @return array|boolean Returns the requested HTTP header or
283
+ * false if unavailable.
284
+ */
285
+ public function getRequestHeader($key)
286
+ {
287
+ return isset($this->requestHeaders[$key])
288
+ ? $this->requestHeaders[$key]
289
+ : false;
290
+ }
291
+
292
+ /**
293
+ * @return string $postBody HTTP Request Body.
294
+ */
295
+ public function getPostBody()
296
+ {
297
+ return $this->postBody;
298
+ }
299
+
300
+ /**
301
+ * @param string $url the url to set
302
+ */
303
+ public function setUrl($url)
304
+ {
305
+ if (substr($url, 0, 4) != 'http') {
306
+ // Force the path become relative.
307
+ if (substr($url, 0, 1) !== '/') {
308
+ $url = '/' . $url;
309
+ }
310
+ }
311
+ $parts = parse_url($url);
312
+ if (isset($parts['host'])) {
313
+ $this->baseComponent = sprintf(
314
+ "%s%s%s",
315
+ isset($parts['scheme']) ? $parts['scheme'] . "://" : '',
316
+ isset($parts['host']) ? $parts['host'] : '',
317
+ isset($parts['port']) ? ":" . $parts['port'] : ''
318
+ );
319
+ }
320
+ $this->path = isset($parts['path']) ? $parts['path'] : '';
321
+ $this->queryParams = array();
322
+ if (isset($parts['query'])) {
323
+ $this->queryParams = $this->parseQuery($parts['query']);
324
+ }
325
+ }
326
+
327
+ /**
328
+ * @param string $method Set he HTTP Method and normalize
329
+ * it to upper-case, as required by HTTP.
330
+ *
331
+ */
332
+ public function setRequestMethod($method)
333
+ {
334
+ $this->requestMethod = strtoupper($method);
335
+ }
336
+
337
+ /**
338
+ * @param array $headers The HTTP request headers
339
+ * to be set and normalized.
340
+ */
341
+ public function setRequestHeaders($headers)
342
+ {
343
+ $headers = Google_Utils::normalize($headers);
344
+ if ($this->requestHeaders) {
345
+ $headers = array_merge($this->requestHeaders, $headers);
346
+ }
347
+ $this->requestHeaders = $headers;
348
+ }
349
+
350
+ /**
351
+ * @param string $postBody the postBody to set
352
+ */
353
+ public function setPostBody($postBody)
354
+ {
355
+ $this->postBody = $postBody;
356
+ }
357
+
358
+ /**
359
+ * Set the User-Agent Header.
360
+ * @param string $userAgent The User-Agent.
361
+ */
362
+ public function setUserAgent($userAgent)
363
+ {
364
+ $this->userAgent = $userAgent;
365
+ if ($this->canGzip) {
366
+ $this->userAgent = $userAgent . self::GZIP_UA;
367
+ }
368
+ }
369
+
370
+ /**
371
+ * @return string The User-Agent.
372
+ */
373
+ public function getUserAgent()
374
+ {
375
+ return $this->userAgent;
376
+ }
377
+
378
+ /**
379
+ * Returns a cache key depending on if this was an OAuth signed request
380
+ * in which case it will use the non-signed url and access key to make this
381
+ * cache key unique per authenticated user, else use the plain request url
382
+ * @return string The md5 hash of the request cache key.
383
+ */
384
+ public function getCacheKey()
385
+ {
386
+ $key = $this->getUrl();
387
+
388
+ if (isset($this->accessKey)) {
389
+ $key .= $this->accessKey;
390
+ }
391
+
392
+ if (isset($this->requestHeaders['authorization'])) {
393
+ $key .= $this->requestHeaders['authorization'];
394
+ }
395
+
396
+ return md5($key);
397
+ }
398
+
399
+ public function getParsedCacheControl()
400
+ {
401
+ $parsed = array();
402
+ $rawCacheControl = $this->getResponseHeader('cache-control');
403
+ if ($rawCacheControl) {
404
+ $rawCacheControl = str_replace(', ', '&', $rawCacheControl);
405
+ parse_str($rawCacheControl, $parsed);
406
+ }
407
+
408
+ return $parsed;
409
+ }
410
+
411
+ /**
412
+ * @param string $id
413
+ * @return string A string representation of the HTTP Request.
414
+ */
415
+ public function toBatchString($id)
416
+ {
417
+ $str = '';
418
+ $path = parse_url($this->getUrl(), PHP_URL_PATH) . "?" .
419
+ http_build_query($this->queryParams);
420
+ $str .= $this->getRequestMethod() . ' ' . $path . " HTTP/1.1\n";
421
+
422
+ foreach ($this->getRequestHeaders() as $key => $val) {
423
+ $str .= $key . ': ' . $val . "\n";
424
+ }
425
+
426
+ if ($this->getPostBody()) {
427
+ $str .= "\n";
428
+ $str .= $this->getPostBody();
429
+ }
430
+
431
+ $headers = '';
432
+ foreach ($this->batchHeaders as $key => $val) {
433
+ $headers .= $key . ': ' . $val . "\n";
434
+ }
435
+
436
+ $headers .= "Content-ID: $id\n";
437
+ $str = $headers . "\n" . $str;
438
+
439
+ return $str;
440
+ }
441
+
442
+ /**
443
+ * Our own version of parse_str that allows for multiple variables
444
+ * with the same name.
445
+ * @param $string - the query string to parse
446
+ */
447
+ private function parseQuery($string)
448
+ {
449
+ $return = array();
450
+ $parts = explode("&", $string);
451
+ foreach ($parts as $part) {
452
+ list($key, $value) = explode('=', $part, 2);
453
+ $value = urldecode($value);
454
+ if (isset($return[$key])) {
455
+ if (!is_array($return[$key])) {
456
+ $return[$key] = array($return[$key]);
457
+ }
458
+ $return[$key][] = $value;
459
+ } else {
460
+ $return[$key] = $value;
461
+ }
462
+ }
463
+ return $return;
464
+ }
465
+
466
+ /**
467
+ * A version of build query that allows for multiple
468
+ * duplicate keys.
469
+ * @param $parts array of key value pairs
470
+ */
471
+ private function buildQuery($parts)
472
+ {
473
+ $return = array();
474
+ foreach ($parts as $key => $value) {
475
+ if (is_array($value)) {
476
+ foreach ($value as $v) {
477
+ $return[] = urlencode($key) . "=" . urlencode($v);
478
+ }
479
+ } else {
480
+ $return[] = urlencode($key) . "=" . urlencode($value);
481
+ }
482
+ }
483
+ return implode('&', $return);
484
+ }
485
+
486
+ /**
487
+ * If we're POSTing and have no body to send, we can send the query
488
+ * parameters in there, which avoids length issues with longer query
489
+ * params.
490
+ */
491
+ public function maybeMoveParametersToBody()
492
+ {
493
+ if ($this->getRequestMethod() == "POST" && empty($this->postBody)) {
494
+ $this->setRequestHeaders(
495
+ array(
496
+ "content-type" =>
497
+ "application/x-www-form-urlencoded; charset=UTF-8"
498
+ )
499
+ );
500
+ $this->setPostBody($this->buildQuery($this->queryParams));
501
+ $this->queryParams = array();
502
+ }
503
+ }
504
+ }
google/IO/Abstract.php ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
23
+ require_once dirname(__FILE__) . '/../autoload.php';
24
+ }
25
+
26
+ abstract class Google_IO_Abstract
27
+ {
28
+ const UNKNOWN_CODE = 0;
29
+ const FORM_URLENCODED = 'application/x-www-form-urlencoded';
30
+ private static $CONNECTION_ESTABLISHED_HEADERS = array(
31
+ "HTTP/1.0 200 Connection established\r\n\r\n",
32
+ "HTTP/1.1 200 Connection established\r\n\r\n",
33
+ );
34
+ private static $ENTITY_HTTP_METHODS = array("POST" => null, "PUT" => null);
35
+ private static $HOP_BY_HOP = array(
36
+ 'connection' => true,
37
+ 'keep-alive' => true,
38
+ 'proxy-authenticate' => true,
39
+ 'proxy-authorization' => true,
40
+ 'te' => true,
41
+ 'trailers' => true,
42
+ 'transfer-encoding' => true,
43
+ 'upgrade' => true
44
+ );
45
+
46
+
47
+ /** @var Google_Client */
48
+ protected $client;
49
+
50
+ public function __construct(Google_Client $client)
51
+ {
52
+ $this->client = $client;
53
+ $timeout = $client->getClassConfig('Google_IO_Abstract', 'request_timeout_seconds');
54
+ if ($timeout > 0) {
55
+ $this->setTimeout($timeout);
56
+ }
57
+ }
58
+
59
+ /**
60
+ * Executes a Google_Http_Request
61
+ * @param Google_Http_Request $request the http request to be executed
62
+ * @return array containing response headers, body, and http code
63
+ * @throws Google_IO_Exception on curl or IO error
64
+ */
65
+ abstract public function executeRequest(Google_Http_Request $request);
66
+
67
+ /**
68
+ * Set options that update the transport implementation's behavior.
69
+ * @param $options
70
+ */
71
+ abstract public function setOptions($options);
72
+
73
+ /**
74
+ * Set the maximum request time in seconds.
75
+ * @param $timeout in seconds
76
+ */
77
+ abstract public function setTimeout($timeout);
78
+
79
+ /**
80
+ * Get the maximum request time in seconds.
81
+ * @return timeout in seconds
82
+ */
83
+ abstract public function getTimeout();
84
+
85
+ /**
86
+ * Test for the presence of a cURL header processing bug
87
+ *
88
+ * The cURL bug was present in versions prior to 7.30.0 and caused the header
89
+ * length to be miscalculated when a "Connection established" header added by
90
+ * some proxies was present.
91
+ *
92
+ * @return boolean
93
+ */
94
+ abstract protected function needsQuirk();
95
+
96
+ /**
97
+ * @visible for testing.
98
+ * Cache the response to an HTTP request if it is cacheable.
99
+ * @param Google_Http_Request $request
100
+ * @return bool Returns true if the insertion was successful.
101
+ * Otherwise, return false.
102
+ */
103
+ public function setCachedRequest(Google_Http_Request $request)
104
+ {
105
+ // Determine if the request is cacheable.
106
+ if (Google_Http_CacheParser::isResponseCacheable($request)) {
107
+ $this->client->getCache()->set($request->getCacheKey(), $request);
108
+ return true;
109
+ }
110
+
111
+ return false;
112
+ }
113
+
114
+ /**
115
+ * Execute an HTTP Request
116
+ *
117
+ * @param Google_Http_Request $request the http request to be executed
118
+ * @return Google_Http_Request http request with the response http code,
119
+ * response headers and response body filled in
120
+ * @throws Google_IO_Exception on curl or IO error
121
+ */
122
+ public function makeRequest(Google_Http_Request $request)
123
+ {
124
+ // First, check to see if we have a valid cached version.
125
+ $cached = $this->getCachedRequest($request);
126
+ if ($cached !== false && $cached instanceof Google_Http_Request) {
127
+ if (!$this->checkMustRevalidateCachedRequest($cached, $request)) {
128
+ return $cached;
129
+ }
130
+ }
131
+
132
+ if (array_key_exists($request->getRequestMethod(), self::$ENTITY_HTTP_METHODS)) {
133
+ $request = $this->processEntityRequest($request);
134
+ }
135
+
136
+ list($responseData, $responseHeaders, $respHttpCode) = $this->executeRequest($request);
137
+
138
+ if ($respHttpCode == 304 && $cached) {
139
+ // If the server responded NOT_MODIFIED, return the cached request.
140
+ $this->updateCachedRequest($cached, $responseHeaders);
141
+ return $cached;
142
+ }
143
+
144
+ if (!isset($responseHeaders['Date']) && !isset($responseHeaders['date'])) {
145
+ $responseHeaders['date'] = date("r");
146
+ }
147
+
148
+ $request->setResponseHttpCode($respHttpCode);
149
+ $request->setResponseHeaders($responseHeaders);
150
+ $request->setResponseBody($responseData);
151
+ // Store the request in cache (the function checks to see if the request
152
+ // can actually be cached)
153
+ $this->setCachedRequest($request);
154
+ return $request;
155
+ }
156
+
157
+ /**
158
+ * @visible for testing.
159
+ * @param Google_Http_Request $request
160
+ * @return Google_Http_Request|bool Returns the cached object or
161
+ * false if the operation was unsuccessful.
162
+ */
163
+ public function getCachedRequest(Google_Http_Request $request)
164
+ {
165
+ if (false === Google_Http_CacheParser::isRequestCacheable($request)) {
166
+ return false;
167
+ }
168
+
169
+ return $this->client->getCache()->get($request->getCacheKey());
170
+ }
171
+
172
+ /**
173
+ * @visible for testing
174
+ * Process an http request that contains an enclosed entity.
175
+ * @param Google_Http_Request $request
176
+ * @return Google_Http_Request Processed request with the enclosed entity.
177
+ */
178
+ public function processEntityRequest(Google_Http_Request $request)
179
+ {
180
+ $postBody = $request->getPostBody();
181
+ $contentType = $request->getRequestHeader("content-type");
182
+
183
+ // Set the default content-type as application/x-www-form-urlencoded.
184
+ if (false == $contentType) {
185
+ $contentType = self::FORM_URLENCODED;
186
+ $request->setRequestHeaders(array('content-type' => $contentType));
187
+ }
188
+
189
+ // Force the payload to match the content-type asserted in the header.
190
+ if ($contentType == self::FORM_URLENCODED && is_array($postBody)) {
191
+ $postBody = http_build_query($postBody, '', '&');
192
+ $request->setPostBody($postBody);
193
+ }
194
+
195
+ // Make sure the content-length header is set.
196
+ if (!$postBody || is_string($postBody)) {
197
+ $postsLength = strlen($postBody);
198
+ $request->setRequestHeaders(array('content-length' => $postsLength));
199
+ }
200
+
201
+ return $request;
202
+ }
203
+
204
+ /**
205
+ * Check if an already cached request must be revalidated, and if so update
206
+ * the request with the correct ETag headers.
207
+ * @param Google_Http_Request $cached A previously cached response.
208
+ * @param Google_Http_Request $request The outbound request.
209
+ * return bool If the cached object needs to be revalidated, false if it is
210
+ * still current and can be re-used.
211
+ */
212
+ protected function checkMustRevalidateCachedRequest($cached, $request)
213
+ {
214
+ if (Google_Http_CacheParser::mustRevalidate($cached)) {
215
+ $addHeaders = array();
216
+ if ($cached->getResponseHeader('etag')) {
217
+ // [13.3.4] If an entity tag has been provided by the origin server,
218
+ // we must use that entity tag in any cache-conditional request.
219
+ $addHeaders['If-None-Match'] = $cached->getResponseHeader('etag');
220
+ } elseif ($cached->getResponseHeader('date')) {
221
+ $addHeaders['If-Modified-Since'] = $cached->getResponseHeader('date');
222
+ }
223
+
224
+ $request->setRequestHeaders($addHeaders);
225
+ return true;
226
+ } else {
227
+ return false;
228
+ }
229
+ }
230
+
231
+ /**
232
+ * Update a cached request, using the headers from the last response.
233
+ * @param Google_Http_Request $cached A previously cached response.
234
+ * @param mixed Associative array of response headers from the last request.
235
+ */
236
+ protected function updateCachedRequest($cached, $responseHeaders)
237
+ {
238
+ $hopByHop = self::$HOP_BY_HOP;
239
+ if (!empty($responseHeaders['connection'])) {
240
+ $connectionHeaders = array_map(
241
+ 'strtolower',
242
+ array_filter(
243
+ array_map('trim', explode(',', $responseHeaders['connection']))
244
+ )
245
+ );
246
+ $hopByHop += array_fill_keys($connectionHeaders, true);
247
+ }
248
+
249
+ $endToEnd = array_diff_key($responseHeaders, $hopByHop);
250
+ $cached->setResponseHeaders($endToEnd);
251
+ }
252
+
253
+ /**
254
+ * Used by the IO lib and also the batch processing.
255
+ *
256
+ * @param $respData
257
+ * @param $headerSize
258
+ * @return array
259
+ */
260
+ public function parseHttpResponse($respData, $headerSize)
261
+ {
262
+ // check proxy header
263
+ foreach (self::$CONNECTION_ESTABLISHED_HEADERS as $established_header) {
264
+ if (stripos($respData, $established_header) !== false) {
265
+ // existed, remove it
266
+ $respData = str_ireplace($established_header, '', $respData);
267
+ // Subtract the proxy header size unless the cURL bug prior to 7.30.0
268
+ // is present which prevented the proxy header size from being taken into
269
+ // account.
270
+ if (!$this->needsQuirk()) {
271
+ $headerSize -= strlen($established_header);
272
+ }
273
+ break;
274
+ }
275
+ }
276
+
277
+ if ($headerSize) {
278
+ $responseBody = substr($respData, $headerSize);
279
+ $responseHeaders = substr($respData, 0, $headerSize);
280
+ } else {
281
+ $responseSegments = explode("\r\n\r\n", $respData, 2);
282
+ $responseHeaders = $responseSegments[0];
283
+ $responseBody = isset($responseSegments[1]) ? $responseSegments[1] :
284
+ null;
285
+ }
286
+
287
+ $responseHeaders = $this->getHttpResponseHeaders($responseHeaders);
288
+ return array($responseHeaders, $responseBody);
289
+ }
290
+
291
+ /**
292
+ * Parse out headers from raw headers
293
+ * @param rawHeaders array or string
294
+ * @return array
295
+ */
296
+ public function getHttpResponseHeaders($rawHeaders)
297
+ {
298
+ if (is_array($rawHeaders)) {
299
+ return $this->parseArrayHeaders($rawHeaders);
300
+ } else {
301
+ return $this->parseStringHeaders($rawHeaders);
302
+ }
303
+ }
304
+
305
+ private function parseStringHeaders($rawHeaders)
306
+ {
307
+ $headers = array();
308
+ $responseHeaderLines = explode("\r\n", $rawHeaders);
309
+ foreach ($responseHeaderLines as $headerLine) {
310
+ if ($headerLine && strpos($headerLine, ':') !== false) {
311
+ list($header, $value) = explode(': ', $headerLine, 2);
312
+ $header = strtolower($header);
313
+ if (isset($headers[$header])) {
314
+ $headers[$header] .= "\n" . $value;
315
+ } else {
316
+ $headers[$header] = $value;
317
+ }
318
+ }
319
+ }
320
+ return $headers;
321
+ }
322
+
323
+ private function parseArrayHeaders($rawHeaders)
324
+ {
325
+ $header_count = count($rawHeaders);
326
+ $headers = array();
327
+
328
+ for ($i = 0; $i < $header_count; $i++) {
329
+ $header = $rawHeaders[$i];
330
+ // Times will have colons in - so we just want the first match.
331
+ $header_parts = explode(': ', $header, 2);
332
+ if (count($header_parts) == 2) {
333
+ $headers[strtolower($header_parts[0])] = $header_parts[1];
334
+ }
335
+ }
336
+
337
+ return $headers;
338
+ }
339
+ }
google/IO/Curl.php ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
25
+ require_once dirname(__FILE__) . '/../autoload.php';
26
+ }
27
+
28
+ class Google_IO_Curl extends Google_IO_Abstract
29
+ {
30
+ // cURL hex representation of version 7.30.0
31
+ const NO_QUIRK_VERSION = 0x071E00;
32
+
33
+ private $options = array();
34
+
35
+ public function __construct(Google_Client $client)
36
+ {
37
+ if (!extension_loaded('curl')) {
38
+ $error = 'The cURL IO handler requires the cURL extension to be enabled';
39
+ $client->getLogger()->critical($error);
40
+ throw new Google_IO_Exception($error);
41
+ }
42
+
43
+ parent::__construct($client);
44
+ }
45
+
46
+ /**
47
+ * Execute an HTTP Request
48
+ *
49
+ * @param Google_Http_Request $request the http request to be executed
50
+ * @return array containing response headers, body, and http code
51
+ * @throws Google_IO_Exception on curl or IO error
52
+ */
53
+ public function executeRequest(Google_Http_Request $request)
54
+ {
55
+ $curl = curl_init();
56
+
57
+ if ($request->getPostBody()) {
58
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $request->getPostBody());
59
+ }
60
+
61
+ $requestHeaders = $request->getRequestHeaders();
62
+ if ($requestHeaders && is_array($requestHeaders)) {
63
+ $curlHeaders = array();
64
+ foreach ($requestHeaders as $k => $v) {
65
+ $curlHeaders[] = "$k: $v";
66
+ }
67
+ curl_setopt($curl, CURLOPT_HTTPHEADER, $curlHeaders);
68
+ }
69
+ curl_setopt($curl, CURLOPT_URL, $request->getUrl());
70
+
71
+ curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $request->getRequestMethod());
72
+ curl_setopt($curl, CURLOPT_USERAGENT, $request->getUserAgent());
73
+
74
+ curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
75
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
76
+
77
+ // The SSL version will be determined by the underlying library
78
+ // @see https://github.com/google/google-api-php-client/pull/644
79
+ //curl_setopt($curl, CURLOPT_SSLVERSION, 1);
80
+
81
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
82
+ curl_setopt($curl, CURLOPT_HEADER, true);
83
+
84
+ if ($request->canGzip()) {
85
+ curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate');
86
+ }
87
+
88
+ $options = $this->client->getClassConfig('Google_IO_Curl', 'options');
89
+ if (is_array($options)) {
90
+ $this->setOptions($options);
91
+ }
92
+
93
+ foreach ($this->options as $key => $var) {
94
+ curl_setopt($curl, $key, $var);
95
+ }
96
+
97
+ if (!isset($this->options[CURLOPT_CAINFO])) {
98
+ curl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__) . '/cacerts.pem');
99
+ }
100
+
101
+ $this->client->getLogger()->debug(
102
+ 'cURL request',
103
+ array(
104
+ 'url' => $request->getUrl(),
105
+ 'method' => $request->getRequestMethod(),
106
+ 'headers' => $requestHeaders,
107
+ 'body' => $request->getPostBody()
108
+ )
109
+ );
110
+
111
+ $response = curl_exec($curl);
112
+ if ($response === false) {
113
+ $error = curl_error($curl);
114
+ $code = curl_errno($curl);
115
+ $map = $this->client->getClassConfig('Google_IO_Exception', 'retry_map');
116
+
117
+ $this->client->getLogger()->error('cURL ' . $error);
118
+ throw new Google_IO_Exception($error, $code, null, $map);
119
+ }
120
+ $headerSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
121
+
122
+ list($responseHeaders, $responseBody) = $this->parseHttpResponse($response, $headerSize);
123
+ $responseCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
124
+
125
+ $this->client->getLogger()->debug(
126
+ 'cURL response',
127
+ array(
128
+ 'code' => $responseCode,
129
+ 'headers' => $responseHeaders,
130
+ 'body' => $responseBody,
131
+ )
132
+ );
133
+
134
+ return array($responseBody, $responseHeaders, $responseCode);
135
+ }
136
+
137
+ /**
138
+ * Set options that update the transport implementation's behavior.
139
+ * @param $options
140
+ */
141
+ public function setOptions($options)
142
+ {
143
+ $this->options = $options + $this->options;
144
+ }
145
+
146
+ /**
147
+ * Set the maximum request time in seconds.
148
+ * @param $timeout in seconds
149
+ */
150
+ public function setTimeout($timeout)
151
+ {
152
+ // Since this timeout is really for putting a bound on the time
153
+ // we'll set them both to the same. If you need to specify a longer
154
+ // CURLOPT_TIMEOUT, or a higher CONNECTTIMEOUT, the best thing to
155
+ // do is use the setOptions method for the values individually.
156
+ $this->options[CURLOPT_CONNECTTIMEOUT] = $timeout;
157
+ $this->options[CURLOPT_TIMEOUT] = $timeout;
158
+ }
159
+
160
+ /**
161
+ * Get the maximum request time in seconds.
162
+ * @return timeout in seconds
163
+ */
164
+ public function getTimeout()
165
+ {
166
+ return $this->options[CURLOPT_TIMEOUT];
167
+ }
168
+
169
+ /**
170
+ * Test for the presence of a cURL header processing bug
171
+ *
172
+ * {@inheritDoc}
173
+ *
174
+ * @return boolean
175
+ */
176
+ protected function needsQuirk()
177
+ {
178
+ $ver = curl_version();
179
+ $versionNum = $ver['version_number'];
180
+ return $versionNum < Google_IO_Curl::NO_QUIRK_VERSION;
181
+ }
182
+ }
google/IO/Exception.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ class Google_IO_Exception extends Google_Exception implements Google_Task_Retryable
23
+ {
24
+ /**
25
+ * @var array $retryMap Map of errors with retry counts.
26
+ */
27
+ private $retryMap = array();
28
+
29
+ /**
30
+ * Creates a new IO exception with an optional retry map.
31
+ *
32
+ * @param string $message
33
+ * @param int $code
34
+ * @param Exception|null $previous
35
+ * @param array|null $retryMap Map of errors with retry counts.
36
+ */
37
+ public function __construct(
38
+ $message,
39
+ $code = 0,
40
+ Exception $previous = null,
41
+ array $retryMap = null
42
+ ) {
43
+ if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
44
+ parent::__construct($message, $code, $previous);
45
+ } else {
46
+ parent::__construct($message, $code);
47
+ }
48
+
49
+ if (is_array($retryMap)) {
50
+ $this->retryMap = $retryMap;
51
+ }
52
+ }
53
+
54
+ /**
55
+ * Gets the number of times the associated task can be retried.
56
+ *
57
+ * NOTE: -1 is returned if the task can be retried indefinitely
58
+ *
59
+ * @return integer
60
+ */
61
+ public function allowedRetries()
62
+ {
63
+ if (isset($this->retryMap[$this->code])) {
64
+ return $this->retryMap[$this->code];
65
+ }
66
+
67
+ return 0;
68
+ }
69
+ }
google/IO/Stream.php ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
25
+ require_once dirname(__FILE__) . '/../autoload.php';
26
+ }
27
+
28
+ class Google_IO_Stream extends Google_IO_Abstract
29
+ {
30
+ const TIMEOUT = "timeout";
31
+ const ZLIB = "compress.zlib://";
32
+ private $options = array();
33
+ private $trappedErrorNumber;
34
+ private $trappedErrorString;
35
+
36
+ private static $DEFAULT_HTTP_CONTEXT = array(
37
+ "follow_location" => 0,
38
+ "ignore_errors" => 1,
39
+ );
40
+
41
+ private static $DEFAULT_SSL_CONTEXT = array(
42
+ "verify_peer" => true,
43
+ );
44
+
45
+ public function __construct(Google_Client $client)
46
+ {
47
+ if (!ini_get('allow_url_fopen')) {
48
+ $error = 'The stream IO handler requires the allow_url_fopen runtime ' .
49
+ 'configuration to be enabled';
50
+ $client->getLogger()->critical($error);
51
+ throw new Google_IO_Exception($error);
52
+ }
53
+
54
+ parent::__construct($client);
55
+ }
56
+
57
+ /**
58
+ * Execute an HTTP Request
59
+ *
60
+ * @param Google_Http_Request $request the http request to be executed
61
+ * @return array containing response headers, body, and http code
62
+ * @throws Google_IO_Exception on curl or IO error
63
+ */
64
+ public function executeRequest(Google_Http_Request $request)
65
+ {
66
+ $default_options = stream_context_get_options(stream_context_get_default());
67
+
68
+ $requestHttpContext = array_key_exists('http', $default_options) ?
69
+ $default_options['http'] : array();
70
+
71
+ if ($request->getPostBody()) {
72
+ $requestHttpContext["content"] = $request->getPostBody();
73
+ }
74
+
75
+ $requestHeaders = $request->getRequestHeaders();
76
+ if ($requestHeaders && is_array($requestHeaders)) {
77
+ $headers = "";
78
+ foreach ($requestHeaders as $k => $v) {
79
+ $headers .= "$k: $v\r\n";
80
+ }
81
+ $requestHttpContext["header"] = $headers;
82
+ }
83
+
84
+ $requestHttpContext["method"] = $request->getRequestMethod();
85
+ $requestHttpContext["user_agent"] = $request->getUserAgent();
86
+
87
+ $requestSslContext = array_key_exists('ssl', $default_options) ?
88
+ $default_options['ssl'] : array();
89
+
90
+ if (!$this->client->isAppEngine() && !array_key_exists("cafile", $requestSslContext)) {
91
+ $requestSslContext["cafile"] = dirname(__FILE__) . '/cacerts.pem';
92
+ }
93
+
94
+ $options = array(
95
+ "http" => array_merge(
96
+ self::$DEFAULT_HTTP_CONTEXT,
97
+ $requestHttpContext
98
+ ),
99
+ "ssl" => array_merge(
100
+ self::$DEFAULT_SSL_CONTEXT,
101
+ $requestSslContext
102
+ )
103
+ );
104
+
105
+ $context = stream_context_create($options);
106
+
107
+ $url = $request->getUrl();
108
+
109
+ if ($request->canGzip()) {
110
+ $url = self::ZLIB . $url;
111
+ }
112
+
113
+ $this->client->getLogger()->debug(
114
+ 'Stream request',
115
+ array(
116
+ 'url' => $url,
117
+ 'method' => $request->getRequestMethod(),
118
+ 'headers' => $requestHeaders,
119
+ 'body' => $request->getPostBody()
120
+ )
121
+ );
122
+
123
+ // We are trapping any thrown errors in this method only and
124
+ // throwing an exception.
125
+ $this->trappedErrorNumber = null;
126
+ $this->trappedErrorString = null;
127
+
128
+ // START - error trap.
129
+ set_error_handler(array($this, 'trapError'));
130
+ $fh = fopen($url, 'r', false, $context);
131
+ restore_error_handler();
132
+ // END - error trap.
133
+
134
+ if ($this->trappedErrorNumber) {
135
+ $error = sprintf(
136
+ "HTTP Error: Unable to connect: '%s'",
137
+ $this->trappedErrorString
138
+ );
139
+
140
+ $this->client->getLogger()->error('Stream ' . $error);
141
+ throw new Google_IO_Exception($error, $this->trappedErrorNumber);
142
+ }
143
+
144
+ $response_data = false;
145
+ $respHttpCode = self::UNKNOWN_CODE;
146
+ if ($fh) {
147
+ if (isset($this->options[self::TIMEOUT])) {
148
+ stream_set_timeout($fh, $this->options[self::TIMEOUT]);
149
+ }
150
+
151
+ $response_data = stream_get_contents($fh);
152
+ fclose($fh);
153
+
154
+ $respHttpCode = $this->getHttpResponseCode($http_response_header);
155
+ }
156
+
157
+ if (false === $response_data) {
158
+ $error = sprintf(
159
+ "HTTP Error: Unable to connect: '%s'",
160
+ $respHttpCode
161
+ );
162
+
163
+ $this->client->getLogger()->error('Stream ' . $error);
164
+ throw new Google_IO_Exception($error, $respHttpCode);
165
+ }
166
+
167
+ $responseHeaders = $this->getHttpResponseHeaders($http_response_header);
168
+
169
+ $this->client->getLogger()->debug(
170
+ 'Stream response',
171
+ array(
172
+ 'code' => $respHttpCode,
173
+ 'headers' => $responseHeaders,
174
+ 'body' => $response_data,
175
+ )
176
+ );
177
+
178
+ return array($response_data, $responseHeaders, $respHttpCode);
179
+ }
180
+
181
+ /**
182
+ * Set options that update the transport implementation's behavior.
183
+ * @param $options
184
+ */
185
+ public function setOptions($options)
186
+ {
187
+ $this->options = $options + $this->options;
188
+ }
189
+
190
+ /**
191
+ * Method to handle errors, used for error handling around
192
+ * stream connection methods.
193
+ */
194
+ public function trapError($errno, $errstr)
195
+ {
196
+ $this->trappedErrorNumber = $errno;
197
+ $this->trappedErrorString = $errstr;
198
+ }
199
+
200
+ /**
201
+ * Set the maximum request time in seconds.
202
+ * @param $timeout in seconds
203
+ */
204
+ public function setTimeout($timeout)
205
+ {
206
+ $this->options[self::TIMEOUT] = $timeout;
207
+ }
208
+
209
+ /**
210
+ * Get the maximum request time in seconds.
211
+ * @return timeout in seconds
212
+ */
213
+ public function getTimeout()
214
+ {
215
+ return $this->options[self::TIMEOUT];
216
+ }
217
+
218
+ /**
219
+ * Test for the presence of a cURL header processing bug
220
+ *
221
+ * {@inheritDoc}
222
+ *
223
+ * @return boolean
224
+ */
225
+ protected function needsQuirk()
226
+ {
227
+ return false;
228
+ }
229
+
230
+ protected function getHttpResponseCode($response_headers)
231
+ {
232
+ $header_count = count($response_headers);
233
+
234
+ for ($i = 0; $i < $header_count; $i++) {
235
+ $header = $response_headers[$i];
236
+ if (strncasecmp("HTTP", $header, strlen("HTTP")) == 0) {
237
+ $response = explode(' ', $header);
238
+ return $response[1];
239
+ }
240
+ }
241
+ return self::UNKNOWN_CODE;
242
+ }
243
+ }
google/IO/cacerts.pem ADDED
@@ -0,0 +1,2183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Issuer: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc.
2
+ # Subject: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc.
3
+ # Label: "GTE CyberTrust Global Root"
4
+ # Serial: 421
5
+ # MD5 Fingerprint: ca:3d:d3:68:f1:03:5c:d0:32:fa:b8:2b:59:e8:5a:db
6
+ # SHA1 Fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74
7
+ # SHA256 Fingerprint: a5:31:25:18:8d:21:10:aa:96:4b:02:c7:b7:c6:da:32:03:17:08:94:e5:fb:71:ff:fb:66:67:d5:e6:81:0a:36
8
+ -----BEGIN CERTIFICATE-----
9
+ MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYD
10
+ VQQKEw9HVEUgQ29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNv
11
+ bHV0aW9ucywgSW5jLjEjMCEGA1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJv
12
+ b3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEzMjM1OTAwWjB1MQswCQYDVQQGEwJV
13
+ UzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQLEx5HVEUgQ3liZXJU
14
+ cnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0IEds
15
+ b2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrH
16
+ iM3dFw4usJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTS
17
+ r41tiGeA5u2ylc9yMcqlHHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X4
18
+ 04Wqk2kmhXBIgD8SFcd5tB8FLztimQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBAG3r
19
+ GwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMWM4ETCJ57NE7fQMh017l9
20
+ 3PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OFNMQkpw0P
21
+ lZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/
22
+ -----END CERTIFICATE-----
23
+
24
+ # Issuer: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division
25
+ # Subject: CN=Thawte Server CA O=Thawte Consulting cc OU=Certification Services Division
26
+ # Label: "Thawte Server CA"
27
+ # Serial: 1
28
+ # MD5 Fingerprint: c5:70:c4:a2:ed:53:78:0c:c8:10:53:81:64:cb:d0:1d
29
+ # SHA1 Fingerprint: 23:e5:94:94:51:95:f2:41:48:03:b4:d5:64:d2:a3:a3:f5:d8:8b:8c
30
+ # SHA256 Fingerprint: b4:41:0b:73:e2:e6:ea:ca:47:fb:c4:2f:8f:a4:01:8a:f4:38:1d:c5:4c:fa:a8:44:50:46:1e:ed:09:45:4d:e9
31
+ -----BEGIN CERTIFICATE-----
32
+ MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkEx
33
+ FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD
34
+ VQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlv
35
+ biBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEm
36
+ MCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wHhcNOTYwODAx
37
+ MDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT
38
+ DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3
39
+ dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNl
40
+ cyBEaXZpc2lvbjEZMBcGA1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3
41
+ DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQAD
42
+ gY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl/Kj0R1HahbUgdJSGHg91
43
+ yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg71CcEJRCX
44
+ L+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGj
45
+ EzARMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG
46
+ 7oWDTSEwjsrZqG9JGubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6e
47
+ QNuozDJ0uW8NxuOzRAvZim+aKZuZGCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZ
48
+ qdq5snUb9kLy78fyGPmJvKP/iiMucEc=
49
+ -----END CERTIFICATE-----
50
+
51
+ # Issuer: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division
52
+ # Subject: CN=Thawte Premium Server CA O=Thawte Consulting cc OU=Certification Services Division
53
+ # Label: "Thawte Premium Server CA"
54
+ # Serial: 1
55
+ # MD5 Fingerprint: 06:9f:69:79:16:66:90:02:1b:8c:8c:a2:c3:07:6f:3a
56
+ # SHA1 Fingerprint: 62:7f:8d:78:27:65:63:99:d2:7d:7f:90:44:c9:fe:b3:f3:3e:fa:9a
57
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TAQH/BAUwAwEB/zANBgkqhkiG
73
+ 9w0BAQQFAAOBgQAmSCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUI
74
+ hfzJATj/Tb7yFkJD57taRvvBxhEf8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JM
75
+ pAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7tUCemDaYj+bvLpgcUQg==
76
+ -----END CERTIFICATE-----
77
+
78
+ # Issuer: O=Equifax OU=Equifax Secure Certificate Authority
79
+ # Subject: O=Equifax OU=Equifax Secure Certificate Authority
80
+ # Label: "Equifax Secure CA"
81
+ # Serial: 903804111
82
+ # MD5 Fingerprint: 67:cb:9d:c0:13:24:8a:82:9b:b2:17:1e:d1:1b:ec:d4
83
+ # SHA1 Fingerprint: d2:32:09:ad:23:d3:14:23:21:74:e4:0d:7f:9d:62:13:97:86:63:3a
84
+ # SHA256 Fingerprint: 08:29:7a:40:47:db:a2:36:80:c7:31:db:6e:31:76:53:ca:78:48:e1:be:bd:3a:0b:01:79:a7:07:f9:2c:f1:78
85
+ -----BEGIN CERTIFICATE-----
86
+ MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
87
+ UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
88
+ dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
89
+ MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
90
+ dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
91
+ AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
92
+ BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
93
+ cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
94
+ AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
95
+ MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
96
+ aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
97
+ ODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvSspXXR9gj
98
+ IBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQF
99
+ MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
100
+ A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
101
+ 7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
102
+ 1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
103
+ -----END CERTIFICATE-----
104
+
105
+ # Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
106
+ # Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
107
+ # Label: "Verisign Class 3 Public Primary Certification Authority"
108
+ # Serial: 149843929435818692848040365716851702463
109
+ # MD5 Fingerprint: 10:fc:63:5d:f6:26:3e:0d:f3:25:be:5f:79:cd:67:67
110
+ # SHA1 Fingerprint: 74:2c:31:92:e6:07:e4:24:eb:45:49:54:2b:e1:bb:c5:3e:61:74:e2
111
+ # SHA256 Fingerprint: e7:68:56:34:ef:ac:f6:9a:ce:93:9a:6b:25:5b:7b:4f:ab:ef:42:93:5b:50:a2:65:ac:b5:cb:60:27:e4:4e:70
112
+ -----BEGIN CERTIFICATE-----
113
+ MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
114
+ A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
115
+ cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
116
+ MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
117
+ BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
118
+ YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
119
+ ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
120
+ BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
121
+ I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
122
+ CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
123
+ lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
124
+ AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
125
+ -----END CERTIFICATE-----
126
+
127
+ # Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network
128
+ # Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority - G2/(c) 1998 VeriSign, Inc. - For authorized use only/VeriSign Trust Network
129
+ # Label: "Verisign Class 3 Public Primary Certification Authority - G2"
130
+ # Serial: 167285380242319648451154478808036881606
131
+ # MD5 Fingerprint: a2:33:9b:4c:74:78:73:d4:6c:e7:c1:f3:8d:cb:5c:e9
132
+ # SHA1 Fingerprint: 85:37:1c:a6:e5:50:14:3d:ce:28:03:47:1b:de:3a:09:e8:f8:77:0f
133
+ # SHA256 Fingerprint: 83:ce:3c:12:29:68:8a:59:3d:48:5f:81:97:3c:0f:91:95:43:1e:da:37:cc:5e:36:43:0e:79:c7:a8:88:63:8b
134
+ -----BEGIN CERTIFICATE-----
135
+ MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ
136
+ BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh
137
+ c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy
138
+ MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp
139
+ emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X
140
+ DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw
141
+ FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg
142
+ UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo
143
+ YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5
144
+ MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEB
145
+ AQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCOFoUgRm1HP9SFIIThbbP4
146
+ pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71lSk8UOg0
147
+ 13gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwID
148
+ AQABMA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSk
149
+ U01UbSuvDV1Ai2TT1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7i
150
+ F6YM40AIOw7n60RzKprxaZLvcRTDOaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpY
151
+ oJ2daZH9
152
+ -----END CERTIFICATE-----
153
+
154
+ # Issuer: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA
155
+ # Subject: CN=GlobalSign Root CA O=GlobalSign nv-sa OU=Root CA
156
+ # Label: "GlobalSign Root CA"
157
+ # Serial: 4835703278459707669005204
158
+ # MD5 Fingerprint: 3e:45:52:15:09:51:92:e1:b7:5d:37:9f:b1:87:29:8a
159
+ # SHA1 Fingerprint: b1:bc:96:8b:d4:f4:9d:62:2a:a8:9a:81:f2:15:01:52:a4:1d:82:9c
160
+ # SHA256 Fingerprint: eb:d4:10:40:e4:bb:3e:c7:42:c9:e3:81:d3:1e:f2:a4:1a:48:b6:68:5c:96:e7:ce:f3:c1:df:6c:d4:33:1c:99
161
+ -----BEGIN CERTIFICATE-----
162
+ MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG
163
+ A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
164
+ b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAw
165
+ MDBaFw0yODAxMjgxMjAwMD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
183
+ # Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2
184
+ # Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R2
185
+ # Label: "GlobalSign Root CA - R2"
186
+ # Serial: 4835703278459682885658125
187
+ # MD5 Fingerprint: 94:14:77:7e:3e:5e:fd:8f:30:bd:41:b0:cf:e7:d0:30
188
+ # SHA1 Fingerprint: 75:e0:ab:b6:13:85:12:27:1c:04:f8:5f:dd:de:38:e4:b7:24:2e:fe
189
+ # SHA256 Fingerprint: ca:42:dd:41:74:5f:d0:b8:1e:b9:02:36:2c:f9:d8:bf:71:9d:a1:bd:1b:1e:fc:94:6f:5b:4c:99:f4:2c:1b:9e
190
+ -----BEGIN CERTIFICATE-----
191
+ MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
192
+ A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp
193
+ Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1
194
+ MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG
195
+ A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
196
+ hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL
197
+ v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8
198
+ eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq
199
+ tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd
200
+ C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa
201
+ zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB
202
+ mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH
203
+ V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n
204
+ bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG
205
+ 3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs
206
+ J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO
207
+ 291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS
208
+ ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd
209
+ AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
210
+ TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
211
+ -----END CERTIFICATE-----
212
+
213
+ # Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority
214
+ # Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 1 Policy Validation Authority
215
+ # Label: "ValiCert Class 1 VA"
216
+ # Serial: 1
217
+ # MD5 Fingerprint: 65:58:ab:15:ad:57:6c:1e:a8:a7:b5:69:ac:bf:ff:eb
218
+ # SHA1 Fingerprint: e5:df:74:3c:b6:01:c4:9b:98:43:dc:ab:8c:e8:6a:81:10:9f:e4:8e
219
+ # SHA256 Fingerprint: f4:c1:49:55:1a:30:13:a3:5b:c7:b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I8sogTLDAHkY7FkXicnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPw
236
+ nXS3qT6gpf+2SQMT2iLM7XGCK5nPOrf1LXLI
237
+ -----END CERTIFICATE-----
238
+
239
+ # Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority
240
+ # Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 2 Policy Validation Authority
241
+ # Label: "ValiCert Class 2 VA"
242
+ # Serial: 1
243
+ # MD5 Fingerprint: a9:23:75:9b:ba:49:36:6e:31:c2:db:f2:e7:66:ba:87
244
+ # SHA1 Fingerprint: 31:7a:2a:d0:7f:2b:33:5e:f5:a1:c3:4e:4b:57:e8:b7:d8:f1:fc:a6
245
+ # SHA256 Fingerprint: 58:d0:17:27:9c:d4:dc:63:ab:dd:b1:96:a6:c9:90:6c:30:c4:e0:87:83:ea:e8:c1:60:99:54:d6:93:55:59:6b
246
+ -----BEGIN CERTIFICATE-----
247
+ MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0
248
+ IFZhbGlkYXRpb24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAz
249
+ BgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9y
250
+ aXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG
251
+ 9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAwMTk1NFoXDTE5MDYy
252
+ NjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0d29y
253
+ azEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs
254
+ YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRw
255
+ Oi8vd3d3LnZhbGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNl
256
+ cnQuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOOnHK5avIWZJV16vY
257
+ dA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVCCSRrCl6zfN1SLUzm1NZ9
258
+ WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7RfZHM047QS
259
+ v4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9v
260
+ UJSZSWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTu
261
+ IYEZoDJJKPTEjlbVUjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwC
262
+ W/POuZ6lcg5Ktz885hZo+L7tdEy8W9ViH0Pd
263
+ -----END CERTIFICATE-----
264
+
265
+ # Issuer: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority
266
+ # Subject: CN=http://www.valicert.com/ O=ValiCert, Inc. OU=ValiCert Class 3 Policy Validation Authority
267
+ # Label: "RSA Root Certificate 1"
268
+ # Serial: 1
269
+ # MD5 Fingerprint: a2:6f:53:b7:ee:40:db:4a:68:e7:fa:18:d9:10:4b:72
270
+ # SHA1 Fingerprint: 69:bd:8c:f4:9c:d3:00:fb:59:2e:17:93:ca:55:6a:f3:ec:aa:35:fb
271
+ # SHA256 Fingerprint: bc:23:f9:8a:31:3c:b9:2d:e3:bb:fc:3a:5a:9f:44:61:ac:39:49:4c:4a:e1:5a:9e:9d:f1:31:e9:9b:73:01:9a
272
+ -----BEGIN CERTIFICATE-----
273
+ MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBg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uer: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
292
+ # Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
293
+ # Label: "Verisign Class 3 Public Primary Certification Authority - G3"
294
+ # Serial: 206684696279472310254277870180966723415
295
+ # MD5 Fingerprint: cd:68:b6:a7:c7:c4:ce:75:e0:1d:4f:57:44:61:92:09
296
+ # SHA1 Fingerprint: 13:2d:0d:45:53:4b:69:97:cd:b2:d5:c3:39:e2:55:76:60:9b:5c:c6
297
+ # SHA256 Fingerprint: eb:04:cf:5e:b1:f3:9a:fa:76:2f:2b:b1:20:f2:96:cb:a5:20:c1:b9:7d:b1:58:95:65:b8:1c:b9:a1:7b:72:44
298
+ -----BEGIN CERTIFICATE-----
299
+ MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
300
+ CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
301
+ cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
302
+ LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
303
+ aWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
304
+ dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
305
+ VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
306
+ aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
307
+ bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
308
+ IENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
309
+ LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMu6nFL8eB8aHm8b
310
+ N3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1EUGO+i2t
311
+ KmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGu
312
+ kxUccLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBm
313
+ CC+Vk7+qRy+oRpfwEuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJ
314
+ Xwzw3sJ2zq/3avL6QaaiMxTJ5Xpj055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWu
315
+ imi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAERSWwauSCPc/L8my/uRan2Te
316
+ 2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5fj267Cz3qWhMe
317
+ DGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
318
+ /Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565p
319
+ F4ErWjfJXir0xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGt
320
+ TxzhT5yvDwyd93gN2PQ1VoDat20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
321
+ -----END CERTIFICATE-----
322
+
323
+ # Issuer: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
324
+ # Subject: CN=VeriSign Class 4 Public Primary Certification Authority - G3 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 1999 VeriSign, Inc. - For authorized use only
325
+ # Label: "Verisign Class 4 Public Primary Certification Authority - G3"
326
+ # Serial: 314531972711909413743075096039378935511
327
+ # MD5 Fingerprint: db:c8:f2:27:2e:b1:ea:6a:29:23:5d:fe:56:3e:33:df
328
+ # SHA1 Fingerprint: c8:ec:8c:87:92:69:cb:4b:ab:39:e9:8d:7e:57:67:f3:14:95:73:9d
329
+ # SHA256 Fingerprint: e3:89:36:0d:0f:db:ae:b3:d2:50:58:4b:47:30:31:4e:22:2f:39:c1:56:a0:20:14:4e:8d:96:05:61:79:15:06
330
+ -----BEGIN CERTIFICATE-----
331
+ MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQsw
332
+ CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZl
333
+ cmlTaWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWdu
334
+ LCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlT
335
+ aWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
336
+ dHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQswCQYD
337
+ VQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlT
338
+ aWduIFRydXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJ
339
+ bmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWdu
340
+ IENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkg
341
+ LSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK3LpRFpxlmr8Y+1
342
+ GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaStBO3IFsJ
343
+ +mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0Gbd
344
+ U6LM8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLm
345
+ NxdLMEYH5IBtptiWLugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XY
346
+ ufTsgsbSPZUd5cBPhMnZo0QoBmrXRazwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/
347
+ ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAj/ola09b5KROJ1WrIhVZPMq1
348
+ CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXttmhwwjIDLk5Mq
349
+ g6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
350
+ fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c
351
+ 2NU8Qh0XwRJdRTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/
352
+ bLvSHgCwIe34QWKCudiyxLtGUPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
353
+ -----END CERTIFICATE-----
354
+
355
+ # Issuer: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
356
+ # Subject: CN=Entrust.net Secure Server Certification Authority O=Entrust.net OU=www.entrust.net/CPS incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
357
+ # Label: "Entrust.net Secure Server CA"
358
+ # Serial: 927650371
359
+ # MD5 Fingerprint: df:f2:80:73:cc:f1:e6:61:73:fc:f5:42:e9:c5:7c:ee
360
+ # SHA1 Fingerprint: 99:a6:9b:e6:1a:fe:88:6b:4d:2b:82:00:7c:b8:54:fc:31:7e:15:39
361
+ # SHA256 Fingerprint: 62:f2:40:27:8c:56:4c:4d:d8:bf:7d:9d:4f:6f:36:6e:a8:94:d2:2f:5f:34:d9:89:a9:83:ac:ec:2f:ff:ed:50
362
+ -----BEGIN CERTIFICATE-----
363
+ MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMC
364
+ VVMxFDASBgNVBAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5u
365
+ ZXQvQ1BTIGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMc
366
+ KGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDE6MDgGA1UEAxMxRW50cnVzdC5u
367
+ ZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05OTA1
368
+ MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIGA1UE
369
+ ChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5j
370
+ b3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF
371
+ bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUg
372
+ U2VydmVyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUA
373
+ A4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQaO2f55M28Qpku0f1BBc/
374
+ I0dNxScZgSYMV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ust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
392
+ # Subject: CN=Entrust.net Certification Authority (2048) O=Entrust.net OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/(c) 1999 Entrust.net Limited
393
+ # Label: "Entrust.net Premium 2048 Secure Server CA"
394
+ # Serial: 946059622
395
+ # MD5 Fingerprint: ba:21:ea:20:d6:dd:db:8f:c1:57:8b:40:ad:a1:fc:fc
396
+ # SHA1 Fingerprint: 80:1d:62:d0:7b:44:9d:5c:5c:03:5c:98:ea:61:fa:44:3c:2a:58:fe
397
+ # SHA256 Fingerprint: d1:c3:39:ea:27:84:eb:87:0f:93:4f:c5:63:4e:4a:a9:ad:55:05:01:64:01:f2:64:65:d3:7a:57:46:63:35:9f
398
+ -----BEGIN CERTIFICATE-----
399
+ MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChML
400
+ RW50cnVzdC5uZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBp
401
+ bmNvcnAuIGJ5IHJlZi4gKGxpbWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5
402
+ IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNVBAMTKkVudHJ1c3QubmV0IENlcnRp
403
+ ZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQxNzUwNTFaFw0xOTEy
404
+ MjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3d3d3
405
+ LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxp
406
+ YWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEG
407
+ A1UEAxMqRW50cnVzdC5uZXQgQ2VydGlmaWNhd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CyberTrust Root O=Baltimore OU=CyberTrust
426
+ # Subject: CN=Baltimore CyberTrust Root O=Baltimore OU=CyberTrust
427
+ # Label: "Baltimore CyberTrust Root"
428
+ # Serial: 33554617
429
+ # MD5 Fingerprint: ac:b6:94:a5:9c:17:e0:d7:91:52:9b:b1:97:06:a6:e4
430
+ # SHA1 Fingerprint: d4:de:20:d0:5e:66:fc:53:fe:1a:50:88:2c:78:db:28:52:ca:e4:74
431
+ # SHA256 Fingerprint: 16:af:57:a9:f6:76:b0:ab:12:60:95:aa:5e:ba:de:f2:2a:b3:11:19:d6:44:ac:95:cd:4b:93:db:f3:f2:6a:eb
432
+ -----BEGIN CERTIFICATE-----
433
+ MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
434
+ RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD
435
+ VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX
436
+ DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y
437
+ ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy
438
+ VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr
439
+ mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr
440
+ IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK
441
+ mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu
442
+ XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy
443
+ dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye
444
+ jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1
445
+ BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3
446
+ DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT92
447
+ 9hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3Wgx
448
+ jkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0
449
+ Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhz
450
+ ksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLS
451
+ R9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
452
+ -----END CERTIFICATE-----
453
+
454
+ # Issuer: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc.
455
+ # Subject: CN=Equifax Secure Global eBusiness CA-1 O=Equifax Secure Inc.
456
+ # Label: "Equifax Secure Global eBusiness CA"
457
+ # Serial: 1
458
+ # MD5 Fingerprint: 8f:5d:77:06:27:c4:98:3c:5b:93:78:e7:d7:7d:9b:cc
459
+ # SHA1 Fingerprint: 7e:78:4a:10:1c:82:65:cc:2d:e1:f1:6d:47:b4:40:ca:d9:0a:19:45
460
+ # SHA256 Fingerprint: 5f:0b:62:ea:b5:e3:53:ea:65:21:65:16:58:fb:b6:53:59:f4:43:28:0a:4a:fb:d1:04:d7:7d:10:f9:f0:4c:07
461
+ -----BEGIN CERTIFICATE-----
462
+ MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEc
463
+ MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBT
464
+ ZWN1cmUgR2xvYmFsIGVCdXNpbmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIw
465
+ MDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0VxdWlmYXggU2Vj
466
+ dXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEdsb2JhbCBlQnVzaW5l
467
+ c3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRVPEnC
468
+ UdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc
469
+ 58O/gGzNqfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/
470
+ o5brhTMhHD4ePmBudpxnhcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAH
471
+ MA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUvqigdHJQa0S3ySPY+6j/s1dr
472
+ aGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hsMA0GCSqGSIb3DQEBBAUA
473
+ A4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okENI7SS+RkA
474
+ Z70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv
475
+ 8qIYNMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV
476
+ -----END CERTIFICATE-----
477
+
478
+ # Issuer: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc.
479
+ # Subject: CN=Equifax Secure eBusiness CA-1 O=Equifax Secure Inc.
480
+ # Label: "Equifax Secure eBusiness CA 1"
481
+ # Serial: 4
482
+ # MD5 Fingerprint: 64:9c:ef:2e:44:fc:c6:8f:52:07:d0:51:73:8f:cb:3d
483
+ # SHA1 Fingerprint: da:40:18:8b:91:89:a3:ed:ee:ae:da:97:fe:2f:9d:f5:b7:d1:8a:41
484
+ # SHA256 Fingerprint: cf:56:ff:46:a4:a1:86:10:9d:d9:65:84:b5:ee:b5:8a:51:0c:42:75:b0:e5:f9:4f:40:bb:ae:86:5e:19:f6:73
485
+ -----BEGIN CERTIFICATE-----
486
+ MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEc
487
+ MBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBT
488
+ ZWN1cmUgZUJ1c2luZXNzIENBLTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQw
489
+ MDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMTRXF1aWZheCBTZWN1cmUgSW5j
490
+ LjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENBLTEwgZ8wDQYJ
491
+ KoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ1MRo
492
+ RvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBu
493
+ WqDZQu4aIZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKw
494
+ Env+j6YDAgMBAAGjZjBkMBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTAD
495
+ AQH/MB8GA1UdIwQYMBaAFEp4MlIR21kWNl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRK
496
+ eDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQFAAOBgQB1W6ibAxHm6VZM
497
+ zfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5lSE/9dR+
498
+ WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN
499
+ /Bf+KpYrtWKmpj29f5JZzVoqgrI3eQ==
500
+ -----END CERTIFICATE-----
501
+
502
+ # Issuer: O=Equifax Secure OU=Equifax Secure eBusiness CA-2
503
+ # Subject: O=Equifax Secure OU=Equifax Secure eBusiness CA-2
504
+ # Label: "Equifax Secure eBusiness CA 2"
505
+ # Serial: 930140085
506
+ # MD5 Fingerprint: aa:bf:bf:64:97:da:98:1d:6f:c6:08:3a:95:70:33:ca
507
+ # SHA1 Fingerprint: 39:4f:f6:85:0b:06:be:52:e5:18:56:cc:10:e1:80:e8:82:b3:85:cc
508
+ # SHA256 Fingerprint: 2f:27:4e:48:ab:a4:ac:7b:76:59:33:10:17:75:50:6d:c3:0e:e3:8e:f6:ac:d5:c0:49:32:cf:e0:41:23:42:20
509
+ -----BEGIN CERTIFICATE-----
510
+ MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
511
+ UzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2Vj
512
+ dXJlIGVCdXNpbmVzcyBDQS0yMB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0
513
+ NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkVxdWlmYXggU2VjdXJlMSYwJAYD
514
+ VQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCBnzANBgkqhkiG9w0B
515
+ AQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn2Z0G
516
+ vxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/
517
+ BPO3QSQ5BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0C
518
+ AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEX
519
+ MBUGA1UEChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJl
520
+ IGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTkw
521
+ NjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9euSBIplBq
522
+ y/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQF
523
+ MAMBAf8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUA
524
+ A4GBAAyGgq3oThr1jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy
525
+ 0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1
526
+ E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUmV+GRMOrN
527
+ -----END CERTIFICATE-----
528
+
529
+ # Issuer: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network
530
+ # Subject: CN=AddTrust Class 1 CA Root O=AddTrust AB OU=AddTrust TTP Network
531
+ # Label: "AddTrust Low-Value Services Root"
532
+ # Serial: 1
533
+ # MD5 Fingerprint: 1e:42:95:02:33:92:6b:b9:5f:c0:7f:da:d6:b2:4b:fc
534
+ # SHA1 Fingerprint: cc:ab:0e:a0:4c:23:01:d6:69:7b:dd:37:9f:cd:12:eb:24:e3:94:9d
535
+ # SHA256 Fingerprint: 8c:72:09:27:9a:c0:4e:27:5e:16:d0:7f:d3:b7:75:e8:01:54:b5:96:80:46:e3:1f:52:dd:25:76:63:24:e9:a7
536
+ -----BEGIN CERTIFICATE-----
537
+ MIIEGDCCAwCgAwIBAgIBAT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ZGRUcnVzdCBDbGFzcyAxIENB
553
+ IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxtZBsfzQ3duQH6lmM0MkhHma6X
554
+ 7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0PhiVYrqW9yTkkz
555
+ 43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY
556
+ eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJl
557
+ pz/+0WatC7xrmYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOA
558
+ WiFeIc9TVPC6b4nbqKqVz4vjccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
559
+ -----END CERTIFICATE-----
560
+
561
+ # Issuer: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network
562
+ # Subject: CN=AddTrust External CA Root O=AddTrust AB OU=AddTrust External TTP Network
563
+ # Label: "AddTrust External Root"
564
+ # Serial: 1
565
+ # MD5 Fingerprint: 1d:35:54:04:85:78:b0:3f:42:42:4d:bf:20:73:0a:3f
566
+ # SHA1 Fingerprint: 02:fa:f3:e2:91:43:54:68:60:78:57:69:4d:f5:e4:5b:68:85:18:68
567
+ # SHA256 Fingerprint: 68:7f:a4:51:38:22:78:ff:f0:c8:b1:1f:8d:43:d5:76:67:1c:6e:b2:bc:ea:b4:13:fb:83:d9:65:d0:6d:2f:f2
568
+ -----BEGIN CERTIFICATE-----
569
+ MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU
570
+ MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs
571
+ IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290
572
+ MB4XDTAwMDUzMDEw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t9x+Tu5w/Rw5
588
+ 6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC
589
+ Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX
590
+ c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a
591
+ mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
592
+ -----END CERTIFICATE-----
593
+
594
+ # Issuer: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network
595
+ # Subject: CN=AddTrust Public CA Root O=AddTrust AB OU=AddTrust TTP Network
596
+ # Label: "AddTrust Public Services Root"
597
+ # Serial: 1
598
+ # MD5 Fingerprint: c1:62:3e:23:c5:82:73:9c:03:59:4b:2b:e9:77:49:7f
599
+ # SHA1 Fingerprint: 2a:b6:28:48:5e:78:fb:f3:ad:9e:79:10:dd:6b:df:99:72:2c:96:e5
600
+ # SHA256 Fingerprint: 07:91:ca:07:49:b2:07:82:aa:d3:c7:d7:bd:0c:df:c9:48:58:35:84:3e:b2:d7:99:60:09:ce:43:ab:6c:69:27
601
+ -----BEGIN CERTIFICATE-----
602
+ MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEU
603
+ MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
604
+ b3JrMSAwHgYDVQQDExdBZGRUcnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAx
605
+ MDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtB
606
+ ZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIDAeBgNV
607
+ BAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIB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
+ XiLsks3/QppEIW1cxeMiHV9HEufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
624
+ -----END CERTIFICATE-----
625
+
626
+ # Issuer: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network
627
+ # Subject: CN=AddTrust Qualified CA Root O=AddTrust AB OU=AddTrust TTP Network
628
+ # Label: "AddTrust Qualified Certificates Root"
629
+ # Serial: 1
630
+ # MD5 Fingerprint: 27:ec:39:47:cd:da:5a:af:e2:9a:01:65:21:a9:4c:bb
631
+ # SHA1 Fingerprint: 4d:23:78:ec:91:95:39:b5:00:7f:75:8f:03:3b:21:1e:c5:4d:8b:cf
632
+ # SHA256 Fingerprint: 80:95:21:08:05:db:4b:bc:35:5e:44:28:d8:fd:6e:c2:cd:e3:ab:5f:b9:7a:99:42:98:8e:b8:f4:dc:d0:60:16
633
+ -----BEGIN CERTIFICATE-----
634
+ MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEU
635
+ MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
636
+ b3JrMSMwIQYDVQQDExpBZGRUcnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1
637
+ MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcxCzAJBgNVBAYTAlNFMRQwEgYDVQQK
638
+ EwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5ldHdvcmsxIzAh
639
+ BgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG9w0B
640
+ AQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwq
641
+ xBb/4Oxx64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G
642
+ 87B4pfYOQnrjfxvM0PC3KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i
643
+ 2O+tCBGaKZnhqkRFmhJePp1tUvznoD1oL/BLcHwTOK28FSXx1s6rosAx1i+f4P8U
644
+ WfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GRwVY18BTcZTYJbqukB8c1
645
+ 0cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HUMIHRMB0G
646
+ A1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0T
647
+ AQH/BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6Fr
648
+ pGkwZzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQL
649
+ ExRBZGRUcnVzdCBUVFAgTmV0d29yazEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlm
650
+ aWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBABmrder4i2VhlRO6aQTv
651
+ hsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxGGuoYQ992zPlm
652
+ hpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X
653
+ dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3
654
+ P6CxB9bpT9zeRXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9Y
655
+ iQBCYz95OdBEsIJuQRno3eDBiFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5no
656
+ xqE=
657
+ -----END CERTIFICATE-----
658
+
659
+ # Issuer: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc.
660
+ # Subject: CN=Entrust Root Certification Authority O=Entrust, Inc. OU=www.entrust.net/CPS is incorporated by reference/(c) 2006 Entrust, Inc.
661
+ # Label: "Entrust Root Certification Authority"
662
+ # Serial: 1164660820
663
+ # MD5 Fingerprint: d6:a5:c3:ed:5d:dd:3e:00:c1:3d:87:92:1f:1d:3f:e4
664
+ # SHA1 Fingerprint: b3:1e:b1:b7:40:e3:6c:84:02:da:dc:37:d4:4d:f5:d4:67:49:52:f9
665
+ # SHA256 Fingerprint: 73:c1:76:43:4f:1b:c6:d5:ad:f4:5b:0e:76:e7:27:28:7c:8d:e5:76:16:c1:e6:e6:14:1a:2b:2c:bc:7d:8e:4c
666
+ -----BEGIN CERTIFICATE-----
667
+ MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMC
668
+ VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0
669
+ Lm5ldC9DUFMgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW
670
+ KGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsGA1UEAxMkRW50cnVzdCBSb290IENl
671
+ cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0MloXDTI2MTEyNzIw
672
+ NTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMuMTkw
673
+ NwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSBy
674
+ ZWZlcmVuY2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNV
675
+ BAMTJEVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJ
676
+ KoZIhvcNAQEBBQADggEPADCCAQoCggEBALaVtkNC+sZtKm9I35RMOV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: CN=GeoTrust Global CA O=GeoTrust Inc.
695
+ # Subject: CN=GeoTrust Global CA O=GeoTrust Inc.
696
+ # Label: "GeoTrust Global CA"
697
+ # Serial: 144470
698
+ # MD5 Fingerprint: f7:75:ab:29:fb:51:4e:b7:77:5e:ff:05:3c:99:8e:f5
699
+ # SHA1 Fingerprint: de:28:f4:a4:ff:e5:b9:2f:a3:c5:03:d1:a3:49:a7:f9:96:2a:82:12
700
+ # SHA256 Fingerprint: ff:85:6a:2d:25:1d:cd:88:d3:66:56:f4:50:12:67:98:cf:ab:aa:de:40:79:9c:72:2d:e4:d2:b5:db:36:a7:3a
701
+ -----BEGIN CERTIFICATE-----
702
+ MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
703
+ MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
704
+ YWwgQ0EwHhcNMDIwNTIxMDQwMDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQG
705
+ EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEbMBkGA1UEAxMSR2VvVHJ1c3Qg
706
+ R2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2swYYzD9
707
+ 9BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjoBbdq
708
+ fnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDv
709
+ iS2Aelet8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU
710
+ 1XupGc1V3sjs0l44U+VcT4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+
711
+ bw8HHa8sHo9gOeL6NlMTOdReJivbPagUvTLrGAMoUgRx5aszPeE4uwc2hGKceeoW
712
+ MPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTA
713
+ ephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVkDBF9qn1l
714
+ uMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKIn
715
+ Z57QzxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfS
716
+ tQWVYrmm3ok9Nns4d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcF
717
+ PseKUgzbFbS9bZvlxrFUaKnjaZC2mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Un
718
+ hw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6pXE0zX5IJL4hmXXeXxx12E6nV
719
+ 5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvmMw==
720
+ -----END CERTIFICATE-----
721
+
722
+ # Issuer: CN=GeoTrust Global CA 2 O=GeoTrust Inc.
723
+ # Subject: CN=GeoTrust Global CA 2 O=GeoTrust Inc.
724
+ # Label: "GeoTrust Global CA 2"
725
+ # Serial: 1
726
+ # MD5 Fingerprint: 0e:40:a7:6c:de:03:5d:8f:d1:0f:e4:d1:8d:f9:6c:a9
727
+ # SHA1 Fingerprint: a9:e9:78:08:14:37:58:88:f2:05:19:b0:6d:2b:0d:2b:60:16:90:7d
728
+ # SHA256 Fingerprint: ca:2d:82:a0:86:77:07:2f:8a:b6:76:4f:f0:35:67:6c:fe:3e:5e:32:5e:01:21:72:df:3f:92:09:6d:b7:9b:85
729
+ -----BEGIN CERTIFICATE-----
730
+ MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEW
731
+ MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFs
732
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uPOtSCP8HNR6fNWpHSlaY0VqFH4z1Ir+rzoPz
748
+ 4iIprn2DQKi6bA==
749
+ -----END CERTIFICATE-----
750
+
751
+ # Issuer: CN=GeoTrust Universal CA O=GeoTrust Inc.
752
+ # Subject: CN=GeoTrust Universal CA O=GeoTrust Inc.
753
+ # Label: "GeoTrust Universal CA"
754
+ # Serial: 1
755
+ # MD5 Fingerprint: 92:65:58:8b:a2:1a:31:72:73:68:5c:b4:a5:7a:07:48
756
+ # SHA1 Fingerprint: e6:21:f3:35:43:79:05:9a:4b:68:30:9d:8a:2f:74:22:15:87:ec:79
757
+ # SHA256 Fingerprint: a0:45:9b:9f:63:b2:25:59:f5:fa:5d:4c:6d:b3:f9:f7:2f:f1:93:42:03:35:78:f0:73:bf:1d:1b:46:cb:b9:12
758
+ -----BEGIN CERTIFICATE-----
759
+ MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEW
760
+ MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVy
761
+ c2FsIENBMB4XDTA0MDMwNDA1MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UE
762
+ BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xHjAcBgNVBAMTFUdlb1RydXN0
763
+ IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKYV
764
+ VaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9tJPi8
765
+ cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTT
766
+ QjOgNB0eRXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFh
767
+ F7em6fgemdtzbvQKoiFs7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR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rDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2DFKW
784
+ koRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9
785
+ ER/frslKxfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQt
786
+ DF4JbAiXfKM9fJP/P6EUp8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/Sfuvm
787
+ bJxPgWp6ZKy7PtXny3YuxadIwVyQD8vIP/rmMuGNG2+k5o7Y+SlIis5z/iw=
788
+ -----END CERTIFICATE-----
789
+
790
+ # Issuer: CN=GeoTrust Universal CA 2 O=GeoTrust Inc.
791
+ # Subject: CN=GeoTrust Universal CA 2 O=GeoTrust Inc.
792
+ # Label: "GeoTrust Universal CA 2"
793
+ # Serial: 1
794
+ # MD5 Fingerprint: 34:fc:b8:d0:36:db:9e:14:b3:c2:f2:db:8f:e4:94:c7
795
+ # SHA1 Fingerprint: 37:9a:19:7b:41:85:45:35:0c:a6:03:69:f3:3c:2e:af:47:4f:20:79
796
+ # SHA256 Fingerprint: a0:23:4f:3b:c8:52:7c:a5:62:8e:ec:81:ad:5d:69:89:5d:a5:68:0d:c9:1d:1c:b8:47:7f:33:f8:78:b9:5b:0b
797
+ -----BEGIN CERTIFICATE-----
798
+ MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEW
799
+ MBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVy
800
+ c2FsIENBIDIwHhcNMDQwMzA0MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYD
801
+ VQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1
802
+ c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
803
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Qp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgr
819
+ Fg5fNuH8KrUwJM/gYwx7WBr+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSo
820
+ ag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpqA1Ihn0CoZ1Dy81of398j9tx4TuaY
821
+ T1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpgY+RdM4kX2TGq2tbz
822
+ GDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiPpm8m
823
+ 1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJV
824
+ OCiNUW7dFGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH
825
+ 6aLcr34YEoP9VhdBLtUpgn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwX
826
+ QMAJKOSLakhT2+zNVVXxxvjpoixMptEmX36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
827
+ -----END CERTIFICATE-----
828
+
829
+ # Issuer: CN=America Online Root Certification Authority 1 O=America Online Inc.
830
+ # Subject: CN=America Online Root Certification Authority 1 O=America Online Inc.
831
+ # Label: "America Online Root Certification Authority 1"
832
+ # Serial: 1
833
+ # MD5 Fingerprint: 14:f1:08:ad:9d:fa:64:e2:89:e7:1c:cf:a8:ad:7d:5e
834
+ # SHA1 Fingerprint: 39:21:c1:15:c1:5d:0e:ca:5c:cb:5b:c4:f0:7d:21:d8:05:0b:56:6a
835
+ # SHA256 Fingerprint: 77:40:73:12:c6:3a:15:3d:5b:c0:0b:4e:51:75:9c:df:da:c2:37:dc:2a:33:b6:79:46:e9:8e:9b:fa:68:0a:e3
836
+ -----BEGIN CERTIFICATE-----
837
+ MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUz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AI25jP4BKxQft3OJvx8Fi8eNy1gTIdGcL+oir
854
+ oQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43gKd8hdIaC2y+C
855
+ MMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds
856
+ sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7
857
+ -----END CERTIFICATE-----
858
+
859
+ # Issuer: CN=America Online Root Certification Authority 2 O=America Online Inc.
860
+ # Subject: CN=America Online Root Certification Authority 2 O=America Online Inc.
861
+ # Label: "America Online Root Certification Authority 2"
862
+ # Serial: 1
863
+ # MD5 Fingerprint: d6:ed:3c:ca:e2:66:0f:af:10:43:0d:77:9b:04:09:bf
864
+ # SHA1 Fingerprint: 85:b5:ff:67:9b:0c:79:96:1f:c8:6e:44:22:00:46:13:db:17:92:84
865
+ # SHA256 Fingerprint: 7d:3b:46:5a:60:14:e5:26:c0:af:fc:ee:21:27:d2:31:17:27:ad:81:1c:26:84:2d:00:6a:f3:73:06:cc:80:bd
866
+ -----BEGIN CERTIFICATE-----
867
+ MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEc
868
+ MBoGA1UEChMTQW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBP
869
+ bmxpbmUgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2
870
+ MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkGA1UEBhMCVVMxHDAaBgNVBAoTE0Ft
871
+ ZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2EgT25saW5lIFJvb3Qg
872
+ Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIP
873
+ ADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU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3Bkku+KVqdPzW+5X1R+FXgJXUjhx5c3LqdsKyzadsXg8n33gy8
890
+ CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//ZoyzH1kUQ7rVyZ2OuMe
891
+ IjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgOZtMA
892
+ DjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2F
893
+ AjgQ5ANh1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUX
894
+ Om/9riW99XJZZLF0KjhfGEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPb
895
+ AZO1XB4Y3WRayhgoPmMEEf0cjQAPuDffZ4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQl
896
+ Zvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuPcX/9XhmgD0uRuMRUvAaw
897
+ RY8mkaKO/qk=
898
+ -----END CERTIFICATE-----
899
+
900
+ # Issuer: CN=AAA Certificate Services O=Comodo CA Limited
901
+ # Subject: CN=AAA Certificate Services O=Comodo CA Limited
902
+ # Label: "Comodo AAA Services root"
903
+ # Serial: 1
904
+ # MD5 Fingerprint: 49:79:04:b0:eb:87:19:ac:47:b0:bc:11:51:9b:74:d0
905
+ # SHA1 Fingerprint: d1:eb:23:a4:6d:17:d6:8f:d9:25:64:c2:f1:f1:60:17:64:d8:e3:49
906
+ # SHA256 Fingerprint: d7:a7:a0:fb:5d:7e:27:31:d7:71:e9:48:4e:bc:de:f7:1d:5f:0c:3e:0a:29:48:78:2b:c8:3e:e0:ea:69:9e:f4
907
+ -----BEGIN CERTIFICATE-----
908
+ MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEb
909
+ MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgY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AQUF
925
+ AAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm7l3sAg9g1o1Q
926
+ GE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
927
+ Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2
928
+ G9w84FoVxp7Z8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsi
929
+ l2D4kF501KKaU73yqWjgom7C12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3
930
+ smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
931
+ -----END CERTIFICATE-----
932
+
933
+ # Issuer: CN=Secure Certificate Services O=Comodo CA Limited
934
+ # Subject: CN=Secure Certificate Services O=Comodo CA Limited
935
+ # Label: "Comodo Secure Services root"
936
+ # Serial: 1
937
+ # MD5 Fingerprint: d3:d9:bd:ae:9f:ac:67:24:b3:c8:1b:52:e1:b9:a9:bd
938
+ # SHA1 Fingerprint: 4a:65:d5:f4:1d:ef:39:b8:b8:90:4a:4a:d3:64:81:33:cf:c7:a1:d1
939
+ # SHA256 Fingerprint: bd:81:ce:3b:4f:65:91:d1:1a:67:b5:fc:7a:47:fd:ef:25:52:1b:f9:aa:4e:18:b9:e3:df:2e:34:a7:80:3b:e8
940
+ -----BEGIN CERTIFICATE-----
941
+ MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEb
942
+ MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
943
+ GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRp
944
+ ZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAwMFoXDTI4MTIzMTIzNTk1OVow
945
+ fjEL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Qezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtI
961
+ gKvcnDe4IRRLDXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJ
962
+ aD61JlfutuC23bkpgHl9j6PwpCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDl
963
+ izeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1HRR3B7Hzs/Sk=
964
+ -----END CERTIFICATE-----
965
+
966
+ # Issuer: CN=Trusted Certificate Services O=Comodo CA Limited
967
+ # Subject: CN=Trusted Certificate Services O=Comodo CA Limited
968
+ # Label: "Comodo Trusted Services root"
969
+ # Serial: 1
970
+ # MD5 Fingerprint: 91:1b:3f:6e:cd:9e:ab:ee:07:fe:1f:71:d2:b3:61:27
971
+ # SHA1 Fingerprint: e1:9f:e3:0e:8b:84:60:9e:80:9b:17:0d:72:a8:c5:ba:6e:14:09:bd
972
+ # SHA256 Fingerprint: 3f:06:e5:56:81:d4:96:f5:be:16:9e:b5:38:9f:9f:2b:8f:f6:1e:17:08:df:68:81:72:48:49:cd:5d:27:cb:69
973
+ -----BEGIN CERTIFICATE-----
974
+ MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEb
975
+ MBkGA1UECAwSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRow
976
+ GAYDVQQKDBFDb21vZG8gQ0EgTGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0
977
+ aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEwMDAwMDBaFw0yODEyMzEyMzU5NTla
978
+ MH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO
979
+ BgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUwIwYD
980
+ VQQDDBxUcnVzdG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U0IlqUSc/Atyjcn
996
+ dBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O9y5Xt5hwXsjEeLBi
997
+ -----END CERTIFICATE-----
998
+
999
+ # Issuer: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com
1000
+ # Subject: CN=UTN - DATACorp SGC O=The USERTRUST Network OU=http://www.usertrust.com
1001
+ # Label: "UTN DATACorp SGC Root CA"
1002
+ # Serial: 91374294542884689855167577680241077609
1003
+ # MD5 Fingerprint: b3:a5:3e:77:21:6d:ac:4a:c0:c9:fb:d5:41:3d:ca:06
1004
+ # SHA1 Fingerprint: 58:11:9f:0e:12:82:87:ea:50:fd:d9:87:45:6f:4f:78:dc:fa:d6:d4
1005
+ # SHA256 Fingerprint: 85:fb:2f:91:dd:12:27:5a:01:45:b6:36:53:4f:84:02:4a:d6:8b:69:b8:ee:88:68:4f:f7:11:37:58:05:b3:48
1006
+ -----BEGIN CERTIFICATE-----
1007
+ MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCB
1008
+ kzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
1009
+ Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
1010
+ dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZBgNVBAMTElVUTiAtIERBVEFDb3Jw
1011
+ IFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBaMIGTMQswCQYDVQQG
1012
+ EwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYD
1013
+ VQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cu
1014
+ dXNlcnRydXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNvc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
1030
+ mfnGV/TJVTl4uix5yaaIK/QI
1031
+ -----END CERTIFICATE-----
1032
+
1033
+ # Issuer: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com
1034
+ # Subject: CN=UTN-USERFirst-Hardware O=The USERTRUST Network OU=http://www.usertrust.com
1035
+ # Label: "UTN USERFirst Hardware Root CA"
1036
+ # Serial: 91374294542884704022267039221184531197
1037
+ # MD5 Fingerprint: 4c:56:41:e5:0d:bb:2b:e8:ca:a3:ed:18:08:ad:43:39
1038
+ # SHA1 Fingerprint: 04:83:ed:33:99:ac:36:08:05:87:22:ed:bc:5e:46:00:e3:be:f9:d7
1039
+ # SHA256 Fingerprint: 6e:a5:47:41:d0:04:66:7e:ed:1b:48:16:63:4a:a3:a7:9e:6e:4b:96:95:0f:82:79:da:fc:8d:9b:d8:81:21:37
1040
+ -----BEGIN CERTIFICATE-----
1041
+ MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCB
1042
+ lzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2Ug
1043
+ Q2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho
1044
+ dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3Qt
1045
+ SGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgxOTIyWjCBlzELMAkG
1046
+ A1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEe
1047
+ MBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8v
1048
+ d3d3LnVzZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdh
1049
+ cmUwggE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Q0qUZ6B+dQ7XnASfxAynB67nfhmqA==
1065
+ -----END CERTIFICATE-----
1066
+
1067
+ # Issuer: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com
1068
+ # Subject: CN=XRamp Global Certification Authority O=XRamp Security Services Inc OU=www.xrampsecurity.com
1069
+ # Label: "XRamp Global CA Root"
1070
+ # Serial: 107108908803651509692980124233745014957
1071
+ # MD5 Fingerprint: a1:0b:44:b3:ca:10:d8:00:6e:9d:0f:d8:0f:92:0a:d1
1072
+ # SHA1 Fingerprint: b8:01:86:d1:eb:9c:86:a5:41:04:cf:30:54:f3:4c:52:b7:e5:58:c6
1073
+ # SHA256 Fingerprint: ce:cd:dc:90:50:99:d8:da:df:c5:b1:d2:09:b7:37:cb:e2:c1:8c:fb:2c:10:c0:ff:0b:cf:0d:32:86:fc:1a:a2
1074
+ -----BEGIN CERTIFICATE-----
1075
+ MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCB
1076
+ gjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEk
1077
+ MCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRY
1078
+ UmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQxMTAxMTcx
1079
+ NDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMxHjAcBgNVBAsTFXd3
1080
+ dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkgU2Vy
1081
+ dmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
1082
+ dXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS6
1083
+ 38eMpSe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y Group, Inc. OU=Go Daddy Class 2 Certification Authority
1101
+ # Subject: O=The Go Daddy Group, Inc. OU=Go Daddy Class 2 Certification Authority
1102
+ # Label: "Go Daddy Class 2 CA"
1103
+ # Serial: 0
1104
+ # MD5 Fingerprint: 91:de:06:25:ab:da:fd:32:17:0c:bb:25:17:2a:84:67
1105
+ # SHA1 Fingerprint: 27:96:ba:e6:3f:18:01:e2:77:26:1b:a0:d7:77:70:02:8f:20:ee:e4
1106
+ # SHA256 Fingerprint: c3:84:6b:f2:4b:9e:93:ca:64:27:4c:0e:c6:7c:1e:cc:5e:02:4f:fc:ac:d2:d7:40:19:35:0e:81:fe:54:6a:e4
1107
+ -----BEGIN CERTIFICATE-----
1108
+ MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEh
1109
+ MB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBE
1110
+ YWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3
1111
+ MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkGA1UEBhMCVVMxITAfBgNVBAoTGFRo
1112
+ ZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28gRGFkZHkgQ2xhc3Mg
1113
+ MiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQADggEN
1114
+ ADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCA
1115
+ PVYYYwhv2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6w
1116
+ wdhFJ2+qN1j3hybX2C32qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXi
1117
+ EqITLdiOr18SPaAIBQi2XKVlOARFmR6jYGB0xUGlcmIbYsUfb18aQr4CUWWoriMY
1118
+ avx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmYvLEHZ6IVDd2gWMZEewo+
1119
+ YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0OBBYEFNLE
1120
+ sNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h
1121
+ /t2oatTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5
1122
+ IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmlj
1123
+ YXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQAD
1124
+ ggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wimPQoZ+YeAEW5p5JYXMP80kWNy
1125
+ OO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKtI3lpjbi2Tc7P
1126
+ TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
1127
+ HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER
1128
+ dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf
1129
+ ReYNnyicsbkqWletNw+vHX/bvZ8=
1130
+ -----END CERTIFICATE-----
1131
+
1132
+ # Issuer: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority
1133
+ # Subject: O=Starfield Technologies, Inc. OU=Starfield Class 2 Certification Authority
1134
+ # Label: "Starfield Class 2 CA"
1135
+ # Serial: 0
1136
+ # MD5 Fingerprint: 32:4a:4b:bb:c8:63:69:9b:be:74:9a:c6:dd:1d:46:24
1137
+ # SHA1 Fingerprint: ad:7e:1c:28:b0:64:ef:8f:60:03:40:20:14:c3:d0:e3:37:0e:b5:8a
1138
+ # SHA256 Fingerprint: 14:65:fa:20:53:97:b8:76:fa:a6:f0:a9:95:8e:55:90:e4:0f:cc:7f:aa:4f:b7:c2:c8:67:75:21:fb:5f:b6:58
1139
+ -----BEGIN CERTIFICATE-----
1140
+ MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl
1141
+ MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp
1142
+ U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw
1143
+ NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE
1144
+ ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp
1145
+ ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3
1146
+ DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf
1147
+ 8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN
1148
+ +lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0
1149
+ X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa
1150
+ K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA
1151
+ 1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G
1152
+ A1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fR
1153
+ zt0fhvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0
1154
+ YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBD
1155
+ bGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8w
1156
+ DQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGsafPzWdqbAYcaT1epoXkJKtv3
1157
+ L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLMPUxA2IGvd56D
1158
+ eruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
1159
+ xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynp
1160
+ VSJYACPq4xJDKVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEY
1161
+ WQPJIrSPnNVeKtelttQKbfi3QBFGmh95DmK/D5fs4C8fF5Q=
1162
+ -----END CERTIFICATE-----
1163
+
1164
+ # Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
1165
+ # Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
1166
+ # Label: "StartCom Certification Authority"
1167
+ # Serial: 1
1168
+ # MD5 Fingerprint: 22:4d:8f:8a:fc:f7:35:c2:bb:57:34:90:7b:8b:22:16
1169
+ # SHA1 Fingerprint: 3e:2b:f7:f2:03:1b:96:f3:8c:e6:c4:d8:a8:5d:3e:2d:58:47:6a:0f
1170
+ # SHA256 Fingerprint: c7:66:a9:be:f2:d4:07:1c:86:3a:31:aa:49:20:e8:13:b2:d1:98:60:8c:b7:b7:cf:e2:11:43:b8:36:df:09:ea
1171
+ -----BEGIN CERTIFICATE-----
1172
+ MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG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AQUFAAOCAgEAFmyZ
1203
+ 9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8
1204
+ jhvh3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUW
1205
+ FjgKXlf2Ysd6AgXmvB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJz
1206
+ ewT4F+irsfMuXGRuczE6Eri8sxHkfY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1
1207
+ ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3fsNrarnDy0RLrHiQi+fHLB5L
1208
+ EUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZEoalHmdkrQYu
1209
+ L6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq
1210
+ yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuC
1211
+ O3NJo2pXh5Tl1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6V
1212
+ um0ABj6y6koQOdjQK/W/7HW/lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkySh
1213
+ NOsF/5oirpt9P/FlUQqmMGqz9IgcgA38corog14=
1214
+ -----END CERTIFICATE-----
1215
+
1216
+ # Issuer: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com
1217
+ # Subject: CN=DigiCert Assured ID Root CA O=DigiCert Inc OU=www.digicert.com
1218
+ # Label: "DigiCert Assured ID Root CA"
1219
+ # Serial: 17154717934120587862167794914071425081
1220
+ # MD5 Fingerprint: 87:ce:0b:7b:2a:0e:49:00:e1:58:71:9b:37:a8:93:72
1221
+ # SHA1 Fingerprint: 05:63:b8:63:0d:62:d7:5a:bb:c8:ab:1e:4b:df:b5:a8:99:b2:4d:43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jEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
1238
+ pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRC
1239
+ dWKuh+vy1dneVrOfzM4UKLkNl2BcEkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTf
1240
+ fwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38FnSbNd67IJKusm7Xi+fT8r87cm
1241
+ NW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i8b5QZ7dsvfPx
1242
+ H2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
1243
+ +o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
1244
+ -----END CERTIFICATE-----
1245
+
1246
+ # Issuer: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
1247
+ # Subject: CN=DigiCert Global Root CA O=DigiCert Inc OU=www.digicert.com
1248
+ # Label: "DigiCert Global Root CA"
1249
+ # Serial: 10944719598952040374951832963794454346
1250
+ # MD5 Fingerprint: 79:e4:a9:84:0d:7d:3a:96:d7:c0:4f:e2:43:4c:89:2e
1251
+ # SHA1 Fingerprint: a8:98:5d:3a:65:e5:e5:c4:b2:d7:d6:6d:40:c6:dd:2f:b1:9c:54:36
1252
+ # SHA256 Fingerprint: 43:48:a0:e9:44:4c:78:cb:26:5e:05:8d:5e:89:44:b4:d8:4f:96:62:bd:26:db:25:7f:89:34:a4:43:c7:01:61
1253
+ -----BEGIN CERTIFICATE-----
1254
+ MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh
1255
+ MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
1256
+ d3cuZGlnaWNlcnQuY29tMSAwHgYDV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UU+Krk2U886UAb3LujEV0ls
1272
+ YSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
1273
+ CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
1274
+ -----END CERTIFICATE-----
1275
+
1276
+ # Issuer: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com
1277
+ # Subject: CN=DigiCert High Assurance EV Root CA O=DigiCert Inc OU=www.digicert.com
1278
+ # Label: "DigiCert High Assurance EV Root CA"
1279
+ # Serial: 3553400076410547919724730734378100087
1280
+ # MD5 Fingerprint: d4:74:de:57:5c:39:b2:d3:9c:85:83:c5:c0:65:49:8a
1281
+ # SHA1 Fingerprint: 5f:b7:ee:06:33:e2:59:db:ad:0c:4c:9a:e6:d3:8f:1a:61:c7:dc:25
1282
+ # SHA256 Fingerprint: 74:31:e5:f4:c3:c1:ce:46:90:77:4f:0b:61:e0:54:40:88:3b:a9:a0:1e:d0:0b:a6:ab:d7:80:6e:d3:b1:18:cf
1283
+ -----BEGIN CERTIFICATE-----
1284
+ MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBs
1285
+ MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
1286
+ d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j
1287
+ ZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAwMFoXDTMxMTExMDAwMDAwMFowbDEL
1288
+ MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3
1289
+ LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug
1290
+ RVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm
1291
+ +9S75S0tMqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTW
1292
+ PNt0OKRKzE0lgvdKpVMSOO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEM
1293
+ xChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFB
1294
+ Ik5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQNAQTXKFx01p8VdteZOE3
1295
+ hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUeh10aUAsg
1296
+ EsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQF
1297
+ MAMBAf8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaA
1298
+ FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3Nec
1299
+ nzyIZgYIVyHbIUf4KmeqvxgydkAQV8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6z
1300
+ eM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFpmyPInngiK3BD41VHMWEZ71jF
1301
+ hS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkKmNEVX58Svnw2
1302
+ Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
1303
+ vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep
1304
+ +OkuE6N36B9K
1305
+ -----END CERTIFICATE-----
1306
+
1307
+ # Issuer: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc.
1308
+ # Subject: CN=GeoTrust Primary Certification Authority O=GeoTrust Inc.
1309
+ # Label: "GeoTrust Primary Certification Authority"
1310
+ # Serial: 32798226551256963324313806436981982369
1311
+ # MD5 Fingerprint: 02:26:c3:01:5e:08:30:37:43:a9:d0:7d:cf:37:e6:bf
1312
+ # SHA1 Fingerprint: 32:3c:11:8e:1b:f7:b8:b6:52:54:e2:e2:10:0d:d6:02:90:37:f0:96
1313
+ # SHA256 Fingerprint: 37:d5:10:06:c5:12:ea:ab:62:64:21:f1:ec:8c:92:01:3f:c5:f8:2a:e9:8e:e5:33:eb:46:19:b8:de:b4:d0:6c
1314
+ -----BEGIN CERTIFICATE-----
1315
+ MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBY
1316
+ MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMo
1317
+ R2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjEx
1318
+ MjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
1319
+ Ew1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQcmltYXJ5IENlcnRp
1320
+ ZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
1321
+ AQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9
1322
+ AWbK7hWNb6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjA
1323
+ ZIVcFU2Ix7e64HXprQU9nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE0
1324
+ 7e9GceBrAqg1cmuXm2bgyxx5X9gaBGgeRwLmnWDiNpcB3841kt++Z8dtd1k7j53W
1325
+ kBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGttm/81w7a4DSwDRp35+MI
1326
+ mO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G
1327
+ A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJ
1328
+ KoZIhvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ1
1329
+ 6CePbJC/kRYkRj5KTs4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl
1330
+ 4b7UVXGYNTq+k+qurUKykG/g/CFNNWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6K
1331
+ oKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHaFloxt/m0cYASSJlyc1pZU8Fj
1332
+ UjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG1riR/aYNKxoU
1333
+ AT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
1334
+ -----END CERTIFICATE-----
1335
+
1336
+ # Issuer: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only
1337
+ # Subject: CN=thawte Primary Root CA O=thawte, Inc. OU=Certification Services Division/(c) 2006 thawte, Inc. - For authorized use only
1338
+ # Label: "thawte Primary Root CA"
1339
+ # Serial: 69529181992039203566298953787712940909
1340
+ # MD5 Fingerprint: 8c:ca:dc:0b:22:ce:f5:be:72:ac:41:1a:11:a8:d8:12
1341
+ # SHA1 Fingerprint: 91:c6:d6:ee:3e:8a:c8:63:84:e5:48:c2:99:29:5c:75:6c:81:7b:81
1342
+ # SHA256 Fingerprint: 8d:72:2f:81:a9:c1:13:c0:79:1d:f1:36:a2:96:6d:b2:6c:95:0a:97:1d:b4:6b:41:99:f4:ea:54:b7:8b:fb:9f
1343
+ -----BEGIN CERTIFICATE-----
1344
+ MIIE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GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XP
1360
+ r87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUFAAOCAQEAeRHAS7ORtvzw6WfU
1361
+ DW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeEuzLlQRHAd9mz
1362
+ YJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
1363
+ xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2
1364
+ /qxAeeWsEG89jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/
1365
+ LHbTY5xZ3Y+m4Q6gLkH3LpVHz7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7
1366
+ jVaMaA==
1367
+ -----END CERTIFICATE-----
1368
+
1369
+ # Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only
1370
+ # Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G5 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2006 VeriSign, Inc. - For authorized use only
1371
+ # Label: "VeriSign Class 3 Public Primary Certification Authority - G5"
1372
+ # Serial: 33037644167568058970164719475676101450
1373
+ # MD5 Fingerprint: cb:17:e4:31:67:3e:e2:09:fe:45:57:93:f3:0a:fa:1c
1374
+ # SHA1 Fingerprint: 4e:b6:d5:78:49:9b:1c:cf:5f:58:1e:ad:56:be:3d:9b:67:44:a5:e5
1375
+ # SHA256 Fingerprint: 9a:cf:ab:7e:43:c8:d8:80:d0:6b:26:2a:94:de:ee:e4:b4:65:99:89:c3:d0:ca:f1:9b:af:64:05:e4:1a:b7:df
1376
+ -----BEGIN CERTIFICATE-----
1377
+ MIIE0zCCA7ugAwIBAgIQGNr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fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/
1393
+ NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8E
1394
+ BAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEwHzAH
1395
+ BgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
1396
+ aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKv
1397
+ MzEzMA0GCSqGSIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzE
1398
+ p6B4Eq1iDkVwZMXnl2YtmAl+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y
1399
+ 5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKEKQsTb47bDN0lAtukixlE0kF6BWlK
1400
+ WE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiCKm0oHw0LxOXnGiYZ
1401
+ 4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vEZV8N
1402
+ hnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
1403
+ -----END CERTIFICATE-----
1404
+
1405
+ # Issuer: CN=COMODO Certification Authority O=COMODO CA Limited
1406
+ # Subject: CN=COMODO Certification Authority O=COMODO CA Limited
1407
+ # Label: "COMODO Certification Authority"
1408
+ # Serial: 104350513648249232941998508985834464573
1409
+ # MD5 Fingerprint: 5c:48:dc:f7:42:72:ec:56:94:6d:1c:cc:71:35:80:75
1410
+ # SHA1 Fingerprint: 66:31:bf:9e:f7:4f:9e:b6:c9:d5:a6:0c:ba:6a:be:d1:f7:bd:ef:7b
1411
+ # SHA256 Fingerprint: 0c:2c:d6:3d:f7:80:6f:a3:99:ed:e8:09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zAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6g
1428
+ PKA6hjhodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9u
1429
+ QXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOCAQEAPpiem/Yb6dc5t3iuHXIY
1430
+ SdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CPOGEIqB6BCsAv
1431
+ IC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
1432
+ RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4
1433
+ zJVSk/BwJVmcIGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5dd
1434
+ BA6+C4OmF4O5MBKgxTMVBbkN+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IB
1435
+ ZQ==
1436
+ -----END CERTIFICATE-----
1437
+
1438
+ # Issuer: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C.
1439
+ # Subject: CN=Network Solutions Certificate Authority O=Network Solutions L.L.C.
1440
+ # Label: "Network Solutions Certificate Authority"
1441
+ # Serial: 116697915152937497490437556386812487904
1442
+ # MD5 Fingerprint: d3:f3:a6:16:c0:fa:6b:1d:59:b1:2d:96:4d:0e:11:2e
1443
+ # SHA1 Fingerprint: 74:f8:a3:c3:ef:e7:b3:90:06:4b:83:90:3c:21:64:60:20:e5:df:ce
1444
+ # SHA256 Fingerprint: 15:f0:ba:00:a3:ac:7a:f3:ac:88:4c:07:2b:10:11:a0:77:bd:77:c0:97:f4:01:64:b2:f8:59:8a:bd:83:86:0c
1445
+ -----BEGIN CERTIFICATE-----
1446
+ MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBi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d5Oc8
1462
+ 6fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q4LqILPxFzBiwmZVRDuwduIj/
1463
+ h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/GGUsyfJj4akH
1464
+ /nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
1465
+ wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHN
1466
+ pGxlaKFJdlxDydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
1467
+ -----END CERTIFICATE-----
1468
+
1469
+ # Issuer: CN=COMODO ECC Certification Authority O=COMODO CA Limited
1470
+ # Subject: CN=COMODO ECC Certification Authority O=COMODO CA Limited
1471
+ # Label: "COMODO ECC Certification Authority"
1472
+ # Serial: 41578283867086692638256921589707938090
1473
+ # MD5 Fingerprint: 7c:62:ff:74:9d:31:53:5e:68:4a:d5:78:aa:1e:bf:23
1474
+ # SHA1 Fingerprint: 9f:74:4e:9f:2b:4d:ba:ec:0f:31:2c:50:b6:56:3b:8e:2d:93:c3:11
1475
+ # SHA256 Fingerprint: 17:93:92:7a:06:14:54:97:89:ad:ce:2f:8f:34:f7:f0:b6:6d:0f:3a:e3:a3:b8:4d:21:ec:15:db:ba:4f:ad:c7
1476
+ -----BEGIN CERTIFICATE-----
1477
+ MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTEL
1478
+ MAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UE
1479
+ BxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMT
1480
+ IkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDgwMzA2MDAw
1481
+ MDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdy
1482
+ ZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09N
1483
+ T0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlv
1484
+ biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSR
1485
+ FtSrYpn1PlILBs5BAH+X4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0J
1486
+ cfRK9ChQtP6IHG4/bC8vCVlbpVsLM5niwz2J+Wos77LTBumjQjBAMB0GA1UdDgQW
1487
+ BBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
1488
+ BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VGFAkK+qDm
1489
+ fQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdv
1490
+ GDeAU/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
1491
+ -----END CERTIFICATE-----
1492
+
1493
+ # Issuer: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA
1494
+ # Subject: CN=TC TrustCenter Class 2 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 2 CA
1495
+ # Label: "TC TrustCenter Class 2 CA II"
1496
+ # Serial: 941389028203453866782103406992443
1497
+ # MD5 Fingerprint: ce:78:33:5c:59:78:01:6e:18:ea:b9:36:a0:b9:2e:23
1498
+ # SHA1 Fingerprint: ae:50:83:ed:7c:f4:5c:bc:8f:61:c6:21:fe:68:5d:79:42:21:15:6e
1499
+ # SHA256 Fingerprint: e6:b8:f8:76:64:85:f8:07:ae:7f:8d:ac:16:70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
+ kUrL84J6E1wIqzCB7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRy
1516
+ dXN0Y2VudGVyLmRlL2NybC92Mi90Y19jbGFzc18yX2NhX0lJLmNybIaBn2xkYXA6
1517
+ Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBUcnVzdENlbnRlciUyMENsYXNz
1518
+ JTIwMiUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21iSCxPVT1yb290
1519
+ Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
1520
+ TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEAjNfffu4bgBCzg/XbEeprS6iS
1521
+ GNn3Bzn1LL4GdXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprt
1522
+ ZjluS5TmVfwLG4t3wVMTZonZKNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8
1523
+ au0WOB9/WIFaGusyiC2y8zl3gK9etmF1KdsjTYjKUCjLhdLTEKJZbtOTVAB6okaV
1524
+ hgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kPJOzHdiEoZa5X6AeI
1525
+ dUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfkvQ==
1526
+ -----END CERTIFICATE-----
1527
+
1528
+ # Issuer: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA
1529
+ # Subject: CN=TC TrustCenter Class 3 CA II O=TC TrustCenter GmbH OU=TC TrustCenter Class 3 CA
1530
+ # Label: "TC TrustCenter Class 3 CA II"
1531
+ # Serial: 1506523511417715638772220530020799
1532
+ # MD5 Fingerprint: 56:5f:aa:80:61:12:17:f6:67:21:e6:2b:6d:61:56:8e
1533
+ # SHA1 Fingerprint: 80:25:ef:f4:6e:70:c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jcCAwEAAaOCATQwggEwMA8GA1Ud
1549
+ EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTUovyfs8PYA9NX
1550
+ XAek0CSnwPIA1DCB7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRy
1551
+ dXN0Y2VudGVyLmRlL2NybC92Mi90Y19jbGFzc18zX2NhX0lJLmNybIaBn2xkYXA6
1552
+ Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBUcnVzdENlbnRlciUyMENsYXNz
1553
+ JTIwMyUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21iSCxPVT1yb290
1554
+ Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u
1555
+ TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEANmDkcPcGIEPZIxpC8vijsrlN
1556
+ irTzwppVMXzEO2eatN9NDoqTSheLG43KieHPOh6sHfGcMrSOWXaiQYUlN6AT0PV8
1557
+ TtXqluJucsG7Kv5sbviRmEb8yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6
1558
+ g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9IJqDnxrcOfHFcqMRA/07QlIp2+gB
1559
+ 95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal092Y+tTmBvTwtiBj
1560
+ S+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc5A==
1561
+ -----END CERTIFICATE-----
1562
+
1563
+ # Issuer: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1564
+ # Subject: CN=TC TrustCenter Universal CA I O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1565
+ # Label: "TC TrustCenter Universal CA I"
1566
+ # Serial: 601024842042189035295619584734726
1567
+ # MD5 Fingerprint: 45:e1:a5:72:c5:a9:36:64:40:9e:f5:e4:58:84:67:8c
1568
+ # SHA1 Fingerprint: 6b:2f:34:ad:89:58:be:62:fd:b0:6b:5c:ce:bb:9d:d9:4f:4e:39:f3
1569
+ # SHA256 Fingerprint: eb:f3:c0:2a:87:89:b1:fb:7d:51:19:95:d6:63:b7:29:06:d9:13:ce:0d:5e:10:56:8a:8a:77:e2:58:61:67:e7
1570
+ -----BEGIN CERTIFICATE-----
1571
+ MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTEL
1572
+ MAkGA1UEBhMCREUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNV
1573
+ BAsTG1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1
1574
+ c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcNMDYwMzIyMTU1NDI4WhcNMjUxMjMx
1575
+ MjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1c3RDZW50ZXIg
1576
+ R21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYwJAYD
1577
+ VQQDEx1UQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0EgSTCCASIwDQYJKoZIhvcN
1578
+ AQEBBQADggEPADCCAQoCggEBAKR3I5ZEr5D0MacQ9CaHnPM42Q9e3s9B6DGtxnSR
1579
+ JJZ4Hgmgm5qVSkr1YnwCqMqs+1oEdjneX/H5s7/zA1hV0qq34wQi0fiU2iIIAI3T
1580
+ fCZdzHd55yx4Oagmcw6iXSVphU9VDprvxrlE4Vc93x9UIuVvZaozhDrzznq+VZeu
1581
+ jRIPFDPiUHDDSYcTvFHe15gSWu86gzOSBnWLknwSaHtwag+1m7Z3W0hZneTvWq3z
1582
+ wZ7U10VOylY0Ibw+F1tvdwxIAUMpsN0/lm7mlaoMwCC2/T42J5zjXM9OgdwZu5GQ
1583
+ fezmlwQek8wiSdeXhrYTCjxDI3d+8NzmzSQfO4ObNDqDNOMCAwEAAaNjMGEwHwYD
1584
+ VR0jBBgwFoAUkqR1LKSevoFE63n8isWVpesQdXMwDwYDVR0TAQH/BAUwAwEB/zAO
1585
+ BgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFJKkdSyknr6BROt5/IrFlaXrEHVzMA0G
1586
+ CSqGSIb3DQEBBQUAA4IBAQAo0uCG1eb4e/CX3CJrO5UUVg8RMKWaTzqwOuAGy2X1
1587
+ 7caXJ/4l8lfmXpWMPmRgFVp/Lw0BxbFg/UU1z/CyvwbZ71q+s2IhtNerNXxTPqYn
1588
+ 8aEt2hojnczd7Dwtnic0XQ/CNnm8yUpiLe1r2X1BQ3y2qsrtYbE3ghUJGooWMNjs
1589
+ ydZHcnhLEEYUjl8Or+zHL6sQ17bxbuyGssLoDZJz3KL0Dzq/YSMQiZxIQG5wALPT
1590
+ ujdEWBF6AmqI8Dc08BnprNRlc/ZpjGSUOnmFKbAWKwyCPwacx/0QK54PLLae4xW/
1591
+ 2TYcuiUaUj0a7CIMHOCkoj3w6DnPgcB77V0fb8XQC9eY
1592
+ -----END CERTIFICATE-----
1593
+
1594
+ # Issuer: CN=Cybertrust Global Root O=Cybertrust, Inc
1595
+ # Subject: CN=Cybertrust Global Root O=Cybertrust, Inc
1596
+ # Label: "Cybertrust Global Root"
1597
+ # Serial: 4835703278459682877484360
1598
+ # MD5 Fingerprint: 72:e4:4a:87:e3:69:40:80:77:ea:bc:e3:f4:ff:f0:e1
1599
+ # SHA1 Fingerprint: 5f:43:e5:b1:bf:f8:78:8c:ac:1c:c7:ca:4a:9a:c6:22:2b:cc:34:c6
1600
+ # SHA256 Fingerprint: 96:0a:df:00:63:e9:63:56:75:0c:29:65:dd:0a:08:67:da:0b:9c:bd:6e:77:71:4a:ea:fb:23:49:ab:39:3d:a3
1601
+ -----BE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1617
+ Wqd8BfP9IjsO0QbE2zZMcwSO5bAi5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUx
1618
+ XOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2hO0j9n0Hq0V+09+zv+mKts2o
1619
+ omcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+TX3EJIrduPuoc
1620
+ A06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
1621
+ WL1WMRJOEcgh4LMRkWXbtKaIOM5V
1622
+ -----END CERTIFICATE-----
1623
+
1624
+ # Issuer: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only
1625
+ # Subject: CN=GeoTrust Primary Certification Authority - G3 O=GeoTrust Inc. OU=(c) 2008 GeoTrust Inc. - For authorized use only
1626
+ # Label: "GeoTrust Primary Certification Authority - G3"
1627
+ # Serial: 28809105769928564313984085209975885599
1628
+ # MD5 Fingerprint: b5:e8:34:36:c9:10:44:58:48:70:6d:2e:83:d4:b8:05
1629
+ # SHA1 Fingerprint: 03:9e:ed:b8:0b:e7:a0:3c:69:53:89:3b:20:d2:d9:32:3a:4c:2a:fd
1630
+ # SHA256 Fingerprint: b4:78:b8:12:25:0d:f8:78:63:5c:2a:a7:ec:7d:15:5e:aa:62:5e:e8:29:16:e2:cd:29:43:61:88:6c:d1:fb:d4
1631
+ -----BEGIN CERTIFICATE-----
1632
+ MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCB
1633
+ mDELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsT
1634
+ MChjKSAyMDA4IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25s
1635
+ eTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbW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3aQHEerGD
1651
+ AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUH
1652
+ SJsMC8tJP33st/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2G
1653
+ spki4cErx5z481+oghLrGREt
1654
+ -----END CERTIFICATE-----
1655
+
1656
+ # Issuer: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only
1657
+ # Subject: CN=thawte Primary Root CA - G2 O=thawte, Inc. OU=(c) 2007 thawte, Inc. - For authorized use only
1658
+ # Label: "thawte Primary Root CA - G2"
1659
+ # Serial: 71758320672825410020661621085256472406
1660
+ # MD5 Fingerprint: 74:9d:ea:60:24:c4:fd:22:53:3e:cc:3a:72:d9:29:4f
1661
+ # SHA1 Fingerprint: aa:db:bc:22:23:8f:c4:01:a1:27:bb:38:dd:f4:1d:db:08:9e:f0:12
1662
+ # SHA256 Fingerprint: a4:31:0d:50:af:18:a6:44:71:90:37:2a:86:af:af:8b:95:1f:fb:43:1d:83:7f:1e:56:88:b4:59:71:ed:15:57
1663
+ -----BEGIN CERTIFICATE-----
1664
+ MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDEL
1665
+ MAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMp
1666
+ IDIwMDcgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAi
1667
+ BgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMjAeFw0wNzExMDUwMDAw
1668
+ MDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
1669
+ d3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBGb3Ig
1670
+ YXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9v
1671
+ dCBDQSAtIEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/
1672
+ BebfowJPDQfGAFG6DAJSLSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6
1673
+ papu+7qzcMBniKI11KOasf2twu8x+qi58/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8E
1674
+ BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUmtgAMADna3+FGO6Lts6K
1675
+ DPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUNG4k8VIZ3
1676
+ KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41ox
1677
+ XZ3Krr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
1678
+ -----END CERTIFICATE-----
1679
+
1680
+ # Issuer: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only
1681
+ # Subject: CN=thawte Primary Root CA - G3 O=thawte, Inc. OU=Certification Services Division/(c) 2008 thawte, Inc. - For authorized use only
1682
+ # Label: "thawte Primary Root CA - G3"
1683
+ # Serial: 127614157056681299805556476275995414779
1684
+ # MD5 Fingerprint: fb:1b:5d:43:8a:94:cd:44:c6:76:f2:43:4b:47:e7:31
1685
+ # SHA1 Fingerprint: f1:8b:53:8d:1b:e9:03:b6:a6:f0:56:43:5b:17:15:89:ca:f3:6b:f2
1686
+ # SHA256 Fingerprint: 4b:03:f4:58:07:ad:70:f2:1b:fc:2c:ae:71:c9:fd:e4:60:4c:06:4c:f5:ff:b6:86:ba:e5:db:aa:d7:fd:d3:4c
1687
+ -----BEGIN CERTIFICATE-----
1688
+ MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/e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/MA4GA1UdDwEB/wQEAwIBBjAdBgNV
1704
+ HQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJKoZIhvcNAQELBQADggEBABpA
1705
+ 2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweKA3rD6z8KLFIW
1706
+ oCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
1707
+ t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7c
1708
+ KUGRIjxpp7sC8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fM
1709
+ m7v/OeZWYdMKp8RcTGB7BXcmer/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZu
1710
+ MdRAGmI0Nj81Aa6sY6A=
1711
+ -----END CERTIFICATE-----
1712
+
1713
+ # Issuer: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only
1714
+ # Subject: CN=GeoTrust Primary Certification Authority - G2 O=GeoTrust Inc. OU=(c) 2007 GeoTrust Inc. - For authorized use only
1715
+ # Label: "GeoTrust Primary Certification Authority - G2"
1716
+ # Serial: 80682863203381065782177908751794619243
1717
+ # MD5 Fingerprint: 01:5e:d8:6b:bd:6f:3d:8e:a1:31:f8:12:e0:98:73:6a
1718
+ # SHA1 Fingerprint: 8d:17:84:d5:37:f3:03:7d:ec:70:fe:57:8b:51:9a:99:e6:10:d7:b0
1719
+ # SHA256 Fingerprint: 5e:db:7a:c4:3b:82:a0:6a:87:61:e8:d7:be:49:79:eb:f2:61:1f:7d:d7:9b:f9:1c:1c:6b:56:6a:21:9e:d7:66
1720
+ -----BEGIN CERTIFICATE-----
1721
+ MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDEL
1722
+ MAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChj
1723
+ KSAyMDA3IEdlb1RydXN0IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2
1724
+ MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
1725
+ eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1OVowgZgxCzAJBgNV
1726
+ BAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykgMjAw
1727
+ NyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNV
1728
+ BAMTLUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBH
1729
+ MjB2MBAGByqGSM49AgEGBSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcL
1730
+ So17VDs6bl8VAsBQps8lL33KSLjHUGMcKiEIfJo22Av+0SbFWDEwKCXzXV2juLal
1731
+ tJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
1732
+ BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+EVXVMAoG
1733
+ CCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGT
1734
+ qQ7mndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBucz
1735
+ rD6ogRLQy7rQkgu2npaqBA+K
1736
+ -----END CERTIFICATE-----
1737
+
1738
+ # Issuer: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only
1739
+ # Subject: CN=VeriSign Universal Root Certification Authority O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2008 VeriSign, Inc. - For authorized use only
1740
+ # Label: "VeriSign Universal Root Certification Authority"
1741
+ # Serial: 85209574734084581917763752644031726877
1742
+ # MD5 Fingerprint: 8e:ad:b5:01:aa:4d:81:e4:8c:1d:d1:e1:14:00:95:19
1743
+ # SHA1 Fingerprint: 36:79:ca:35:66:87:72:30:4d:30:a5:fb:87:3b:0f:a7:7b:b7:0d:54
1744
+ # SHA256 Fingerprint: 23:99:56:11:27:a5:71:25:de:8c:ef:ea:61:0d:df:2f:a0:78:b5:c8:06:7f:4e:82:82:90:bf:b8:60:e8:4b:3c
1745
+ -----BEGIN CERTIFICATE-----
1746
+ MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCB
1747
+ vTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL
1748
+ ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJp
1749
+ U2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MTgwNgYDVQQDEy9W
1750
+ ZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAe
1751
+ Fw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJVUzEX
1752
+ MBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0
1753
+ IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9y
1754
+ IGF1dGhvcml6ZWQgdXNlIG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNh
1755
+ bCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG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WIg0vvBZIGcfK4mJO3
1771
+ 7M2CYfE45k+XmCpajQ==
1772
+ -----END CERTIFICATE-----
1773
+
1774
+ # Issuer: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only
1775
+ # Subject: CN=VeriSign Class 3 Public Primary Certification Authority - G4 O=VeriSign, Inc. OU=VeriSign Trust Network/(c) 2007 VeriSign, Inc. - For authorized use only
1776
+ # Label: "VeriSign Class 3 Public Primary Certification Authority - G4"
1777
+ # Serial: 63143484348153506665311985501458640051
1778
+ # MD5 Fingerprint: 3a:52:e1:e7:fd:6f:3a:e3:6f:f3:6f:99:1b:f9:22:41
1779
+ # SHA1 Fingerprint: 22:d5:d8:df:8f:02:31:d1:8d:f7:9d:b7:cf:8a:2d:64:c9:3f:6c:3a
1780
+ # SHA256 Fingerprint: 69:dd:d7:ea:90:bb:57:c9:3e:13:5d:c8:5e:a6:fc:d5:48:0b:60:32:39:bd:c4:54:fc:75:8b:2a:26:cf:7f:79
1781
+ -----BEGIN CERTIFICATE-----
1782
+ MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjEL
1783
+ MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZW
1784
+ ZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2ln
1785
+ biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJp
1786
+ U2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9y
1787
+ aXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjELMAkG
1788
+ A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJp
1789
+ U2lnbiBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwg
1790
+ SW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2ln
1791
+ biBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
1792
+ IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8Utpkmw4tXNherJI9/gHm
1793
+ GUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGzrl0Bp3ve
1794
+ fLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUw
1795
+ AwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJ
1796
+ aW1hZ2UvZ2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYj
1797
+ aHR0cDovL2xvZ28udmVyaXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMW
1798
+ kf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMDA2gAMGUCMGYhDBgmYFo4e1ZC
1799
+ 4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIxAJw9SDkjOVga
1800
+ FRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
1801
+ -----END CERTIFICATE-----
1802
+
1803
+ # Issuer: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
1804
+ # Subject: O=VeriSign, Inc. OU=Class 3 Public Primary Certification Authority
1805
+ # Label: "Verisign Class 3 Public Primary Certification Authority"
1806
+ # Serial: 80507572722862485515306429940691309246
1807
+ # MD5 Fingerprint: ef:5a:f1:33:ef:f1:cd:bb:51:02:ee:12:14:4b:96:c4
1808
+ # SHA1 Fingerprint: a1:db:63:93:91:6f:17:e4:18:55:09:40:04:15:c7:02:40:b0:ae:6b
1809
+ # SHA256 Fingerprint: a4:b6:b3:99:6f:c2:f3:06:b3:fd:86:81:bd:63:41:3d:8c:50:09:cc:4f:a3:29:c2:cc:f0:e2:fa:1b:14:03:05
1810
+ -----BEGIN CERTIFICATE-----
1811
+ MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkG
1812
+ A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
1813
+ cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
1814
+ MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
1815
+ BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
1816
+ YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
1817
+ ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
1818
+ BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
1819
+ I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
1820
+ CSqGSIb3DQEBBQUAA4GBABByUqkFFBkyCEHwxWsKzH4PIRnN5GfcX6kb5sroc50i
1821
+ 2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWXbj9T/UWZYB2oK0z5XqcJ
1822
+ 2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/D/xwzoiQ
1823
+ -----END CERTIFICATE-----
1824
+
1825
+ # Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
1826
+ # Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
1827
+ # Label: "GlobalSign Root CA - R3"
1828
+ # Serial: 4835703278459759426209954
1829
+ # MD5 Fingerprint: c5:df:b8:49:ca:05:13:55:ee:2d:ba:1a:c3:3e:b0:28
1830
+ # SHA1 Fingerprint: d6:9b:56:11:48:f0:1c:77:c5:45:78:c1:09:26:df:5b:85:69:76:ad
1831
+ # SHA256 Fingerprint: cb:b5:22:d7:b7:f1:27:ad:6a:01:13:86:5b:df:1c:d4:10:2e:7d:07:59:af:63:5a:7c:f4:72:0d:c9:63:c5:3b
1832
+ -----BEGIN CERTIFICATE-----
1833
+ MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
1834
+ A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
1835
+ Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
1836
+ MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
1837
+ A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
1838
+ hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
1839
+ RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
1840
+ gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
1841
+ KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd
1842
+ QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ
1843
+ XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw
1844
+ DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o
1845
+ LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU
1846
+ RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp
1847
+ jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
1848
+ 6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
1849
+ mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
1850
+ Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
1851
+ WD9f
1852
+ -----END CERTIFICATE-----
1853
+
1854
+ # Issuer: CN=TC TrustCenter Universal CA III O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1855
+ # Subject: CN=TC TrustCenter Universal CA III O=TC TrustCenter GmbH OU=TC TrustCenter Universal CA
1856
+ # Label: "TC TrustCenter Universal CA III"
1857
+ # Serial: 2010889993983507346460533407902964
1858
+ # MD5 Fingerprint: 9f:dd:db:ab:ff:8e:ff:45:21:5f:f0:6c:9d:8f:fe:2b
1859
+ # SHA1 Fingerprint: 96:56:cd:7b:57:96:98:95:d0:e1:41:46:68:06:fb:b8:c6:11:06:87
1860
+ # SHA256 Fingerprint: 30:9b:4a:87:f6:ca:56:c9:31:69:aa:a9:9c:6d:98:88:54:d7:89:2b:d5:43:7e:2d:07:b2:9c:be:da:55:d3:5d
1861
+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XG8juWAL8RI
1877
+ 4jANBgkqhkiG9w0BAQUFAAOCAQEAg8ev6n9NCjw5sWi+e22JLumzCecYV42Fmhfz
1878
+ dkJQEw/HkG8zrcVJYCtsSVgZ1OK+t7+rSbyUyKu+KGwWaODIl0YgoGhnYIg5IFHY
1879
+ aAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhKBgePxLcHsU0G
1880
+ DeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV
1881
+ CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPH
1882
+ LQNjO9Po5KIqwoIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg==
1883
+ -----END CERTIFICATE-----
1884
+
1885
+ # Issuer: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc.
1886
+ # Subject: CN=Go Daddy Root Certificate Authority - G2 O=GoDaddy.com, Inc.
1887
+ # Label: "Go Daddy Root Certificate Authority - G2"
1888
+ # Serial: 0
1889
+ # MD5 Fingerprint: 80:3a:bc:22:c1:e6:fb:8d:9b:3b:27:4a:32:1b:9a:01
1890
+ # SHA1 Fingerprint: 47:be:ab:c9:22:ea:e8:0e:78:78:34:62:a7:9f:45:c2:54:fd:e6:8b
1891
+ # SHA256 Fingerprint: 45:14:0b:32:47:eb:9c:c8:c5:b4:f0:d7:b5:30:91:f7:32:92:08:9e:6e:5a:63:e2:74:9d:d3:ac:a9:19:8e:da
1892
+ -----BEGIN CERTIFICATE-----
1893
+ MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx
1894
+ EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT
1895
+ EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290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LH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
1912
+ LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI
1913
+ 4uJEvlz36hz1
1914
+ -----END CERTIFICATE-----
1915
+
1916
+ # Issuer: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1917
+ # Subject: CN=Starfield Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1918
+ # Label: "Starfield Root Certificate Authority - G2"
1919
+ # Serial: 0
1920
+ # MD5 Fingerprint: d6:39:81:c6:52:7e:96:69:fc:fc:ca:66:ed:05:f2:96
1921
+ # SHA1 Fingerprint: b5:1c:06:7c:ee:2b:0c:3d:f8:55:ab:2d:92:f4:fe:39:d4:e7:0f:0e
1922
+ # SHA256 Fingerprint: 2c:e1:cb:0b:f9:d2:f9:e1:02:99:3f:be:21:51:52:c3:b2:dd:0c:ab:de:1c:68:e5:31:9b:83:91:54:db:b7:f5
1923
+ -----BEGIN CERTIFICATE-----
1924
+ MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMx
1925
+ EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
1926
+ HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVs
1927
+ ZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAw
1928
+ MFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
1929
+ b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQgVGVj
1930
+ aG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZp
1931
+ Y2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
1932
+ ggEBAL3twQP89o/8ArFvW59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMg
1933
+ nLRJdzIpVv257IzdIvpy3Cdhl+72WoTsbhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1
1934
+ HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNkN3mSwOxGXn/hbVNMYq/N
1935
+ Hwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7NfZTD4p7dN
1936
+ dloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0
1937
+ HZbUJtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAO
1938
+ BgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0G
1939
+ CSqGSIb3DQEBCwUAA4IBAQARWfolTwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjU
1940
+ sHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx4mcujJUDJi5DnUox9g61DLu3
1941
+ 4jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUwF5okxBDgBPfg
1942
+ 8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
1943
+ pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1
1944
+ mMpYjn0q7pBZc2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
1945
+ -----END CERTIFICATE-----
1946
+
1947
+ # Issuer: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1948
+ # Subject: CN=Starfield Services Root Certificate Authority - G2 O=Starfield Technologies, Inc.
1949
+ # Label: "Starfield Services Root Certificate Authority - G2"
1950
+ # Serial: 0
1951
+ # MD5 Fingerprint: 17:35:74:af:7b:61:1c:eb:f4:f9:3c:e2:ee:40:f9:a2
1952
+ # SHA1 Fingerprint: 92:5a:8f:8d:2c:6d:04:e0:66:5f:59:6a:ff:22:d8:63:e8:25:6f:3f
1953
+ # SHA256 Fingerprint: 56:8d:69:05:a2:c8:87:08:a4:b3:02:51:90:ed:cf:ed:b1:97:4a:60:6a:13:c6:e5:29:0f:cb:2a:e6:3e:da:b5
1954
+ -----BEGIN CERTIFICATE-----
1955
+ MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMx
1956
+ EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoT
1957
+ HFN0YXJmaWVsZCBUZWNobm9sb2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVs
1958
+ ZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
1959
+ MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNVBAYTAlVTMRAwDgYD
1960
+ VQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFy
1961
+ ZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2Vy
1962
+ dmljZXMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
1963
+ hvcNAQEBBQADggEPADCCAQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20p
1964
+ OsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm2
1965
+ 8xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4PahHQUw2eeBGg6345AWh1K
1966
+ Ts9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLPLJGmpufe
1967
+ hRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk
1968
+ 6mFBrMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAw
1969
+ DwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+q
1970
+ AdcwKziIorhtSpzyEZGDMA0GCSqGSIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMI
1971
+ bw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPPE95Dz+I0swSdHynVv/heyNXB
1972
+ ve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTyxQGjhdByPq1z
1973
+ qwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
1974
+ iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn
1975
+ 0q23KXB56jzaYyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCN
1976
+ sSi6
1977
+ -----END CERTIFICATE-----
1978
+
1979
+ # Issuer: CN=AffirmTrust Commercial O=AffirmTrust
1980
+ # Subject: CN=AffirmTrust Commercial O=AffirmTrust
1981
+ # Label: "AffirmTrust Commercial"
1982
+ # Serial: 8608355977964138876
1983
+ # MD5 Fingerprint: 82:92:ba:5b:ef:cd:8a:6f:a6:3d:55:f9:84:f6:d6:b7
1984
+ # SHA1 Fingerprint: f9:b5:b6:32:45:5f:9c:be:ec:57:5f:80:dc:e9:6e:2c:c7:b2:78:b7
1985
+ # SHA256 Fingerprint: 03:76:ab:1d:54:c5:f9:80:3c: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O7RgBsZNj
2001
+ vbz4YYCanrHOQnDiqX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivt
2002
+ Z8SOyUOyXGsViQK8YvxO8rUzqrJv0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9g
2003
+ N53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0khsUlHRUe072o0EclNmsxZt9YC
2004
+ nlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
2005
+ -----END CERTIFICATE-----
2006
+
2007
+ # Issuer: CN=AffirmTrust Networking O=AffirmTrust
2008
+ # Subject: CN=AffirmTrust Networking O=AffirmTrust
2009
+ # Label: "AffirmTrust Networking"
2010
+ # Serial: 8957382827206547757
2011
+ # MD5 Fingerprint: 42:65:ca:be:01:9a:9a:4c:a9:8c:41:49:cd:c0:d5:7f
2012
+ # SHA1 Fingerprint: 29:36:21:02:8b:20:ed:02:f5:66:c5:32:d1:d6:ed:90:9f:45:00:2f
2013
+ # SHA256 Fingerprint: 0a:81:ec:5a:92:97:77:f1:45:90:4a:f3:8d:5d:50:9f:66:b5:e2:c5:8f:cd:b5:31:05:8b:0e:17:f3:f0:b4:1b
2014
+ -----BEGIN CERTIFICATE-----
2015
+ MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UE
2016
+ BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz
2017
+ dCBOZXR3b3JraW5nMB4XDTEwMDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDEL
2018
+ MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp
2019
+ cm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
2020
+ AQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SEHi3y
2021
+ YJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbua
2022
+ kCNrmreIdIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRL
2023
+ QESxG9fhwoXA3hA/Pe24/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp
2024
+ 6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gbh+0t+nvujArjqWaJGctB+d1ENmHP4ndG
2025
+ yH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNVHQ4EFgQUBx/S55zawm6i
2026
+ QLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ
2027
+ KoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfO
2028
+ tDIuUFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzu
2029
+ QY0x2+c06lkh1QF612S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZ
2030
+ Lgo/bNjR9eUJtGxUAArgFU2HdW23WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4u
2031
+ olu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9/ZFvgrG+CJPbFEfxojfHRZ48
2032
+ x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=
2033
+ -----END CERTIFICATE-----
2034
+
2035
+ # Issuer: CN=AffirmTrust Premium O=AffirmTrust
2036
+ # Subject: CN=AffirmTrust Premium O=AffirmTrust
2037
+ # Label: "AffirmTrust Premium"
2038
+ # Serial: 7893706540734352110
2039
+ # MD5 Fingerprint: c4:5d:0e:48:b6:ac:28:30:4e:0a:bc:f9:38:16:87:57
2040
+ # SHA1 Fingerprint: d8:a6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/7waj3VjFhT0+j/6e
2071
+ KeC2uAloGRwYQw==
2072
+ -----END CERTIFICATE-----
2073
+
2074
+ # Issuer: CN=AffirmTrust Premium ECC O=AffirmTrust
2075
+ # Subject: CN=AffirmTrust Premium ECC O=AffirmTrust
2076
+ # Label: "AffirmTrust Premium ECC"
2077
+ # Serial: 8401224907861490260
2078
+ # MD5 Fingerprint: 64:b0:09:55:cf:b1:d5:99:e2:be:13:ab:a6:5d:ea:4d
2079
+ # SHA1 Fingerprint: b8:23:6b:00:2f:1d:16:86:53:01:55:6c:11:a4:37:ca:eb:ff:c3:bb
2080
+ # SHA256 Fingerprint: bd:71:fd:f6:da:97:e4:cf:62:d1:64:7a:dd:25:81:b0:7d:79:ad:f8:39:7e:b4:ec:ba:9c:5e:84:88:82:14:23
2081
+ -----BEGIN CERTIFICATE-----
2082
+ MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMC
2083
+ VVMxFDASBgNVBAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQ
2084
+ cmVtaXVtIEVDQzAeFw0xMDAxMjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJ
2085
+ BgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEgMB4GA1UEAwwXQWZmaXJt
2086
+ VHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQNMF4bFZ0D
2087
+ 0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQN8O9
2088
+ ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0G
2089
+ A1UdDgQWBBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4G
2090
+ A1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/Vs
2091
+ aobgxCd05DhT1wV/GzTjxi+zygk8N53X57hG8f2h4nECMEJZh0PUUd+60wkyWs6I
2092
+ flc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKMeQ==
2093
+ -----END CERTIFICATE-----
2094
+
2095
+ # Issuer: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
2096
+ # Subject: CN=StartCom Certification Authority O=StartCom Ltd. OU=Secure Digital Certificate Signing
2097
+ # Label: "StartCom Certification Authority"
2098
+ # Serial: 45
2099
+ # MD5 Fingerprint: c9:3b:0d:84:41:fc:a4:76:79:23:08:57:de:10:19:16
2100
+ # SHA1 Fingerprint: a3:f1:33:3f:e2:42:bf:cf:c5:d1:4e:8f:39:42:98:40:68:10:d1:a0
2101
+ # SHA256 Fingerprint: e1:78:90:ee:09:a3:fb:f4:f4:8b:9c:41:4a:17:d6:37:b7:a5:06:47:e9:bc:75:23:22:72:7f:cc:17:42:a9:11
2102
+ -----BEGIN CERTIFICATE-----
2103
+ MIIHhzCCBW+gAwIBAgIBLTANBgkqhkiG9w0BAQsFADB9MQswCQYDVQQGEwJJTDEW
2104
+ MBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwg
2105
+ Q2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNh
2106
+ dGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0NjM3WhcNMzYwOTE3MTk0NjM2WjB9
2107
+ MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjErMCkGA1UECxMi
2108
+ U2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMgU3Rh
2109
+ cnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUA
2110
+ A4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Vktucf3HMiKf8CdBUrmQk9io20ppB+Fq9vlgcitKj1MXVuE
2141
+ JnHEhV5xJMqlG2zYYdMa4FTbzrqpMrUi9nNBCV24F10OD5mQ1kfabwo6YigUZ4LZ
2142
+ 8dCAWZvLMdibD4x3TrVoivJs9iQOLWxwxXPR3hTQcY+203sC9uO41Alua551hDnm
2143
+ fyWl8kgAwKQB2j8=
2144
+ -----END CERTIFICATE-----
2145
+
2146
+ # Issuer: CN=StartCom Certification Authority G2 O=StartCom Ltd.
2147
+ # Subject: CN=StartCom Certification Authority G2 O=StartCom Ltd.
2148
+ # Label: "StartCom Certification Authority G2"
2149
+ # Serial: 59
2150
+ # MD5 Fingerprint: 78:4b:fb:9e:64:82:0a:d3:b8:4c:62:f3:64:f2:90:64
2151
+ # SHA1 Fingerprint: 31:f1:fd:68:22:63:20:ee:c6:3b:3f:9d:ea:4a:3e:53:7c:7c:39:17
2152
+ # SHA256 Fingerprint: c7:ba:65:67:de:93:a7:98:ae:1f:aa:79:1e:71:2d:37:8f:ae:1f:93:c4:39:7f:ea:44:1b:b7:cb:e6:fd:59:95
2153
+ -----BEGIN CERTIFICATE-----
2154
+ MIIFYzCCA0ugAwIBAgIBOzANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJJTDEW
2155
+ MBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoGA1UEAxMjU3RhcnRDb20gQ2VydGlm
2156
+ aWNhdGlvbiBBdXRob3JpdHkgRzIwHhcNMTAwMTAxMDEwMDAxWhcNMzkxMjMxMjM1
2157
+ OTAxWjBTMQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRkLjEsMCoG
2158
+ A1UEAxMjU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgRzIwggIiMA0G
2159
+ CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2iTZbB7cgNr2Cu+EWIAOVeq8Oo1XJ
2160
+ JZlKxdBWQYeQTSFgpBSHO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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Abstract logging class based on the PSR-3 standard.
24
+ *
25
+ * NOTE: We don't implement `Psr\Log\LoggerInterface` because we need to
26
+ * maintain PHP 5.2 support.
27
+ *
28
+ * @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
29
+ */
30
+ abstract class Google_Logger_Abstract
31
+ {
32
+ /**
33
+ * Default log format
34
+ */
35
+ const DEFAULT_LOG_FORMAT = "[%datetime%] %level%: %message% %context%\n";
36
+ /**
37
+ * Default date format
38
+ *
39
+ * Example: 16/Nov/2014:03:26:16 -0500
40
+ */
41
+ const DEFAULT_DATE_FORMAT = 'd/M/Y:H:i:s O';
42
+
43
+ /**
44
+ * System is unusable
45
+ */
46
+ const EMERGENCY = 'emergency';
47
+ /**
48
+ * Action must be taken immediately
49
+ *
50
+ * Example: Entire website down, database unavailable, etc. This should
51
+ * trigger the SMS alerts and wake you up.
52
+ */
53
+ const ALERT = 'alert';
54
+ /**
55
+ * Critical conditions
56
+ *
57
+ * Example: Application component unavailable, unexpected exception.
58
+ */
59
+ const CRITICAL = 'critical';
60
+ /**
61
+ * Runtime errors that do not require immediate action but should typically
62
+ * be logged and monitored.
63
+ */
64
+ const ERROR = 'error';
65
+ /**
66
+ * Exceptional occurrences that are not errors.
67
+ *
68
+ * Example: Use of deprecated APIs, poor use of an API, undesirable things
69
+ * that are not necessarily wrong.
70
+ */
71
+ const WARNING = 'warning';
72
+ /**
73
+ * Normal but significant events.
74
+ */
75
+ const NOTICE = 'notice';
76
+ /**
77
+ * Interesting events.
78
+ *
79
+ * Example: User logs in, SQL logs.
80
+ */
81
+ const INFO = 'info';
82
+ /**
83
+ * Detailed debug information.
84
+ */
85
+ const DEBUG = 'debug';
86
+
87
+ /**
88
+ * @var array $levels Logging levels
89
+ */
90
+ protected static $levels = array(
91
+ self::EMERGENCY => 600,
92
+ self::ALERT => 550,
93
+ self::CRITICAL => 500,
94
+ self::ERROR => 400,
95
+ self::WARNING => 300,
96
+ self::NOTICE => 250,
97
+ self::INFO => 200,
98
+ self::DEBUG => 100,
99
+ );
100
+
101
+ /**
102
+ * @var integer $level The minimum logging level
103
+ */
104
+ protected $level = self::DEBUG;
105
+
106
+ /**
107
+ * @var string $logFormat The current log format
108
+ */
109
+ protected $logFormat = self::DEFAULT_LOG_FORMAT;
110
+ /**
111
+ * @var string $dateFormat The current date format
112
+ */
113
+ protected $dateFormat = self::DEFAULT_DATE_FORMAT;
114
+
115
+ /**
116
+ * @var boolean $allowNewLines If newlines are allowed
117
+ */
118
+ protected $allowNewLines = false;
119
+
120
+ /**
121
+ * @param Google_Client $client The current Google client
122
+ */
123
+ public function __construct(Google_Client $client)
124
+ {
125
+ $this->setLevel(
126
+ $client->getClassConfig('Google_Logger_Abstract', 'level')
127
+ );
128
+
129
+ $format = $client->getClassConfig('Google_Logger_Abstract', 'log_format');
130
+ $this->logFormat = $format ? $format : self::DEFAULT_LOG_FORMAT;
131
+
132
+ $format = $client->getClassConfig('Google_Logger_Abstract', 'date_format');
133
+ $this->dateFormat = $format ? $format : self::DEFAULT_DATE_FORMAT;
134
+
135
+ $this->allowNewLines = (bool) $client->getClassConfig(
136
+ 'Google_Logger_Abstract',
137
+ 'allow_newlines'
138
+ );
139
+ }
140
+
141
+ /**
142
+ * Sets the minimum logging level that this logger handles.
143
+ *
144
+ * @param integer $level
145
+ */
146
+ public function setLevel($level)
147
+ {
148
+ $this->level = $this->normalizeLevel($level);
149
+ }
150
+
151
+ /**
152
+ * Checks if the logger should handle messages at the provided level.
153
+ *
154
+ * @param integer $level
155
+ * @return boolean
156
+ */
157
+ public function shouldHandle($level)
158
+ {
159
+ return $this->normalizeLevel($level) >= $this->level;
160
+ }
161
+
162
+ /**
163
+ * System is unusable.
164
+ *
165
+ * @param string $message The log message
166
+ * @param array $context The log context
167
+ */
168
+ public function emergency($message, array $context = array())
169
+ {
170
+ $this->log(self::EMERGENCY, $message, $context);
171
+ }
172
+
173
+ /**
174
+ * Action must be taken immediately.
175
+ *
176
+ * Example: Entire website down, database unavailable, etc. This should
177
+ * trigger the SMS alerts and wake you up.
178
+ *
179
+ * @param string $message The log message
180
+ * @param array $context The log context
181
+ */
182
+ public function alert($message, array $context = array())
183
+ {
184
+ $this->log(self::ALERT, $message, $context);
185
+ }
186
+
187
+ /**
188
+ * Critical conditions.
189
+ *
190
+ * Example: Application component unavailable, unexpected exception.
191
+ *
192
+ * @param string $message The log message
193
+ * @param array $context The log context
194
+ */
195
+ public function critical($message, array $context = array())
196
+ {
197
+ $this->log(self::CRITICAL, $message, $context);
198
+ }
199
+
200
+ /**
201
+ * Runtime errors that do not require immediate action but should typically
202
+ * be logged and monitored.
203
+ *
204
+ * @param string $message The log message
205
+ * @param array $context The log context
206
+ */
207
+ public function error($message, array $context = array())
208
+ {
209
+ $this->log(self::ERROR, $message, $context);
210
+ }
211
+
212
+ /**
213
+ * Exceptional occurrences that are not errors.
214
+ *
215
+ * Example: Use of deprecated APIs, poor use of an API, undesirable things
216
+ * that are not necessarily wrong.
217
+ *
218
+ * @param string $message The log message
219
+ * @param array $context The log context
220
+ */
221
+ public function warning($message, array $context = array())
222
+ {
223
+ $this->log(self::WARNING, $message, $context);
224
+ }
225
+
226
+ /**
227
+ * Normal but significant events.
228
+ *
229
+ * @param string $message The log message
230
+ * @param array $context The log context
231
+ */
232
+ public function notice($message, array $context = array())
233
+ {
234
+ $this->log(self::NOTICE, $message, $context);
235
+ }
236
+
237
+ /**
238
+ * Interesting events.
239
+ *
240
+ * Example: User logs in, SQL logs.
241
+ *
242
+ * @param string $message The log message
243
+ * @param array $context The log context
244
+ */
245
+ public function info($message, array $context = array())
246
+ {
247
+ $this->log(self::INFO, $message, $context);
248
+ }
249
+
250
+ /**
251
+ * Detailed debug information.
252
+ *
253
+ * @param string $message The log message
254
+ * @param array $context The log context
255
+ */
256
+ public function debug($message, array $context = array())
257
+ {
258
+ $this->log(self::DEBUG, $message, $context);
259
+ }
260
+
261
+ /**
262
+ * Logs with an arbitrary level.
263
+ *
264
+ * @param mixed $level The log level
265
+ * @param string $message The log message
266
+ * @param array $context The log context
267
+ */
268
+ public function log($level, $message, array $context = array())
269
+ {
270
+ if (!$this->shouldHandle($level)) {
271
+ return false;
272
+ }
273
+
274
+ $levelName = is_int($level) ? array_search($level, self::$levels) : $level;
275
+ $message = $this->interpolate(
276
+ array(
277
+ 'message' => $message,
278
+ 'context' => $context,
279
+ 'level' => strtoupper($levelName),
280
+ 'datetime' => new DateTime(),
281
+ )
282
+ );
283
+
284
+ $this->write($message);
285
+ }
286
+
287
+ /**
288
+ * Interpolates log variables into the defined log format.
289
+ *
290
+ * @param array $variables The log variables.
291
+ * @return string
292
+ */
293
+ protected function interpolate(array $variables = array())
294
+ {
295
+ $template = $this->logFormat;
296
+
297
+ if (!$variables['context']) {
298
+ $template = str_replace('%context%', '', $template);
299
+ unset($variables['context']);
300
+ } else {
301
+ $this->reverseJsonInContext($variables['context']);
302
+ }
303
+
304
+ foreach ($variables as $key => $value) {
305
+ if (strpos($template, '%'. $key .'%') !== false) {
306
+ $template = str_replace(
307
+ '%' . $key . '%',
308
+ $this->export($value),
309
+ $template
310
+ );
311
+ }
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 The log context
321
+ */
322
+ protected function reverseJsonInContext(array &$context)
323
+ {
324
+ if (!$context) {
325
+ return;
326
+ }
327
+
328
+ foreach ($context as $key => $val) {
329
+ if (!$val || !is_string($val) || !($val[0] == '{' || $val[0] == '[')) {
330
+ continue;
331
+ }
332
+
333
+ $json = @json_decode($val);
334
+ if (is_object($json) || is_array($json)) {
335
+ $context[$key] = $json;
336
+ }
337
+ }
338
+ }
339
+
340
+ /**
341
+ * Exports a PHP value for logging to a string.
342
+ *
343
+ * @param mixed $value The value to
344
+ */
345
+ protected function export($value)
346
+ {
347
+ if (is_string($value)) {
348
+ if ($this->allowNewLines) {
349
+ return $value;
350
+ }
351
+
352
+ return preg_replace('/[\r\n]+/', ' ', $value);
353
+ }
354
+
355
+ if (is_resource($value)) {
356
+ return sprintf(
357
+ 'resource(%d) of type (%s)',
358
+ $value,
359
+ get_resource_type($value)
360
+ );
361
+ }
362
+
363
+ if ($value instanceof DateTime) {
364
+ return $value->format($this->dateFormat);
365
+ }
366
+
367
+ if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
368
+ $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
369
+
370
+ if ($this->allowNewLines) {
371
+ $options |= JSON_PRETTY_PRINT;
372
+ }
373
+
374
+ return @json_encode($value, $options);
375
+ }
376
+
377
+ return str_replace('\\/', '/', @json_encode($value));
378
+ }
379
+
380
+ /**
381
+ * Converts a given log level to the integer form.
382
+ *
383
+ * @param mixed $level The logging level
384
+ * @return integer $level The normalized level
385
+ * @throws Google_Logger_Exception If $level is invalid
386
+ */
387
+ protected function normalizeLevel($level)
388
+ {
389
+ if (is_int($level) && array_search($level, self::$levels) !== false) {
390
+ return $level;
391
+ }
392
+
393
+ if (is_string($level) && isset(self::$levels[$level])) {
394
+ return self::$levels[$level];
395
+ }
396
+
397
+ throw new Google_Logger_Exception(
398
+ sprintf("Unknown LogLevel: '%s'", $level)
399
+ );
400
+ }
401
+
402
+ /**
403
+ * Writes a message to the current log implementation.
404
+ *
405
+ * @param string $message The message
406
+ */
407
+ abstract protected function write($message);
408
+ }
google/Logger/Exception.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ class Google_Logger_Exception extends Google_Exception
23
+ {
24
+ }
google/Logger/File.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * File logging class based on the PSR-3 standard.
24
+ *
25
+ * This logger writes to a PHP stream resource.
26
+ */
27
+ class Google_Logger_File extends Google_Logger_Abstract
28
+ {
29
+ /**
30
+ * @var string|resource $file Where logs are written
31
+ */
32
+ private $file;
33
+ /**
34
+ * @var integer $mode The mode to use if the log file needs to be created
35
+ */
36
+ private $mode = 0640;
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
+ * @var string $trappedErrorString Trapped error string
48
+ */
49
+ private $trappedErrorString;
50
+
51
+ /**
52
+ * {@inheritdoc}
53
+ */
54
+ public function __construct(Google_Client $client)
55
+ {
56
+ parent::__construct($client);
57
+
58
+ $file = $client->getClassConfig('Google_Logger_File', 'file');
59
+ if (!is_string($file) && !is_resource($file)) {
60
+ throw new Google_Logger_Exception(
61
+ 'File logger requires a filename or a valid file pointer'
62
+ );
63
+ }
64
+
65
+ $mode = $client->getClassConfig('Google_Logger_File', 'mode');
66
+ if (!$mode) {
67
+ $this->mode = $mode;
68
+ }
69
+
70
+ $this->lock = (bool) $client->getClassConfig('Google_Logger_File', 'lock');
71
+ $this->file = $file;
72
+ }
73
+
74
+ /**
75
+ * {@inheritdoc}
76
+ */
77
+ protected function write($message)
78
+ {
79
+ if (is_string($this->file)) {
80
+ $this->open();
81
+ } elseif (!is_resource($this->file)) {
82
+ throw new Google_Logger_Exception('File pointer is no longer available');
83
+ }
84
+
85
+ if ($this->lock) {
86
+ flock($this->file, LOCK_EX);
87
+ }
88
+
89
+ fwrite($this->file, (string) $message);
90
+
91
+ if ($this->lock) {
92
+ flock($this->file, LOCK_UN);
93
+ }
94
+ }
95
+
96
+ /**
97
+ * Opens the log for writing.
98
+ *
99
+ * @return resource
100
+ */
101
+ private function open()
102
+ {
103
+ // Used for trapping `fopen()` errors.
104
+ $this->trappedErrorNumber = null;
105
+ $this->trappedErrorString = null;
106
+
107
+ $old = set_error_handler(array($this, 'trapError'));
108
+
109
+ $needsChmod = !file_exists($this->file);
110
+ $fh = fopen($this->file, 'a');
111
+
112
+ restore_error_handler();
113
+
114
+ // Handles trapped `fopen()` errors.
115
+ if ($this->trappedErrorNumber) {
116
+ throw new Google_Logger_Exception(
117
+ sprintf(
118
+ "Logger Error: '%s'",
119
+ $this->trappedErrorString
120
+ ),
121
+ $this->trappedErrorNumber
122
+ );
123
+ }
124
+
125
+ if ($needsChmod) {
126
+ @chmod($this->file, $this->mode & ~umask());
127
+ }
128
+
129
+ return $this->file = $fh;
130
+ }
131
+
132
+ /**
133
+ * Closes the log stream resource.
134
+ */
135
+ private function close()
136
+ {
137
+ if (is_resource($this->file)) {
138
+ fclose($this->file);
139
+ }
140
+ }
141
+
142
+ /**
143
+ * Traps `fopen()` errors.
144
+ *
145
+ * @param integer $errno The error number
146
+ * @param string $errstr The error string
147
+ */
148
+ private function trapError($errno, $errstr)
149
+ {
150
+ $this->trappedErrorNumber = $errno;
151
+ $this->trappedErrorString = $errstr;
152
+ }
153
+
154
+ public function __destruct()
155
+ {
156
+ $this->close();
157
+ }
158
+ }
google/Logger/Null.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Null logger based on the PSR-3 standard.
24
+ *
25
+ * This logger simply discards all messages.
26
+ */
27
+ class Google_Logger_Null extends Google_Logger_Abstract
28
+ {
29
+ /**
30
+ * {@inheritdoc}
31
+ */
32
+ public function shouldHandle($level)
33
+ {
34
+ return false;
35
+ }
36
+
37
+ /**
38
+ * {@inheritdoc}
39
+ */
40
+ protected function write($message, array $context = array())
41
+ {
42
+ }
43
+ }
google/Logger/Psr.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Psr logging class based on the PSR-3 standard.
24
+ *
25
+ * This logger will delegate all logging to a PSR-3 compatible logger specified
26
+ * with the `Google_Logger_Psr::setLogger()` method.
27
+ */
28
+ class Google_Logger_Psr extends Google_Logger_Abstract
29
+ {
30
+ /**
31
+ * @param Psr\Log\LoggerInterface $logger The PSR-3 logger
32
+ */
33
+ private $logger;
34
+
35
+ /**
36
+ * @param Google_Client $client The current Google client
37
+ * @param Psr\Log\LoggerInterface $logger PSR-3 logger where logging will be delegated.
38
+ */
39
+ public function __construct(Google_Client $client, /*Psr\Log\LoggerInterface*/ $logger = null)
40
+ {
41
+ parent::__construct($client);
42
+
43
+ if ($logger) {
44
+ $this->setLogger($logger);
45
+ }
46
+ }
47
+
48
+ /**
49
+ * Sets the PSR-3 logger where logging will be delegated.
50
+ *
51
+ * NOTE: The `$logger` should technically implement
52
+ * `Psr\Log\LoggerInterface`, but we don't explicitly require this so that
53
+ * we can be compatible with PHP 5.2.
54
+ *
55
+ * @param Psr\Log\LoggerInterface $logger The PSR-3 logger
56
+ */
57
+ public function setLogger(/*Psr\Log\LoggerInterface*/ $logger)
58
+ {
59
+ $this->logger = $logger;
60
+ }
61
+
62
+ /**
63
+ * {@inheritdoc}
64
+ */
65
+ public function shouldHandle($level)
66
+ {
67
+ return isset($this->logger) && parent::shouldHandle($level);
68
+ }
69
+
70
+ /**
71
+ * {@inheritdoc}
72
+ */
73
+ public function log($level, $message, array $context = array())
74
+ {
75
+ if (!$this->shouldHandle($level)) {
76
+ return false;
77
+ }
78
+
79
+ if ($context) {
80
+ $this->reverseJsonInContext($context);
81
+ }
82
+
83
+ $levelName = is_int($level) ? array_search($level, self::$levels) : $level;
84
+ $this->logger->log($levelName, $message, $context);
85
+ }
86
+
87
+ /**
88
+ * {@inheritdoc}
89
+ */
90
+ protected function write($message, array $context = array())
91
+ {
92
+ }
93
+ }
google/Model.php ADDED
@@ -0,0 +1,295 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ */
24
+ class Google_Model implements ArrayAccess
25
+ {
26
+ /**
27
+ * If you need to specify a NULL JSON value, use Google_Model::NULL_VALUE
28
+ * instead - it will be replaced when converting to JSON with a real null.
29
+ */
30
+ const NULL_VALUE = "{}gapi-php-null";
31
+ protected $internal_gapi_mappings = array();
32
+ protected $modelData = array();
33
+ protected $processed = array();
34
+
35
+ /**
36
+ * Polymorphic - accepts a variable number of arguments dependent
37
+ * on the type of the model subclass.
38
+ */
39
+ final public function __construct()
40
+ {
41
+ if (func_num_args() == 1 && is_array(func_get_arg(0))) {
42
+ // Initialize the model with the array's contents.
43
+ $array = func_get_arg(0);
44
+ $this->mapTypes($array);
45
+ }
46
+ $this->gapiInit();
47
+ }
48
+
49
+ /**
50
+ * Getter that handles passthrough access to the data array, and lazy object creation.
51
+ * @param string $key Property name.
52
+ * @return mixed The value if any, or null.
53
+ */
54
+ public function __get($key)
55
+ {
56
+ $keyTypeName = $this->keyType($key);
57
+ $keyDataType = $this->dataType($key);
58
+ if (isset($this->$keyTypeName) && !isset($this->processed[$key])) {
59
+ if (isset($this->modelData[$key])) {
60
+ $val = $this->modelData[$key];
61
+ } else if (isset($this->$keyDataType) &&
62
+ ($this->$keyDataType == 'array' || $this->$keyDataType == 'map')) {
63
+ $val = array();
64
+ } else {
65
+ $val = null;
66
+ }
67
+
68
+ if ($this->isAssociativeArray($val)) {
69
+ if (isset($this->$keyDataType) && 'map' == $this->$keyDataType) {
70
+ foreach ($val as $arrayKey => $arrayItem) {
71
+ $this->modelData[$key][$arrayKey] =
72
+ $this->createObjectFromName($keyTypeName, $arrayItem);
73
+ }
74
+ } else {
75
+ $this->modelData[$key] = $this->createObjectFromName($keyTypeName, $val);
76
+ }
77
+ } else if (is_array($val)) {
78
+ $arrayObject = array();
79
+ foreach ($val as $arrayIndex => $arrayItem) {
80
+ $arrayObject[$arrayIndex] =
81
+ $this->createObjectFromName($keyTypeName, $arrayItem);
82
+ }
83
+ $this->modelData[$key] = $arrayObject;
84
+ }
85
+ $this->processed[$key] = true;
86
+ }
87
+
88
+ return isset($this->modelData[$key]) ? $this->modelData[$key] : null;
89
+ }
90
+
91
+ /**
92
+ * Initialize this object's properties from an array.
93
+ *
94
+ * @param array $array Used to seed this object's properties.
95
+ * @return void
96
+ */
97
+ protected function mapTypes($array)
98
+ {
99
+ // Hard initialise simple types, lazy load more complex ones.
100
+ foreach ($array as $key => $val) {
101
+ if ( !property_exists($this, $this->keyType($key)) &&
102
+ property_exists($this, $key)) {
103
+ $this->$key = $val;
104
+ unset($array[$key]);
105
+ } elseif (property_exists($this, $camelKey = Google_Utils::camelCase($key))) {
106
+ // This checks if property exists as camelCase, leaving it in array as snake_case
107
+ // in case of backwards compatibility issues.
108
+ $this->$camelKey = $val;
109
+ }
110
+ }
111
+ $this->modelData = $array;
112
+ }
113
+
114
+ /**
115
+ * Blank initialiser to be used in subclasses to do post-construction initialisation - this
116
+ * avoids the need for subclasses to have to implement the variadics handling in their
117
+ * constructors.
118
+ */
119
+ protected function gapiInit()
120
+ {
121
+ return;
122
+ }
123
+
124
+ /**
125
+ * Create a simplified object suitable for straightforward
126
+ * conversion to JSON. This is relatively expensive
127
+ * due to the usage of reflection, but shouldn't be called
128
+ * a whole lot, and is the most straightforward way to filter.
129
+ */
130
+ public function toSimpleObject()
131
+ {
132
+ $object = new stdClass();
133
+
134
+ // Process all other data.
135
+ foreach ($this->modelData as $key => $val) {
136
+ $result = $this->getSimpleValue($val);
137
+ if ($result !== null) {
138
+ $object->$key = $this->nullPlaceholderCheck($result);
139
+ }
140
+ }
141
+
142
+ // Process all public properties.
143
+ $reflect = new ReflectionObject($this);
144
+ $props = $reflect->getProperties(ReflectionProperty::IS_PUBLIC);
145
+ foreach ($props as $member) {
146
+ $name = $member->getName();
147
+ $result = $this->getSimpleValue($this->$name);
148
+ if ($result !== null) {
149
+ $name = $this->getMappedName($name);
150
+ $object->$name = $this->nullPlaceholderCheck($result);
151
+ }
152
+ }
153
+
154
+ return $object;
155
+ }
156
+
157
+ /**
158
+ * Handle different types of values, primarily
159
+ * other objects and map and array data types.
160
+ */
161
+ private function getSimpleValue($value)
162
+ {
163
+ if ($value instanceof Google_Model) {
164
+ return $value->toSimpleObject();
165
+ } else if (is_array($value)) {
166
+ $return = array();
167
+ foreach ($value as $key => $a_value) {
168
+ $a_value = $this->getSimpleValue($a_value);
169
+ if ($a_value !== null) {
170
+ $key = $this->getMappedName($key);
171
+ $return[$key] = $this->nullPlaceholderCheck($a_value);
172
+ }
173
+ }
174
+ return $return;
175
+ }
176
+ return $value;
177
+ }
178
+
179
+ /**
180
+ * Check whether the value is the null placeholder and return true null.
181
+ */
182
+ private function nullPlaceholderCheck($value)
183
+ {
184
+ if ($value === self::NULL_VALUE) {
185
+ return null;
186
+ }
187
+ return $value;
188
+ }
189
+
190
+ /**
191
+ * If there is an internal name mapping, use that.
192
+ */
193
+ private function getMappedName($key)
194
+ {
195
+ if (isset($this->internal_gapi_mappings) &&
196
+ isset($this->internal_gapi_mappings[$key])) {
197
+ $key = $this->internal_gapi_mappings[$key];
198
+ }
199
+ return $key;
200
+ }
201
+
202
+ /**
203
+ * Returns true only if the array is associative.
204
+ * @param array $array
205
+ * @return bool True if the array is associative.
206
+ */
207
+ protected function isAssociativeArray($array)
208
+ {
209
+ if (!is_array($array)) {
210
+ return false;
211
+ }
212
+ $keys = array_keys($array);
213
+ foreach ($keys as $key) {
214
+ if (is_string($key)) {
215
+ return true;
216
+ }
217
+ }
218
+ return false;
219
+ }
220
+
221
+ /**
222
+ * Given a variable name, discover its type.
223
+ *
224
+ * @param $name
225
+ * @param $item
226
+ * @return object The object from the item.
227
+ */
228
+ private function createObjectFromName($name, $item)
229
+ {
230
+ $type = $this->$name;
231
+ return new $type($item);
232
+ }
233
+
234
+ /**
235
+ * Verify if $obj is an array.
236
+ * @throws Google_Exception Thrown if $obj isn't an array.
237
+ * @param array $obj Items that should be validated.
238
+ * @param string $method Method expecting an array as an argument.
239
+ */
240
+ public function assertIsArray($obj, $method)
241
+ {
242
+ if ($obj && !is_array($obj)) {
243
+ throw new Google_Exception(
244
+ "Incorrect parameter type passed to $method(). Expected an array."
245
+ );
246
+ }
247
+ }
248
+
249
+ public function offsetExists($offset)
250
+ {
251
+ return isset($this->$offset) || isset($this->modelData[$offset]);
252
+ }
253
+
254
+ public function offsetGet($offset)
255
+ {
256
+ return isset($this->$offset) ?
257
+ $this->$offset :
258
+ $this->__get($offset);
259
+ }
260
+
261
+ public function offsetSet($offset, $value)
262
+ {
263
+ if (property_exists($this, $offset)) {
264
+ $this->$offset = $value;
265
+ } else {
266
+ $this->modelData[$offset] = $value;
267
+ $this->processed[$offset] = true;
268
+ }
269
+ }
270
+
271
+ public function offsetUnset($offset)
272
+ {
273
+ unset($this->modelData[$offset]);
274
+ }
275
+
276
+ protected function keyType($key)
277
+ {
278
+ return $key . "Type";
279
+ }
280
+
281
+ protected function dataType($key)
282
+ {
283
+ return $key . "DataType";
284
+ }
285
+
286
+ public function __isset($key)
287
+ {
288
+ return isset($this->modelData[$key]);
289
+ }
290
+
291
+ public function __unset($key)
292
+ {
293
+ unset($this->modelData[$key]);
294
+ }
295
+ }
google/Service.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ class Google_Service
19
+ {
20
+ public $batchPath;
21
+ public $rootUrl;
22
+ public $version;
23
+ public $servicePath;
24
+ public $availableScopes;
25
+ public $resource;
26
+ private $client;
27
+
28
+ public function __construct(Google_Client $client)
29
+ {
30
+ $this->client = $client;
31
+ }
32
+
33
+ /**
34
+ * Return the associated Google_Client class.
35
+ * @return Google_Client
36
+ */
37
+ public function getClient()
38
+ {
39
+ return $this->client;
40
+ }
41
+
42
+ /**
43
+ * Create a new HTTP Batch handler for this service
44
+ *
45
+ * @return Google_Http_Batch
46
+ */
47
+ public function createBatch()
48
+ {
49
+ return new Google_Http_Batch(
50
+ $this->client,
51
+ false,
52
+ $this->rootUrl,
53
+ $this->batchPath
54
+ );
55
+ }
56
+ }
google/Service/Analytics.php ADDED
@@ -0,0 +1,9900 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * 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, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * Service definition for Analytics (v3).
20
+ *
21
+ * <p>
22
+ * View and manage your Google Analytics data</p>
23
+ *
24
+ * <p>
25
+ * For more information about this service, see the API
26
+ * <a href="https://developers.google.com/analytics/" target="_blank">Documentation</a>
27
+ * </p>
28
+ *
29
+ * @author Google, Inc.
30
+ */
31
+ class Google_Service_Analytics extends Google_Service
32
+ {
33
+ /** View and manage your Google Analytics data. */
34
+ const ANALYTICS =
35
+ "https://www.googleapis.com/auth/analytics";
36
+ /** Edit Google Analytics management entities. */
37
+ const ANALYTICS_EDIT =
38
+ "https://www.googleapis.com/auth/analytics.edit";
39
+ /** Manage Google Analytics Account users by email address. */
40
+ const ANALYTICS_MANAGE_USERS =
41
+ "https://www.googleapis.com/auth/analytics.manage.users";
42
+ /** View Google Analytics user permissions. */
43
+ const ANALYTICS_MANAGE_USERS_READONLY =
44
+ "https://www.googleapis.com/auth/analytics.manage.users.readonly";
45
+ /** Create a new Google Analytics account along with its default property and view. */
46
+ const ANALYTICS_PROVISION =
47
+ "https://www.googleapis.com/auth/analytics.provision";
48
+ /** View your Google Analytics data. */
49
+ const ANALYTICS_READONLY =
50
+ "https://www.googleapis.com/auth/analytics.readonly";
51
+
52
+ public $data_ga;
53
+ public $data_mcf;
54
+ public $data_realtime;
55
+ public $management_accountSummaries;
56
+ public $management_accountUserLinks;
57
+ public $management_accounts;
58
+ public $management_customDataSources;
59
+ public $management_customDimensions;
60
+ public $management_customMetrics;
61
+ public $management_experiments;
62
+ public $management_filters;
63
+ public $management_goals;
64
+ public $management_profileFilterLinks;
65
+ public $management_profileUserLinks;
66
+ public $management_profiles;
67
+ public $management_segments;
68
+ public $management_unsampledReports;
69
+ public $management_uploads;
70
+ public $management_webPropertyAdWordsLinks;
71
+ public $management_webproperties;
72
+ public $management_webpropertyUserLinks;
73
+ public $metadata_columns;
74
+ public $provisioning;
75
+
76
+
77
+ /**
78
+ * Constructs the internal representation of the Analytics service.
79
+ *
80
+ * @param Google_Client $client
81
+ */
82
+ public function __construct(Google_Client $client)
83
+ {
84
+ parent::__construct($client);
85
+ $this->rootUrl = 'https://www.googleapis.com/';
86
+ $this->servicePath = 'analytics/v3/';
87
+ $this->version = 'v3';
88
+ $this->serviceName = 'analytics';
89
+
90
+ $this->data_ga = new Google_Service_Analytics_DataGa_Resource(
91
+ $this,
92
+ $this->serviceName,
93
+ 'ga',
94
+ array(
95
+ 'methods' => array(
96
+ 'get' => array(
97
+ 'path' => 'data/ga',
98
+ 'httpMethod' => 'GET',
99
+ 'parameters' => array(
100
+ 'ids' => array(
101
+ 'location' => 'query',
102
+ 'type' => 'string',
103
+ 'required' => true,
104
+ ),
105
+ 'start-date' => array(
106
+ 'location' => 'query',
107
+ 'type' => 'string',
108
+ 'required' => true,
109
+ ),
110
+ 'end-date' => array(
111
+ 'location' => 'query',
112
+ 'type' => 'string',
113
+ 'required' => true,
114
+ ),
115
+ 'metrics' => array(
116
+ 'location' => 'query',
117
+ 'type' => 'string',
118
+ 'required' => true,
119
+ ),
120
+ 'max-results' => array(
121
+ 'location' => 'query',
122
+ 'type' => 'integer',
123
+ ),
124
+ 'sort' => array(
125
+ 'location' => 'query',
126
+ 'type' => 'string',
127
+ ),
128
+ 'dimensions' => array(
129
+ 'location' => 'query',
130
+ 'type' => 'string',
131
+ ),
132
+ 'start-index' => array(
133
+ 'location' => 'query',
134
+ 'type' => 'integer',
135
+ ),
136
+ 'segment' => array(
137
+ 'location' => 'query',
138
+ 'type' => 'string',
139
+ ),
140
+ 'samplingLevel' => array(
141
+ 'location' => 'query',
142
+ 'type' => 'string',
143
+ ),
144
+ 'filters' => array(
145
+ 'location' => 'query',
146
+ 'type' => 'string',
147
+ ),
148
+ 'output' => array(
149
+ 'location' => 'query',
150
+ 'type' => 'string',
151
+ ),
152
+ ),
153
+ ),
154
+ )
155
+ )
156
+ );
157
+ $this->data_mcf = new Google_Service_Analytics_DataMcf_Resource(
158
+ $this,
159
+ $this->serviceName,
160
+ 'mcf',
161
+ array(
162
+ 'methods' => array(
163
+ 'get' => array(
164
+ 'path' => 'data/mcf',
165
+ 'httpMethod' => 'GET',
166
+ 'parameters' => array(
167
+ 'ids' => array(
168
+ 'location' => 'query',
169
+ 'type' => 'string',
170
+ 'required' => true,
171
+ ),
172
+ 'start-date' => array(
173
+ 'location' => 'query',
174
+ 'type' => 'string',
175
+ 'required' => true,
176
+ ),
177
+ 'end-date' => array(
178
+ 'location' => 'query',
179
+ 'type' => 'string',
180
+ 'required' => true,
181
+ ),
182
+ 'metrics' => array(
183
+ 'location' => 'query',
184
+ 'type' => 'string',
185
+ 'required' => true,
186
+ ),
187
+ 'max-results' => array(
188
+ 'location' => 'query',
189
+ 'type' => 'integer',
190
+ ),
191
+ 'sort' => array(
192
+ 'location' => 'query',
193
+ 'type' => 'string',
194
+ ),
195
+ 'dimensions' => array(
196
+ 'location' => 'query',
197
+ 'type' => 'string',
198
+ ),
199
+ 'start-index' => array(
200
+ 'location' => 'query',
201
+ 'type' => 'integer',
202
+ ),
203
+ 'samplingLevel' => array(
204
+ 'location' => 'query',
205
+ 'type' => 'string',
206
+ ),
207
+ 'filters' => array(
208
+ 'location' => 'query',
209
+ 'type' => 'string',
210
+ ),
211
+ ),
212
+ ),
213
+ )
214
+ )
215
+ );
216
+ $this->data_realtime = new Google_Service_Analytics_DataRealtime_Resource(
217
+ $this,
218
+ $this->serviceName,
219
+ 'realtime',
220
+ array(
221
+ 'methods' => array(
222
+ 'get' => array(
223
+ 'path' => 'data/realtime',
224
+ 'httpMethod' => 'GET',
225
+ 'parameters' => array(
226
+ 'ids' => array(
227
+ 'location' => 'query',
228
+ 'type' => 'string',
229
+ 'required' => true,
230
+ ),
231
+ 'metrics' => array(
232
+ 'location' => 'query',
233
+ 'type' => 'string',
234
+ 'required' => true,
235
+ ),
236
+ 'max-results' => array(
237
+ 'location' => 'query',
238
+ 'type' => 'integer',
239
+ ),
240
+ 'sort' => array(
241
+ 'location' => 'query',
242
+ 'type' => 'string',
243
+ ),
244
+ 'dimensions' => array(
245
+ 'location' => 'query',
246
+ 'type' => 'string',
247
+ ),
248
+ 'filters' => array(
249
+ 'location' => 'query',
250
+ 'type' => 'string',
251
+ ),
252
+ ),
253
+ ),
254
+ )
255
+ )
256
+ );
257
+ $this->management_accountSummaries = new Google_Service_Analytics_ManagementAccountSummaries_Resource(
258
+ $this,
259
+ $this->serviceName,
260
+ 'accountSummaries',
261
+ array(
262
+ 'methods' => array(
263
+ 'list' => array(
264
+ 'path' => 'management/accountSummaries',
265
+ 'httpMethod' => 'GET',
266
+ 'parameters' => array(
267
+ 'max-results' => array(
268
+ 'location' => 'query',
269
+ 'type' => 'integer',
270
+ ),
271
+ 'start-index' => array(
272
+ 'location' => 'query',
273
+ 'type' => 'integer',
274
+ ),
275
+ ),
276
+ ),
277
+ )
278
+ )
279
+ );
280
+ $this->management_accountUserLinks = new Google_Service_Analytics_ManagementAccountUserLinks_Resource(
281
+ $this,
282
+ $this->serviceName,
283
+ 'accountUserLinks',
284
+ array(
285
+ 'methods' => array(
286
+ 'delete' => array(
287
+ 'path' => 'management/accounts/{accountId}/entityUserLinks/{linkId}',
288
+ 'httpMethod' => 'DELETE',
289
+ 'parameters' => array(
290
+ 'accountId' => array(
291
+ 'location' => 'path',
292
+ 'type' => 'string',
293
+ 'required' => true,
294
+ ),
295
+ 'linkId' => array(
296
+ 'location' => 'path',
297
+ 'type' => 'string',
298
+ 'required' => true,
299
+ ),
300
+ ),
301
+ ),'insert' => array(
302
+ 'path' => 'management/accounts/{accountId}/entityUserLinks',
303
+ 'httpMethod' => 'POST',
304
+ 'parameters' => array(
305
+ 'accountId' => array(
306
+ 'location' => 'path',
307
+ 'type' => 'string',
308
+ 'required' => true,
309
+ ),
310
+ ),
311
+ ),'list' => array(
312
+ 'path' => 'management/accounts/{accountId}/entityUserLinks',
313
+ 'httpMethod' => 'GET',
314
+ 'parameters' => array(
315
+ 'accountId' => array(
316
+ 'location' => 'path',
317
+ 'type' => 'string',
318
+ 'required' => true,
319
+ ),
320
+ 'max-results' => array(
321
+ 'location' => 'query',
322
+ 'type' => 'integer',
323
+ ),
324
+ 'start-index' => array(
325
+ 'location' => 'query',
326
+ 'type' => 'integer',
327
+ ),
328
+ ),
329
+ ),'update' => array(
330
+ 'path' => 'management/accounts/{accountId}/entityUserLinks/{linkId}',
331
+ 'httpMethod' => 'PUT',
332
+ 'parameters' => array(
333
+ 'accountId' => array(
334
+ 'location' => 'path',
335
+ 'type' => 'string',
336
+ 'required' => true,
337
+ ),
338
+ 'linkId' => array(
339
+ 'location' => 'path',
340
+ 'type' => 'string',
341
+ 'required' => true,
342
+ ),
343
+ ),
344
+ ),
345
+ )
346
+ )
347
+ );
348
+ $this->management_accounts = new Google_Service_Analytics_ManagementAccounts_Resource(
349
+ $this,
350
+ $this->serviceName,
351
+ 'accounts',
352
+ array(
353
+ 'methods' => array(
354
+ 'list' => array(
355
+ 'path' => 'management/accounts',
356
+ 'httpMethod' => 'GET',
357
+ 'parameters' => array(
358
+ 'max-results' => array(
359
+ 'location' => 'query',
360
+ 'type' => 'integer',
361
+ ),
362
+ 'start-index' => array(
363
+ 'location' => 'query',
364
+ 'type' => 'integer',
365
+ ),
366
+ ),
367
+ ),
368
+ )
369
+ )
370
+ );
371
+ $this->management_customDataSources = new Google_Service_Analytics_ManagementCustomDataSources_Resource(
372
+ $this,
373
+ $this->serviceName,
374
+ 'customDataSources',
375
+ array(
376
+ 'methods' => array(
377
+ 'list' => array(
378
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources',
379
+ 'httpMethod' => 'GET',
380
+ 'parameters' => array(
381
+ 'accountId' => array(
382
+ 'location' => 'path',
383
+ 'type' => 'string',
384
+ 'required' => true,
385
+ ),
386
+ 'webPropertyId' => array(
387
+ 'location' => 'path',
388
+ 'type' => 'string',
389
+ 'required' => true,
390
+ ),
391
+ 'max-results' => array(
392
+ 'location' => 'query',
393
+ 'type' => 'integer',
394
+ ),
395
+ 'start-index' => array(
396
+ 'location' => 'query',
397
+ 'type' => 'integer',
398
+ ),
399
+ ),
400
+ ),
401
+ )
402
+ )
403
+ );
404
+ $this->management_customDimensions = new Google_Service_Analytics_ManagementCustomDimensions_Resource(
405
+ $this,
406
+ $this->serviceName,
407
+ 'customDimensions',
408
+ array(
409
+ 'methods' => array(
410
+ 'get' => array(
411
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}',
412
+ 'httpMethod' => 'GET',
413
+ 'parameters' => array(
414
+ 'accountId' => array(
415
+ 'location' => 'path',
416
+ 'type' => 'string',
417
+ 'required' => true,
418
+ ),
419
+ 'webPropertyId' => array(
420
+ 'location' => 'path',
421
+ 'type' => 'string',
422
+ 'required' => true,
423
+ ),
424
+ 'customDimensionId' => array(
425
+ 'location' => 'path',
426
+ 'type' => 'string',
427
+ 'required' => true,
428
+ ),
429
+ ),
430
+ ),'insert' => array(
431
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions',
432
+ 'httpMethod' => 'POST',
433
+ 'parameters' => array(
434
+ 'accountId' => array(
435
+ 'location' => 'path',
436
+ 'type' => 'string',
437
+ 'required' => true,
438
+ ),
439
+ 'webPropertyId' => array(
440
+ 'location' => 'path',
441
+ 'type' => 'string',
442
+ 'required' => true,
443
+ ),
444
+ ),
445
+ ),'list' => array(
446
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions',
447
+ 'httpMethod' => 'GET',
448
+ 'parameters' => array(
449
+ 'accountId' => array(
450
+ 'location' => 'path',
451
+ 'type' => 'string',
452
+ 'required' => true,
453
+ ),
454
+ 'webPropertyId' => array(
455
+ 'location' => 'path',
456
+ 'type' => 'string',
457
+ 'required' => true,
458
+ ),
459
+ 'max-results' => array(
460
+ 'location' => 'query',
461
+ 'type' => 'integer',
462
+ ),
463
+ 'start-index' => array(
464
+ 'location' => 'query',
465
+ 'type' => 'integer',
466
+ ),
467
+ ),
468
+ ),'patch' => array(
469
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}',
470
+ 'httpMethod' => 'PATCH',
471
+ 'parameters' => array(
472
+ 'accountId' => array(
473
+ 'location' => 'path',
474
+ 'type' => 'string',
475
+ 'required' => true,
476
+ ),
477
+ 'webPropertyId' => array(
478
+ 'location' => 'path',
479
+ 'type' => 'string',
480
+ 'required' => true,
481
+ ),
482
+ 'customDimensionId' => array(
483
+ 'location' => 'path',
484
+ 'type' => 'string',
485
+ 'required' => true,
486
+ ),
487
+ 'ignoreCustomDataSourceLinks' => array(
488
+ 'location' => 'query',
489
+ 'type' => 'boolean',
490
+ ),
491
+ ),
492
+ ),'update' => array(
493
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}',
494
+ 'httpMethod' => 'PUT',
495
+ 'parameters' => array(
496
+ 'accountId' => array(
497
+ 'location' => 'path',
498
+ 'type' => 'string',
499
+ 'required' => true,
500
+ ),
501
+ 'webPropertyId' => array(
502
+ 'location' => 'path',
503
+ 'type' => 'string',
504
+ 'required' => true,
505
+ ),
506
+ 'customDimensionId' => array(
507
+ 'location' => 'path',
508
+ 'type' => 'string',
509
+ 'required' => true,
510
+ ),
511
+ 'ignoreCustomDataSourceLinks' => array(
512
+ 'location' => 'query',
513
+ 'type' => 'boolean',
514
+ ),
515
+ ),
516
+ ),
517
+ )
518
+ )
519
+ );
520
+ $this->management_customMetrics = new Google_Service_Analytics_ManagementCustomMetrics_Resource(
521
+ $this,
522
+ $this->serviceName,
523
+ 'customMetrics',
524
+ array(
525
+ 'methods' => array(
526
+ 'get' => array(
527
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}',
528
+ 'httpMethod' => 'GET',
529
+ 'parameters' => array(
530
+ 'accountId' => array(
531
+ 'location' => 'path',
532
+ 'type' => 'string',
533
+ 'required' => true,
534
+ ),
535
+ 'webPropertyId' => array(
536
+ 'location' => 'path',
537
+ 'type' => 'string',
538
+ 'required' => true,
539
+ ),
540
+ 'customMetricId' => array(
541
+ 'location' => 'path',
542
+ 'type' => 'string',
543
+ 'required' => true,
544
+ ),
545
+ ),
546
+ ),'insert' => array(
547
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics',
548
+ 'httpMethod' => 'POST',
549
+ 'parameters' => array(
550
+ 'accountId' => array(
551
+ 'location' => 'path',
552
+ 'type' => 'string',
553
+ 'required' => true,
554
+ ),
555
+ 'webPropertyId' => array(
556
+ 'location' => 'path',
557
+ 'type' => 'string',
558
+ 'required' => true,
559
+ ),
560
+ ),
561
+ ),'list' => array(
562
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics',
563
+ 'httpMethod' => 'GET',
564
+ 'parameters' => array(
565
+ 'accountId' => array(
566
+ 'location' => 'path',
567
+ 'type' => 'string',
568
+ 'required' => true,
569
+ ),
570
+ 'webPropertyId' => array(
571
+ 'location' => 'path',
572
+ 'type' => 'string',
573
+ 'required' => true,
574
+ ),
575
+ 'max-results' => array(
576
+ 'location' => 'query',
577
+ 'type' => 'integer',
578
+ ),
579
+ 'start-index' => array(
580
+ 'location' => 'query',
581
+ 'type' => 'integer',
582
+ ),
583
+ ),
584
+ ),'patch' => array(
585
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}',
586
+ 'httpMethod' => 'PATCH',
587
+ 'parameters' => array(
588
+ 'accountId' => array(
589
+ 'location' => 'path',
590
+ 'type' => 'string',
591
+ 'required' => true,
592
+ ),
593
+ 'webPropertyId' => array(
594
+ 'location' => 'path',
595
+ 'type' => 'string',
596
+ 'required' => true,
597
+ ),
598
+ 'customMetricId' => array(
599
+ 'location' => 'path',
600
+ 'type' => 'string',
601
+ 'required' => true,
602
+ ),
603
+ 'ignoreCustomDataSourceLinks' => array(
604
+ 'location' => 'query',
605
+ 'type' => 'boolean',
606
+ ),
607
+ ),
608
+ ),'update' => array(
609
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}',
610
+ 'httpMethod' => 'PUT',
611
+ 'parameters' => array(
612
+ 'accountId' => array(
613
+ 'location' => 'path',
614
+ 'type' => 'string',
615
+ 'required' => true,
616
+ ),
617
+ 'webPropertyId' => array(
618
+ 'location' => 'path',
619
+ 'type' => 'string',
620
+ 'required' => true,
621
+ ),
622
+ 'customMetricId' => array(
623
+ 'location' => 'path',
624
+ 'type' => 'string',
625
+ 'required' => true,
626
+ ),
627
+ 'ignoreCustomDataSourceLinks' => array(
628
+ 'location' => 'query',
629
+ 'type' => 'boolean',
630
+ ),
631
+ ),
632
+ ),
633
+ )
634
+ )
635
+ );
636
+ $this->management_experiments = new Google_Service_Analytics_ManagementExperiments_Resource(
637
+ $this,
638
+ $this->serviceName,
639
+ 'experiments',
640
+ array(
641
+ 'methods' => array(
642
+ 'delete' => array(
643
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}',
644
+ 'httpMethod' => 'DELETE',
645
+ 'parameters' => array(
646
+ 'accountId' => array(
647
+ 'location' => 'path',
648
+ 'type' => 'string',
649
+ 'required' => true,
650
+ ),
651
+ 'webPropertyId' => array(
652
+ 'location' => 'path',
653
+ 'type' => 'string',
654
+ 'required' => true,
655
+ ),
656
+ 'profileId' => array(
657
+ 'location' => 'path',
658
+ 'type' => 'string',
659
+ 'required' => true,
660
+ ),
661
+ 'experimentId' => array(
662
+ 'location' => 'path',
663
+ 'type' => 'string',
664
+ 'required' => true,
665
+ ),
666
+ ),
667
+ ),'get' => array(
668
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}',
669
+ 'httpMethod' => 'GET',
670
+ 'parameters' => array(
671
+ 'accountId' => array(
672
+ 'location' => 'path',
673
+ 'type' => 'string',
674
+ 'required' => true,
675
+ ),
676
+ 'webPropertyId' => array(
677
+ 'location' => 'path',
678
+ 'type' => 'string',
679
+ 'required' => true,
680
+ ),
681
+ 'profileId' => array(
682
+ 'location' => 'path',
683
+ 'type' => 'string',
684
+ 'required' => true,
685
+ ),
686
+ 'experimentId' => array(
687
+ 'location' => 'path',
688
+ 'type' => 'string',
689
+ 'required' => true,
690
+ ),
691
+ ),
692
+ ),'insert' => array(
693
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments',
694
+ 'httpMethod' => 'POST',
695
+ 'parameters' => array(
696
+ 'accountId' => array(
697
+ 'location' => 'path',
698
+ 'type' => 'string',
699
+ 'required' => true,
700
+ ),
701
+ 'webPropertyId' => array(
702
+ 'location' => 'path',
703
+ 'type' => 'string',
704
+ 'required' => true,
705
+ ),
706
+ 'profileId' => array(
707
+ 'location' => 'path',
708
+ 'type' => 'string',
709
+ 'required' => true,
710
+ ),
711
+ ),
712
+ ),'list' => array(
713
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments',
714
+ 'httpMethod' => 'GET',
715
+ 'parameters' => array(
716
+ 'accountId' => array(
717
+ 'location' => 'path',
718
+ 'type' => 'string',
719
+ 'required' => true,
720
+ ),
721
+ 'webPropertyId' => array(
722
+ 'location' => 'path',
723
+ 'type' => 'string',
724
+ 'required' => true,
725
+ ),
726
+ 'profileId' => array(
727
+ 'location' => 'path',
728
+ 'type' => 'string',
729
+ 'required' => true,
730
+ ),
731
+ 'max-results' => array(
732
+ 'location' => 'query',
733
+ 'type' => 'integer',
734
+ ),
735
+ 'start-index' => array(
736
+ 'location' => 'query',
737
+ 'type' => 'integer',
738
+ ),
739
+ ),
740
+ ),'patch' => array(
741
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}',
742
+ 'httpMethod' => 'PATCH',
743
+ 'parameters' => array(
744
+ 'accountId' => array(
745
+ 'location' => 'path',
746
+ 'type' => 'string',
747
+ 'required' => true,
748
+ ),
749
+ 'webPropertyId' => array(
750
+ 'location' => 'path',
751
+ 'type' => 'string',
752
+ 'required' => true,
753
+ ),
754
+ 'profileId' => array(
755
+ 'location' => 'path',
756
+ 'type' => 'string',
757
+ 'required' => true,
758
+ ),
759
+ 'experimentId' => array(
760
+ 'location' => 'path',
761
+ 'type' => 'string',
762
+ 'required' => true,
763
+ ),
764
+ ),
765
+ ),'update' => array(
766
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}',
767
+ 'httpMethod' => 'PUT',
768
+ 'parameters' => array(
769
+ 'accountId' => array(
770
+ 'location' => 'path',
771
+ 'type' => 'string',
772
+ 'required' => true,
773
+ ),
774
+ 'webPropertyId' => array(
775
+ 'location' => 'path',
776
+ 'type' => 'string',
777
+ 'required' => true,
778
+ ),
779
+ 'profileId' => array(
780
+ 'location' => 'path',
781
+ 'type' => 'string',
782
+ 'required' => true,
783
+ ),
784
+ 'experimentId' => array(
785
+ 'location' => 'path',
786
+ 'type' => 'string',
787
+ 'required' => true,
788
+ ),
789
+ ),
790
+ ),
791
+ )
792
+ )
793
+ );
794
+ $this->management_filters = new Google_Service_Analytics_ManagementFilters_Resource(
795
+ $this,
796
+ $this->serviceName,
797
+ 'filters',
798
+ array(
799
+ 'methods' => array(
800
+ 'delete' => array(
801
+ 'path' => 'management/accounts/{accountId}/filters/{filterId}',
802
+ 'httpMethod' => 'DELETE',
803
+ 'parameters' => array(
804
+ 'accountId' => array(
805
+ 'location' => 'path',
806
+ 'type' => 'string',
807
+ 'required' => true,
808
+ ),
809
+ 'filterId' => array(
810
+ 'location' => 'path',
811
+ 'type' => 'string',
812
+ 'required' => true,
813
+ ),
814
+ ),
815
+ ),'get' => array(
816
+ 'path' => 'management/accounts/{accountId}/filters/{filterId}',
817
+ 'httpMethod' => 'GET',
818
+ 'parameters' => array(
819
+ 'accountId' => array(
820
+ 'location' => 'path',
821
+ 'type' => 'string',
822
+ 'required' => true,
823
+ ),
824
+ 'filterId' => array(
825
+ 'location' => 'path',
826
+ 'type' => 'string',
827
+ 'required' => true,
828
+ ),
829
+ ),
830
+ ),'insert' => array(
831
+ 'path' => 'management/accounts/{accountId}/filters',
832
+ 'httpMethod' => 'POST',
833
+ 'parameters' => array(
834
+ 'accountId' => array(
835
+ 'location' => 'path',
836
+ 'type' => 'string',
837
+ 'required' => true,
838
+ ),
839
+ ),
840
+ ),'list' => array(
841
+ 'path' => 'management/accounts/{accountId}/filters',
842
+ 'httpMethod' => 'GET',
843
+ 'parameters' => array(
844
+ 'accountId' => array(
845
+ 'location' => 'path',
846
+ 'type' => 'string',
847
+ 'required' => true,
848
+ ),
849
+ 'max-results' => array(
850
+ 'location' => 'query',
851
+ 'type' => 'integer',
852
+ ),
853
+ 'start-index' => array(
854
+ 'location' => 'query',
855
+ 'type' => 'integer',
856
+ ),
857
+ ),
858
+ ),'patch' => array(
859
+ 'path' => 'management/accounts/{accountId}/filters/{filterId}',
860
+ 'httpMethod' => 'PATCH',
861
+ 'parameters' => array(
862
+ 'accountId' => array(
863
+ 'location' => 'path',
864
+ 'type' => 'string',
865
+ 'required' => true,
866
+ ),
867
+ 'filterId' => array(
868
+ 'location' => 'path',
869
+ 'type' => 'string',
870
+ 'required' => true,
871
+ ),
872
+ ),
873
+ ),'update' => array(
874
+ 'path' => 'management/accounts/{accountId}/filters/{filterId}',
875
+ 'httpMethod' => 'PUT',
876
+ 'parameters' => array(
877
+ 'accountId' => array(
878
+ 'location' => 'path',
879
+ 'type' => 'string',
880
+ 'required' => true,
881
+ ),
882
+ 'filterId' => array(
883
+ 'location' => 'path',
884
+ 'type' => 'string',
885
+ 'required' => true,
886
+ ),
887
+ ),
888
+ ),
889
+ )
890
+ )
891
+ );
892
+ $this->management_goals = new Google_Service_Analytics_ManagementGoals_Resource(
893
+ $this,
894
+ $this->serviceName,
895
+ 'goals',
896
+ array(
897
+ 'methods' => array(
898
+ 'get' => array(
899
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}',
900
+ 'httpMethod' => 'GET',
901
+ 'parameters' => array(
902
+ 'accountId' => array(
903
+ 'location' => 'path',
904
+ 'type' => 'string',
905
+ 'required' => true,
906
+ ),
907
+ 'webPropertyId' => array(
908
+ 'location' => 'path',
909
+ 'type' => 'string',
910
+ 'required' => true,
911
+ ),
912
+ 'profileId' => array(
913
+ 'location' => 'path',
914
+ 'type' => 'string',
915
+ 'required' => true,
916
+ ),
917
+ 'goalId' => array(
918
+ 'location' => 'path',
919
+ 'type' => 'string',
920
+ 'required' => true,
921
+ ),
922
+ ),
923
+ ),'insert' => array(
924
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals',
925
+ 'httpMethod' => 'POST',
926
+ 'parameters' => array(
927
+ 'accountId' => array(
928
+ 'location' => 'path',
929
+ 'type' => 'string',
930
+ 'required' => true,
931
+ ),
932
+ 'webPropertyId' => array(
933
+ 'location' => 'path',
934
+ 'type' => 'string',
935
+ 'required' => true,
936
+ ),
937
+ 'profileId' => array(
938
+ 'location' => 'path',
939
+ 'type' => 'string',
940
+ 'required' => true,
941
+ ),
942
+ ),
943
+ ),'list' => array(
944
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals',
945
+ 'httpMethod' => 'GET',
946
+ 'parameters' => array(
947
+ 'accountId' => array(
948
+ 'location' => 'path',
949
+ 'type' => 'string',
950
+ 'required' => true,
951
+ ),
952
+ 'webPropertyId' => array(
953
+ 'location' => 'path',
954
+ 'type' => 'string',
955
+ 'required' => true,
956
+ ),
957
+ 'profileId' => array(
958
+ 'location' => 'path',
959
+ 'type' => 'string',
960
+ 'required' => true,
961
+ ),
962
+ 'max-results' => array(
963
+ 'location' => 'query',
964
+ 'type' => 'integer',
965
+ ),
966
+ 'start-index' => array(
967
+ 'location' => 'query',
968
+ 'type' => 'integer',
969
+ ),
970
+ ),
971
+ ),'patch' => array(
972
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}',
973
+ 'httpMethod' => 'PATCH',
974
+ 'parameters' => array(
975
+ 'accountId' => array(
976
+ 'location' => 'path',
977
+ 'type' => 'string',
978
+ 'required' => true,
979
+ ),
980
+ 'webPropertyId' => array(
981
+ 'location' => 'path',
982
+ 'type' => 'string',
983
+ 'required' => true,
984
+ ),
985
+ 'profileId' => array(
986
+ 'location' => 'path',
987
+ 'type' => 'string',
988
+ 'required' => true,
989
+ ),
990
+ 'goalId' => array(
991
+ 'location' => 'path',
992
+ 'type' => 'string',
993
+ 'required' => true,
994
+ ),
995
+ ),
996
+ ),'update' => array(
997
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}',
998
+ 'httpMethod' => 'PUT',
999
+ 'parameters' => array(
1000
+ 'accountId' => array(
1001
+ 'location' => 'path',
1002
+ 'type' => 'string',
1003
+ 'required' => true,
1004
+ ),
1005
+ 'webPropertyId' => array(
1006
+ 'location' => 'path',
1007
+ 'type' => 'string',
1008
+ 'required' => true,
1009
+ ),
1010
+ 'profileId' => array(
1011
+ 'location' => 'path',
1012
+ 'type' => 'string',
1013
+ 'required' => true,
1014
+ ),
1015
+ 'goalId' => array(
1016
+ 'location' => 'path',
1017
+ 'type' => 'string',
1018
+ 'required' => true,
1019
+ ),
1020
+ ),
1021
+ ),
1022
+ )
1023
+ )
1024
+ );
1025
+ $this->management_profileFilterLinks = new Google_Service_Analytics_ManagementProfileFilterLinks_Resource(
1026
+ $this,
1027
+ $this->serviceName,
1028
+ 'profileFilterLinks',
1029
+ array(
1030
+ 'methods' => array(
1031
+ 'delete' => array(
1032
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}',
1033
+ 'httpMethod' => 'DELETE',
1034
+ 'parameters' => array(
1035
+ 'accountId' => array(
1036
+ 'location' => 'path',
1037
+ 'type' => 'string',
1038
+ 'required' => true,
1039
+ ),
1040
+ 'webPropertyId' => array(
1041
+ 'location' => 'path',
1042
+ 'type' => 'string',
1043
+ 'required' => true,
1044
+ ),
1045
+ 'profileId' => array(
1046
+ 'location' => 'path',
1047
+ 'type' => 'string',
1048
+ 'required' => true,
1049
+ ),
1050
+ 'linkId' => array(
1051
+ 'location' => 'path',
1052
+ 'type' => 'string',
1053
+ 'required' => true,
1054
+ ),
1055
+ ),
1056
+ ),'get' => array(
1057
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}',
1058
+ 'httpMethod' => 'GET',
1059
+ 'parameters' => array(
1060
+ 'accountId' => array(
1061
+ 'location' => 'path',
1062
+ 'type' => 'string',
1063
+ 'required' => true,
1064
+ ),
1065
+ 'webPropertyId' => array(
1066
+ 'location' => 'path',
1067
+ 'type' => 'string',
1068
+ 'required' => true,
1069
+ ),
1070
+ 'profileId' => array(
1071
+ 'location' => 'path',
1072
+ 'type' => 'string',
1073
+ 'required' => true,
1074
+ ),
1075
+ 'linkId' => array(
1076
+ 'location' => 'path',
1077
+ 'type' => 'string',
1078
+ 'required' => true,
1079
+ ),
1080
+ ),
1081
+ ),'insert' => array(
1082
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks',
1083
+ 'httpMethod' => 'POST',
1084
+ 'parameters' => array(
1085
+ 'accountId' => array(
1086
+ 'location' => 'path',
1087
+ 'type' => 'string',
1088
+ 'required' => true,
1089
+ ),
1090
+ 'webPropertyId' => array(
1091
+ 'location' => 'path',
1092
+ 'type' => 'string',
1093
+ 'required' => true,
1094
+ ),
1095
+ 'profileId' => array(
1096
+ 'location' => 'path',
1097
+ 'type' => 'string',
1098
+ 'required' => true,
1099
+ ),
1100
+ ),
1101
+ ),'list' => array(
1102
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks',
1103
+ 'httpMethod' => 'GET',
1104
+ 'parameters' => array(
1105
+ 'accountId' => array(
1106
+ 'location' => 'path',
1107
+ 'type' => 'string',
1108
+ 'required' => true,
1109
+ ),
1110
+ 'webPropertyId' => array(
1111
+ 'location' => 'path',
1112
+ 'type' => 'string',
1113
+ 'required' => true,
1114
+ ),
1115
+ 'profileId' => array(
1116
+ 'location' => 'path',
1117
+ 'type' => 'string',
1118
+ 'required' => true,
1119
+ ),
1120
+ 'max-results' => array(
1121
+ 'location' => 'query',
1122
+ 'type' => 'integer',
1123
+ ),
1124
+ 'start-index' => array(
1125
+ 'location' => 'query',
1126
+ 'type' => 'integer',
1127
+ ),
1128
+ ),
1129
+ ),'patch' => array(
1130
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}',
1131
+ 'httpMethod' => 'PATCH',
1132
+ 'parameters' => array(
1133
+ 'accountId' => array(
1134
+ 'location' => 'path',
1135
+ 'type' => 'string',
1136
+ 'required' => true,
1137
+ ),
1138
+ 'webPropertyId' => array(
1139
+ 'location' => 'path',
1140
+ 'type' => 'string',
1141
+ 'required' => true,
1142
+ ),
1143
+ 'profileId' => array(
1144
+ 'location' => 'path',
1145
+ 'type' => 'string',
1146
+ 'required' => true,
1147
+ ),
1148
+ 'linkId' => array(
1149
+ 'location' => 'path',
1150
+ 'type' => 'string',
1151
+ 'required' => true,
1152
+ ),
1153
+ ),
1154
+ ),'update' => array(
1155
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}',
1156
+ 'httpMethod' => 'PUT',
1157
+ 'parameters' => array(
1158
+ 'accountId' => array(
1159
+ 'location' => 'path',
1160
+ 'type' => 'string',
1161
+ 'required' => true,
1162
+ ),
1163
+ 'webPropertyId' => array(
1164
+ 'location' => 'path',
1165
+ 'type' => 'string',
1166
+ 'required' => true,
1167
+ ),
1168
+ 'profileId' => array(
1169
+ 'location' => 'path',
1170
+ 'type' => 'string',
1171
+ 'required' => true,
1172
+ ),
1173
+ 'linkId' => array(
1174
+ 'location' => 'path',
1175
+ 'type' => 'string',
1176
+ 'required' => true,
1177
+ ),
1178
+ ),
1179
+ ),
1180
+ )
1181
+ )
1182
+ );
1183
+ $this->management_profileUserLinks = new Google_Service_Analytics_ManagementProfileUserLinks_Resource(
1184
+ $this,
1185
+ $this->serviceName,
1186
+ 'profileUserLinks',
1187
+ array(
1188
+ 'methods' => array(
1189
+ 'delete' => array(
1190
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}',
1191
+ 'httpMethod' => 'DELETE',
1192
+ 'parameters' => array(
1193
+ 'accountId' => array(
1194
+ 'location' => 'path',
1195
+ 'type' => 'string',
1196
+ 'required' => true,
1197
+ ),
1198
+ 'webPropertyId' => array(
1199
+ 'location' => 'path',
1200
+ 'type' => 'string',
1201
+ 'required' => true,
1202
+ ),
1203
+ 'profileId' => array(
1204
+ 'location' => 'path',
1205
+ 'type' => 'string',
1206
+ 'required' => true,
1207
+ ),
1208
+ 'linkId' => array(
1209
+ 'location' => 'path',
1210
+ 'type' => 'string',
1211
+ 'required' => true,
1212
+ ),
1213
+ ),
1214
+ ),'insert' => array(
1215
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks',
1216
+ 'httpMethod' => 'POST',
1217
+ 'parameters' => array(
1218
+ 'accountId' => array(
1219
+ 'location' => 'path',
1220
+ 'type' => 'string',
1221
+ 'required' => true,
1222
+ ),
1223
+ 'webPropertyId' => array(
1224
+ 'location' => 'path',
1225
+ 'type' => 'string',
1226
+ 'required' => true,
1227
+ ),
1228
+ 'profileId' => array(
1229
+ 'location' => 'path',
1230
+ 'type' => 'string',
1231
+ 'required' => true,
1232
+ ),
1233
+ ),
1234
+ ),'list' => array(
1235
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks',
1236
+ 'httpMethod' => 'GET',
1237
+ 'parameters' => array(
1238
+ 'accountId' => array(
1239
+ 'location' => 'path',
1240
+ 'type' => 'string',
1241
+ 'required' => true,
1242
+ ),
1243
+ 'webPropertyId' => array(
1244
+ 'location' => 'path',
1245
+ 'type' => 'string',
1246
+ 'required' => true,
1247
+ ),
1248
+ 'profileId' => array(
1249
+ 'location' => 'path',
1250
+ 'type' => 'string',
1251
+ 'required' => true,
1252
+ ),
1253
+ 'max-results' => array(
1254
+ 'location' => 'query',
1255
+ 'type' => 'integer',
1256
+ ),
1257
+ 'start-index' => array(
1258
+ 'location' => 'query',
1259
+ 'type' => 'integer',
1260
+ ),
1261
+ ),
1262
+ ),'update' => array(
1263
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}',
1264
+ 'httpMethod' => 'PUT',
1265
+ 'parameters' => array(
1266
+ 'accountId' => array(
1267
+ 'location' => 'path',
1268
+ 'type' => 'string',
1269
+ 'required' => true,
1270
+ ),
1271
+ 'webPropertyId' => array(
1272
+ 'location' => 'path',
1273
+ 'type' => 'string',
1274
+ 'required' => true,
1275
+ ),
1276
+ 'profileId' => array(
1277
+ 'location' => 'path',
1278
+ 'type' => 'string',
1279
+ 'required' => true,
1280
+ ),
1281
+ 'linkId' => array(
1282
+ 'location' => 'path',
1283
+ 'type' => 'string',
1284
+ 'required' => true,
1285
+ ),
1286
+ ),
1287
+ ),
1288
+ )
1289
+ )
1290
+ );
1291
+ $this->management_profiles = new Google_Service_Analytics_ManagementProfiles_Resource(
1292
+ $this,
1293
+ $this->serviceName,
1294
+ 'profiles',
1295
+ array(
1296
+ 'methods' => array(
1297
+ 'delete' => array(
1298
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}',
1299
+ 'httpMethod' => 'DELETE',
1300
+ 'parameters' => array(
1301
+ 'accountId' => array(
1302
+ 'location' => 'path',
1303
+ 'type' => 'string',
1304
+ 'required' => true,
1305
+ ),
1306
+ 'webPropertyId' => array(
1307
+ 'location' => 'path',
1308
+ 'type' => 'string',
1309
+ 'required' => true,
1310
+ ),
1311
+ 'profileId' => array(
1312
+ 'location' => 'path',
1313
+ 'type' => 'string',
1314
+ 'required' => true,
1315
+ ),
1316
+ ),
1317
+ ),'get' => array(
1318
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}',
1319
+ 'httpMethod' => 'GET',
1320
+ 'parameters' => array(
1321
+ 'accountId' => array(
1322
+ 'location' => 'path',
1323
+ 'type' => 'string',
1324
+ 'required' => true,
1325
+ ),
1326
+ 'webPropertyId' => array(
1327
+ 'location' => 'path',
1328
+ 'type' => 'string',
1329
+ 'required' => true,
1330
+ ),
1331
+ 'profileId' => array(
1332
+ 'location' => 'path',
1333
+ 'type' => 'string',
1334
+ 'required' => true,
1335
+ ),
1336
+ ),
1337
+ ),'insert' => array(
1338
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles',
1339
+ 'httpMethod' => 'POST',
1340
+ 'parameters' => array(
1341
+ 'accountId' => array(
1342
+ 'location' => 'path',
1343
+ 'type' => 'string',
1344
+ 'required' => true,
1345
+ ),
1346
+ 'webPropertyId' => array(
1347
+ 'location' => 'path',
1348
+ 'type' => 'string',
1349
+ 'required' => true,
1350
+ ),
1351
+ ),
1352
+ ),'list' => array(
1353
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles',
1354
+ 'httpMethod' => 'GET',
1355
+ 'parameters' => array(
1356
+ 'accountId' => array(
1357
+ 'location' => 'path',
1358
+ 'type' => 'string',
1359
+ 'required' => true,
1360
+ ),
1361
+ 'webPropertyId' => array(
1362
+ 'location' => 'path',
1363
+ 'type' => 'string',
1364
+ 'required' => true,
1365
+ ),
1366
+ 'max-results' => array(
1367
+ 'location' => 'query',
1368
+ 'type' => 'integer',
1369
+ ),
1370
+ 'start-index' => array(
1371
+ 'location' => 'query',
1372
+ 'type' => 'integer',
1373
+ ),
1374
+ ),
1375
+ ),'patch' => array(
1376
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}',
1377
+ 'httpMethod' => 'PATCH',
1378
+ 'parameters' => array(
1379
+ 'accountId' => array(
1380
+ 'location' => 'path',
1381
+ 'type' => 'string',
1382
+ 'required' => true,
1383
+ ),
1384
+ 'webPropertyId' => array(
1385
+ 'location' => 'path',
1386
+ 'type' => 'string',
1387
+ 'required' => true,
1388
+ ),
1389
+ 'profileId' => array(
1390
+ 'location' => 'path',
1391
+ 'type' => 'string',
1392
+ 'required' => true,
1393
+ ),
1394
+ ),
1395
+ ),'update' => array(
1396
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}',
1397
+ 'httpMethod' => 'PUT',
1398
+ 'parameters' => array(
1399
+ 'accountId' => array(
1400
+ 'location' => 'path',
1401
+ 'type' => 'string',
1402
+ 'required' => true,
1403
+ ),
1404
+ 'webPropertyId' => array(
1405
+ 'location' => 'path',
1406
+ 'type' => 'string',
1407
+ 'required' => true,
1408
+ ),
1409
+ 'profileId' => array(
1410
+ 'location' => 'path',
1411
+ 'type' => 'string',
1412
+ 'required' => true,
1413
+ ),
1414
+ ),
1415
+ ),
1416
+ )
1417
+ )
1418
+ );
1419
+ $this->management_segments = new Google_Service_Analytics_ManagementSegments_Resource(
1420
+ $this,
1421
+ $this->serviceName,
1422
+ 'segments',
1423
+ array(
1424
+ 'methods' => array(
1425
+ 'list' => array(
1426
+ 'path' => 'management/segments',
1427
+ 'httpMethod' => 'GET',
1428
+ 'parameters' => array(
1429
+ 'max-results' => array(
1430
+ 'location' => 'query',
1431
+ 'type' => 'integer',
1432
+ ),
1433
+ 'start-index' => array(
1434
+ 'location' => 'query',
1435
+ 'type' => 'integer',
1436
+ ),
1437
+ ),
1438
+ ),
1439
+ )
1440
+ )
1441
+ );
1442
+ $this->management_unsampledReports = new Google_Service_Analytics_ManagementUnsampledReports_Resource(
1443
+ $this,
1444
+ $this->serviceName,
1445
+ 'unsampledReports',
1446
+ array(
1447
+ 'methods' => array(
1448
+ 'get' => array(
1449
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}',
1450
+ 'httpMethod' => 'GET',
1451
+ 'parameters' => array(
1452
+ 'accountId' => array(
1453
+ 'location' => 'path',
1454
+ 'type' => 'string',
1455
+ 'required' => true,
1456
+ ),
1457
+ 'webPropertyId' => array(
1458
+ 'location' => 'path',
1459
+ 'type' => 'string',
1460
+ 'required' => true,
1461
+ ),
1462
+ 'profileId' => array(
1463
+ 'location' => 'path',
1464
+ 'type' => 'string',
1465
+ 'required' => true,
1466
+ ),
1467
+ 'unsampledReportId' => array(
1468
+ 'location' => 'path',
1469
+ 'type' => 'string',
1470
+ 'required' => true,
1471
+ ),
1472
+ ),
1473
+ ),'insert' => array(
1474
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports',
1475
+ 'httpMethod' => 'POST',
1476
+ 'parameters' => array(
1477
+ 'accountId' => array(
1478
+ 'location' => 'path',
1479
+ 'type' => 'string',
1480
+ 'required' => true,
1481
+ ),
1482
+ 'webPropertyId' => array(
1483
+ 'location' => 'path',
1484
+ 'type' => 'string',
1485
+ 'required' => true,
1486
+ ),
1487
+ 'profileId' => array(
1488
+ 'location' => 'path',
1489
+ 'type' => 'string',
1490
+ 'required' => true,
1491
+ ),
1492
+ ),
1493
+ ),'list' => array(
1494
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports',
1495
+ 'httpMethod' => 'GET',
1496
+ 'parameters' => array(
1497
+ 'accountId' => array(
1498
+ 'location' => 'path',
1499
+ 'type' => 'string',
1500
+ 'required' => true,
1501
+ ),
1502
+ 'webPropertyId' => array(
1503
+ 'location' => 'path',
1504
+ 'type' => 'string',
1505
+ 'required' => true,
1506
+ ),
1507
+ 'profileId' => array(
1508
+ 'location' => 'path',
1509
+ 'type' => 'string',
1510
+ 'required' => true,
1511
+ ),
1512
+ 'max-results' => array(
1513
+ 'location' => 'query',
1514
+ 'type' => 'integer',
1515
+ ),
1516
+ 'start-index' => array(
1517
+ 'location' => 'query',
1518
+ 'type' => 'integer',
1519
+ ),
1520
+ ),
1521
+ ),
1522
+ )
1523
+ )
1524
+ );
1525
+ $this->management_uploads = new Google_Service_Analytics_ManagementUploads_Resource(
1526
+ $this,
1527
+ $this->serviceName,
1528
+ 'uploads',
1529
+ array(
1530
+ 'methods' => array(
1531
+ 'deleteUploadData' => array(
1532
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData',
1533
+ 'httpMethod' => 'POST',
1534
+ 'parameters' => array(
1535
+ 'accountId' => array(
1536
+ 'location' => 'path',
1537
+ 'type' => 'string',
1538
+ 'required' => true,
1539
+ ),
1540
+ 'webPropertyId' => array(
1541
+ 'location' => 'path',
1542
+ 'type' => 'string',
1543
+ 'required' => true,
1544
+ ),
1545
+ 'customDataSourceId' => array(
1546
+ 'location' => 'path',
1547
+ 'type' => 'string',
1548
+ 'required' => true,
1549
+ ),
1550
+ ),
1551
+ ),'get' => array(
1552
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}',
1553
+ 'httpMethod' => 'GET',
1554
+ 'parameters' => array(
1555
+ 'accountId' => array(
1556
+ 'location' => 'path',
1557
+ 'type' => 'string',
1558
+ 'required' => true,
1559
+ ),
1560
+ 'webPropertyId' => array(
1561
+ 'location' => 'path',
1562
+ 'type' => 'string',
1563
+ 'required' => true,
1564
+ ),
1565
+ 'customDataSourceId' => array(
1566
+ 'location' => 'path',
1567
+ 'type' => 'string',
1568
+ 'required' => true,
1569
+ ),
1570
+ 'uploadId' => array(
1571
+ 'location' => 'path',
1572
+ 'type' => 'string',
1573
+ 'required' => true,
1574
+ ),
1575
+ ),
1576
+ ),'list' => array(
1577
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads',
1578
+ 'httpMethod' => 'GET',
1579
+ 'parameters' => array(
1580
+ 'accountId' => array(
1581
+ 'location' => 'path',
1582
+ 'type' => 'string',
1583
+ 'required' => true,
1584
+ ),
1585
+ 'webPropertyId' => array(
1586
+ 'location' => 'path',
1587
+ 'type' => 'string',
1588
+ 'required' => true,
1589
+ ),
1590
+ 'customDataSourceId' => array(
1591
+ 'location' => 'path',
1592
+ 'type' => 'string',
1593
+ 'required' => true,
1594
+ ),
1595
+ 'max-results' => array(
1596
+ 'location' => 'query',
1597
+ 'type' => 'integer',
1598
+ ),
1599
+ 'start-index' => array(
1600
+ 'location' => 'query',
1601
+ 'type' => 'integer',
1602
+ ),
1603
+ ),
1604
+ ),'uploadData' => array(
1605
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads',
1606
+ 'httpMethod' => 'POST',
1607
+ 'parameters' => array(
1608
+ 'accountId' => array(
1609
+ 'location' => 'path',
1610
+ 'type' => 'string',
1611
+ 'required' => true,
1612
+ ),
1613
+ 'webPropertyId' => array(
1614
+ 'location' => 'path',
1615
+ 'type' => 'string',
1616
+ 'required' => true,
1617
+ ),
1618
+ 'customDataSourceId' => array(
1619
+ 'location' => 'path',
1620
+ 'type' => 'string',
1621
+ 'required' => true,
1622
+ ),
1623
+ ),
1624
+ ),
1625
+ )
1626
+ )
1627
+ );
1628
+ $this->management_webPropertyAdWordsLinks = new Google_Service_Analytics_ManagementWebPropertyAdWordsLinks_Resource(
1629
+ $this,
1630
+ $this->serviceName,
1631
+ 'webPropertyAdWordsLinks',
1632
+ array(
1633
+ 'methods' => array(
1634
+ 'delete' => array(
1635
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}',
1636
+ 'httpMethod' => 'DELETE',
1637
+ 'parameters' => array(
1638
+ 'accountId' => array(
1639
+ 'location' => 'path',
1640
+ 'type' => 'string',
1641
+ 'required' => true,
1642
+ ),
1643
+ 'webPropertyId' => array(
1644
+ 'location' => 'path',
1645
+ 'type' => 'string',
1646
+ 'required' => true,
1647
+ ),
1648
+ 'webPropertyAdWordsLinkId' => array(
1649
+ 'location' => 'path',
1650
+ 'type' => 'string',
1651
+ 'required' => true,
1652
+ ),
1653
+ ),
1654
+ ),'get' => array(
1655
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}',
1656
+ 'httpMethod' => 'GET',
1657
+ 'parameters' => array(
1658
+ 'accountId' => array(
1659
+ 'location' => 'path',
1660
+ 'type' => 'string',
1661
+ 'required' => true,
1662
+ ),
1663
+ 'webPropertyId' => array(
1664
+ 'location' => 'path',
1665
+ 'type' => 'string',
1666
+ 'required' => true,
1667
+ ),
1668
+ 'webPropertyAdWordsLinkId' => array(
1669
+ 'location' => 'path',
1670
+ 'type' => 'string',
1671
+ 'required' => true,
1672
+ ),
1673
+ ),
1674
+ ),'insert' => array(
1675
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks',
1676
+ 'httpMethod' => 'POST',
1677
+ 'parameters' => array(
1678
+ 'accountId' => array(
1679
+ 'location' => 'path',
1680
+ 'type' => 'string',
1681
+ 'required' => true,
1682
+ ),
1683
+ 'webPropertyId' => array(
1684
+ 'location' => 'path',
1685
+ 'type' => 'string',
1686
+ 'required' => true,
1687
+ ),
1688
+ ),
1689
+ ),'list' => array(
1690
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks',
1691
+ 'httpMethod' => 'GET',
1692
+ 'parameters' => array(
1693
+ 'accountId' => array(
1694
+ 'location' => 'path',
1695
+ 'type' => 'string',
1696
+ 'required' => true,
1697
+ ),
1698
+ 'webPropertyId' => array(
1699
+ 'location' => 'path',
1700
+ 'type' => 'string',
1701
+ 'required' => true,
1702
+ ),
1703
+ 'max-results' => array(
1704
+ 'location' => 'query',
1705
+ 'type' => 'integer',
1706
+ ),
1707
+ 'start-index' => array(
1708
+ 'location' => 'query',
1709
+ 'type' => 'integer',
1710
+ ),
1711
+ ),
1712
+ ),'patch' => array(
1713
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}',
1714
+ 'httpMethod' => 'PATCH',
1715
+ 'parameters' => array(
1716
+ 'accountId' => array(
1717
+ 'location' => 'path',
1718
+ 'type' => 'string',
1719
+ 'required' => true,
1720
+ ),
1721
+ 'webPropertyId' => array(
1722
+ 'location' => 'path',
1723
+ 'type' => 'string',
1724
+ 'required' => true,
1725
+ ),
1726
+ 'webPropertyAdWordsLinkId' => array(
1727
+ 'location' => 'path',
1728
+ 'type' => 'string',
1729
+ 'required' => true,
1730
+ ),
1731
+ ),
1732
+ ),'update' => array(
1733
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}',
1734
+ 'httpMethod' => 'PUT',
1735
+ 'parameters' => array(
1736
+ 'accountId' => array(
1737
+ 'location' => 'path',
1738
+ 'type' => 'string',
1739
+ 'required' => true,
1740
+ ),
1741
+ 'webPropertyId' => array(
1742
+ 'location' => 'path',
1743
+ 'type' => 'string',
1744
+ 'required' => true,
1745
+ ),
1746
+ 'webPropertyAdWordsLinkId' => array(
1747
+ 'location' => 'path',
1748
+ 'type' => 'string',
1749
+ 'required' => true,
1750
+ ),
1751
+ ),
1752
+ ),
1753
+ )
1754
+ )
1755
+ );
1756
+ $this->management_webproperties = new Google_Service_Analytics_ManagementWebproperties_Resource(
1757
+ $this,
1758
+ $this->serviceName,
1759
+ 'webproperties',
1760
+ array(
1761
+ 'methods' => array(
1762
+ 'get' => array(
1763
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}',
1764
+ 'httpMethod' => 'GET',
1765
+ 'parameters' => array(
1766
+ 'accountId' => array(
1767
+ 'location' => 'path',
1768
+ 'type' => 'string',
1769
+ 'required' => true,
1770
+ ),
1771
+ 'webPropertyId' => array(
1772
+ 'location' => 'path',
1773
+ 'type' => 'string',
1774
+ 'required' => true,
1775
+ ),
1776
+ ),
1777
+ ),'insert' => array(
1778
+ 'path' => 'management/accounts/{accountId}/webproperties',
1779
+ 'httpMethod' => 'POST',
1780
+ 'parameters' => array(
1781
+ 'accountId' => array(
1782
+ 'location' => 'path',
1783
+ 'type' => 'string',
1784
+ 'required' => true,
1785
+ ),
1786
+ ),
1787
+ ),'list' => array(
1788
+ 'path' => 'management/accounts/{accountId}/webproperties',
1789
+ 'httpMethod' => 'GET',
1790
+ 'parameters' => array(
1791
+ 'accountId' => array(
1792
+ 'location' => 'path',
1793
+ 'type' => 'string',
1794
+ 'required' => true,
1795
+ ),
1796
+ 'max-results' => array(
1797
+ 'location' => 'query',
1798
+ 'type' => 'integer',
1799
+ ),
1800
+ 'start-index' => array(
1801
+ 'location' => 'query',
1802
+ 'type' => 'integer',
1803
+ ),
1804
+ ),
1805
+ ),'patch' => array(
1806
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}',
1807
+ 'httpMethod' => 'PATCH',
1808
+ 'parameters' => array(
1809
+ 'accountId' => array(
1810
+ 'location' => 'path',
1811
+ 'type' => 'string',
1812
+ 'required' => true,
1813
+ ),
1814
+ 'webPropertyId' => array(
1815
+ 'location' => 'path',
1816
+ 'type' => 'string',
1817
+ 'required' => true,
1818
+ ),
1819
+ ),
1820
+ ),'update' => array(
1821
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}',
1822
+ 'httpMethod' => 'PUT',
1823
+ 'parameters' => array(
1824
+ 'accountId' => array(
1825
+ 'location' => 'path',
1826
+ 'type' => 'string',
1827
+ 'required' => true,
1828
+ ),
1829
+ 'webPropertyId' => array(
1830
+ 'location' => 'path',
1831
+ 'type' => 'string',
1832
+ 'required' => true,
1833
+ ),
1834
+ ),
1835
+ ),
1836
+ )
1837
+ )
1838
+ );
1839
+ $this->management_webpropertyUserLinks = new Google_Service_Analytics_ManagementWebpropertyUserLinks_Resource(
1840
+ $this,
1841
+ $this->serviceName,
1842
+ 'webpropertyUserLinks',
1843
+ array(
1844
+ 'methods' => array(
1845
+ 'delete' => array(
1846
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}',
1847
+ 'httpMethod' => 'DELETE',
1848
+ 'parameters' => array(
1849
+ 'accountId' => array(
1850
+ 'location' => 'path',
1851
+ 'type' => 'string',
1852
+ 'required' => true,
1853
+ ),
1854
+ 'webPropertyId' => array(
1855
+ 'location' => 'path',
1856
+ 'type' => 'string',
1857
+ 'required' => true,
1858
+ ),
1859
+ 'linkId' => array(
1860
+ 'location' => 'path',
1861
+ 'type' => 'string',
1862
+ 'required' => true,
1863
+ ),
1864
+ ),
1865
+ ),'insert' => array(
1866
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks',
1867
+ 'httpMethod' => 'POST',
1868
+ 'parameters' => array(
1869
+ 'accountId' => array(
1870
+ 'location' => 'path',
1871
+ 'type' => 'string',
1872
+ 'required' => true,
1873
+ ),
1874
+ 'webPropertyId' => array(
1875
+ 'location' => 'path',
1876
+ 'type' => 'string',
1877
+ 'required' => true,
1878
+ ),
1879
+ ),
1880
+ ),'list' => array(
1881
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks',
1882
+ 'httpMethod' => 'GET',
1883
+ 'parameters' => array(
1884
+ 'accountId' => array(
1885
+ 'location' => 'path',
1886
+ 'type' => 'string',
1887
+ 'required' => true,
1888
+ ),
1889
+ 'webPropertyId' => array(
1890
+ 'location' => 'path',
1891
+ 'type' => 'string',
1892
+ 'required' => true,
1893
+ ),
1894
+ 'max-results' => array(
1895
+ 'location' => 'query',
1896
+ 'type' => 'integer',
1897
+ ),
1898
+ 'start-index' => array(
1899
+ 'location' => 'query',
1900
+ 'type' => 'integer',
1901
+ ),
1902
+ ),
1903
+ ),'update' => array(
1904
+ 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}',
1905
+ 'httpMethod' => 'PUT',
1906
+ 'parameters' => array(
1907
+ 'accountId' => array(
1908
+ 'location' => 'path',
1909
+ 'type' => 'string',
1910
+ 'required' => true,
1911
+ ),
1912
+ 'webPropertyId' => array(
1913
+ 'location' => 'path',
1914
+ 'type' => 'string',
1915
+ 'required' => true,
1916
+ ),
1917
+ 'linkId' => array(
1918
+ 'location' => 'path',
1919
+ 'type' => 'string',
1920
+ 'required' => true,
1921
+ ),
1922
+ ),
1923
+ ),
1924
+ )
1925
+ )
1926
+ );
1927
+ $this->metadata_columns = new Google_Service_Analytics_MetadataColumns_Resource(
1928
+ $this,
1929
+ $this->serviceName,
1930
+ 'columns',
1931
+ array(
1932
+ 'methods' => array(
1933
+ 'list' => array(
1934
+ 'path' => 'metadata/{reportType}/columns',
1935
+ 'httpMethod' => 'GET',
1936
+ 'parameters' => array(
1937
+ 'reportType' => array(
1938
+ 'location' => 'path',
1939
+ 'type' => 'string',
1940
+ 'required' => true,
1941
+ ),
1942
+ ),
1943
+ ),
1944
+ )
1945
+ )
1946
+ );
1947
+ $this->provisioning = new Google_Service_Analytics_Provisioning_Resource(
1948
+ $this,
1949
+ $this->serviceName,
1950
+ 'provisioning',
1951
+ array(
1952
+ 'methods' => array(
1953
+ 'createAccountTicket' => array(
1954
+ 'path' => 'provisioning/createAccountTicket',
1955
+ 'httpMethod' => 'POST',
1956
+ 'parameters' => array(),
1957
+ ),
1958
+ )
1959
+ )
1960
+ );
1961
+ }
1962
+ }
1963
+
1964
+
1965
+ /**
1966
+ * The "data" collection of methods.
1967
+ * Typical usage is:
1968
+ * <code>
1969
+ * $analyticsService = new Google_Service_Analytics(...);
1970
+ * $data = $analyticsService->data;
1971
+ * </code>
1972
+ */
1973
+ class Google_Service_Analytics_Data_Resource extends Google_Service_Resource
1974
+ {
1975
+ }
1976
+
1977
+ /**
1978
+ * The "ga" collection of methods.
1979
+ * Typical usage is:
1980
+ * <code>
1981
+ * $analyticsService = new Google_Service_Analytics(...);
1982
+ * $ga = $analyticsService->ga;
1983
+ * </code>
1984
+ */
1985
+ class Google_Service_Analytics_DataGa_Resource extends Google_Service_Resource
1986
+ {
1987
+
1988
+ /**
1989
+ * Returns Analytics data for a view (profile). (ga.get)
1990
+ *
1991
+ * @param string $ids Unique table ID for retrieving Analytics data. Table ID is
1992
+ * of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
1993
+ * @param string $startDate Start date for fetching Analytics data. Requests can
1994
+ * specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g.,
1995
+ * today, yesterday, or 7daysAgo). The default value is 7daysAgo.
1996
+ * @param string $endDate End date for fetching Analytics data. Request can
1997
+ * should specify an end date formatted as YYYY-MM-DD, or as a relative date
1998
+ * (e.g., today, yesterday, or 7daysAgo). The default value is yesterday.
1999
+ * @param string $metrics A comma-separated list of Analytics metrics. E.g.,
2000
+ * 'ga:sessions,ga:pageviews'. At least one metric must be specified.
2001
+ * @param array $optParams Optional parameters.
2002
+ *
2003
+ * @opt_param int max-results The maximum number of entries to include in this
2004
+ * feed.
2005
+ * @opt_param string sort A comma-separated list of dimensions or metrics that
2006
+ * determine the sort order for Analytics data.
2007
+ * @opt_param string dimensions A comma-separated list of Analytics dimensions.
2008
+ * E.g., 'ga:browser,ga:city'.
2009
+ * @opt_param int start-index An index of the first entity to retrieve. Use this
2010
+ * parameter as a pagination mechanism along with the max-results parameter.
2011
+ * @opt_param string segment An Analytics segment to be applied to data.
2012
+ * @opt_param string samplingLevel The desired sampling level.
2013
+ * @opt_param string filters A comma-separated list of dimension or metric
2014
+ * filters to be applied to Analytics data.
2015
+ * @opt_param string output The selected format for the response. Default format
2016
+ * is JSON.
2017
+ * @return Google_Service_Analytics_GaData
2018
+ */
2019
+ public function get($ids, $startDate, $endDate, $metrics, $optParams = array())
2020
+ {
2021
+ $params = array('ids' => $ids, 'start-date' => $startDate, 'end-date' => $endDate, 'metrics' => $metrics);
2022
+ $params = array_merge($params, $optParams);
2023
+ return $this->call('get', array($params), "Google_Service_Analytics_GaData");
2024
+ }
2025
+ }
2026
+ /**
2027
+ * The "mcf" collection of methods.
2028
+ * Typical usage is:
2029
+ * <code>
2030
+ * $analyticsService = new Google_Service_Analytics(...);
2031
+ * $mcf = $analyticsService->mcf;
2032
+ * </code>
2033
+ */
2034
+ class Google_Service_Analytics_DataMcf_Resource extends Google_Service_Resource
2035
+ {
2036
+
2037
+ /**
2038
+ * Returns Analytics Multi-Channel Funnels data for a view (profile). (mcf.get)
2039
+ *
2040
+ * @param string $ids Unique table ID for retrieving Analytics data. Table ID is
2041
+ * of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
2042
+ * @param string $startDate Start date for fetching Analytics data. Requests can
2043
+ * specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g.,
2044
+ * today, yesterday, or 7daysAgo). The default value is 7daysAgo.
2045
+ * @param string $endDate End date for fetching Analytics data. Requests can
2046
+ * specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g.,
2047
+ * today, yesterday, or 7daysAgo). The default value is 7daysAgo.
2048
+ * @param string $metrics A comma-separated list of Multi-Channel Funnels
2049
+ * metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one
2050
+ * metric must be specified.
2051
+ * @param array $optParams Optional parameters.
2052
+ *
2053
+ * @opt_param int max-results The maximum number of entries to include in this
2054
+ * feed.
2055
+ * @opt_param string sort A comma-separated list of dimensions or metrics that
2056
+ * determine the sort order for the Analytics data.
2057
+ * @opt_param string dimensions A comma-separated list of Multi-Channel Funnels
2058
+ * dimensions. E.g., 'mcf:source,mcf:medium'.
2059
+ * @opt_param int start-index An index of the first entity to retrieve. Use this
2060
+ * parameter as a pagination mechanism along with the max-results parameter.
2061
+ * @opt_param string samplingLevel The desired sampling level.
2062
+ * @opt_param string filters A comma-separated list of dimension or metric
2063
+ * filters to be applied to the Analytics data.
2064
+ * @return Google_Service_Analytics_McfData
2065
+ */
2066
+ public function get($ids, $startDate, $endDate, $metrics, $optParams = array())
2067
+ {
2068
+ $params = array('ids' => $ids, 'start-date' => $startDate, 'end-date' => $endDate, 'metrics' => $metrics);
2069
+ $params = array_merge($params, $optParams);
2070
+ return $this->call('get', array($params), "Google_Service_Analytics_McfData");
2071
+ }
2072
+ }
2073
+ /**
2074
+ * The "realtime" collection of methods.
2075
+ * Typical usage is:
2076
+ * <code>
2077
+ * $analyticsService = new Google_Service_Analytics(...);
2078
+ * $realtime = $analyticsService->realtime;
2079
+ * </code>
2080
+ */
2081
+ class Google_Service_Analytics_DataRealtime_Resource extends Google_Service_Resource
2082
+ {
2083
+
2084
+ /**
2085
+ * Returns real time data for a view (profile). (realtime.get)
2086
+ *
2087
+ * @param string $ids Unique table ID for retrieving real time data. Table ID is
2088
+ * of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.
2089
+ * @param string $metrics A comma-separated list of real time metrics. E.g.,
2090
+ * 'rt:activeUsers'. At least one metric must be specified.
2091
+ * @param array $optParams Optional parameters.
2092
+ *
2093
+ * @opt_param int max-results The maximum number of entries to include in this
2094
+ * feed.
2095
+ * @opt_param string sort A comma-separated list of dimensions or metrics that
2096
+ * determine the sort order for real time data.
2097
+ * @opt_param string dimensions A comma-separated list of real time dimensions.
2098
+ * E.g., 'rt:medium,rt:city'.
2099
+ * @opt_param string filters A comma-separated list of dimension or metric
2100
+ * filters to be applied to real time data.
2101
+ * @return Google_Service_Analytics_RealtimeData
2102
+ */
2103
+ public function get($ids, $metrics, $optParams = array())
2104
+ {
2105
+ $params = array('ids' => $ids, 'metrics' => $metrics);
2106
+ $params = array_merge($params, $optParams);
2107
+ return $this->call('get', array($params), "Google_Service_Analytics_RealtimeData");
2108
+ }
2109
+ }
2110
+
2111
+ /**
2112
+ * The "management" collection of methods.
2113
+ * Typical usage is:
2114
+ * <code>
2115
+ * $analyticsService = new Google_Service_Analytics(...);
2116
+ * $management = $analyticsService->management;
2117
+ * </code>
2118
+ */
2119
+ class Google_Service_Analytics_Management_Resource extends Google_Service_Resource
2120
+ {
2121
+ }
2122
+
2123
+ /**
2124
+ * The "accountSummaries" collection of methods.
2125
+ * Typical usage is:
2126
+ * <code>
2127
+ * $analyticsService = new Google_Service_Analytics(...);
2128
+ * $accountSummaries = $analyticsService->accountSummaries;
2129
+ * </code>
2130
+ */
2131
+ class Google_Service_Analytics_ManagementAccountSummaries_Resource extends Google_Service_Resource
2132
+ {
2133
+
2134
+ /**
2135
+ * Lists account summaries (lightweight tree comprised of
2136
+ * accounts/properties/profiles) to which the user has access.
2137
+ * (accountSummaries.listManagementAccountSummaries)
2138
+ *
2139
+ * @param array $optParams Optional parameters.
2140
+ *
2141
+ * @opt_param int max-results The maximum number of account summaries to include
2142
+ * in this response, where the largest acceptable value is 1000.
2143
+ * @opt_param int start-index An index of the first entity to retrieve. Use this
2144
+ * parameter as a pagination mechanism along with the max-results parameter.
2145
+ * @return Google_Service_Analytics_AccountSummaries
2146
+ */
2147
+ public function listManagementAccountSummaries($optParams = array())
2148
+ {
2149
+ $params = array();
2150
+ $params = array_merge($params, $optParams);
2151
+ return $this->call('list', array($params), "Google_Service_Analytics_AccountSummaries");
2152
+ }
2153
+ }
2154
+ /**
2155
+ * The "accountUserLinks" collection of methods.
2156
+ * Typical usage is:
2157
+ * <code>
2158
+ * $analyticsService = new Google_Service_Analytics(...);
2159
+ * $accountUserLinks = $analyticsService->accountUserLinks;
2160
+ * </code>
2161
+ */
2162
+ class Google_Service_Analytics_ManagementAccountUserLinks_Resource extends Google_Service_Resource
2163
+ {
2164
+
2165
+ /**
2166
+ * Removes a user from the given account. (accountUserLinks.delete)
2167
+ *
2168
+ * @param string $accountId Account ID to delete the user link for.
2169
+ * @param string $linkId Link ID to delete the user link for.
2170
+ * @param array $optParams Optional parameters.
2171
+ */
2172
+ public function delete($accountId, $linkId, $optParams = array())
2173
+ {
2174
+ $params = array('accountId' => $accountId, 'linkId' => $linkId);
2175
+ $params = array_merge($params, $optParams);
2176
+ return $this->call('delete', array($params));
2177
+ }
2178
+
2179
+ /**
2180
+ * Adds a new user to the given account. (accountUserLinks.insert)
2181
+ *
2182
+ * @param string $accountId Account ID to create the user link for.
2183
+ * @param Google_EntityUserLink $postBody
2184
+ * @param array $optParams Optional parameters.
2185
+ * @return Google_Service_Analytics_EntityUserLink
2186
+ */
2187
+ public function insert($accountId, Google_Service_Analytics_EntityUserLink $postBody, $optParams = array())
2188
+ {
2189
+ $params = array('accountId' => $accountId, 'postBody' => $postBody);
2190
+ $params = array_merge($params, $optParams);
2191
+ return $this->call('insert', array($params), "Google_Service_Analytics_EntityUserLink");
2192
+ }
2193
+
2194
+ /**
2195
+ * Lists account-user links for a given account.
2196
+ * (accountUserLinks.listManagementAccountUserLinks)
2197
+ *
2198
+ * @param string $accountId Account ID to retrieve the user links for.
2199
+ * @param array $optParams Optional parameters.
2200
+ *
2201
+ * @opt_param int max-results The maximum number of account-user links to
2202
+ * include in this response.
2203
+ * @opt_param int start-index An index of the first account-user link to
2204
+ * retrieve. Use this parameter as a pagination mechanism along with the max-
2205
+ * results parameter.
2206
+ * @return Google_Service_Analytics_EntityUserLinks
2207
+ */
2208
+ public function listManagementAccountUserLinks($accountId, $optParams = array())
2209
+ {
2210
+ $params = array('accountId' => $accountId);
2211
+ $params = array_merge($params, $optParams);
2212
+ return $this->call('list', array($params), "Google_Service_Analytics_EntityUserLinks");
2213
+ }
2214
+
2215
+ /**
2216
+ * Updates permissions for an existing user on the given account.
2217
+ * (accountUserLinks.update)
2218
+ *
2219
+ * @param string $accountId Account ID to update the account-user link for.
2220
+ * @param string $linkId Link ID to update the account-user link for.
2221
+ * @param Google_EntityUserLink $postBody
2222
+ * @param array $optParams Optional parameters.
2223
+ * @return Google_Service_Analytics_EntityUserLink
2224
+ */
2225
+ public function update($accountId, $linkId, Google_Service_Analytics_EntityUserLink $postBody, $optParams = array())
2226
+ {
2227
+ $params = array('accountId' => $accountId, 'linkId' => $linkId, 'postBody' => $postBody);
2228
+ $params = array_merge($params, $optParams);
2229
+ return $this->call('update', array($params), "Google_Service_Analytics_EntityUserLink");
2230
+ }
2231
+ }
2232
+ /**
2233
+ * The "accounts" collection of methods.
2234
+ * Typical usage is:
2235
+ * <code>
2236
+ * $analyticsService = new Google_Service_Analytics(...);
2237
+ * $accounts = $analyticsService->accounts;
2238
+ * </code>
2239
+ */
2240
+ class Google_Service_Analytics_ManagementAccounts_Resource extends Google_Service_Resource
2241
+ {
2242
+
2243
+ /**
2244
+ * Lists all accounts to which the user has access.
2245
+ * (accounts.listManagementAccounts)
2246
+ *
2247
+ * @param array $optParams Optional parameters.
2248
+ *
2249
+ * @opt_param int max-results The maximum number of accounts to include in this
2250
+ * response.
2251
+ * @opt_param int start-index An index of the first account to retrieve. Use
2252
+ * this parameter as a pagination mechanism along with the max-results
2253
+ * parameter.
2254
+ * @return Google_Service_Analytics_Accounts
2255
+ */
2256
+ public function listManagementAccounts($optParams = array())
2257
+ {
2258
+ $params = array();
2259
+ $params = array_merge($params, $optParams);
2260
+ return $this->call('list', array($params), "Google_Service_Analytics_Accounts");
2261
+ }
2262
+ }
2263
+ /**
2264
+ * The "customDataSources" collection of methods.
2265
+ * Typical usage is:
2266
+ * <code>
2267
+ * $analyticsService = new Google_Service_Analytics(...);
2268
+ * $customDataSources = $analyticsService->customDataSources;
2269
+ * </code>
2270
+ */
2271
+ class Google_Service_Analytics_ManagementCustomDataSources_Resource extends Google_Service_Resource
2272
+ {
2273
+
2274
+ /**
2275
+ * List custom data sources to which the user has access.
2276
+ * (customDataSources.listManagementCustomDataSources)
2277
+ *
2278
+ * @param string $accountId Account Id for the custom data sources to retrieve.
2279
+ * @param string $webPropertyId Web property Id for the custom data sources to
2280
+ * retrieve.
2281
+ * @param array $optParams Optional parameters.
2282
+ *
2283
+ * @opt_param int max-results The maximum number of custom data sources to
2284
+ * include in this response.
2285
+ * @opt_param int start-index A 1-based index of the first custom data source to
2286
+ * retrieve. Use this parameter as a pagination mechanism along with the max-
2287
+ * results parameter.
2288
+ * @return Google_Service_Analytics_CustomDataSources
2289
+ */
2290
+ public function listManagementCustomDataSources($accountId, $webPropertyId, $optParams = array())
2291
+ {
2292
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId);
2293
+ $params = array_merge($params, $optParams);
2294
+ return $this->call('list', array($params), "Google_Service_Analytics_CustomDataSources");
2295
+ }
2296
+ }
2297
+ /**
2298
+ * The "customDimensions" collection of methods.
2299
+ * Typical usage is:
2300
+ * <code>
2301
+ * $analyticsService = new Google_Service_Analytics(...);
2302
+ * $customDimensions = $analyticsService->customDimensions;
2303
+ * </code>
2304
+ */
2305
+ class Google_Service_Analytics_ManagementCustomDimensions_Resource extends Google_Service_Resource
2306
+ {
2307
+
2308
+ /**
2309
+ * Get a custom dimension to which the user has access. (customDimensions.get)
2310
+ *
2311
+ * @param string $accountId Account ID for the custom dimension to retrieve.
2312
+ * @param string $webPropertyId Web property ID for the custom dimension to
2313
+ * retrieve.
2314
+ * @param string $customDimensionId The ID of the custom dimension to retrieve.
2315
+ * @param array $optParams Optional parameters.
2316
+ * @return Google_Service_Analytics_CustomDimension
2317
+ */
2318
+ public function get($accountId, $webPropertyId, $customDimensionId, $optParams = array())
2319
+ {
2320
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDimensionId' => $customDimensionId);
2321
+ $params = array_merge($params, $optParams);
2322
+ return $this->call('get', array($params), "Google_Service_Analytics_CustomDimension");
2323
+ }
2324
+
2325
+ /**
2326
+ * Create a new custom dimension. (customDimensions.insert)
2327
+ *
2328
+ * @param string $accountId Account ID for the custom dimension to create.
2329
+ * @param string $webPropertyId Web property ID for the custom dimension to
2330
+ * create.
2331
+ * @param Google_CustomDimension $postBody
2332
+ * @param array $optParams Optional parameters.
2333
+ * @return Google_Service_Analytics_CustomDimension
2334
+ */
2335
+ public function insert($accountId, $webPropertyId, Google_Service_Analytics_CustomDimension $postBody, $optParams = array())
2336
+ {
2337
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody);
2338
+ $params = array_merge($params, $optParams);
2339
+ return $this->call('insert', array($params), "Google_Service_Analytics_CustomDimension");
2340
+ }
2341
+
2342
+ /**
2343
+ * Lists custom dimensions to which the user has access.
2344
+ * (customDimensions.listManagementCustomDimensions)
2345
+ *
2346
+ * @param string $accountId Account ID for the custom dimensions to retrieve.
2347
+ * @param string $webPropertyId Web property ID for the custom dimensions to
2348
+ * retrieve.
2349
+ * @param array $optParams Optional parameters.
2350
+ *
2351
+ * @opt_param int max-results The maximum number of custom dimensions to include
2352
+ * in this response.
2353
+ * @opt_param int start-index An index of the first entity to retrieve. Use this
2354
+ * parameter as a pagination mechanism along with the max-results parameter.
2355
+ * @return Google_Service_Analytics_CustomDimensions
2356
+ */
2357
+ public function listManagementCustomDimensions($accountId, $webPropertyId, $optParams = array())
2358
+ {
2359
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId);
2360
+ $params = array_merge($params, $optParams);
2361
+ return $this->call('list', array($params), "Google_Service_Analytics_CustomDimensions");
2362
+ }
2363
+
2364
+ /**
2365
+ * Updates an existing custom dimension. This method supports patch semantics.
2366
+ * (customDimensions.patch)
2367
+ *
2368
+ * @param string $accountId Account ID for the custom dimension to update.
2369
+ * @param string $webPropertyId Web property ID for the custom dimension to
2370
+ * update.
2371
+ * @param string $customDimensionId Custom dimension ID for the custom dimension
2372
+ * to update.
2373
+ * @param Google_CustomDimension $postBody
2374
+ * @param array $optParams Optional parameters.
2375
+ *
2376
+ * @opt_param bool ignoreCustomDataSourceLinks Force the update and ignore any
2377
+ * warnings related to the custom dimension being linked to a custom data source
2378
+ * / data set.
2379
+ * @return Google_Service_Analytics_CustomDimension
2380
+ */
2381
+ public function patch($accountId, $webPropertyId, $customDimensionId, Google_Service_Analytics_CustomDimension $postBody, $optParams = array())
2382
+ {
2383
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDimensionId' => $customDimensionId, 'postBody' => $postBody);
2384
+ $params = array_merge($params, $optParams);
2385
+ return $this->call('patch', array($params), "Google_Service_Analytics_CustomDimension");
2386
+ }
2387
+
2388
+ /**
2389
+ * Updates an existing custom dimension. (customDimensions.update)
2390
+ *
2391
+ * @param string $accountId Account ID for the custom dimension to update.
2392
+ * @param string $webPropertyId Web property ID for the custom dimension to
2393
+ * update.
2394
+ * @param string $customDimensionId Custom dimension ID for the custom dimension
2395
+ * to update.
2396
+ * @param Google_CustomDimension $postBody
2397
+ * @param array $optParams Optional parameters.
2398
+ *
2399
+ * @opt_param bool ignoreCustomDataSourceLinks Force the update and ignore any
2400
+ * warnings related to the custom dimension being linked to a custom data source
2401
+ * / data set.
2402
+ * @return Google_Service_Analytics_CustomDimension
2403
+ */
2404
+ public function update($accountId, $webPropertyId, $customDimensionId, Google_Service_Analytics_CustomDimension $postBody, $optParams = array())
2405
+ {
2406
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDimensionId' => $customDimensionId, 'postBody' => $postBody);
2407
+ $params = array_merge($params, $optParams);
2408
+ return $this->call('update', array($params), "Google_Service_Analytics_CustomDimension");
2409
+ }
2410
+ }
2411
+ /**
2412
+ * The "customMetrics" collection of methods.
2413
+ * Typical usage is:
2414
+ * <code>
2415
+ * $analyticsService = new Google_Service_Analytics(...);
2416
+ * $customMetrics = $analyticsService->customMetrics;
2417
+ * </code>
2418
+ */
2419
+ class Google_Service_Analytics_ManagementCustomMetrics_Resource extends Google_Service_Resource
2420
+ {
2421
+
2422
+ /**
2423
+ * Get a custom metric to which the user has access. (customMetrics.get)
2424
+ *
2425
+ * @param string $accountId Account ID for the custom metric to retrieve.
2426
+ * @param string $webPropertyId Web property ID for the custom metric to
2427
+ * retrieve.
2428
+ * @param string $customMetricId The ID of the custom metric to retrieve.
2429
+ * @param array $optParams Optional parameters.
2430
+ * @return Google_Service_Analytics_CustomMetric
2431
+ */
2432
+ public function get($accountId, $webPropertyId, $customMetricId, $optParams = array())
2433
+ {
2434
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customMetricId' => $customMetricId);
2435
+ $params = array_merge($params, $optParams);
2436
+ return $this->call('get', array($params), "Google_Service_Analytics_CustomMetric");
2437
+ }
2438
+
2439
+ /**
2440
+ * Create a new custom metric. (customMetrics.insert)
2441
+ *
2442
+ * @param string $accountId Account ID for the custom metric to create.
2443
+ * @param string $webPropertyId Web property ID for the custom dimension to
2444
+ * create.
2445
+ * @param Google_CustomMetric $postBody
2446
+ * @param array $optParams Optional parameters.
2447
+ * @return Google_Service_Analytics_CustomMetric
2448
+ */
2449
+ public function insert($accountId, $webPropertyId, Google_Service_Analytics_CustomMetric $postBody, $optParams = array())
2450
+ {
2451
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody);
2452
+ $params = array_merge($params, $optParams);
2453
+ return $this->call('insert', array($params), "Google_Service_Analytics_CustomMetric");
2454
+ }
2455
+
2456
+ /**
2457
+ * Lists custom metrics to which the user has access.
2458
+ * (customMetrics.listManagementCustomMetrics)
2459
+ *
2460
+ * @param string $accountId Account ID for the custom metrics to retrieve.
2461
+ * @param string $webPropertyId Web property ID for the custom metrics to
2462
+ * retrieve.
2463
+ * @param array $optParams Optional parameters.
2464
+ *
2465
+ * @opt_param int max-results The maximum number of custom metrics to include in
2466
+ * this response.
2467
+ * @opt_param int start-index An index of the first entity to retrieve. Use this
2468
+ * parameter as a pagination mechanism along with the max-results parameter.
2469
+ * @return Google_Service_Analytics_CustomMetrics
2470
+ */
2471
+ public function listManagementCustomMetrics($accountId, $webPropertyId, $optParams = array())
2472
+ {
2473
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId);
2474
+ $params = array_merge($params, $optParams);
2475
+ return $this->call('list', array($params), "Google_Service_Analytics_CustomMetrics");
2476
+ }
2477
+
2478
+ /**
2479
+ * Updates an existing custom metric. This method supports patch semantics.
2480
+ * (customMetrics.patch)
2481
+ *
2482
+ * @param string $accountId Account ID for the custom metric to update.
2483
+ * @param string $webPropertyId Web property ID for the custom metric to update.
2484
+ * @param string $customMetricId Custom metric ID for the custom metric to
2485
+ * update.
2486
+ * @param Google_CustomMetric $postBody
2487
+ * @param array $optParams Optional parameters.
2488
+ *
2489
+ * @opt_param bool ignoreCustomDataSourceLinks Force the update and ignore any
2490
+ * warnings related to the custom metric being linked to a custom data source /
2491
+ * data set.
2492
+ * @return Google_Service_Analytics_CustomMetric
2493
+ */
2494
+ public function patch($accountId, $webPropertyId, $customMetricId, Google_Service_Analytics_CustomMetric $postBody, $optParams = array())
2495
+ {
2496
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customMetricId' => $customMetricId, 'postBody' => $postBody);
2497
+ $params = array_merge($params, $optParams);
2498
+ return $this->call('patch', array($params), "Google_Service_Analytics_CustomMetric");
2499
+ }
2500
+
2501
+ /**
2502
+ * Updates an existing custom metric. (customMetrics.update)
2503
+ *
2504
+ * @param string $accountId Account ID for the custom metric to update.
2505
+ * @param string $webPropertyId Web property ID for the custom metric to update.
2506
+ * @param string $customMetricId Custom metric ID for the custom metric to
2507
+ * update.
2508
+ * @param Google_CustomMetric $postBody
2509
+ * @param array $optParams Optional parameters.
2510
+ *
2511
+ * @opt_param bool ignoreCustomDataSourceLinks Force the update and ignore any
2512
+ * warnings related to the custom metric being linked to a custom data source /
2513
+ * data set.
2514
+ * @return Google_Service_Analytics_CustomMetric
2515
+ */
2516
+ public function update($accountId, $webPropertyId, $customMetricId, Google_Service_Analytics_CustomMetric $postBody, $optParams = array())
2517
+ {
2518
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customMetricId' => $customMetricId, 'postBody' => $postBody);
2519
+ $params = array_merge($params, $optParams);
2520
+ return $this->call('update', array($params), "Google_Service_Analytics_CustomMetric");
2521
+ }
2522
+ }
2523
+ /**
2524
+ * The "experiments" collection of methods.
2525
+ * Typical usage is:
2526
+ * <code>
2527
+ * $analyticsService = new Google_Service_Analytics(...);
2528
+ * $experiments = $analyticsService->experiments;
2529
+ * </code>
2530
+ */
2531
+ class Google_Service_Analytics_ManagementExperiments_Resource extends Google_Service_Resource
2532
+ {
2533
+
2534
+ /**
2535
+ * Delete an experiment. (experiments.delete)
2536
+ *
2537
+ * @param string $accountId Account ID to which the experiment belongs
2538
+ * @param string $webPropertyId Web property ID to which the experiment belongs
2539
+ * @param string $profileId View (Profile) ID to which the experiment belongs
2540
+ * @param string $experimentId ID of the experiment to delete
2541
+ * @param array $optParams Optional parameters.
2542
+ */
2543
+ public function delete($accountId, $webPropertyId, $profileId, $experimentId, $optParams = array())
2544
+ {
2545
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'experimentId' => $experimentId);
2546
+ $params = array_merge($params, $optParams);
2547
+ return $this->call('delete', array($params));
2548
+ }
2549
+
2550
+ /**
2551
+ * Returns an experiment to which the user has access. (experiments.get)
2552
+ *
2553
+ * @param string $accountId Account ID to retrieve the experiment for.
2554
+ * @param string $webPropertyId Web property ID to retrieve the experiment for.
2555
+ * @param string $profileId View (Profile) ID to retrieve the experiment for.
2556
+ * @param string $experimentId Experiment ID to retrieve the experiment for.
2557
+ * @param array $optParams Optional parameters.
2558
+ * @return Google_Service_Analytics_Experiment
2559
+ */
2560
+ public function get($accountId, $webPropertyId, $profileId, $experimentId, $optParams = array())
2561
+ {
2562
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'experimentId' => $experimentId);
2563
+ $params = array_merge($params, $optParams);
2564
+ return $this->call('get', array($params), "Google_Service_Analytics_Experiment");
2565
+ }
2566
+
2567
+ /**
2568
+ * Create a new experiment. (experiments.insert)
2569
+ *
2570
+ * @param string $accountId Account ID to create the experiment for.
2571
+ * @param string $webPropertyId Web property ID to create the experiment for.
2572
+ * @param string $profileId View (Profile) ID to create the experiment for.
2573
+ * @param Google_Experiment $postBody
2574
+ * @param array $optParams Optional parameters.
2575
+ * @return Google_Service_Analytics_Experiment
2576
+ */
2577
+ public function insert($accountId, $webPropertyId, $profileId, Google_Service_Analytics_Experiment $postBody, $optParams = array())
2578
+ {
2579
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody);
2580
+ $params = array_merge($params, $optParams);
2581
+ return $this->call('insert', array($params), "Google_Service_Analytics_Experiment");
2582
+ }
2583
+
2584
+ /**
2585
+ * Lists experiments to which the user has access.
2586
+ * (experiments.listManagementExperiments)
2587
+ *
2588
+ * @param string $accountId Account ID to retrieve experiments for.
2589
+ * @param string $webPropertyId Web property ID to retrieve experiments for.
2590
+ * @param string $profileId View (Profile) ID to retrieve experiments for.
2591
+ * @param array $optParams Optional parameters.
2592
+ *
2593
+ * @opt_param int max-results The maximum number of experiments to include in
2594
+ * this response.
2595
+ * @opt_param int start-index An index of the first experiment to retrieve. Use
2596
+ * this parameter as a pagination mechanism along with the max-results
2597
+ * parameter.
2598
+ * @return Google_Service_Analytics_Experiments
2599
+ */
2600
+ public function listManagementExperiments($accountId, $webPropertyId, $profileId, $optParams = array())
2601
+ {
2602
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId);
2603
+ $params = array_merge($params, $optParams);
2604
+ return $this->call('list', array($params), "Google_Service_Analytics_Experiments");
2605
+ }
2606
+
2607
+ /**
2608
+ * Update an existing experiment. This method supports patch semantics.
2609
+ * (experiments.patch)
2610
+ *
2611
+ * @param string $accountId Account ID of the experiment to update.
2612
+ * @param string $webPropertyId Web property ID of the experiment to update.
2613
+ * @param string $profileId View (Profile) ID of the experiment to update.
2614
+ * @param string $experimentId Experiment ID of the experiment to update.
2615
+ * @param Google_Experiment $postBody
2616
+ * @param array $optParams Optional parameters.
2617
+ * @return Google_Service_Analytics_Experiment
2618
+ */
2619
+ public function patch($accountId, $webPropertyId, $profileId, $experimentId, Google_Service_Analytics_Experiment $postBody, $optParams = array())
2620
+ {
2621
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'experimentId' => $experimentId, 'postBody' => $postBody);
2622
+ $params = array_merge($params, $optParams);
2623
+ return $this->call('patch', array($params), "Google_Service_Analytics_Experiment");
2624
+ }
2625
+
2626
+ /**
2627
+ * Update an existing experiment. (experiments.update)
2628
+ *
2629
+ * @param string $accountId Account ID of the experiment to update.
2630
+ * @param string $webPropertyId Web property ID of the experiment to update.
2631
+ * @param string $profileId View (Profile) ID of the experiment to update.
2632
+ * @param string $experimentId Experiment ID of the experiment to update.
2633
+ * @param Google_Experiment $postBody
2634
+ * @param array $optParams Optional parameters.
2635
+ * @return Google_Service_Analytics_Experiment
2636
+ */
2637
+ public function update($accountId, $webPropertyId, $profileId, $experimentId, Google_Service_Analytics_Experiment $postBody, $optParams = array())
2638
+ {
2639
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'experimentId' => $experimentId, 'postBody' => $postBody);
2640
+ $params = array_merge($params, $optParams);
2641
+ return $this->call('update', array($params), "Google_Service_Analytics_Experiment");
2642
+ }
2643
+ }
2644
+ /**
2645
+ * The "filters" collection of methods.
2646
+ * Typical usage is:
2647
+ * <code>
2648
+ * $analyticsService = new Google_Service_Analytics(...);
2649
+ * $filters = $analyticsService->filters;
2650
+ * </code>
2651
+ */
2652
+ class Google_Service_Analytics_ManagementFilters_Resource extends Google_Service_Resource
2653
+ {
2654
+
2655
+ /**
2656
+ * Delete a filter. (filters.delete)
2657
+ *
2658
+ * @param string $accountId Account ID to delete the filter for.
2659
+ * @param string $filterId ID of the filter to be deleted.
2660
+ * @param array $optParams Optional parameters.
2661
+ * @return Google_Service_Analytics_Filter
2662
+ */
2663
+ public function delete($accountId, $filterId, $optParams = array())
2664
+ {
2665
+ $params = array('accountId' => $accountId, 'filterId' => $filterId);
2666
+ $params = array_merge($params, $optParams);
2667
+ return $this->call('delete', array($params), "Google_Service_Analytics_Filter");
2668
+ }
2669
+
2670
+ /**
2671
+ * Returns a filters to which the user has access. (filters.get)
2672
+ *
2673
+ * @param string $accountId Account ID to retrieve filters for.
2674
+ * @param string $filterId Filter ID to retrieve filters for.
2675
+ * @param array $optParams Optional parameters.
2676
+ * @return Google_Service_Analytics_Filter
2677
+ */
2678
+ public function get($accountId, $filterId, $optParams = array())
2679
+ {
2680
+ $params = array('accountId' => $accountId, 'filterId' => $filterId);
2681
+ $params = array_merge($params, $optParams);
2682
+ return $this->call('get', array($params), "Google_Service_Analytics_Filter");
2683
+ }
2684
+
2685
+ /**
2686
+ * Create a new filter. (filters.insert)
2687
+ *
2688
+ * @param string $accountId Account ID to create filter for.
2689
+ * @param Google_Filter $postBody
2690
+ * @param array $optParams Optional parameters.
2691
+ * @return Google_Service_Analytics_Filter
2692
+ */
2693
+ public function insert($accountId, Google_Service_Analytics_Filter $postBody, $optParams = array())
2694
+ {
2695
+ $params = array('accountId' => $accountId, 'postBody' => $postBody);
2696
+ $params = array_merge($params, $optParams);
2697
+
2698
+ return $this->call('insert', array($params), "Google_Service_Analytics_Filter");
2699
+ }
2700
+
2701
+ /**
2702
+ * Lists all filters for an account (filters.listManagementFilters)
2703
+ *
2704
+ * @param string $accountId Account ID to retrieve filters for.
2705
+ * @param array $optParams Optional parameters.
2706
+ *
2707
+ * @opt_param int max-results The maximum number of filters to include in this
2708
+ * response.
2709
+ * @opt_param int start-index An index of the first entity to retrieve. Use this
2710
+ * parameter as a pagination mechanism along with the max-results parameter.
2711
+ * @return Google_Service_Analytics_Filters
2712
+ */
2713
+ public function listManagementFilters($accountId, $optParams = array())
2714
+ {
2715
+ $params = array('accountId' => $accountId);
2716
+ $params = array_merge($params, $optParams);
2717
+ return $this->call('list', array($params), "Google_Service_Analytics_Filters");
2718
+ }
2719
+
2720
+ /**
2721
+ * Updates an existing filter. This method supports patch semantics.
2722
+ * (filters.patch)
2723
+ *
2724
+ * @param string $accountId Account ID to which the filter belongs.
2725
+ * @param string $filterId ID of the filter to be updated.
2726
+ * @param Google_Filter $postBody
2727
+ * @param array $optParams Optional parameters.
2728
+ * @return Google_Service_Analytics_Filter
2729
+ */
2730
+ public function patch($accountId, $filterId, Google_Service_Analytics_Filter $postBody, $optParams = array())
2731
+ {
2732
+ $params = array('accountId' => $accountId, 'filterId' => $filterId, 'postBody' => $postBody);
2733
+ $params = array_merge($params, $optParams);
2734
+ return $this->call('patch', array($params), "Google_Service_Analytics_Filter");
2735
+ }
2736
+
2737
+ /**
2738
+ * Updates an existing filter. (filters.update)
2739
+ *
2740
+ * @param string $accountId Account ID to which the filter belongs.
2741
+ * @param string $filterId ID of the filter to be updated.
2742
+ * @param Google_Filter $postBody
2743
+ * @param array $optParams Optional parameters.
2744
+ * @return Google_Service_Analytics_Filter
2745
+ */
2746
+ public function update($accountId, $filterId, Google_Service_Analytics_Filter $postBody, $optParams = array())
2747
+ {
2748
+ $params = array('accountId' => $accountId, 'filterId' => $filterId, 'postBody' => $postBody);
2749
+ $params = array_merge($params, $optParams);
2750
+ return $this->call('update', array($params), "Google_Service_Analytics_Filter");
2751
+ }
2752
+ }
2753
+ /**
2754
+ * The "goals" collection of methods.
2755
+ * Typical usage is:
2756
+ * <code>
2757
+ * $analyticsService = new Google_Service_Analytics(...);
2758
+ * $goals = $analyticsService->goals;
2759
+ * </code>
2760
+ */
2761
+ class Google_Service_Analytics_ManagementGoals_Resource extends Google_Service_Resource
2762
+ {
2763
+
2764
+ /**
2765
+ * Gets a goal to which the user has access. (goals.get)
2766
+ *
2767
+ * @param string $accountId Account ID to retrieve the goal for.
2768
+ * @param string $webPropertyId Web property ID to retrieve the goal for.
2769
+ * @param string $profileId View (Profile) ID to retrieve the goal for.
2770
+ * @param string $goalId Goal ID to retrieve the goal for.
2771
+ * @param array $optParams Optional parameters.
2772
+ * @return Google_Service_Analytics_Goal
2773
+ */
2774
+ public function get($accountId, $webPropertyId, $profileId, $goalId, $optParams = array())
2775
+ {
2776
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'goalId' => $goalId);
2777
+ $params = array_merge($params, $optParams);
2778
+ return $this->call('get', array($params), "Google_Service_Analytics_Goal");
2779
+ }
2780
+
2781
+ /**
2782
+ * Create a new goal. (goals.insert)
2783
+ *
2784
+ * @param string $accountId Account ID to create the goal for.
2785
+ * @param string $webPropertyId Web property ID to create the goal for.
2786
+ * @param string $profileId View (Profile) ID to create the goal for.
2787
+ * @param Google_Goal $postBody
2788
+ * @param array $optParams Optional parameters.
2789
+ * @return Google_Service_Analytics_Goal
2790
+ */
2791
+ public function insert($accountId, $webPropertyId, $profileId, Google_Service_Analytics_Goal $postBody, $optParams = array())
2792
+ {
2793
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody);
2794
+ $params = array_merge($params, $optParams);
2795
+ return $this->call('insert', array($params), "Google_Service_Analytics_Goal");
2796
+ }
2797
+
2798
+ /**
2799
+ * Lists goals to which the user has access. (goals.listManagementGoals)
2800
+ *
2801
+ * @param string $accountId Account ID to retrieve goals for. Can either be a
2802
+ * specific account ID or '~all', which refers to all the accounts that user has
2803
+ * access to.
2804
+ * @param string $webPropertyId Web property ID to retrieve goals for. Can
2805
+ * either be a specific web property ID or '~all', which refers to all the web
2806
+ * properties that user has access to.
2807
+ * @param string $profileId View (Profile) ID to retrieve goals for. Can either
2808
+ * be a specific view (profile) ID or '~all', which refers to all the views
2809
+ * (profiles) that user has access to.
2810
+ * @param array $optParams Optional parameters.
2811
+ *
2812
+ * @opt_param int max-results The maximum number of goals to include in this
2813
+ * response.
2814
+ * @opt_param int start-index An index of the first goal to retrieve. Use this
2815
+ * parameter as a pagination mechanism along with the max-results parameter.
2816
+ * @return Google_Service_Analytics_Goals
2817
+ */
2818
+ public function listManagementGoals($accountId, $webPropertyId, $profileId, $optParams = array())
2819
+ {
2820
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId);
2821
+ $params = array_merge($params, $optParams);
2822
+ return $this->call('list', array($params), "Google_Service_Analytics_Goals");
2823
+ }
2824
+
2825
+ /**
2826
+ * Updates an existing view (profile). This method supports patch semantics.
2827
+ * (goals.patch)
2828
+ *
2829
+ * @param string $accountId Account ID to update the goal.
2830
+ * @param string $webPropertyId Web property ID to update the goal.
2831
+ * @param string $profileId View (Profile) ID to update the goal.
2832
+ * @param string $goalId Index of the goal to be updated.
2833
+ * @param Google_Goal $postBody
2834
+ * @param array $optParams Optional parameters.
2835
+ * @return Google_Service_Analytics_Goal
2836
+ */
2837
+ public function patch($accountId, $webPropertyId, $profileId, $goalId, Google_Service_Analytics_Goal $postBody, $optParams = array())
2838
+ {
2839
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'goalId' => $goalId, 'postBody' => $postBody);
2840
+ $params = array_merge($params, $optParams);
2841
+ return $this->call('patch', array($params), "Google_Service_Analytics_Goal");
2842
+ }
2843
+
2844
+ /**
2845
+ * Updates an existing view (profile). (goals.update)
2846
+ *
2847
+ * @param string $accountId Account ID to update the goal.
2848
+ * @param string $webPropertyId Web property ID to update the goal.
2849
+ * @param string $profileId View (Profile) ID to update the goal.
2850
+ * @param string $goalId Index of the goal to be updated.
2851
+ * @param Google_Goal $postBody
2852
+ * @param array $optParams Optional parameters.
2853
+ * @return Google_Service_Analytics_Goal
2854
+ */
2855
+ public function update($accountId, $webPropertyId, $profileId, $goalId, Google_Service_Analytics_Goal $postBody, $optParams = array())
2856
+ {
2857
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'goalId' => $goalId, 'postBody' => $postBody);
2858
+ $params = array_merge($params, $optParams);
2859
+ return $this->call('update', array($params), "Google_Service_Analytics_Goal");
2860
+ }
2861
+ }
2862
+ /**
2863
+ * The "profileFilterLinks" collection of methods.
2864
+ * Typical usage is:
2865
+ * <code>
2866
+ * $analyticsService = new Google_Service_Analytics(...);
2867
+ * $profileFilterLinks = $analyticsService->profileFilterLinks;
2868
+ * </code>
2869
+ */
2870
+ class Google_Service_Analytics_ManagementProfileFilterLinks_Resource extends Google_Service_Resource
2871
+ {
2872
+
2873
+ /**
2874
+ * Delete a profile filter link. (profileFilterLinks.delete)
2875
+ *
2876
+ * @param string $accountId Account ID to which the profile filter link belongs.
2877
+ * @param string $webPropertyId Web property Id to which the profile filter link
2878
+ * belongs.
2879
+ * @param string $profileId Profile ID to which the filter link belongs.
2880
+ * @param string $linkId ID of the profile filter link to delete.
2881
+ * @param array $optParams Optional parameters.
2882
+ */
2883
+ public function delete($accountId, $webPropertyId, $profileId, $linkId, $optParams = array())
2884
+ {
2885
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId);
2886
+ $params = array_merge($params, $optParams);
2887
+ return $this->call('delete', array($params));
2888
+ }
2889
+
2890
+ /**
2891
+ * Returns a single profile filter link. (profileFilterLinks.get)
2892
+ *
2893
+ * @param string $accountId Account ID to retrieve profile filter link for.
2894
+ * @param string $webPropertyId Web property Id to retrieve profile filter link
2895
+ * for.
2896
+ * @param string $profileId Profile ID to retrieve filter link for.
2897
+ * @param string $linkId ID of the profile filter link.
2898
+ * @param array $optParams Optional parameters.
2899
+ * @return Google_Service_Analytics_ProfileFilterLink
2900
+ */
2901
+ public function get($accountId, $webPropertyId, $profileId, $linkId, $optParams = array())
2902
+ {
2903
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId);
2904
+ $params = array_merge($params, $optParams);
2905
+ return $this->call('get', array($params), "Google_Service_Analytics_ProfileFilterLink");
2906
+ }
2907
+
2908
+ /**
2909
+ * Create a new profile filter link. (profileFilterLinks.insert)
2910
+ *
2911
+ * @param string $accountId Account ID to create profile filter link for.
2912
+ * @param string $webPropertyId Web property Id to create profile filter link
2913
+ * for.
2914
+ * @param string $profileId Profile ID to create filter link for.
2915
+ * @param Google_ProfileFilterLink $postBody
2916
+ * @param array $optParams Optional parameters.
2917
+ * @return Google_Service_Analytics_ProfileFilterLink
2918
+ */
2919
+ public function insert($accountId, $webPropertyId, $profileId, Google_Service_Analytics_ProfileFilterLink $postBody, $optParams = array())
2920
+ {
2921
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody);
2922
+ $params = array_merge($params, $optParams);
2923
+ return $this->call('insert', array($params), "Google_Service_Analytics_ProfileFilterLink");
2924
+ }
2925
+
2926
+ /**
2927
+ * Lists all profile filter links for a profile.
2928
+ * (profileFilterLinks.listManagementProfileFilterLinks)
2929
+ *
2930
+ * @param string $accountId Account ID to retrieve profile filter links for.
2931
+ * @param string $webPropertyId Web property Id for profile filter links for.
2932
+ * Can either be a specific web property ID or '~all', which refers to all the
2933
+ * web properties that user has access to.
2934
+ * @param string $profileId Profile ID to retrieve filter links for. Can either
2935
+ * be a specific profile ID or '~all', which refers to all the profiles that
2936
+ * user has access to.
2937
+ * @param array $optParams Optional parameters.
2938
+ *
2939
+ * @opt_param int max-results The maximum number of profile filter links to
2940
+ * include in this response.
2941
+ * @opt_param int start-index An index of the first entity to retrieve. Use this
2942
+ * parameter as a pagination mechanism along with the max-results parameter.
2943
+ * @return Google_Service_Analytics_ProfileFilterLinks
2944
+ */
2945
+ public function listManagementProfileFilterLinks($accountId, $webPropertyId, $profileId, $optParams = array())
2946
+ {
2947
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId);
2948
+ $params = array_merge($params, $optParams);
2949
+ return $this->call('list', array($params), "Google_Service_Analytics_ProfileFilterLinks");
2950
+ }
2951
+
2952
+ /**
2953
+ * Update an existing profile filter link. This method supports patch semantics.
2954
+ * (profileFilterLinks.patch)
2955
+ *
2956
+ * @param string $accountId Account ID to which profile filter link belongs.
2957
+ * @param string $webPropertyId Web property Id to which profile filter link
2958
+ * belongs
2959
+ * @param string $profileId Profile ID to which filter link belongs
2960
+ * @param string $linkId ID of the profile filter link to be updated.
2961
+ * @param Google_ProfileFilterLink $postBody
2962
+ * @param array $optParams Optional parameters.
2963
+ * @return Google_Service_Analytics_ProfileFilterLink
2964
+ */
2965
+ public function patch($accountId, $webPropertyId, $profileId, $linkId, Google_Service_Analytics_ProfileFilterLink $postBody, $optParams = array())
2966
+ {
2967
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId, 'postBody' => $postBody);
2968
+ $params = array_merge($params, $optParams);
2969
+ return $this->call('patch', array($params), "Google_Service_Analytics_ProfileFilterLink");
2970
+ }
2971
+
2972
+ /**
2973
+ * Update an existing profile filter link. (profileFilterLinks.update)
2974
+ *
2975
+ * @param string $accountId Account ID to which profile filter link belongs.
2976
+ * @param string $webPropertyId Web property Id to which profile filter link
2977
+ * belongs
2978
+ * @param string $profileId Profile ID to which filter link belongs
2979
+ * @param string $linkId ID of the profile filter link to be updated.
2980
+ * @param Google_ProfileFilterLink $postBody
2981
+ * @param array $optParams Optional parameters.
2982
+ * @return Google_Service_Analytics_ProfileFilterLink
2983
+ */
2984
+ public function update($accountId, $webPropertyId, $profileId, $linkId, Google_Service_Analytics_ProfileFilterLink $postBody, $optParams = array())
2985
+ {
2986
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId, 'postBody' => $postBody);
2987
+ $params = array_merge($params, $optParams);
2988
+ return $this->call('update', array($params), "Google_Service_Analytics_ProfileFilterLink");
2989
+ }
2990
+ }
2991
+ /**
2992
+ * The "profileUserLinks" collection of methods.
2993
+ * Typical usage is:
2994
+ * <code>
2995
+ * $analyticsService = new Google_Service_Analytics(...);
2996
+ * $profileUserLinks = $analyticsService->profileUserLinks;
2997
+ * </code>
2998
+ */
2999
+ class Google_Service_Analytics_ManagementProfileUserLinks_Resource extends Google_Service_Resource
3000
+ {
3001
+
3002
+ /**
3003
+ * Removes a user from the given view (profile). (profileUserLinks.delete)
3004
+ *
3005
+ * @param string $accountId Account ID to delete the user link for.
3006
+ * @param string $webPropertyId Web Property ID to delete the user link for.
3007
+ * @param string $profileId View (Profile) ID to delete the user link for.
3008
+ * @param string $linkId Link ID to delete the user link for.
3009
+ * @param array $optParams Optional parameters.
3010
+ */
3011
+ public function delete($accountId, $webPropertyId, $profileId, $linkId, $optParams = array())
3012
+ {
3013
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId);
3014
+ $params = array_merge($params, $optParams);
3015
+ return $this->call('delete', array($params));
3016
+ }
3017
+
3018
+ /**
3019
+ * Adds a new user to the given view (profile). (profileUserLinks.insert)
3020
+ *
3021
+ * @param string $accountId Account ID to create the user link for.
3022
+ * @param string $webPropertyId Web Property ID to create the user link for.
3023
+ * @param string $profileId View (Profile) ID to create the user link for.
3024
+ * @param Google_EntityUserLink $postBody
3025
+ * @param array $optParams Optional parameters.
3026
+ * @return Google_Service_Analytics_EntityUserLink
3027
+ */
3028
+ public function insert($accountId, $webPropertyId, $profileId, Google_Service_Analytics_EntityUserLink $postBody, $optParams = array())
3029
+ {
3030
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody);
3031
+ $params = array_merge($params, $optParams);
3032
+ return $this->call('insert', array($params), "Google_Service_Analytics_EntityUserLink");
3033
+ }
3034
+
3035
+ /**
3036
+ * Lists profile-user links for a given view (profile).
3037
+ * (profileUserLinks.listManagementProfileUserLinks)
3038
+ *
3039
+ * @param string $accountId Account ID which the given view (profile) belongs
3040
+ * to.
3041
+ * @param string $webPropertyId Web Property ID which the given view (profile)
3042
+ * belongs to. Can either be a specific web property ID or '~all', which refers
3043
+ * to all the web properties that user has access to.
3044
+ * @param string $profileId View (Profile) ID to retrieve the profile-user links
3045
+ * for. Can either be a specific profile ID or '~all', which refers to all the
3046
+ * profiles that user has access to.
3047
+ * @param array $optParams Optional parameters.
3048
+ *
3049
+ * @opt_param int max-results The maximum number of profile-user links to
3050
+ * include in this response.
3051
+ * @opt_param int start-index An index of the first profile-user link to
3052
+ * retrieve. Use this parameter as a pagination mechanism along with the max-
3053
+ * results parameter.
3054
+ * @return Google_Service_Analytics_EntityUserLinks
3055
+ */
3056
+ public function listManagementProfileUserLinks($accountId, $webPropertyId, $profileId, $optParams = array())
3057
+ {
3058
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId);
3059
+ $params = array_merge($params, $optParams);
3060
+ return $this->call('list', array($params), "Google_Service_Analytics_EntityUserLinks");
3061
+ }
3062
+
3063
+ /**
3064
+ * Updates permissions for an existing user on the given view (profile).
3065
+ * (profileUserLinks.update)
3066
+ *
3067
+ * @param string $accountId Account ID to update the user link for.
3068
+ * @param string $webPropertyId Web Property ID to update the user link for.
3069
+ * @param string $profileId View (Profile ID) to update the user link for.
3070
+ * @param string $linkId Link ID to update the user link for.
3071
+ * @param Google_EntityUserLink $postBody
3072
+ * @param array $optParams Optional parameters.
3073
+ * @return Google_Service_Analytics_EntityUserLink
3074
+ */
3075
+ public function update($accountId, $webPropertyId, $profileId, $linkId, Google_Service_Analytics_EntityUserLink $postBody, $optParams = array())
3076
+ {
3077
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'linkId' => $linkId, 'postBody' => $postBody);
3078
+ $params = array_merge($params, $optParams);
3079
+ return $this->call('update', array($params), "Google_Service_Analytics_EntityUserLink");
3080
+ }
3081
+ }
3082
+ /**
3083
+ * The "profiles" collection of methods.
3084
+ * Typical usage is:
3085
+ * <code>
3086
+ * $analyticsService = new Google_Service_Analytics(...);
3087
+ * $profiles = $analyticsService->profiles;
3088
+ * </code>
3089
+ */
3090
+ class Google_Service_Analytics_ManagementProfiles_Resource extends Google_Service_Resource
3091
+ {
3092
+
3093
+ /**
3094
+ * Deletes a view (profile). (profiles.delete)
3095
+ *
3096
+ * @param string $accountId Account ID to delete the view (profile) for.
3097
+ * @param string $webPropertyId Web property ID to delete the view (profile)
3098
+ * for.
3099
+ * @param string $profileId ID of the view (profile) to be deleted.
3100
+ * @param array $optParams Optional parameters.
3101
+ */
3102
+ public function delete($accountId, $webPropertyId, $profileId, $optParams = array())
3103
+ {
3104
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId);
3105
+ $params = array_merge($params, $optParams);
3106
+ return $this->call('delete', array($params));
3107
+ }
3108
+
3109
+ /**
3110
+ * Gets a view (profile) to which the user has access. (profiles.get)
3111
+ *
3112
+ * @param string $accountId Account ID to retrieve the goal for.
3113
+ * @param string $webPropertyId Web property ID to retrieve the goal for.
3114
+ * @param string $profileId View (Profile) ID to retrieve the goal for.
3115
+ * @param array $optParams Optional parameters.
3116
+ * @return Google_Service_Analytics_Profile
3117
+ */
3118
+ public function get($accountId, $webPropertyId, $profileId, $optParams = array())
3119
+ {
3120
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId);
3121
+ $params = array_merge($params, $optParams);
3122
+ return $this->call('get', array($params), "Google_Service_Analytics_Profile");
3123
+ }
3124
+
3125
+ /**
3126
+ * Create a new view (profile). (profiles.insert)
3127
+ *
3128
+ * @param string $accountId Account ID to create the view (profile) for.
3129
+ * @param string $webPropertyId Web property ID to create the view (profile)
3130
+ * for.
3131
+ * @param Google_Profile $postBody
3132
+ * @param array $optParams Optional parameters.
3133
+ * @return Google_Service_Analytics_Profile
3134
+ */
3135
+ public function insert($accountId, $webPropertyId, Google_Service_Analytics_Profile $postBody, $optParams = array())
3136
+ {
3137
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody);
3138
+ $params = array_merge($params, $optParams);
3139
+ return $this->call('insert', array($params), "Google_Service_Analytics_Profile");
3140
+ }
3141
+
3142
+ /**
3143
+ * Lists views (profiles) to which the user has access.
3144
+ * (profiles.listManagementProfiles)
3145
+ *
3146
+ * @param string $accountId Account ID for the view (profiles) to retrieve. Can
3147
+ * either be a specific account ID or '~all', which refers to all the accounts
3148
+ * to which the user has access.
3149
+ * @param string $webPropertyId Web property ID for the views (profiles) to
3150
+ * retrieve. Can either be a specific web property ID or '~all', which refers to
3151
+ * all the web properties to which the user has access.
3152
+ * @param array $optParams Optional parameters.
3153
+ *
3154
+ * @opt_param int max-results The maximum number of views (profiles) to include
3155
+ * in this response.
3156
+ * @opt_param int start-index An index of the first entity to retrieve. Use this
3157
+ * parameter as a pagination mechanism along with the max-results parameter.
3158
+ * @return Google_Service_Analytics_Profiles
3159
+ */
3160
+ public function listManagementProfiles($accountId, $webPropertyId, $optParams = array())
3161
+ {
3162
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId);
3163
+ $params = array_merge($params, $optParams);
3164
+ return $this->call('list', array($params), "Google_Service_Analytics_Profiles");
3165
+ }
3166
+
3167
+ /**
3168
+ * Updates an existing view (profile). This method supports patch semantics.
3169
+ * (profiles.patch)
3170
+ *
3171
+ * @param string $accountId Account ID to which the view (profile) belongs
3172
+ * @param string $webPropertyId Web property ID to which the view (profile)
3173
+ * belongs
3174
+ * @param string $profileId ID of the view (profile) to be updated.
3175
+ * @param Google_Profile $postBody
3176
+ * @param array $optParams Optional parameters.
3177
+ * @return Google_Service_Analytics_Profile
3178
+ */
3179
+ public function patch($accountId, $webPropertyId, $profileId, Google_Service_Analytics_Profile $postBody, $optParams = array())
3180
+ {
3181
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody);
3182
+ $params = array_merge($params, $optParams);
3183
+ return $this->call('patch', array($params), "Google_Service_Analytics_Profile");
3184
+ }
3185
+
3186
+ /**
3187
+ * Updates an existing view (profile). (profiles.update)
3188
+ *
3189
+ * @param string $accountId Account ID to which the view (profile) belongs
3190
+ * @param string $webPropertyId Web property ID to which the view (profile)
3191
+ * belongs
3192
+ * @param string $profileId ID of the view (profile) to be updated.
3193
+ * @param Google_Profile $postBody
3194
+ * @param array $optParams Optional parameters.
3195
+ * @return Google_Service_Analytics_Profile
3196
+ */
3197
+ public function update($accountId, $webPropertyId, $profileId, Google_Service_Analytics_Profile $postBody, $optParams = array())
3198
+ {
3199
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody);
3200
+ $params = array_merge($params, $optParams);
3201
+ return $this->call('update', array($params), "Google_Service_Analytics_Profile");
3202
+ }
3203
+ }
3204
+ /**
3205
+ * The "segments" collection of methods.
3206
+ * Typical usage is:
3207
+ * <code>
3208
+ * $analyticsService = new Google_Service_Analytics(...);
3209
+ * $segments = $analyticsService->segments;
3210
+ * </code>
3211
+ */
3212
+ class Google_Service_Analytics_ManagementSegments_Resource extends Google_Service_Resource
3213
+ {
3214
+
3215
+ /**
3216
+ * Lists segments to which the user has access.
3217
+ * (segments.listManagementSegments)
3218
+ *
3219
+ * @param array $optParams Optional parameters.
3220
+ *
3221
+ * @opt_param int max-results The maximum number of segments to include in this
3222
+ * response.
3223
+ * @opt_param int start-index An index of the first segment to retrieve. Use
3224
+ * this parameter as a pagination mechanism along with the max-results
3225
+ * parameter.
3226
+ * @return Google_Service_Analytics_Segments
3227
+ */
3228
+ public function listManagementSegments($optParams = array())
3229
+ {
3230
+ $params = array();
3231
+ $params = array_merge($params, $optParams);
3232
+ return $this->call('list', array($params), "Google_Service_Analytics_Segments");
3233
+ }
3234
+ }
3235
+ /**
3236
+ * The "unsampledReports" collection of methods.
3237
+ * Typical usage is:
3238
+ * <code>
3239
+ * $analyticsService = new Google_Service_Analytics(...);
3240
+ * $unsampledReports = $analyticsService->unsampledReports;
3241
+ * </code>
3242
+ */
3243
+ class Google_Service_Analytics_ManagementUnsampledReports_Resource extends Google_Service_Resource
3244
+ {
3245
+
3246
+ /**
3247
+ * Returns a single unsampled report. (unsampledReports.get)
3248
+ *
3249
+ * @param string $accountId Account ID to retrieve unsampled report for.
3250
+ * @param string $webPropertyId Web property ID to retrieve unsampled reports
3251
+ * for.
3252
+ * @param string $profileId View (Profile) ID to retrieve unsampled report for.
3253
+ * @param string $unsampledReportId ID of the unsampled report to retrieve.
3254
+ * @param array $optParams Optional parameters.
3255
+ * @return Google_Service_Analytics_UnsampledReport
3256
+ */
3257
+ public function get($accountId, $webPropertyId, $profileId, $unsampledReportId, $optParams = array())
3258
+ {
3259
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'unsampledReportId' => $unsampledReportId);
3260
+ $params = array_merge($params, $optParams);
3261
+ return $this->call('get', array($params), "Google_Service_Analytics_UnsampledReport");
3262
+ }
3263
+
3264
+ /**
3265
+ * Create a new unsampled report. (unsampledReports.insert)
3266
+ *
3267
+ * @param string $accountId Account ID to create the unsampled report for.
3268
+ * @param string $webPropertyId Web property ID to create the unsampled report
3269
+ * for.
3270
+ * @param string $profileId View (Profile) ID to create the unsampled report
3271
+ * for.
3272
+ * @param Google_UnsampledReport $postBody
3273
+ * @param array $optParams Optional parameters.
3274
+ * @return Google_Service_Analytics_UnsampledReport
3275
+ */
3276
+ public function insert($accountId, $webPropertyId, $profileId, Google_Service_Analytics_UnsampledReport $postBody, $optParams = array())
3277
+ {
3278
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody);
3279
+ $params = array_merge($params, $optParams);
3280
+ return $this->call('insert', array($params), "Google_Service_Analytics_UnsampledReport");
3281
+ }
3282
+
3283
+ /**
3284
+ * Lists unsampled reports to which the user has access.
3285
+ * (unsampledReports.listManagementUnsampledReports)
3286
+ *
3287
+ * @param string $accountId Account ID to retrieve unsampled reports for. Must
3288
+ * be a specific account ID, ~all is not supported.
3289
+ * @param string $webPropertyId Web property ID to retrieve unsampled reports
3290
+ * for. Must be a specific web property ID, ~all is not supported.
3291
+ * @param string $profileId View (Profile) ID to retrieve unsampled reports for.
3292
+ * Must be a specific view (profile) ID, ~all is not supported.
3293
+ * @param array $optParams Optional parameters.
3294
+ *
3295
+ * @opt_param int max-results The maximum number of unsampled reports to include
3296
+ * in this response.
3297
+ * @opt_param int start-index An index of the first unsampled report to
3298
+ * retrieve. Use this parameter as a pagination mechanism along with the max-
3299
+ * results parameter.
3300
+ * @return Google_Service_Analytics_UnsampledReports
3301
+ */
3302
+ public function listManagementUnsampledReports($accountId, $webPropertyId, $profileId, $optParams = array())
3303
+ {
3304
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId);
3305
+ $params = array_merge($params, $optParams);
3306
+ return $this->call('list', array($params), "Google_Service_Analytics_UnsampledReports");
3307
+ }
3308
+ }
3309
+ /**
3310
+ * The "uploads" collection of methods.
3311
+ * Typical usage is:
3312
+ * <code>
3313
+ * $analyticsService = new Google_Service_Analytics(...);
3314
+ * $uploads = $analyticsService->uploads;
3315
+ * </code>
3316
+ */
3317
+ class Google_Service_Analytics_ManagementUploads_Resource extends Google_Service_Resource
3318
+ {
3319
+
3320
+ /**
3321
+ * Delete data associated with a previous upload. (uploads.deleteUploadData)
3322
+ *
3323
+ * @param string $accountId Account Id for the uploads to be deleted.
3324
+ * @param string $webPropertyId Web property Id for the uploads to be deleted.
3325
+ * @param string $customDataSourceId Custom data source Id for the uploads to be
3326
+ * deleted.
3327
+ * @param Google_AnalyticsDataimportDeleteUploadDataRequest $postBody
3328
+ * @param array $optParams Optional parameters.
3329
+ */
3330
+ public function deleteUploadData($accountId, $webPropertyId, $customDataSourceId, Google_Service_Analytics_AnalyticsDataimportDeleteUploadDataRequest $postBody, $optParams = array())
3331
+ {
3332
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDataSourceId' => $customDataSourceId, 'postBody' => $postBody);
3333
+ $params = array_merge($params, $optParams);
3334
+ return $this->call('deleteUploadData', array($params));
3335
+ }
3336
+
3337
+ /**
3338
+ * List uploads to which the user has access. (uploads.get)
3339
+ *
3340
+ * @param string $accountId Account Id for the upload to retrieve.
3341
+ * @param string $webPropertyId Web property Id for the upload to retrieve.
3342
+ * @param string $customDataSourceId Custom data source Id for upload to
3343
+ * retrieve.
3344
+ * @param string $uploadId Upload Id to retrieve.
3345
+ * @param array $optParams Optional parameters.
3346
+ * @return Google_Service_Analytics_Upload
3347
+ */
3348
+ public function get($accountId, $webPropertyId, $customDataSourceId, $uploadId, $optParams = array())
3349
+ {
3350
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDataSourceId' => $customDataSourceId, 'uploadId' => $uploadId);
3351
+ $params = array_merge($params, $optParams);
3352
+ return $this->call('get', array($params), "Google_Service_Analytics_Upload");
3353
+ }
3354
+
3355
+ /**
3356
+ * List uploads to which the user has access. (uploads.listManagementUploads)
3357
+ *
3358
+ * @param string $accountId Account Id for the uploads to retrieve.
3359
+ * @param string $webPropertyId Web property Id for the uploads to retrieve.
3360
+ * @param string $customDataSourceId Custom data source Id for uploads to
3361
+ * retrieve.
3362
+ * @param array $optParams Optional parameters.
3363
+ *
3364
+ * @opt_param int max-results The maximum number of uploads to include in this
3365
+ * response.
3366
+ * @opt_param int start-index A 1-based index of the first upload to retrieve.
3367
+ * Use this parameter as a pagination mechanism along with the max-results
3368
+ * parameter.
3369
+ * @return Google_Service_Analytics_Uploads
3370
+ */
3371
+ public function listManagementUploads($accountId, $webPropertyId, $customDataSourceId, $optParams = array())
3372
+ {
3373
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDataSourceId' => $customDataSourceId);
3374
+ $params = array_merge($params, $optParams);
3375
+ return $this->call('list', array($params), "Google_Service_Analytics_Uploads");
3376
+ }
3377
+
3378
+ /**
3379
+ * Upload data for a custom data source. (uploads.uploadData)
3380
+ *
3381
+ * @param string $accountId Account Id associated with the upload.
3382
+ * @param string $webPropertyId Web property UA-string associated with the
3383
+ * upload.
3384
+ * @param string $customDataSourceId Custom data source Id to which the data
3385
+ * being uploaded belongs.
3386
+ * @param array $optParams Optional parameters.
3387
+ * @return Google_Service_Analytics_Upload
3388
+ */
3389
+ public function uploadData($accountId, $webPropertyId, $customDataSourceId, $optParams = array())
3390
+ {
3391
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDataSourceId' => $customDataSourceId);
3392
+ $params = array_merge($params, $optParams);
3393
+ return $this->call('uploadData', array($params), "Google_Service_Analytics_Upload");
3394
+ }
3395
+ }
3396
+ /**
3397
+ * The "webPropertyAdWordsLinks" collection of methods.
3398
+ * Typical usage is:
3399
+ * <code>
3400
+ * $analyticsService = new Google_Service_Analytics(...);
3401
+ * $webPropertyAdWordsLinks = $analyticsService->webPropertyAdWordsLinks;
3402
+ * </code>
3403
+ */
3404
+ class Google_Service_Analytics_ManagementWebPropertyAdWordsLinks_Resource extends Google_Service_Resource
3405
+ {
3406
+
3407
+ /**
3408
+ * Deletes a web property-AdWords link. (webPropertyAdWordsLinks.delete)
3409
+ *
3410
+ * @param string $accountId ID of the account which the given web property
3411
+ * belongs to.
3412
+ * @param string $webPropertyId Web property ID to delete the AdWords link for.
3413
+ * @param string $webPropertyAdWordsLinkId Web property AdWords link ID.
3414
+ * @param array $optParams Optional parameters.
3415
+ */
3416
+ public function delete($accountId, $webPropertyId, $webPropertyAdWordsLinkId, $optParams = array())
3417
+ {
3418
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'webPropertyAdWordsLinkId' => $webPropertyAdWordsLinkId);
3419
+ $params = array_merge($params, $optParams);
3420
+ return $this->call('delete', array($params));
3421
+ }
3422
+
3423
+ /**
3424
+ * Returns a web property-AdWords link to which the user has access.
3425
+ * (webPropertyAdWordsLinks.get)
3426
+ *
3427
+ * @param string $accountId ID of the account which the given web property
3428
+ * belongs to.
3429
+ * @param string $webPropertyId Web property ID to retrieve the AdWords link
3430
+ * for.
3431
+ * @param string $webPropertyAdWordsLinkId Web property-AdWords link ID.
3432
+ * @param array $optParams Optional parameters.
3433
+ * @return Google_Service_Analytics_EntityAdWordsLink
3434
+ */
3435
+ public function get($accountId, $webPropertyId, $webPropertyAdWordsLinkId, $optParams = array())
3436
+ {
3437
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'webPropertyAdWordsLinkId' => $webPropertyAdWordsLinkId);
3438
+ $params = array_merge($params, $optParams);
3439
+ return $this->call('get', array($params), "Google_Service_Analytics_EntityAdWordsLink");
3440
+ }
3441
+
3442
+ /**
3443
+ * Creates a webProperty-AdWords link. (webPropertyAdWordsLinks.insert)
3444
+ *
3445
+ * @param string $accountId ID of the Google Analytics account to create the
3446
+ * link for.
3447
+ * @param string $webPropertyId Web property ID to create the link for.
3448
+ * @param Google_EntityAdWordsLink $postBody
3449
+ * @param array $optParams Optional parameters.
3450
+ * @return Google_Service_Analytics_EntityAdWordsLink
3451
+ */
3452
+ public function insert($accountId, $webPropertyId, Google_Service_Analytics_EntityAdWordsLink $postBody, $optParams = array())
3453
+ {
3454
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody);
3455
+ $params = array_merge($params, $optParams);
3456
+ return $this->call('insert', array($params), "Google_Service_Analytics_EntityAdWordsLink");
3457
+ }
3458
+
3459
+ /**
3460
+ * Lists webProperty-AdWords links for a given web property.
3461
+ * (webPropertyAdWordsLinks.listManagementWebPropertyAdWordsLinks)
3462
+ *
3463
+ * @param string $accountId ID of the account which the given web property
3464
+ * belongs to.
3465
+ * @param string $webPropertyId Web property ID to retrieve the AdWords links
3466
+ * for.
3467
+ * @param array $optParams Optional parameters.
3468
+ *
3469
+ * @opt_param int max-results The maximum number of webProperty-AdWords links to
3470
+ * include in this response.
3471
+ * @opt_param int start-index An index of the first webProperty-AdWords link to
3472
+ * retrieve. Use this parameter as a pagination mechanism along with the max-
3473
+ * results parameter.
3474
+ * @return Google_Service_Analytics_EntityAdWordsLinks
3475
+ */
3476
+ public function listManagementWebPropertyAdWordsLinks($accountId, $webPropertyId, $optParams = array())
3477
+ {
3478
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId);
3479
+ $params = array_merge($params, $optParams);
3480
+ return $this->call('list', array($params), "Google_Service_Analytics_EntityAdWordsLinks");
3481
+ }
3482
+
3483
+ /**
3484
+ * Updates an existing webProperty-AdWords link. This method supports patch
3485
+ * semantics. (webPropertyAdWordsLinks.patch)
3486
+ *
3487
+ * @param string $accountId ID of the account which the given web property
3488
+ * belongs to.
3489
+ * @param string $webPropertyId Web property ID to retrieve the AdWords link
3490
+ * for.
3491
+ * @param string $webPropertyAdWordsLinkId Web property-AdWords link ID.
3492
+ * @param Google_EntityAdWordsLink $postBody
3493
+ * @param array $optParams Optional parameters.
3494
+ * @return Google_Service_Analytics_EntityAdWordsLink
3495
+ */
3496
+ public function patch($accountId, $webPropertyId, $webPropertyAdWordsLinkId, Google_Service_Analytics_EntityAdWordsLink $postBody, $optParams = array())
3497
+ {
3498
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'webPropertyAdWordsLinkId' => $webPropertyAdWordsLinkId, 'postBody' => $postBody);
3499
+ $params = array_merge($params, $optParams);
3500
+ return $this->call('patch', array($params), "Google_Service_Analytics_EntityAdWordsLink");
3501
+ }
3502
+
3503
+ /**
3504
+ * Updates an existing webProperty-AdWords link.
3505
+ * (webPropertyAdWordsLinks.update)
3506
+ *
3507
+ * @param string $accountId ID of the account which the given web property
3508
+ * belongs to.
3509
+ * @param string $webPropertyId Web property ID to retrieve the AdWords link
3510
+ * for.
3511
+ * @param string $webPropertyAdWordsLinkId Web property-AdWords link ID.
3512
+ * @param Google_EntityAdWordsLink $postBody
3513
+ * @param array $optParams Optional parameters.
3514
+ * @return Google_Service_Analytics_EntityAdWordsLink
3515
+ */
3516
+ public function update($accountId, $webPropertyId, $webPropertyAdWordsLinkId, Google_Service_Analytics_EntityAdWordsLink $postBody, $optParams = array())
3517
+ {
3518
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'webPropertyAdWordsLinkId' => $webPropertyAdWordsLinkId, 'postBody' => $postBody);
3519
+ $params = array_merge($params, $optParams);
3520
+ return $this->call('update', array($params), "Google_Service_Analytics_EntityAdWordsLink");
3521
+ }
3522
+ }
3523
+ /**
3524
+ * The "webproperties" collection of methods.
3525
+ * Typical usage is:
3526
+ * <code>
3527
+ * $analyticsService = new Google_Service_Analytics(...);
3528
+ * $webproperties = $analyticsService->webproperties;
3529
+ * </code>
3530
+ */
3531
+ class Google_Service_Analytics_ManagementWebproperties_Resource extends Google_Service_Resource
3532
+ {
3533
+
3534
+ /**
3535
+ * Gets a web property to which the user has access. (webproperties.get)
3536
+ *
3537
+ * @param string $accountId Account ID to retrieve the web property for.
3538
+ * @param string $webPropertyId ID to retrieve the web property for.
3539
+ * @param array $optParams Optional parameters.
3540
+ * @return Google_Service_Analytics_Webproperty
3541
+ */
3542
+ public function get($accountId, $webPropertyId, $optParams = array())
3543
+ {
3544
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId);
3545
+ $params = array_merge($params, $optParams);
3546
+ return $this->call('get', array($params), "Google_Service_Analytics_Webproperty");
3547
+ }
3548
+
3549
+ /**
3550
+ * Create a new property if the account has fewer than 20 properties. Web
3551
+ * properties are visible in the Google Analytics interface only if they have at
3552
+ * least one profile. (webproperties.insert)
3553
+ *
3554
+ * @param string $accountId Account ID to create the web property for.
3555
+ * @param Google_Webproperty $postBody
3556
+ * @param array $optParams Optional parameters.
3557
+ * @return Google_Service_Analytics_Webproperty
3558
+ */
3559
+ public function insert($accountId, Google_Service_Analytics_Webproperty $postBody, $optParams = array())
3560
+ {
3561
+ $params = array('accountId' => $accountId, 'postBody' => $postBody);
3562
+ $params = array_merge($params, $optParams);
3563
+ return $this->call('insert', array($params), "Google_Service_Analytics_Webproperty");
3564
+ }
3565
+
3566
+ /**
3567
+ * Lists web properties to which the user has access.
3568
+ * (webproperties.listManagementWebproperties)
3569
+ *
3570
+ * @param string $accountId Account ID to retrieve web properties for. Can
3571
+ * either be a specific account ID or '~all', which refers to all the accounts
3572
+ * that user has access to.
3573
+ * @param array $optParams Optional parameters.
3574
+ *
3575
+ * @opt_param int max-results The maximum number of web properties to include in
3576
+ * this response.
3577
+ * @opt_param int start-index An index of the first entity to retrieve. Use this
3578
+ * parameter as a pagination mechanism along with the max-results parameter.
3579
+ * @return Google_Service_Analytics_Webproperties
3580
+ */
3581
+ public function listManagementWebproperties($accountId, $optParams = array())
3582
+ {
3583
+ $params = array('accountId' => $accountId);
3584
+ $params = array_merge($params, $optParams);
3585
+ return $this->call('list', array($params), "Google_Service_Analytics_Webproperties");
3586
+ }
3587
+
3588
+ /**
3589
+ * Updates an existing web property. This method supports patch semantics.
3590
+ * (webproperties.patch)
3591
+ *
3592
+ * @param string $accountId Account ID to which the web property belongs
3593
+ * @param string $webPropertyId Web property ID
3594
+ * @param Google_Webproperty $postBody
3595
+ * @param array $optParams Optional parameters.
3596
+ * @return Google_Service_Analytics_Webproperty
3597
+ */
3598
+ public function patch($accountId, $webPropertyId, Google_Service_Analytics_Webproperty $postBody, $optParams = array())
3599
+ {
3600
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody);
3601
+ $params = array_merge($params, $optParams);
3602
+ return $this->call('patch', array($params), "Google_Service_Analytics_Webproperty");
3603
+ }
3604
+
3605
+ /**
3606
+ * Updates an existing web property. (webproperties.update)
3607
+ *
3608
+ * @param string $accountId Account ID to which the web property belongs
3609
+ * @param string $webPropertyId Web property ID
3610
+ * @param Google_Webproperty $postBody
3611
+ * @param array $optParams Optional parameters.
3612
+ * @return Google_Service_Analytics_Webproperty
3613
+ */
3614
+ public function update($accountId, $webPropertyId, Google_Service_Analytics_Webproperty $postBody, $optParams = array())
3615
+ {
3616
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody);
3617
+ $params = array_merge($params, $optParams);
3618
+ return $this->call('update', array($params), "Google_Service_Analytics_Webproperty");
3619
+ }
3620
+ }
3621
+ /**
3622
+ * The "webpropertyUserLinks" collection of methods.
3623
+ * Typical usage is:
3624
+ * <code>
3625
+ * $analyticsService = new Google_Service_Analytics(...);
3626
+ * $webpropertyUserLinks = $analyticsService->webpropertyUserLinks;
3627
+ * </code>
3628
+ */
3629
+ class Google_Service_Analytics_ManagementWebpropertyUserLinks_Resource extends Google_Service_Resource
3630
+ {
3631
+
3632
+ /**
3633
+ * Removes a user from the given web property. (webpropertyUserLinks.delete)
3634
+ *
3635
+ * @param string $accountId Account ID to delete the user link for.
3636
+ * @param string $webPropertyId Web Property ID to delete the user link for.
3637
+ * @param string $linkId Link ID to delete the user link for.
3638
+ * @param array $optParams Optional parameters.
3639
+ */
3640
+ public function delete($accountId, $webPropertyId, $linkId, $optParams = array())
3641
+ {
3642
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'linkId' => $linkId);
3643
+ $params = array_merge($params, $optParams);
3644
+ return $this->call('delete', array($params));
3645
+ }
3646
+
3647
+ /**
3648
+ * Adds a new user to the given web property. (webpropertyUserLinks.insert)
3649
+ *
3650
+ * @param string $accountId Account ID to create the user link for.
3651
+ * @param string $webPropertyId Web Property ID to create the user link for.
3652
+ * @param Google_EntityUserLink $postBody
3653
+ * @param array $optParams Optional parameters.
3654
+ * @return Google_Service_Analytics_EntityUserLink
3655
+ */
3656
+ public function insert($accountId, $webPropertyId, Google_Service_Analytics_EntityUserLink $postBody, $optParams = array())
3657
+ {
3658
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody);
3659
+ $params = array_merge($params, $optParams);
3660
+ return $this->call('insert', array($params), "Google_Service_Analytics_EntityUserLink");
3661
+ }
3662
+
3663
+ /**
3664
+ * Lists webProperty-user links for a given web property.
3665
+ * (webpropertyUserLinks.listManagementWebpropertyUserLinks)
3666
+ *
3667
+ * @param string $accountId Account ID which the given web property belongs to.
3668
+ * @param string $webPropertyId Web Property ID for the webProperty-user links
3669
+ * to retrieve. Can either be a specific web property ID or '~all', which refers
3670
+ * to all the web properties that user has access to.
3671
+ * @param array $optParams Optional parameters.
3672
+ *
3673
+ * @opt_param int max-results The maximum number of webProperty-user Links to
3674
+ * include in this response.
3675
+ * @opt_param int start-index An index of the first webProperty-user link to
3676
+ * retrieve. Use this parameter as a pagination mechanism along with the max-
3677
+ * results parameter.
3678
+ * @return Google_Service_Analytics_EntityUserLinks
3679
+ */
3680
+ public function listManagementWebpropertyUserLinks($accountId, $webPropertyId, $optParams = array())
3681
+ {
3682
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId);
3683
+ $params = array_merge($params, $optParams);
3684
+ return $this->call('list', array($params), "Google_Service_Analytics_EntityUserLinks");
3685
+ }
3686
+
3687
+ /**
3688
+ * Updates permissions for an existing user on the given web property.
3689
+ * (webpropertyUserLinks.update)
3690
+ *
3691
+ * @param string $accountId Account ID to update the account-user link for.
3692
+ * @param string $webPropertyId Web property ID to update the account-user link
3693
+ * for.
3694
+ * @param string $linkId Link ID to update the account-user link for.
3695
+ * @param Google_EntityUserLink $postBody
3696
+ * @param array $optParams Optional parameters.
3697
+ * @return Google_Service_Analytics_EntityUserLink
3698
+ */
3699
+ public function update($accountId, $webPropertyId, $linkId, Google_Service_Analytics_EntityUserLink $postBody, $optParams = array())
3700
+ {
3701
+ $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'linkId' => $linkId, 'postBody' => $postBody);
3702
+ $params = array_merge($params, $optParams);
3703
+ return $this->call('update', array($params), "Google_Service_Analytics_EntityUserLink");
3704
+ }
3705
+ }
3706
+
3707
+ /**
3708
+ * The "metadata" collection of methods.
3709
+ * Typical usage is:
3710
+ * <code>
3711
+ * $analyticsService = new Google_Service_Analytics(...);
3712
+ * $metadata = $analyticsService->metadata;
3713
+ * </code>
3714
+ */
3715
+ class Google_Service_Analytics_Metadata_Resource extends Google_Service_Resource
3716
+ {
3717
+ }
3718
+
3719
+ /**
3720
+ * The "columns" collection of methods.
3721
+ * Typical usage is:
3722
+ * <code>
3723
+ * $analyticsService = new Google_Service_Analytics(...);
3724
+ * $columns = $analyticsService->columns;
3725
+ * </code>
3726
+ */
3727
+ class Google_Service_Analytics_MetadataColumns_Resource extends Google_Service_Resource
3728
+ {
3729
+
3730
+ /**
3731
+ * Lists all columns for a report type (columns.listMetadataColumns)
3732
+ *
3733
+ * @param string $reportType Report type. Allowed Values: 'ga'. Where 'ga'
3734
+ * corresponds to the Core Reporting API
3735
+ * @param array $optParams Optional parameters.
3736
+ * @return Google_Service_Analytics_Columns
3737
+ */
3738
+ public function listMetadataColumns($reportType, $optParams = array())
3739
+ {
3740
+ $params = array('reportType' => $reportType);
3741
+ $params = array_merge($params, $optParams);
3742
+ return $this->call('list', array($params), "Google_Service_Analytics_Columns");
3743
+ }
3744
+ }
3745
+
3746
+ /**
3747
+ * The "provisioning" collection of methods.
3748
+ * Typical usage is:
3749
+ * <code>
3750
+ * $analyticsService = new Google_Service_Analytics(...);
3751
+ * $provisioning = $analyticsService->provisioning;
3752
+ * </code>
3753
+ */
3754
+ class Google_Service_Analytics_Provisioning_Resource extends Google_Service_Resource
3755
+ {
3756
+
3757
+ /**
3758
+ * Creates an account ticket. (provisioning.createAccountTicket)
3759
+ *
3760
+ * @param Google_AccountTicket $postBody
3761
+ * @param array $optParams Optional parameters.
3762
+ * @return Google_Service_Analytics_AccountTicket
3763
+ */
3764
+ public function createAccountTicket(Google_Service_Analytics_AccountTicket $postBody, $optParams = array())
3765
+ {
3766
+ $params = array('postBody' => $postBody);
3767
+ $params = array_merge($params, $optParams);
3768
+ return $this->call('createAccountTicket', array($params), "Google_Service_Analytics_AccountTicket");
3769
+ }
3770
+ }
3771
+
3772
+
3773
+
3774
+
3775
+ class Google_Service_Analytics_Account extends Google_Model
3776
+ {
3777
+ protected $internal_gapi_mappings = array(
3778
+ );
3779
+ protected $childLinkType = 'Google_Service_Analytics_AccountChildLink';
3780
+ protected $childLinkDataType = '';
3781
+ public $created;
3782
+ public $id;
3783
+ public $kind;
3784
+ public $name;
3785
+ protected $permissionsType = 'Google_Service_Analytics_AccountPermissions';
3786
+ protected $permissionsDataType = '';
3787
+ public $selfLink;
3788
+ public $updated;
3789
+
3790
+
3791
+ public function setChildLink(Google_Service_Analytics_AccountChildLink $childLink)
3792
+ {
3793
+ $this->childLink = $childLink;
3794
+ }
3795
+ public function getChildLink()
3796
+ {
3797
+ return $this->childLink;
3798
+ }
3799
+ public function setCreated($created)
3800
+ {
3801
+ $this->created = $created;
3802
+ }
3803
+ public function getCreated()
3804
+ {
3805
+ return $this->created;
3806
+ }
3807
+ public function setId($id)
3808
+ {
3809
+ $this->id = $id;
3810
+ }
3811
+ public function getId()
3812
+ {
3813
+ return $this->id;
3814
+ }
3815
+ public function setKind($kind)
3816
+ {
3817
+ $this->kind = $kind;
3818
+ }
3819
+ public function getKind()
3820
+ {
3821
+ return $this->kind;
3822
+ }
3823
+ public function setName($name)
3824
+ {
3825
+ $this->name = $name;
3826
+ }
3827
+ public function getName()
3828
+ {
3829
+ return $this->name;
3830
+ }
3831
+ public function setPermissions(Google_Service_Analytics_AccountPermissions $permissions)
3832
+ {
3833
+ $this->permissions = $permissions;
3834
+ }
3835
+ public function getPermissions()
3836
+ {
3837
+ return $this->permissions;
3838
+ }
3839
+ public function setSelfLink($selfLink)
3840
+ {
3841
+ $this->selfLink = $selfLink;
3842
+ }
3843
+ public function getSelfLink()
3844
+ {
3845
+ return $this->selfLink;
3846
+ }
3847
+ public function setUpdated($updated)
3848
+ {
3849
+ $this->updated = $updated;
3850
+ }
3851
+ public function getUpdated()
3852
+ {
3853
+ return $this->updated;
3854
+ }
3855
+ }
3856
+
3857
+ class Google_Service_Analytics_AccountChildLink extends Google_Model
3858
+ {
3859
+ protected $internal_gapi_mappings = array(
3860
+ );
3861
+ public $href;
3862
+ public $type;
3863
+
3864
+
3865
+ public function setHref($href)
3866
+ {
3867
+ $this->href = $href;
3868
+ }
3869
+ public function getHref()
3870
+ {
3871
+ return $this->href;
3872
+ }
3873
+ public function setType($type)
3874
+ {
3875
+ $this->type = $type;
3876
+ }
3877
+ public function getType()
3878
+ {
3879
+ return $this->type;
3880
+ }
3881
+ }
3882
+
3883
+ class Google_Service_Analytics_AccountPermissions extends Google_Collection
3884
+ {
3885
+ protected $collection_key = 'effective';
3886
+ protected $internal_gapi_mappings = array(
3887
+ );
3888
+ public $effective;
3889
+
3890
+
3891
+ public function setEffective($effective)
3892
+ {
3893
+ $this->effective = $effective;
3894
+ }
3895
+ public function getEffective()
3896
+ {
3897
+ return $this->effective;
3898
+ }
3899
+ }
3900
+
3901
+ class Google_Service_Analytics_AccountRef extends Google_Model
3902
+ {
3903
+ protected $internal_gapi_mappings = array(
3904
+ );
3905
+ public $href;
3906
+ public $id;
3907
+ public $kind;
3908
+ public $name;
3909
+
3910
+
3911
+ public function setHref($href)
3912
+ {
3913
+ $this->href = $href;
3914
+ }
3915
+ public function getHref()
3916
+ {
3917
+ return $this->href;
3918
+ }
3919
+ public function setId($id)
3920
+ {
3921
+ $this->id = $id;
3922
+ }
3923
+ public function getId()
3924
+ {
3925
+ return $this->id;
3926
+ }
3927
+ public function setKind($kind)
3928
+ {
3929
+ $this->kind = $kind;
3930
+ }
3931
+ public function getKind()
3932
+ {
3933
+ return $this->kind;
3934
+ }
3935
+ public function setName($name)
3936
+ {
3937
+ $this->name = $name;
3938
+ }
3939
+ public function getName()
3940
+ {
3941
+ return $this->name;
3942
+ }
3943
+ }
3944
+
3945
+ class Google_Service_Analytics_AccountSummaries extends Google_Collection
3946
+ {
3947
+ protected $collection_key = 'items';
3948
+ protected $internal_gapi_mappings = array(
3949
+ );
3950
+ protected $itemsType = 'Google_Service_Analytics_AccountSummary';
3951
+ protected $itemsDataType = 'array';
3952
+ public $itemsPerPage;
3953
+ public $kind;
3954
+ public $nextLink;
3955
+ public $previousLink;
3956
+ public $startIndex;
3957
+ public $totalResults;
3958
+ public $username;
3959
+
3960
+
3961
+ public function setItems($items)
3962
+ {
3963
+ $this->items = $items;
3964
+ }
3965
+ public function getItems()
3966
+ {
3967
+ return $this->items;
3968
+ }
3969
+ public function setItemsPerPage($itemsPerPage)
3970
+ {
3971
+ $this->itemsPerPage = $itemsPerPage;
3972
+ }
3973
+ public function getItemsPerPage()
3974
+ {
3975
+ return $this->itemsPerPage;
3976
+ }
3977
+ public function setKind($kind)
3978
+ {
3979
+ $this->kind = $kind;
3980
+ }
3981
+ public function getKind()
3982
+ {
3983
+ return $this->kind;
3984
+ }
3985
+ public function setNextLink($nextLink)
3986
+ {
3987
+ $this->nextLink = $nextLink;
3988
+ }
3989
+ public function getNextLink()
3990
+ {
3991
+ return $this->nextLink;
3992
+ }
3993
+ public function setPreviousLink($previousLink)
3994
+ {
3995
+ $this->previousLink = $previousLink;
3996
+ }
3997
+ public function getPreviousLink()
3998
+ {
3999
+ return $this->previousLink;
4000
+ }
4001
+ public function setStartIndex($startIndex)
4002
+ {
4003
+ $this->startIndex = $startIndex;
4004
+ }
4005
+ public function getStartIndex()
4006
+ {
4007
+ return $this->startIndex;
4008
+ }
4009
+ public function setTotalResults($totalResults)
4010
+ {
4011
+ $this->totalResults = $totalResults;
4012
+ }
4013
+ public function getTotalResults()
4014
+ {
4015
+ return $this->totalResults;
4016
+ }
4017
+ public function setUsername($username)
4018
+ {
4019
+ $this->username = $username;
4020
+ }
4021
+ public function getUsername()
4022
+ {
4023
+ return $this->username;
4024
+ }
4025
+ }
4026
+
4027
+ class Google_Service_Analytics_AccountSummary extends Google_Collection
4028
+ {
4029
+ protected $collection_key = 'webProperties';
4030
+ protected $internal_gapi_mappings = array(
4031
+ );
4032
+ public $id;
4033
+ public $kind;
4034
+ public $name;
4035
+ protected $webPropertiesType = 'Google_Service_Analytics_WebPropertySummary';
4036
+ protected $webPropertiesDataType = 'array';
4037
+
4038
+
4039
+ public function setId($id)
4040
+ {
4041
+ $this->id = $id;
4042
+ }
4043
+ public function getId()
4044
+ {
4045
+ return $this->id;
4046
+ }
4047
+ public function setKind($kind)
4048
+ {
4049
+ $this->kind = $kind;
4050
+ }
4051
+ public function getKind()
4052
+ {
4053
+ return $this->kind;
4054
+ }
4055
+ public function setName($name)
4056
+ {
4057
+ $this->name = $name;
4058
+ }
4059
+ public function getName()
4060
+ {
4061
+ return $this->name;
4062
+ }
4063
+ public function setWebProperties($webProperties)
4064
+ {
4065
+ $this->webProperties = $webProperties;
4066
+ }
4067
+ public function getWebProperties()
4068
+ {
4069
+ return $this->webProperties;
4070
+ }
4071
+ }
4072
+
4073
+ class Google_Service_Analytics_AccountTicket extends Google_Model
4074
+ {
4075
+ protected $internal_gapi_mappings = array(
4076
+ );
4077
+ protected $accountType = 'Google_Service_Analytics_Account';
4078
+ protected $accountDataType = '';
4079
+ public $id;
4080
+ public $kind;
4081
+ protected $profileType = 'Google_Service_Analytics_Profile';
4082
+ protected $profileDataType = '';
4083
+ public $redirectUri;
4084
+ protected $webpropertyType = 'Google_Service_Analytics_Webproperty';
4085
+ protected $webpropertyDataType = '';
4086
+
4087
+
4088
+ public function setAccount(Google_Service_Analytics_Account $account)
4089
+ {
4090
+ $this->account = $account;
4091
+ }
4092
+ public function getAccount()
4093
+ {
4094
+ return $this->account;
4095
+ }
4096
+ public function setId($id)
4097
+ {
4098
+ $this->id = $id;
4099
+ }
4100
+ public function getId()
4101
+ {
4102
+ return $this->id;
4103
+ }
4104
+ public function setKind($kind)
4105
+ {
4106
+ $this->kind = $kind;
4107
+ }
4108
+ public function getKind()
4109
+ {
4110
+ return $this->kind;
4111
+ }
4112
+ public function setProfile(Google_Service_Analytics_Profile $profile)
4113
+ {
4114
+ $this->profile = $profile;
4115
+ }
4116
+ public function getProfile()
4117
+ {
4118
+ return $this->profile;
4119
+ }
4120
+ public function setRedirectUri($redirectUri)
4121
+ {
4122
+ $this->redirectUri = $redirectUri;
4123
+ }
4124
+ public function getRedirectUri()
4125
+ {
4126
+ return $this->redirectUri;
4127
+ }
4128
+ public function setWebproperty(Google_Service_Analytics_Webproperty $webproperty)
4129
+ {
4130
+ $this->webproperty = $webproperty;
4131
+ }
4132
+ public function getWebproperty()
4133
+ {
4134
+ return $this->webproperty;
4135
+ }
4136
+ }
4137
+
4138
+ class Google_Service_Analytics_Accounts extends Google_Collection
4139
+ {
4140
+ protected $collection_key = 'items';
4141
+ protected $internal_gapi_mappings = array(
4142
+ );
4143
+ protected $itemsType = 'Google_Service_Analytics_Account';
4144
+ protected $itemsDataType = 'array';
4145
+ public $itemsPerPage;
4146
+ public $kind;
4147
+ public $nextLink;
4148
+ public $previousLink;
4149
+ public $startIndex;
4150
+ public $totalResults;
4151
+ public $username;
4152
+
4153
+
4154
+ public function setItems($items)
4155
+ {
4156
+ $this->items = $items;
4157
+ }
4158
+ public function getItems()
4159
+ {
4160
+ return $this->items;
4161
+ }
4162
+ public function setItemsPerPage($itemsPerPage)
4163
+ {
4164
+ $this->itemsPerPage = $itemsPerPage;
4165
+ }
4166
+ public function getItemsPerPage()
4167
+ {
4168
+ return $this->itemsPerPage;
4169
+ }
4170
+ public function setKind($kind)
4171
+ {
4172
+ $this->kind = $kind;
4173
+ }
4174
+ public function getKind()
4175
+ {
4176
+ return $this->kind;
4177
+ }
4178
+ public function setNextLink($nextLink)
4179
+ {
4180
+ $this->nextLink = $nextLink;
4181
+ }
4182
+ public function getNextLink()
4183
+ {
4184
+ return $this->nextLink;
4185
+ }
4186
+ public function setPreviousLink($previousLink)
4187
+ {
4188
+ $this->previousLink = $previousLink;
4189
+ }
4190
+ public function getPreviousLink()
4191
+ {
4192
+ return $this->previousLink;
4193
+ }
4194
+ public function setStartIndex($startIndex)
4195
+ {
4196
+ $this->startIndex = $startIndex;
4197
+ }
4198
+ public function getStartIndex()
4199
+ {
4200
+ return $this->startIndex;
4201
+ }
4202
+ public function setTotalResults($totalResults)
4203
+ {
4204
+ $this->totalResults = $totalResults;
4205
+ }
4206
+ public function getTotalResults()
4207
+ {
4208
+ return $this->totalResults;
4209
+ }
4210
+ public function setUsername($username)
4211
+ {
4212
+ $this->username = $username;
4213
+ }
4214
+ public function getUsername()
4215
+ {
4216
+ return $this->username;
4217
+ }
4218
+ }
4219
+
4220
+ class Google_Service_Analytics_AdWordsAccount extends Google_Model
4221
+ {
4222
+ protected $internal_gapi_mappings = array(
4223
+ );
4224
+ public $autoTaggingEnabled;
4225
+ public $customerId;
4226
+ public $kind;
4227
+
4228
+
4229
+ public function setAutoTaggingEnabled($autoTaggingEnabled)
4230
+ {
4231
+ $this->autoTaggingEnabled = $autoTaggingEnabled;
4232
+ }
4233
+ public function getAutoTaggingEnabled()
4234
+ {
4235
+ return $this->autoTaggingEnabled;
4236
+ }
4237
+ public function setCustomerId($customerId)
4238
+ {
4239
+ $this->customerId = $customerId;
4240
+ }
4241
+ public function getCustomerId()
4242
+ {
4243
+ return $this->customerId;
4244
+ }
4245
+ public function setKind($kind)
4246
+ {
4247
+ $this->kind = $kind;
4248
+ }
4249
+ public function getKind()
4250
+ {
4251
+ return $this->kind;
4252
+ }
4253
+ }
4254
+
4255
+ class Google_Service_Analytics_AnalyticsDataimportDeleteUploadDataRequest extends Google_Collection
4256
+ {
4257
+ protected $collection_key = 'customDataImportUids';
4258
+ protected $internal_gapi_mappings = array(
4259
+ );
4260
+ public $customDataImportUids;
4261
+
4262
+
4263
+ public function setCustomDataImportUids($customDataImportUids)
4264
+ {
4265
+ $this->customDataImportUids = $customDataImportUids;
4266
+ }
4267
+ public function getCustomDataImportUids()
4268
+ {
4269
+ return $this->customDataImportUids;
4270
+ }
4271
+ }
4272
+
4273
+ class Google_Service_Analytics_Column extends Google_Model
4274
+ {
4275
+ protected $internal_gapi_mappings = array(
4276
+ );
4277
+ public $attributes;
4278
+ public $id;
4279
+ public $kind;
4280
+
4281
+
4282
+ public function setAttributes($attributes)
4283
+ {
4284
+ $this->attributes = $attributes;
4285
+ }
4286
+ public function getAttributes()
4287
+ {
4288
+ return $this->attributes;
4289
+ }
4290
+ public function setId($id)
4291
+ {
4292
+ $this->id = $id;
4293
+ }
4294
+ public function getId()
4295
+ {
4296
+ return $this->id;
4297
+ }
4298
+ public function setKind($kind)
4299
+ {
4300
+ $this->kind = $kind;
4301
+ }
4302
+ public function getKind()
4303
+ {
4304
+ return $this->kind;
4305
+ }
4306
+ }
4307
+
4308
+ class Google_Service_Analytics_ColumnAttributes extends Google_Model
4309
+ {
4310
+ }
4311
+
4312
+ class Google_Service_Analytics_Columns extends Google_Collection
4313
+ {
4314
+ protected $collection_key = 'items';
4315
+ protected $internal_gapi_mappings = array(
4316
+ );
4317
+ public $attributeNames;
4318
+ public $etag;
4319
+ protected $itemsType = 'Google_Service_Analytics_Column';
4320
+ protected $itemsDataType = 'array';
4321
+ public $kind;
4322
+ public $totalResults;
4323
+
4324
+
4325
+ public function setAttributeNames($attributeNames)
4326
+ {
4327
+ $this->attributeNames = $attributeNames;
4328
+ }
4329
+ public function getAttributeNames()
4330
+ {
4331
+ return $this->attributeNames;
4332
+ }
4333
+ public function setEtag($etag)
4334
+ {
4335
+ $this->etag = $etag;
4336
+ }
4337
+ public function getEtag()
4338
+ {
4339
+ return $this->etag;
4340
+ }
4341
+ public function setItems($items)
4342
+ {
4343
+ $this->items = $items;
4344
+ }
4345
+ public function getItems()
4346
+ {
4347
+ return $this->items;
4348
+ }
4349
+ public function setKind($kind)
4350
+ {
4351
+ $this->kind = $kind;
4352
+ }
4353
+ public function getKind()
4354
+ {
4355
+ return $this->kind;
4356
+ }
4357
+ public function setTotalResults($totalResults)
4358
+ {
4359
+ $this->totalResults = $totalResults;
4360
+ }
4361
+ public function getTotalResults()
4362
+ {
4363
+ return $this->totalResults;
4364
+ }
4365
+ }
4366
+
4367
+ class Google_Service_Analytics_CustomDataSource extends Google_Collection
4368
+ {
4369
+ protected $collection_key = 'profilesLinked';
4370
+ protected $internal_gapi_mappings = array(
4371
+ );
4372
+ public $accountId;
4373
+ protected $childLinkType = 'Google_Service_Analytics_CustomDataSourceChildLink';
4374
+ protected $childLinkDataType = '';
4375
+ public $created;
4376
+ public $description;
4377
+ public $id;
4378
+ public $importBehavior;
4379
+ public $kind;
4380
+ public $name;
4381
+ protected $parentLinkType = 'Google_Service_Analytics_CustomDataSourceParentLink';
4382
+ protected $parentLinkDataType = '';
4383
+ public $profilesLinked;
4384
+ public $selfLink;
4385
+ public $type;
4386
+ public $updated;
4387
+ public $uploadType;
4388
+ public $webPropertyId;
4389
+
4390
+
4391
+ public function setAccountId($accountId)
4392
+ {
4393
+ $this->accountId = $accountId;
4394
+ }
4395
+ public function getAccountId()
4396
+ {
4397
+ return $this->accountId;
4398
+ }
4399
+ public function setChildLink(Google_Service_Analytics_CustomDataSourceChildLink $childLink)
4400
+ {
4401
+ $this->childLink = $childLink;
4402
+ }
4403
+ public function getChildLink()
4404
+ {
4405
+ return $this->childLink;
4406
+ }
4407
+ public function setCreated($created)
4408
+ {
4409
+ $this->created = $created;
4410
+ }
4411
+ public function getCreated()
4412
+ {
4413
+ return $this->created;
4414
+ }
4415
+ public function setDescription($description)
4416
+ {
4417
+ $this->description = $description;
4418
+ }
4419
+ public function getDescription()
4420
+ {
4421
+ return $this->description;
4422
+ }
4423
+ public function setId($id)
4424
+ {
4425
+ $this->id = $id;
4426
+ }
4427
+ public function getId()
4428
+ {
4429
+ return $this->id;
4430
+ }
4431
+ public function setImportBehavior($importBehavior)
4432
+ {
4433
+ $this->importBehavior = $importBehavior;
4434
+ }
4435
+ public function getImportBehavior()
4436
+ {
4437
+ return $this->importBehavior;
4438
+ }
4439
+ public function setKind($kind)
4440
+ {
4441
+ $this->kind = $kind;
4442
+ }
4443
+ public function getKind()
4444
+ {
4445
+ return $this->kind;
4446
+ }
4447
+ public function setName($name)
4448
+ {
4449
+ $this->name = $name;
4450
+ }
4451
+ public function getName()
4452
+ {
4453
+ return $this->name;
4454
+ }
4455
+ public function setParentLink(Google_Service_Analytics_CustomDataSourceParentLink $parentLink)
4456
+ {
4457
+ $this->parentLink = $parentLink;
4458
+ }
4459
+ public function getParentLink()
4460
+ {
4461
+ return $this->parentLink;
4462
+ }
4463
+ public function setProfilesLinked($profilesLinked)
4464
+ {
4465
+ $this->profilesLinked = $profilesLinked;
4466
+ }
4467
+ public function getProfilesLinked()
4468
+ {
4469
+ return $this->profilesLinked;
4470
+ }
4471
+ public function setSelfLink($selfLink)
4472
+ {
4473
+ $this->selfLink = $selfLink;
4474
+ }
4475
+ public function getSelfLink()
4476
+ {
4477
+ return $this->selfLink;
4478
+ }
4479
+ public function setType($type)
4480
+ {
4481
+ $this->type = $type;
4482
+ }
4483
+ public function getType()
4484
+ {
4485
+ return $this->type;
4486
+ }
4487
+ public function setUpdated($updated)
4488
+ {
4489
+ $this->updated = $updated;
4490
+ }
4491
+ public function getUpdated()
4492
+ {
4493
+ return $this->updated;
4494
+ }
4495
+ public function setUploadType($uploadType)
4496
+ {
4497
+ $this->uploadType = $uploadType;
4498
+ }
4499
+ public function getUploadType()
4500
+ {
4501
+ return $this->uploadType;
4502
+ }
4503
+ public function setWebPropertyId($webPropertyId)
4504
+ {
4505
+ $this->webPropertyId = $webPropertyId;
4506
+ }
4507
+ public function getWebPropertyId()
4508
+ {
4509
+ return $this->webPropertyId;
4510
+ }
4511
+ }
4512
+
4513
+ class Google_Service_Analytics_CustomDataSourceChildLink extends Google_Model
4514
+ {
4515
+ protected $internal_gapi_mappings = array(
4516
+ );
4517
+ public $href;
4518
+ public $type;
4519
+
4520
+
4521
+ public function setHref($href)
4522
+ {
4523
+ $this->href = $href;
4524
+ }
4525
+ public function getHref()
4526
+ {
4527
+ return $this->href;
4528
+ }
4529
+ public function setType($type)
4530
+ {
4531
+ $this->type = $type;
4532
+ }
4533
+ public function getType()
4534
+ {
4535
+ return $this->type;
4536
+ }
4537
+ }
4538
+
4539
+ class Google_Service_Analytics_CustomDataSourceParentLink extends Google_Model
4540
+ {
4541
+ protected $internal_gapi_mappings = array(
4542
+ );
4543
+ public $href;
4544
+ public $type;
4545
+
4546
+
4547
+ public function setHref($href)
4548
+ {
4549
+ $this->href = $href;
4550
+ }
4551
+ public function getHref()
4552
+ {
4553
+ return $this->href;
4554
+ }
4555
+ public function setType($type)
4556
+ {
4557
+ $this->type = $type;
4558
+ }
4559
+ public function getType()
4560
+ {
4561
+ return $this->type;
4562
+ }
4563
+ }
4564
+
4565
+ class Google_Service_Analytics_CustomDataSources extends Google_Collection
4566
+ {
4567
+ protected $collection_key = 'items';
4568
+ protected $internal_gapi_mappings = array(
4569
+ );
4570
+ protected $itemsType = 'Google_Service_Analytics_CustomDataSource';
4571
+ protected $itemsDataType = 'array';
4572
+ public $itemsPerPage;
4573
+ public $kind;
4574
+ public $nextLink;
4575
+ public $previousLink;
4576
+ public $startIndex;
4577
+ public $totalResults;
4578
+ public $username;
4579
+
4580
+
4581
+ public function setItems($items)
4582
+ {
4583
+ $this->items = $items;
4584
+ }
4585
+ public function getItems()
4586
+ {
4587
+ return $this->items;
4588
+ }
4589
+ public function setItemsPerPage($itemsPerPage)
4590
+ {
4591
+ $this->itemsPerPage = $itemsPerPage;
4592
+ }
4593
+ public function getItemsPerPage()
4594
+ {
4595
+ return $this->itemsPerPage;
4596
+ }
4597
+ public function setKind($kind)
4598
+ {
4599
+ $this->kind = $kind;
4600
+ }
4601
+ public function getKind()
4602
+ {
4603
+ return $this->kind;
4604
+ }
4605
+ public function setNextLink($nextLink)
4606
+ {
4607
+ $this->nextLink = $nextLink;
4608
+ }
4609
+ public function getNextLink()
4610
+ {
4611
+ return $this->nextLink;
4612
+ }
4613
+ public function setPreviousLink($previousLink)
4614
+ {
4615
+ $this->previousLink = $previousLink;
4616
+ }
4617
+ public function getPreviousLink()
4618
+ {
4619
+ return $this->previousLink;
4620
+ }
4621
+ public function setStartIndex($startIndex)
4622
+ {
4623
+ $this->startIndex = $startIndex;
4624
+ }
4625
+ public function getStartIndex()
4626
+ {
4627
+ return $this->startIndex;
4628
+ }
4629
+ public function setTotalResults($totalResults)
4630
+ {
4631
+ $this->totalResults = $totalResults;
4632
+ }
4633
+ public function getTotalResults()
4634
+ {
4635
+ return $this->totalResults;
4636
+ }
4637
+ public function setUsername($username)
4638
+ {
4639
+ $this->username = $username;
4640
+ }
4641
+ public function getUsername()
4642
+ {
4643
+ return $this->username;
4644
+ }
4645
+ }
4646
+
4647
+ class Google_Service_Analytics_CustomDimension extends Google_Model
4648
+ {
4649
+ protected $internal_gapi_mappings = array(
4650
+ );
4651
+ public $accountId;
4652
+ public $active;
4653
+ public $created;
4654
+ public $id;
4655
+ public $index;
4656
+ public $kind;
4657
+ public $name;
4658
+ protected $parentLinkType = 'Google_Service_Analytics_CustomDimensionParentLink';
4659
+ protected $parentLinkDataType = '';
4660
+ public $scope;
4661
+ public $selfLink;
4662
+ public $updated;
4663
+ public $webPropertyId;
4664
+
4665
+
4666
+ public function setAccountId($accountId)
4667
+ {
4668
+ $this->accountId = $accountId;
4669
+ }
4670
+ public function getAccountId()
4671
+ {
4672
+ return $this->accountId;
4673
+ }
4674
+ public function setActive($active)
4675
+ {
4676
+ $this->active = $active;
4677
+ }
4678
+ public function getActive()
4679
+ {
4680
+ return $this->active;
4681
+ }
4682
+ public function setCreated($created)
4683
+ {
4684
+ $this->created = $created;
4685
+ }
4686
+ public function getCreated()
4687
+ {
4688
+ return $this->created;
4689
+ }
4690
+ public function setId($id)
4691
+ {
4692
+ $this->id = $id;
4693
+ }
4694
+ public function getId()
4695
+ {
4696
+ return $this->id;
4697
+ }
4698
+ public function setIndex($index)
4699
+ {
4700
+ $this->index = $index;
4701
+ }
4702
+ public function getIndex()
4703
+ {
4704
+ return $this->index;
4705
+ }
4706
+ public function setKind($kind)
4707
+ {
4708
+ $this->kind = $kind;
4709
+ }
4710
+ public function getKind()
4711
+ {
4712
+ return $this->kind;
4713
+ }
4714
+ public function setName($name)
4715
+ {
4716
+ $this->name = $name;
4717
+ }
4718
+ public function getName()
4719
+ {
4720
+ return $this->name;
4721
+ }
4722
+ public function setParentLink(Google_Service_Analytics_CustomDimensionParentLink $parentLink)
4723
+ {
4724
+ $this->parentLink = $parentLink;
4725
+ }
4726
+ public function getParentLink()
4727
+ {
4728
+ return $this->parentLink;
4729
+ }
4730
+ public function setScope($scope)
4731
+ {
4732
+ $this->scope = $scope;
4733
+ }
4734
+ public function getScope()
4735
+ {
4736
+ return $this->scope;
4737
+ }
4738
+ public function setSelfLink($selfLink)
4739
+ {
4740
+ $this->selfLink = $selfLink;
4741
+ }
4742
+ public function getSelfLink()
4743
+ {
4744
+ return $this->selfLink;
4745
+ }
4746
+ public function setUpdated($updated)
4747
+ {
4748
+ $this->updated = $updated;
4749
+ }
4750
+ public function getUpdated()
4751
+ {
4752
+ return $this->updated;
4753
+ }
4754
+ public function setWebPropertyId($webPropertyId)
4755
+ {
4756
+ $this->webPropertyId = $webPropertyId;
4757
+ }
4758
+ public function getWebPropertyId()
4759
+ {
4760
+ return $this->webPropertyId;
4761
+ }
4762
+ }
4763
+
4764
+ class Google_Service_Analytics_CustomDimensionParentLink extends Google_Model
4765
+ {
4766
+ protected $internal_gapi_mappings = array(
4767
+ );
4768
+ public $href;
4769
+ public $type;
4770
+
4771
+
4772
+ public function setHref($href)
4773
+ {
4774
+ $this->href = $href;
4775
+ }
4776
+ public function getHref()
4777
+ {
4778
+ return $this->href;
4779
+ }
4780
+ public function setType($type)
4781
+ {
4782
+ $this->type = $type;
4783
+ }
4784
+ public function getType()
4785
+ {
4786
+ return $this->type;
4787
+ }
4788
+ }
4789
+
4790
+ class Google_Service_Analytics_CustomDimensions extends Google_Collection
4791
+ {
4792
+ protected $collection_key = 'items';
4793
+ protected $internal_gapi_mappings = array(
4794
+ );
4795
+ protected $itemsType = 'Google_Service_Analytics_CustomDimension';
4796
+ protected $itemsDataType = 'array';
4797
+ public $itemsPerPage;
4798
+ public $kind;
4799
+ public $nextLink;
4800
+ public $previousLink;
4801
+ public $startIndex;
4802
+ public $totalResults;
4803
+ public $username;
4804
+
4805
+
4806
+ public function setItems($items)
4807
+ {
4808
+ $this->items = $items;
4809
+ }
4810
+ public function getItems()
4811
+ {
4812
+ return $this->items;
4813
+ }
4814
+ public function setItemsPerPage($itemsPerPage)
4815
+ {
4816
+ $this->itemsPerPage = $itemsPerPage;
4817
+ }
4818
+ public function getItemsPerPage()
4819
+ {
4820
+ return $this->itemsPerPage;
4821
+ }
4822
+ public function setKind($kind)
4823
+ {
4824
+ $this->kind = $kind;
4825
+ }
4826
+ public function getKind()
4827
+ {
4828
+ return $this->kind;
4829
+ }
4830
+ public function setNextLink($nextLink)
4831
+ {
4832
+ $this->nextLink = $nextLink;
4833
+ }
4834
+ public function getNextLink()
4835
+ {
4836
+ return $this->nextLink;
4837
+ }
4838
+ public function setPreviousLink($previousLink)
4839
+ {
4840
+ $this->previousLink = $previousLink;
4841
+ }
4842
+ public function getPreviousLink()
4843
+ {
4844
+ return $this->previousLink;
4845
+ }
4846
+ public function setStartIndex($startIndex)
4847
+ {
4848
+ $this->startIndex = $startIndex;
4849
+ }
4850
+ public function getStartIndex()
4851
+ {
4852
+ return $this->startIndex;
4853
+ }
4854
+ public function setTotalResults($totalResults)
4855
+ {
4856
+ $this->totalResults = $totalResults;
4857
+ }
4858
+ public function getTotalResults()
4859
+ {
4860
+ return $this->totalResults;
4861
+ }
4862
+ public function setUsername($username)
4863
+ {
4864
+ $this->username = $username;
4865
+ }
4866
+ public function getUsername()
4867
+ {
4868
+ return $this->username;
4869
+ }
4870
+ }
4871
+
4872
+ class Google_Service_Analytics_CustomMetric extends Google_Model
4873
+ {
4874
+ protected $internal_gapi_mappings = array(
4875
+ "maxValue" => "max_value",
4876
+ "minValue" => "min_value",
4877
+ );
4878
+ public $accountId;
4879
+ public $active;
4880
+ public $created;
4881
+ public $id;
4882
+ public $index;
4883
+ public $kind;
4884
+ public $maxValue;
4885
+ public $minValue;
4886
+ public $name;
4887
+ protected $parentLinkType = 'Google_Service_Analytics_CustomMetricParentLink';
4888
+ protected $parentLinkDataType = '';
4889
+ public $scope;
4890
+ public $selfLink;
4891
+ public $type;
4892
+ public $updated;
4893
+ public $webPropertyId;
4894
+
4895
+
4896
+ public function setAccountId($accountId)
4897
+ {
4898
+ $this->accountId = $accountId;
4899
+ }
4900
+ public function getAccountId()
4901
+ {
4902
+ return $this->accountId;
4903
+ }
4904
+ public function setActive($active)
4905
+ {
4906
+ $this->active = $active;
4907
+ }
4908
+ public function getActive()
4909
+ {
4910
+ return $this->active;
4911
+ }
4912
+ public function setCreated($created)
4913
+ {
4914
+ $this->created = $created;
4915
+ }
4916
+ public function getCreated()
4917
+ {
4918
+ return $this->created;
4919
+ }
4920
+ public function setId($id)
4921
+ {
4922
+ $this->id = $id;
4923
+ }
4924
+ public function getId()
4925
+ {
4926
+ return $this->id;
4927
+ }
4928
+ public function setIndex($index)
4929
+ {
4930
+ $this->index = $index;
4931
+ }
4932
+ public function getIndex()
4933
+ {
4934
+ return $this->index;
4935
+ }
4936
+ public function setKind($kind)
4937
+ {
4938
+ $this->kind = $kind;
4939
+ }
4940
+ public function getKind()
4941
+ {
4942
+ return $this->kind;
4943
+ }
4944
+ public function setMaxValue($maxValue)
4945
+ {
4946
+ $this->maxValue = $maxValue;
4947
+ }
4948
+ public function getMaxValue()
4949
+ {
4950
+ return $this->maxValue;
4951
+ }
4952
+ public function setMinValue($minValue)
4953
+ {
4954
+ $this->minValue = $minValue;
4955
+ }
4956
+ public function getMinValue()
4957
+ {
4958
+ return $this->minValue;
4959
+ }
4960
+ public function setName($name)
4961
+ {
4962
+ $this->name = $name;
4963
+ }
4964
+ public function getName()
4965
+ {
4966
+ return $this->name;
4967
+ }
4968
+ public function setParentLink(Google_Service_Analytics_CustomMetricParentLink $parentLink)
4969
+ {
4970
+ $this->parentLink = $parentLink;
4971
+ }
4972
+ public function getParentLink()
4973
+ {
4974
+ return $this->parentLink;
4975
+ }
4976
+ public function setScope($scope)
4977
+ {
4978
+ $this->scope = $scope;
4979
+ }
4980
+ public function getScope()
4981
+ {
4982
+ return $this->scope;
4983
+ }
4984
+ public function setSelfLink($selfLink)
4985
+ {
4986
+ $this->selfLink = $selfLink;
4987
+ }
4988
+ public function getSelfLink()
4989
+ {
4990
+ return $this->selfLink;
4991
+ }
4992
+ public function setType($type)
4993
+ {
4994
+ $this->type = $type;
4995
+ }
4996
+ public function getType()
4997
+ {
4998
+ return $this->type;
4999
+ }
5000
+ public function setUpdated($updated)
5001
+ {
5002
+ $this->updated = $updated;
5003
+ }
5004
+ public function getUpdated()
5005
+ {
5006
+ return $this->updated;
5007
+ }
5008
+ public function setWebPropertyId($webPropertyId)
5009
+ {
5010
+ $this->webPropertyId = $webPropertyId;
5011
+ }
5012
+ public function getWebPropertyId()
5013
+ {
5014
+ return $this->webPropertyId;
5015
+ }
5016
+ }
5017
+
5018
+ class Google_Service_Analytics_CustomMetricParentLink extends Google_Model
5019
+ {
5020
+ protected $internal_gapi_mappings = array(
5021
+ );
5022
+ public $href;
5023
+ public $type;
5024
+
5025
+
5026
+ public function setHref($href)
5027
+ {
5028
+ $this->href = $href;
5029
+ }
5030
+ public function getHref()
5031
+ {
5032
+ return $this->href;
5033
+ }
5034
+ public function setType($type)
5035
+ {
5036
+ $this->type = $type;
5037
+ }
5038
+ public function getType()
5039
+ {
5040
+ return $this->type;
5041
+ }
5042
+ }
5043
+
5044
+ class Google_Service_Analytics_CustomMetrics extends Google_Collection
5045
+ {
5046
+ protected $collection_key = 'items';
5047
+ protected $internal_gapi_mappings = array(
5048
+ );
5049
+ protected $itemsType = 'Google_Service_Analytics_CustomMetric';
5050
+ protected $itemsDataType = 'array';
5051
+ public $itemsPerPage;
5052
+ public $kind;
5053
+ public $nextLink;
5054
+ public $previousLink;
5055
+ public $startIndex;
5056
+ public $totalResults;
5057
+ public $username;
5058
+
5059
+
5060
+ public function setItems($items)
5061
+ {
5062
+ $this->items = $items;
5063
+ }
5064
+ public function getItems()
5065
+ {
5066
+ return $this->items;
5067
+ }
5068
+ public function setItemsPerPage($itemsPerPage)
5069
+ {
5070
+ $this->itemsPerPage = $itemsPerPage;
5071
+ }
5072
+ public function getItemsPerPage()
5073
+ {
5074
+ return $this->itemsPerPage;
5075
+ }
5076
+ public function setKind($kind)
5077
+ {
5078
+ $this->kind = $kind;
5079
+ }
5080
+ public function getKind()
5081
+ {
5082
+ return $this->kind;
5083
+ }
5084
+ public function setNextLink($nextLink)
5085
+ {
5086
+ $this->nextLink = $nextLink;
5087
+ }
5088
+ public function getNextLink()
5089
+ {
5090
+ return $this->nextLink;
5091
+ }
5092
+ public function setPreviousLink($previousLink)
5093
+ {
5094
+ $this->previousLink = $previousLink;
5095
+ }
5096
+ public function getPreviousLink()
5097
+ {
5098
+ return $this->previousLink;
5099
+ }
5100
+ public function setStartIndex($startIndex)
5101
+ {
5102
+ $this->startIndex = $startIndex;
5103
+ }
5104
+ public function getStartIndex()
5105
+ {
5106
+ return $this->startIndex;
5107
+ }
5108
+ public function setTotalResults($totalResults)
5109
+ {
5110
+ $this->totalResults = $totalResults;
5111
+ }
5112
+ public function getTotalResults()
5113
+ {
5114
+ return $this->totalResults;
5115
+ }
5116
+ public function setUsername($username)
5117
+ {
5118
+ $this->username = $username;
5119
+ }
5120
+ public function getUsername()
5121
+ {
5122
+ return $this->username;
5123
+ }
5124
+ }
5125
+
5126
+ class Google_Service_Analytics_EntityAdWordsLink extends Google_Collection
5127
+ {
5128
+ protected $collection_key = 'profileIds';
5129
+ protected $internal_gapi_mappings = array(
5130
+ );
5131
+ protected $adWordsAccountsType = 'Google_Service_Analytics_AdWordsAccount';
5132
+ protected $adWordsAccountsDataType = 'array';
5133
+ protected $entityType = 'Google_Service_Analytics_EntityAdWordsLinkEntity';
5134
+ protected $entityDataType = '';
5135
+ public $id;
5136
+ public $kind;
5137
+ public $name;
5138
+ public $profileIds;
5139
+ public $selfLink;
5140
+
5141
+
5142
+ public function setAdWordsAccounts($adWordsAccounts)
5143
+ {
5144
+ $this->adWordsAccounts = $adWordsAccounts;
5145
+ }
5146
+ public function getAdWordsAccounts()
5147
+ {
5148
+ return $this->adWordsAccounts;
5149
+ }
5150
+ public function setEntity(Google_Service_Analytics_EntityAdWordsLinkEntity $entity)
5151
+ {
5152
+ $this->entity = $entity;
5153
+ }
5154
+ public function getEntity()
5155
+ {
5156
+ return $this->entity;
5157
+ }
5158
+ public function setId($id)
5159
+ {
5160
+ $this->id = $id;
5161
+ }
5162
+ public function getId()
5163
+ {
5164
+ return $this->id;
5165
+ }
5166
+ public function setKind($kind)
5167
+ {
5168
+ $this->kind = $kind;
5169
+ }
5170
+ public function getKind()
5171
+ {
5172
+ return $this->kind;
5173
+ }
5174
+ public function setName($name)
5175
+ {
5176
+ $this->name = $name;
5177
+ }
5178
+ public function getName()
5179
+ {
5180
+ return $this->name;
5181
+ }
5182
+ public function setProfileIds($profileIds)
5183
+ {
5184
+ $this->profileIds = $profileIds;
5185
+ }
5186
+ public function getProfileIds()
5187
+ {
5188
+ return $this->profileIds;
5189
+ }
5190
+ public function setSelfLink($selfLink)
5191
+ {
5192
+ $this->selfLink = $selfLink;
5193
+ }
5194
+ public function getSelfLink()
5195
+ {
5196
+ return $this->selfLink;
5197
+ }
5198
+ }
5199
+
5200
+ class Google_Service_Analytics_EntityAdWordsLinkEntity extends Google_Model
5201
+ {
5202
+ protected $internal_gapi_mappings = array(
5203
+ );
5204
+ protected $webPropertyRefType = 'Google_Service_Analytics_WebPropertyRef';
5205
+ protected $webPropertyRefDataType = '';
5206
+
5207
+
5208
+ public function setWebPropertyRef(Google_Service_Analytics_WebPropertyRef $webPropertyRef)
5209
+ {
5210
+ $this->webPropertyRef = $webPropertyRef;
5211
+ }
5212
+ public function getWebPropertyRef()
5213
+ {
5214
+ return $this->webPropertyRef;
5215
+ }
5216
+ }
5217
+
5218
+ class Google_Service_Analytics_EntityAdWordsLinks extends Google_Collection
5219
+ {
5220
+ protected $collection_key = 'items';
5221
+ protected $internal_gapi_mappings = array(
5222
+ );
5223
+ protected $itemsType = 'Google_Service_Analytics_EntityAdWordsLink';
5224
+ protected $itemsDataType = 'array';
5225
+ public $itemsPerPage;
5226
+ public $kind;
5227
+ public $nextLink;
5228
+ public $previousLink;
5229
+ public $startIndex;
5230
+ public $totalResults;
5231
+
5232
+
5233
+ public function setItems($items)
5234
+ {
5235
+ $this->items = $items;
5236
+ }
5237
+ public function getItems()
5238
+ {
5239
+ return $this->items;
5240
+ }
5241
+ public function setItemsPerPage($itemsPerPage)
5242
+ {
5243
+ $this->itemsPerPage = $itemsPerPage;
5244
+ }
5245
+ public function getItemsPerPage()
5246
+ {
5247
+ return $this->itemsPerPage;
5248
+ }
5249
+ public function setKind($kind)
5250
+ {
5251
+ $this->kind = $kind;
5252
+ }
5253
+ public function getKind()
5254
+ {
5255
+ return $this->kind;
5256
+ }
5257
+ public function setNextLink($nextLink)
5258
+ {
5259
+ $this->nextLink = $nextLink;
5260
+ }
5261
+ public function getNextLink()
5262
+ {
5263
+ return $this->nextLink;
5264
+ }
5265
+ public function setPreviousLink($previousLink)
5266
+ {
5267
+ $this->previousLink = $previousLink;
5268
+ }
5269
+ public function getPreviousLink()
5270
+ {
5271
+ return $this->previousLink;
5272
+ }
5273
+ public function setStartIndex($startIndex)
5274
+ {
5275
+ $this->startIndex = $startIndex;
5276
+ }
5277
+ public function getStartIndex()
5278
+ {
5279
+ return $this->startIndex;
5280
+ }
5281
+ public function setTotalResults($totalResults)
5282
+ {
5283
+ $this->totalResults = $totalResults;
5284
+ }
5285
+ public function getTotalResults()
5286
+ {
5287
+ return $this->totalResults;
5288
+ }
5289
+ }
5290
+
5291
+ class Google_Service_Analytics_EntityUserLink extends Google_Model
5292
+ {
5293
+ protected $internal_gapi_mappings = array(
5294
+ );
5295
+ protected $entityType = 'Google_Service_Analytics_EntityUserLinkEntity';
5296
+ protected $entityDataType = '';
5297
+ public $id;
5298
+ public $kind;
5299
+ protected $permissionsType = 'Google_Service_Analytics_EntityUserLinkPermissions';
5300
+ protected $permissionsDataType = '';
5301
+ public $selfLink;
5302
+ protected $userRefType = 'Google_Service_Analytics_UserRef';
5303
+ protected $userRefDataType = '';
5304
+
5305
+
5306
+ public function setEntity(Google_Service_Analytics_EntityUserLinkEntity $entity)
5307
+ {
5308
+ $this->entity = $entity;
5309
+ }
5310
+ public function getEntity()
5311
+ {
5312
+ return $this->entity;
5313
+ }
5314
+ public function setId($id)
5315
+ {
5316
+ $this->id = $id;
5317
+ }
5318
+ public function getId()
5319
+ {
5320
+ return $this->id;
5321
+ }
5322
+ public function setKind($kind)
5323
+ {
5324
+ $this->kind = $kind;
5325
+ }
5326
+ public function getKind()
5327
+ {
5328
+ return $this->kind;
5329
+ }
5330
+ public function setPermissions(Google_Service_Analytics_EntityUserLinkPermissions $permissions)
5331
+ {
5332
+ $this->permissions = $permissions;
5333
+ }
5334
+ public function getPermissions()
5335
+ {
5336
+ return $this->permissions;
5337
+ }
5338
+ public function setSelfLink($selfLink)
5339
+ {
5340
+ $this->selfLink = $selfLink;
5341
+ }
5342
+ public function getSelfLink()
5343
+ {
5344
+ return $this->selfLink;
5345
+ }
5346
+ public function setUserRef(Google_Service_Analytics_UserRef $userRef)
5347
+ {
5348
+ $this->userRef = $userRef;
5349
+ }
5350
+ public function getUserRef()
5351
+ {
5352
+ return $this->userRef;
5353
+ }
5354
+ }
5355
+
5356
+ class Google_Service_Analytics_EntityUserLinkEntity extends Google_Model
5357
+ {
5358
+ protected $internal_gapi_mappings = array(
5359
+ );
5360
+ protected $accountRefType = 'Google_Service_Analytics_AccountRef';
5361
+ protected $accountRefDataType = '';
5362
+ protected $profileRefType = 'Google_Service_Analytics_ProfileRef';
5363
+ protected $profileRefDataType = '';
5364
+ protected $webPropertyRefType = 'Google_Service_Analytics_WebPropertyRef';
5365
+ protected $webPropertyRefDataType = '';
5366
+
5367
+
5368
+ public function setAccountRef(Google_Service_Analytics_AccountRef $accountRef)
5369
+ {
5370
+ $this->accountRef = $accountRef;
5371
+ }
5372
+ public function getAccountRef()
5373
+ {
5374
+ return $this->accountRef;
5375
+ }
5376
+ public function setProfileRef(Google_Service_Analytics_ProfileRef $profileRef)
5377
+ {
5378
+ $this->profileRef = $profileRef;
5379
+ }
5380
+ public function getProfileRef()
5381
+ {
5382
+ return $this->profileRef;
5383
+ }
5384
+ public function setWebPropertyRef(Google_Service_Analytics_WebPropertyRef $webPropertyRef)
5385
+ {
5386
+ $this->webPropertyRef = $webPropertyRef;
5387
+ }
5388
+ public function getWebPropertyRef()
5389
+ {
5390
+ return $this->webPropertyRef;
5391
+ }
5392
+ }
5393
+
5394
+ class Google_Service_Analytics_EntityUserLinkPermissions extends Google_Collection
5395
+ {
5396
+ protected $collection_key = 'local';
5397
+ protected $internal_gapi_mappings = array(
5398
+ );
5399
+ public $effective;
5400
+ public $local;
5401
+
5402
+
5403
+ public function setEffective($effective)
5404
+ {
5405
+ $this->effective = $effective;
5406
+ }
5407
+ public function getEffective()
5408
+ {
5409
+ return $this->effective;
5410
+ }
5411
+ public function setLocal($local)
5412
+ {
5413
+ $this->local = $local;
5414
+ }
5415
+ public function getLocal()
5416
+ {
5417
+ return $this->local;
5418
+ }
5419
+ }
5420
+
5421
+ class Google_Service_Analytics_EntityUserLinks extends Google_Collection
5422
+ {
5423
+ protected $collection_key = 'items';
5424
+ protected $internal_gapi_mappings = array(
5425
+ );
5426
+ protected $itemsType = 'Google_Service_Analytics_EntityUserLink';
5427
+ protected $itemsDataType = 'array';
5428
+ public $itemsPerPage;
5429
+ public $kind;
5430
+ public $nextLink;
5431
+ public $previousLink;
5432
+ public $startIndex;
5433
+ public $totalResults;
5434
+
5435
+
5436
+ public function setItems($items)
5437
+ {
5438
+ $this->items = $items;
5439
+ }
5440
+ public function getItems()
5441
+ {
5442
+ return $this->items;
5443
+ }
5444
+ public function setItemsPerPage($itemsPerPage)
5445
+ {
5446
+ $this->itemsPerPage = $itemsPerPage;
5447
+ }
5448
+ public function getItemsPerPage()
5449
+ {
5450
+ return $this->itemsPerPage;
5451
+ }
5452
+ public function setKind($kind)
5453
+ {
5454
+ $this->kind = $kind;
5455
+ }
5456
+ public function getKind()
5457
+ {
5458
+ return $this->kind;
5459
+ }
5460
+ public function setNextLink($nextLink)
5461
+ {
5462
+ $this->nextLink = $nextLink;
5463
+ }
5464
+ public function getNextLink()
5465
+ {
5466
+ return $this->nextLink;
5467
+ }
5468
+ public function setPreviousLink($previousLink)
5469
+ {
5470
+ $this->previousLink = $previousLink;
5471
+ }
5472
+ public function getPreviousLink()
5473
+ {
5474
+ return $this->previousLink;
5475
+ }
5476
+ public function setStartIndex($startIndex)
5477
+ {
5478
+ $this->startIndex = $startIndex;
5479
+ }
5480
+ public function getStartIndex()
5481
+ {
5482
+ return $this->startIndex;
5483
+ }
5484
+ public function setTotalResults($totalResults)
5485
+ {
5486
+ $this->totalResults = $totalResults;
5487
+ }
5488
+ public function getTotalResults()
5489
+ {
5490
+ return $this->totalResults;
5491
+ }
5492
+ }
5493
+
5494
+ class Google_Service_Analytics_Experiment extends Google_Collection
5495
+ {
5496
+ protected $collection_key = 'variations';
5497
+ protected $internal_gapi_mappings = array(
5498
+ );
5499
+ public $accountId;
5500
+ public $created;
5501
+ public $description;
5502
+ public $editableInGaUi;
5503
+ public $endTime;
5504
+ public $equalWeighting;
5505
+ public $id;
5506
+ public $internalWebPropertyId;
5507
+ public $kind;
5508
+ public $minimumExperimentLengthInDays;
5509
+ public $name;
5510
+ public $objectiveMetric;
5511
+ public $optimizationType;
5512
+ protected $parentLinkType = 'Google_Service_Analytics_ExperimentParentLink';
5513
+ protected $parentLinkDataType = '';
5514
+ public $profileId;
5515
+ public $reasonExperimentEnded;
5516
+ public $rewriteVariationUrlsAsOriginal;
5517
+ public $selfLink;
5518
+ public $servingFramework;
5519
+ public $snippet;
5520
+ public $startTime;
5521
+ public $status;
5522
+ public $trafficCoverage;
5523
+ public $updated;
5524
+ protected $variationsType = 'Google_Service_Analytics_ExperimentVariations';
5525
+ protected $variationsDataType = 'array';
5526
+ public $webPropertyId;
5527
+ public $winnerConfidenceLevel;
5528
+ public $winnerFound;
5529
+
5530
+
5531
+ public function setAccountId($accountId)
5532
+ {
5533
+ $this->accountId = $accountId;
5534
+ }
5535
+ public function getAccountId()
5536
+ {
5537
+ return $this->accountId;
5538
+ }
5539
+ public function setCreated($created)
5540
+ {
5541
+ $this->created = $created;
5542
+ }
5543
+ public function getCreated()
5544
+ {
5545
+ return $this->created;
5546
+ }
5547
+ public function setDescription($description)
5548
+ {
5549
+ $this->description = $description;
5550
+ }
5551
+ public function getDescription()
5552
+ {
5553
+ return $this->description;
5554
+ }
5555
+ public function setEditableInGaUi($editableInGaUi)
5556
+ {
5557
+ $this->editableInGaUi = $editableInGaUi;
5558
+ }
5559
+ public function getEditableInGaUi()
5560
+ {
5561
+ return $this->editableInGaUi;
5562
+ }
5563
+ public function setEndTime($endTime)
5564
+ {
5565
+ $this->endTime = $endTime;
5566
+ }
5567
+ public function getEndTime()
5568
+ {
5569
+ return $this->endTime;
5570
+ }
5571
+ public function setEqualWeighting($equalWeighting)
5572
+ {
5573
+ $this->equalWeighting = $equalWeighting;
5574
+ }
5575
+ public function getEqualWeighting()
5576
+ {
5577
+ return $this->equalWeighting;
5578
+ }
5579
+ public function setId($id)
5580
+ {
5581
+ $this->id = $id;
5582
+ }
5583
+ public function getId()
5584
+ {
5585
+ return $this->id;
5586
+ }
5587
+ public function setInternalWebPropertyId($internalWebPropertyId)
5588
+ {
5589
+ $this->internalWebPropertyId = $internalWebPropertyId;
5590
+ }
5591
+ public function getInternalWebPropertyId()
5592
+ {
5593
+ return $this->internalWebPropertyId;
5594
+ }
5595
+ public function setKind($kind)
5596
+ {
5597
+ $this->kind = $kind;
5598
+ }
5599
+ public function getKind()
5600
+ {
5601
+ return $this->kind;
5602
+ }
5603
+ public function setMinimumExperimentLengthInDays($minimumExperimentLengthInDays)
5604
+ {
5605
+ $this->minimumExperimentLengthInDays = $minimumExperimentLengthInDays;
5606
+ }
5607
+ public function getMinimumExperimentLengthInDays()
5608
+ {
5609
+ return $this->minimumExperimentLengthInDays;
5610
+ }
5611
+ public function setName($name)
5612
+ {
5613
+ $this->name = $name;
5614
+ }
5615
+ public function getName()
5616
+ {
5617
+ return $this->name;
5618
+ }
5619
+ public function setObjectiveMetric($objectiveMetric)
5620
+ {
5621
+ $this->objectiveMetric = $objectiveMetric;
5622
+ }
5623
+ public function getObjectiveMetric()
5624
+ {
5625
+ return $this->objectiveMetric;
5626
+ }
5627
+ public function setOptimizationType($optimizationType)
5628
+ {
5629
+ $this->optimizationType = $optimizationType;
5630
+ }
5631
+ public function getOptimizationType()
5632
+ {
5633
+ return $this->optimizationType;
5634
+ }
5635
+ public function setParentLink(Google_Service_Analytics_ExperimentParentLink $parentLink)
5636
+ {
5637
+ $this->parentLink = $parentLink;
5638
+ }
5639
+ public function getParentLink()
5640
+ {
5641
+ return $this->parentLink;
5642
+ }
5643
+ public function setProfileId($profileId)
5644
+ {
5645
+ $this->profileId = $profileId;
5646
+ }
5647
+ public function getProfileId()
5648
+ {
5649
+ return $this->profileId;
5650
+ }
5651
+ public function setReasonExperimentEnded($reasonExperimentEnded)
5652
+ {
5653
+ $this->reasonExperimentEnded = $reasonExperimentEnded;
5654
+ }
5655
+ public function getReasonExperimentEnded()
5656
+ {
5657
+ return $this->reasonExperimentEnded;
5658
+ }
5659
+ public function setRewriteVariationUrlsAsOriginal($rewriteVariationUrlsAsOriginal)
5660
+ {
5661
+ $this->rewriteVariationUrlsAsOriginal = $rewriteVariationUrlsAsOriginal;
5662
+ }
5663
+ public function getRewriteVariationUrlsAsOriginal()
5664
+ {
5665
+ return $this->rewriteVariationUrlsAsOriginal;
5666
+ }
5667
+ public function setSelfLink($selfLink)
5668
+ {
5669
+ $this->selfLink = $selfLink;
5670
+ }
5671
+ public function getSelfLink()
5672
+ {
5673
+ return $this->selfLink;
5674
+ }
5675
+ public function setServingFramework($servingFramework)
5676
+ {
5677
+ $this->servingFramework = $servingFramework;
5678
+ }
5679
+ public function getServingFramework()
5680
+ {
5681
+ return $this->servingFramework;
5682
+ }
5683
+ public function setSnippet($snippet)
5684
+ {
5685
+ $this->snippet = $snippet;
5686
+ }
5687
+ public function getSnippet()
5688
+ {
5689
+ return $this->snippet;
5690
+ }
5691
+ public function setStartTime($startTime)
5692
+ {
5693
+ $this->startTime = $startTime;
5694
+ }
5695
+ public function getStartTime()
5696
+ {
5697
+ return $this->startTime;
5698
+ }
5699
+ public function setStatus($status)
5700
+ {
5701
+ $this->status = $status;
5702
+ }
5703
+ public function getStatus()
5704
+ {
5705
+ return $this->status;
5706
+ }
5707
+ public function setTrafficCoverage($trafficCoverage)
5708
+ {
5709
+ $this->trafficCoverage = $trafficCoverage;
5710
+ }
5711
+ public function getTrafficCoverage()
5712
+ {
5713
+ return $this->trafficCoverage;
5714
+ }
5715
+ public function setUpdated($updated)
5716
+ {
5717
+ $this->updated = $updated;
5718
+ }
5719
+ public function getUpdated()
5720
+ {
5721
+ return $this->updated;
5722
+ }
5723
+ public function setVariations($variations)
5724
+ {
5725
+ $this->variations = $variations;
5726
+ }
5727
+ public function getVariations()
5728
+ {
5729
+ return $this->variations;
5730
+ }
5731
+ public function setWebPropertyId($webPropertyId)
5732
+ {
5733
+ $this->webPropertyId = $webPropertyId;
5734
+ }
5735
+ public function getWebPropertyId()
5736
+ {
5737
+ return $this->webPropertyId;
5738
+ }
5739
+ public function setWinnerConfidenceLevel($winnerConfidenceLevel)
5740
+ {
5741
+ $this->winnerConfidenceLevel = $winnerConfidenceLevel;
5742
+ }
5743
+ public function getWinnerConfidenceLevel()
5744
+ {
5745
+ return $this->winnerConfidenceLevel;
5746
+ }
5747
+ public function setWinnerFound($winnerFound)
5748
+ {
5749
+ $this->winnerFound = $winnerFound;
5750
+ }
5751
+ public function getWinnerFound()
5752
+ {
5753
+ return $this->winnerFound;
5754
+ }
5755
+ }
5756
+
5757
+ class Google_Service_Analytics_ExperimentParentLink extends Google_Model
5758
+ {
5759
+ protected $internal_gapi_mappings = array(
5760
+ );
5761
+ public $href;
5762
+ public $type;
5763
+
5764
+
5765
+ public function setHref($href)
5766
+ {
5767
+ $this->href = $href;
5768
+ }
5769
+ public function getHref()
5770
+ {
5771
+ return $this->href;
5772
+ }
5773
+ public function setType($type)
5774
+ {
5775
+ $this->type = $type;
5776
+ }
5777
+ public function getType()
5778
+ {
5779
+ return $this->type;
5780
+ }
5781
+ }
5782
+
5783
+ class Google_Service_Analytics_ExperimentVariations extends Google_Model
5784
+ {
5785
+ protected $internal_gapi_mappings = array(
5786
+ );
5787
+ public $name;
5788
+ public $status;
5789
+ public $url;
5790
+ public $weight;
5791
+ public $won;
5792
+
5793
+
5794
+ public function setName($name)
5795
+ {
5796
+ $this->name = $name;
5797
+ }
5798
+ public function getName()
5799
+ {
5800
+ return $this->name;
5801
+ }
5802
+ public function setStatus($status)
5803
+ {
5804
+ $this->status = $status;
5805
+ }
5806
+ public function getStatus()
5807
+ {
5808
+ return $this->status;
5809
+ }
5810
+ public function setUrl($url)
5811
+ {
5812
+ $this->url = $url;
5813
+ }
5814
+ public function getUrl()
5815
+ {
5816
+ return $this->url;
5817
+ }
5818
+ public function setWeight($weight)
5819
+ {
5820
+ $this->weight = $weight;
5821
+ }
5822
+ public function getWeight()
5823
+ {
5824
+ return $this->weight;
5825
+ }
5826
+ public function setWon($won)
5827
+ {
5828
+ $this->won = $won;
5829
+ }
5830
+ public function getWon()
5831
+ {
5832
+ return $this->won;
5833
+ }
5834
+ }
5835
+
5836
+ class Google_Service_Analytics_Experiments extends Google_Collection
5837
+ {
5838
+ protected $collection_key = 'items';
5839
+ protected $internal_gapi_mappings = array(
5840
+ );
5841
+ protected $itemsType = 'Google_Service_Analytics_Experiment';
5842
+ protected $itemsDataType = 'array';
5843
+ public $itemsPerPage;
5844
+ public $kind;
5845
+ public $nextLink;
5846
+ public $previousLink;
5847
+ public $startIndex;
5848
+ public $totalResults;
5849
+ public $username;
5850
+
5851
+
5852
+ public function setItems($items)
5853
+ {
5854
+ $this->items = $items;
5855
+ }
5856
+ public function getItems()
5857
+ {
5858
+ return $this->items;
5859
+ }
5860
+ public function setItemsPerPage($itemsPerPage)
5861
+ {
5862
+ $this->itemsPerPage = $itemsPerPage;
5863
+ }
5864
+ public function getItemsPerPage()
5865
+ {
5866
+ return $this->itemsPerPage;
5867
+ }
5868
+ public function setKind($kind)
5869
+ {
5870
+ $this->kind = $kind;
5871
+ }
5872
+ public function getKind()
5873
+ {
5874
+ return $this->kind;
5875
+ }
5876
+ public function setNextLink($nextLink)
5877
+ {
5878
+ $this->nextLink = $nextLink;
5879
+ }
5880
+ public function getNextLink()
5881
+ {
5882
+ return $this->nextLink;
5883
+ }
5884
+ public function setPreviousLink($previousLink)
5885
+ {
5886
+ $this->previousLink = $previousLink;
5887
+ }
5888
+ public function getPreviousLink()
5889
+ {
5890
+ return $this->previousLink;
5891
+ }
5892
+ public function setStartIndex($startIndex)
5893
+ {
5894
+ $this->startIndex = $startIndex;
5895
+ }
5896
+ public function getStartIndex()
5897
+ {
5898
+ return $this->startIndex;
5899
+ }
5900
+ public function setTotalResults($totalResults)
5901
+ {
5902
+ $this->totalResults = $totalResults;
5903
+ }
5904
+ public function getTotalResults()
5905
+ {
5906
+ return $this->totalResults;
5907
+ }
5908
+ public function setUsername($username)
5909
+ {
5910
+ $this->username = $username;
5911
+ }
5912
+ public function getUsername()
5913
+ {
5914
+ return $this->username;
5915
+ }
5916
+ }
5917
+
5918
+ class Google_Service_Analytics_Filter extends Google_Model
5919
+ {
5920
+ protected $internal_gapi_mappings = array(
5921
+ );
5922
+ public $accountId;
5923
+ protected $advancedDetailsType = 'Google_Service_Analytics_FilterAdvancedDetails';
5924
+ protected $advancedDetailsDataType = '';
5925
+ public $created;
5926
+ protected $excludeDetailsType = 'Google_Service_Analytics_FilterExpression';
5927
+ protected $excludeDetailsDataType = '';
5928
+ public $id;
5929
+ protected $includeDetailsType = 'Google_Service_Analytics_FilterExpression';
5930
+ protected $includeDetailsDataType = '';
5931
+ public $kind;
5932
+ protected $lowercaseDetailsType = 'Google_Service_Analytics_FilterLowercaseDetails';
5933
+ protected $lowercaseDetailsDataType = '';
5934
+ public $name;
5935
+ protected $parentLinkType = 'Google_Service_Analytics_FilterParentLink';
5936
+ protected $parentLinkDataType = '';
5937
+ protected $searchAndReplaceDetailsType = 'Google_Service_Analytics_FilterSearchAndReplaceDetails';
5938
+ protected $searchAndReplaceDetailsDataType = '';
5939
+ public $selfLink;
5940
+ public $type;
5941
+ public $updated;
5942
+ protected $uppercaseDetailsType = 'Google_Service_Analytics_FilterUppercaseDetails';
5943
+ protected $uppercaseDetailsDataType = '';
5944
+
5945
+
5946
+ public function setAccountId($accountId)
5947
+ {
5948
+ $this->accountId = $accountId;
5949
+ }
5950
+ public function getAccountId()
5951
+ {
5952
+ return $this->accountId;
5953
+ }
5954
+ public function setAdvancedDetails(Google_Service_Analytics_FilterAdvancedDetails $advancedDetails)
5955
+ {
5956
+ $this->advancedDetails = $advancedDetails;
5957
+ }
5958
+ public function getAdvancedDetails()
5959
+ {
5960
+ return $this->advancedDetails;
5961
+ }
5962
+ public function setCreated($created)
5963
+ {
5964
+ $this->created = $created;
5965
+ }
5966
+ public function getCreated()
5967
+ {
5968
+ return $this->created;
5969
+ }
5970
+ public function setExcludeDetails(Google_Service_Analytics_FilterExpression $excludeDetails)
5971
+ {
5972
+ $this->excludeDetails = $excludeDetails;
5973
+ }
5974
+ public function getExcludeDetails()
5975
+ {
5976
+ return $this->excludeDetails;
5977
+ }
5978
+ public function setId($id)
5979
+ {
5980
+ $this->id = $id;
5981
+ }
5982
+ public function getId()
5983
+ {
5984
+ return $this->id;
5985
+ }
5986
+ public function setIncludeDetails(Google_Service_Analytics_FilterExpression $includeDetails)
5987
+ {
5988
+ $this->includeDetails = $includeDetails;
5989
+ }
5990
+ public function getIncludeDetails()
5991
+ {
5992
+ return $this->includeDetails;
5993
+ }
5994
+ public function setKind($kind)
5995
+ {
5996
+ $this->kind = $kind;
5997
+ }
5998
+ public function getKind()
5999
+ {
6000
+ return $this->kind;
6001
+ }
6002
+ public function setLowercaseDetails(Google_Service_Analytics_FilterLowercaseDetails $lowercaseDetails)
6003
+ {
6004
+ $this->lowercaseDetails = $lowercaseDetails;
6005
+ }
6006
+ public function getLowercaseDetails()
6007
+ {
6008
+ return $this->lowercaseDetails;
6009
+ }
6010
+ public function setName($name)
6011
+ {
6012
+ $this->name = $name;
6013
+ }
6014
+ public function getName()
6015
+ {
6016
+ return $this->name;
6017
+ }
6018
+ public function setParentLink(Google_Service_Analytics_FilterParentLink $parentLink)
6019
+ {
6020
+ $this->parentLink = $parentLink;
6021
+ }
6022
+ public function getParentLink()
6023
+ {
6024
+ return $this->parentLink;
6025
+ }
6026
+ public function setSearchAndReplaceDetails(Google_Service_Analytics_FilterSearchAndReplaceDetails $searchAndReplaceDetails)
6027
+ {
6028
+ $this->searchAndReplaceDetails = $searchAndReplaceDetails;
6029
+ }
6030
+ public function getSearchAndReplaceDetails()
6031
+ {
6032
+ return $this->searchAndReplaceDetails;
6033
+ }
6034
+ public function setSelfLink($selfLink)
6035
+ {
6036
+ $this->selfLink = $selfLink;
6037
+ }
6038
+ public function getSelfLink()
6039
+ {
6040
+ return $this->selfLink;
6041
+ }
6042
+ public function setType($type)
6043
+ {
6044
+ $this->type = $type;
6045
+ }
6046
+ public function getType()
6047
+ {
6048
+ return $this->type;
6049
+ }
6050
+ public function setUpdated($updated)
6051
+ {
6052
+ $this->updated = $updated;
6053
+ }
6054
+ public function getUpdated()
6055
+ {
6056
+ return $this->updated;
6057
+ }
6058
+ public function setUppercaseDetails(Google_Service_Analytics_FilterUppercaseDetails $uppercaseDetails)
6059
+ {
6060
+ $this->uppercaseDetails = $uppercaseDetails;
6061
+ }
6062
+ public function getUppercaseDetails()
6063
+ {
6064
+ return $this->uppercaseDetails;
6065
+ }
6066
+ }
6067
+
6068
+ class Google_Service_Analytics_FilterAdvancedDetails extends Google_Model
6069
+ {
6070
+ protected $internal_gapi_mappings = array(
6071
+ );
6072
+ public $caseSensitive;
6073
+ public $extractA;
6074
+ public $extractB;
6075
+ public $fieldA;
6076
+ public $fieldAIndex;
6077
+ public $fieldARequired;
6078
+ public $fieldB;
6079
+ public $fieldBIndex;
6080
+ public $fieldBRequired;
6081
+ public $outputConstructor;
6082
+ public $outputToField;
6083
+ public $outputToFieldIndex;
6084
+ public $overrideOutputField;
6085
+
6086
+
6087
+ public function setCaseSensitive($caseSensitive)
6088
+ {
6089
+ $this->caseSensitive = $caseSensitive;
6090
+ }
6091
+ public function getCaseSensitive()
6092
+ {
6093
+ return $this->caseSensitive;
6094
+ }
6095
+ public function setExtractA($extractA)
6096
+ {
6097
+ $this->extractA = $extractA;
6098
+ }
6099
+ public function getExtractA()
6100
+ {
6101
+ return $this->extractA;
6102
+ }
6103
+ public function setExtractB($extractB)
6104
+ {
6105
+ $this->extractB = $extractB;
6106
+ }
6107
+ public function getExtractB()
6108
+ {
6109
+ return $this->extractB;
6110
+ }
6111
+ public function setFieldA($fieldA)
6112
+ {
6113
+ $this->fieldA = $fieldA;
6114
+ }
6115
+ public function getFieldA()
6116
+ {
6117
+ return $this->fieldA;
6118
+ }
6119
+ public function setFieldAIndex($fieldAIndex)
6120
+ {
6121
+ $this->fieldAIndex = $fieldAIndex;
6122
+ }
6123
+ public function getFieldAIndex()
6124
+ {
6125
+ return $this->fieldAIndex;
6126
+ }
6127
+ public function setFieldARequired($fieldARequired)
6128
+ {
6129
+ $this->fieldARequired = $fieldARequired;
6130
+ }
6131
+ public function getFieldARequired()
6132
+ {
6133
+ return $this->fieldARequired;
6134
+ }
6135
+ public function setFieldB($fieldB)
6136
+ {
6137
+ $this->fieldB = $fieldB;
6138
+ }
6139
+ public function getFieldB()
6140
+ {
6141
+ return $this->fieldB;
6142
+ }
6143
+ public function setFieldBIndex($fieldBIndex)
6144
+ {
6145
+ $this->fieldBIndex = $fieldBIndex;
6146
+ }
6147
+ public function getFieldBIndex()
6148
+ {
6149
+ return $this->fieldBIndex;
6150
+ }
6151
+ public function setFieldBRequired($fieldBRequired)
6152
+ {
6153
+ $this->fieldBRequired = $fieldBRequired;
6154
+ }
6155
+ public function getFieldBRequired()
6156
+ {
6157
+ return $this->fieldBRequired;
6158
+ }
6159
+ public function setOutputConstructor($outputConstructor)
6160
+ {
6161
+ $this->outputConstructor = $outputConstructor;
6162
+ }
6163
+ public function getOutputConstructor()
6164
+ {
6165
+ return $this->outputConstructor;
6166
+ }
6167
+ public function setOutputToField($outputToField)
6168
+ {
6169
+ $this->outputToField = $outputToField;
6170
+ }
6171
+ public function getOutputToField()
6172
+ {
6173
+ return $this->outputToField;
6174
+ }
6175
+ public function setOutputToFieldIndex($outputToFieldIndex)
6176
+ {
6177
+ $this->outputToFieldIndex = $outputToFieldIndex;
6178
+ }
6179
+ public function getOutputToFieldIndex()
6180
+ {
6181
+ return $this->outputToFieldIndex;
6182
+ }
6183
+ public function setOverrideOutputField($overrideOutputField)
6184
+ {
6185
+ $this->overrideOutputField = $overrideOutputField;
6186
+ }
6187
+ public function getOverrideOutputField()
6188
+ {
6189
+ return $this->overrideOutputField;
6190
+ }
6191
+ }
6192
+
6193
+ class Google_Service_Analytics_FilterExpression extends Google_Model
6194
+ {
6195
+ protected $internal_gapi_mappings = array(
6196
+ );
6197
+ public $caseSensitive;
6198
+ public $expressionValue;
6199
+ public $field;
6200
+ public $fieldIndex;
6201
+ public $kind;
6202
+ public $matchType;
6203
+
6204
+
6205
+ public function setCaseSensitive($caseSensitive)
6206
+ {
6207
+ $this->caseSensitive = $caseSensitive;
6208
+ }
6209
+ public function getCaseSensitive()
6210
+ {
6211
+ return $this->caseSensitive;
6212
+ }
6213
+ public function setExpressionValue($expressionValue)
6214
+ {
6215
+ $this->expressionValue = $expressionValue;
6216
+ }
6217
+ public function getExpressionValue()
6218
+ {
6219
+ return $this->expressionValue;
6220
+ }
6221
+ public function setField($field)
6222
+ {
6223
+ $this->field = $field;
6224
+ }
6225
+ public function getField()
6226
+ {
6227
+ return $this->field;
6228
+ }
6229
+ public function setFieldIndex($fieldIndex)
6230
+ {
6231
+ $this->fieldIndex = $fieldIndex;
6232
+ }
6233
+ public function getFieldIndex()
6234
+ {
6235
+ return $this->fieldIndex;
6236
+ }
6237
+ public function setKind($kind)
6238
+ {
6239
+ $this->kind = $kind;
6240
+ }
6241
+ public function getKind()
6242
+ {
6243
+ return $this->kind;
6244
+ }
6245
+ public function setMatchType($matchType)
6246
+ {
6247
+ $this->matchType = $matchType;
6248
+ }
6249
+ public function getMatchType()
6250
+ {
6251
+ return $this->matchType;
6252
+ }
6253
+ }
6254
+
6255
+ class Google_Service_Analytics_FilterLowercaseDetails extends Google_Model
6256
+ {
6257
+ protected $internal_gapi_mappings = array(
6258
+ );
6259
+ public $field;
6260
+ public $fieldIndex;
6261
+
6262
+
6263
+ public function setField($field)
6264
+ {
6265
+ $this->field = $field;
6266
+ }
6267
+ public function getField()
6268
+ {
6269
+ return $this->field;
6270
+ }
6271
+ public function setFieldIndex($fieldIndex)
6272
+ {
6273
+ $this->fieldIndex = $fieldIndex;
6274
+ }
6275
+ public function getFieldIndex()
6276
+ {
6277
+ return $this->fieldIndex;
6278
+ }
6279
+ }
6280
+
6281
+ class Google_Service_Analytics_FilterParentLink extends Google_Model
6282
+ {
6283
+ protected $internal_gapi_mappings = array(
6284
+ );
6285
+ public $href;
6286
+ public $type;
6287
+
6288
+
6289
+ public function setHref($href)
6290
+ {
6291
+ $this->href = $href;
6292
+ }
6293
+ public function getHref()
6294
+ {
6295
+ return $this->href;
6296
+ }
6297
+ public function setType($type)
6298
+ {
6299
+ $this->type = $type;
6300
+ }
6301
+ public function getType()
6302
+ {
6303
+ return $this->type;
6304
+ }
6305
+ }
6306
+
6307
+ class Google_Service_Analytics_FilterRef extends Google_Model
6308
+ {
6309
+ protected $internal_gapi_mappings = array(
6310
+ );
6311
+ public $accountId;
6312
+ public $href;
6313
+ public $id;
6314
+ public $kind;
6315
+ public $name;
6316
+
6317
+
6318
+ public function setAccountId($accountId)
6319
+ {
6320
+ $this->accountId = $accountId;
6321
+ }
6322
+ public function getAccountId()
6323
+ {
6324
+ return $this->accountId;
6325
+ }
6326
+ public function setHref($href)
6327
+ {
6328
+ $this->href = $href;
6329
+ }
6330
+ public function getHref()
6331
+ {
6332
+ return $this->href;
6333
+ }
6334
+ public function setId($id)
6335
+ {
6336
+ $this->id = $id;
6337
+ }
6338
+ public function getId()
6339
+ {
6340
+ return $this->id;
6341
+ }
6342
+ public function setKind($kind)
6343
+ {
6344
+ $this->kind = $kind;
6345
+ }
6346
+ public function getKind()
6347
+ {
6348
+ return $this->kind;
6349
+ }
6350
+ public function setName($name)
6351
+ {
6352
+ $this->name = $name;
6353
+ }
6354
+ public function getName()
6355
+ {
6356
+ return $this->name;
6357
+ }
6358
+ }
6359
+
6360
+ class Google_Service_Analytics_FilterSearchAndReplaceDetails extends Google_Model
6361
+ {
6362
+ protected $internal_gapi_mappings = array(
6363
+ );
6364
+ public $caseSensitive;
6365
+ public $field;
6366
+ public $fieldIndex;
6367
+ public $replaceString;
6368
+ public $searchString;
6369
+
6370
+
6371
+ public function setCaseSensitive($caseSensitive)
6372
+ {
6373
+ $this->caseSensitive = $caseSensitive;
6374
+ }
6375
+ public function getCaseSensitive()
6376
+ {
6377
+ return $this->caseSensitive;
6378
+ }
6379
+ public function setField($field)
6380
+ {
6381
+ $this->field = $field;
6382
+ }
6383
+ public function getField()
6384
+ {
6385
+ return $this->field;
6386
+ }
6387
+ public function setFieldIndex($fieldIndex)
6388
+ {
6389
+ $this->fieldIndex = $fieldIndex;
6390
+ }
6391
+ public function getFieldIndex()
6392
+ {
6393
+ return $this->fieldIndex;
6394
+ }
6395
+ public function setReplaceString($replaceString)
6396
+ {
6397
+ $this->replaceString = $replaceString;
6398
+ }
6399
+ public function getReplaceString()
6400
+ {
6401
+ return $this->replaceString;
6402
+ }
6403
+ public function setSearchString($searchString)
6404
+ {
6405
+ $this->searchString = $searchString;
6406
+ }
6407
+ public function getSearchString()
6408
+ {
6409
+ return $this->searchString;
6410
+ }
6411
+ }
6412
+
6413
+ class Google_Service_Analytics_FilterUppercaseDetails extends Google_Model
6414
+ {
6415
+ protected $internal_gapi_mappings = array(
6416
+ );
6417
+ public $field;
6418
+ public $fieldIndex;
6419
+
6420
+
6421
+ public function setField($field)
6422
+ {
6423
+ $this->field = $field;
6424
+ }
6425
+ public function getField()
6426
+ {
6427
+ return $this->field;
6428
+ }
6429
+ public function setFieldIndex($fieldIndex)
6430
+ {
6431
+ $this->fieldIndex = $fieldIndex;
6432
+ }
6433
+ public function getFieldIndex()
6434
+ {
6435
+ return $this->fieldIndex;
6436
+ }
6437
+ }
6438
+
6439
+ class Google_Service_Analytics_Filters extends Google_Collection
6440
+ {
6441
+ protected $collection_key = 'items';
6442
+ protected $internal_gapi_mappings = array(
6443
+ );
6444
+ protected $itemsType = 'Google_Service_Analytics_Filter';
6445
+ protected $itemsDataType = 'array';
6446
+ public $itemsPerPage;
6447
+ public $kind;
6448
+ public $nextLink;
6449
+ public $previousLink;
6450
+ public $startIndex;
6451
+ public $totalResults;
6452
+ public $username;
6453
+
6454
+
6455
+ public function setItems($items)
6456
+ {
6457
+ $this->items = $items;
6458
+ }
6459
+ public function getItems()
6460
+ {
6461
+ return $this->items;
6462
+ }
6463
+ public function setItemsPerPage($itemsPerPage)
6464
+ {
6465
+ $this->itemsPerPage = $itemsPerPage;
6466
+ }
6467
+ public function getItemsPerPage()
6468
+ {
6469
+ return $this->itemsPerPage;
6470
+ }
6471
+ public function setKind($kind)
6472
+ {
6473
+ $this->kind = $kind;
6474
+ }
6475
+ public function getKind()
6476
+ {
6477
+ return $this->kind;
6478
+ }
6479
+ public function setNextLink($nextLink)
6480
+ {
6481
+ $this->nextLink = $nextLink;
6482
+ }
6483
+ public function getNextLink()
6484
+ {
6485
+ return $this->nextLink;
6486
+ }
6487
+ public function setPreviousLink($previousLink)
6488
+ {
6489
+ $this->previousLink = $previousLink;
6490
+ }
6491
+ public function getPreviousLink()
6492
+ {
6493
+ return $this->previousLink;
6494
+ }
6495
+ public function setStartIndex($startIndex)
6496
+ {
6497
+ $this->startIndex = $startIndex;
6498
+ }
6499
+ public function getStartIndex()
6500
+ {
6501
+ return $this->startIndex;
6502
+ }
6503
+ public function setTotalResults($totalResults)
6504
+ {
6505
+ $this->totalResults = $totalResults;
6506
+ }
6507
+ public function getTotalResults()
6508
+ {
6509
+ return $this->totalResults;
6510
+ }
6511
+ public function setUsername($username)
6512
+ {
6513
+ $this->username = $username;
6514
+ }
6515
+ public function getUsername()
6516
+ {
6517
+ return $this->username;
6518
+ }
6519
+ }
6520
+
6521
+ class Google_Service_Analytics_GaData extends Google_Collection
6522
+ {
6523
+ protected $collection_key = 'rows';
6524
+ protected $internal_gapi_mappings = array(
6525
+ );
6526
+ protected $columnHeadersType = 'Google_Service_Analytics_GaDataColumnHeaders';
6527
+ protected $columnHeadersDataType = 'array';
6528
+ public $containsSampledData;
6529
+ protected $dataTableType = 'Google_Service_Analytics_GaDataDataTable';
6530
+ protected $dataTableDataType = '';
6531
+ public $id;
6532
+ public $itemsPerPage;
6533
+ public $kind;
6534
+ public $nextLink;
6535
+ public $previousLink;
6536
+ protected $profileInfoType = 'Google_Service_Analytics_GaDataProfileInfo';
6537
+ protected $profileInfoDataType = '';
6538
+ protected $queryType = 'Google_Service_Analytics_GaDataQuery';
6539
+ protected $queryDataType = '';
6540
+ public $rows;
6541
+ public $sampleSize;
6542
+ public $sampleSpace;
6543
+ public $selfLink;
6544
+ public $totalResults;
6545
+ public $totalsForAllResults;
6546
+
6547
+
6548
+ public function setColumnHeaders($columnHeaders)
6549
+ {
6550
+ $this->columnHeaders = $columnHeaders;
6551
+ }
6552
+ public function getColumnHeaders()
6553
+ {
6554
+ return $this->columnHeaders;
6555
+ }
6556
+ public function setContainsSampledData($containsSampledData)
6557
+ {
6558
+ $this->containsSampledData = $containsSampledData;
6559
+ }
6560
+ public function getContainsSampledData()
6561
+ {
6562
+ return $this->containsSampledData;
6563
+ }
6564
+ public function setDataTable(Google_Service_Analytics_GaDataDataTable $dataTable)
6565
+ {
6566
+ $this->dataTable = $dataTable;
6567
+ }
6568
+ public function getDataTable()
6569
+ {
6570
+ return $this->dataTable;
6571
+ }
6572
+ public function setId($id)
6573
+ {
6574
+ $this->id = $id;
6575
+ }
6576
+ public function getId()
6577
+ {
6578
+ return $this->id;
6579
+ }
6580
+ public function setItemsPerPage($itemsPerPage)
6581
+ {
6582
+ $this->itemsPerPage = $itemsPerPage;
6583
+ }
6584
+ public function getItemsPerPage()
6585
+ {
6586
+ return $this->itemsPerPage;
6587
+ }
6588
+ public function setKind($kind)
6589
+ {
6590
+ $this->kind = $kind;
6591
+ }
6592
+ public function getKind()
6593
+ {
6594
+ return $this->kind;
6595
+ }
6596
+ public function setNextLink($nextLink)
6597
+ {
6598
+ $this->nextLink = $nextLink;
6599
+ }
6600
+ public function getNextLink()
6601
+ {
6602
+ return $this->nextLink;
6603
+ }
6604
+ public function setPreviousLink($previousLink)
6605
+ {
6606
+ $this->previousLink = $previousLink;
6607
+ }
6608
+ public function getPreviousLink()
6609
+ {
6610
+ return $this->previousLink;
6611
+ }
6612
+ public function setProfileInfo(Google_Service_Analytics_GaDataProfileInfo $profileInfo)
6613
+ {
6614
+ $this->profileInfo = $profileInfo;
6615
+ }
6616
+ public function getProfileInfo()
6617
+ {
6618
+ return $this->profileInfo;
6619
+ }
6620
+ public function setQuery(Google_Service_Analytics_GaDataQuery $query)
6621
+ {
6622
+ $this->query = $query;
6623
+ }
6624
+ public function getQuery()
6625
+ {
6626
+ return $this->query;
6627
+ }
6628
+ public function setRows($rows)
6629
+ {
6630
+ $this->rows = $rows;
6631
+ }
6632
+ public function getRows()
6633
+ {
6634
+ return $this->rows;
6635
+ }
6636
+ public function setSampleSize($sampleSize)
6637
+ {
6638
+ $this->sampleSize = $sampleSize;
6639
+ }
6640
+ public function getSampleSize()
6641
+ {
6642
+ return $this->sampleSize;
6643
+ }
6644
+ public function setSampleSpace($sampleSpace)
6645
+ {
6646
+ $this->sampleSpace = $sampleSpace;
6647
+ }
6648
+ public function getSampleSpace()
6649
+ {
6650
+ return $this->sampleSpace;
6651
+ }
6652
+ public function setSelfLink($selfLink)
6653
+ {
6654
+ $this->selfLink = $selfLink;
6655
+ }
6656
+ public function getSelfLink()
6657
+ {
6658
+ return $this->selfLink;
6659
+ }
6660
+ public function setTotalResults($totalResults)
6661
+ {
6662
+ $this->totalResults = $totalResults;
6663
+ }
6664
+ public function getTotalResults()
6665
+ {
6666
+ return $this->totalResults;
6667
+ }
6668
+ public function setTotalsForAllResults($totalsForAllResults)
6669
+ {
6670
+ $this->totalsForAllResults = $totalsForAllResults;
6671
+ }
6672
+ public function getTotalsForAllResults()
6673
+ {
6674
+ return $this->totalsForAllResults;
6675
+ }
6676
+ }
6677
+
6678
+ class Google_Service_Analytics_GaDataColumnHeaders extends Google_Model
6679
+ {
6680
+ protected $internal_gapi_mappings = array(
6681
+ );
6682
+ public $columnType;
6683
+ public $dataType;
6684
+ public $name;
6685
+
6686
+
6687
+ public function setColumnType($columnType)
6688
+ {
6689
+ $this->columnType = $columnType;
6690
+ }
6691
+ public function getColumnType()
6692
+ {
6693
+ return $this->columnType;
6694
+ }
6695
+ public function setDataType($dataType)
6696
+ {
6697
+ $this->dataType = $dataType;
6698
+ }
6699
+ public function getDataType()
6700
+ {
6701
+ return $this->dataType;
6702
+ }
6703
+ public function setName($name)
6704
+ {
6705
+ $this->name = $name;
6706
+ }
6707
+ public function getName()
6708
+ {
6709
+ return $this->name;
6710
+ }
6711
+ }
6712
+
6713
+ class Google_Service_Analytics_GaDataDataTable extends Google_Collection
6714
+ {
6715
+ protected $collection_key = 'rows';
6716
+ protected $internal_gapi_mappings = array(
6717
+ );
6718
+ protected $colsType = 'Google_Service_Analytics_GaDataDataTableCols';
6719
+ protected $colsDataType = 'array';
6720
+ protected $rowsType = 'Google_Service_Analytics_GaDataDataTableRows';
6721
+ protected $rowsDataType = 'array';
6722
+
6723
+
6724
+ public function setCols($cols)
6725
+ {
6726
+ $this->cols = $cols;
6727
+ }
6728
+ public function getCols()
6729
+ {
6730
+ return $this->cols;
6731
+ }
6732
+ public function setRows($rows)
6733
+ {
6734
+ $this->rows = $rows;
6735
+ }
6736
+ public function getRows()
6737
+ {
6738
+ return $this->rows;
6739
+ }
6740
+ }
6741
+
6742
+ class Google_Service_Analytics_GaDataDataTableCols extends Google_Model
6743
+ {
6744
+ protected $internal_gapi_mappings = array(
6745
+ );
6746
+ public $id;
6747
+ public $label;
6748
+ public $type;
6749
+
6750
+
6751
+ public function setId($id)
6752
+ {
6753
+ $this->id = $id;
6754
+ }
6755
+ public function getId()
6756
+ {
6757
+ return $this->id;
6758
+ }
6759
+ public function setLabel($label)
6760
+ {
6761
+ $this->label = $label;
6762
+ }
6763
+ public function getLabel()
6764
+ {
6765
+ return $this->label;
6766
+ }
6767
+ public function setType($type)
6768
+ {
6769
+ $this->type = $type;
6770
+ }
6771
+ public function getType()
6772
+ {
6773
+ return $this->type;
6774
+ }
6775
+ }
6776
+
6777
+ class Google_Service_Analytics_GaDataDataTableRows extends Google_Collection
6778
+ {
6779
+ protected $collection_key = 'c';
6780
+ protected $internal_gapi_mappings = array(
6781
+ );
6782
+ protected $cType = 'Google_Service_Analytics_GaDataDataTableRowsC';
6783
+ protected $cDataType = 'array';
6784
+
6785
+
6786
+ public function setC($c)
6787
+ {
6788
+ $this->c = $c;
6789
+ }
6790
+ public function getC()
6791
+ {
6792
+ return $this->c;
6793
+ }
6794
+ }
6795
+
6796
+ class Google_Service_Analytics_GaDataDataTableRowsC extends Google_Model
6797
+ {
6798
+ protected $internal_gapi_mappings = array(
6799
+ );
6800
+ public $v;
6801
+
6802
+
6803
+ public function setV($v)
6804
+ {
6805
+ $this->v = $v;
6806
+ }
6807
+ public function getV()
6808
+ {
6809
+ return $this->v;
6810
+ }
6811
+ }
6812
+
6813
+ class Google_Service_Analytics_GaDataProfileInfo extends Google_Model
6814
+ {
6815
+ protected $internal_gapi_mappings = array(
6816
+ );
6817
+ public $accountId;
6818
+ public $internalWebPropertyId;
6819
+ public $profileId;
6820
+ public $profileName;
6821
+ public $tableId;
6822
+ public $webPropertyId;
6823
+
6824
+
6825
+ public function setAccountId($accountId)
6826
+ {
6827
+ $this->accountId = $accountId;
6828
+ }
6829
+ public function getAccountId()
6830
+ {
6831
+ return $this->accountId;
6832
+ }
6833
+ public function setInternalWebPropertyId($internalWebPropertyId)
6834
+ {
6835
+ $this->internalWebPropertyId = $internalWebPropertyId;
6836
+ }
6837
+ public function getInternalWebPropertyId()
6838
+ {
6839
+ return $this->internalWebPropertyId;
6840
+ }
6841
+ public function setProfileId($profileId)
6842
+ {
6843
+ $this->profileId = $profileId;
6844
+ }
6845
+ public function getProfileId()
6846
+ {
6847
+ return $this->profileId;
6848
+ }
6849
+ public function setProfileName($profileName)
6850
+ {
6851
+ $this->profileName = $profileName;
6852
+ }
6853
+ public function getProfileName()
6854
+ {
6855
+ return $this->profileName;
6856
+ }
6857
+ public function setTableId($tableId)
6858
+ {
6859
+ $this->tableId = $tableId;
6860
+ }
6861
+ public function getTableId()
6862
+ {
6863
+ return $this->tableId;
6864
+ }
6865
+ public function setWebPropertyId($webPropertyId)
6866
+ {
6867
+ $this->webPropertyId = $webPropertyId;
6868
+ }
6869
+ public function getWebPropertyId()
6870
+ {
6871
+ return $this->webPropertyId;
6872
+ }
6873
+ }
6874
+
6875
+ class Google_Service_Analytics_GaDataQuery extends Google_Collection
6876
+ {
6877
+ protected $collection_key = 'sort';
6878
+ protected $internal_gapi_mappings = array(
6879
+ "endDate" => "end-date",
6880
+ "maxResults" => "max-results",
6881
+ "startDate" => "start-date",
6882
+ "startIndex" => "start-index",
6883
+ );
6884
+ public $dimensions;
6885
+ public $endDate;
6886
+ public $filters;
6887
+ public $ids;
6888
+ public $maxResults;
6889
+ public $metrics;
6890
+ public $samplingLevel;
6891
+ public $segment;
6892
+ public $sort;
6893
+ public $startDate;
6894
+ public $startIndex;
6895
+
6896
+
6897
+ public function setDimensions($dimensions)
6898
+ {
6899
+ $this->dimensions = $dimensions;
6900
+ }
6901
+ public function getDimensions()
6902
+ {
6903
+ return $this->dimensions;
6904
+ }
6905
+ public function setEndDate($endDate)
6906
+ {
6907
+ $this->endDate = $endDate;
6908
+ }
6909
+ public function getEndDate()
6910
+ {
6911
+ return $this->endDate;
6912
+ }
6913
+ public function setFilters($filters)
6914
+ {
6915
+ $this->filters = $filters;
6916
+ }
6917
+ public function getFilters()
6918
+ {
6919
+ return $this->filters;
6920
+ }
6921
+ public function setIds($ids)
6922
+ {
6923
+ $this->ids = $ids;
6924
+ }
6925
+ public function getIds()
6926
+ {
6927
+ return $this->ids;
6928
+ }
6929
+ public function setMaxResults($maxResults)
6930
+ {
6931
+ $this->maxResults = $maxResults;
6932
+ }
6933
+ public function getMaxResults()
6934
+ {
6935
+ return $this->maxResults;
6936
+ }
6937
+ public function setMetrics($metrics)
6938
+ {
6939
+ $this->metrics = $metrics;
6940
+ }
6941
+ public function getMetrics()
6942
+ {
6943
+ return $this->metrics;
6944
+ }
6945
+ public function setSamplingLevel($samplingLevel)
6946
+ {
6947
+ $this->samplingLevel = $samplingLevel;
6948
+ }
6949
+ public function getSamplingLevel()
6950
+ {
6951
+ return $this->samplingLevel;
6952
+ }
6953
+ public function setSegment($segment)
6954
+ {
6955
+ $this->segment = $segment;
6956
+ }
6957
+ public function getSegment()
6958
+ {
6959
+ return $this->segment;
6960
+ }
6961
+ public function setSort($sort)
6962
+ {
6963
+ $this->sort = $sort;
6964
+ }
6965
+ public function getSort()
6966
+ {
6967
+ return $this->sort;
6968
+ }
6969
+ public function setStartDate($startDate)
6970
+ {
6971
+ $this->startDate = $startDate;
6972
+ }
6973
+ public function getStartDate()
6974
+ {
6975
+ return $this->startDate;
6976
+ }
6977
+ public function setStartIndex($startIndex)
6978
+ {
6979
+ $this->startIndex = $startIndex;
6980
+ }
6981
+ public function getStartIndex()
6982
+ {
6983
+ return $this->startIndex;
6984
+ }
6985
+ }
6986
+
6987
+ class Google_Service_Analytics_GaDataTotalsForAllResults extends Google_Model
6988
+ {
6989
+ }
6990
+
6991
+ class Google_Service_Analytics_Goal extends Google_Model
6992
+ {
6993
+ protected $internal_gapi_mappings = array(
6994
+ );
6995
+ public $accountId;
6996
+ public $active;
6997
+ public $created;
6998
+ protected $eventDetailsType = 'Google_Service_Analytics_GoalEventDetails';
6999
+ protected $eventDetailsDataType = '';
7000
+ public $id;
7001
+ public $internalWebPropertyId;
7002
+ public $kind;
7003
+ public $name;
7004
+ protected $parentLinkType = 'Google_Service_Analytics_GoalParentLink';
7005
+ protected $parentLinkDataType = '';
7006
+ public $profileId;
7007
+ public $selfLink;
7008
+ public $type;
7009
+ public $updated;
7010
+ protected $urlDestinationDetailsType = 'Google_Service_Analytics_GoalUrlDestinationDetails';
7011
+ protected $urlDestinationDetailsDataType = '';
7012
+ public $value;
7013
+ protected $visitNumPagesDetailsType = 'Google_Service_Analytics_GoalVisitNumPagesDetails';
7014
+ protected $visitNumPagesDetailsDataType = '';
7015
+ protected $visitTimeOnSiteDetailsType = 'Google_Service_Analytics_GoalVisitTimeOnSiteDetails';
7016
+ protected $visitTimeOnSiteDetailsDataType = '';
7017
+ public $webPropertyId;
7018
+
7019
+
7020
+ public function setAccountId($accountId)
7021
+ {
7022
+ $this->accountId = $accountId;
7023
+ }
7024
+ public function getAccountId()
7025
+ {
7026
+ return $this->accountId;
7027
+ }
7028
+ public function setActive($active)
7029
+ {
7030
+ $this->active = $active;
7031
+ }
7032
+ public function getActive()
7033
+ {
7034
+ return $this->active;
7035
+ }
7036
+ public function setCreated($created)
7037
+ {
7038
+ $this->created = $created;
7039
+ }
7040
+ public function getCreated()
7041
+ {
7042
+ return $this->created;
7043
+ }
7044
+ public function setEventDetails(Google_Service_Analytics_GoalEventDetails $eventDetails)
7045
+ {
7046
+ $this->eventDetails = $eventDetails;
7047
+ }
7048
+ public function getEventDetails()
7049
+ {
7050
+ return $this->eventDetails;
7051
+ }
7052
+ public function setId($id)
7053
+ {
7054
+ $this->id = $id;
7055
+ }
7056
+ public function getId()
7057
+ {
7058
+ return $this->id;
7059
+ }
7060
+ public function setInternalWebPropertyId($internalWebPropertyId)
7061
+ {
7062
+ $this->internalWebPropertyId = $internalWebPropertyId;
7063
+ }
7064
+ public function getInternalWebPropertyId()
7065
+ {
7066
+ return $this->internalWebPropertyId;
7067
+ }
7068
+ public function setKind($kind)
7069
+ {
7070
+ $this->kind = $kind;
7071
+ }
7072
+ public function getKind()
7073
+ {
7074
+ return $this->kind;
7075
+ }
7076
+ public function setName($name)
7077
+ {
7078
+ $this->name = $name;
7079
+ }
7080
+ public function getName()
7081
+ {
7082
+ return $this->name;
7083
+ }
7084
+ public function setParentLink(Google_Service_Analytics_GoalParentLink $parentLink)
7085
+ {
7086
+ $this->parentLink = $parentLink;
7087
+ }
7088
+ public function getParentLink()
7089
+ {
7090
+ return $this->parentLink;
7091
+ }
7092
+ public function setProfileId($profileId)
7093
+ {
7094
+ $this->profileId = $profileId;
7095
+ }
7096
+ public function getProfileId()
7097
+ {
7098
+ return $this->profileId;
7099
+ }
7100
+ public function setSelfLink($selfLink)
7101
+ {
7102
+ $this->selfLink = $selfLink;
7103
+ }
7104
+ public function getSelfLink()
7105
+ {
7106
+ return $this->selfLink;
7107
+ }
7108
+ public function setType($type)
7109
+ {
7110
+ $this->type = $type;
7111
+ }
7112
+ public function getType()
7113
+ {
7114
+ return $this->type;
7115
+ }
7116
+ public function setUpdated($updated)
7117
+ {
7118
+ $this->updated = $updated;
7119
+ }
7120
+ public function getUpdated()
7121
+ {
7122
+ return $this->updated;
7123
+ }
7124
+ public function setUrlDestinationDetails(Google_Service_Analytics_GoalUrlDestinationDetails $urlDestinationDetails)
7125
+ {
7126
+ $this->urlDestinationDetails = $urlDestinationDetails;
7127
+ }
7128
+ public function getUrlDestinationDetails()
7129
+ {
7130
+ return $this->urlDestinationDetails;
7131
+ }
7132
+ public function setValue($value)
7133
+ {
7134
+ $this->value = $value;
7135
+ }
7136
+ public function getValue()
7137
+ {
7138
+ return $this->value;
7139
+ }
7140
+ public function setVisitNumPagesDetails(Google_Service_Analytics_GoalVisitNumPagesDetails $visitNumPagesDetails)
7141
+ {
7142
+ $this->visitNumPagesDetails = $visitNumPagesDetails;
7143
+ }
7144
+ public function getVisitNumPagesDetails()
7145
+ {
7146
+ return $this->visitNumPagesDetails;
7147
+ }
7148
+ public function setVisitTimeOnSiteDetails(Google_Service_Analytics_GoalVisitTimeOnSiteDetails $visitTimeOnSiteDetails)
7149
+ {
7150
+ $this->visitTimeOnSiteDetails = $visitTimeOnSiteDetails;
7151
+ }
7152
+ public function getVisitTimeOnSiteDetails()
7153
+ {
7154
+ return $this->visitTimeOnSiteDetails;
7155
+ }
7156
+ public function setWebPropertyId($webPropertyId)
7157
+ {
7158
+ $this->webPropertyId = $webPropertyId;
7159
+ }
7160
+ public function getWebPropertyId()
7161
+ {
7162
+ return $this->webPropertyId;
7163
+ }
7164
+ }
7165
+
7166
+ class Google_Service_Analytics_GoalEventDetails extends Google_Collection
7167
+ {
7168
+ protected $collection_key = 'eventConditions';
7169
+ protected $internal_gapi_mappings = array(
7170
+ );
7171
+ protected $eventConditionsType = 'Google_Service_Analytics_GoalEventDetailsEventConditions';
7172
+ protected $eventConditionsDataType = 'array';
7173
+ public $useEventValue;
7174
+
7175
+
7176
+ public function setEventConditions($eventConditions)
7177
+ {
7178
+ $this->eventConditions = $eventConditions;
7179
+ }
7180
+ public function getEventConditions()
7181
+ {
7182
+ return $this->eventConditions;
7183
+ }
7184
+ public function setUseEventValue($useEventValue)
7185
+ {
7186
+ $this->useEventValue = $useEventValue;
7187
+ }
7188
+ public function getUseEventValue()
7189
+ {
7190
+ return $this->useEventValue;
7191
+ }
7192
+ }
7193
+
7194
+ class Google_Service_Analytics_GoalEventDetailsEventConditions extends Google_Model
7195
+ {
7196
+ protected $internal_gapi_mappings = array(
7197
+ );
7198
+ public $comparisonType;
7199
+ public $comparisonValue;
7200
+ public $expression;
7201
+ public $matchType;
7202
+ public $type;
7203
+
7204
+
7205
+ public function setComparisonType($comparisonType)
7206
+ {
7207
+ $this->comparisonType = $comparisonType;
7208
+ }
7209
+ public function getComparisonType()
7210
+ {
7211
+ return $this->comparisonType;
7212
+ }
7213
+ public function setComparisonValue($comparisonValue)
7214
+ {
7215
+ $this->comparisonValue = $comparisonValue;
7216
+ }
7217
+ public function getComparisonValue()
7218
+ {
7219
+ return $this->comparisonValue;
7220
+ }
7221
+ public function setExpression($expression)
7222
+ {
7223
+ $this->expression = $expression;
7224
+ }
7225
+ public function getExpression()
7226
+ {
7227
+ return $this->expression;
7228
+ }
7229
+ public function setMatchType($matchType)
7230
+ {
7231
+ $this->matchType = $matchType;
7232
+ }
7233
+ public function getMatchType()
7234
+ {
7235
+ return $this->matchType;
7236
+ }
7237
+ public function setType($type)
7238
+ {
7239
+ $this->type = $type;
7240
+ }
7241
+ public function getType()
7242
+ {
7243
+ return $this->type;
7244
+ }
7245
+ }
7246
+
7247
+ class Google_Service_Analytics_GoalParentLink extends Google_Model
7248
+ {
7249
+ protected $internal_gapi_mappings = array(
7250
+ );
7251
+ public $href;
7252
+ public $type;
7253
+
7254
+
7255
+ public function setHref($href)
7256
+ {
7257
+ $this->href = $href;
7258
+ }
7259
+ public function getHref()
7260
+ {
7261
+ return $this->href;
7262
+ }
7263
+ public function setType($type)
7264
+ {
7265
+ $this->type = $type;
7266
+ }
7267
+ public function getType()
7268
+ {
7269
+ return $this->type;
7270
+ }
7271
+ }
7272
+
7273
+ class Google_Service_Analytics_GoalUrlDestinationDetails extends Google_Collection
7274
+ {
7275
+ protected $collection_key = 'steps';
7276
+ protected $internal_gapi_mappings = array(
7277
+ );
7278
+ public $caseSensitive;
7279
+ public $firstStepRequired;
7280
+ public $matchType;
7281
+ protected $stepsType = 'Google_Service_Analytics_GoalUrlDestinationDetailsSteps';
7282
+ protected $stepsDataType = 'array';
7283
+ public $url;
7284
+
7285
+
7286
+ public function setCaseSensitive($caseSensitive)
7287
+ {
7288
+ $this->caseSensitive = $caseSensitive;
7289
+ }
7290
+ public function getCaseSensitive()
7291
+ {
7292
+ return $this->caseSensitive;
7293
+ }
7294
+ public function setFirstStepRequired($firstStepRequired)
7295
+ {
7296
+ $this->firstStepRequired = $firstStepRequired;
7297
+ }
7298
+ public function getFirstStepRequired()
7299
+ {
7300
+ return $this->firstStepRequired;
7301
+ }
7302
+ public function setMatchType($matchType)
7303
+ {
7304
+ $this->matchType = $matchType;
7305
+ }
7306
+ public function getMatchType()
7307
+ {
7308
+ return $this->matchType;
7309
+ }
7310
+ public function setSteps($steps)
7311
+ {
7312
+ $this->steps = $steps;
7313
+ }
7314
+ public function getSteps()
7315
+ {
7316
+ return $this->steps;
7317
+ }
7318
+ public function setUrl($url)
7319
+ {
7320
+ $this->url = $url;
7321
+ }
7322
+ public function getUrl()
7323
+ {
7324
+ return $this->url;
7325
+ }
7326
+ }
7327
+
7328
+ class Google_Service_Analytics_GoalUrlDestinationDetailsSteps extends Google_Model
7329
+ {
7330
+ protected $internal_gapi_mappings = array(
7331
+ );
7332
+ public $name;
7333
+ public $number;
7334
+ public $url;
7335
+
7336
+
7337
+ public function setName($name)
7338
+ {
7339
+ $this->name = $name;
7340
+ }
7341
+ public function getName()
7342
+ {
7343
+ return $this->name;
7344
+ }
7345
+ public function setNumber($number)
7346
+ {
7347
+ $this->number = $number;
7348
+ }
7349
+ public function getNumber()
7350
+ {
7351
+ return $this->number;
7352
+ }
7353
+ public function setUrl($url)
7354
+ {
7355
+ $this->url = $url;
7356
+ }
7357
+ public function getUrl()
7358
+ {
7359
+ return $this->url;
7360
+ }
7361
+ }
7362
+
7363
+ class Google_Service_Analytics_GoalVisitNumPagesDetails extends Google_Model
7364
+ {
7365
+ protected $internal_gapi_mappings = array(
7366
+ );
7367
+ public $comparisonType;
7368
+ public $comparisonValue;
7369
+
7370
+
7371
+ public function setComparisonType($comparisonType)
7372
+ {
7373
+ $this->comparisonType = $comparisonType;
7374
+ }
7375
+ public function getComparisonType()
7376
+ {
7377
+ return $this->comparisonType;
7378
+ }
7379
+ public function setComparisonValue($comparisonValue)
7380
+ {
7381
+ $this->comparisonValue = $comparisonValue;
7382
+ }
7383
+ public function getComparisonValue()
7384
+ {
7385
+ return $this->comparisonValue;
7386
+ }
7387
+ }
7388
+
7389
+ class Google_Service_Analytics_GoalVisitTimeOnSiteDetails extends Google_Model
7390
+ {
7391
+ protected $internal_gapi_mappings = array(
7392
+ );
7393
+ public $comparisonType;
7394
+ public $comparisonValue;
7395
+
7396
+
7397
+ public function setComparisonType($comparisonType)
7398
+ {
7399
+ $this->comparisonType = $comparisonType;
7400
+ }
7401
+ public function getComparisonType()
7402
+ {
7403
+ return $this->comparisonType;
7404
+ }
7405
+ public function setComparisonValue($comparisonValue)
7406
+ {
7407
+ $this->comparisonValue = $comparisonValue;
7408
+ }
7409
+ public function getComparisonValue()
7410
+ {
7411
+ return $this->comparisonValue;
7412
+ }
7413
+ }
7414
+
7415
+ class Google_Service_Analytics_Goals extends Google_Collection
7416
+ {
7417
+ protected $collection_key = 'items';
7418
+ protected $internal_gapi_mappings = array(
7419
+ );
7420
+ protected $itemsType = 'Google_Service_Analytics_Goal';
7421
+ protected $itemsDataType = 'array';
7422
+ public $itemsPerPage;
7423
+ public $kind;
7424
+ public $nextLink;
7425
+ public $previousLink;
7426
+ public $startIndex;
7427
+ public $totalResults;
7428
+ public $username;
7429
+
7430
+
7431
+ public function setItems($items)
7432
+ {
7433
+ $this->items = $items;
7434
+ }
7435
+ public function getItems()
7436
+ {
7437
+ return $this->items;
7438
+ }
7439
+ public function setItemsPerPage($itemsPerPage)
7440
+ {
7441
+ $this->itemsPerPage = $itemsPerPage;
7442
+ }
7443
+ public function getItemsPerPage()
7444
+ {
7445
+ return $this->itemsPerPage;
7446
+ }
7447
+ public function setKind($kind)
7448
+ {
7449
+ $this->kind = $kind;
7450
+ }
7451
+ public function getKind()
7452
+ {
7453
+ return $this->kind;
7454
+ }
7455
+ public function setNextLink($nextLink)
7456
+ {
7457
+ $this->nextLink = $nextLink;
7458
+ }
7459
+ public function getNextLink()
7460
+ {
7461
+ return $this->nextLink;
7462
+ }
7463
+ public function setPreviousLink($previousLink)
7464
+ {
7465
+ $this->previousLink = $previousLink;
7466
+ }
7467
+ public function getPreviousLink()
7468
+ {
7469
+ return $this->previousLink;
7470
+ }
7471
+ public function setStartIndex($startIndex)
7472
+ {
7473
+ $this->startIndex = $startIndex;
7474
+ }
7475
+ public function getStartIndex()
7476
+ {
7477
+ return $this->startIndex;
7478
+ }
7479
+ public function setTotalResults($totalResults)
7480
+ {
7481
+ $this->totalResults = $totalResults;
7482
+ }
7483
+ public function getTotalResults()
7484
+ {
7485
+ return $this->totalResults;
7486
+ }
7487
+ public function setUsername($username)
7488
+ {
7489
+ $this->username = $username;
7490
+ }
7491
+ public function getUsername()
7492
+ {
7493
+ return $this->username;
7494
+ }
7495
+ }
7496
+
7497
+ class Google_Service_Analytics_McfData extends Google_Collection
7498
+ {
7499
+ protected $collection_key = 'rows';
7500
+ protected $internal_gapi_mappings = array(
7501
+ );
7502
+ protected $columnHeadersType = 'Google_Service_Analytics_McfDataColumnHeaders';
7503
+ protected $columnHeadersDataType = 'array';
7504
+ public $containsSampledData;
7505
+ public $id;
7506
+ public $itemsPerPage;
7507
+ public $kind;
7508
+ public $nextLink;
7509
+ public $previousLink;
7510
+ protected $profileInfoType = 'Google_Service_Analytics_McfDataProfileInfo';
7511
+ protected $profileInfoDataType = '';
7512
+ protected $queryType = 'Google_Service_Analytics_McfDataQuery';
7513
+ protected $queryDataType = '';
7514
+ protected $rowsType = 'Google_Service_Analytics_McfDataRows';
7515
+ protected $rowsDataType = 'array';
7516
+ public $sampleSize;
7517
+ public $sampleSpace;
7518
+ public $selfLink;
7519
+ public $totalResults;
7520
+ public $totalsForAllResults;
7521
+
7522
+
7523
+ public function setColumnHeaders($columnHeaders)
7524
+ {
7525
+ $this->columnHeaders = $columnHeaders;
7526
+ }
7527
+ public function getColumnHeaders()
7528
+ {
7529
+ return $this->columnHeaders;
7530
+ }
7531
+ public function setContainsSampledData($containsSampledData)
7532
+ {
7533
+ $this->containsSampledData = $containsSampledData;
7534
+ }
7535
+ public function getContainsSampledData()
7536
+ {
7537
+ return $this->containsSampledData;
7538
+ }
7539
+ public function setId($id)
7540
+ {
7541
+ $this->id = $id;
7542
+ }
7543
+ public function getId()
7544
+ {
7545
+ return $this->id;
7546
+ }
7547
+ public function setItemsPerPage($itemsPerPage)
7548
+ {
7549
+ $this->itemsPerPage = $itemsPerPage;
7550
+ }
7551
+ public function getItemsPerPage()
7552
+ {
7553
+ return $this->itemsPerPage;
7554
+ }
7555
+ public function setKind($kind)
7556
+ {
7557
+ $this->kind = $kind;
7558
+ }
7559
+ public function getKind()
7560
+ {
7561
+ return $this->kind;
7562
+ }
7563
+ public function setNextLink($nextLink)
7564
+ {
7565
+ $this->nextLink = $nextLink;
7566
+ }
7567
+ public function getNextLink()
7568
+ {
7569
+ return $this->nextLink;
7570
+ }
7571
+ public function setPreviousLink($previousLink)
7572
+ {
7573
+ $this->previousLink = $previousLink;
7574
+ }
7575
+ public function getPreviousLink()
7576
+ {
7577
+ return $this->previousLink;
7578
+ }
7579
+ public function setProfileInfo(Google_Service_Analytics_McfDataProfileInfo $profileInfo)
7580
+ {
7581
+ $this->profileInfo = $profileInfo;
7582
+ }
7583
+ public function getProfileInfo()
7584
+ {
7585
+ return $this->profileInfo;
7586
+ }
7587
+ public function setQuery(Google_Service_Analytics_McfDataQuery $query)
7588
+ {
7589
+ $this->query = $query;
7590
+ }
7591
+ public function getQuery()
7592
+ {
7593
+ return $this->query;
7594
+ }
7595
+ public function setRows($rows)
7596
+ {
7597
+ $this->rows = $rows;
7598
+ }
7599
+ public function getRows()
7600
+ {
7601
+ return $this->rows;
7602
+ }
7603
+ public function setSampleSize($sampleSize)
7604
+ {
7605
+ $this->sampleSize = $sampleSize;
7606
+ }
7607
+ public function getSampleSize()
7608
+ {
7609
+ return $this->sampleSize;
7610
+ }
7611
+ public function setSampleSpace($sampleSpace)
7612
+ {
7613
+ $this->sampleSpace = $sampleSpace;
7614
+ }
7615
+ public function getSampleSpace()
7616
+ {
7617
+ return $this->sampleSpace;
7618
+ }
7619
+ public function setSelfLink($selfLink)
7620
+ {
7621
+ $this->selfLink = $selfLink;
7622
+ }
7623
+ public function getSelfLink()
7624
+ {
7625
+ return $this->selfLink;
7626
+ }
7627
+ public function setTotalResults($totalResults)
7628
+ {
7629
+ $this->totalResults = $totalResults;
7630
+ }
7631
+ public function getTotalResults()
7632
+ {
7633
+ return $this->totalResults;
7634
+ }
7635
+ public function setTotalsForAllResults($totalsForAllResults)
7636
+ {
7637
+ $this->totalsForAllResults = $totalsForAllResults;
7638
+ }
7639
+ public function getTotalsForAllResults()
7640
+ {
7641
+ return $this->totalsForAllResults;
7642
+ }
7643
+ }
7644
+
7645
+ class Google_Service_Analytics_McfDataColumnHeaders extends Google_Model
7646
+ {
7647
+ protected $internal_gapi_mappings = array(
7648
+ );
7649
+ public $columnType;
7650
+ public $dataType;
7651
+ public $name;
7652
+
7653
+
7654
+ public function setColumnType($columnType)
7655
+ {
7656
+ $this->columnType = $columnType;
7657
+ }
7658
+ public function getColumnType()
7659
+ {
7660
+ return $this->columnType;
7661
+ }
7662
+ public function setDataType($dataType)
7663
+ {
7664
+ $this->dataType = $dataType;
7665
+ }
7666
+ public function getDataType()
7667
+ {
7668
+ return $this->dataType;
7669
+ }
7670
+ public function setName($name)
7671
+ {
7672
+ $this->name = $name;
7673
+ }
7674
+ public function getName()
7675
+ {
7676
+ return $this->name;
7677
+ }
7678
+ }
7679
+
7680
+ class Google_Service_Analytics_McfDataProfileInfo extends Google_Model
7681
+ {
7682
+ protected $internal_gapi_mappings = array(
7683
+ );
7684
+ public $accountId;
7685
+ public $internalWebPropertyId;
7686
+ public $profileId;
7687
+ public $profileName;
7688
+ public $tableId;
7689
+ public $webPropertyId;
7690
+
7691
+
7692
+ public function setAccountId($accountId)
7693
+ {
7694
+ $this->accountId = $accountId;
7695
+ }
7696
+ public function getAccountId()
7697
+ {
7698
+ return $this->accountId;
7699
+ }
7700
+ public function setInternalWebPropertyId($internalWebPropertyId)
7701
+ {
7702
+ $this->internalWebPropertyId = $internalWebPropertyId;
7703
+ }
7704
+ public function getInternalWebPropertyId()
7705
+ {
7706
+ return $this->internalWebPropertyId;
7707
+ }
7708
+ public function setProfileId($profileId)
7709
+ {
7710
+ $this->profileId = $profileId;
7711
+ }
7712
+ public function getProfileId()
7713
+ {
7714
+ return $this->profileId;
7715
+ }
7716
+ public function setProfileName($profileName)
7717
+ {
7718
+ $this->profileName = $profileName;
7719
+ }
7720
+ public function getProfileName()
7721
+ {
7722
+ return $this->profileName;
7723
+ }
7724
+ public function setTableId($tableId)
7725
+ {
7726
+ $this->tableId = $tableId;
7727
+ }
7728
+ public function getTableId()
7729
+ {
7730
+ return $this->tableId;
7731
+ }
7732
+ public function setWebPropertyId($webPropertyId)
7733
+ {
7734
+ $this->webPropertyId = $webPropertyId;
7735
+ }
7736
+ public function getWebPropertyId()
7737
+ {
7738
+ return $this->webPropertyId;
7739
+ }
7740
+ }
7741
+
7742
+ class Google_Service_Analytics_McfDataQuery extends Google_Collection
7743
+ {
7744
+ protected $collection_key = 'sort';
7745
+ protected $internal_gapi_mappings = array(
7746
+ "endDate" => "end-date",
7747
+ "maxResults" => "max-results",
7748
+ "startDate" => "start-date",
7749
+ "startIndex" => "start-index",
7750
+ );
7751
+ public $dimensions;
7752
+ public $endDate;
7753
+ public $filters;
7754
+ public $ids;
7755
+ public $maxResults;
7756
+ public $metrics;
7757
+ public $samplingLevel;
7758
+ public $segment;
7759
+ public $sort;
7760
+ public $startDate;
7761
+ public $startIndex;
7762
+
7763
+
7764
+ public function setDimensions($dimensions)
7765
+ {
7766
+ $this->dimensions = $dimensions;
7767
+ }
7768
+ public function getDimensions()
7769
+ {
7770
+ return $this->dimensions;
7771
+ }
7772
+ public function setEndDate($endDate)
7773
+ {
7774
+ $this->endDate = $endDate;
7775
+ }
7776
+ public function getEndDate()
7777
+ {
7778
+ return $this->endDate;
7779
+ }
7780
+ public function setFilters($filters)
7781
+ {
7782
+ $this->filters = $filters;
7783
+ }
7784
+ public function getFilters()
7785
+ {
7786
+ return $this->filters;
7787
+ }
7788
+ public function setIds($ids)
7789
+ {
7790
+ $this->ids = $ids;
7791
+ }
7792
+ public function getIds()
7793
+ {
7794
+ return $this->ids;
7795
+ }
7796
+ public function setMaxResults($maxResults)
7797
+ {
7798
+ $this->maxResults = $maxResults;
7799
+ }
7800
+ public function getMaxResults()
7801
+ {
7802
+ return $this->maxResults;
7803
+ }
7804
+ public function setMetrics($metrics)
7805
+ {
7806
+ $this->metrics = $metrics;
7807
+ }
7808
+ public function getMetrics()
7809
+ {
7810
+ return $this->metrics;
7811
+ }
7812
+ public function setSamplingLevel($samplingLevel)
7813
+ {
7814
+ $this->samplingLevel = $samplingLevel;
7815
+ }
7816
+ public function getSamplingLevel()
7817
+ {
7818
+ return $this->samplingLevel;
7819
+ }
7820
+ public function setSegment($segment)
7821
+ {
7822
+ $this->segment = $segment;
7823
+ }
7824
+ public function getSegment()
7825
+ {
7826
+ return $this->segment;
7827
+ }
7828
+ public function setSort($sort)
7829
+ {
7830
+ $this->sort = $sort;
7831
+ }
7832
+ public function getSort()
7833
+ {
7834
+ return $this->sort;
7835
+ }
7836
+ public function setStartDate($startDate)
7837
+ {
7838
+ $this->startDate = $startDate;
7839
+ }
7840
+ public function getStartDate()
7841
+ {
7842
+ return $this->startDate;
7843
+ }
7844
+ public function setStartIndex($startIndex)
7845
+ {
7846
+ $this->startIndex = $startIndex;
7847
+ }
7848
+ public function getStartIndex()
7849
+ {
7850
+ return $this->startIndex;
7851
+ }
7852
+ }
7853
+
7854
+ class Google_Service_Analytics_McfDataRows extends Google_Collection
7855
+ {
7856
+ protected $collection_key = 'conversionPathValue';
7857
+ protected $internal_gapi_mappings = array(
7858
+ );
7859
+ protected $conversionPathValueType = 'Google_Service_Analytics_McfDataRowsConversionPathValue';
7860
+ protected $conversionPathValueDataType = 'array';
7861
+ public $primitiveValue;
7862
+
7863
+
7864
+ public function setConversionPathValue($conversionPathValue)
7865
+ {
7866
+ $this->conversionPathValue = $conversionPathValue;
7867
+ }
7868
+ public function getConversionPathValue()
7869
+ {
7870
+ return $this->conversionPathValue;
7871
+ }
7872
+ public function setPrimitiveValue($primitiveValue)
7873
+ {
7874
+ $this->primitiveValue = $primitiveValue;
7875
+ }
7876
+ public function getPrimitiveValue()
7877
+ {
7878
+ return $this->primitiveValue;
7879
+ }
7880
+ }
7881
+
7882
+ class Google_Service_Analytics_McfDataRowsConversionPathValue extends Google_Model
7883
+ {
7884
+ protected $internal_gapi_mappings = array(
7885
+ );
7886
+ public $interactionType;
7887
+ public $nodeValue;
7888
+
7889
+
7890
+ public function setInteractionType($interactionType)
7891
+ {
7892
+ $this->interactionType = $interactionType;
7893
+ }
7894
+ public function getInteractionType()
7895
+ {
7896
+ return $this->interactionType;
7897
+ }
7898
+ public function setNodeValue($nodeValue)
7899
+ {
7900
+ $this->nodeValue = $nodeValue;
7901
+ }
7902
+ public function getNodeValue()
7903
+ {
7904
+ return $this->nodeValue;
7905
+ }
7906
+ }
7907
+
7908
+ class Google_Service_Analytics_McfDataTotalsForAllResults extends Google_Model
7909
+ {
7910
+ }
7911
+
7912
+ class Google_Service_Analytics_Profile extends Google_Model
7913
+ {
7914
+ protected $internal_gapi_mappings = array(
7915
+ );
7916
+ public $accountId;
7917
+ protected $childLinkType = 'Google_Service_Analytics_ProfileChildLink';
7918
+ protected $childLinkDataType = '';
7919
+ public $created;
7920
+ public $currency;
7921
+ public $defaultPage;
7922
+ public $eCommerceTracking;
7923
+ public $enhancedECommerceTracking;
7924
+ public $excludeQueryParameters;
7925
+ public $id;
7926
+ public $internalWebPropertyId;
7927
+ public $kind;
7928
+ public $name;
7929
+ protected $parentLinkType = 'Google_Service_Analytics_ProfileParentLink';
7930
+ protected $parentLinkDataType = '';
7931
+ protected $permissionsType = 'Google_Service_Analytics_ProfilePermissions';
7932
+ protected $permissionsDataType = '';
7933
+ public $selfLink;
7934
+ public $siteSearchCategoryParameters;
7935
+ public $siteSearchQueryParameters;
7936
+ public $stripSiteSearchCategoryParameters;
7937
+ public $stripSiteSearchQueryParameters;
7938
+ public $timezone;
7939
+ public $type;
7940
+ public $updated;
7941
+ public $webPropertyId;
7942
+ public $websiteUrl;
7943
+
7944
+
7945
+ public function setAccountId($accountId)
7946
+ {
7947
+ $this->accountId = $accountId;
7948
+ }
7949
+ public function getAccountId()
7950
+ {
7951
+ return $this->accountId;
7952
+ }
7953
+ public function setChildLink(Google_Service_Analytics_ProfileChildLink $childLink)
7954
+ {
7955
+ $this->childLink = $childLink;
7956
+ }
7957
+ public function getChildLink()
7958
+ {
7959
+ return $this->childLink;
7960
+ }
7961
+ public function setCreated($created)
7962
+ {
7963
+ $this->created = $created;
7964
+ }
7965
+ public function getCreated()
7966
+ {
7967
+ return $this->created;
7968
+ }
7969
+ public function setCurrency($currency)
7970
+ {
7971
+ $this->currency = $currency;
7972
+ }
7973
+ public function getCurrency()
7974
+ {
7975
+ return $this->currency;
7976
+ }
7977
+ public function setDefaultPage($defaultPage)
7978
+ {
7979
+ $this->defaultPage = $defaultPage;
7980
+ }
7981
+ public function getDefaultPage()
7982
+ {
7983
+ return $this->defaultPage;
7984
+ }
7985
+ public function setECommerceTracking($eCommerceTracking)
7986
+ {
7987
+ $this->eCommerceTracking = $eCommerceTracking;
7988
+ }
7989
+ public function getECommerceTracking()
7990
+ {
7991
+ return $this->eCommerceTracking;
7992
+ }
7993
+ public function setEnhancedECommerceTracking($enhancedECommerceTracking)
7994
+ {
7995
+ $this->enhancedECommerceTracking = $enhancedECommerceTracking;
7996
+ }
7997
+ public function getEnhancedECommerceTracking()
7998
+ {
7999
+ return $this->enhancedECommerceTracking;
8000
+ }
8001
+ public function setExcludeQueryParameters($excludeQueryParameters)
8002
+ {
8003
+ $this->excludeQueryParameters = $excludeQueryParameters;
8004
+ }
8005
+ public function getExcludeQueryParameters()
8006
+ {
8007
+ return $this->excludeQueryParameters;
8008
+ }
8009
+ public function setId($id)
8010
+ {
8011
+ $this->id = $id;
8012
+ }
8013
+ public function getId()
8014
+ {
8015
+ return $this->id;
8016
+ }
8017
+ public function setInternalWebPropertyId($internalWebPropertyId)
8018
+ {
8019
+ $this->internalWebPropertyId = $internalWebPropertyId;
8020
+ }
8021
+ public function getInternalWebPropertyId()
8022
+ {
8023
+ return $this->internalWebPropertyId;
8024
+ }
8025
+ public function setKind($kind)
8026
+ {
8027
+ $this->kind = $kind;
8028
+ }
8029
+ public function getKind()
8030
+ {
8031
+ return $this->kind;
8032
+ }
8033
+ public function setName($name)
8034
+ {
8035
+ $this->name = $name;
8036
+ }
8037
+ public function getName()
8038
+ {
8039
+ return $this->name;
8040
+ }
8041
+ public function setParentLink(Google_Service_Analytics_ProfileParentLink $parentLink)
8042
+ {
8043
+ $this->parentLink = $parentLink;
8044
+ }
8045
+ public function getParentLink()
8046
+ {
8047
+ return $this->parentLink;
8048
+ }
8049
+ public function setPermissions(Google_Service_Analytics_ProfilePermissions $permissions)
8050
+ {
8051
+ $this->permissions = $permissions;
8052
+ }
8053
+ public function getPermissions()
8054
+ {
8055
+ return $this->permissions;
8056
+ }
8057
+ public function setSelfLink($selfLink)
8058
+ {
8059
+ $this->selfLink = $selfLink;
8060
+ }
8061
+ public function getSelfLink()
8062
+ {
8063
+ return $this->selfLink;
8064
+ }
8065
+ public function setSiteSearchCategoryParameters($siteSearchCategoryParameters)
8066
+ {
8067
+ $this->siteSearchCategoryParameters = $siteSearchCategoryParameters;
8068
+ }
8069
+ public function getSiteSearchCategoryParameters()
8070
+ {
8071
+ return $this->siteSearchCategoryParameters;
8072
+ }
8073
+ public function setSiteSearchQueryParameters($siteSearchQueryParameters)
8074
+ {
8075
+ $this->siteSearchQueryParameters = $siteSearchQueryParameters;
8076
+ }
8077
+ public function getSiteSearchQueryParameters()
8078
+ {
8079
+ return $this->siteSearchQueryParameters;
8080
+ }
8081
+ public function setStripSiteSearchCategoryParameters($stripSiteSearchCategoryParameters)
8082
+ {
8083
+ $this->stripSiteSearchCategoryParameters = $stripSiteSearchCategoryParameters;
8084
+ }
8085
+ public function getStripSiteSearchCategoryParameters()
8086
+ {
8087
+ return $this->stripSiteSearchCategoryParameters;
8088
+ }
8089
+ public function setStripSiteSearchQueryParameters($stripSiteSearchQueryParameters)
8090
+ {
8091
+ $this->stripSiteSearchQueryParameters = $stripSiteSearchQueryParameters;
8092
+ }
8093
+ public function getStripSiteSearchQueryParameters()
8094
+ {
8095
+ return $this->stripSiteSearchQueryParameters;
8096
+ }
8097
+ public function setTimezone($timezone)
8098
+ {
8099
+ $this->timezone = $timezone;
8100
+ }
8101
+ public function getTimezone()
8102
+ {
8103
+ return $this->timezone;
8104
+ }
8105
+ public function setType($type)
8106
+ {
8107
+ $this->type = $type;
8108
+ }
8109
+ public function getType()
8110
+ {
8111
+ return $this->type;
8112
+ }
8113
+ public function setUpdated($updated)
8114
+ {
8115
+ $this->updated = $updated;
8116
+ }
8117
+ public function getUpdated()
8118
+ {
8119
+ return $this->updated;
8120
+ }
8121
+ public function setWebPropertyId($webPropertyId)
8122
+ {
8123
+ $this->webPropertyId = $webPropertyId;
8124
+ }
8125
+ public function getWebPropertyId()
8126
+ {
8127
+ return $this->webPropertyId;
8128
+ }
8129
+ public function setWebsiteUrl($websiteUrl)
8130
+ {
8131
+ $this->websiteUrl = $websiteUrl;
8132
+ }
8133
+ public function getWebsiteUrl()
8134
+ {
8135
+ return $this->websiteUrl;
8136
+ }
8137
+ }
8138
+
8139
+ class Google_Service_Analytics_ProfileChildLink extends Google_Model
8140
+ {
8141
+ protected $internal_gapi_mappings = array(
8142
+ );
8143
+ public $href;
8144
+ public $type;
8145
+
8146
+
8147
+ public function setHref($href)
8148
+ {
8149
+ $this->href = $href;
8150
+ }
8151
+ public function getHref()
8152
+ {
8153
+ return $this->href;
8154
+ }
8155
+ public function setType($type)
8156
+ {
8157
+ $this->type = $type;
8158
+ }
8159
+ public function getType()
8160
+ {
8161
+ return $this->type;
8162
+ }
8163
+ }
8164
+
8165
+ class Google_Service_Analytics_ProfileFilterLink extends Google_Model
8166
+ {
8167
+ protected $internal_gapi_mappings = array(
8168
+ );
8169
+ protected $filterRefType = 'Google_Service_Analytics_FilterRef';
8170
+ protected $filterRefDataType = '';
8171
+ public $id;
8172
+ public $kind;
8173
+ protected $profileRefType = 'Google_Service_Analytics_ProfileRef';
8174
+ protected $profileRefDataType = '';
8175
+ public $rank;
8176
+ public $selfLink;
8177
+
8178
+
8179
+ public function setFilterRef(Google_Service_Analytics_FilterRef $filterRef)
8180
+ {
8181
+ $this->filterRef = $filterRef;
8182
+ }
8183
+ public function getFilterRef()
8184
+ {
8185
+ return $this->filterRef;
8186
+ }
8187
+ public function setId($id)
8188
+ {
8189
+ $this->id = $id;
8190
+ }
8191
+ public function getId()
8192
+ {
8193
+ return $this->id;
8194
+ }
8195
+ public function setKind($kind)
8196
+ {
8197
+ $this->kind = $kind;
8198
+ }
8199
+ public function getKind()
8200
+ {
8201
+ return $this->kind;
8202
+ }
8203
+ public function setProfileRef(Google_Service_Analytics_ProfileRef $profileRef)
8204
+ {
8205
+ $this->profileRef = $profileRef;
8206
+ }
8207
+ public function getProfileRef()
8208
+ {
8209
+ return $this->profileRef;
8210
+ }
8211
+ public function setRank($rank)
8212
+ {
8213
+ $this->rank = $rank;
8214
+ }
8215
+ public function getRank()
8216
+ {
8217
+ return $this->rank;
8218
+ }
8219
+ public function setSelfLink($selfLink)
8220
+ {
8221
+ $this->selfLink = $selfLink;
8222
+ }
8223
+ public function getSelfLink()
8224
+ {
8225
+ return $this->selfLink;
8226
+ }
8227
+ }
8228
+
8229
+ class Google_Service_Analytics_ProfileFilterLinks extends Google_Collection
8230
+ {
8231
+ protected $collection_key = 'items';
8232
+ protected $internal_gapi_mappings = array(
8233
+ );
8234
+ protected $itemsType = 'Google_Service_Analytics_ProfileFilterLink';
8235
+ protected $itemsDataType = 'array';
8236
+ public $itemsPerPage;
8237
+ public $kind;
8238
+ public $nextLink;
8239
+ public $previousLink;
8240
+ public $startIndex;
8241
+ public $totalResults;
8242
+ public $username;
8243
+
8244
+
8245
+ public function setItems($items)
8246
+ {
8247
+ $this->items = $items;
8248
+ }
8249
+ public function getItems()
8250
+ {
8251
+ return $this->items;
8252
+ }
8253
+ public function setItemsPerPage($itemsPerPage)
8254
+ {
8255
+ $this->itemsPerPage = $itemsPerPage;
8256
+ }
8257
+ public function getItemsPerPage()
8258
+ {
8259
+ return $this->itemsPerPage;
8260
+ }
8261
+ public function setKind($kind)
8262
+ {
8263
+ $this->kind = $kind;
8264
+ }
8265
+ public function getKind()
8266
+ {
8267
+ return $this->kind;
8268
+ }
8269
+ public function setNextLink($nextLink)
8270
+ {
8271
+ $this->nextLink = $nextLink;
8272
+ }
8273
+ public function getNextLink()
8274
+ {
8275
+ return $this->nextLink;
8276
+ }
8277
+ public function setPreviousLink($previousLink)
8278
+ {
8279
+ $this->previousLink = $previousLink;
8280
+ }
8281
+ public function getPreviousLink()
8282
+ {
8283
+ return $this->previousLink;
8284
+ }
8285
+ public function setStartIndex($startIndex)
8286
+ {
8287
+ $this->startIndex = $startIndex;
8288
+ }
8289
+ public function getStartIndex()
8290
+ {
8291
+ return $this->startIndex;
8292
+ }
8293
+ public function setTotalResults($totalResults)
8294
+ {
8295
+ $this->totalResults = $totalResults;
8296
+ }
8297
+ public function getTotalResults()
8298
+ {
8299
+ return $this->totalResults;
8300
+ }
8301
+ public function setUsername($username)
8302
+ {
8303
+ $this->username = $username;
8304
+ }
8305
+ public function getUsername()
8306
+ {
8307
+ return $this->username;
8308
+ }
8309
+ }
8310
+
8311
+ class Google_Service_Analytics_ProfileParentLink extends Google_Model
8312
+ {
8313
+ protected $internal_gapi_mappings = array(
8314
+ );
8315
+ public $href;
8316
+ public $type;
8317
+
8318
+
8319
+ public function setHref($href)
8320
+ {
8321
+ $this->href = $href;
8322
+ }
8323
+ public function getHref()
8324
+ {
8325
+ return $this->href;
8326
+ }
8327
+ public function setType($type)
8328
+ {
8329
+ $this->type = $type;
8330
+ }
8331
+ public function getType()
8332
+ {
8333
+ return $this->type;
8334
+ }
8335
+ }
8336
+
8337
+ class Google_Service_Analytics_ProfilePermissions extends Google_Collection
8338
+ {
8339
+ protected $collection_key = 'effective';
8340
+ protected $internal_gapi_mappings = array(
8341
+ );
8342
+ public $effective;
8343
+
8344
+
8345
+ public function setEffective($effective)
8346
+ {
8347
+ $this->effective = $effective;
8348
+ }
8349
+ public function getEffective()
8350
+ {
8351
+ return $this->effective;
8352
+ }
8353
+ }
8354
+
8355
+ class Google_Service_Analytics_ProfileRef extends Google_Model
8356
+ {
8357
+ protected $internal_gapi_mappings = array(
8358
+ );
8359
+ public $accountId;
8360
+ public $href;
8361
+ public $id;
8362
+ public $internalWebPropertyId;
8363
+ public $kind;
8364
+ public $name;
8365
+ public $webPropertyId;
8366
+
8367
+
8368
+ public function setAccountId($accountId)
8369
+ {
8370
+ $this->accountId = $accountId;
8371
+ }
8372
+ public function getAccountId()
8373
+ {
8374
+ return $this->accountId;
8375
+ }
8376
+ public function setHref($href)
8377
+ {
8378
+ $this->href = $href;
8379
+ }
8380
+ public function getHref()
8381
+ {
8382
+ return $this->href;
8383
+ }
8384
+ public function setId($id)
8385
+ {
8386
+ $this->id = $id;
8387
+ }
8388
+ public function getId()
8389
+ {
8390
+ return $this->id;
8391
+ }
8392
+ public function setInternalWebPropertyId($internalWebPropertyId)
8393
+ {
8394
+ $this->internalWebPropertyId = $internalWebPropertyId;
8395
+ }
8396
+ public function getInternalWebPropertyId()
8397
+ {
8398
+ return $this->internalWebPropertyId;
8399
+ }
8400
+ public function setKind($kind)
8401
+ {
8402
+ $this->kind = $kind;
8403
+ }
8404
+ public function getKind()
8405
+ {
8406
+ return $this->kind;
8407
+ }
8408
+ public function setName($name)
8409
+ {
8410
+ $this->name = $name;
8411
+ }
8412
+ public function getName()
8413
+ {
8414
+ return $this->name;
8415
+ }
8416
+ public function setWebPropertyId($webPropertyId)
8417
+ {
8418
+ $this->webPropertyId = $webPropertyId;
8419
+ }
8420
+ public function getWebPropertyId()
8421
+ {
8422
+ return $this->webPropertyId;
8423
+ }
8424
+ }
8425
+
8426
+ class Google_Service_Analytics_ProfileSummary extends Google_Model
8427
+ {
8428
+ protected $internal_gapi_mappings = array(
8429
+ );
8430
+ public $id;
8431
+ public $kind;
8432
+ public $name;
8433
+ public $type;
8434
+
8435
+
8436
+ public function setId($id)
8437
+ {
8438
+ $this->id = $id;
8439
+ }
8440
+ public function getId()
8441
+ {
8442
+ return $this->id;
8443
+ }
8444
+ public function setKind($kind)
8445
+ {
8446
+ $this->kind = $kind;
8447
+ }
8448
+ public function getKind()
8449
+ {
8450
+ return $this->kind;
8451
+ }
8452
+ public function setName($name)
8453
+ {
8454
+ $this->name = $name;
8455
+ }
8456
+ public function getName()
8457
+ {
8458
+ return $this->name;
8459
+ }
8460
+ public function setType($type)
8461
+ {
8462
+ $this->type = $type;
8463
+ }
8464
+ public function getType()
8465
+ {
8466
+ return $this->type;
8467
+ }
8468
+ }
8469
+
8470
+ class Google_Service_Analytics_Profiles extends Google_Collection
8471
+ {
8472
+ protected $collection_key = 'items';
8473
+ protected $internal_gapi_mappings = array(
8474
+ );
8475
+ protected $itemsType = 'Google_Service_Analytics_Profile';
8476
+ protected $itemsDataType = 'array';
8477
+ public $itemsPerPage;
8478
+ public $kind;
8479
+ public $nextLink;
8480
+ public $previousLink;
8481
+ public $startIndex;
8482
+ public $totalResults;
8483
+ public $username;
8484
+
8485
+
8486
+ public function setItems($items)
8487
+ {
8488
+ $this->items = $items;
8489
+ }
8490
+ public function getItems()
8491
+ {
8492
+ return $this->items;
8493
+ }
8494
+ public function setItemsPerPage($itemsPerPage)
8495
+ {
8496
+ $this->itemsPerPage = $itemsPerPage;
8497
+ }
8498
+ public function getItemsPerPage()
8499
+ {
8500
+ return $this->itemsPerPage;
8501
+ }
8502
+ public function setKind($kind)
8503
+ {
8504
+ $this->kind = $kind;
8505
+ }
8506
+ public function getKind()
8507
+ {
8508
+ return $this->kind;
8509
+ }
8510
+ public function setNextLink($nextLink)
8511
+ {
8512
+ $this->nextLink = $nextLink;
8513
+ }
8514
+ public function getNextLink()
8515
+ {
8516
+ return $this->nextLink;
8517
+ }
8518
+ public function setPreviousLink($previousLink)
8519
+ {
8520
+ $this->previousLink = $previousLink;
8521
+ }
8522
+ public function getPreviousLink()
8523
+ {
8524
+ return $this->previousLink;
8525
+ }
8526
+ public function setStartIndex($startIndex)
8527
+ {
8528
+ $this->startIndex = $startIndex;
8529
+ }
8530
+ public function getStartIndex()
8531
+ {
8532
+ return $this->startIndex;
8533
+ }
8534
+ public function setTotalResults($totalResults)
8535
+ {
8536
+ $this->totalResults = $totalResults;
8537
+ }
8538
+ public function getTotalResults()
8539
+ {
8540
+ return $this->totalResults;
8541
+ }
8542
+ public function setUsername($username)
8543
+ {
8544
+ $this->username = $username;
8545
+ }
8546
+ public function getUsername()
8547
+ {
8548
+ return $this->username;
8549
+ }
8550
+ }
8551
+
8552
+ class Google_Service_Analytics_RealtimeData extends Google_Collection
8553
+ {
8554
+ protected $collection_key = 'rows';
8555
+ protected $internal_gapi_mappings = array(
8556
+ );
8557
+ protected $columnHeadersType = 'Google_Service_Analytics_RealtimeDataColumnHeaders';
8558
+ protected $columnHeadersDataType = 'array';
8559
+ public $id;
8560
+ public $kind;
8561
+ protected $profileInfoType = 'Google_Service_Analytics_RealtimeDataProfileInfo';
8562
+ protected $profileInfoDataType = '';
8563
+ protected $queryType = 'Google_Service_Analytics_RealtimeDataQuery';
8564
+ protected $queryDataType = '';
8565
+ public $rows;
8566
+ public $selfLink;
8567
+ public $totalResults;
8568
+ public $totalsForAllResults;
8569
+
8570
+
8571
+ public function setColumnHeaders($columnHeaders)
8572
+ {
8573
+ $this->columnHeaders = $columnHeaders;
8574
+ }
8575
+ public function getColumnHeaders()
8576
+ {
8577
+ return $this->columnHeaders;
8578
+ }
8579
+ public function setId($id)
8580
+ {
8581
+ $this->id = $id;
8582
+ }
8583
+ public function getId()
8584
+ {
8585
+ return $this->id;
8586
+ }
8587
+ public function setKind($kind)
8588
+ {
8589
+ $this->kind = $kind;
8590
+ }
8591
+ public function getKind()
8592
+ {
8593
+ return $this->kind;
8594
+ }
8595
+ public function setProfileInfo(Google_Service_Analytics_RealtimeDataProfileInfo $profileInfo)
8596
+ {
8597
+ $this->profileInfo = $profileInfo;
8598
+ }
8599
+ public function getProfileInfo()
8600
+ {
8601
+ return $this->profileInfo;
8602
+ }
8603
+ public function setQuery(Google_Service_Analytics_RealtimeDataQuery $query)
8604
+ {
8605
+ $this->query = $query;
8606
+ }
8607
+ public function getQuery()
8608
+ {
8609
+ return $this->query;
8610
+ }
8611
+ public function setRows($rows)
8612
+ {
8613
+ $this->rows = $rows;
8614
+ }
8615
+ public function getRows()
8616
+ {
8617
+ return $this->rows;
8618
+ }
8619
+ public function setSelfLink($selfLink)
8620
+ {
8621
+ $this->selfLink = $selfLink;
8622
+ }
8623
+ public function getSelfLink()
8624
+ {
8625
+ return $this->selfLink;
8626
+ }
8627
+ public function setTotalResults($totalResults)
8628
+ {
8629
+ $this->totalResults = $totalResults;
8630
+ }
8631
+ public function getTotalResults()
8632
+ {
8633
+ return $this->totalResults;
8634
+ }
8635
+ public function setTotalsForAllResults($totalsForAllResults)
8636
+ {
8637
+ $this->totalsForAllResults = $totalsForAllResults;
8638
+ }
8639
+ public function getTotalsForAllResults()
8640
+ {
8641
+ return $this->totalsForAllResults;
8642
+ }
8643
+ }
8644
+
8645
+ class Google_Service_Analytics_RealtimeDataColumnHeaders extends Google_Model
8646
+ {
8647
+ protected $internal_gapi_mappings = array(
8648
+ );
8649
+ public $columnType;
8650
+ public $dataType;
8651
+ public $name;
8652
+
8653
+
8654
+ public function setColumnType($columnType)
8655
+ {
8656
+ $this->columnType = $columnType;
8657
+ }
8658
+ public function getColumnType()
8659
+ {
8660
+ return $this->columnType;
8661
+ }
8662
+ public function setDataType($dataType)
8663
+ {
8664
+ $this->dataType = $dataType;
8665
+ }
8666
+ public function getDataType()
8667
+ {
8668
+ return $this->dataType;
8669
+ }
8670
+ public function setName($name)
8671
+ {
8672
+ $this->name = $name;
8673
+ }
8674
+ public function getName()
8675
+ {
8676
+ return $this->name;
8677
+ }
8678
+ }
8679
+
8680
+ class Google_Service_Analytics_RealtimeDataProfileInfo extends Google_Model
8681
+ {
8682
+ protected $internal_gapi_mappings = array(
8683
+ );
8684
+ public $accountId;
8685
+ public $internalWebPropertyId;
8686
+ public $profileId;
8687
+ public $profileName;
8688
+ public $tableId;
8689
+ public $webPropertyId;
8690
+
8691
+
8692
+ public function setAccountId($accountId)
8693
+ {
8694
+ $this->accountId = $accountId;
8695
+ }
8696
+ public function getAccountId()
8697
+ {
8698
+ return $this->accountId;
8699
+ }
8700
+ public function setInternalWebPropertyId($internalWebPropertyId)
8701
+ {
8702
+ $this->internalWebPropertyId = $internalWebPropertyId;
8703
+ }
8704
+ public function getInternalWebPropertyId()
8705
+ {
8706
+ return $this->internalWebPropertyId;
8707
+ }
8708
+ public function setProfileId($profileId)
8709
+ {
8710
+ $this->profileId = $profileId;
8711
+ }
8712
+ public function getProfileId()
8713
+ {
8714
+ return $this->profileId;
8715
+ }
8716
+ public function setProfileName($profileName)
8717
+ {
8718
+ $this->profileName = $profileName;
8719
+ }
8720
+ public function getProfileName()
8721
+ {
8722
+ return $this->profileName;
8723
+ }
8724
+ public function setTableId($tableId)
8725
+ {
8726
+ $this->tableId = $tableId;
8727
+ }
8728
+ public function getTableId()
8729
+ {
8730
+ return $this->tableId;
8731
+ }
8732
+ public function setWebPropertyId($webPropertyId)
8733
+ {
8734
+ $this->webPropertyId = $webPropertyId;
8735
+ }
8736
+ public function getWebPropertyId()
8737
+ {
8738
+ return $this->webPropertyId;
8739
+ }
8740
+ }
8741
+
8742
+ class Google_Service_Analytics_RealtimeDataQuery extends Google_Collection
8743
+ {
8744
+ protected $collection_key = 'sort';
8745
+ protected $internal_gapi_mappings = array(
8746
+ "maxResults" => "max-results",
8747
+ );
8748
+ public $dimensions;
8749
+ public $filters;
8750
+ public $ids;
8751
+ public $maxResults;
8752
+ public $metrics;
8753
+ public $sort;
8754
+
8755
+
8756
+ public function setDimensions($dimensions)
8757
+ {
8758
+ $this->dimensions = $dimensions;
8759
+ }
8760
+ public function getDimensions()
8761
+ {
8762
+ return $this->dimensions;
8763
+ }
8764
+ public function setFilters($filters)
8765
+ {
8766
+ $this->filters = $filters;
8767
+ }
8768
+ public function getFilters()
8769
+ {
8770
+ return $this->filters;
8771
+ }
8772
+ public function setIds($ids)
8773
+ {
8774
+ $this->ids = $ids;
8775
+ }
8776
+ public function getIds()
8777
+ {
8778
+ return $this->ids;
8779
+ }
8780
+ public function setMaxResults($maxResults)
8781
+ {
8782
+ $this->maxResults = $maxResults;
8783
+ }
8784
+ public function getMaxResults()
8785
+ {
8786
+ return $this->maxResults;
8787
+ }
8788
+ public function setMetrics($metrics)
8789
+ {
8790
+ $this->metrics = $metrics;
8791
+ }
8792
+ public function getMetrics()
8793
+ {
8794
+ return $this->metrics;
8795
+ }
8796
+ public function setSort($sort)
8797
+ {
8798
+ $this->sort = $sort;
8799
+ }
8800
+ public function getSort()
8801
+ {
8802
+ return $this->sort;
8803
+ }
8804
+ }
8805
+
8806
+ class Google_Service_Analytics_RealtimeDataTotalsForAllResults extends Google_Model
8807
+ {
8808
+ }
8809
+
8810
+ class Google_Service_Analytics_Segment extends Google_Model
8811
+ {
8812
+ protected $internal_gapi_mappings = array(
8813
+ );
8814
+ public $created;
8815
+ public $definition;
8816
+ public $id;
8817
+ public $kind;
8818
+ public $name;
8819
+ public $segmentId;
8820
+ public $selfLink;
8821
+ public $type;
8822
+ public $updated;
8823
+
8824
+
8825
+ public function setCreated($created)
8826
+ {
8827
+ $this->created = $created;
8828
+ }
8829
+ public function getCreated()
8830
+ {
8831
+ return $this->created;
8832
+ }
8833
+ public function setDefinition($definition)
8834
+ {
8835
+ $this->definition = $definition;
8836
+ }
8837
+ public function getDefinition()
8838
+ {
8839
+ return $this->definition;
8840
+ }
8841
+ public function setId($id)
8842
+ {
8843
+ $this->id = $id;
8844
+ }
8845
+ public function getId()
8846
+ {
8847
+ return $this->id;
8848
+ }
8849
+ public function setKind($kind)
8850
+ {
8851
+ $this->kind = $kind;
8852
+ }
8853
+ public function getKind()
8854
+ {
8855
+ return $this->kind;
8856
+ }
8857
+ public function setName($name)
8858
+ {
8859
+ $this->name = $name;
8860
+ }
8861
+ public function getName()
8862
+ {
8863
+ return $this->name;
8864
+ }
8865
+ public function setSegmentId($segmentId)
8866
+ {
8867
+ $this->segmentId = $segmentId;
8868
+ }
8869
+ public function getSegmentId()
8870
+ {
8871
+ return $this->segmentId;
8872
+ }
8873
+ public function setSelfLink($selfLink)
8874
+ {
8875
+ $this->selfLink = $selfLink;
8876
+ }
8877
+ public function getSelfLink()
8878
+ {
8879
+ return $this->selfLink;
8880
+ }
8881
+ public function setType($type)
8882
+ {
8883
+ $this->type = $type;
8884
+ }
8885
+ public function getType()
8886
+ {
8887
+ return $this->type;
8888
+ }
8889
+ public function setUpdated($updated)
8890
+ {
8891
+ $this->updated = $updated;
8892
+ }
8893
+ public function getUpdated()
8894
+ {
8895
+ return $this->updated;
8896
+ }
8897
+ }
8898
+
8899
+ class Google_Service_Analytics_Segments extends Google_Collection
8900
+ {
8901
+ protected $collection_key = 'items';
8902
+ protected $internal_gapi_mappings = array(
8903
+ );
8904
+ protected $itemsType = 'Google_Service_Analytics_Segment';
8905
+ protected $itemsDataType = 'array';
8906
+ public $itemsPerPage;
8907
+ public $kind;
8908
+ public $nextLink;
8909
+ public $previousLink;
8910
+ public $startIndex;
8911
+ public $totalResults;
8912
+ public $username;
8913
+
8914
+
8915
+ public function setItems($items)
8916
+ {
8917
+ $this->items = $items;
8918
+ }
8919
+ public function getItems()
8920
+ {
8921
+ return $this->items;
8922
+ }
8923
+ public function setItemsPerPage($itemsPerPage)
8924
+ {
8925
+ $this->itemsPerPage = $itemsPerPage;
8926
+ }
8927
+ public function getItemsPerPage()
8928
+ {
8929
+ return $this->itemsPerPage;
8930
+ }
8931
+ public function setKind($kind)
8932
+ {
8933
+ $this->kind = $kind;
8934
+ }
8935
+ public function getKind()
8936
+ {
8937
+ return $this->kind;
8938
+ }
8939
+ public function setNextLink($nextLink)
8940
+ {
8941
+ $this->nextLink = $nextLink;
8942
+ }
8943
+ public function getNextLink()
8944
+ {
8945
+ return $this->nextLink;
8946
+ }
8947
+ public function setPreviousLink($previousLink)
8948
+ {
8949
+ $this->previousLink = $previousLink;
8950
+ }
8951
+ public function getPreviousLink()
8952
+ {
8953
+ return $this->previousLink;
8954
+ }
8955
+ public function setStartIndex($startIndex)
8956
+ {
8957
+ $this->startIndex = $startIndex;
8958
+ }
8959
+ public function getStartIndex()
8960
+ {
8961
+ return $this->startIndex;
8962
+ }
8963
+ public function setTotalResults($totalResults)
8964
+ {
8965
+ $this->totalResults = $totalResults;
8966
+ }
8967
+ public function getTotalResults()
8968
+ {
8969
+ return $this->totalResults;
8970
+ }
8971
+ public function setUsername($username)
8972
+ {
8973
+ $this->username = $username;
8974
+ }
8975
+ public function getUsername()
8976
+ {
8977
+ return $this->username;
8978
+ }
8979
+ }
8980
+
8981
+ class Google_Service_Analytics_UnsampledReport extends Google_Model
8982
+ {
8983
+ protected $internal_gapi_mappings = array(
8984
+ "endDate" => "end-date",
8985
+ "startDate" => "start-date",
8986
+ );
8987
+ public $accountId;
8988
+ protected $cloudStorageDownloadDetailsType = 'Google_Service_Analytics_UnsampledReportCloudStorageDownloadDetails';
8989
+ protected $cloudStorageDownloadDetailsDataType = '';
8990
+ public $created;
8991
+ public $dimensions;
8992
+ public $downloadType;
8993
+ protected $driveDownloadDetailsType = 'Google_Service_Analytics_UnsampledReportDriveDownloadDetails';
8994
+ protected $driveDownloadDetailsDataType = '';
8995
+ public $endDate;
8996
+ public $filters;
8997
+ public $id;
8998
+ public $kind;
8999
+ public $metrics;
9000
+ public $profileId;
9001
+ public $segment;
9002
+ public $selfLink;
9003
+ public $startDate;
9004
+ public $status;
9005
+ public $title;
9006
+ public $updated;
9007
+ public $webPropertyId;
9008
+
9009
+
9010
+ public function setAccountId($accountId)
9011
+ {
9012
+ $this->accountId = $accountId;
9013
+ }
9014
+ public function getAccountId()
9015
+ {
9016
+ return $this->accountId;
9017
+ }
9018
+ public function setCloudStorageDownloadDetails(Google_Service_Analytics_UnsampledReportCloudStorageDownloadDetails $cloudStorageDownloadDetails)
9019
+ {
9020
+ $this->cloudStorageDownloadDetails = $cloudStorageDownloadDetails;
9021
+ }
9022
+ public function getCloudStorageDownloadDetails()
9023
+ {
9024
+ return $this->cloudStorageDownloadDetails;
9025
+ }
9026
+ public function setCreated($created)
9027
+ {
9028
+ $this->created = $created;
9029
+ }
9030
+ public function getCreated()
9031
+ {
9032
+ return $this->created;
9033
+ }
9034
+ public function setDimensions($dimensions)
9035
+ {
9036
+ $this->dimensions = $dimensions;
9037
+ }
9038
+ public function getDimensions()
9039
+ {
9040
+ return $this->dimensions;
9041
+ }
9042
+ public function setDownloadType($downloadType)
9043
+ {
9044
+ $this->downloadType = $downloadType;
9045
+ }
9046
+ public function getDownloadType()
9047
+ {
9048
+ return $this->downloadType;
9049
+ }
9050
+ public function setDriveDownloadDetails(Google_Service_Analytics_UnsampledReportDriveDownloadDetails $driveDownloadDetails)
9051
+ {
9052
+ $this->driveDownloadDetails = $driveDownloadDetails;
9053
+ }
9054
+ public function getDriveDownloadDetails()
9055
+ {
9056
+ return $this->driveDownloadDetails;
9057
+ }
9058
+ public function setEndDate($endDate)
9059
+ {
9060
+ $this->endDate = $endDate;
9061
+ }
9062
+ public function getEndDate()
9063
+ {
9064
+ return $this->endDate;
9065
+ }
9066
+ public function setFilters($filters)
9067
+ {
9068
+ $this->filters = $filters;
9069
+ }
9070
+ public function getFilters()
9071
+ {
9072
+ return $this->filters;
9073
+ }
9074
+ public function setId($id)
9075
+ {
9076
+ $this->id = $id;
9077
+ }
9078
+ public function getId()
9079
+ {
9080
+ return $this->id;
9081
+ }
9082
+ public function setKind($kind)
9083
+ {
9084
+ $this->kind = $kind;
9085
+ }
9086
+ public function getKind()
9087
+ {
9088
+ return $this->kind;
9089
+ }
9090
+ public function setMetrics($metrics)
9091
+ {
9092
+ $this->metrics = $metrics;
9093
+ }
9094
+ public function getMetrics()
9095
+ {
9096
+ return $this->metrics;
9097
+ }
9098
+ public function setProfileId($profileId)
9099
+ {
9100
+ $this->profileId = $profileId;
9101
+ }
9102
+ public function getProfileId()
9103
+ {
9104
+ return $this->profileId;
9105
+ }
9106
+ public function setSegment($segment)
9107
+ {
9108
+ $this->segment = $segment;
9109
+ }
9110
+ public function getSegment()
9111
+ {
9112
+ return $this->segment;
9113
+ }
9114
+ public function setSelfLink($selfLink)
9115
+ {
9116
+ $this->selfLink = $selfLink;
9117
+ }
9118
+ public function getSelfLink()
9119
+ {
9120
+ return $this->selfLink;
9121
+ }
9122
+ public function setStartDate($startDate)
9123
+ {
9124
+ $this->startDate = $startDate;
9125
+ }
9126
+ public function getStartDate()
9127
+ {
9128
+ return $this->startDate;
9129
+ }
9130
+ public function setStatus($status)
9131
+ {
9132
+ $this->status = $status;
9133
+ }
9134
+ public function getStatus()
9135
+ {
9136
+ return $this->status;
9137
+ }
9138
+ public function setTitle($title)
9139
+ {
9140
+ $this->title = $title;
9141
+ }
9142
+ public function getTitle()
9143
+ {
9144
+ return $this->title;
9145
+ }
9146
+ public function setUpdated($updated)
9147
+ {
9148
+ $this->updated = $updated;
9149
+ }
9150
+ public function getUpdated()
9151
+ {
9152
+ return $this->updated;
9153
+ }
9154
+ public function setWebPropertyId($webPropertyId)
9155
+ {
9156
+ $this->webPropertyId = $webPropertyId;
9157
+ }
9158
+ public function getWebPropertyId()
9159
+ {
9160
+ return $this->webPropertyId;
9161
+ }
9162
+ }
9163
+
9164
+ class Google_Service_Analytics_UnsampledReportCloudStorageDownloadDetails extends Google_Model
9165
+ {
9166
+ protected $internal_gapi_mappings = array(
9167
+ );
9168
+ public $bucketId;
9169
+ public $objectId;
9170
+
9171
+
9172
+ public function setBucketId($bucketId)
9173
+ {
9174
+ $this->bucketId = $bucketId;
9175
+ }
9176
+ public function getBucketId()
9177
+ {
9178
+ return $this->bucketId;
9179
+ }
9180
+ public function setObjectId($objectId)
9181
+ {
9182
+ $this->objectId = $objectId;
9183
+ }
9184
+ public function getObjectId()
9185
+ {
9186
+ return $this->objectId;
9187
+ }
9188
+ }
9189
+
9190
+ class Google_Service_Analytics_UnsampledReportDriveDownloadDetails extends Google_Model
9191
+ {
9192
+ protected $internal_gapi_mappings = array(
9193
+ );
9194
+ public $documentId;
9195
+
9196
+
9197
+ public function setDocumentId($documentId)
9198
+ {
9199
+ $this->documentId = $documentId;
9200
+ }
9201
+ public function getDocumentId()
9202
+ {
9203
+ return $this->documentId;
9204
+ }
9205
+ }
9206
+
9207
+ class Google_Service_Analytics_UnsampledReports extends Google_Collection
9208
+ {
9209
+ protected $collection_key = 'items';
9210
+ protected $internal_gapi_mappings = array(
9211
+ );
9212
+ protected $itemsType = 'Google_Service_Analytics_UnsampledReport';
9213
+ protected $itemsDataType = 'array';
9214
+ public $itemsPerPage;
9215
+ public $kind;
9216
+ public $nextLink;
9217
+ public $previousLink;
9218
+ public $startIndex;
9219
+ public $totalResults;
9220
+ public $username;
9221
+
9222
+
9223
+ public function setItems($items)
9224
+ {
9225
+ $this->items = $items;
9226
+ }
9227
+ public function getItems()
9228
+ {
9229
+ return $this->items;
9230
+ }
9231
+ public function setItemsPerPage($itemsPerPage)
9232
+ {
9233
+ $this->itemsPerPage = $itemsPerPage;
9234
+ }
9235
+ public function getItemsPerPage()
9236
+ {
9237
+ return $this->itemsPerPage;
9238
+ }
9239
+ public function setKind($kind)
9240
+ {
9241
+ $this->kind = $kind;
9242
+ }
9243
+ public function getKind()
9244
+ {
9245
+ return $this->kind;
9246
+ }
9247
+ public function setNextLink($nextLink)
9248
+ {
9249
+ $this->nextLink = $nextLink;
9250
+ }
9251
+ public function getNextLink()
9252
+ {
9253
+ return $this->nextLink;
9254
+ }
9255
+ public function setPreviousLink($previousLink)
9256
+ {
9257
+ $this->previousLink = $previousLink;
9258
+ }
9259
+ public function getPreviousLink()
9260
+ {
9261
+ return $this->previousLink;
9262
+ }
9263
+ public function setStartIndex($startIndex)
9264
+ {
9265
+ $this->startIndex = $startIndex;
9266
+ }
9267
+ public function getStartIndex()
9268
+ {
9269
+ return $this->startIndex;
9270
+ }
9271
+ public function setTotalResults($totalResults)
9272
+ {
9273
+ $this->totalResults = $totalResults;
9274
+ }
9275
+ public function getTotalResults()
9276
+ {
9277
+ return $this->totalResults;
9278
+ }
9279
+ public function setUsername($username)
9280
+ {
9281
+ $this->username = $username;
9282
+ }
9283
+ public function getUsername()
9284
+ {
9285
+ return $this->username;
9286
+ }
9287
+ }
9288
+
9289
+ class Google_Service_Analytics_Upload extends Google_Collection
9290
+ {
9291
+ protected $collection_key = 'errors';
9292
+ protected $internal_gapi_mappings = array(
9293
+ );
9294
+ public $accountId;
9295
+ public $customDataSourceId;
9296
+ public $errors;
9297
+ public $id;
9298
+ public $kind;
9299
+ public $status;
9300
+
9301
+
9302
+ public function setAccountId($accountId)
9303
+ {
9304
+ $this->accountId = $accountId;
9305
+ }
9306
+ public function getAccountId()
9307
+ {
9308
+ return $this->accountId;
9309
+ }
9310
+ public function setCustomDataSourceId($customDataSourceId)
9311
+ {
9312
+ $this->customDataSourceId = $customDataSourceId;
9313
+ }
9314
+ public function getCustomDataSourceId()
9315
+ {
9316
+ return $this->customDataSourceId;
9317
+ }
9318
+ public function setErrors($errors)
9319
+ {
9320
+ $this->errors = $errors;
9321
+ }
9322
+ public function getErrors()
9323
+ {
9324
+ return $this->errors;
9325
+ }
9326
+ public function setId($id)
9327
+ {
9328
+ $this->id = $id;
9329
+ }
9330
+ public function getId()
9331
+ {
9332
+ return $this->id;
9333
+ }
9334
+ public function setKind($kind)
9335
+ {
9336
+ $this->kind = $kind;
9337
+ }
9338
+ public function getKind()
9339
+ {
9340
+ return $this->kind;
9341
+ }
9342
+ public function setStatus($status)
9343
+ {
9344
+ $this->status = $status;
9345
+ }
9346
+ public function getStatus()
9347
+ {
9348
+ return $this->status;
9349
+ }
9350
+ }
9351
+
9352
+ class Google_Service_Analytics_Uploads extends Google_Collection
9353
+ {
9354
+ protected $collection_key = 'items';
9355
+ protected $internal_gapi_mappings = array(
9356
+ );
9357
+ protected $itemsType = 'Google_Service_Analytics_Upload';
9358
+ protected $itemsDataType = 'array';
9359
+ public $itemsPerPage;
9360
+ public $kind;
9361
+ public $nextLink;
9362
+ public $previousLink;
9363
+ public $startIndex;
9364
+ public $totalResults;
9365
+
9366
+
9367
+ public function setItems($items)
9368
+ {
9369
+ $this->items = $items;
9370
+ }
9371
+ public function getItems()
9372
+ {
9373
+ return $this->items;
9374
+ }
9375
+ public function setItemsPerPage($itemsPerPage)
9376
+ {
9377
+ $this->itemsPerPage = $itemsPerPage;
9378
+ }
9379
+ public function getItemsPerPage()
9380
+ {
9381
+ return $this->itemsPerPage;
9382
+ }
9383
+ public function setKind($kind)
9384
+ {
9385
+ $this->kind = $kind;
9386
+ }
9387
+ public function getKind()
9388
+ {
9389
+ return $this->kind;
9390
+ }
9391
+ public function setNextLink($nextLink)
9392
+ {
9393
+ $this->nextLink = $nextLink;
9394
+ }
9395
+ public function getNextLink()
9396
+ {
9397
+ return $this->nextLink;
9398
+ }
9399
+ public function setPreviousLink($previousLink)
9400
+ {
9401
+ $this->previousLink = $previousLink;
9402
+ }
9403
+ public function getPreviousLink()
9404
+ {
9405
+ return $this->previousLink;
9406
+ }
9407
+ public function setStartIndex($startIndex)
9408
+ {
9409
+ $this->startIndex = $startIndex;
9410
+ }
9411
+ public function getStartIndex()
9412
+ {
9413
+ return $this->startIndex;
9414
+ }
9415
+ public function setTotalResults($totalResults)
9416
+ {
9417
+ $this->totalResults = $totalResults;
9418
+ }
9419
+ public function getTotalResults()
9420
+ {
9421
+ return $this->totalResults;
9422
+ }
9423
+ }
9424
+
9425
+ class Google_Service_Analytics_UserRef extends Google_Model
9426
+ {
9427
+ protected $internal_gapi_mappings = array(
9428
+ );
9429
+ public $email;
9430
+ public $id;
9431
+ public $kind;
9432
+
9433
+
9434
+ public function setEmail($email)
9435
+ {
9436
+ $this->email = $email;
9437
+ }
9438
+ public function getEmail()
9439
+ {
9440
+ return $this->email;
9441
+ }
9442
+ public function setId($id)
9443
+ {
9444
+ $this->id = $id;
9445
+ }
9446
+ public function getId()
9447
+ {
9448
+ return $this->id;
9449
+ }
9450
+ public function setKind($kind)
9451
+ {
9452
+ $this->kind = $kind;
9453
+ }
9454
+ public function getKind()
9455
+ {
9456
+ return $this->kind;
9457
+ }
9458
+ }
9459
+
9460
+ class Google_Service_Analytics_WebPropertyRef extends Google_Model
9461
+ {
9462
+ protected $internal_gapi_mappings = array(
9463
+ );
9464
+ public $accountId;
9465
+ public $href;
9466
+ public $id;
9467
+ public $internalWebPropertyId;
9468
+ public $kind;
9469
+ public $name;
9470
+
9471
+
9472
+ public function setAccountId($accountId)
9473
+ {
9474
+ $this->accountId = $accountId;
9475
+ }
9476
+ public function getAccountId()
9477
+ {
9478
+ return $this->accountId;
9479
+ }
9480
+ public function setHref($href)
9481
+ {
9482
+ $this->href = $href;
9483
+ }
9484
+ public function getHref()
9485
+ {
9486
+ return $this->href;
9487
+ }
9488
+ public function setId($id)
9489
+ {
9490
+ $this->id = $id;
9491
+ }
9492
+ public function getId()
9493
+ {
9494
+ return $this->id;
9495
+ }
9496
+ public function setInternalWebPropertyId($internalWebPropertyId)
9497
+ {
9498
+ $this->internalWebPropertyId = $internalWebPropertyId;
9499
+ }
9500
+ public function getInternalWebPropertyId()
9501
+ {
9502
+ return $this->internalWebPropertyId;
9503
+ }
9504
+ public function setKind($kind)
9505
+ {
9506
+ $this->kind = $kind;
9507
+ }
9508
+ public function getKind()
9509
+ {
9510
+ return $this->kind;
9511
+ }
9512
+ public function setName($name)
9513
+ {
9514
+ $this->name = $name;
9515
+ }
9516
+ public function getName()
9517
+ {
9518
+ return $this->name;
9519
+ }
9520
+ }
9521
+
9522
+ class Google_Service_Analytics_WebPropertySummary extends Google_Collection
9523
+ {
9524
+ protected $collection_key = 'profiles';
9525
+ protected $internal_gapi_mappings = array(
9526
+ );
9527
+ public $id;
9528
+ public $internalWebPropertyId;
9529
+ public $kind;
9530
+ public $level;
9531
+ public $name;
9532
+ protected $profilesType = 'Google_Service_Analytics_ProfileSummary';
9533
+ protected $profilesDataType = 'array';
9534
+ public $websiteUrl;
9535
+
9536
+
9537
+ public function setId($id)
9538
+ {
9539
+ $this->id = $id;
9540
+ }
9541
+ public function getId()
9542
+ {
9543
+ return $this->id;
9544
+ }
9545
+ public function setInternalWebPropertyId($internalWebPropertyId)
9546
+ {
9547
+ $this->internalWebPropertyId = $internalWebPropertyId;
9548
+ }
9549
+ public function getInternalWebPropertyId()
9550
+ {
9551
+ return $this->internalWebPropertyId;
9552
+ }
9553
+ public function setKind($kind)
9554
+ {
9555
+ $this->kind = $kind;
9556
+ }
9557
+ public function getKind()
9558
+ {
9559
+ return $this->kind;
9560
+ }
9561
+ public function setLevel($level)
9562
+ {
9563
+ $this->level = $level;
9564
+ }
9565
+ public function getLevel()
9566
+ {
9567
+ return $this->level;
9568
+ }
9569
+ public function setName($name)
9570
+ {
9571
+ $this->name = $name;
9572
+ }
9573
+ public function getName()
9574
+ {
9575
+ return $this->name;
9576
+ }
9577
+ public function setProfiles($profiles)
9578
+ {
9579
+ $this->profiles = $profiles;
9580
+ }
9581
+ public function getProfiles()
9582
+ {
9583
+ return $this->profiles;
9584
+ }
9585
+ public function setWebsiteUrl($websiteUrl)
9586
+ {
9587
+ $this->websiteUrl = $websiteUrl;
9588
+ }
9589
+ public function getWebsiteUrl()
9590
+ {
9591
+ return $this->websiteUrl;
9592
+ }
9593
+ }
9594
+
9595
+ class Google_Service_Analytics_Webproperties extends Google_Collection
9596
+ {
9597
+ protected $collection_key = 'items';
9598
+ protected $internal_gapi_mappings = array(
9599
+ );
9600
+ protected $itemsType = 'Google_Service_Analytics_Webproperty';
9601
+ protected $itemsDataType = 'array';
9602
+ public $itemsPerPage;
9603
+ public $kind;
9604
+ public $nextLink;
9605
+ public $previousLink;
9606
+ public $startIndex;
9607
+ public $totalResults;
9608
+ public $username;
9609
+
9610
+
9611
+ public function setItems($items)
9612
+ {
9613
+ $this->items = $items;
9614
+ }
9615
+ public function getItems()
9616
+ {
9617
+ return $this->items;
9618
+ }
9619
+ public function setItemsPerPage($itemsPerPage)
9620
+ {
9621
+ $this->itemsPerPage = $itemsPerPage;
9622
+ }
9623
+ public function getItemsPerPage()
9624
+ {
9625
+ return $this->itemsPerPage;
9626
+ }
9627
+ public function setKind($kind)
9628
+ {
9629
+ $this->kind = $kind;
9630
+ }
9631
+ public function getKind()
9632
+ {
9633
+ return $this->kind;
9634
+ }
9635
+ public function setNextLink($nextLink)
9636
+ {
9637
+ $this->nextLink = $nextLink;
9638
+ }
9639
+ public function getNextLink()
9640
+ {
9641
+ return $this->nextLink;
9642
+ }
9643
+ public function setPreviousLink($previousLink)
9644
+ {
9645
+ $this->previousLink = $previousLink;
9646
+ }
9647
+ public function getPreviousLink()
9648
+ {
9649
+ return $this->previousLink;
9650
+ }
9651
+ public function setStartIndex($startIndex)
9652
+ {
9653
+ $this->startIndex = $startIndex;
9654
+ }
9655
+ public function getStartIndex()
9656
+ {
9657
+ return $this->startIndex;
9658
+ }
9659
+ public function setTotalResults($totalResults)
9660
+ {
9661
+ $this->totalResults = $totalResults;
9662
+ }
9663
+ public function getTotalResults()
9664
+ {
9665
+ return $this->totalResults;
9666
+ }
9667
+ public function setUsername($username)
9668
+ {
9669
+ $this->username = $username;
9670
+ }
9671
+ public function getUsername()
9672
+ {
9673
+ return $this->username;
9674
+ }
9675
+ }
9676
+
9677
+ class Google_Service_Analytics_Webproperty extends Google_Model
9678
+ {
9679
+ protected $internal_gapi_mappings = array(
9680
+ );
9681
+ public $accountId;
9682
+ protected $childLinkType = 'Google_Service_Analytics_WebpropertyChildLink';
9683
+ protected $childLinkDataType = '';
9684
+ public $created;
9685
+ public $defaultProfileId;
9686
+ public $id;
9687
+ public $industryVertical;
9688
+ public $internalWebPropertyId;
9689
+ public $kind;
9690
+ public $level;
9691
+ public $name;
9692
+ protected $parentLinkType = 'Google_Service_Analytics_WebpropertyParentLink';
9693
+ protected $parentLinkDataType = '';
9694
+ protected $permissionsType = 'Google_Service_Analytics_WebpropertyPermissions';
9695
+ protected $permissionsDataType = '';
9696
+ public $profileCount;
9697
+ public $selfLink;
9698
+ public $updated;
9699
+ public $websiteUrl;
9700
+
9701
+
9702
+ public function setAccountId($accountId)
9703
+ {
9704
+ $this->accountId = $accountId;
9705
+ }
9706
+ public function getAccountId()
9707
+ {
9708
+ return $this->accountId;
9709
+ }
9710
+ public function setChildLink(Google_Service_Analytics_WebpropertyChildLink $childLink)
9711
+ {
9712
+ $this->childLink = $childLink;
9713
+ }
9714
+ public function getChildLink()
9715
+ {
9716
+ return $this->childLink;
9717
+ }
9718
+ public function setCreated($created)
9719
+ {
9720
+ $this->created = $created;
9721
+ }
9722
+ public function getCreated()
9723
+ {
9724
+ return $this->created;
9725
+ }
9726
+ public function setDefaultProfileId($defaultProfileId)
9727
+ {
9728
+ $this->defaultProfileId = $defaultProfileId;
9729
+ }
9730
+ public function getDefaultProfileId()
9731
+ {
9732
+ return $this->defaultProfileId;
9733
+ }
9734
+ public function setId($id)
9735
+ {
9736
+ $this->id = $id;
9737
+ }
9738
+ public function getId()
9739
+ {
9740
+ return $this->id;
9741
+ }
9742
+ public function setIndustryVertical($industryVertical)
9743
+ {
9744
+ $this->industryVertical = $industryVertical;
9745
+ }
9746
+ public function getIndustryVertical()
9747
+ {
9748
+ return $this->industryVertical;
9749
+ }
9750
+ public function setInternalWebPropertyId($internalWebPropertyId)
9751
+ {
9752
+ $this->internalWebPropertyId = $internalWebPropertyId;
9753
+ }
9754
+ public function getInternalWebPropertyId()
9755
+ {
9756
+ return $this->internalWebPropertyId;
9757
+ }
9758
+ public function setKind($kind)
9759
+ {
9760
+ $this->kind = $kind;
9761
+ }
9762
+ public function getKind()
9763
+ {
9764
+ return $this->kind;
9765
+ }
9766
+ public function setLevel($level)
9767
+ {
9768
+ $this->level = $level;
9769
+ }
9770
+ public function getLevel()
9771
+ {
9772
+ return $this->level;
9773
+ }
9774
+ public function setName($name)
9775
+ {
9776
+ $this->name = $name;
9777
+ }
9778
+ public function getName()
9779
+ {
9780
+ return $this->name;
9781
+ }
9782
+ public function setParentLink(Google_Service_Analytics_WebpropertyParentLink $parentLink)
9783
+ {
9784
+ $this->parentLink = $parentLink;
9785
+ }
9786
+ public function getParentLink()
9787
+ {
9788
+ return $this->parentLink;
9789
+ }
9790
+ public function setPermissions(Google_Service_Analytics_WebpropertyPermissions $permissions)
9791
+ {
9792
+ $this->permissions = $permissions;
9793
+ }
9794
+ public function getPermissions()
9795
+ {
9796
+ return $this->permissions;
9797
+ }
9798
+ public function setProfileCount($profileCount)
9799
+ {
9800
+ $this->profileCount = $profileCount;
9801
+ }
9802
+ public function getProfileCount()
9803
+ {
9804
+ return $this->profileCount;
9805
+ }
9806
+ public function setSelfLink($selfLink)
9807
+ {
9808
+ $this->selfLink = $selfLink;
9809
+ }
9810
+ public function getSelfLink()
9811
+ {
9812
+ return $this->selfLink;
9813
+ }
9814
+ public function setUpdated($updated)
9815
+ {
9816
+ $this->updated = $updated;
9817
+ }
9818
+ public function getUpdated()
9819
+ {
9820
+ return $this->updated;
9821
+ }
9822
+ public function setWebsiteUrl($websiteUrl)
9823
+ {
9824
+ $this->websiteUrl = $websiteUrl;
9825
+ }
9826
+ public function getWebsiteUrl()
9827
+ {
9828
+ return $this->websiteUrl;
9829
+ }
9830
+ }
9831
+
9832
+ class Google_Service_Analytics_WebpropertyChildLink extends Google_Model
9833
+ {
9834
+ protected $internal_gapi_mappings = array(
9835
+ );
9836
+ public $href;
9837
+ public $type;
9838
+
9839
+
9840
+ public function setHref($href)
9841
+ {
9842
+ $this->href = $href;
9843
+ }
9844
+ public function getHref()
9845
+ {
9846
+ return $this->href;
9847
+ }
9848
+ public function setType($type)
9849
+ {
9850
+ $this->type = $type;
9851
+ }
9852
+ public function getType()
9853
+ {
9854
+ return $this->type;
9855
+ }
9856
+ }
9857
+
9858
+ class Google_Service_Analytics_WebpropertyParentLink extends Google_Model
9859
+ {
9860
+ protected $internal_gapi_mappings = array(
9861
+ );
9862
+ public $href;
9863
+ public $type;
9864
+
9865
+
9866
+ public function setHref($href)
9867
+ {
9868
+ $this->href = $href;
9869
+ }
9870
+ public function getHref()
9871
+ {
9872
+ return $this->href;
9873
+ }
9874
+ public function setType($type)
9875
+ {
9876
+ $this->type = $type;
9877
+ }
9878
+ public function getType()
9879
+ {
9880
+ return $this->type;
9881
+ }
9882
+ }
9883
+
9884
+ class Google_Service_Analytics_WebpropertyPermissions extends Google_Collection
9885
+ {
9886
+ protected $collection_key = 'effective';
9887
+ protected $internal_gapi_mappings = array(
9888
+ );
9889
+ public $effective;
9890
+
9891
+
9892
+ public function setEffective($effective)
9893
+ {
9894
+ $this->effective = $effective;
9895
+ }
9896
+ public function getEffective()
9897
+ {
9898
+ return $this->effective;
9899
+ }
9900
+ }
google/Service/Exception.php ADDED
@@ -0,0 +1,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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ class Google_Service_Exception extends Google_Exception implements Google_Task_Retryable
23
+ {
24
+ /**
25
+ * Optional list of errors returned in a JSON body of an HTTP error response.
26
+ */
27
+ protected $errors = array();
28
+
29
+ /**
30
+ * @var array $retryMap Map of errors with retry counts.
31
+ */
32
+ private $retryMap = array();
33
+
34
+ /**
35
+ * Override default constructor to add the ability to set $errors and a retry
36
+ * map.
37
+ *
38
+ * @param string $message
39
+ * @param int $code
40
+ * @param Exception|null $previous
41
+ * @param [{string, string}] errors List of errors returned in an HTTP
42
+ * response. Defaults to [].
43
+ * @param array|null $retryMap Map of errors with retry counts.
44
+ */
45
+ public function __construct(
46
+ $message,
47
+ $code = 0,
48
+ Exception $previous = null,
49
+ $errors = array(),
50
+ array $retryMap = null
51
+ ) {
52
+ if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
53
+ parent::__construct($message, $code, $previous);
54
+ } else {
55
+ parent::__construct($message, $code);
56
+ }
57
+
58
+ $this->errors = $errors;
59
+
60
+ if (is_array($retryMap)) {
61
+ $this->retryMap = $retryMap;
62
+ }
63
+ }
64
+
65
+ /**
66
+ * An example of the possible errors returned.
67
+ *
68
+ * {
69
+ * "domain": "global",
70
+ * "reason": "authError",
71
+ * "message": "Invalid Credentials",
72
+ * "locationType": "header",
73
+ * "location": "Authorization",
74
+ * }
75
+ *
76
+ * @return [{string, string}] List of errors return in an HTTP response or [].
77
+ */
78
+ public function getErrors()
79
+ {
80
+ return $this->errors;
81
+ }
82
+
83
+ /**
84
+ * Gets the number of times the associated task can be retried.
85
+ *
86
+ * NOTE: -1 is returned if the task can be retried indefinitely
87
+ *
88
+ * @return integer
89
+ */
90
+ public function allowedRetries()
91
+ {
92
+ if (isset($this->retryMap[$this->code])) {
93
+ return $this->retryMap[$this->code];
94
+ }
95
+
96
+ $errors = $this->getErrors();
97
+
98
+ if (!empty($errors) && isset($errors[0]['reason']) &&
99
+ isset($this->retryMap[$errors[0]['reason']])) {
100
+ return $this->retryMap[$errors[0]['reason']];
101
+ }
102
+
103
+ return 0;
104
+ }
105
+ }
google/Service/Oauth2.php ADDED
@@ -0,0 +1,503 @@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+ * Copyright 2010 Google Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6
+ * use this file except in compliance with the License. You may obtain a copy of
7
+ * 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, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations under
15
+ * the License.
16
+ */
17
+
18
+ /**
19
+ * Service definition for Oauth2 (v2).
20
+ *
21
+ * <p>
22
+ * Lets you access OAuth2 protocol related APIs.</p>
23
+ *
24
+ * <p>
25
+ * For more information about this service, see the API
26
+ * <a href="https://developers.google.com/accounts/docs/OAuth2" target="_blank">Documentation</a>
27
+ * </p>
28
+ *
29
+ * @author Google, Inc.
30
+ */
31
+ class Google_Service_Oauth2 extends Google_Service
32
+ {
33
+ /** Know your basic profile info and list of people in your circles.. */
34
+ const PLUS_LOGIN =
35
+ "https://www.googleapis.com/auth/plus.login";
36
+ /** Know who you are on Google. */
37
+ const PLUS_ME =
38
+ "https://www.googleapis.com/auth/plus.me";
39
+ /** View your email address. */
40
+ const USERINFO_EMAIL =
41
+ "https://www.googleapis.com/auth/userinfo.email";
42
+ /** View your basic profile info. */
43
+ const USERINFO_PROFILE =
44
+ "https://www.googleapis.com/auth/userinfo.profile";
45
+
46
+ public $userinfo;
47
+ public $userinfo_v2_me;
48
+ private $base_methods;
49
+
50
+ /**
51
+ * Constructs the internal representation of the Oauth2 service.
52
+ *
53
+ * @param Google_Client $client
54
+ */
55
+ public function __construct(Google_Client $client)
56
+ {
57
+ parent::__construct($client);
58
+ $this->rootUrl = 'https://www.googleapis.com/';
59
+ $this->servicePath = '';
60
+ $this->version = 'v2';
61
+ $this->serviceName = 'oauth2';
62
+
63
+ $this->userinfo = new Google_Service_Oauth2_Userinfo_Resource(
64
+ $this,
65
+ $this->serviceName,
66
+ 'userinfo',
67
+ array(
68
+ 'methods' => array(
69
+ 'get' => array(
70
+ 'path' => 'oauth2/v2/userinfo',
71
+ 'httpMethod' => 'GET',
72
+ 'parameters' => array(),
73
+ ),
74
+ )
75
+ )
76
+ );
77
+ $this->userinfo_v2_me = new Google_Service_Oauth2_UserinfoV2Me_Resource(
78
+ $this,
79
+ $this->serviceName,
80
+ 'me',
81
+ array(
82
+ 'methods' => array(
83
+ 'get' => array(
84
+ 'path' => 'userinfo/v2/me',
85
+ 'httpMethod' => 'GET',
86
+ 'parameters' => array(),
87
+ ),
88
+ )
89
+ )
90
+ );
91
+ $this->base_methods = new Google_Service_Resource(
92
+ $this,
93
+ $this->serviceName,
94
+ '',
95
+ array(
96
+ 'methods' => array(
97
+ 'getCertForOpenIdConnect' => array(
98
+ 'path' => 'oauth2/v2/certs',
99
+ 'httpMethod' => 'GET',
100
+ 'parameters' => array(),
101
+ ),'tokeninfo' => array(
102
+ 'path' => 'oauth2/v2/tokeninfo',
103
+ 'httpMethod' => 'POST',
104
+ 'parameters' => array(
105
+ 'access_token' => array(
106
+ 'location' => 'query',
107
+ 'type' => 'string',
108
+ ),
109
+ 'id_token' => array(
110
+ 'location' => 'query',
111
+ 'type' => 'string',
112
+ ),
113
+ 'token_handle' => array(
114
+ 'location' => 'query',
115
+ 'type' => 'string',
116
+ ),
117
+ ),
118
+ ),
119
+ )
120
+ )
121
+ );
122
+ }
123
+ /**
124
+ * (getCertForOpenIdConnect)
125
+ *
126
+ * @param array $optParams Optional parameters.
127
+ * @return Google_Service_Oauth2_Jwk
128
+ */
129
+ public function getCertForOpenIdConnect($optParams = array())
130
+ {
131
+ $params = array();
132
+ $params = array_merge($params, $optParams);
133
+ return $this->base_methods->call('getCertForOpenIdConnect', array($params), "Google_Service_Oauth2_Jwk");
134
+ }
135
+ /**
136
+ * (tokeninfo)
137
+ *
138
+ * @param array $optParams Optional parameters.
139
+ *
140
+ * @opt_param string access_token
141
+ * @opt_param string id_token
142
+ * @opt_param string token_handle
143
+ * @return Google_Service_Oauth2_Tokeninfo
144
+ */
145
+ public function tokeninfo($optParams = array())
146
+ {
147
+ $params = array();
148
+ $params = array_merge($params, $optParams);
149
+ return $this->base_methods->call('tokeninfo', array($params), "Google_Service_Oauth2_Tokeninfo");
150
+ }
151
+ }
152
+
153
+
154
+ /**
155
+ * The "userinfo" collection of methods.
156
+ * Typical usage is:
157
+ * <code>
158
+ * $oauth2Service = new Google_Service_Oauth2(...);
159
+ * $userinfo = $oauth2Service->userinfo;
160
+ * </code>
161
+ */
162
+ class Google_Service_Oauth2_Userinfo_Resource extends Google_Service_Resource
163
+ {
164
+
165
+ /**
166
+ * (userinfo.get)
167
+ *
168
+ * @param array $optParams Optional parameters.
169
+ * @return Google_Service_Oauth2_Userinfoplus
170
+ */
171
+ public function get($optParams = array())
172
+ {
173
+ $params = array();
174
+ $params = array_merge($params, $optParams);
175
+ return $this->call('get', array($params), "Google_Service_Oauth2_Userinfoplus");
176
+ }
177
+ }
178
+
179
+ /**
180
+ * The "v2" collection of methods.
181
+ * Typical usage is:
182
+ * <code>
183
+ * $oauth2Service = new Google_Service_Oauth2(...);
184
+ * $v2 = $oauth2Service->v2;
185
+ * </code>
186
+ */
187
+ class Google_Service_Oauth2_UserinfoV2_Resource extends Google_Service_Resource
188
+ {
189
+ }
190
+
191
+ /**
192
+ * The "me" collection of methods.
193
+ * Typical usage is:
194
+ * <code>
195
+ * $oauth2Service = new Google_Service_Oauth2(...);
196
+ * $me = $oauth2Service->me;
197
+ * </code>
198
+ */
199
+ class Google_Service_Oauth2_UserinfoV2Me_Resource extends Google_Service_Resource
200
+ {
201
+
202
+ /**
203
+ * (me.get)
204
+ *
205
+ * @param array $optParams Optional parameters.
206
+ * @return Google_Service_Oauth2_Userinfoplus
207
+ */
208
+ public function get($optParams = array())
209
+ {
210
+ $params = array();
211
+ $params = array_merge($params, $optParams);
212
+ return $this->call('get', array($params), "Google_Service_Oauth2_Userinfoplus");
213
+ }
214
+ }
215
+
216
+
217
+
218
+
219
+ class Google_Service_Oauth2_Jwk extends Google_Collection
220
+ {
221
+ protected $collection_key = 'keys';
222
+ protected $internal_gapi_mappings = array(
223
+ );
224
+ protected $keysType = 'Google_Service_Oauth2_JwkKeys';
225
+ protected $keysDataType = 'array';
226
+
227
+
228
+ public function setKeys($keys)
229
+ {
230
+ $this->keys = $keys;
231
+ }
232
+ public function getKeys()
233
+ {
234
+ return $this->keys;
235
+ }
236
+ }
237
+
238
+ class Google_Service_Oauth2_JwkKeys extends Google_Model
239
+ {
240
+ protected $internal_gapi_mappings = array(
241
+ );
242
+ public $alg;
243
+ public $e;
244
+ public $kid;
245
+ public $kty;
246
+ public $n;
247
+ public $use;
248
+
249
+
250
+ public function setAlg($alg)
251
+ {
252
+ $this->alg = $alg;
253
+ }
254
+ public function getAlg()
255
+ {
256
+ return $this->alg;
257
+ }
258
+ public function setE($e)
259
+ {
260
+ $this->e = $e;
261
+ }
262
+ public function getE()
263
+ {
264
+ return $this->e;
265
+ }
266
+ public function setKid($kid)
267
+ {
268
+ $this->kid = $kid;
269
+ }
270
+ public function getKid()
271
+ {
272
+ return $this->kid;
273
+ }
274
+ public function setKty($kty)
275
+ {
276
+ $this->kty = $kty;
277
+ }
278
+ public function getKty()
279
+ {
280
+ return $this->kty;
281
+ }
282
+ public function setN($n)
283
+ {
284
+ $this->n = $n;
285
+ }
286
+ public function getN()
287
+ {
288
+ return $this->n;
289
+ }
290
+ public function setUse($use)
291
+ {
292
+ $this->use = $use;
293
+ }
294
+ public function getUse()
295
+ {
296
+ return $this->use;
297
+ }
298
+ }
299
+
300
+ class Google_Service_Oauth2_Tokeninfo extends Google_Model
301
+ {
302
+ protected $internal_gapi_mappings = array(
303
+ "accessType" => "access_type",
304
+ "expiresIn" => "expires_in",
305
+ "issuedTo" => "issued_to",
306
+ "tokenHandle" => "token_handle",
307
+ "userId" => "user_id",
308
+ "verifiedEmail" => "verified_email",
309
+ );
310
+ public $accessType;
311
+ public $audience;
312
+ public $email;
313
+ public $expiresIn;
314
+ public $issuedTo;
315
+ public $scope;
316
+ public $tokenHandle;
317
+ public $userId;
318
+ public $verifiedEmail;
319
+
320
+
321
+ public function setAccessType($accessType)
322
+ {
323
+ $this->accessType = $accessType;
324
+ }
325
+ public function getAccessType()
326
+ {
327
+ return $this->accessType;
328
+ }
329
+ public function setAudience($audience)
330
+ {
331
+ $this->audience = $audience;
332
+ }
333
+ public function getAudience()
334
+ {
335
+ return $this->audience;
336
+ }
337
+ public function setEmail($email)
338
+ {
339
+ $this->email = $email;
340
+ }
341
+ public function getEmail()
342
+ {
343
+ return $this->email;
344
+ }
345
+ public function setExpiresIn($expiresIn)
346
+ {
347
+ $this->expiresIn = $expiresIn;
348
+ }
349
+ public function getExpiresIn()
350
+ {
351
+ return $this->expiresIn;
352
+ }
353
+ public function setIssuedTo($issuedTo)
354
+ {
355
+ $this->issuedTo = $issuedTo;
356
+ }
357
+ public function getIssuedTo()
358
+ {
359
+ return $this->issuedTo;
360
+ }
361
+ public function setScope($scope)
362
+ {
363
+ $this->scope = $scope;
364
+ }
365
+ public function getScope()
366
+ {
367
+ return $this->scope;
368
+ }
369
+ public function setTokenHandle($tokenHandle)
370
+ {
371
+ $this->tokenHandle = $tokenHandle;
372
+ }
373
+ public function getTokenHandle()
374
+ {
375
+ return $this->tokenHandle;
376
+ }
377
+ public function setUserId($userId)
378
+ {
379
+ $this->userId = $userId;
380
+ }
381
+ public function getUserId()
382
+ {
383
+ return $this->userId;
384
+ }
385
+ public function setVerifiedEmail($verifiedEmail)
386
+ {
387
+ $this->verifiedEmail = $verifiedEmail;
388
+ }
389
+ public function getVerifiedEmail()
390
+ {
391
+ return $this->verifiedEmail;
392
+ }
393
+ }
394
+
395
+ class Google_Service_Oauth2_Userinfoplus extends Google_Model
396
+ {
397
+ protected $internal_gapi_mappings = array(
398
+ "familyName" => "family_name",
399
+ "givenName" => "given_name",
400
+ "verifiedEmail" => "verified_email",
401
+ );
402
+ public $email;
403
+ public $familyName;
404
+ public $gender;
405
+ public $givenName;
406
+ public $hd;
407
+ public $id;
408
+ public $link;
409
+ public $locale;
410
+ public $name;
411
+ public $picture;
412
+ public $verifiedEmail;
413
+
414
+
415
+ public function setEmail($email)
416
+ {
417
+ $this->email = $email;
418
+ }
419
+ public function getEmail()
420
+ {
421
+ return $this->email;
422
+ }
423
+ public function setFamilyName($familyName)
424
+ {
425
+ $this->familyName = $familyName;
426
+ }
427
+ public function getFamilyName()
428
+ {
429
+ return $this->familyName;
430
+ }
431
+ public function setGender($gender)
432
+ {
433
+ $this->gender = $gender;
434
+ }
435
+ public function getGender()
436
+ {
437
+ return $this->gender;
438
+ }
439
+ public function setGivenName($givenName)
440
+ {
441
+ $this->givenName = $givenName;
442
+ }
443
+ public function getGivenName()
444
+ {
445
+ return $this->givenName;
446
+ }
447
+ public function setHd($hd)
448
+ {
449
+ $this->hd = $hd;
450
+ }
451
+ public function getHd()
452
+ {
453
+ return $this->hd;
454
+ }
455
+ public function setId($id)
456
+ {
457
+ $this->id = $id;
458
+ }
459
+ public function getId()
460
+ {
461
+ return $this->id;
462
+ }
463
+ public function setLink($link)
464
+ {
465
+ $this->link = $link;
466
+ }
467
+ public function getLink()
468
+ {
469
+ return $this->link;
470
+ }
471
+ public function setLocale($locale)
472
+ {
473
+ $this->locale = $locale;
474
+ }
475
+ public function getLocale()
476
+ {
477
+ return $this->locale;
478
+ }
479
+ public function setName($name)
480
+ {
481
+ $this->name = $name;
482
+ }
483
+ public function getName()
484
+ {
485
+ return $this->name;
486
+ }
487
+ public function setPicture($picture)
488
+ {
489
+ $this->picture = $picture;
490
+ }
491
+ public function getPicture()
492
+ {
493
+ return $this->picture;
494
+ }
495
+ public function setVerifiedEmail($verifiedEmail)
496
+ {
497
+ $this->verifiedEmail = $verifiedEmail;
498
+ }
499
+ public function getVerifiedEmail()
500
+ {
501
+ return $this->verifiedEmail;
502
+ }
503
+ }
google/Service/Resource.php ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Implements the actual methods/resources of the discovered Google API using magic function
24
+ * calling overloading (__call()), which on call will see if the method name (plus.activities.list)
25
+ * is available in this service, and if so construct an apiHttpRequest representing it.
26
+ *
27
+ */
28
+ class Google_Service_Resource
29
+ {
30
+ // Valid query parameters that work, but don't appear in discovery.
31
+ private $stackParameters = array(
32
+ 'alt' => array('type' => 'string', 'location' => 'query'),
33
+ 'fields' => array('type' => 'string', 'location' => 'query'),
34
+ 'trace' => array('type' => 'string', 'location' => 'query'),
35
+ 'userIp' => array('type' => 'string', 'location' => 'query'),
36
+ 'quotaUser' => array('type' => 'string', 'location' => 'query'),
37
+ 'data' => array('type' => 'string', 'location' => 'body'),
38
+ 'mimeType' => array('type' => 'string', 'location' => 'header'),
39
+ 'uploadType' => array('type' => 'string', 'location' => 'query'),
40
+ 'mediaUpload' => array('type' => 'complex', 'location' => 'query'),
41
+ 'prettyPrint' => array('type' => 'string', 'location' => 'query'),
42
+ );
43
+
44
+ /** @var string $rootUrl */
45
+ private $rootUrl;
46
+
47
+ /** @var Google_Client $client */
48
+ private $client;
49
+
50
+ /** @var string $serviceName */
51
+ private $serviceName;
52
+
53
+ /** @var string $servicePath */
54
+ private $servicePath;
55
+
56
+ /** @var string $resourceName */
57
+ private $resourceName;
58
+
59
+ /** @var array $methods */
60
+ private $methods;
61
+
62
+ public function __construct($service, $serviceName, $resourceName, $resource)
63
+ {
64
+ $this->rootUrl = $service->rootUrl;
65
+ $this->client = $service->getClient();
66
+ $this->servicePath = $service->servicePath;
67
+ $this->serviceName = $serviceName;
68
+ $this->resourceName = $resourceName;
69
+ $this->methods = is_array($resource) && isset($resource['methods']) ?
70
+ $resource['methods'] :
71
+ array($resourceName => $resource);
72
+ }
73
+
74
+ /**
75
+ * TODO: This function needs simplifying.
76
+ * @param $name
77
+ * @param $arguments
78
+ * @param $expected_class - optional, the expected class name
79
+ * @return Google_Http_Request|expected_class
80
+ * @throws Google_Exception
81
+ */
82
+ public function call($name, $arguments, $expected_class = null)
83
+ {
84
+ if (! isset($this->methods[$name])) {
85
+ $this->client->getLogger()->error(
86
+ 'Service method unknown',
87
+ array(
88
+ 'service' => $this->serviceName,
89
+ 'resource' => $this->resourceName,
90
+ 'method' => $name
91
+ )
92
+ );
93
+
94
+ throw new Google_Exception(
95
+ "Unknown function: " .
96
+ "{$this->serviceName}->{$this->resourceName}->{$name}()"
97
+ );
98
+ }
99
+ $method = $this->methods[$name];
100
+ $parameters = $arguments[0];
101
+
102
+ // postBody is a special case since it's not defined in the discovery
103
+ // document as parameter, but we abuse the param entry for storing it.
104
+ $postBody = null;
105
+ if (isset($parameters['postBody'])) {
106
+ if ($parameters['postBody'] instanceof Google_Model) {
107
+ // In the cases the post body is an existing object, we want
108
+ // to use the smart method to create a simple object for
109
+ // for JSONification.
110
+ $parameters['postBody'] = $parameters['postBody']->toSimpleObject();
111
+ } else if (is_object($parameters['postBody'])) {
112
+ // If the post body is another kind of object, we will try and
113
+ // wrangle it into a sensible format.
114
+ $parameters['postBody'] =
115
+ $this->convertToArrayAndStripNulls($parameters['postBody']);
116
+ }
117
+ $postBody = json_encode($parameters['postBody']);
118
+ if ($postBody === false && $parameters['postBody'] !== false) {
119
+ throw new Google_Exception("JSON encoding failed. Ensure all strings in the request are UTF-8 encoded.");
120
+ }
121
+ unset($parameters['postBody']);
122
+ }
123
+
124
+ // TODO: optParams here probably should have been
125
+ // handled already - this may well be redundant code.
126
+ if (isset($parameters['optParams'])) {
127
+ $optParams = $parameters['optParams'];
128
+ unset($parameters['optParams']);
129
+ $parameters = array_merge($parameters, $optParams);
130
+ }
131
+
132
+ if (!isset($method['parameters'])) {
133
+ $method['parameters'] = array();
134
+ }
135
+
136
+ $method['parameters'] = array_merge(
137
+ $this->stackParameters,
138
+ $method['parameters']
139
+ );
140
+ foreach ($parameters as $key => $val) {
141
+ if ($key != 'postBody' && ! isset($method['parameters'][$key])) {
142
+ $this->client->getLogger()->error(
143
+ 'Service parameter unknown',
144
+ array(
145
+ 'service' => $this->serviceName,
146
+ 'resource' => $this->resourceName,
147
+ 'method' => $name,
148
+ 'parameter' => $key
149
+ )
150
+ );
151
+ throw new Google_Exception("($name) unknown parameter: '$key'");
152
+ }
153
+ }
154
+
155
+ foreach ($method['parameters'] as $paramName => $paramSpec) {
156
+ if (isset($paramSpec['required']) &&
157
+ $paramSpec['required'] &&
158
+ ! isset($parameters[$paramName])
159
+ ) {
160
+ $this->client->getLogger()->error(
161
+ 'Service parameter missing',
162
+ array(
163
+ 'service' => $this->serviceName,
164
+ 'resource' => $this->resourceName,
165
+ 'method' => $name,
166
+ 'parameter' => $paramName
167
+ )
168
+ );
169
+ throw new Google_Exception("($name) missing required param: '$paramName'");
170
+ }
171
+ if (isset($parameters[$paramName])) {
172
+ $value = $parameters[$paramName];
173
+ $parameters[$paramName] = $paramSpec;
174
+ $parameters[$paramName]['value'] = $value;
175
+ unset($parameters[$paramName]['required']);
176
+ } else {
177
+ // Ensure we don't pass nulls.
178
+ unset($parameters[$paramName]);
179
+ }
180
+ }
181
+
182
+ $this->client->getLogger()->info(
183
+ 'Service Call',
184
+ array(
185
+ 'service' => $this->serviceName,
186
+ 'resource' => $this->resourceName,
187
+ 'method' => $name,
188
+ 'arguments' => $parameters,
189
+ )
190
+ );
191
+
192
+ $url = Google_Http_REST::createRequestUri(
193
+ $this->servicePath,
194
+ $method['path'],
195
+ $parameters
196
+ );
197
+ $httpRequest = new Google_Http_Request(
198
+ $url,
199
+ $method['httpMethod'],
200
+ null,
201
+ $postBody
202
+ );
203
+
204
+ if ($this->rootUrl) {
205
+ $httpRequest->setBaseComponent($this->rootUrl);
206
+ } else {
207
+ $httpRequest->setBaseComponent($this->client->getBasePath());
208
+ }
209
+
210
+ if ($postBody) {
211
+ $contentTypeHeader = array();
212
+ $contentTypeHeader['content-type'] = 'application/json; charset=UTF-8';
213
+ $httpRequest->setRequestHeaders($contentTypeHeader);
214
+ $httpRequest->setPostBody($postBody);
215
+ }
216
+
217
+ $httpRequest = $this->client->getAuth()->sign($httpRequest);
218
+ $httpRequest->setExpectedClass($expected_class);
219
+
220
+ if (isset($parameters['data']) &&
221
+ ($parameters['uploadType']['value'] == 'media' || $parameters['uploadType']['value'] == 'multipart')) {
222
+ // If we are doing a simple media upload, trigger that as a convenience.
223
+ $mfu = new Google_Http_MediaFileUpload(
224
+ $this->client,
225
+ $httpRequest,
226
+ isset($parameters['mimeType']) ? $parameters['mimeType']['value'] : 'application/octet-stream',
227
+ $parameters['data']['value']
228
+ );
229
+ }
230
+
231
+ if (isset($parameters['alt']) && $parameters['alt']['value'] == 'media') {
232
+ $httpRequest->enableExpectedRaw();
233
+ }
234
+
235
+ if ($this->client->shouldDefer()) {
236
+ // If we are in batch or upload mode, return the raw request.
237
+ return $httpRequest;
238
+ }
239
+
240
+ return $this->client->execute($httpRequest);
241
+ }
242
+
243
+ protected function convertToArrayAndStripNulls($o)
244
+ {
245
+ $o = (array) $o;
246
+ foreach ($o as $k => $v) {
247
+ if ($v === null) {
248
+ unset($o[$k]);
249
+ } elseif (is_object($v) || is_array($v)) {
250
+ $o[$k] = $this->convertToArrayAndStripNulls($o[$k]);
251
+ }
252
+ }
253
+ return $o;
254
+ }
255
+ }
google/Signer/Abstract.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * Signs data.
20
+ *
21
+ * @author Brian Eaton <beaton@google.com>
22
+ */
23
+ abstract class Google_Signer_Abstract
24
+ {
25
+ /**
26
+ * Signs data, returns the signature as binary data.
27
+ */
28
+ abstract public function sign($data);
29
+ }
google/Signer/P12.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Signs data.
24
+ *
25
+ * Only used for testing.
26
+ *
27
+ * @author Brian Eaton <beaton@google.com>
28
+ */
29
+ class Google_Signer_P12 extends Google_Signer_Abstract
30
+ {
31
+ // OpenSSL private key resource
32
+ private $privateKey;
33
+
34
+ // Creates a new signer from a .p12 file.
35
+ public function __construct($p12, $password)
36
+ {
37
+ if (!function_exists('openssl_x509_read')) {
38
+ throw new Google_Exception(
39
+ 'The Google PHP API library needs the openssl PHP extension'
40
+ );
41
+ }
42
+
43
+ // If the private key is provided directly, then this isn't in the p12
44
+ // format. Different versions of openssl support different p12 formats
45
+ // and the key from google wasn't being accepted by the version available
46
+ // at the time.
47
+ if (!$password && strpos($p12, "-----BEGIN RSA PRIVATE KEY-----") !== false) {
48
+ $this->privateKey = openssl_pkey_get_private($p12);
49
+ } elseif ($password === 'notasecret' && strpos($p12, "-----BEGIN PRIVATE KEY-----") !== false) {
50
+ $this->privateKey = openssl_pkey_get_private($p12);
51
+ } else {
52
+ // This throws on error
53
+ $certs = array();
54
+ if (!openssl_pkcs12_read($p12, $certs, $password)) {
55
+ throw new Google_Auth_Exception(
56
+ "Unable to parse the p12 file. " .
57
+ "Is this a .p12 file? Is the password correct? OpenSSL error: " .
58
+ openssl_error_string()
59
+ );
60
+ }
61
+ // TODO(beaton): is this part of the contract for the openssl_pkcs12_read
62
+ // method? What happens if there are multiple private keys? Do we care?
63
+ if (!array_key_exists("pkey", $certs) || !$certs["pkey"]) {
64
+ throw new Google_Auth_Exception("No private key found in p12 file.");
65
+ }
66
+ $this->privateKey = openssl_pkey_get_private($certs['pkey']);
67
+ }
68
+
69
+ if (!$this->privateKey) {
70
+ throw new Google_Auth_Exception("Unable to load private key");
71
+ }
72
+ }
73
+
74
+ public function __destruct()
75
+ {
76
+ if ($this->privateKey) {
77
+ openssl_pkey_free($this->privateKey);
78
+ }
79
+ }
80
+
81
+ public function sign($data)
82
+ {
83
+ if (version_compare(PHP_VERSION, '5.3.0') < 0) {
84
+ throw new Google_Auth_Exception(
85
+ "PHP 5.3.0 or higher is required to use service accounts."
86
+ );
87
+ }
88
+ $hash = defined("OPENSSL_ALGO_SHA256") ? OPENSSL_ALGO_SHA256 : "sha256";
89
+ if (!openssl_sign($data, $signature, $this->privateKey, $hash)) {
90
+ throw new Google_Auth_Exception("Unable to sign data");
91
+ }
92
+ return $signature;
93
+ }
94
+ }
google/Task/Exception.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ class Google_Task_Exception extends Google_Exception
23
+ {
24
+ }
google/Task/Retryable.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * Interface for checking how many times a given task can be retried following
24
+ * a failure.
25
+ */
26
+ interface Google_Task_Retryable
27
+ {
28
+ /**
29
+ * Gets the number of times the associated task can be retried.
30
+ *
31
+ * NOTE: -1 is returned if the task can be retried indefinitely
32
+ *
33
+ * @return integer
34
+ */
35
+ public function allowedRetries();
36
+ }
google/Task/Runner.php ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ if (!class_exists('Google_Client')) {
19
+ require_once dirname(__FILE__) . '/../autoload.php';
20
+ }
21
+
22
+ /**
23
+ * A task runner with exponential backoff support.
24
+ *
25
+ * @see https://developers.google.com/drive/web/handle-errors#implementing_exponential_backoff
26
+ */
27
+ class Google_Task_Runner
28
+ {
29
+ /**
30
+ * @var integer $maxDelay The max time (in seconds) to wait before a retry.
31
+ */
32
+ private $maxDelay = 60;
33
+ /**
34
+ * @var integer $delay The previous delay from which the next is calculated.
35
+ */
36
+ private $delay = 1;
37
+
38
+ /**
39
+ * @var integer $factor The base number for the exponential back off.
40
+ */
41
+ private $factor = 2;
42
+ /**
43
+ * @var float $jitter A random number between -$jitter and $jitter will be
44
+ * added to $factor on each iteration to allow for a better distribution of
45
+ * retries.
46
+ */
47
+ private $jitter = 0.5;
48
+
49
+ /**
50
+ * @var integer $attempts The number of attempts that have been tried so far.
51
+ */
52
+ private $attempts = 0;
53
+ /**
54
+ * @var integer $maxAttempts The max number of attempts allowed.
55
+ */
56
+ private $maxAttempts = 1;
57
+
58
+ /**
59
+ * @var Google_Client $client The current API client.
60
+ */
61
+ private $client;
62
+
63
+ /**
64
+ * @var string $name The name of the current task (used for logging).
65
+ */
66
+ private $name;
67
+ /**
68
+ * @var callable $action The task to run and possibly retry.
69
+ */
70
+ private $action;
71
+ /**
72
+ * @var array $arguments The task arguments.
73
+ */
74
+ private $arguments;
75
+
76
+ /**
77
+ * Creates a new task runner with exponential backoff support.
78
+ *
79
+ * @param Google_Client $client The current API client
80
+ * @param string $name The name of the current task (used for logging)
81
+ * @param callable $action The task to run and possibly retry
82
+ * @param array $arguments The task arguments
83
+ * @throws Google_Task_Exception when misconfigured
84
+ */
85
+ public function __construct(
86
+ Google_Client $client,
87
+ $name,
88
+ $action,
89
+ array $arguments = array()
90
+ ) {
91
+ $config = (array) $client->getClassConfig('Google_Task_Runner');
92
+
93
+ if (isset($config['initial_delay'])) {
94
+ if ($config['initial_delay'] < 0) {
95
+ throw new Google_Task_Exception(
96
+ 'Task configuration `initial_delay` must not be negative.'
97
+ );
98
+ }
99
+
100
+ $this->delay = $config['initial_delay'];
101
+ }
102
+
103
+ if (isset($config['max_delay'])) {
104
+ if ($config['max_delay'] <= 0) {
105
+ throw new Google_Task_Exception(
106
+ 'Task configuration `max_delay` must be greater than 0.'
107
+ );
108
+ }
109
+
110
+ $this->maxDelay = $config['max_delay'];
111
+ }
112
+
113
+ if (isset($config['factor'])) {
114
+ if ($config['factor'] <= 0) {
115
+ throw new Google_Task_Exception(
116
+ 'Task configuration `factor` must be greater than 0.'
117
+ );
118
+ }
119
+
120
+ $this->factor = $config['factor'];
121
+ }
122
+
123
+ if (isset($config['jitter'])) {
124
+ if ($config['jitter'] <= 0) {
125
+ throw new Google_Task_Exception(
126
+ 'Task configuration `jitter` must be greater than 0.'
127
+ );
128
+ }
129
+
130
+ $this->jitter = $config['jitter'];
131
+ }
132
+
133
+ if (isset($config['retries'])) {
134
+ if ($config['retries'] < 0) {
135
+ throw new Google_Task_Exception(
136
+ 'Task configuration `retries` must not be negative.'
137
+ );
138
+ }
139
+ $this->maxAttempts += $config['retries'];
140
+ }
141
+
142
+ if (!is_callable($action)) {
143
+ throw new Google_Task_Exception(
144
+ 'Task argument `$action` must be a valid callable.'
145
+ );
146
+ }
147
+
148
+ $this->name = $name;
149
+ $this->client = $client;
150
+ $this->action = $action;
151
+ $this->arguments = $arguments;
152
+ }
153
+
154
+ /**
155
+ * Checks if a retry can be attempted.
156
+ *
157
+ * @return boolean
158
+ */
159
+ public function canAttmpt()
160
+ {
161
+ return $this->attempts < $this->maxAttempts;
162
+ }
163
+
164
+ /**
165
+ * Runs the task and (if applicable) automatically retries when errors occur.
166
+ *
167
+ * @return mixed
168
+ * @throws Google_Task_Retryable on failure when no retries are available.
169
+ */
170
+ public function run()
171
+ {
172
+ while ($this->attempt()) {
173
+ try {
174
+ return call_user_func_array($this->action, $this->arguments);
175
+ } catch (Google_Task_Retryable $exception) {
176
+ $allowedRetries = $exception->allowedRetries();
177
+
178
+ if (!$this->canAttmpt() || !$allowedRetries) {
179
+ throw $exception;
180
+ }
181
+
182
+ if ($allowedRetries > 0) {
183
+ $this->maxAttempts = min(
184
+ $this->maxAttempts,
185
+ $this->attempts + $allowedRetries
186
+ );
187
+ }
188
+ }
189
+ }
190
+ }
191
+
192
+ /**
193
+ * Runs a task once, if possible. This is useful for bypassing the `run()`
194
+ * loop.
195
+ *
196
+ * NOTE: If this is not the first attempt, this function will sleep in
197
+ * accordance to the backoff configurations before running the task.
198
+ *
199
+ * @return boolean
200
+ */
201
+ public function attempt()
202
+ {
203
+ if (!$this->canAttmpt()) {
204
+ return false;
205
+ }
206
+
207
+ if ($this->attempts > 0) {
208
+ $this->backOff();
209
+ }
210
+
211
+ $this->attempts++;
212
+ return true;
213
+ }
214
+
215
+ /**
216
+ * Sleeps in accordance to the backoff configurations.
217
+ */
218
+ private function backOff()
219
+ {
220
+ $delay = $this->getDelay();
221
+
222
+ $this->client->getLogger()->debug(
223
+ 'Retrying task with backoff',
224
+ array(
225
+ 'request' => $this->name,
226
+ 'retry' => $this->attempts,
227
+ 'backoff_seconds' => $delay
228
+ )
229
+ );
230
+
231
+ usleep($delay * 1000000);
232
+ }
233
+
234
+ /**
235
+ * Gets the delay (in seconds) for the current backoff period.
236
+ *
237
+ * @return float
238
+ */
239
+ private function getDelay()
240
+ {
241
+ $jitter = $this->getJitter();
242
+ $factor = $this->attempts > 1 ? $this