PHP code example of there4 / php-analytics-event

1. Go to this page and download the library: Download there4/php-analytics-event 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/ */

    

there4 / php-analytics-event example snippets




use There4\Analytics\AnalyticsEvent;

// Record the download event in Analytics
$events = new AnalyticsEvent('UAxxxxxxx', 'example.com');
$events->trackEvent('resources', 'download', 'cli-latest');
bash
composer