Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add google analytics for user metrics collection #38

Merged
merged 3 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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($) {
kennedykori marked this conversation as resolved.
Show resolved Hide resolved
/* 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>