Enable analytics in production

This commit is contained in:
Danielle McLean 2017-11-01 16:18:48 +11:00
parent 06278935b6
commit 4b4ab324cc
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
5 changed files with 32 additions and 15 deletions

View file

@ -4,7 +4,9 @@ url = "https://pypi.python.org/simple"
verify_ssl = true verify_ssl = true
name = "pypi" name = "pypi"
[requires] [requires]
python_version = '3.6' python_version = '3.6'
@ -34,6 +36,7 @@ pyyaml = "*"
django-annoying = "*" django-annoying = "*"
django-shorturls = "*" django-shorturls = "*"
accept-types = "*" accept-types = "*"
django-analytical = "*"
[dev-packages] [dev-packages]

35
Pipfile.lock generated
View file

@ -1,7 +1,7 @@
{ {
"_meta": { "_meta": {
"hash": { "hash": {
"sha256": "8d981d3d640ab95689a05ffd6aae4fd372a8fbe566b4e8c3caf8de2a6d3dd4e9" "sha256": "d1b1d871bb10ecfd71c966c40292cb5ba24d4dc70639d9b147c302e04b522a62"
}, },
"host-environment-markers": { "host-environment-markers": {
"implementation_name": "cpython", "implementation_name": "cpython",
@ -84,6 +84,13 @@
], ],
"version": "==0.3.0" "version": "==0.3.0"
}, },
"django-analytical": {
"hashes": [
"sha256:9060a34a5d1882021a399a52c6af993f790deb7f9abf7dfbb84fe3033e0cb134",
"sha256:e7c8e026d0a10d41cffa06163fcee24870597cedba19d5fa2609d35dec6463fc"
],
"version": "==2.3.0"
},
"django-annoying": { "django-annoying": {
"hashes": [ "hashes": [
"sha256:07267defd06e37ad287053de4ea8c83ab4aae8114628830b7c91b70b63494572", "sha256:07267defd06e37ad287053de4ea8c83ab4aae8114628830b7c91b70b63494572",
@ -180,10 +187,10 @@
}, },
"html5lib": { "html5lib": {
"hashes": [ "hashes": [
"sha256:b8934484cf22f1db684c0fae27569a0db404d0208d20163fbf51cc537245d008", "sha256:08a3efc117a4fc8c82c3c6d10d6f58ae266428d57ed50258a1466d2cd88de745",
"sha256:ee747c0ffd3028d2722061936b5c65ee4fe13c8e4613519b4447123fc4546298" "sha256:0d5fd54d5b2b79b876007a70c033a4023577768d18022c15681c00561432a0f9"
], ],
"version": "==0.999999999" "version": "==1.0b10"
}, },
"idna": { "idna": {
"hashes": [ "hashes": [
@ -353,17 +360,17 @@
}, },
"pytz": { "pytz": {
"hashes": [ "hashes": [
"sha256:c883c2d6670042c7bc1688645cac73dd2b03193d1f7a6847b6154e96890be06d", "sha256:80af0f3008046b9975242012a985f04c5df1f01eed4ec1633d56cc47a75a6a48",
"sha256:03c9962afe00e503e2d96abab4e8998a0f84d4230fa57afe1e0528473698cdd9", "sha256:feb2365914948b8620347784b6b6da356f31c9d03560259070b2f30cff3d469d",
"sha256:487e7d50710661116325747a9cd1744d3323f8e49748e287bc9e659060ec6bf9", "sha256:59707844a9825589878236ff2f4e0dc9958511b7ffaae94dc615da07d4a68d33",
"sha256:43f52d4c6a0be301d53ebd867de05e2926c35728b3260157d274635a0a947f1c", "sha256:d0ef5ef55ed3d37854320d4926b04a4cb42a2e88f71da9ddfdacfde8e364f027",
"sha256:d1d6729c85acea5423671382868627129432fba9a89ecbb248d8d1c7a9f01c67", "sha256:c41c62827ce9cafacd6f2f7018e4f83a6f1986e87bfd000b8cfbd4ab5da95f1a",
"sha256:54a935085f7bf101f86b2aff75bd9672b435f51c3339db2ff616e66845f2b8f9", "sha256:8cc90340159b5d7ced6f2ba77694d946fc975b09f1a51d93f3ce3bb399396f94",
"sha256:39504670abb5dae77f56f8eb63823937ce727d7cdd0088e6909e6dcac0f89043", "sha256:dd2e4ca6ce3785c8dd342d1853dd9052b19290d5bf66060846e5dc6b8d6667f7",
"sha256:ddc93b6d41cfb81266a27d23a79e13805d4a5521032b512643af8729041a81b4", "sha256:699d18a2a56f19ee5698ab1123bbcc1d269d061996aeb1eda6d89248d3542b82",
"sha256:f5c056e8f62d45ba8215e5cb8f50dfccb198b4b9fbea8500674f3443e4689589" "sha256:fae4cffc040921b8a2d60c6cf0b5d662c1190fe54d718271db4eb17d44a185b7"
], ],
"version": "==2017.2" "version": "==2017.3"
}, },
"pyyaml": { "pyyaml": {
"hashes": [ "hashes": [

View file

@ -69,6 +69,7 @@ INSTALLED_APPS = [
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'analytical',
'annoying', 'annoying',
'compressor', 'compressor',
'debug_toolbar', 'debug_toolbar',

View file

@ -23,3 +23,5 @@ STATIC_URL = 'https://cdn.00dani.me/'
MEDIA_URL = STATIC_URL + 'media/' MEDIA_URL = STATIC_URL + 'media/'
META_SITE_DOMAIN = '00dani.me' META_SITE_DOMAIN = '00dani.me'
META_FB_APPID = '145311792869199' META_FB_APPID = '145311792869199'
GOOGLE_ANALYTICS_PROPERTY_ID = 'UA-109060843-1'

View file

@ -1,6 +1,7 @@
{% load compress favtags lemoncurry_tags meta static theme_colour %}<!doctype html> {% load analytical compress favtags lemoncurry_tags meta static theme_colour %}<!doctype html>
<html lang="en" class="{% block html_class %}{% endblock %}"> <html lang="en" class="{% block html_class %}{% endblock %}">
<head{% meta_namespaces %}>{% site_name as site_name %}{% request_uri request as uri %}{% request_origin request as origin %} <head{% meta_namespaces %}>{% site_name as site_name %}{% request_uri request as uri %}{% request_origin request as origin %}
{% analytical_head_top %}
<base href="{{ origin }}" /> <base href="{{ origin }}" />
<title class="p-name">{% if title %}{{ title }} ~ {% endif %}{{ site_name }}</title> <title class="p-name">{% if title %}{{ title }} ~ {% endif %}{{ site_name }}</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
@ -34,8 +35,10 @@
{% block styles %}{% endblock %} {% block styles %}{% endblock %}
{% endcompress %} {% endcompress %}
<script type="text/javascript" src="https://use.fontawesome.com/4fbab4ae27.js"></script> <script type="text/javascript" src="https://use.fontawesome.com/4fbab4ae27.js"></script>
{% analytical_head_bottom %}
</head> </head>
<body> <body>
{% analytical_body_top %}
<header> <header>
<nav class="navbar navbar-expand-md navbar-dark"> <nav class="navbar navbar-expand-md navbar-dark">
<a class="navbar-brand" rel="home" href="{% url 'home:index' %}">{% site_name %}</a> <a class="navbar-brand" rel="home" href="{% url 'home:index' %}">{% site_name %}</a>
@ -74,5 +77,6 @@
<script src="{% static 'tippy.js/tippy.standalone.js' %}"></script> <script src="{% static 'tippy.js/tippy.standalone.js' %}"></script>
{% block foot %}{% endblock %} {% block foot %}{% endblock %}
{% endcompress %} {% endcompress %}
{% analytical_body_bottom %}
</body> </body>
</html> </html>