Deploy Streamlit with Google Analytics on custom domain

Hi,

I currently have my Streamlit app deployed on Heroku on my custom domain. I am interested in adding Google Analytics and that is not supported by Heroku.

I did read the thread on this forum about adding GA by editing the static index.html file however, that only works on my local deployment.

Last year, I tried to deploy on AWS EC2 and with a lot of work, I got it to work using Nginx reverse proxy to change the default port in order not to show www.cigars-rec.com:8501.

I was charged $100 by AWS after one week because they said I used a resolver. I guess the resolver is how you direct a custom domain to the virtual server?

I have 3 questions:

Is the above the easiest way to deploy on custom domain with ability to add GA?

Is there a way to have a custom domain on a virtual server without using expensive services like AWS resolver?

Last, how do you keep the app running after closing the terminal window? I read something about TMUX however, I heard that there was a way to trigger the app to run anytime the domain is accessed.

Thank you in advance for any assistance.

@Marc possibly you have some insight?

1 Like

Hi @chefnewman

Don’t have any insights but would also like to learn. So listening in.

@Marc apparently you can add it in an iframe without editing the index.html page.