theiconic / php-ga-measurement-protocol

Send data to Google Analytics from the server using PHP. Implements GA measurement protocol.
MIT License
655 stars 135 forks source link

How to add "promo" params? #57

Closed ZherebcovSergey closed 6 years ago

ZherebcovSergey commented 6 years ago

Hi! I want to add this param using your API, how can I do this?

ZherebcovSergey commented 6 years ago
$promotion = [
 "id" => "some id",
 "name" => "some name",
 "creative" => "some creative",
 "position" => "some position",
];

$MeasurementProtocolObj -> addPromotion($promotion);

conformity

'id' - 'id', 'name' - 'nm', 'creative' - 'cr', 'position' - 'ps'