rudderstack / rudder-php-sdk
RudderStack Analytics SDK PHP library
Installs: 736 253
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 10
Forks: 4
Open Issues: 6
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- ramsey/uuid: ^4.2.3
- vlucas/phpdotenv: ^5.5
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- donatj/mock-webserver: ^2.6
- overtrue/phplint: ^9.0
- php-parallel-lint/php-parallel-lint: ^1.3
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
- slevomat/coding-standard: ^8.7
- squizlabs/php_codesniffer: ^3.7
Suggests
- ext-curl: For using the curl HTTP client
- ext-zlib: For using compression
- dev-develop
- dev-master
- 2.1.0
- 2.0.1
- 2.0.0
- 1.0.1
- 1.0.0
- dev-dependabot/composer/squizlabs/php_codesniffer-3.10.3
- dev-dependabot/composer/phpunit/phpunit-11.3.6
- dev-dependabot/github_actions/slackapi/slack-github-action-1.27.0
- dev-dependabot/composer/vlucas/phpdotenv-5.6.1
- dev-dependabot/composer/overtrue/phplint-9.4.1
This package is auto-updated.
Last update: 2024-10-23 23:28:31 UTC
README
RudderStack is a customer data pipeline tool for collecting, routing and processing data from your websites, apps, cloud tools, and data warehouse.
More information on RudderStack can be found here.
Getting Started with PHP SDK
Install rudder-php-sdk
using composer
git clone https://github.com/rudderlabs/rudder-php-sdk /my/app/folders/
Initialize the Client
use Rudder\Rudder;
require_once realpath(__DIR__ . '/vendor/autoload.php');
Rudder::init(WRITE_KEY, array(
"data_plane_url" => DATA_PLANE_URL,
"consumer" => "lib_curl",
"debug" => true,
"max_queue_size" => 10000,
"flush_at" => 100
));
SDK Initialization options
Below parameters are optional and can be passed during SDK initialization.
Send Events
Rudder::track(array(
"userId" => "f4ca124298",
"event" => "Signed Up",
"properties" => array(
"plan" => "Enterprise"
)
));
Acknowledgements
This project is a fork of analytics-php by [segmentio].
Contact Us
If you come across any issues while configuring or using this SDK, feel free to start a conversation on our Slack channel. We will be happy to help you.