Skip to content

Commit

Permalink
Update readme and add images
Browse files Browse the repository at this point in the history
  • Loading branch information
akki-io committed Feb 13, 2022
1 parent ee647a8 commit bf356d2
Show file tree
Hide file tree
Showing 20 changed files with 35 additions and 26 deletions.
59 changes: 34 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,47 @@
# Very short description of the package
<p align="center">
<img src="https://raw.githubusercontent.com/akki-io/laravel-google-analytics/master/images/hero.png" alt="Hero" width="600">
</p>

[![Latest Version on Packagist](https://img.shields.io/packagist/v/akki-io/laravel-google-analytics.svg?style=flat-square)](https://packagist.org/packages/akki-io/laravel-google-analytics)
[![Total Downloads](https://img.shields.io/packagist/dt/akki-io/laravel-google-analytics.svg?style=flat-square)](https://packagist.org/packages/akki-io/laravel-google-analytics)
![GitHub Actions](https://github.com/akki-io/laravel-google-analytics/actions/workflows/main.yml/badge.svg)
# Laravel Google Analytics

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.
[![Latest Version](https://img.shields.io/github/release/akki-io/laravel-google-analytics.svg?style=flat-square)](https://github.com/akki-io/laravel-google-analytics/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![StyleCI](https://styleci.io/repos/441735142/shield?branch=master)](https://styleci.io/repos/441735142)
[![Total Downloads](https://img.shields.io/packagist/dt/akki-io/laravel-google-analytics.svg?style=flat-square)](https://packagist.org/packages/akki-io/laravel-google-analytics)

## Installation
A Laravel package to retrieve data from Google Analytics 4 using the GA4 Query Explorer

You can install the package via composer:
## TL;DR

```bash
composer require akki-io/laravel-google-analytics
```
Using this package you can easily retrieve data from Google Analytics 4.

## Usage
Below are some examples.

```php
// Usage description here
```

### Testing

```bash
composer test
use AkkiIo\LaravelGoogleAnalytics\Facades\LaravelGoogleAnalytics;
use AkkiIo\LaravelGoogleAnalytics\Period;
use Google\Analytics\Data\V1beta\Filter\StringFilter\MatchType;
use Google\Analytics\Data\V1beta\MetricAggregation;
use Google\Analytics\Data\V1beta\Filter\NumericFilter\Operation;

// get the top 20 viewed pages for last 30 days
LaravelGoogleAnalytics::getTopViewedPages(Period::days(30), $count = 20);

// build a query using the `get()` method
LaravelGoogleAnalytics::dateRanges(Period::days(30), Period::days(60))
->metrics('active1DayUsers', 'active7DayUsers')
->dimensions('browser', 'language')
->metricAggregations(MetricAggregation::TOTAL, MetricAggregation::MINIMUM)
->whereDimension('browser', MatchType::CONTAINS, 'firefox')
->whereMetric('active7DayUsers', Operation::GREATER_THAN, 50)
->orderByDimensionDesc('language')
->get();
```

### Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
Please refer to the [wiki]((https://github.com/akki-io/laravel-google-analytics/wiki)) for more details.


## Contributing

Expand All @@ -40,13 +53,9 @@ If you discover any security related issues, please email [email protected] instead

## Credits

- [Akki Khare](https://github.com/akki-io)
- [All Contributors](../../contributors)
- [Akki Khare](https://github.com/akki-io)
- [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

## Laravel Package Boilerplate

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"AkkiIo\\LaravelGoogleAnalytics\\LaravelGoogleAnalyticsServiceProvider"
],
"aliases": {
"LaravelGoogleAnalytics": "AkkiIo\\LaravelGoogleAnalytics\\Facade\\LaravelGoogleAnalytics"
"LaravelGoogleAnalytics": "AkkiIo\\LaravelGoogleAnalytics\\Facades\\LaravelGoogleAnalytics"
}
}
}
Expand Down
Binary file added images/add-user.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/copy-property-id.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/create-new-json-key.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/create-service-account.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/enable-api.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/get-account-id.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select-account-access-management.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select-add-user.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select-api.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select-create-a-new-key.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select-create-service-account.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select-credentials.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select-manage-keys.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select-manage-service-account.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select-project.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/select-property-settings.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bf356d2

Please sign in to comment.