Download the PHP package mateffy/pan-analytics-viewer without Composer

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

Screenshot of the popup



mateffy/pan-analytics-viewer

A tiny Laravel package to view your panphp/pan analytics directly in the UI where they are triggered!



Video Example [Video Example](https://github.com/user-attachments/assets/69aeac75-91b7-4005-a5f1-5923f3018964)


Installation


Usage

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

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

Options

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

Option Description Default
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

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

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.

Tippy.js

This package uses Tippy.js to create the popups. tippy.js is included via unpkg.com like this, but only when the component is rendered:


Configuration

You can publish the config file with:

This is the default configuration:

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


All versions of pan-analytics-viewer with dependencies

PHP Build Version
Package Version
Requires spatie/laravel-package-tools Version ^1.16
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 mateffy/pan-analytics-viewer contains the following files

Loading the files please wait ....