Download the PHP package artisanpack-ui/analytics without Composer

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

ArtisanPack UI Analytics

ArtisanPack UI Analytics is a privacy-first analytics package for Laravel applications. Built on Livewire 3, it provides local database storage for complete data ownership, GDPR-compliant consent management, real-time dashboards, multi-tenant support, and optional integration with Google Analytics 4 and Plausible.

Quick Start

Installation

Basic Usage

Key Features

AI features

The Analytics package ships four AI agents that plug into artisanpack-ui/ai. Every feature is toggleable via the artisanpack.ai.features.{key}.enabled config (or the AI package's runtime registry) — Livewire, React, and Vue triggers all render a "disabled" state when a feature is off.

Feature key Input Output Default model
analytics.insight_summary { date_range, metrics, compare_to? } { summary, highlights[], concerns[] } claude-sonnet-4-6 (streams)
analytics.explain_anomaly { anomaly: {metric,direction,magnitude,date}, context: {recent_content_changes, referrer_deltas, campaign_launches} } { hypotheses:[{cause,confidence,evidence[]}], recommended_next_steps[] } claude-sonnet-4-6
analytics.segment_insight { segment:{type,value}, metrics, baseline } { patterns:[{observation,significance,suggested_action}] } claude-sonnet-4-6
analytics.digest_email { items[], focus?, length? } (inherits SummarizationAgent) { summary, key_points[], caveats[] } claude-sonnet-4-6

Livewire triggers

React / Vue triggers

Publish the components alongside the analytics dashboards (analytics-react / analytics-vue publish tags) and mount them anywhere in your Inertia app:

Enabling / disabling features

Every feature is opt-in per-app via config/artisanpack.php (merged from the AI package):

Requests are gated by the analytics.ai.use gate. The ship default allows any authenticated user; override in your AuthServiceProvider for stricter policies.

Digest email opt-in

The analytics.digest_email feature is delivered via a queued job (SendDigestEmailJob) and honors a per-user preference stored in analytics_digest_preferences (off | weekly | monthly). Users pick their cadence via the DigestSubscription component; you schedule SendDigestEmailJob on your cadence of choice (the job is a no-op for users whose preference is off or missing).

Components

Livewire Components

Component Description
AnalyticsDashboard Full-featured analytics dashboard with all widgets
StatsCards Summary statistics (page views, visitors, sessions, bounce rate)
VisitorsChart Interactive line chart of visitors over time
TopPages Most visited pages table with view counts
TrafficSources Referrer breakdown with percentage charts
RealtimeVisitors Live count of active visitors
GoalProgress Goal completion tracking with progress bars
ConsentBanner GDPR consent collection banner

Widget Usage

Documentation

Comprehensive documentation is available at our Documentation Site:

Configuration

Publish the configuration file:

Environment Variables

The package supports the following environment variables:

Variable Description Default
ANALYTICS_ENABLED Enable/disable all tracking true
ANALYTICS_ACTIVE_PROVIDERS Comma-separated list of providers local
ANALYTICS_DB_CONNECTION Database connection for analytics null (default)
ANALYTICS_TABLE_PREFIX Prefix for analytics tables analytics_
ANALYTICS_ANONYMIZE_IP Anonymize visitor IP addresses true
ANALYTICS_QUEUE_PROCESSING Process tracking via queues true
ANALYTICS_QUEUE_NAME Queue name for async processing analytics
ANALYTICS_RETENTION_PERIOD Days to retain data (null = forever) 90
ANALYTICS_DASHBOARD_PREFIX URL prefix for dashboard routes analytics
ANALYTICS_CACHE_DURATION Dashboard cache duration in seconds 300
ANALYTICS_MULTI_TENANT Enable multi-tenant mode false
ANALYTICS_CONSENT_REQUIRED Require consent before tracking false
ANALYTICS_RESPECT_DNT Honor Do Not Track headers true
ANALYTICS_GOOGLE_ENABLED Enable Google Analytics 4 false
ANALYTICS_GOOGLE_MEASUREMENT_ID GA4 Measurement ID null
ANALYTICS_GOOGLE_API_SECRET GA4 API Secret null
ANALYTICS_PLAUSIBLE_ENABLED Enable Plausible Analytics false
ANALYTICS_PLAUSIBLE_DOMAIN Plausible domain null
ANALYTICS_PLAUSIBLE_API_URL Plausible API URL https://plausible.io/api

Configuration Options

Key configuration options in config/artisanpack/analytics.php:

Artisan Commands

Scheduling Commands

Add to your scheduler for automated maintenance:

Requirements

Dependencies

The package has minimal external dependencies:

Optional integrations with the ArtisanPack UI ecosystem:

Events

The package dispatches events for key actions:

Extensibility

Custom Analytics Providers

Create custom providers by implementing AnalyticsProviderInterface:

Custom Site Resolvers (Multi-Tenant)

Which site a request is for is decided once for the whole ArtisanPack UI ecosystem, by artisanpack-ui/core. Implement its contract, which is keyed on the site identifier so packages need not share models:

See Multi-Tenancy for migrating a resolver written against the deprecated SiteResolverInterface.

Filter Hooks

Extend functionality using filter hooks:

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m 'Add feature')
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a Merge Request

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting merge requests.

License

ArtisanPack UI Analytics is open-sourced software licensed under the MIT license.


All versions of analytics with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
artisanpack-ui/ai Version ^1.0
artisanpack-ui/core Version ^1.3.1
artisanpack-ui/hooks Version ^1.3
doctrine/dbal Version ^4.0
illuminate/cache Version ^11.0|^12.0|^13.0
illuminate/console Version ^11.0|^12.0|^13.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/queue Version ^11.0|^12.0|^13.0
illuminate/routing Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
livewire/livewire Version ^3.6.4|^4.0
nesbot/carbon Version ^2.0|^3.0
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 artisanpack-ui/analytics contains the following files

Loading the files please wait ...