https://github.com/the-3labs-team/nova-google-analytics-cards
Nova Google Analytics Cards metrics for Laravel Nova
https://github.com/the-3labs-team/nova-google-analytics-cards
analytics cards laravel nova
Last synced: 7 months ago
JSON representation
Nova Google Analytics Cards metrics for Laravel Nova
- Host: GitHub
- URL: https://github.com/the-3labs-team/nova-google-analytics-cards
- Owner: The-3Labs-Team
- Created: 2023-08-04T14:45:48.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-06T15:30:47.000Z (8 months ago)
- Last Synced: 2024-11-11T11:56:22.220Z (7 months ago)
- Topics: analytics, cards, laravel, nova
- Language: PHP
- Homepage: https://3labs.it
- Size: 263 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nova Google Analytics Cards
Stay on top of your website's performance with the Google Analytics Insights Package for Laravel Nova. This powerful integration empowers you to seamlessly integrate Google Analytics data directly into your Nova dashboard, offering you a comprehensive and real-time overview of your website's key metrics.
## Requirements
* php ^8.1|^8.2|^8.3
* laravel/framework ^10.0|^11.0## Version Compatibility
| Laravel | Nova | PHP | Package |
|---------|------|---------|----------|
| 10.x | 4.x | 8.1 | 1.x |
| 11.x | 4.x | 8.2/8.3 | 2.x |## Installation
You can install the package via composer:
```bash
composer require the-3labs-team/nova-google-analytics-cards
```You can publish the config file with:
```bash
php artisan vendor:publish
```
and choose: `The3LabsTeam\NovaGoogleAnalyticsCards\NovaGoogleAnalyticsCardsServiceProvider`.You can publish the Google Analytics config file with:
```bash
php artisan vendor:publish
```
**and select: `Spatie\Analytics\AnalyticsServiceProvider`.****Note:** this package uses [Laravel Analytics](https://github.com/spatie/laravel-analytics), so you need to configure it
in your `config/analytics.php` file.**The config file is documented, so choose the option that best suits your needs.**
## Usage
```php
use The3LabsTeam\NovaGoogleAnalyticsCards\Counter\ActiveUsersCounter;use The3LabsTeam\NovaGoogleAnalyticsCards\Counter\NewUsersCounter;use The3LabsTeam\NovaGoogleAnalyticsCards\Counter\PageViewsCounter;use The3LabsTeam\NovaGoogleAnalyticsCards\LineChart\PageViewLineChart;...
(new ActiveUsersCounter())
(new NewUsersCounter())
(new PageViewsCounter())
(new PageViewLineChart())```
You can also override the name of cards like this:```php
use The3LabsTeam\NovaGoogleAnalyticsCards\Counter\ActiveUsersCounter;
...(new ActiveUsersCounter(name: 'The name of the card (string)'))
```