LordOfDrols
LordOfDrols
FFilament
Created by LordOfDrols on 9/26/2023 in #❓┊help
How to add Google Tag Manager to admin pages
I would love to get some analytics about the pages viewed by my users therefore I am using: https://github.com/spatie/laravel-googletagmanager From their documentation: First you'll need to include Google Tag Manager's script. Google's docs recommend doing this right after the body tag.
{{-- layout.blade.php --}}
<html>
<head>
@include('googletagmanager::head')
{{-- ... --}}
</head>
<body>
@include('googletagmanager::body')
{{-- ... --}}
</body>
</html>
{{-- layout.blade.php --}}
<html>
<head>
@include('googletagmanager::head')
{{-- ... --}}
</head>
<body>
@include('googletagmanager::body')
{{-- ... --}}
</body>
</html>
As I can't find any layout file, neither I know how to publish them I looked up for https://filamentphp.com/docs/3.x/support/assets#registering-javascript-files. I am wondering what the best way would be. Cheers,
5 replies