jfataphd commited on
Commit
a1b38ef
1 Parent(s): a06d351

Upload 3 files

Browse files
google_analytics_component/__pycache__/google_analytics.cpython-311.pyc ADDED
Binary file (1.18 kB). View file
 
google_analytics_component/google_analytics.html ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <!-- Google tag (gtag.js) -->
5
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-EKFSW65C2P"></script>
6
+ <script>
7
+ window.dataLayer = window.dataLayer || [];
8
+ function gtag(){dataLayer.push(arguments);}
9
+ gtag('js', new Date());
10
+ gtag('config', 'G-EKFSW65C2P');
11
+ </script>
12
+ </head>
13
+ <body>
14
+ </body>
15
+ </html>
google_analytics_component/google_analytics.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import streamlit as st
3
+ from streamlit.components import v1 as components
4
+
5
+
6
+ def google_analytics():
7
+ current_dir = os.path.dirname(os.path.abspath(__file__))
8
+ html_file_path = os.path.join(current_dir, "google_analytics.html")
9
+
10
+ with open(html_file_path, "r") as f:
11
+ html_content = f.read()
12
+ components.html(html_content, height=0)