From 67f323b382f84e19bc4f2db8f65f2f390755bb47 Mon Sep 17 00:00:00 2001 From: maeries <8ij4neqiu@mozmail.com> Date: Thu, 20 Mar 2025 17:10:17 +0100 Subject: [PATCH] added analytics script --- header-snippet.html | 1 + main.py | 4 ++++ public/index.html | 1 + 3 files changed, 6 insertions(+) create mode 100644 header-snippet.html diff --git a/header-snippet.html b/header-snippet.html new file mode 100644 index 0000000..d38e9e3 --- /dev/null +++ b/header-snippet.html @@ -0,0 +1 @@ +<script defer data-domain="fselo.get-racing.de" src="https://analytics.get-racing.de/js/script.js"></script> \ No newline at end of file diff --git a/main.py b/main.py index 597fc77..2105c99 100644 --- a/main.py +++ b/main.py @@ -65,6 +65,8 @@ class EloSystem: self.LINK_COLOR_HOVER = "#cc3700" else: raise + with open("header-snippet.html") as header_snippet: + self.header_snippet = header_snippet.read() def load_competition_meta_data(self): if self.competition_type == "combustion": @@ -257,6 +259,7 @@ class EloSystem: <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Formula Student {self.competition_type} Elo Rankings</title> + {self.header_snippet} <style> body {{ display: flex; @@ -510,6 +513,7 @@ class EloSystem: <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>{team_name} - Elo Profile</title> + {self.header_snippet} <style> body {{ font-family: Arial, sans-serif; diff --git a/public/index.html b/public/index.html index f2ce8a0..5c7b3b1 100644 --- a/public/index.html +++ b/public/index.html @@ -3,6 +3,7 @@ <head> <meta charset="UTF-8"> <title>Formula Student World Elo</title> + <script defer data-domain="fselo.get-racing.de" src="https://analytics.get-racing.de/js/script.js"></script> <style> body { display: flex; -- GitLab