PHP code example of iugosds / sherlaravel

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

    

iugosds / sherlaravel example snippets


$ composer 

SHERLOCK_SCORE_API_KEY=a12b34c56...

use SherLaravel;

SherLaravel::identifyAccount("groupIdHere");

SherLaravel::identifyUser("userIdHere");

SherLaravel::trackEvent("userID", "event-name");

SherLaravel::identifyAccount(String $group_id, ?Array $traits= [], ?int $timestamp = null)
SherLaravel::identifyUser(String $user_id, ?String $group_id = null, ?Array $traits= [], ?int $timestamp = null)
SherLaravel::trackEvent(String $user_id, String $event, ?int $timestamp = null)

SherLaravel::identifyUser("1234", "Customer44", [
        'name' => 'John Doe',
        'email' => '[email protected]'],
    '1553647710707');