Skip to content

Commit f4b0b45

Browse files
authored
feat: add analytics infrastructure (ietf-tools#3862)
1 parent 7c69175 commit f4b0b45

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

ietf/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ def skip_unreadable_post(record):
429429
'django.contrib.sites',
430430
'django.contrib.staticfiles',
431431
# External apps
432+
'analytical',
432433
'django_bootstrap5',
433434
'corsheaders',
434435
'django_markup',

ietf/templates/base.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{# Copyright The IETF Trust 2015-2022, All Rights Reserved #}
22
<!DOCTYPE html>
3+
{% load analytical %}
34
{% load ietf_filters static %}
45
{% load origin %}
56
{% origin %}
67
{% load django_bootstrap5 %}
78
<html lang="en">
89
<head>
10+
{% analytical_head_top %}
911
<meta charset="utf-8">
1012
<meta http-equiv="X-UA-Compatible" content="IE=edge">
1113
<title>
@@ -32,9 +34,11 @@
3234
<link rel="apple-touch-icon"
3335
href="{% static 'ietf/images/apple-touch-icon.png' %}">
3436
<script src="{% static 'ietf/js/ietf.js' %}"></script>
37+
{% analytical_head_bottom %}
3538
</head>
3639
<body {% block bodyAttrs %}{% endblock %} class="position-relative"
3740
data-group-menu-data-url="{% url 'ietf.group.views.group_menu_data' %}">
41+
{% analytical_body_top %}
3842
<a class="visually-hidden visually-hidden-focusable" href="#content">Skip to main content</a>
3943
<nav class="navbar navbar-expand-lg {% if server_mode and server_mode != "production" %} navbar-light bg-warning {% else %} navbar-dark bg-secondary {% endif %} {% if navbar_mode %} {{ navbar_mode }} {% else %} fixed-top {% endif %}">
4044
<div class="container-fluid">
@@ -157,5 +161,6 @@
157161
window.location.href = e.params.data.url;
158162
});
159163
</script>
164+
{% analytical_body_bottom %}
160165
</body>
161166
</html>

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ coverage>=4.0.1,!=4.0.2,<5.0 # Coverage 5.x moves from a json database to SQL
1010
decorator>=4.0.4
1111
defusedxml>=0.4.1 # for TastyPie when ussing xml; not a declared dependency
1212
Django>=2.2.15,<3.0
13+
django-analytical>=3.1.0
1314
django-bootstrap5>=21.1
1415
django-csp>=3.5
1516
django-cors-headers>=2.4.0
@@ -73,4 +74,4 @@ Unidecode>=0.4.18,<1.2.0
7374
weasyprint>=52.5,<53
7475
xml2rfc>=2.35.0
7576
xym>=0.4.4,!=0.4.7,<1.0
76-
#zxcvbn-python>=4.4.14 # Not needed until we do back-end password entropy validation
77+
#zxcvbn-python>=4.4.14 # Not needed until we do back-end password entropy validation

0 commit comments

Comments
 (0)