Install Analytise on Laravel

Paste the snippet into your Blade master layout.

Add it to your layout

  1. Open your master layout — typically resources/views/layouts/app.blade.php.
  2. Add the script inside the <head> block.
  3. Clear the view cache: php artisan view:clear.
resources/views/layouts/app.blade.php
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>{{ config('app.name') }}</title>
    <script
      defer
      data-domain="yourwebsite.com"
      data-site-id="YOUR_SITE_ID"
      src="https://www.analytise.com/js/tracker.js">
    </script>
</head>
<body>
    @yield('content')
</body>
</html>

Verify it works

  1. Open your website in a new tab.
  2. The dashboard shows your visit under online within a few seconds (live visitors update every ~15s).
  3. Nothing showing? See Troubleshooting.

Next guide

Django