Skip to content

Commit

Permalink
Added google gtag
Browse files Browse the repository at this point in the history
  • Loading branch information
5orenso committed Sep 16, 2021
1 parent afa417b commit eea7447
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/config-dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ module.exports = {
//googleAnalytics: 'UA-xxxxxxxx-1',
//googleTagManager: 'GTM-xxxxxx',
//googleSiteVerification: ''
// googleAnalyticsGtag: '',
author: {
fallback: {
image: '/pho/profile/fish_oistein.jpg?w=50',
Expand Down
12 changes: 12 additions & 0 deletions template/bootstrap4/inc/_footer_v2.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,18 @@ <h4 class="modal-title" id="myModalLabel"></h4>
</script>
{% endif %}

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

gtag('config', '{{ blog.googleAnalyticsGtag }}');
</script>
{% endif %}

<script type="text/javascript" src="/global/js/push-notification.js"></script>
</body>
</html>

0 comments on commit eea7447

Please sign in to comment.