PHPackages                             vantevo-analytics/sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. vantevo-analytics/sdk

ActiveLibrary[API Development](/categories/api)

vantevo-analytics/sdk
=====================

PHP Client SDK for Vantevo Analytics.

1.0.2(3y ago)05MITPHPPHP &gt;=7.4

Since Apr 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/vantevo-analytics/vantevo-analytics-php-sdk)[ Packagist](https://packagist.org/packages/vantevo-analytics/sdk)[ Docs](https://vantevo.io/)[ RSS](/packages/vantevo-analytics-sdk/feed)WikiDiscussions main Synced today

READMEChangelog (4)DependenciesVersions (4)Used By (0)

The analytics of your website, but simpler
==========================================

[](#the-analytics-of-your-website-but-simpler)

**Vantevo Analytics** is the alternative platform to Google Analytics that respects privacy, because it does not need cookies not compliant with the GDPR. Easy to use, light and can be integrated into any website and back-end.

This is the official PHP client SDK for Vantevo Analytics. For more information visit the website [vantevo.io](https://vantevo.io).

Installation
------------

[](#installation)

You can install the SDK using Composer or by copying the `src/Client.php` directly.

`composer require vantevo-analytics/sdk`

Usage
-----

[](#usage)

To start tracking page views, events, and getting statistics, you need to initialize the client first:

OptionTypeDescriptionaccessToken`string` (required)To create an api key read our [guide](https://vantevo.io/docs/account/impostazioni).domain`string` (required)Enter the domain you want to use to collect statistics.The domain must not include http, https, or [www](http://www). Example: example.comtimeout`int` (optional)You can change the request timeout, you need to enter a number in seconds. Default `30`.dev`boolean` (optional)Tracker will not send data to server, the client execute print the data. Default `false`.```
require __DIR__ . '/vendor/autoload.php'; // or require_once 'src/Client.php';

$client = new Vantevo\Client('accessToken', 'domain', 'timeout' 'dev');
```

Tracking page views and events
------------------------------

[](#tracking-page-views-and-events)

**Parameters**

OptionTypeDescriptionevent`array` (required)See event parameters.**parameters**

OptionTypeDescriptionevent`string` (required)Event name, remember that the name `pageview` will send a pageview event.url`string` (optional)Enter url you want to save in the statistics. Default is where the client is installed.title`string` (optional)You can insert a title of the page, if this field is not used vantevo will insert the pathname of the url used.referrer`string` (optional)In this field you can enter a referrer for your request. Default `$_SERVER[HTTP_REFERER]` or the client checks query parameters: `ref, referrer, source, utm_source`.width`string` (optional)This field is used to save the screen size. Default: `0`.height`string` (optional)This field is used to save the screen size. Default: `0`.meta`array` (optional)Enter the event values `meta_key` and` meta_value`, [read more how to create an event](https://vantevo.io/docs/come-creare-un-evento#evento) Default: `array`.### Example pageview

[](#example-pageview)

```
try {
    $data = array("event" => "pageview", "title" => "Eaxmple Page view");
	$client->event($data);
} catch (Exception $e) {
	// something went wrong...
}
```

### Example event

[](#example-event)

```
try {
    $data = array("event" => "Download", "meta" => array("pdf": "Recipes"));
	$client->event($data);
} catch (Exception $e) {
	// something went wrong...
}
```

Monitoring Ecommerce
--------------------

[](#monitoring-ecommerce)

In the ecommerce section of Vantevo you can monitor specific actions affecting your ecommerce website and the sources of traffic that lead to sales.

OptionTypeDescriptionevent`array` (required)See event parameters.**parameters**

OptionTypeDescriptionevent`string` (required)Event name, remember that the name `pageview` will send a pageview event.url`string` (optional)Enter url you want to save in the statistics. Default is where the client is installed.title`string` (optional)You can insert a title of the page, if this field is not used vantevo will insert the pathname of the url used.referrer`string` (optional)In this field you can enter a referrer for your request. Default `$_SERVER[HTTP_REFERER]` or the client checks query parameters: `ref, referrer, source, utm_source`.width`string` (optional)This field is used to save the screen size. Default: `0`.height`string` (optional)This field is used to save the screen size. Default: `0`.total`float` (optional)The total amount of the order Example: 1255.00 Default: `0`.coupon`string` (optional)The name of the coupon used. Example: newslettercoupon\_value`float` (optional)The value of the coupon used. Example: 45.00payment\_type`string` (optional)The mode of payment. Example: Payal o Carta di credito.items`array` (required)The product information, [read more](https://vantevo.io/docs/ecommerce/index).### List events

[](#list-events)

These are the events to use to monitor your ecommerce:

EventDescription`add_to_wishlist`a user adds a product to the favorites list`view_item`a user views a product`remove_item_cart`a user removes a product from the cart`add_item_cart`a user adds product to the cart`start_checkout`a user has started the checkout process`checkout_info`a user submits personal data`checkout_ship`a user submits shipments data`checkout_payment`a user initiated the payment process`purchase`a user has completed a purchase### Example

[](#example)

An example for how to use the `trackEcommerce` function.

```
try {
    $data = array(
		"event" => "view_item",
		"items" => array(
			array(
				"item_id" => "SKU_123",
				"item_name" => "Samsung Galaxy",
				"currency" => "EUR",
				"quantity" => 0,
				"price" => 199.99,
				"discount" => 0,
				"position" => 1,
				"brand" => "Samsung",
				"category_1" => "Smartphone",
				"category_2" => "Samsung",
				"category_3" => "Galaxy",
				"category_4" => "",
				"category_5" => "",
				"variant_1" => "Black",
				"variant_2" => "5.5 inch",
				"variant_3" => ""
			)
		)
		);
	$client->trackEcommerce($data);
} catch (Exception $e) {
	// something went wrong...
}
```

Read our [guide](https://vantevo.io/docs/ecommerce/index/?utm_source=npm&utm_medium=vantevo-analytics-tracker) for more information of how to use the ecommerce tracking function.

How to get the statistics
-------------------------

[](#how-to-get-the-statistics)

**Parameters**

OptionTypeDescriptionevent`array` (required)Check out our guide to see all the parameters you can use like, [click here](https://vantevo.io/docs/api-sdk/api-statistiche#parametri).### Example Statistics

[](#example-statistics)

```
try {
    $data = array("source" => "pages", "period" => "1m");
	$stats = $client->stats($data);
} catch (Exception $e) {
	// something went wrong...
}
```

### Example Events

[](#example-events)

```
try {
    $data = array("source" => "events", "period" => "1m");
	$events = $client->events($data);
} catch (Exception $e) {
	// something went wrong...
}
```

Vantevo Analytics guide
-----------------------

[](#vantevo-analytics-guide)

To see all the features and settings of Vantevo Analytics we recommend that you read our complete guide [here](https://vantevo.io/docs?utm_source=npm&utm_medium=vantevo-analytics-tracker).

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~115 days

Total

3

Last Release

1299d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/83576108?v=4)[avilo](/maintainers/vantevo)[@Vantevo](https://github.com/Vantevo)

---

Top Contributors

[![andonealessandro](https://avatars.githubusercontent.com/u/12657647?v=4)](https://github.com/andonealessandro "andonealessandro (5 commits)")[![vantevo-analytics](https://avatars.githubusercontent.com/u/98458862?v=4)](https://github.com/vantevo-analytics "vantevo-analytics (2 commits)")

---

Tags

apiclientsdkanalyticsvantevo

### Embed Badge

![Health badge](/badges/vantevo-analytics-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/vantevo-analytics-sdk/health.svg)](https://phpackages.com/packages/vantevo-analytics-sdk)
```

###  Alternatives

[kunalvarma05/dropbox-php-sdk

Dropbox PHP API V2 SDK (Unofficial)

3673.2M19](/packages/kunalvarma05-dropbox-php-sdk)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2564.7M13](/packages/jolicode-slack-php-api)[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

46688.8k5](/packages/deepseek-php-deepseek-php-client)[qwen-php/qwen-php-client

robust and community-driven PHP SDK library for seamless integration with the qwen AI API, offering efficient access to advanced AI and data processing capabilities

203.3k1](/packages/qwen-php-qwen-php-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
