How to add Google Analytics or JS code in a Streamlit app?

With streamlit 0.75+, you can add google analytics directly in the script file using components iframe. You can check my example here: COVID-19/app.py at master · QuocTran/COVID-19 · GitHub No need to change static file index.html .

4 Likes