Download the PHP package jakeydevs/analytics without Composer

On this page you can find all versions of the php package jakeydevs/analytics. 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 analytics

Analytics

Analytics is a simple website analytic package for Laravel giving you just enough data to be practical without any of the data-sharing, third party crazyness you get with hosted web analytic tools.

This plugin is being actively developed on stream by https://www.twitch.tv/jakeydev.

Installation

System built on Laravel 8. Not tested on anything under version 8.

$ composer require jakeydevs/analytics

Once installed, run migrations to allow the system to record pageviews! To edit the configuration for the package, you can publish the config file to make edits:

php artisan vendor:publish --provider="Jakeydevs\Analytics\AnalyticServiceProvider" --tag="config"

Record Pageviews

Recorded Pageviews

To record pageviews, you'll need to add a specific middleware to your routes. This middleware, when ran, will save each pageview to the system. The middleware is named pageview.

To save on all pageviews to your system set the middleware to run when the web routes are ran. The best way to do this is by setting the middleware on the RouteServiceProvider

app\Providers\RouteServiceProvider.php

Provided methods

Dates

Dates should be passed to the analytics model in as a Period. Examples are:

You can also get a set of dates to compare to your period - useful for providing context to results - by using the compare method. Examples are

Analytic Methods

You can use these methods to get pageviews, unique sessions, the bounce rate or the average duration of time for a session (in seconds):

You can also get aggregated information for any of the parsed data gathered (browser, os, device, location, paths).

The data returned is an array with the column and sessions ordered high to low.

View Components

The system comes with several view components out the box for working with the data. They are based on Tailwind and the design can be found below.

1

You can use these with the tags:

FAQ

Is this GDPR comliant? I think so? I am not a lawyer - and if you are not either, you should totally talk to one if you are worried about GDPR.

Does this work on SPAs At the moment no as it only records a pageview on a page request.

Contributing

Contributions are welcome - please send a pull request. When the project matures we'll add more detailed contribution guidelines!

This repo is available as part of Hacktoberfest 2020 and is perfect for first timers! If you need help, please join me on streams on Tuesdays and Fridays between 1pm and 4pm (GMT)!

Features

Please feel free to add pull requests for any of the below crossed - or ask for new features in the issues.

✅ Record a pageview (Middleware) ✅ Get data from system ✅ Parsing configuration ❌ Record a pageview (manually - useful for SPA) ❌ View components for basic analytics ❌ Tests ❌ How to add own data parsers ❌ Example dashboard

License

MIT


All versions of analytics with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
whichbrowser/parser Version ^2.0
geoip2/geoip2 Version ^2.11
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 jakeydevs/analytics contains the following files

Loading the files please wait ....