Analytics

We have made it easy for you to add Google analytics to your project. The only thing you need to do is to add your Google Analytics ID to the .env file:

GOOGLE_ANALYTICS_MEASUREMENT_ID=G-5XVV2N8HD


When that's done, the ID will be added to the google tag manager script in the app.blade.php file:

<script async src="https://www.googletagmanager.com/gtag/js?id={{ config('services.google_analytics.measurement_id') }}"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', '{{ config('services.google_analytics.measurement_id') }}');
</script>