PHP code example of manzadey / yandex-metrika
1. Go to this page and download the library: Download manzadey/yandex-metrika 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/ */
manzadey / yandex-metrika example snippets
use Manzadey\YandexMetrika\Client;
$client = new Client('metrics', 'token');
$response = $client->get('/stat/v1/data/bytime', [
'metrics' => 'ym:s:visits',
'date1' => 'today',
'date2' => 'today',
]);
// return \Manzadey\YandexMetrika\Response
public function getResponse() : ResponseInterface
public function toArray() : array
public function getBody() : string