I've been blogging for years on amunategui.github.io, a portal showcasing practical machine learning and AI walkthroughs. This is a "GitHub Pages" hosted website. Every GitHub account automatically gets one free web site to showcase whatever they want and mine is all about data science.
Because we all know the importance of building niche email lists, I've been using FormSpree and Upscribe, all external HTML plugins to collect visitors' emails (and recently heard of Neil Patel's minimal HelloBar) that helped me collect a few hundred emails over the years. FormSpree is great and I have zero complaints about them - except that it isn't mine. See, they send me an email whenever somebody signs up and I would rather have it directly stored in a list or database on my end. Also, and more bothersome, is that I have to confirm each new page that uses the service. This isn't a huge deal until you have hundreds of web pages (like my blog does). So I got lazy and surrendered to only collecting emails on the main landing page - major bad move! Most of my readers find the actual walkthrough page they want to visit directly from Google, bypassing the main landing page altogether… Yes, for a website that sees 10k sessions a month, that's a lot of missed opportunities for making new friends.
A form-based email collector is simply a snippet of HTML you put on your static website that will give you offer server-side benefits such as handling user submissions and storing them. Because a lot of the free websites are only static (think GitHub), you can't process any input from users unless you use one of these 3rd-party services. The below solution will only work if you have control over HTML tags (this isn't possible on a site like Medium where you need to go through an enabler service https://embed.ly/providers).
The two things that may dissuade people from bothering with this are the complexity of server-side coding and the cost of web hosting - what if both of those issues went away? I'm going to show you how trivial it is to create your own signup form and for zero cost. The coding is really trivial, all you need are a few lines of Python and HTML to get this going. The hosting can be done through PythonAnywhere, a great web hosting site that focuses on Python technologies like Flask, the simple web-serving library we'll use. If you aren't planning on signing up thousands of emails per day, the free-tier on PythonAnywhere will work just fine.
First get a free account on PythonAnywhere (no credit cards required, only a valid email address) and follow these steps: