Install guides
Laravel
Add Actually Tracking to a Laravel app.
- Add your client ID to
.env:
ACTUALLY_TRACKING_CLIENT_ID=YOUR_CLIENT_ID- Expose it in
config/services.php:
'actually_tracking' => [
'client_id' => env('ACTUALLY_TRACKING_CLIENT_ID'),
],- Add the script to your main layout, before
</head>:
<script defer src="https://actuallytracking.com/op1.js"
data-client-id="{{ config('services.actually_tracking.client_id') }}"></script>Open your site in a new tab, then look at Realtime in Actually Tracking: your visit shows up within a few seconds. To track events from your server, see the HTTP API.