Download the PHP package fr30n/ganalytics without Composer
On this page you can find all versions of the php package fr30n/ganalytics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fr30n/ganalytics
More information about fr30n/ganalytics
Files in fr30n/ganalytics
Package ganalytics
Short Description A Laravel 5 package to retrieve Google Analytics data.
License MIT
Homepage https://github.com/fr30n/ganalytics
Informations about the package ganalytics
Retrieve data from Google Analytics
Using this package you can easily retrieve data from Google Analytics.
Here are a few examples of the provided methods:
Most methods will return an \Illuminate\Support\Collection
object containing the results.
Fr3on is a software agency in Cairo, Egypt. You'll find an overview of all our open source projects on our website.
Installation
This package can be installed through Composer.
Optionally, you can publish the config file of this package with this command:
The following config file will be published in config/ganalytics.php
Usage
When the installation is done you can easily retrieve Analytics data. Nearly all methods will return an Illuminate\Support\Collection
-instance.
Here are a few examples using periods
$analyticsData
is a Collection
in which each item is an array that holds keys date
, visitors
and pageViews
If you want to have more control over the period you want to fetch data for, you can pass a startDate
and an endDate
to the period object.
Provided methods
Visitors and pageviews
The function returns a Collection
in which each item is an array that holds keys date
, visitors
, pageTitle
and pageViews
.
Total visitors and pageviews
The function returns a Collection
in which each item is an array that holds keys date
, visitors
, and pageViews
.
Most visited pages
The function returns a Collection
in which each item is an array that holds keys url
, pageTitle
and pageViews
.
Top referrers
The function returns a Collection
in which each item is an array that holds keys url
and pageViews
.
User Types
The function returns a Collection
in which each item is an array that holds keys type
and sessions
.
Top browsers
The function returns a Collection
in which each item is an array that holds keys browser
and sessions
.
All other Google Analytics queries
To perform all other queries on the Google Analytics resource use performQuery
. Google's Core Reporting API provides more information on which metrics and dimensions might be used.
You can get access to the underlying Google_Service_Analytics
object:
Testing
Run the tests with:
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Ahmed Mordy
- All Contributors
Support us
Fr3on is a software agency based in Cairo, Egypt. You'll find an overview of all our open source projects on our website.
Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.
License
The MIT License (MIT). Please see License File for more information.
All versions of ganalytics with dependencies
google/apiclient Version ^2.0
laravel/framework Version ~5.8.0
madewithlove/illuminate-psr-cache-bridge Version ^1.0
nesbot/carbon Version ^1.21 | ^2.0