Integration

Cookieless web analytics for Laravel

Add Noralytic to your Laravel layout with one Blade snippet. Works with Blade, Livewire and Inertia, without cookies or packages.

Free plan · No credit card required · Updated October 2026

Why use Noralytic with Laravel

Laravel developers often avoid heavy analytics packages and consent tooling. Noralytic is one script tag in your layout, and it needs no Composer package.

Inertia and Livewire navigation is tracked too, because the script follows the browser history.

  • No cookies, no local storage and no stored IP addresses, so analytics alone does not need a consent banner.
  • A tracking script under 1 KB that will not slow down your pages.
  • Real-time stats, top pages, sources, countries, devices, campaigns and events in one simple dashboard.
  • Single-page navigation is tracked automatically, because the script follows the browser history.

What you need

  • A free Noralytic account with your website added under its exact domain.
  • Access to your main Blade layout, for example resources/views/layouts/app.blade.php.

How to add Noralytic to Laravel

The tracking code is one line. The steps below show where it goes.

Your Noralytic tracking code
<script data-host="https://noralytic.com" src="https://noralytic.com/js/script.js" id="ZwSg9rf6GA" async defer></script>
  1. Open your layout
    Open the Blade layout that renders the <head> of your pages.
  2. Add the snippet
    Paste the code inside the head. Wrap it in @production so local development is not tracked.
  3. Deploy and test
    Deploy and check the real-time view in Noralytic.
resources/views/layouts/app.blade.php
@production
    <script data-host="https://noralytic.com" src="https://noralytic.com/js/script.js" id="ZwSg9rf6GA" async defer></script>
@endproduction

Check that tracking works

  1. Open your website
    Use a private browser window so extensions and your login do not interfere.
  2. Open the Noralytic real-time view
    In your Noralytic dashboard, open your website and go to Realtime.
  3. Look for your visit
    Your page view should appear within a few seconds. Click through a few pages to see each one counted.

Track custom events on Laravel

Track clicks or form submissions from Blade, Alpine or Livewire.

Example
<button type="button" onclick="window.pa && pa.track({ name: 'signup' })">Sign up</button>

Events appear in your Events report. A value and a unit are optional, for example pa.track({ name: 'purchase', value: 49.9, unit: 'EUR' }).

Exclude your own visits and bots

To keep your numbers clean, open your website settings in Noralytic and add your own IP address under excluded IP addresses. Make sure bot filtering is enabled so known crawlers are ignored.

Troubleshooting

  • Inertia and Livewire: history navigation is tracked automatically, so you do not need to add a manual page view.
  • Content Security Policy: if you use a CSP package, allow noralytic.com for scripts and connections.
  • No data after a few minutes? Confirm that the domain in Noralytic matches your website exactly, and that the script appears in the page source.
  • Ad blockers: some blockers hide analytics scripts. Test in a private window without extensions.
  • Content Security Policy: if you use one, allow noralytic.com as a script and connection source.

Frequently asked questions

Do I need a plugin or app to use Noralytic with Laravel?

No Composer package is needed. Add the snippet to your Blade layout.

Does Noralytic need a cookie banner on Laravel?

Noralytic itself does not use cookies, so analytics alone does not require a consent banner. Other tools on your site, such as advertising or social widgets, may still need one.

Does Noralytic work with Inertia.js and Livewire?

Yes. Both navigate with the browser history API, which the script follows.

How do I exclude local development?

Wrap the snippet in @production, or add your local domain only if you want to test.

Is Noralytic free to use with Laravel?

Yes. Noralytic has a free plan with 10,000 pageviews per month for one website, and paid plans start at €8.99 per month.

Try privacy-friendly analytics for free

Create a free account in seconds, add one line of code and see your first visitors live. No cookies, no credit card.