title: Convert cURL request to Guzzle 6
body: <p>I'm trying to convert some Google Analytics event tracking code from a cURL request to Guzzlehttp 6. The Guzzle request comes back with 200, but the event is not tracked. The same request gets tracked using cURL. Any ideas?</p>
  
  <p>Working cURL:</p>
  
  <pre><code>$ch = curl_init();
          curl_setopt($ch, CURLOPT_URL, 'https://www.google-analytics.com/collect');
          curl_setopt($ch, CURLOPT_POST, 1);
          curl_setopt($ch, CURLOPT_HEADER, 1);
          curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/x-www-form-urlencoded"]);
          curl_setopt($ch, CURL_HTTP_VERSION_1_1, 1);
          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
          curl_setopt($ch, CURLOPT_POSTFIELDS,
              'v=1&amp;t=event&amp;tid=UA-xxxxxxxx-x&amp;cid=' . $cid . '&amp;ec=' . $cat . '&amp;ea=' . urlencode($action) . '&amp;el=' . urlencode($label) . '&amp;uip=' . $uip . '');
          curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
          curl_exec($ch);
          curl_close($ch);
  </code></pre>
  
  <p>GuzzleHttp:</p>
  
  <pre><code>$postData['form_params'] = [
      'v' =&gt; '1',
      't' =&gt; 'event',
      'tid' =&gt; 'UA-xxxxxxxx-x',
      'cid' =&gt; $cid,
      'ec' =&gt; $cat,
      'ea' =&gt; $action,
      'el' =&gt; $label,
      'uip' =&gt; $uip
  ];
  $client = new \GuzzleHttp\Client();
  $response = $client-&gt;request('POST', 'https://www.google-analytics.com/collect', $postData);
  </code></pre>