PHP code example of triggmine / triggmine-sdk-php
1. Go to this page and download the library: Download triggmine/triggmine-sdk-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/ */
triggmine / triggmine-sdk-php example snippets
use TriggMineSDK\Models\ProspectEvent;
use TriggMineSDK\Events\TriggMineApi;
//Instance TriggMine API with your ApiKey and ApiUrl
//Your ApiKey && ApiUrl > https://client.triggmine.com.ua/login > Settings > Integration
$client = new TriggMineApi( 'YOUR API URL', 'YOUR API KEY' );
//Registration event example
$dataCustomer = new ProspectEvent;
$dataCustomer->device_id = "4c3d48512d48b2603092b5a45ba74c8c";
$dataCustomer->device_id_1 = "465060737";
$dataCustomer->customer_id = 567;
$dataCustomer->customer_first_name = "John";
$dataCustomer->customer_last_name = "Doe";
$dataCustomer->customer_email = "[email protected]";
$dataCustomer->customer_date_created = "2017-06-08";
$response = $client->SendEvent( $dataCustomer );