A package to easily view the panphp/pan analytics in your Backpack admin panel. What is PAN?
Pan is a lightweight and privacy-focused PHP product analytics library. It’s designed as a very simple package that you can install via
composer require
and start tracking your pages or components with a simpledata-pan
attribute.
You can preview the UI on https://demo.backpackforlaravel.com/admin/analytics. Play around with the welcome page, login page and the menu items, and see the records that PAN keeps.
Install the package via composer:
composer require backpack/pan-panel
Optionally, you can publish this package config file to change the default values:
php artisan vendor:publish --tag="pan-config"
If you didn't have panphp/pan
in your project prior to installing this package, you should run the install command for the panphp/pan
package:
php artisan pan:install
NOTE: Check the panphp/pan documentation for more information on how to configure the package, most of the configurations can be done in the config/backpack/pan.php
if you published this package config file.
You can add an item to the menu in resources/views/vendor/backpack/ui/inc/menu_items.blade.php
:
<x-backpack::menu-item title="Analytics" icon="la la-dashboard" :link="backpack_url(config('backpack.pan.panel_route_prefix'))" />
Backpack provide some out-of-the-box filters. To use them you should have backpack/pro
installed. If you don't have it installed, enabling them in the config file does not have any effect.
Credits go to Nuno Maduro (the creator of PAN) and Pedro Martins, the Backpack core developer who created this package.
This project was released under MIT License, so you can install it on top of any Backpack & Laravel project. Please see the license file for more information.