← All changes
|
includes/integrations/class-google-analytics-client.php
+2
-5
1.10.0
→
2.7.0
View file →
| @@ -149,13 +149,10 @@ | ||
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | $full_url = self::API_BASE_URL . $endpoint; |
| 152 | 152 | |
| 153 | - // Only append API key if no access token is present | |
| 154 | - if (!empty($this->api_key) && empty($this->access_token)) { | |
| 155 | - $full_url .= '?key=' . $this->api_key; | |
| 156 | - } | |
| 157 | - | |
| 153 | + // The API key is sent by make_request() in the x-goog-api-key header — never | |
| 154 | + // in the query string, which is captured by proxy/access logs. | |
| 158 | 155 | return $this->make_request($full_url, $request_body, 'POST'); |
| 159 | 156 | } |
| 160 | 157 | |
| 161 | 158 | /** |