generic tags not working when using matomo?
Hafnernuss opened this issue · comments
Philipp commented
Hi,
I have successfully setup a matomo tracking server and wanted to integrate tracking inside my django project.:
settings.py:
MATOMO_DOMAIN_PATH = 'matomo.mydomain.com'
MATOMO_SITE_ID = '1'
and added all necessary generic template tags in my base.html:
{% load analytical %}
<!DOCTYPE html>
{% load static %}
{% load tags %}
<html lang="en">
<head>
{% analytical_head_top %}
<!-- here -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
rel="stylesheet" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}">
{% analytical_head_bottom %}
</head>
<body>
{% analytical_body_top %}
{% navbar %}
{% block content %}{% endblock %}
{% footer %}
<!-- Bootstrap core JavaScript -->
<script src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous">
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
crossorigin="anonymous">
</script>
{% analytical_body_bottom $}
</body>
But the matomo tracking code does not render. However, when I use the matomo tags, it works:
{% load matomo %}
{% matomo %}
Since there is no error output of any kind, I am wondering what I missed?
regards,
Philipp
Philipp commented
Well.....
{% analytical_body_bottom $}
was the problem. I am obviosuly blind. It now works as expected.