PHP code example of priyolahiri / keenclient-php

1. Go to this page and download the library: Download priyolahiri/keenclient-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

priyolahiri / keenclient-php example snippets


use KeenIO\Service\KeenIO;

KeenIO::configure($projectId, $apiKey);

KeenIO::addEvent('purchases', array(
    'purchase' => array(
        'item' => 'Golden Elephant'
    ),
));

$filter = array(
    'property_name' => 'id', 
    'operator' => 'eq', 
    'property_value' => '123'
);
$filters = array($filter);

$scopedKey = KeenIO::getScopedKey($filters);