Copied!

BuyEventData

BuyEventData.php : 14
Read-only
Final

Base class for tracking event data with common parameter building logic.

Methods

public__construct()

BuyEventData.php : 16
public __construct(string $productId, string $productName, string $subtotal, string $currency, string $itemPrice, int $quantity[, string|null $categoryPath = null ][, string|null $websiteId = null ][, string|null $masterId = null ])

Parameters

Name Type Default value Description
$productId string - -
$productName string - -
$subtotal string - -
$currency string - -
$itemPrice string - -
$quantity int - -
$categoryPath string|null null -
$websiteId string|null null -
$masterId string|null null -

publicgetEventType()

BuyEventData.php : 28
public getEventType() : EventType

Return values

EventType

publicgetTemplateHint()

AbstractEventData.php : 44

Returns optional template hint for special rendering needs.

public getTemplateHint() : string|null

Return values

string|null

publictoArray()

BuyEventData.php : 33

Returns Raptor tracking parameters.

public toArray() : array<string, mixed>

Return values

array<string, mixed>

protectedbuildParameters()

AbstractEventData.php : 24
protected buildParameters(array<string, mixed> $required[, array<string, mixed> $optional = [] ]) : array<string, mixed>

Parameters

Name Type Default value Description
$required array<string, mixed> - -
$optional array<string, mixed> [] -

Return values

array<string, mixed>