Download the PHP package vdvcoder/laravel-dashboard-google-analytics-realtime-tile-v2 without Composer

On this page you can find all versions of the php package vdvcoder/laravel-dashboard-google-analytics-realtime-tile-v2. 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 laravel-dashboard-google-analytics-realtime-tile-v2

A tile to display Google Analytics realtime information v2

Latest Version on Packagist Total Downloads

This tile can be used on the Laravel Dashboard to display Google Analytics realtime information.

Installation

You can install the package via composer:

Google Analytics credentials

Before using this tile you need to ensure you have the correct credentials on your system. Follow the instructions on Real Time Reporting API Overview to sign up to access the API. When access is granted:

  1. Enable the Google Analytics API.
  2. Create a Service Account with appropriate permissions.
  3. Navigate to the Service Account and add a new JSON private key. A JSON file will be downloaded - rename this to 'analytics-credentials.json' and move it to your root Laravel directory.

Make note of the 'Service Account ID' that is generated. It will follow the format of "service_account_name>@

Google Analytics view

Access Google Analytics and navigate to the required view (e.g. Account > Properties & Apps > View). Make note of the 'View ID' that is displayed underneath the view name. Click on 'View User Management' and add a new user. The email address is the Service Account ID that was used in the Google Analytics credentials step.

More information is available on the Real Time Reporting API Developer Guide. Also take into account your quotas and limits on API Requests.

Usage

In the dashboard config file, you must add this configuration in the tiles key.

  1. Enter the view ID that you wish to gather information for e.g. 123456789.
  2. If you changed the name and/or location of the analytics credentials JSON from suggested below, update the field.
  3. The number of URLs displayed on the URLs tile can be limited by amending the urls_displayed field, with a default value of 10.
  4. The active users tile can have the background changed depending upon a threshold of how many active users you set. If the active_users_warning_threshold field is not in the settings, there will be no threshold and no change to the background. Setting to a value of 0 would use the warning background when there are 0 active users. Setting to a value of 10 would use the warning background when there are 10 or fewer active users.

In app\Console\Kernel.php you should schedule the \vdvcoder\GoogleAnalyticsRealtimeTile\Commands\FetchGoogleAnalyticsRealtimeCommand to run every minute, pending your Google API quotas and limits.

In your dashboard view you can use three separate tiles:

The layout above will produce something similar to:

Dashboard tiles

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email instead of using the issue tracker.

Support Spatie

I have learnt a lot from Spatie's various packages, including Mailcoach, and would recommend you check them out if you want to know more.

Learn how to create a package like this one, by watching Spatie's premium video course:

Laravel Package training

Spatie invest a lot of resources into creating best in class open source packages. You can support them by buying one of their paid products.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-dashboard-google-analytics-realtime-tile-v2 with dependencies

PHP Build Version
Package Version
Requires google/apiclient Version ^2.0
php Version ^7.4
spatie/laravel-dashboard Version ^2.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 vdvcoder/laravel-dashboard-google-analytics-realtime-tile-v2 contains the following files

Loading the files please wait ....