Credentials file, generated by google, is expected to be in the vendor folder. Feel free to relocate.
Usage example:
require_once __DIR__ . '/vendor/autoload.php';
use \Analytics\Ga;
use \Analytics\Audience;
use \Analytics\Conversion;
use \Analytics\Behavior;
$behavior_report = new Behavior();
$behavior_report->setViewId("XXXXXXXX");
$behavior_report->setDate("2017-08-01", "2017-08-07");
$output = $behavior_report->internalSearches();