PHP code example of gist / analytics
1. Go to this page and download the library: Download gist/analytics 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/ */
gist / analytics example snippets
use Gist\Analytics;
$client = new Analytics\Client([
'api_key' => 'Your API key'
]);
// Insert a new record
$event = $client->insert($name, $value, $meta = []);
// Query for existing records.
$event = $client->query($name, $startDate, $endDate, $query = [], $meta = [], $format = "default");