Skip to content

Commit

Permalink
Merge pull request #48 from questionlp/develop
Browse files Browse the repository at this point in the history
Move Google and Umami analytics to base.html
  • Loading branch information
questionlp authored Aug 1, 2024
2 parents f4ebe9a + 2588144 commit 1213764
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 36 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changes

## 2.10.1

### Application Changes

- Move web analytics tags out of `base.html` into `head.html`

## 2.10.0

### Application Changes
Expand Down
15 changes: 0 additions & 15 deletions app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,6 @@
<head>
<title>{% block title %}{% endblock %} | Wait Wait Don't Tell Me! Graphs</title>
{% include "core/head.html" with context %}

{% if ga_property_code %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ ga_property_code }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ ga_property_code }}');
</script>
{% endif %}

{% if umami_analytics %}
<!-- Umami Analytics -->
{{ umami_analytics|safe }}
{% endif %}
</head>
<body>
{% include "core/nav.html" %}
Expand Down
55 changes: 35 additions & 20 deletions app/templates/core/head.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#0d47a1">
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
{% if site_url and request.path %}
<link rel="canonical" href="{{ site_url }}{{ request.path }}">
{% endif %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#0d47a1">
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
{% if site_url and request.path %}
<link rel="canonical" href="{{ site_url }}{{ request.path }}">
{% endif %}


<!--Import Google Icon and IBM Plex Fonts-->
<link href="{{ url_for('static', filename='material-icons/material-icons.css') }}" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
<!--Import Google Icon and IBM Plex Fonts-->
<link href="{{ url_for('static', filename='material-icons/material-icons.css') }}" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">

<!--Import Materialize -->
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='css/materialize.min.css') }}" media="screen">
<!--Import Materialize -->
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='css/materialize.min.css') }}" media="screen">

<!-- Import Custom CSS -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<!-- Import Custom CSS -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">

<!-- Plotly.js -->
{% if use_latest_plotly %}
<script src="{{ url_for('static', filename='js/plotly-latest.min.js') }}"></script>
{% else %}
<script src="{{ url_for('static', filename='js/plotly-stable.min.js') }}"></script>
{% endif %}
<!-- Plotly.js -->
{% if use_latest_plotly %}
<script src="{{ url_for('static', filename='js/plotly-latest.min.js') }}"></script>
{% else %}
<script src="{{ url_for('static', filename='js/plotly-stable.min.js') }}"></script>
{% endif %}

{% if ga_property_code %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ ga_property_code }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ ga_property_code }}');
</script>
{% endif %}

{% if umami_analytics %}
<!-- Umami Analytics -->
{{ umami_analytics|safe }}
{% endif %}
2 changes: 1 addition & 1 deletion app/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# vim: set noai syntax=python ts=4 sw=4:
"""Application Version for Wait Wait Graphs Site."""

APP_VERSION = "2.10.0"
APP_VERSION = "2.10.1"

0 comments on commit 1213764

Please sign in to comment.