primedata.ai/analytics-sdk-php

Analytics PHP SDK

0.4.0 2021-08-01 03:14 UTC

This package is auto-updated.

Last update: 2024-10-29 06:31:03 UTC


README

Build Status

Usage

/**
@var $buffer QueueBuffer
*/
$buffer = YourQueueBuffer();
$client = new Client('s-1', 'w-1', $buffer);
$client->track('access_report', ['in' => 'the morning'],
    Event::withSessionID("s-id"),
    Event::withSource(new Source("site", "primedata.ai", array("price" => 20))),
    Event::withTarget(new Target("report", "CDP solution", array("pages" => 100)))
);


public function testSend()
{
    $client = new Client("web-1fcrwsKgV0Zk2EdpCFYIvYbNRgs", "1fcrwstLt8g0ggTL5K87a6O6umy");
    $client->track("purchase_product", ['total_value' => 2000, 'currency' => "USD"],
        Event::withSessionID("1e85YTciGhH6vLfLpmqhJfhFhpq"));
}