junaid63/prism-path

PrismPath is a premium Laravel analytics, heatmap, session replay, and AI-assisted insight package.

Maintainers

Package info

github.com/junaid63/Prism-Path

pkg:composer/junaid63/prism-path

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-04-27 05:45 UTC

This package is auto-updated.

Last update: 2026-04-27 06:43:58 UTC


README

junaid63/prism-path is an installable Laravel analytics package for live visitors, session replay, heatmaps, page analytics, click and scroll tracking, custom events, funnels, exports, scheduled reports, and AI-assisted engagement insights.

It is designed to feel familiar to teams who use Google Analytics, Microsoft Clarity, or Salesforce dashboards, while staying understandable to Laravel developers.

Installation

Install the package via Composer:

composer require junaid63/prism-path

Publish package files and run migrations:

php artisan vendor:publish --tag=prismpath-config
php artisan vendor:publish --tag=prismpath-migrations
php artisan migrate
php artisan prismpath:seed

Add the tracker to your main Blade layout before </body>:

@prismpath

Open the analytics dashboard:

/analytics
/analytics/dashboard

Default demo credentials:

Email: admin@prismpath.test
Password: password

Configuration

Configure your analytics settings in config/prismpath.php. Key options include:

  • ANALYTICS_ENABLED - Enable/disable tracking
  • ANALYTICS_SITE_ID - Your site identifier
  • ANALYTICS_ROUTE_PREFIX - Dashboard URL prefix
  • ANALYTICS_SESSIONS - Enable session replay
  • ANALYTICS_HEATMAPS - Enable heatmaps
  • ANALYTICS_CLICKS - Enable click tracking
  • ANALYTICS_AI_INSIGHTS - Enable AI-powered insights

Demo Application

See the /demo folder for a complete Laravel 10 demo application using this package.

Features

  • 🎥 Session Replay - Record and playback user sessions
  • 🔥 Heatmaps - Visualize user interactions
  • 📊 Analytics - Track page views and custom events
  • 🤖 AI Insights - Get AI-powered engagement recommendations
  • 📈 Exports - Export analytics data
  • 📧 Reports - Scheduled email reports
  • 🔐 Secure Dashboard - Basic auth protected dashboard

License

MIT License. See LICENSE.md file for details.

Support

For issues and questions, visit: https://github.com/junaid63/Prism-Path

Set this in .env:

DB_CONNECTION=sqlite
DB_DATABASE=/absolute/path/to/database/database.sqlite

Then run:

php artisan vendor:publish --tag=ultraclarity-config
php artisan vendor:publish --tag=ultraclarity-migrations
php artisan migrate
php artisan ultraclarity:seed
php artisan serve

Dashboard Panels

PrismPath keeps every major feature within two or three clicks:

  • Overview: live users, visitors, sessions, page views, bounce rate, scroll depth, movement samples, and heatmap intensity.
  • Live Users: active sessions with current page, activity, device, OS, browser, city, country, clicks, scroll depth, and replay access.
  • Sessions & Timelines: searchable, sortable, paginated session table with expandable page details and embedded replay controls.
  • Page Views: top URLs, views, average duration, exit rate, scroll depth, and click volume.
  • Clicks & Scrolls: element-level click analytics and page behavior charts.
  • Heatmaps: click, movement, and scroll overlays with AI hotspot summaries.
  • Events & Conversions: custom event counts and funnel conversion progress.
  • Exports & Reports: JSON, CSV, timeline, heatmap, live user, session, and print/PDF report exports.

Tracking Snippet

Use the Blade directive:

@prismpath

Or render manually:

{!! PrismPath::script() !!}

The snippet batches and tracks:

  • Page views and navigation paths
  • Clicks and element selectors
  • Scroll depth
  • Mouse movement density
  • Form submissions
  • Video plays
  • Typing/input activity metadata
  • Custom events
  • GDPR opt-out state

Custom event example:

<script>
window.PrismPath.event('signup_started', {
    plan: 'pro',
    source: 'pricing_page'
});
</script>

Privacy controls:

<script>
window.PrismPath.optOut();
window.PrismPath.optIn();
</script>

Configuration

Publish config:

php artisan vendor:publish --tag=ultraclarity-config

Important .env values:

ULTRACLARITY_ENABLED=true
ULTRACLARITY_ROUTE_PREFIX=ultraclarity
ULTRACLARITY_DASHBOARD_AUTH=true
ULTRACLARITY_DASHBOARD_EMAIL=admin@prismpath.test
ULTRACLARITY_DASHBOARD_PASSWORD=password

ULTRACLARITY_SESSIONS=true
ULTRACLARITY_HEATMAPS=true
ULTRACLARITY_CLICKS=true
ULTRACLARITY_AI_INSIGHTS=true
ULTRACLARITY_ECHO=false

ULTRACLARITY_RAW_RETENTION_DAYS=90
ULTRACLARITY_RECORDING_RETENTION_DAYS=30
ULTRACLARITY_AGGREGATE_RETENTION_DAYS=365

ULTRACLARITY_STORAGE_DRIVER=database
ULTRACLARITY_STORAGE_DISK=local
ULTRACLARITY_REDIS_CONNECTION=default
ULTRACLARITY_SAMPLE_RATE=1.0

Real-Time Updates

The dashboard polls live users every few seconds by default. If your app configures Laravel Echo and broadcasts the ultraclarity.live channel, PrismPath listens for .session.updated events and updates the live user panel immediately.

PrismPath accepts matching PRISMPATH_* environment keys, for example PRISMPATH_ENABLED=true and PRISMPATH_DASHBOARD_EMAIL=admin@example.com. The legacy ULTRACLARITY_* keys, @ultraclarity directive, and UltraClarity facade remain as compatibility aliases for existing installations.

Commands

php artisan ultraclarity:seed
php artisan ultraclarity:seed --fresh
php artisan ultraclarity:heatmaps
php artisan ultraclarity:cleanup
php artisan ultraclarity:report daily
php artisan ultraclarity:report weekly
php artisan ultraclarity:report monthly --email

Documentation

Package Structure

config/                     Package configuration
database/migrations/        Analytics tables
database/seeders/           Demo analytics data
resources/js/               Tracker and dashboard assets
resources/views/            Dashboard, report, components
routes/web.php              Dashboard, exports, replay APIs
routes/api.php              Collection endpoint
src/Commands/               Cleanup, seed, reports, heatmaps
src/Events/                 Live dashboard events
src/Http/Controllers/       Collection and dashboard APIs
src/Models/                 Visitor, Session, PageView, events, heatmaps
src/Repositories/           Dashboard query layer
src/Services/               Ingestion, compression, AI insights

Production Notes

  • Keep dashboard authentication enabled or replace the middleware with your app's admin auth.
  • Use queue workers for heavier analytics processing.
  • Use Redis cache in high-traffic apps.
  • Review privacy requirements for IP storage, input masking, consent, and retention.
  • Set ULTRACLARITY_SAMPLE_RATE below 1.0 for very high traffic sites.