adding google analytics code example
Example 1: set up google analytics
How to set up Google analytics:
Watch this video: https:
Or Click on this link: https:
Example 2: add google analytics to website laravel
@if(\Settings::get('google_analytics_id'))
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async
src="https://www.googletagmanager.com/gtag/js?id={{ \Settings::get('google_analytics_id') }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', "{{ \Settings::get('google_analytics_id') }}");
</script>
@endif