Install Analytise on Laravel
Paste the snippet into your Blade master layout.
Add it to your layout
- Open your master layout — typically
resources/views/layouts/app.blade.php. - Add the script inside the
<head>block. - Clear the view cache:
php artisan view:clear.
<!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
- Open your website in a new tab.
- The dashboard shows your visit under
onlinewithin a few seconds (live visitors update every ~15s). - Nothing showing? See Troubleshooting.
Next guide
Django