Skip to content

ConversionEvent ​

Rasuvaeff\Yii3AbTesting\ConversionEvent

Class · rasuvaeff/yii3-ab-testing · Source

A subject completed a goal. Carries the same decision fields as ExposureEvent so a report can group both without a join back to the experiment definition.

exposureEventId is optional: with it the conversion is attributed to a specific exposure, without it attribution falls back to the configured AttributionWindow around the subject's first exposure.

Constructor ​

php
new ConversionEvent(
    string $eventId,
    DateTimeImmutable $occurredAt,
    string $experiment,
    string $variant,
    string $subjectId,
    string $goal,
    DecisionReason $reason,
    AssignmentSource $source,
    ?string $experimentRevision = null,
    string $environment = '',
    array $dimensions = [],
    ?string $exposureEventId = null,
)

Properties ​

PropertyTypeReadonlyDescription
eventIdstringyes
occurredAtDateTimeImmutableyes
experimentstringyes
variantstringyes
subjectIdstringyes
goalstringyes
experimentRevision?stringyes
exposureEventId?stringyes
dimensionsarrayyes
reasonDecisionReasonyes
sourceAssignmentSourceyes
environmentstringyes

Methods ​

isAnalyzable() ​

php
isAnalyzable(): bool