Skip to content
Feralin

Developers

PHP: quickstart

Install and first-use steps for sending events to Feralin with PHP. Code samples come from the SDK's own README and statuses from the capability record.

Install

feralin/feralin-php 0.1.0 is published on Packagist; install it with your package manager using the command below.

# uygulamanızın dizininde (DEPO: deponun yolu)
composer config repositories.feralin-php '{"type": "path", "url": "DEPO/sdks/php", "options": {"symlink": false}}'
composer require "feralin/feralin-php:*@dev"
cd sdks/php
composer install
composer test

First use

use Feralin\Client;
use Feralin\Consent;

$feralin = new Client(getenv('FERALIN_PROJECT_KEY'), 'https://collect.example.com');

// İzin kararı son kullanıcınındır; uygulamadan olay başına geçirilir.
$feralin->track('order_completed', ['order_id' => 'ord_1', 'fr_click' => $click], [
    'userId' => 'user_42',
    'consent' => new Consent(analytics: true, advertising: $reklamIzni),
]);
// İstek sonunda bekleyen olaylar otomatik gönderilir; uzun süren işçide flush() çağırın.

Code samples are taken as they are from sdks/php/README.md; comments inside may be in Turkish. You create the project key in the dashboard.

Capabilities

PHP capability status
CapabilityStatus
Event sendingSupported
Batch sendingPartial
Consent handlingSupported
IdentityPartial
AttributionNot applicable
Deep linksNot applicable
RevenuePartial
Error capturePartial
Session replayNot applicable
TracingPlanned

Verification chain

PHP verification chain
LinkStatus
SourcePassed
BuildPassed
TestPassed
Registry publicationPassed
Clean installPassed
Event receiptPassed
DocumentationPassed
Super Admin proofNot started

Passed means local evidence: source, build and tests ran. Registry publication and Super Admin proof are separate links; the SDK is not called ready until each has passed.