Skip to content

Commit

Permalink
Add Analytics in admin layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Xety committed Apr 2, 2022
1 parent 14700cb commit e86f381
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions resources/views/layouts/admin.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@

<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />

<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ config('xetaravel.site.analytics_tracker_code') }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ config('xetaravel.site.analytics_tracker_code') }}');
</script>

<!-- Embed Styles -->
@stack('style')

Expand Down
2 changes: 1 addition & 1 deletion resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', {{ config('xetaravel.site.analytics_tracker_code') }});
gtag('config', '{{ config('xetaravel.site.analytics_tracker_code') }}');
</script>

<!-- Embed Styles -->
Expand Down

0 comments on commit e86f381

Please sign in to comment.