| Package Data | |
|---|---|
| Maintainer Username: | rdehnhardt |
| Maintainer Contact: | renatotkd@gmail.com (Renato Dehnhardt) |
| Package Create Date: | 2015-07-24 |
| Package Last Update: | 2019-11-15 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-30 03:09:56 |
| Package Statistics | |
|---|---|
| Total Downloads: | 449 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 23 |
| Total Watchers: | 2 |
| Total Forks: | 6 |
| Total Open Issues: | 0 |
composer require baconfy/laravel-analytics
config/app.php
...
'providers' => [
Rdehnhardt\Analytics\Providers\AnalyticsServiceProvider::class,
],
...
php artisan migrate
php artisan vendor:publish
<script>
var _bc = _bc || [];
(function () {
var bc = document.createElement('script');
bc.src = '/analytics.js';
bc.type = 'text/javascript';
bc.async = true;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(bc, s);
})();
</script>
/analytics/visits/Y-m-d/Y-m-d
Ex:
/analytics/visits/2015-07-27/2015-07-27
show
Hora,Visitas,Únicas
00:00,1,1
01:00,2,1
02:00,3,1
03:00,4,1
04:00,5,1
05:00,7,1
06:00,1,1
07:00,4,1
08:00,6,1
09:00,2,1
10:00,3,1
11:00,3,1
12:00,3,1
13:00,15,1
14:00,15,1
<div id="container" style="min-width: 310bc; height: 400bc; margin: 0 auto"></div>
<script>
$(function () {
$.ajax({url: "/analytics/visits/2015-07-27/2015-07-27"}).done(function (csv) {
$('#container').highcharts({
data: {csv: csv},
title: {text: 'Relatório de visitas'},
subtitle: {text: 'Source: Analytics'},
tooltip: {shared: true},
yAxis: { allowDecimals: false },
plotOptions: {column: {stacking: 'normal'}}
});
});
});
</script>
