PHP code example of lukapeharda / improvely

1. Go to this page and download the library: Download lukapeharda/improvely 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/ */

    

lukapeharda / improvely example snippets


...
$apiKey = '#YOUR_API_KEY#';
$projectID = '#YOUR_PROJECT_ID#';

$client = new LukaPeharda\Improvely\Conversion($apiKey, $projectId);

$params = [
    'label' => '#LABELED_VISITOR_ID_OR_EMAIL_OR_USERNAME#', // this value depends on what you've used to label your user with
    'goal' => 'purchase',
    'revenue' => 19.99,
];

$response = $client->record($params);
...