Skip to content

Google Analytics Component

Component:

blade
<x-google-analytics />

Purpose

Inject Google Analytics when a property id is configured.

Behavior

  • only renders when setting('google_analytics_property_id') is truthy
  • loads the GA script asynchronously
  • configures gtag with the stored property id

All rights reserved.