PHP code example of mintance / mintance-php

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

    

mintance / mintance-php example snippets



// Import dependencies
eplace with your project token
$mt = new Mintance("PROJECT_TOKEN");

// Identify your contact.
$mt->people->setIdentifier("my_people_id");

// Track an event
$mt->track("button clicked", array("label" => "sign-up")); 

// Create/Update a profile for user id 12345
$mt->people->set(array(
    'first_name'       => "John",
    'last_name'        => "Doe",
    'email'            => "[email protected]",
    'phone'            => "5555555555",
    // Custom fields
    'Favorite Color'    => "red"
));


// Import Mintance
s, replace with your project token
$mt = new Mintance("PROJECT_TOKEN");

// Track an event
$mt->track("button clicked", array("label" => "sign-up")); 

// Create/Update a profile for user id 12345
$mt->people->set(array(
    'first_name'       => "John",
    'last_name'        => "Doe",
    'email'            => "[email protected]",
    'phone'            => "5555555555",
    // Custom fields
    'Favorite Color'    => "red"
));
bash
$ composer 
json
{
    "intance/mintance-php" : "1.*"
    }
}