Search by

minube / amplitude-php

fjalvarez

Amplitude SDK for PHP - Use Amplitude in your PHP project

Package info

github.com/minube/Amplitude-PHP

Homepage

pkg:composer/minube/amplitude-php

Statistics

Installs: 58 060

Dependents: 0

Suggesters: 0

Stars: 14

Open Issues: 1

2.0 2018-11-13 11:29 UTC

This package is not auto-updated.

Last update: 2026-09-13 06:12:22 UTC


README

How to use it

$apiKey = 123456;
$amplitudeClient = new \Amplitude\AmplitudeClient($apiKey);

$amplitudeEvent = new \Amplitude\AmplitudeEvent();

// For user properties
$amplitudeEvent->set('city_id', 123)
    ->set('country_id', 34);
    
// For event properties
$amplitudeEvent->addToEventProperties('revenue', 12.34);

$response = $amplitudeClient->track($amplitudeEvent);