How to Build an Email Subscriber List by using Firebase


Build an Email Subscriber List by using Firebase

In this Tutorial, we are going to see the Method to Build an Email Subscriber List by using Firebase.

Recently, I am Started Working on Google Firebase for adding Some Features on My Android Application.

I made some Experiments on Google Firebase it having a Lot of Features

Personally, I am using Firebase for

  • Personal Contact Storage
  • Important file and Image backups
  • Host the Static sites and Gif Images
  • Web Push Notification

Still, My Experiments are going in between I got this awesome Concept – Build an Email Subscriber List by using Firebase RealTime Database.

Firebase Email Subscription Widget

it is an Simple Concept Collect your Website/blog readers Email & Names on Firebase real-time Database via HTML Input Form (PHP cURL + POST Method).

Methods using

  • Firebase Real-time Database for Collect the user’s data
  • PHP cURL Method – send the user’s data into Firebase Real-time Database
  • JSON and PHP Post Method

Setup and Demo Video

Firebase project Setup

Build an Email Subscriber List by using Firebase

  • After Opening Database Go to Database RULES

Build an Email Subscriber List by using Firebase

  • Update the Default Database Auth Rules
{
 "rules": {
 ".read": "auth != true",
 ".write": "auth != true"
 }
}

“.read”: “auth != true”, – Read our Data’s in JSON Format – https://example-project.firebaseio.com/subscribers.json if you don’t want replace it with null

“.write”: “auth != true” – Give Permission to write the Data’s it Must be true then only user’s input data are Stored in the Real-time Database.

Build an Email Subscriber List by using Firebase

Email Subscription Widget Setup

  • Create a New Folder on your Web server Named as subscribe
  • Download this Widget From Github


  • Upload this widget on Newly Created Folder – subscribe
  • Visitor’s Subscribe URL – http://example.com/subscribe
  • open index.php
//replace https://example-project.firebaseio.com with Firebase Realtime DB URL - DON'T REMOVE /subscribers.json
$url = "https://example-project.firebaseio.com/subscribers.json";
  • Replace it with your Firebase real-time Database Storage URL
  • That’s all
  • Next, Save the settings and Start Building your Blog/website Email Subscriber List
  • All the Collected Emails & Names are Stored on Firebase Real-time Database
  • You can Export the collected Email’s as JSON Format only – there are plenty of online sites available for converting the JSON into CSV format else you can do it manually

Gist

Pros & Cons

Pros

  • Real-time database Storage
  • Easy to Setup
  • $0 Investment

Cons

  • No CSV Export Option
  • 1GB Storage only (If you Want More you need to Upgrade the Plan)

From the Editor’s Desk

Hope this method will Help you to Build an Email Subscriber List by using Firebase RealTime Database.

Our Plugin was Hosted on Github If you having Any Concept & ideas for this Firebase Email Subscription Widget then Contribute on Github

If you need any Help in Setup Just drop your Comments Here I will Guide you.

 



Was this article helpful?
Thanks!

Your feedback helps us improve Allwebtuts.com