Skip to guide
Docs & Help
Ctrl / ⌘ K
Installation guides

How to install Attriboo on Laravel

Place Attriboo in the shared Blade layout that renders your Laravel website. Your server sends the script in the page HTML and the browser records visits.

Instructions reviewed

Before you start

This guide is for Blade-rendered pages. If Laravel serves an Inertia, Vue, React or Livewire application, identify the actual root document and check that frontend’s navigation too. API-only routes do not render a page head.

Add the published domain in Attriboo. Keep one tracking installation and preserve your site’s consent choices. Your website ID is public; private API keys do not belong in the page script.

Copy the script for this website

  1. Choose your website in Attriboo.

    Check the address in the website selector. Add the website first if it is not listed.

  2. Open Setup and choose Laravel.

    Under Add the tracking script to your website, find Where is your site built? Choose this platform, then use Copy beside Your code. This gives you the right code format with your website ID filled in.

Add Attriboo to Laravel

Find this setting

  1. resources/views
  2. Shared Blade layout
  3. Inside <head>
  4. Deploy
  1. Find the layout or Blade component that contains the site’s head, often resources/views/layouts/app.blade.php.

    Check that the pages you want to track use it.

  2. Paste the HTML script from Setup before </head>.

    Leave Vite directives, CSRF tags, slots and sections in place.

  3. Deploy using your project’s usual process.

    Refresh compiled view caches if that process requires it, then test the published pages.

Code format example. Copy your filled-in version from Attriboo Setup.
<script defer data-site-id="site_YOUR_WEBSITE_ID" src="https://www.attriboo.com/t.js"></script>

Check this platform’s behavior

Keep a single loader in the shared document. Livewire navigate, Inertia and custom frontend transitions need a check of the actual page paths; do not automatically add a second loader or manual pageview on every transition.

Check that page visits reach Attriboo

  1. Open the published website in another tab.

    Use the address your customers visit. Make your normal tracking choice if a consent banner appears.

  2. Return to the same website in Attriboo → Setup.

    Select Test Connection. Look for a successful result such as Verified Live or activity on the correct address.

  3. Follow an internal link, then use your browser’s Back button.

    Check those paths in the Pages view for the current reporting dates. Allow the reports to refresh. An active connection alone does not confirm every page change.

Connect visits to recorded revenue

Installing the script records website activity. To bring sales into Attriboo, connect the service you use to collect payments in Setup as well. Then compare the recorded sources and customer journeys behind your sales.

A payment imported from before tracking was installed may have no matching visit. Installing today does not recreate old website activity.

Laravel references

These placement instructions were reviewed against the platform’s documentation and Attriboo’s current tracker. Check the published site after deployment, theme changes or navigation changes.

You are done when

The published Laravel site loads one Attriboo tracker and the expected page visits reach the selected website. Sales reporting is checked separately.

Still need a hand?

Send a question without needing to sign in.

Open support form