1. Go to this page and download the library: Download mytracker/s2s-api 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/ */
mytracker / s2s-api example snippets
declare(strict_types=1);
// Check s2s api accessible without any credentials:
$v = Mycom\Tracker\S2S\Api\Example::getActualVersion();
echo $v, PHP_EOL;
// Check your account token:
$yourAppId = 1;
$yourAccountToken = '';
$responseCode = Mycom\Tracker\S2S\Api\Example::testAppAccess($yourAppId, $yourAccountToken);
echo $responseCode, PHP_EOL;
// See how you can send events inside this methods:
Mycom\Tracker\S2S\Api\Example::sendRegistrationEvent($yourAppId, $yourAccountToken);
Mycom\Tracker\S2S\Api\Example::sendLoginEvent($yourAppId, $yourAccountToken);
Mycom\Tracker\S2S\Api\Example::sendCustomEvent($yourAppId, $yourAccountToken);
Mycom\Tracker\S2S\Api\Example::sendCustomRevenue($yourAppId, $yourAccountToken);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.