public function getPageView($url, $properties = [])
    {
        if (empty($url)) {
            throw new Exception('url cannot be empty');
        }

        $props = [
            PayloadProperties::URL => $url
        ];

        if ($properties) {
            $props[PayloadProperties::PROPERTIES] = $properties;
        }

        return $this->getTrackPayload(ActionTypes::PAGE_VIEWED, $props);
    }
public function getPageView($url, $properties = [])
    {
        if (empty($url)) {
            throw new Exception('url cannot be empty');
        }

        $props = [
            PayloadProperties::URL => $url
        ];

        if ($properties) {
            $props[PayloadProperties::PROPERTIES] = $properties;
        }

        return $this->getTrackPayload(ActionTypes::PAGE_VIEWED, $props);
    }
public function getPageView ( $ url , $ properties = [ ] ) { if ( empty ( $ url ) ) { throw new Exception ( 'url cannot be empty' ) ; } $ props = [ PayloadProperties :: URL => $ url ] ; if ( $ properties ) { $ props [ PayloadProperties :: PROPERTIES ] = $ properties ; } return $ this -> getTrackPayload ( ActionTypes :: PAGE_VIEWED , $ props ) ; }
Generates payload for page view events

@param $url
@param array $properties
@return array
@throws Exception
Generates payload for page view events