protected function sendHit($methodName)
    {
        $hitType = strtoupper(substr($methodName, 4));

        $hitConstant = $this->getParameterClassConstant(
            'TheIconic\Tracking\GoogleAnalytics\Parameters\Hit\HitType::HIT_TYPE_' . $hitType,
            'Hit type ' . $hitType . ' is not defined, check spelling'
        );

        $this->setHitType($hitConstant);

        if (!$this->hasMinimumRequiredParameters()) {
            throw new InvalidPayloadDataException();
        }

        if ($this->isDisabled) {
            return new NullAnalyticsResponse();
        }

        return $this->getHttpClient()->post($this->getUrl(), $this->getHttpClientOptions());
    }
protected function sendHit($methodName)
    {
        $hitType = strtoupper(substr($methodName, 4));

        $hitConstant = $this->getParameterClassConstant(
            'TheIconic\Tracking\GoogleAnalytics\Parameters\Hit\HitType::HIT_TYPE_' . $hitType,
            'Hit type ' . $hitType . ' is not defined, check spelling'
        );

        $this->setHitType($hitConstant);

        if (!$this->hasMinimumRequiredParameters()) {
            throw new InvalidPayloadDataException();
        }

        if ($this->isDisabled) {
            return new NullAnalyticsResponse();
        }

        return $this->getHttpClient()->post($this->getUrl(), $this->getHttpClientOptions());
    }
protected function sendHit ( $ methodName ) { $ hitType = strtoupper ( substr ( $ methodName , 4 ) ) ; $ hitConstant = $ this -> getParameterClassConstant ( 'TheIconic\Tracking\GoogleAnalytics\Parameters\Hit\HitType::HIT_TYPE_' . $ hitType , 'Hit type ' . $ hitType . ' is not defined, check spelling' ) ; $ this -> setHitType ( $ hitConstant ) ; if ( ! $ this -> hasMinimumRequiredParameters ( ) ) { throw new InvalidPayloadDataException ( ) ; } if ( $ this -> isDisabled ) { return new NullAnalyticsResponse ( ) ; } return $ this -> getHttpClient ( ) -> post ( $ this -> getUrl ( ) , $ this -> getHttpClientOptions ( ) ) ; }
Sends a hit to GA. The hit will contain in the payload all the parameters added before.

@param $methodName
@return AnalyticsResponseInterface
@throws Exception\InvalidPayloadDataException
Sends a hit to GA . The hit will contain in the payload all the parameters added before .