@if(isset($analytic->error))
Google Analytic Fatal Error : {{ $analytic->error }}
Show Help

Please make sure important things to do below :

  1. You need to set the right ANALYTICS_VIEW_ID in .env based on your targetted dashboard View ID
    (Check in : Google Analytic Dashboard >> Admin >> View Settings)
  2. Check the client_email in {{ config('analytics.service_account_credentials_json') }}. Make sure that the email in service account is have the read access in your targeted Google Analytic.
    (Check in : Google Analytic Dashboard >> Admin >> View User Management)

  3. Last, you can generate new service account and replace the file in {{ config('analytics.service_account_credentials_json') }} if you cannot do all steps above.
@elseif(isset($analytic->report)) @if(isset($analytic->report['ranged']))
Pageview & Visitor Report {{ $period_string }}
@endif @include ('core::components.analytic.script', [ 'type' => 'line', 'title' => 'Filtered Date Pageview Report', 'canvas_id' => 'analytic-ranged-pageview', 'label' => $analytic->report['ranged']['label'], 'dataset' => [ [ 'label' => 'Page View', 'borderColor' => '#7E8BE8', 'backgroundColor' => 'rgba(126,139,232, .15)', 'data' => $analytic->report['ranged']['pageview'] ], [ 'label' => 'Visitors', 'borderColor' => '#3744A1', 'backgroundColor' => 'rgba(55,68,161, .15)', 'data' => $analytic->report['ranged']['visitor'] ], ] ])
@if(isset($analytic->report['most_visited']))
Most Visited Pages {{ $period_string }}
@foreach($analytic->report['most_visited'] as $row) @endforeach @if($total_pageview > 0) @endif
No Title Pageviews
{{ $loop->iteration }} {{ $row['pageTitle'] }} {{ number_format($row['pageViews']) }}
{{ number_format($total_pageview) }}
@endif @if(isset($analytic->report['top_landing']))
Top Landing Page {{ $period_string }}
@foreach($analytic->report['top_landing'] as $row) @endforeach
No Title
{{ $loop->iteration }} {{ $row['title'] }} {{ number_format($row['entrances']) }} {{ number_format($row['bounces']) }} {{ number_format($row['bounce_rate']) }}%
@endif
@else

To use the Google Analytic Dashboard, please provide the Google Service Account Credentials & Google Analytic View ID.

@endif