1. Home
  2. Knowledge Base
  3. Developer Articles
  4. PHP SDK


The PHP SDK we provide and support makes it easy for you to interface with our API or integrate into your custom system if you’re using PHP as your primary language.


Install via Composer

Install with composer using composer require bananastandio/php_sdk. This is the fastest and recommended way to do it.

Install Manually

If you’re not using composer then you can copy the folder to your project and include all files in the repo.

That’s it!


Setup the PHP SDK


use Banana\Client;
use Banana\Models\Event;

$client = new Client("*your public key*", "* your secret key *"); // Replace with your keys

Fetch events

$events = $client->events(); // Get the first page of events (default sorting is most recently updated first)
foreach ($events as $event) {
    echo $event->id . "|" . $event->visitor_id . "\n";

Delete an Event


Find event

$event = Event::find($client, $events[0]->id);
echo "Found: " . $event->id . "|" . $event->visitor_id . "\n";

Get HTML Content for a Product

$html = $client->getProductPageHtml($event->product_id);

Push view event for that product for customer 123

$client->pushViewEvent($event->product_id, null, 123);

Github Rep

If you want to contribute or fork work on the Fera PHP SDK, then you can do so at the github repo.


PHP SDK Git Hub Logo

Was this article helpful?

Related Articles