| Package Data | |
|---|---|
| Maintainer Username: | Chaddles23 |
| Maintainer Contact: | chadwickcaleb@gmail.com (Caleb Chadwick) |
| Package Create Date: | 2017-07-10 |
| Package Last Update: | 2017-07-28 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-03 15:03:13 |
| Package Statistics | |
|---|---|
| Total Downloads: | 82 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 2 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
A sweet integration with Google Analytics into the Soda Framework
Firstly follow the instructions to install Soda CMS at: https://github.com/soda-framework/cms
Install Soda Analytics with composer
#!bash
composer require soda-framework/analytics
Add Soda\Analytics\Providers\AnalyticsServiceProvider::class
Run php artisan vendor:publish
Run php artisan migrate
Modify config/soda/analytics.php according to your needs:
apis - Google Console API's Soda Analytics requiresservice-account-name - The name of the Service Account created for Using OAuth 2.0 for Server to Server Applications
scheduler - available cron job intervals for the Analytics scheduler<head> to initialize Google Analytics:@include('soda-analytics::analytics')
Send events as normal with Google Analytics:
ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);
Or use our helper function:
send_event([eventCategory], [eventAction], [eventLabel] (optional), [eventValue] (optional));
For best results, try to use all the parameters.
cron command onto your server (using the crontab -e command)Run Schedule