Download the PHP package veridia/sdk without Composer

On this page you can find all versions of the php package veridia/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk

Veridia PHP SDK

Official PHP SDK for integrating with the Veridia Platform. It provides an easy way to identify users, send tracking events, retrieve user segments, and manage batching with retries and timeouts — all from your backend.


🚀 Installation


📦 Usage


🧠 API Reference

identify($identifierType, $identifierId, $attributes)

Identify a user and update their profile attributes. Provided attributes must match the Profile Attributes schema defined in your Veridia dashboard.

Parameter Type Description
identifierType "userId" | "email" How the user is identified.
identifierId string Unique identifier value.
attributes array Arbitrary user attributes.

track($identifierType, $identifierId, $eventType, $eventId, $eventTime, $properties, $tenantId = null)

Track an event performed by a user. Provided attributes must match the event attributes schema defined in your Veridia dashboard.

Parameter Type Description
identifierType string How the user is identified.
identifierId string Unique user identifier.
eventType string Logical name of the event.
eventId string Unique event ID for idempotency.
eventTime string ISO timestamp string.
properties array Optional event properties.
tenantId ?string Internal tenant identifier.

getUserSegments($identifierType, $identifierId, $noSegmentsOnError = true)

Fetches the list of segments the specified user currently belongs to. If the API call fails and noSegmentsOnError is set to false, it will throw an error. Otherwise, it will return an empty array.

Parameter Type Default Description
identifierType string — Type of user identifier (userId or email).
identifierId string — Unique user ID or email.
noSegmentsOnError bool true If true, returns [] instead of throwing an error.

Returns: string[] — Array of segment identifiers.


flush()

Immediately sends all queued identify and track data. Automatically called when buffers reach their configured limits or after the flush interval (checked on the next call).

close()

Flushes any remaining buffered data and closes the client gracefully. Call this before application exit in workers or serverless environments.


⚙️ Configuration Options

Option Type Default Description
credentials array — Veridia API access credentials.
endpoint string https://api.veridia.io/v1/ API base URL.
region string default API region.
auto_flush bool true Whether to automatically flush buffered data.
max_buffer_size int 500 Max number of items before auto-flush.
max_buffer_timeout int 5000 Max time (ms) before auto-flush.
retries int 3 Retry attempts on transient network errors.
delay int 500 Base delay (ms) for exponential backoff.
timeout int 5 Timeout (sec) for batch flush requests.
logger Psr\Log\LoggerInterface — PSR Logger implementation.

All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
psr/log Version ^3.0
aws/aws-sdk-php Version ^3.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package veridia/sdk contains the following files

Loading the files please wait ...