PHP code example of keyteqlabs / li3_mixpanel

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

    

keyteqlabs / li3_mixpanel example snippets



Libraries::add('li3_mixpanel', array(
    'token' => $token
));


Libraries::add('li3_mixpanel', array(
    'token' => $token,
    'env' => array('production', 'staging')
));


Mixpanel::track('api.requests', $params['request']->params);
// Track revenue
Mixpanel::transaction($userId, $sum);
// Track people by identifying the person
Mixpanel::set($userId, array(
    '$name' => $user->name,
    '$username' => $user->username
));