primedata.ai / analytics-sdk-php
Analytics PHP SDK
Installs: 7
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 1
Open Issues: 0
Type:libary
Requires
- ext-json: *
- guzzlehttp/guzzle: ^6
- guzzlehttp/psr7: ^1.6
- nesbot/carbon: ^2.37
Requires (Dev)
- mockery/mockery: ^1.3
- phpunit/phpunit: ^7.4
README
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")); }