Skip to content

Commit

Permalink
Merge pull request #11 from code4romania/add-gtag
Browse files Browse the repository at this point in the history
Add gtag
  • Loading branch information
gheorghelupu17 authored May 31, 2023
2 parents 30dbc43 + 5382dcf commit 16ba463
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions resources/views/components/layout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,15 @@
</body>
@vite('resources/js/app.js')
{{$js ?? ''}}
@if(App::environment('production'))
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-R0RSRB4PSE"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-R0RSRB4PSE');
</script>
@endif
</html>

0 comments on commit 16ba463

Please sign in to comment.