PHP SDK (server api)

Quick start guide for the Ours Privacy PHP SDK.

Ours Privacy PHP SDK Documentation

This is a quick start guide for integrating the Ours Privacy PHP SDK into your server-side applications.

Installation

Install the SDK via Composer:

composer require oursprivacy/ingest-sdk

For more details, visit the packagist repository | Github Repo

Usage

Initialize the SDK and send events with just a few lines of code:

<?php
require 'vendor/autoload.php';

use Ours\IngestSdk\OursPrivacyApi;

$ours = new OursPrivacyApi();

// Track an event
$ours->track('event name', ['value' => 1], ['first_name' => 'test']);

// Identify a user
$ours->identify(['first_name' => 'test']);

Explore the API

Want to see what the SDK can do? Try our Interactive API Explorer to experiment with endpoints and features in real time.