CDPGuidesSupport
SDKsIngest

PHP SDK (ingest)

Quickly integrate the Ours Privacy PHP SDK using Composer. Send test requests from the Track Events API reference.

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

use OursPrivacy\Client;

$client = new Client();

// Track an event
$response = $client->track->event(token: 'your-api-key', event: 'Purchase');

var_dump($response->success);

Explore the API

Want to see what the SDK can do? Send test requests from the Track Events API reference.

How is this guide?

On this page