PHP Class Kurt\Google\Analytics\Analytics

Inheritance: use trait Kurt\Google\Analytics\Traits\HelperFunctions, use trait Kurt\Google\Analytics\Traits\Filters\CustomCommonFilters, use trait Kurt\Google\Analytics\Traits\Filters\GoogleCommonFilters, use trait Kurt\Google\Analytics\Traits\Handlers\DatesHandler, use trait Kurt\Google\Analytics\Traits\Handlers\DimensionsHandler, use trait Kurt\Google\Analytics\Traits\Handlers\FiltersHandler, use trait Kurt\Google\Analytics\Traits\Handlers\MetricsHandler, use trait Kurt\Google\Analytics\Traits\Handlers\ParamsHandler, use trait Kurt\Google\Analytics\Traits\Handlers\SegmentHandler, use trait Kurt\Google\Analytics\Traits\Handlers\SortHandler
Show file Open project: ozankurt/google-analytics

Protected Properties

Property Type Description
$dimensions
$filters
$googleServicesCore Kurt\Google\Core\Core Google services core.
$metrics Parameters
$period Period Time period.
$segment
$service Google_Service_Analytics Google Analytics service instance.
$sort
$viewId string Google analytics view id.

Public Methods

Method Description
__construct ( Kurt\Google\Core\Core $googleServicesCore )
execute ( array $parameters = [], $parseResult = true ) Execute the query by merging arrays to current ones.
getRealtimeData ( ) : array Execute the query and fetch the results to a collection.
getViewId ( ) : string Getter for viewId.
parseResult ( $results ) : array Parse the dirty google data response.
setViewId ( string $viewId ) Setter for viewId, allows manual update inside code.

Private Methods

Method Description
configure ( ) : void Set the configuration details of analytics.
setupAnalyticsService ( )
setupDates ( $startDate = null, $endDate = null )
validateViewId ( ) : void Validate analytics view ID.

Method Details

__construct() public method

public __construct ( Kurt\Google\Core\Core $googleServicesCore )
$googleServicesCore Kurt\Google\Core\Core

execute() public method

Execute the query by merging arrays to current ones.
public execute ( array $parameters = [], $parseResult = true )
$parameters array

getRealtimeData() public method

Execute the query and fetch the results to a collection.
public getRealtimeData ( ) : array
return array

getViewId() public method

Getter for viewId.
public getViewId ( ) : string
return string

parseResult() public method

Parse the dirty google data response.
public parseResult ( $results ) : array
return array

setViewId() public method

Setter for viewId, allows manual update inside code.
public setViewId ( string $viewId )
$viewId string

Property Details

$dimensions protected property

protected $dimensions

$filters protected property

protected $filters

$googleServicesCore protected property

Google services core.
protected Core,Kurt\Google\Core $googleServicesCore
return Kurt\Google\Core\Core

$metrics protected property

Parameters
protected $metrics

$period protected property

Time period.
protected Period,Kurt\Google\Analytics $period
return Period

$segment protected property

protected $segment

$service protected property

Google Analytics service instance.
protected Google_Service_Analytics $service
return Google_Service_Analytics

$sort protected property

protected $sort

$viewId protected property

Google analytics view id.
protected string $viewId
return string