Download the PHP package vormkracht10/laravel-google-analytics-v4 without Composer
On this page you can find all versions of the php package vormkracht10/laravel-google-analytics-v4. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vormkracht10/laravel-google-analytics-v4
More information about vormkracht10/laravel-google-analytics-v4
Files in vormkracht10/laravel-google-analytics-v4
Package laravel-google-analytics-v4
Short Description Laravel package to get insights in Google Analytics v4 data
License MIT
Homepage https://github.com/vormkracht10/laravel-google-analytics-v4
Informations about the package laravel-google-analytics-v4
Laravel Google Analytics
About Laravel Google Analytics v4
Retrieve all data like pageviews, events, ecommerce transactions and more from Google Analytics version 4 using the Google API.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Usage
First you need to create a service account in the Google Cloud Console. You can find the instructions here: https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-php.
After you have created the service account, you need to download the credentials and save them in the storage/app/analytics
folder. You can change the location of the credentials in the config file if you want.
After you have done this, you can use the package like this:
Available periods
Note: Using multiple Carbon objects in the
Period::create()
method may possibly result in unexpected behaviour. It is recommended to pass the start and end date as a separate Carbon instance. For example:Period::create(Carbon::instance($startDate), Carbon::instance($endDate))
. This will ensure that the start and end date are set correctly.
Available methods
Demographic Analytics
Methods to retrieve demographic analytics data for your website or application. You can use these methods to get information such as the top used languages, total users by city or country and total users per gender. All of the methods take a Period object as a parameter to specify the time range for the analytics data.
Here are some examples of how to use the methods:
Device and OS Analytics
Methods to retrieve device and operating system analytics data for your website or application. You can use these methods to get information such as the top popular browsers, screen resolutions, and mobile devices used by your visitors. All of the methods take a Period object as a parameter to specify the time range for the analytics data.
Here are some examples of how to use the methods:
Pageviews Analytics
Methods to retrieve pageview analytics data for your website or application. You can use these methods to get information such as the total views or by page from your visitors. All of the methods take a Period object as a parameter to specify the time range for the analytics data.
Here are some examples of how to use the methods:
Realtime Analytics
Methods to retrieve realtime analytics data for your website or application. You can use these methods to get information such as the current active visitors on your website. All of the methods take a Period object as a parameter to specify the time range for the analytics data. The default time range is set to 30 minutes when no Period object is passed.
Here are some examples of how to use the methods:
Resource Analytics
Methods to retrieve resource analytics data for your website or application. You can use these methods to get information such as the top landing pages, exit pages and referrers but also your most important social media
Here are some examples of how to use the methods:
Sessions Analytics
Methods to retrieve session duration analytics data for your website or application. You can use these methods to get information such as the average session time from your visitors. All of the methods take a Period object as a parameter to specify the time range for the analytics data.
Here are some examples of how to use the methods:
Users Analytics
Methods to retrieve user analytics data for your website or application. You can use these methods to get information such as the total visitors or amount of visitors per device. All of the methods take a Period object as a parameter to specify the time range for the analytics data.
Here are some examples of how to use the methods:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Bas van Dinther
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-google-analytics-v4 with dependencies
google/analytics-data Version ^0.9.4
illuminate/contracts Version ^9.0|^10.0|^11.0
spatie/laravel-package-tools Version ^1.14.0