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

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

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

Свойство Тип Описание
$columnName string This will be the name of the column in the log_visit 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.
onConvertedVisit ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action ) : mixed | false This event is executed shortly after "onNewVisit" or "onExistingVisit" in case the visitor converted a goal.
onExistingVisit ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action ) : mixed | false The onExistingVisit method is triggered when a visitor was recognized meaning it is not a new visitor.
onNewVisit ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action ) : mixed | false The onNewVisit method is triggered when a new visitor is detected. This means here you can define an initial value for this user. By returning boolean false no value will be saved. Once the user makes another action the event "onExistingVisit" is executed. That means for each visitor this method is executed once. If you do not want to perform any action on a new visit you can just remove this method.

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

Метод Описание
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

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

In this example we give the user 5 extra points for this achievement. Usually this event is not needed and you can simply remove this method therefore. An example would be for instance to persist the last converted action url. Return boolean false if you do not want to change the current value.
public onConvertedVisit ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action ) : mixed | false
$request Piwik\Tracker\Request
$visitor Piwik\Tracker\Visitor
$action Piwik\Tracker\Action | null
Результат mixed | false

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

If you want you can overwrite any previous value set by the event onNewVisit. By returning boolean false no value will be updated. If you do not want to perform any action on a new visit you can just remove this method.
public onExistingVisit ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action ) : mixed | false
$request Piwik\Tracker\Request
$visitor Piwik\Tracker\Visitor
$action Piwik\Tracker\Action | null
Результат mixed | false

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

The onNewVisit method is triggered when a new visitor is detected. This means here you can define an initial value for this user. By returning boolean false no value will be saved. Once the user makes another action the event "onExistingVisit" is executed. That means for each visitor this method is executed once. If you do not want to perform any action on a new visit you can just remove this method.
public onNewVisit ( Request $request, Piwik\Tracker\Visitor $visitor, Action | null $action ) : mixed | false
$request Piwik\Tracker\Request
$visitor Piwik\Tracker\Visitor
$action Piwik\Tracker\Action | null
Результат mixed | false

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

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

This will be the name of the column in the log_visit 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