Skip to content
IForevents Docs
IForevents Docs
InicioPanelGitHubPrivacidadTérminosSeguridadIntroducción
TrackingIdentify usersTrack events
Web (JavaScript)Flutter SDKJavaScript SDK (browser and Node.js)React, Next.js and React NativePython SDKGo SDKJava and Android SDKsSwift SDK (iOS, macOS)Ruby SDKPHP SDK.NET and Unity SDKsClient libraries (JavaScript, Python, Go)HTTP Ingest (Server-Side)
Soporte y SLA
TrackingSDKs

PHP SDK

innovafour/iforevents for Laravel, Symfony, plain PHP and CLIs

composer require innovafour/iforevents
composer require innovafour/iforevents-mixpanel innovafour/iforevents-segment   # optional adapters
use IForevents\Iforevents;

$analytics = Iforevents::create(getenv('IFOREVENTS_PROJECT_KEY'));
$analytics->identify('user_123', ['email' => '[email protected]', 'plan' => 'pro']);
$analytics->track('invoice_paid', ['amount' => 120, 'currency' => 'USD']);
$analytics->page('/pricing');
$analytics->reset();     // logout
$analytics->shutdown();  // also runs at script end

PHP 8.1+, ext-json and ext-curl only. PHP has no background timers: a batch is sent when it reaches batchSize, when a partial batch is older than flushInterval and another event arrives, on flush()/shutdown(), and at script end. SessionStorage keeps the anonymous id in the visitor's PHP session; FileStorage serves CLIs.

use IForevents\{APIConfig, APIIntegration, Iforevents, SessionStorage};
use IForevents\Integrations\MixpanelIntegration;

$config = new APIConfig('pk_...');
$config->storage = new SessionStorage();
$analytics = new Iforevents([new APIIntegration($config), new MixpanelIntegration('MIXPANEL_TOKEN')]);
$analytics->init();

Exceptions: IForevents\APIException, AuthException, QuotaExceededException, RateLimitedException.

Source: iforevents-sdks/php.

Ruby SDK

The iforevents gem for Rails, workers and CLIs

.NET and Unity SDKs

The IForevents NuGet package for .NET and the UPM package for Unity