Skip to content

Commit

Permalink
docs: update GA
Browse files Browse the repository at this point in the history
  • Loading branch information
streamtw committed Nov 14, 2023
1 parent c31fe60 commit 379dbda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ theme: jekyll-theme-cayman
# Setup
title: Laravel File Manager
description: It's like Dropbox for your Laravel app.
google_analytics: UA-92410814-4
google_analytics: G-X9XY279785

# About/contact
author:
Expand Down
13 changes: 6 additions & 7 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,13 @@ <h2 class="project-tagline">{{ site.description | default: site.github.project_t
</section>

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

ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
gtag('config', '{{ site.google_analytics }}');
</script>
{% endif %}
</body>
Expand Down

0 comments on commit 379dbda

Please sign in to comment.