Category: Laravel, Laravel

Google Tag Manager (GTM) enables you to track different events by defining variables, triggers, and tags. I assume you already have GTM installed and verified that it is working.

In my ExceptionHandler I assign a errorcode variable containing the HTTP error code that was triggered, eg.

Now it's time to login into Google Tag Manager and configure our variables, triggers and tags: Make a new user-defined variable called "errorcode".

Add a new tag called for tracking events when there is an errorcode on a page.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners