Метод | Описание | |
---|---|---|
addGoal ( integer $idSite, string $name, string $matchAttribute, string $pattern, string $patternType, boolean $caseSensitive = false, boolean | float $revenue = false, boolean $allowMultipleConversionsPerVisit = false, string $description = '' ) : integer | Creates a Goal for a given website. | |
deleteGoal ( integer $idSite, integer $idGoal ) : void | Soft deletes a given Goal. | |
get ( integer $idSite, string $period, string $date, boolean $segment = false, boolean | integer $idGoal = false, array $columns = [] ) : |
Returns Goals data. | |
getConversionRate ( $idSite, $period, $date, $segment = false, $idGoal = false ) | ||
getConversions ( $idSite, $period, $date, $segment = false, $idGoal = false ) | ||
getDaysToConversion ( integer $idSite, string $period, string $date, string | boolean $segment = false, integer | boolean $idGoal = false ) : false | |
Gets a DataTable that maps ranges of days to the number of conversions that occurred within those ranges, for the specified site, date range, segment and goal. | |
getGoal ( integer $idSite, integer $idGoal ) : array | Return a single goal. | |
getGoals ( string | array $idSite ) : array | Returns all Goals for a given website, or list of websites | |
getItemsCategory ( $idSite, $period, $date, $abandonedCarts = false, $segment = false ) | ||
getItemsName ( $idSite, $period, $date, $abandonedCarts = false, $segment = false ) | ||
getItemsSku ( $idSite, $period, $date, $abandonedCarts = false, $segment = false ) | ||
getMetrics ( $idSite, $period, $date, $segment = false, $idGoal = false, $columns = [] ) | Similar to {@link get()} but does not return any metrics for new and returning visitors. It won't apply any segment by default. This method is deprecated from the API as it is only there to make the implementation of the actual {@link get()} method easy. | |
getNbVisitsConverted ( $idSite, $period, $date, $segment = false, $idGoal = false ) | ||
getRevenue ( $idSite, $period, $date, $segment = false, $idGoal = false ) | ||
getVisitsUntilConversion ( integer $idSite, string $period, string $date, string | boolean $segment = false, integer | boolean $idGoal = false ) : boolean | |
Gets a DataTable that maps ranges of visit counts to the number of conversions that occurred on those visits for the specified site, date range, segment and goal. | |
updateGoal ( integer $idSite, integer $idGoal, $name, $matchAttribute, string $pattern, string $patternType, boolean $caseSensitive = false, boolean | float $revenue = false, boolean $allowMultipleConversionsPerVisit = false, string $description = '' ) : void | Updates a Goal description. |
Метод | Описание | |
---|---|---|
appendSegment ( $segment, $segmentToAppend ) | ||
convertSpecialGoalIds ( string | integer $idGoal ) : integer | Helper function that checks for special string goal IDs and converts them to their integer equivalents. | |
enrichItemsDataTableWithItemsViewMetrics ( $dataTable, $idSite, $period, $date, $segment, $idSubtable ) | ||
enrichItemsTableWithViewMetrics ( $dataTable, $recordName, $idSite, $period, $date, $segment ) | Enhances the dataTable with Items attributes found in the Custom Variables report. | |
getGoalSpecificDataTable ( string $recordName, integer | string $idSite, string $period, string $date, string $segment, integer | boolean $idGoal ) : false | |
Utility method that retrieve an archived DataTable for a specific site, date range, segment and goal. If not goal is specified, this method will retrieve and sum the data for every goal. | |
getItems ( $recordName, $idSite, $period, $date, $abandonedCarts, $segment ) | Returns a datatable of Items SKU/name or categories and their metrics If $abandonedCarts set to 1, will return items abandoned in carts. If set to 0, will return items ordered | |
getNumeric ( $idSite, $period, $date, $segment, $toFetch ) | ||
renameNotDefinedRow ( $dataTable, $notDefinedStringPretty ) |
Метод | Описание | |
---|---|---|
checkDescription ( $description ) | ||
checkName ( $name ) | ||
checkPattern ( $pattern ) | ||
checkPatternIsValid ( $patternType, $pattern, $matchAttribute ) | ||
formatGoal ( $goal ) | ||
getCacheId ( $idSite ) | ||
getGoalsInfoStaticCache ( ) | ||
getModel ( ) |
public addGoal ( integer $idSite, string $name, string $matchAttribute, string $pattern, string $patternType, boolean $caseSensitive = false, boolean | float $revenue = false, boolean $allowMultipleConversionsPerVisit = false, string $description = '' ) : integer | ||
$idSite | integer | |
$name | string | |
$matchAttribute | string | 'url', 'title', 'file', 'external_website', 'manually', 'event_action', 'event_category' or 'event_name' |
$pattern | string | eg. purchase-confirmation.htm |
$patternType | string | 'regex', 'contains', 'exact' |
$caseSensitive | boolean | |
$revenue | boolean | float | If set, default revenue to assign to conversions |
$allowMultipleConversionsPerVisit | boolean | By default, multiple conversions in the same visit will only record the first conversion. If set to true, multiple conversions will all be recorded within a visit (useful for Ecommerce goals) |
$description | string | |
Результат | integer | ID of the new goal |
protected enrichItemsDataTableWithItemsViewMetrics ( $dataTable, $idSite, $period, $date, $segment, $idSubtable ) |
protected enrichItemsTableWithViewMetrics ( $dataTable, $recordName, $idSite, $period, $date, $segment ) | ||
$dataTable | ||
$recordName | ||
$idSite | ||
$period | ||
$date | ||
$segment |
public get ( integer $idSite, string $period, string $date, boolean $segment = false, boolean | integer $idGoal = false, array $columns = [] ) : |
||
$idSite | integer | |
$period | string | |
$date | string | |
$segment | boolean | |
$idGoal | boolean | integer | |
$columns | array | Array of metrics to fetch: nb_conversions, conversion_rate, revenue |
Результат |
public getConversionRate ( $idSite, $period, $date, $segment = false, $idGoal = false ) |
public getConversions ( $idSite, $period, $date, $segment = false, $idGoal = false ) |
public getDaysToConversion ( integer $idSite, string $period, string $date, string | boolean $segment = false, integer | boolean $idGoal = false ) : false | |
||
$idSite | integer | The site to select data from. |
$period | string | The period type. |
$date | string | The date type. |
$segment | string | boolean | The segment. |
$idGoal | integer | boolean | The id of the goal to get data for. If this is set to false, data for every goal that belongs to $idSite is returned. |
Результат | false | |
protected getGoalSpecificDataTable ( string $recordName, integer | string $idSite, string $period, string $date, string $segment, integer | boolean $idGoal ) : false | |
||
$recordName | string | The archive entry name. |
$idSite | integer | string | The site(s) to select data for. |
$period | string | The period type. |
$date | string | The date type. |
$segment | string | The segment. |
$idGoal | integer | boolean | The id of the goal to get data for. If this is set to false, data for every goal that belongs to $idSite is returned. |
Результат | false | |
protected getItems ( $recordName, $idSite, $period, $date, $abandonedCarts, $segment ) |
public getItemsCategory ( $idSite, $period, $date, $abandonedCarts = false, $segment = false ) |
public getItemsName ( $idSite, $period, $date, $abandonedCarts = false, $segment = false ) |
public getItemsSku ( $idSite, $period, $date, $abandonedCarts = false, $segment = false ) |
public getMetrics ( $idSite, $period, $date, $segment = false, $idGoal = false, $columns = [] ) |
public getNbVisitsConverted ( $idSite, $period, $date, $segment = false, $idGoal = false ) |
public getRevenue ( $idSite, $period, $date, $segment = false, $idGoal = false ) |
public getVisitsUntilConversion ( integer $idSite, string $period, string $date, string | boolean $segment = false, integer | boolean $idGoal = false ) : boolean | |
||
$idSite | integer | The site to select data from. |
$period | string | The period type. |
$date | string | The date type. |
$segment | string | boolean | The segment. |
$idGoal | integer | boolean | The id of the goal to get data for. If this is set to false, data for every goal that belongs to $idSite is returned. |
Результат | boolean | |
protected renameNotDefinedRow ( $dataTable, $notDefinedStringPretty ) |
public updateGoal ( integer $idSite, integer $idGoal, $name, $matchAttribute, string $pattern, string $patternType, boolean $caseSensitive = false, boolean | float $revenue = false, boolean $allowMultipleConversionsPerVisit = false, string $description = '' ) : void | ||
$idSite | integer | |
$idGoal | integer | |
$name | ||
$matchAttribute | ||
$pattern | string | |
$patternType | string | |
$caseSensitive | boolean | |
$revenue | boolean | float | |
$allowMultipleConversionsPerVisit | boolean | |
$description | string | |
Результат | void |