About this project

Rybbit Sdk For Laravel is a Composer package that integrates the open-source, privacy-friendly Rybbit analytics platform into Laravel applications. It provides a Laravel-native API for both client-side and server-side tracking. Key capabilities: - **Blade directive**: The `@rybbit` tag injects the Rybbit tracking script into views, supporting attributes like `data-debounce`, `data-tag`, `data-skip-patterns`, and `data-mask-patterns`. - **Server-side event tracking**: The `Rybbit` facade sends pageviews, custom events, performance metrics, outbound clicks, and errors directly to Rybbit's `/api/track` endpoint from the backend. - **User queries**: Read a site's users, find individual user profiles and devices, get daily session counts, or delete tracked user data via Rybbit's read API. - **Overview stats**: Retrieve headline KPIs, bucketed time series (daily/hourly/weekly), live visitor counts, and dimension breakdowns by page, country, browser, etc. - **Tunnel proxy**: By default, the package registers local routes that proxy tracking requests (script, track, identify, session replay, site config) through the application's own domain, avoiding ad-blocker and browser privacy blocking. Client IPs are resolved from `X-Forwarded-For` and forwarded. Failed requests are retried, and session replay data uses queued jobs. - **Testing support**: `Rybbit::fake()` replaces the facade with an in-memory spy, recording every call and providing assertion helpers for all tracking and query methods. - **Laravel Boost skill**: Ships an Agent Skill for Laravel Boost's AI coding agent. Configuration is driven by environment variables (`RYBBIT_SITE_ID`, `RYBBIT_HOST`, `RYBBIT_API_KEY`, etc.) and a published `config/rybbit.php` file. The package supports both Rybbit Cloud and self-hosted Rybbit instances. Feature coverage includes embedding the script, tunneling, server-side events, and user/read queries; goals, funnels, sessions, and administration endpoints are not covered.