PHP code example of samlittler / vero-php

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

    

samlittler / vero-php example snippets


$vero  = new \SamLittler\Vero('<your_auth_token>');

$user = $vero->users()->findOrCreate(123);
$user->identify();

$user = $vero->users()->findOrCreate(123);
$user->setEmail('[email protected]');
$user->identify([
    'forename' => 'John',
    'surname' => 'Smith',
]);

$user = $vero->users()->findOrCreate(123);
$user->addChannel('push', '<apns_or_fcm_token>', 'ios');
$user->identify();

$user = $vero->users()->findOrCreate(123);
$user->unsubscribe();

$user = $vero->users()->findOrCreate(123);
$user->unsubscribe();

$user = $vero->users()->findOrCreate(123);
$user->delete();

$user = $vero->users()->findOrCreate(123);
$user->addTag('november');

$user = $vero->users()->findOrCreate(123);
$user->removeTag('november');

$user = $vero->users()->findOrCreate(123);
$user->track('User Registered', [
    'referral' => 'app_store',
]);