feat: add analytics infrastructure (#3862)

This commit is contained in:
Robert Sparks 2022-04-21 18:06:14 -05:00 committed by GitHub
parent 7c6917562f
commit f4b0b459cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -429,6 +429,7 @@ INSTALLED_APPS = [
'django.contrib.sites', 'django.contrib.sites',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
# External apps # External apps
'analytical',
'django_bootstrap5', 'django_bootstrap5',
'corsheaders', 'corsheaders',
'django_markup', 'django_markup',

View file

@ -1,11 +1,13 @@
{# Copyright The IETF Trust 2015-2022, All Rights Reserved #} {# Copyright The IETF Trust 2015-2022, All Rights Reserved #}
<!DOCTYPE html> <!DOCTYPE html>
{% load analytical %}
{% load ietf_filters static %} {% load ietf_filters static %}
{% load origin %} {% load origin %}
{% origin %} {% origin %}
{% load django_bootstrap5 %} {% load django_bootstrap5 %}
<html lang="en"> <html lang="en">
<head> <head>
{% analytical_head_top %}
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title> <title>
@ -32,9 +34,11 @@
<link rel="apple-touch-icon" <link rel="apple-touch-icon"
href="{% static 'ietf/images/apple-touch-icon.png' %}"> href="{% static 'ietf/images/apple-touch-icon.png' %}">
<script src="{% static 'ietf/js/ietf.js' %}"></script> <script src="{% static 'ietf/js/ietf.js' %}"></script>
{% analytical_head_bottom %}
</head> </head>
<body {% block bodyAttrs %}{% endblock %} class="position-relative" <body {% block bodyAttrs %}{% endblock %} class="position-relative"
data-group-menu-data-url="{% url 'ietf.group.views.group_menu_data' %}"> data-group-menu-data-url="{% url 'ietf.group.views.group_menu_data' %}">
{% analytical_body_top %}
<a class="visually-hidden visually-hidden-focusable" href="#content">Skip to main content</a> <a class="visually-hidden visually-hidden-focusable" href="#content">Skip to main content</a>
<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 %}"> <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 %}">
<div class="container-fluid"> <div class="container-fluid">
@ -157,5 +161,6 @@
window.location.href = e.params.data.url; window.location.href = e.params.data.url;
}); });
</script> </script>
{% analytical_body_bottom %}
</body> </body>
</html> </html>

View file

@ -10,6 +10,7 @@ coverage>=4.0.1,!=4.0.2,<5.0 # Coverage 5.x moves from a json database to SQL
decorator>=4.0.4 decorator>=4.0.4
defusedxml>=0.4.1 # for TastyPie when ussing xml; not a declared dependency defusedxml>=0.4.1 # for TastyPie when ussing xml; not a declared dependency
Django>=2.2.15,<3.0 Django>=2.2.15,<3.0
django-analytical>=3.1.0
django-bootstrap5>=21.1 django-bootstrap5>=21.1
django-csp>=3.5 django-csp>=3.5
django-cors-headers>=2.4.0 django-cors-headers>=2.4.0
@ -73,4 +74,4 @@ Unidecode>=0.4.18,<1.2.0
weasyprint>=52.5,<53 weasyprint>=52.5,<53
xml2rfc>=2.35.0 xml2rfc>=2.35.0
xym>=0.4.4,!=0.4.7,<1.0 xym>=0.4.4,!=0.4.7,<1.0
#zxcvbn-python>=4.4.14 # Not needed until we do back-end password entropy validation #zxcvbn-python>=4.4.14 # Not needed until we do back-end password entropy validation