there4 / php-analytics-event
Send Google Analytics events from PHP
Installs: 36 242
Dependents: 0
Suggesters: 0
Security: 0
Stars: 24
Watchers: 4
Forks: 4
Open Issues: 0
Requires (Dev)
- phpunit/phpunit: ^6.5@dev
This package is auto-updated.
Last update: 2024-10-29 04:30:58 UTC
README
Create a Google Analytics Event from PHP
This is a small class to post Analytics events from PHP. This is useful for logging and event tracking.
Installation
composer require there4/php-analytics-event
Example
<?php use There4\Analytics\AnalyticsEvent; // Record the download event in Analytics $events = new AnalyticsEvent('UAxxxxxxx', 'example.com'); $events->trackEvent('resources', 'download', 'cli-latest');
Related Projects
The Google Analytics Measurement Protocol library for PHP project is a much larger implementation of the Measurement Protocol. If you need more than a simple tracking event you should check it out.