PHP Класс Piwik\Plugins\ExampleTracker\Columns\ExampleConversionDimension

See {@link http://developer.piwik.org/api-reference/Piwik/Plugin\Dimension\ConversionDimension} for more information.
Наследование: extends Piwik\Plugin\Dimension\ConversionDimension
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$columnName string This will be the name of the column in the log_conversion table if a $columnType is specified.
$columnType string If a columnType is defined, we will create this a column in the MySQL table having this type. Please make sure MySQL will understand this type. Once you change the column type the Piwik platform will notify the user to perform an update which can sometimes take a long time so be careful when choosing the correct column type.

Открытые методы

Метод Описание
getName ( ) : string The name of the dimension which will be visible for instance in the UI of a related report and in the mobile app.
onEcommerceCartUpdateConversion ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action, GoalManager $goalManager ) : mixed | false This event is triggered when an ecommerce cart update is converted. In this example we would store a the value of the tracking url parameter "myCustomParam" in the "example_conversion_dimension" column.
onEcommerceOrderConversion ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action, GoalManager $goalManager ) : mixed | false This event is triggered when an ecommerce order is converted. In this example we would store a "0" in case it was the visitors first action or "1" otherwise.
onGoalConversion ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action, GoalManager $goalManager ) : mixed | false This event is triggered when an any custom goal is converted. In this example we would store a the id of the goal in the 'example_conversion_dimension' column if the visitor is known and nothing otherwise.

Защищенные методы

Метод Описание
configureSegments ( ) By defining one or multiple segments a user will be able to filter their visitors by this column. For instance show all reports only considering users having more than 10 achievement points. If you do not want to define a segment for this dimension just remove the column.

Описание методов

configureSegments() защищенный Метод

By defining one or multiple segments a user will be able to filter their visitors by this column. For instance show all reports only considering users having more than 10 achievement points. If you do not want to define a segment for this dimension just remove the column.
protected configureSegments ( )

getName() публичный Метод

The name of the dimension which will be visible for instance in the UI of a related report and in the mobile app.
public getName ( ) : string
Результат string

onEcommerceCartUpdateConversion() публичный Метод

Return boolean false if you do not want to change the value in some cases. If you do not want to perform any action on an ecommerce order at all it is recommended to just remove this method.
public onEcommerceCartUpdateConversion ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action, GoalManager $goalManager ) : mixed | false
$request Piwik\Tracker\Request
$visitor Piwik\Tracker\Visitor
$action Piwik\Tracker\Action | null
$goalManager Piwik\Tracker\GoalManager
Результат mixed | false

onEcommerceOrderConversion() публичный Метод

Return boolean false if you do not want to change the value in some cases. If you do not want to perform any action on an ecommerce order at all it is recommended to just remove this method.
public onEcommerceOrderConversion ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action, GoalManager $goalManager ) : mixed | false
$request Piwik\Tracker\Request
$visitor Piwik\Tracker\Visitor
$action Piwik\Tracker\Action | null
$goalManager Piwik\Tracker\GoalManager
Результат mixed | false

onGoalConversion() публичный Метод

Return boolean false if you do not want to change the value in some cases. If you do not want to perform any action on an ecommerce order at all it is recommended to just remove this method.
public onGoalConversion ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action, GoalManager $goalManager ) : mixed | false
$request Piwik\Tracker\Request
$visitor Piwik\Tracker\Visitor
$action Piwik\Tracker\Action | null
$goalManager Piwik\Tracker\GoalManager
Результат mixed | false

Описание свойств

$columnName защищенное свойство

This will be the name of the column in the log_conversion table if a $columnType is specified.
protected string $columnName
Результат string

$columnType защищенное свойство

If a columnType is defined, we will create this a column in the MySQL table having this type. Please make sure MySQL will understand this type. Once you change the column type the Piwik platform will notify the user to perform an update which can sometimes take a long time so be careful when choosing the correct column type.
protected string $columnType
Результат string