diff --git a/sites/website.py b/sites/website.py index 781e272..b14bc0f 100644 --- a/sites/website.py +++ b/sites/website.py @@ -140,8 +140,29 @@ def get_template(template,hide_addresses=False): addresses = soup.find(id="addresses") addresses.decompose() except: - pass + pass + # If comment doesn't exist, add tracking to end of head + if 'Matomo' not in str(soup): + head = soup.find("head") + head.append(BeautifulSoup(""" + + + + """, 'html.parser')) + return str(soup) def calculate_contrast_ratio(color1, color2):