Skip to content

Commit 379dbda

Browse files
committed
docs: update GA
1 parent c31fe60 commit 379dbda

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ theme: jekyll-theme-cayman
33
# Setup
44
title: Laravel File Manager
55
description: It's like Dropbox for your Laravel app.
6-
google_analytics: UA-92410814-4
6+
google_analytics: G-X9XY279785
77

88
# About/contact
99
author:

docs/_layouts/default.html

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,13 @@ <h2 class="project-tagline">{{ site.description | default: site.github.project_t
127127
</section>
128128

129129
{% if site.google_analytics %}
130-
<script type="text/javascript">
131-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
132-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
133-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
134-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
130+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
131+
<script>
132+
window.dataLayer = window.dataLayer || [];
133+
function gtag(){dataLayer.push(arguments);}
134+
gtag('js', new Date());
135135

136-
ga('create', '{{ site.google_analytics }}', 'auto');
137-
ga('send', 'pageview');
136+
gtag('config', '{{ site.google_analytics }}');
138137
</script>
139138
{% endif %}
140139
</body>

0 commit comments

Comments
 (0)