Skip to content

Commit

Permalink
Add Google Analytics tracking script to app layout
Browse files Browse the repository at this point in the history
  • Loading branch information
abdessamadbettal committed Dec 6, 2024
1 parent 9ea50c0 commit 5ae0e48
Showing 1 changed file with 34 additions and 19 deletions.
53 changes: 34 additions & 19 deletions resources/views/app.blade.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title inertia>{{ config('app.name', 'Laravel Starter') }}</title>

<!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />

<!-- Scripts -->
@routes
@vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"])
@inertiaHead
</head>
<body class="font-sans antialiased">
@inertia
</body>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title inertia>{{ config('app.name', 'Laravel Starter') }}</title>

<!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />

<!-- Scripts -->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MWK35BWK06"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-MWK35BWK06');
</script>
@routes
@vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"])
@inertiaHead
</head>

<body class="font-sans antialiased">
@inertia
</body>

</html>

0 comments on commit 5ae0e48

Please sign in to comment.