Skip to main content
To add tinyanalytics to a Laravel app, place the tracking snippet in the <head> of your shared Blade layout so it renders on every page that extends it.

Before you start

  • A tinyanalytics site. If you don’t have one yet, follow the Quickstart.
  • Your snippet from Settings → Tracking in your dashboard.

Add the snippet to your Blade layout

Add the tag to the <head> of your layout, for example resources/views/layouts/app.blade.php:
resources/views/layouts/app.blade.php
Put the snippet in the one layout your pages extend so it’s present sitewide. Replace YOUR_SITE_ID with your real site ID, and copy the full snippet from Settings → Tracking if you’ve toggled any options.

Verify

Serve or deploy your app, open it in a browser, then check Realtime in your dashboard for your visit. See Verify your setup for the full check.
Your install is working when your own visit appears in Realtime in your dashboard.

Install on any platform

The universal method and other platforms.

Configure the tracking script

Every data-* option you can set.

Track custom events

Send events from your app.

Verify your setup

Confirm tracking works.