protected function _execute(CM_Params $params) { $propertyId = $params->getString('propertyId'); $parameterList = $params->getArray('parameterList'); $client = new CMService_GoogleAnalytics_MeasurementProtocol_Client($propertyId); $client->_submitHit($parameterList); }
public function testGetRandomClientId() { $client = new CMService_GoogleAnalytics_MeasurementProtocol_Client('foo'); $this->assertInternalType('string', $client->getRandomClientId()); $this->assertGreaterThan(5, strlen($client->getRandomClientId())); $this->assertNotEquals($client->getRandomClientId(), $client->getRandomClientId()); }
/** * @return \GuzzleHttp\Client */ protected function _getGuzzleClient() { if (!self::$_client) { self::$_client = new \GuzzleHttp\Client(['base_url' => 'http://www.google-analytics.com']); } return self::$_client; }