Skip to content

Commit

Permalink
feat: integrate google analytics for user metrics collection (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
saladgg authored and kennedykori committed Sep 20, 2022
1 parent e8aed89 commit 974f1b4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
13 changes: 5 additions & 8 deletions assets/static/js/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@ function switchDashboards(event) {


(function($) {
/* Google Analytics */
window.dataLayer = window.dataLayer || [];

function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-WW2W29ZMTZ");
/* Google Analytics */
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-6XRLBC4TMR');

// Auto-collapse open menus in responsive mode
$(".navbar-collapse a").click(function() {
Expand Down
7 changes: 6 additions & 1 deletion assets/templates/atoms/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,18 @@
<link href="https://cdn.jsdelivr.net/npm/@ttskch/select2-bootstrap4-theme/dist/select2-bootstrap4.min.css" rel="stylesheet">
{% endblock css %}


{% block javascript %}
{% compress js %}
<script defer src="{% static 'js/vendors.min.js' %}"></script>
<script defer src="{% static 'js/sb-admin-2.min.js' %}"></script>
<script defer src="{% static 'js/project.min.js' %}"></script>
{% endcompress %}
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WW2W29ZMTZ"></script>

<script src="https://kit.fontawesome.com/e1c9d8c99d.js" crossorigin="anonymous"></script>

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-6XRLBC4TMR"></script>
{% endblock javascript %}

</head>

0 comments on commit 974f1b4

Please sign in to comment.