Biz Tips: How to Create Your Own Free Email Signup Form and Enjoy 100% Creative Freedom — For Static &…

Biz Tips: How to Create Your Own Free Email Signup Form and Enjoy 100% Creative Freedom — For Static &…

GROWTH:

How to Create Your Own Free Email Signup Form and Enjoy 100% Creative Freedom — For Static &…

How to Create Your Own Free Email Signup Form and Enjoy 100% Creative Freedom — For Static & Semi-Static Web Sites

Build a simple desktop & mobile signup form

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.

The Importance of Building an Email List

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.

How Does a 3rd Party Email Collector Work

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 (unfortunately, this isn’t possible on a site like Medium where you need to go through an enabler service https://embed.ly/providers).

Python + Free Web Hosting Service = Your Own Super Easy Email Signup Form

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.

Get an Account on PythonAnywhere

First get a free account on PythonAnywhere (no credit cards required, only a valid email address) and follow these steps:

Setting Up Flask Web Framework

Next, create a web server with the Flask web-serving platform. It is super easy to do. Under the ‘Web’ tab, click the ‘Add a new web app’ blue button. And accept the defaults until you get to the ‘Select a Python Web framework’ and click on ‘Flask’ and then the latest Python framework.

You will get to the landing configuration page, hit the green ‘Reload your account.pythonanywhere.com’ button and take your new URL for a spin:

You should see a simple but real web page with the ‘Hello from Flask!’ message:

Yep, you’re serving server-side web content for free! Now, let’s change that silly message with our email-signup form.

Setting Up Your Web Server

OK, now let’s create the real deal. Add a new folder in your files section called ‘email-signup-form’.

Create three files and paste the following code:

Right under the directory, create “main.py” and add the following code:

#!/usr/bin/env python
from flask import Flask, redirect, request, render_template
import logging, io, base64, os, datetime, time
from datetime import datetime
app = Flask(__name__)
@app.route("https://blog.markgrowth.com/amunategui_signup", methods=['POST', 'GET'])
def signup_page():
if request.method == 'POST':
email_param = request.form['email_address']
signup_page_param = request.form['signup_page']
if email_param is not None and signup_page_param is not None:
st = datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d %H:%M:%S')
# save to file and send thank you note
with open("email_repo.txt","a") as myfile:
myfile.write('Timestamp: ' + st + ' email:' + email_param + ' source:' + signup_page_param + 'n')

return redirect(signup_page_param)
@app.route('/')
def welcome():
return render_template('signup-plugin.html')

Create a “templates” folder and add the following file and code “signup-plugin.html” (and don’t forget to change all the links that state my sites or my PythonAnywhere accounts):










Data Exploration, Machine Learning and AI walkthroughs in Python and R, Hands-on

https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

https://getbootstrap.com/docs/4.1/examples/album/album.css" rel="stylesheet">
















https://amunategui.github.io/img/slim-data-become-a-datascientist.png"
alt="Become a Data Scientist Essential Tips" title="Become a Data Scientist Essential Tips"
style="padding:0px; border:0px; width:100%; height: 100%;" />

https://amunateguit.pythonanywhere.com/amunategui_signup" method="POST">
Hey there, sign up for the latest updates and I'll personally send you my free eBook:

https://manuelamunategui.pythonanywhere.com/static/thanks.html" />


Thanks for your interest in the amunategui.github.io blog!! Best, Manuel



https://amunategui.github.io/img/github.png" alt="The Amunategui.GitHub.io Applied Data Science Portal"
title="The Amunategui.github.io Applied Data Science Portal" style="padding:0px; border:0px; width: 75%; height: 75%;" />



And create “thanks.html” under the “templates” folder as well:











Data Exploration, Machine Learning and AI walkthroughs in Python and R, Hands-on

https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

https://getbootstrap.com/docs/4.1/examples/album/album.css" rel="stylesheet">













https://amunategui.github.io/img/slim-data-become-a-datascientist.png" alt="Become a Data Scientist Essential Tips"
title="Become a Data Scientist Essential Tips" style="padding:0px; border:0px; width:100%; height: 100%;" />

You're singup up!! Thanks for your interest in the amunategui.github.io blog!!

Best, Manuel

Hit your back key to get back to your reading...

https://amunategui.github.io/img/github.png" alt="The Amunategui.GitHub.io Applied Data Science Portal"
title="The Amunategui.github.io Applied Data Science Portal" style="padding:0px; border:0px; width: 75%; height: 75%;" />




Reset Your Web Server

That’s the big green button we clicked on earlier and then travel to your “signup-plugin.html” page.

That’s it!!! You can embed the “signup-plugin.html” code directly into a page like I did on “amunategui.github.io”.

And to check out your emails:

OK — Sign up to my email group below and I’ll send you my free eBook on tips to becoming a (better) data scientist (and signup even if you aren’t interested in the eBook). Thanks for reading!!

https://medium.com/media/0ce791739e130fda960e5f6bb8dc025a/href

Thanks for reading The Marketing & Growth Hacking Publication

Follow us on Twitter. Join our Facebook Group. Subscribe to our YouTube Channel. Need a sponsored post written? Contact us.

If you enjoyed this story, please recommend 👏 and share to help others find it!


How to Create Your Own Free Email Signup Form and Enjoy 100% Creative Freedom — For Static &… was originally published in Marketing And Growth Hacking on Medium, where people are continuing the conversation by highlighting and responding to this story.

Join The Rockstar Entrepreneur Community Now: Start Rockin Now

Leave a Reply

Your email address will not be published. Required fields are marked *

Situs togel slot online Situs Togel Online Terpercaya Situs togel 4D Toto Macau Situs Toto Togel Macau Bandar togel Kaskustoto situs togel Online Situs Togel Macau Situs Togel toto hk 4D situs toto togel 4d situs toto togel 4d