PHPackages                             mateffy/pan-analytics-viewer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mateffy/pan-analytics-viewer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mateffy/pan-analytics-viewer
============================

View your analytics directly where you collect them.

1.0.2(1y ago)7310.2k↓39.8%MITBlade

Since Oct 18Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Capevace/pan-analytics-viewer)[ Packagist](https://packagist.org/packages/mateffy/pan-analytics-viewer)[ RSS](/packages/mateffy-pan-analytics-viewer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

[![Screenshot of the popup](https://private-user-images.githubusercontent.com/10093858/377691299-3d8142bc-c781-43f7-bb90-741939b7cbd9.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQ3NDIwODUsIm5iZiI6MTc3NDc0MTc4NSwicGF0aCI6Ii8xMDA5Mzg1OC8zNzc2OTEyOTktM2Q4MTQyYmMtYzc4MS00M2Y3LWJiOTAtNzQxOTM5YjdjYmQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzI4VDIzNDk0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJlMjA1OGU5YTA4MTkwODk4N2RjNTEyMzZhMzk5Y2VkMmZmMTk2Njc3NjRlZDc5Y2I2YzE2Y2VmNjdhNzliYzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Ek2npYIy0wa_22JTgGsczBGYqcp_enQpuj0QqBDcjz0)](https://private-user-images.githubusercontent.com/10093858/377691299-3d8142bc-c781-43f7-bb90-741939b7cbd9.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQ3NDIwODUsIm5iZiI6MTc3NDc0MTc4NSwicGF0aCI6Ii8xMDA5Mzg1OC8zNzc2OTEyOTktM2Q4MTQyYmMtYzc4MS00M2Y3LWJiOTAtNzQxOTM5YjdjYmQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzI4VDIzNDk0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJlMjA1OGU5YTA4MTkwODk4N2RjNTEyMzZhMzk5Y2VkMmZmMTk2Njc3NjRlZDc5Y2I2YzE2Y2VmNjdhNzliYzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Ek2npYIy0wa_22JTgGsczBGYqcp_enQpuj0QqBDcjz0)`mateffy/pan-analytics-viewer`
==============================

[](#mateffypan-analytics-viewer)

### A tiny Laravel package to view your [panphp/pan](https://github.com/panphp/pan) analytics directly in the UI where they are triggered!

[](#a-tiny-laravel-package-to-view-your-panphppan-analytics-directly-in-the-ui-where-they-are-triggered)

 Video Example    example-trimmed.webm
Installation
------------

[](#installation)

```
composer require mateffy/pan-analytics-viewer
```

Usage
-----

[](#usage)

To add the popups to your app, all you have to do is include the `pan-analytics::viewer` component in your blade template:

```
{{--    Make sure to verify who has access!
        Including this component will expose your analytics data!    --}}

@if (auth()->user()?->email === 'admin@example.com')

@endif
```

The popups should now be appearing when hovering over elements that have a `[data-pan]` attribute.

### Options

[](#options)

You can pass options to the component to change the default behavior:

```

```

OptionDescriptionDefault`toggle`Whether to show a toggle button to show/hide the popups`false``events`Specify the events that should be fetched.`null``force‑all`Force all events to get fetched, may be required when dynamically creating tracked elements.`false`### Events

[](#events)

The package will automatically detect what events are being tracked on the current page by querying for `data-pan` attributes. If you are dynamically creating tracked elements after initial render, these may be missed and no popup will be shown.

To fix this, you can either specify the specific `events` you want to show on the page or use the `force-all` option to disable filtering and fetch all events.

Security
--------

[](#security)

The package registers a route for the client to be able to access the data. This route required a valid URL signature to be able to access it, which the `pan-analytics::viewer` component will automatically generate (signed URLs are valid for 1h). **If you include this component on a page that is publicly accessible and don't check the user before including the component, anyone can access the analytics data!**

So, make sure to only render this component for users with the necessary permissions.

```
@if (auth()->user()?->email === 'admin@example.com')

@endif

{{-- or --}}

@if (auth()->user()?->can('view-analytics'))

@endif
```

### Tippy.js

[](#tippyjs)

This package uses [Tippy.js](https://github.com/atomiks/tippyjs) to create the popups. `tippy.js` is included via `unpkg.com` like this, but only when the component is rendered:

```

```

Configuration
-------------

[](#configuration)

You can publish the config file with:

```
php artisan vendor:publish --provider="Mateffy\PanAnalyticsViewer\PanAnalyticsViewerServiceProvider" --tag="config"
```

This is the default configuration:

```
return [
    'endpoint' => env('PAN_ANALYTICS_ENDPOINT', '/pan/viewer')
];
```

### Endpoint

[](#endpoint)

You can change the URL that the analytics are being exposed on by changing the `PAN_ANALYTICS_ENDPOINT` environment variable or customizing the `endpoint` config key. The default URL is `example.com/pan/viewer`.

Changelog
---------

[](#changelog)

- 1.0.2
    - Feature: added Livewire support, the `[data-pan]` search will now be re-run after Livewire `morph.updated` events are fired, to show the popups for newly created elements
- 1.0.1
    - Fix: removed livewire specific script inclusion
- 1.0.0
    - Initial release

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

578d ago

Major Versions

0.0.1 → 1.0.12024-10-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/e572442281b0c1b6e8e8f966cc908161a66c4c822e950ff278f8f90dc4f2d2cd?d=identicon)[mateffy](/maintainers/mateffy)

---

Top Contributors

[![Capevace](https://avatars.githubusercontent.com/u/10093858?v=4)](https://github.com/Capevace "Capevace (24 commits)")

---

Tags

analyticsdeveloper-toolslaravellaravel-packagepanphpphpuser-interface

### Embed Badge

![Health badge](/badges/mateffy-pan-analytics-viewer/health.svg)

```
[![Health](https://phpackages.com/badges/mateffy-pan-analytics-viewer/health.svg)](https://phpackages.com/packages/mateffy-pan-analytics-viewer)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[tonysm/rich-text-laravel

Integrates Trix content with Laravel

46577.8k1](/packages/tonysm-rich-text-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[spatie/laravel-screenshot

Take screenshots of web pages in Laravel apps

7615.9k2](/packages/spatie-laravel-screenshot)[joaopaulolndev/filament-world-clock

Show hours around the world by timezone

3111.9k](/packages/joaopaulolndev-filament-world-clock)[tonegabes/filament-better-options

Filament form components for better radio and checkbox options.

155.2k](/packages/tonegabes-filament-better-options)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
