Integrations Laravel

Cookie-Free Analytics for Laravel

Laravel applications can add GhostlyX to any Blade layout in one line. Track your marketing pages, application views, and custom JavaScript events across your full Laravel app.

Get started free Free plan available · Setup in 3 minutes

Installation guide

1

Add the script to your Blade layout

Open your main Blade layout file (typically resources/views/layouts/app.blade.php) and add the script tag inside the <head> section.

Code
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{ config('app.name') }}</title>
    <script defer src="https://cdn.ghostlyx.com/gx.js" data-site-id="YOUR_SITE_ID"><\/script>
    @vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
2

Track custom events (optional)

Use the GhostlyX JavaScript API to track specific user actions, such as form submissions or button clicks, from any Blade view or Alpine.js component.

Code
// In any Blade view or JS file
window.ghostlyx('Form Submitted', { form: 'contact' })

Why Laravel users choose GhostlyX

Laravel developers often build multi-page applications with a mix of public marketing pages and authenticated app views. You can add GhostlyX to your public marketing layout only, or to your full application, depending on what you need to track. Because GhostlyX collects no personal data, there is no GDPR concern about tracking authenticated users' navigation.

Cookie-free tracking

No consent banner required under GDPR or PECR

Under 1.5 kB script

Negligible impact on page speed and Core Web Vitals

Real-time dashboard

See visitors as they arrive, updated every few seconds

Free plan available

Start tracking without a credit card

Replacing Google Analytics on Laravel?

See how GhostlyX compares feature by feature, including script size, GDPR compliance, and pricing.

GhostlyX vs Google Analytics

Ready to add GhostlyX to Laravel?

Free plan available. Setup takes 3 minutes. No cookie consent banner required.

Get started free