Google Analytics

Added v0.2.101

Adding Tracking Code

Gtag and GTM codes can be entered in the admin area.

Insert this into your <head> as high up as possible.

@include('enso-analytics::head')

Insert this after the opening <body>

@include('enso-analytics::body')

Displaying Analytics Data on Backend

You can display Google Analytics data on the backend. this is powered by Spatie's laravel-analytics package

Setup

  1. You'll need some things to config/app.php.

    'Analytics' => Spatie\Analytics\AnalyticsFacade::class,
    
    // ...
    
    Spatie\Analytics\AnalyticsServiceProvider::class,
    Yadda\Enso\EnsoAnalyticsServiceProvider::class,
    
  2. You will also need to get some API credentials. Follow the instructions on the Spatie package page.