<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mike Wright | Engineering | 500 Startups alumni on Medium]]></title>
        <description><![CDATA[Stories by Mike Wright | Engineering | 500 Startups alumni on Medium]]></description>
        <link>https://medium.com/@mikewright_29201?source=rss-17117b3dc5d9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*2MydjNSn5-t-HGH-HoBLCw.jpeg</url>
            <title>Stories by Mike Wright | Engineering | 500 Startups alumni on Medium</title>
            <link>https://medium.com/@mikewright_29201?source=rss-17117b3dc5d9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 04:01:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mikewright_29201/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Welcome Mailers and Event Tracking for Smoke tests]]></title>
            <link>https://medium.com/@mikewright_29201/welcome-mailers-and-event-tracking-for-smoke-tests-7d738d2de222?source=rss-17117b3dc5d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d738d2de222</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[firebase-cloud-functions]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[landing-page-optimization]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Mike Wright | Engineering | 500 Startups alumni]]></dc:creator>
            <pubDate>Mon, 18 Sep 2017 14:57:41 GMT</pubDate>
            <atom:updated>2017-09-18T14:57:41.249Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>This article will teach you how to send a Welcome Mailer to users who signup via your Smoke test landing page and also track events so that you can use re-marketing to target that audience later. We’ll be using Firebase Database/Cloud Functions + Sendgrid + Facebook Analytics.</em></strong></p><p>So, you’re already capturing a potential audience using a smoke test (like <a href="https://medium.com/@mikewright_29201/the-importance-of-low-cost-startup-smoke-tests-248a4e0638fa">my previous article discusses which I recommended reading</a> before this article). Now it’s time to send them a welcome mailer so your audience know you’ll keep them posted on when the new product or feature has launched.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4AP59zp4a5pOWFOK012Z-Q.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@fredasem">Fredrick Kearney Jr</a></figcaption></figure><p>In order to send welcome mailers, without a high probability of them going to people’s spam folders, it’s <strong>best to use a third-party service.</strong> <a href="https://sendgrid.com/free/">Signup for Sendgrid</a>, it’s free to send up to 40,000 emails for the first 30 days and 100 emails per day free forever (no credit card needed).</p><p>Unfortunately, when creating Firebase Cloud Functions using third-party services (unless Google APIs), <strong>you’ll need to upgrade your plan to Blaze Plan (pay-as-you-go) account or a set Flame Plan (for $25 per month)</strong>. The Blaze Plan should still be pretty cheap unless you have a lot of signups but if that happens then pat yourself on the back cos your smoke test has been successful and you may very well have a good idea, product or feature that people actually want. <strong>To upgrade, login into the Firebase console and click Upgrade on the left side menu</strong>. You will need credit card details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*yYVVkJFuSloSvydN8kVwSw.png" /></figure><p><strong>Please note</strong> that you can send welcome mailers without third-party services like Sendgrid, Mandrill or Mailgun. You can find more about sending mailers with <a href="https://firebase.google.com/docs/functions/use-cases#notify_users_when_something_interesting_happens">nodemailer</a> (which uses Gmail’s SMTP with a limited sending quota). However, this article will continue with info about Sendgrid.</p><p><strong>CREATE A FUNCTION TO SEND THE WELCOME MAILER</strong></p><p>The code for creating your own landing page is <a href="https://github.com/michaeljwright/smoke-tests">available here</a> and a new <a href="https://github.com/michaeljwright/smoke-tests/tree/mailer-events-functions">branch is available with the code for this article</a> (Firebase Cloud Function). However, it’s <strong>easier if you follow the below instructions</strong> as you will only need to <a href="https://github.com/michaeljwright/smoke-tests/blob/mailer-events-functions/functions/index.js">copy the code from this file</a> for your Firebase Cloud Function.</p><p><strong>You should also </strong><a href="https://medium.com/@mikewright_29201/the-importance-of-low-cost-startup-smoke-tests-248a4e0638fa"><strong>read my article here</strong></a><strong> first which helps you setup your project and landing page smoke test which your Cloud Function will need.</strong></p><p>Let’s start by setting up Firebase Cloud Functions within your project folder (if you’re using source control like Git, it’s a good idea to branch off before doing this).</p><p>— Open Terminal (Mac) or Command Prompt (PC) and go to your local folder where your smoke test project is located.</p><pre>$ cd projects/smoke-tests</pre><p>— Run this command to log into Firebase (use the same email address as the one you originally used to setup Firebase).</p><pre>$ firebase login</pre><p>— Now initiate Firebase Functions to create the relevant folder/files.</p><pre>$ firebase init functions</pre><p>— In many cases, new features and bug fixes are available only with the latest version of the Firebase CLI and the Firebase SDK. It&#39;s a good practice to frequently update both the Firebase CLI and the Firebase SDK before you continue to make sure you project is fully up-to-date.</p><pre>$ cd functions<br>$ npm install firebase-functions@latest — save<br>$ npm install -g firebase-tools</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*gsBRDBUSRJ9t3FIfvSAZaQ.png" /><figcaption>Your local project folder should now look like this</figcaption></figure><p>— Now you need to edit the <em>index.js</em> file. You can do this by opening your favourite Text Editor (like <a href="https://atom.io/">Atom</a>) or simply TextEdit, and <a href="https://github.com/michaeljwright/smoke-tests/blob/mailer-events-functions/functions/index.js">copy the code here</a> to your local index.js file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rOhpOVqYAumBt_YpDVloaA.png" /><figcaption>Your index.js file should look like this</figcaption></figure><p>— You’ll need to edit <strong>lines 13–16</strong> (see screenshot above) in order to suit the needs of your smoke test (most important is to change the from name, from email and message. You can use as much HTML as you like but I recommend keep it as simple as possible for now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*zJlxKZcoAhpX1LQs8ThZMQ.jpeg" /><figcaption>Treat every user’s mailbox like above and you’ll be less disappointed by your open rates</figcaption></figure><p>— Save the <em>index.js</em> file and keep it open for now.</p><p>— Use Terminal or Command Prompt to add the Sendgrid package which will add the modules needed for your Nodejs code to work (make sure you are in your functions folder).</p><pre>$ npm install --save @sendgrid/mail</pre><p><strong>SETUP SENDGRID AND DEPLOY YOUR FIREBASE FUNCTION</strong></p><p>You may have noticed that we still need to edit the API key in the index.js file. To do this we’ll need to setup Sendgrid (so if you haven’t already please <a href="https://sendgrid.com/free/">sign up here</a>). Make sure you verify your account so that you gain a higher sending limit (click the link via the email that Sendgrid sent you).</p><p>— Once you’re back on the Sendgrid dashboard, click “Setup Guide” on the left menu (under your account) and then click “Start” next to “Integrate using our Web API or SMTP reply”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*EO0cCyIpSBb4j4JXNhjdHA.png" /></figure><p>— Then choose the Nodejs option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*UbRD0Y8JFaYV8OEkS9hKWw.png" /></figure><p>— Create a new API key by entering a name e.g. “my smoke test key” into the field where prompted and click “Create Key”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*VEMhZDVZgBgLq9Nox4P3UA.png" /></figure><p>— You can ignore the rest of the setup if you like (although I’d suggest continuing it later, especially for testing). We just need to copy the key that you just created and paste it into your <em>index.js</em> file on <strong>line 10</strong>. Make sure you save the file afterwards.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*m1U-mI4jTxtpf4jTk4DRsQ.png" /></figure><p>— Finally, it’s time to deploy your Firebase Function. To do this enter the command as follows:</p><pre>$ firebase firebase deploy --only functions</pre><p>You should now test your landing page by entering your email address into the input box which should add that email to the Firebase Database as well as send you an email. If you don’t receive an email (check your spam folder just in case) and also review the function logs by clicking “Functions” on the left menu and then “Logs” on the tabs.</p><p><strong>TRACKING YOUR USER EVENTS USING ANALYTICS</strong></p><p>It’s essential that you track your smoke test’s visitor activity (page views, bounce rate, acquisition metrics like where your audience comes from etc). However, it’s extremely important to also track specific events. Tracking events will allow you to eventually create funnels which explain your user’s flow of actions within your site. I’ll not be talking about funnels etc here, only the basics of tracking a single event but funnels are particularly useful for examining user drop-off from <strong>event a</strong> (user visits homepage) to <strong>event b</strong> (user looks at a product) to <strong>event z</strong> (user checkout/purchase).</p><p>Luckily, there are some amazing free tools to start tracking visitor activity and events. <strong>We will be using both Google Analytics and Facebook Analytics. </strong>You could ask, why add both analytics packages? Well, they are both great, free and serve slightly different purposes.</p><p><strong>First off, </strong><a href="https://www.google.com/analytics"><strong>sign up for Google Analytics</strong></a> and add the code snippet.</p><p>— To do this you can sign up using the same account that you used for Firebase. Once you’re signed in you need to <a href="https://support.google.com/analytics/answer/1042508?hl=en">create a new property</a> using your smoke test’s URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*aqrgcuj5tsm2vCKtvYkeig.png" /></figure><p>— You’ll then be provided with a snippet of code called <strong>analytics.js</strong> which includes your tracking code to collect data on visitor activity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H-OyR_4wXAGNxyNgMd_8cw.png" /><figcaption>The code that you copy should include your tracking code e.g. UA-123456789-1</figcaption></figure><p>— Copy the code (like the code above) into your project’s <em>index.html</em> file just below the <strong>&lt;body&gt;</strong> tag. Note that this file should already be in your <em>public</em> folder which you previously edited in my last article, not your <em>functions</em> folder.</p><p>That’s basically it! You have now added Google Analytics to your smoke test landing page. We still need to deploy the changes but first let’s add the Facebook Analytics code too. You can learn more about Google Analytics via <a href="https://analytics.google.com/analytics/academy/">Google Analytics Academy</a>.</p><p>— Now you need to sign into Facebook (using your personal credentials) and create a Developer account. You can <a href="https://developers.facebook.com/docs/apps/register/">follow the instructions here</a> (points 1 &amp; 2).</p><p>— Create a Facebook App Id (point 3). This is needed to track your visitors and the user events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*HL50CvC_1JavGqNXczSymA.png" /><figcaption>You should see a popup like this to create your Facebook App Id</figcaption></figure><p>— After filling in the above info you’ll see new instructions. You need to click on “Set up” under Analytics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*1T-whrNr3XkEyfPTOWd_Gw.png" /></figure><p>— Then click on “Web”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*w-LgxmVY0ra7Md5kWVAnQg.png" /></figure><p>— Take note of your Facebook App Id (which needs to be added to the code provided on the next step).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/191/1*I4MFhDeJbJ37R4VjQFzThg.png" /></figure><p>— You’ll be provided with a code snippet which you’ll need to copy and add to your <em>index.html</em> file below the <strong>&lt;body&gt; </strong>tag (just add it below the Google Analytics code you added previously).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*enRuq6KZf1A7qWIZIWTfRQ.png" /><figcaption>The code that you copy must include your Facebook App Id and version e.g. v2.8</figcaption></figure><p>Once you’ve added the code snippet to the <em>index.html</em> file, you need to track your first event.</p><p>— You can track an event with a small piece of code. Notice we have the event name called userSignup which is used to identify the event within Facebook Analytics later on.</p><pre>FB.AppEvents.logEvent(&quot;userSignup&quot;);</pre><p>— Your <em>index.html</em> should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*31ywBH5iDz2CIrP5LNHdig.png" /></figure><p>— Save your <em>index.html</em> file which now contains the code snippets (libraries) for Facebook Analytics and Google Analytics + the code to track your event.</p><p>— You need to deploy the changes you have made to Firebase project to make your changes available via your smoke test’s landing page. You can do this using the follow command in Terminal or Command Prompt:</p><pre>$ firebase deploy --only hosting</pre><p>— Go to your web address to check it out. To test, enter your email address into the input field which will now:</p><ul><li>add your email to the Firebase database</li><li>send you a welcome mailer</li><li>track visitors using Google Analytics</li><li>trigger a Facebook Analytics event</li></ul><p>It’s worth checking if the event is working (triggering) by <a href="https://www.facebook.com/analytics/">visiting Facebook Analytics</a> and selecting your Facebook App Id (App Name). Go to “Activity” and click “Event debugging”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cKCeMQkP0x2N7NgACi6R9Q.png" /><figcaption>Your event will be listed above and called “userSignup”</figcaption></figure><p>You can review other stats and visitor activity within Facebook Analytics, try clicking “Overview” to review your active users. It will also provide unique data such as age, gender, country, devices, stickiness (retention) and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8O_fQ2y7UpXp-x9Dy4mC2g.png" /></figure><p><strong>CREATE A TEST CUSTOM AUDIENCE FOR REMARKETING</strong></p><p>Creating and tracking <strong>events are also really useful for engaging your users</strong> in the future. It’s one thing having a database full of email address to let your audience know we your product is ready, but another thing to actually sign up and use the product. Facebook Analytics not only allows you to track engagement but also push ads to specific “custom audiences” which can be quickly created in just a few clicks. This method of advertising is called Remarketing.</p><p>— Go back to the <a href="https://www.facebook.com/analytics/">Facebook Analytics dashboard</a> for your project and click “Overview” and click “Edit” at the top of the page. Make sure your date range is from when you created the smoke test to the present date. Then click “Apply”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3r5TiwmOHD4dTFBn5UrvmA.png" /></figure><p>— Name your custom audience and then select an Advert account. Note that if you haven’t yet setup an Advert account you’ll be asked to enter your credit card details and other information which are needed to advertise on Facebook. Select “Last 180 days” and click “Create Custom Audience”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*45m4byXwbF8LR28px8rQ1Q.png" /></figure><p>Note that sometimes it doesn’t work when you click “Create Custom Audience”. This is usually due to your Adverts account not having billing setup. You’ll now be able to create new or deliver your existing adverts to your custom audience.</p><p>You can read more about creating events and funnels in <a href="https://www.facebook.com/help/analytics/935921203105136">Facebook Analytics here</a>. Note that Google Analytics also allows you to create events/funnels and <a href="https://support.google.com/analytics/answer/2611404?hl=en">build audiences (segments) for advertising</a> on their Adwords platform.</p><p>I hope you found this article helpful. I’ll be writing more about expanding your Firebase project, Facebook advertising, and automated drip campaigns soon!</p><p><strong>Please note:</strong> I have no affiliation with Google, Firebase, Facebook or Sendgrid but I do really like their services!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d738d2de222" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Importance of Low-cost Startup Smoke tests]]></title>
            <link>https://medium.com/@mikewright_29201/the-importance-of-low-cost-startup-smoke-tests-248a4e0638fa?source=rss-17117b3dc5d9------2</link>
            <guid isPermaLink="false">https://medium.com/p/248a4e0638fa</guid>
            <category><![CDATA[landing-page-optimization]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Mike Wright | Engineering | 500 Startups alumni]]></dc:creator>
            <pubDate>Fri, 08 Sep 2017 13:28:34 GMT</pubDate>
            <atom:updated>2017-09-18T15:06:05.920Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>This article will walk you through the process (and give you the code) to create a landing page smoke test and launch it live in around 15–20mins (for free).</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AIHaPaAy8MSe69cqphLV3A.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@fredasem">Fredrick Kearney Jr</a></figcaption></figure><p>It’s never been easier to learn how to code, create your own app and distribute your potentially misguided idea/feature to the masses. Problem is, in the words of a leather-clad Jeff Goldblum, “Yeah, yeah, but your scientists were so preoccupied with whether or not they could that they didn’t stop to think if they should”.</p><p>I’ve fallen into this creationist trap too! So listen, just because you have a startup idea (or great feature idea) and possess the ability to turn that idea into some fledgling app does not mean that you should. Or at least make sure you’ve done some heavy market research, competitive analysis, and <strong>almost certainly some smoke tests!</strong></p><p><strong>WHAT THE F**K IS A SMOKE TEST?</strong></p><p>I didn’t know either so don’t be too bothered. There was this guy called <a href="https://500.co/team/dominic-coryell/">Distro Dom at 500 Startups</a> who talked about them (he knows what he’s talking about trust me!) and they sounded like a pretty sensible idea. A “smoke test” is a way to test the waters of your idea within a given target audience to see if the shoe fits. Furthermore, the exact same thing can, and in many cases should, be done on a feature-level for an app or platform. Especially when it comes to a pivot, a new promotion, a new product or various other things. This way you’re not going to waste a bunch of time building something that nobody wants nor likes.</p><p>There are plenty of SaaS products out there which can help you do this (I’ve previously used both <a href="https://unbounce.com/">Unbounce</a> and <a href="https://instapage.com/">Instapage</a>) but they aren’t free and often still require integration of other marketing-related products.</p><p>So, if you like to get your hands dirty and have a little more control then read on.</p><p><strong>GETTING STARTED &amp; WHAT YOU NEED:</strong></p><ul><li>Basic knowledge of HTML/CSS (for editing some elements of the landing page)</li><li>A code editor (use <a href="https://atom.io/">Atom</a>, it’s free) or you can also use any Text Editor to edit HTML and CSS.</li><li>Install NodeJS locally (<a href="https://nodejs.org/">https://nodejs.org/</a>) so that you can setup and push code to Firebase (this is easier than it sounds)</li><li>Knowledge of Git (recommended but not essential)</li></ul><p><strong>DOWNLOAD MY TEMPLATE CODE:</strong></p><p>You can literally use any kind of landing page template for this but to make things easier I’ve created a simple template to get you started (and the rest of this article will be based on it cos I’ll be explaining how to edit it).</p><p>You can view the template as a <a href="https://smoke-tests-3e728.firebaseapp.com/">working demo here</a></p><p>You can clone my repo via <a href="https://github.com/michaeljwright/smoke-tests.git">https://github.com/michaeljwright/smoke-tests.git</a> or simply <a href="https://github.com/michaeljwright/smoke-tests/archive/master.zip">download the code here</a></p><p>You should now have a folder on your computer which you’ll be using to edit and deploy the final smoke test. It’s probably best to rename it and then place it within your Documents or a Projects folder rather than your desktop (sometimes working from your desktop causes permissions issues when deploying your smoke test).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DhIDhK7WL0p0WVU0vHVdyw.png" /><figcaption>The code files you downloaded should have a structure like this and you’ll learn how to edit them later</figcaption></figure><p><strong>HOW TO SETUP YOUR FIREBASE ACCOUNT:</strong></p><p>You need to have a place to eventually host your smoke test and let others access it. I love <a href="https://firebase.google.com/">Firebase</a> (owned by Google) and it has so many useful features, not to mention the fact that it’s free (at least to experiment on a Spark plan, low-usage tier).</p><p>— Go to <a href="https://firebase.google.com/">https://firebase.google.com</a><br> — Sign up for a new account or login (you won’t need any credit card details)<br> — Create a new project and call it what ever you want to smoke test (plus select the region which you think your audience will most likely be accessing from, but that doesn’t matter too much really).<br> — Click the cog icon (next to “Overview”) and then “Project Settings”<br> — Under the “General” tab take note of your <strong>Project ID</strong> and your <strong>Web API Key</strong>. You will need these for when you edit the HTML code. Your Project ID will also be your Web URL e.g. <a href="https://smoke-tests-3e728.firebaseapp.com/">https://smoke-tests-3e728.firebaseapp.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*USDi7Bz4YcH0qc3WlNAYaA.png" /><figcaption>See the Project ID above. Yours will be different so take a note of it</figcaption></figure><p><strong>HOW TO SETUP YOUR DATABASE:</strong></p><p>The great thing about Firebase is that it provides a very robust (but easy to use) database for free. Let’s set the basic structure of the database.</p><p>On the Firebase console (after you have created a Firebase project), click on “Database” on the left menu. The tab should already be on “Data”. Click on the 3 dots, then “Import JSON”. Find the file called <em>smoke-tests-db.json</em> and import it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3dDJ5hyJzwZ4-LyQ9cYW1Q.png" /></figure><p><strong>This is important so you must do this! </strong>Next, click the tab “Rules” which allow you to change which aspects of the database can be written to and read. Find the file called <em>smoke-tests-rules.json</em> and open it with Atom or your preferred Text Editor.</p><p>Now copy and paste whats in the file into the rules and click “Publish”. Your database rules will now be saved and you are ready to edit your HTML/CSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0N3EWsTpxCU0OsgoCksDnw.png" /></figure><p>Some of you are going to say that the above smoke test methods are open to spam etc but for something as basic as this I’m not sure it matters much.</p><p><strong>NOW YOU NEED TO EDIT YOUR PAGE (HTML/CSS):</strong></p><p>At a bare minimum you need to change a few lines of code in the <em>index.html </em>(located in the “app” folder of the code you downloaded) to make the project your own. Find the <em>index.html</em> file and open it in your Text Editor.</p><p>— Edit the title of your smoke test within the <strong>&lt;title&gt;</strong> tag on <em>line 9.</em></p><pre>&lt;title&gt;Smoke Tests — Landing page&lt;/title&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TXOOONfFTz_SzYchGE5piQ.png" /></figure><p>— Edit the header of your smoke test within the <strong>&lt;h1&gt;</strong> tag on <em>line 18</em> and sub-header within the <strong>&lt;h3&gt;</strong> tag on <em>line 19</em>.</p><pre>&lt;h1&gt;Smoke Tests Demo&lt;/h1&gt;</pre><pre>&lt;h3&gt;Test and Optimize your Startup Ideas&lt;/h3&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SzoQDsjxYAF5jwqv6yF9-A.png" /></figure><p>— Copy and paste your <strong>Web API Key</strong> within the quotation marks on <em>line 58</em>.</p><pre>apiKey: “AIzaSyCeE0EWQhN9gXl8BxjnfjtnicvE6y49Q7w”,</pre><p>— Copy and paste your <strong>Project ID</strong> adding it to <em>.firebaseapp.com</em> within the quotation marks on <em>line 59</em>. Save the address e.g. <em>smoke-tests-3e728.firebaseapp.com</em> for later as this will be your live address to promote your smoke test (when deployed) to your audience.</p><pre>authDomain: “smoke-tests-3e728.firebaseapp.com”,</pre><p>— Copy and paste your <strong>Project ID</strong> again adding it to <em>.firebaseio.com/</em> within the quotation marks on <em>line 60</em>.</p><pre>databaseURL: “<a href="https://smoke-tests-3e728.firebaseio.com/">https://smoke-tests-3e728.firebaseio.com/</a>&quot;,</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5WC9QajN99LDe4WNpepEjA.png" /></figure><p>If you now open the index.html file in your Internet Browser (aka <a href="https://www.google.com/chrome/browser/desktop/index.html">Chrome</a>) then you should see your creation. It will allow you to preview what you’ve done so far and allow you to test if the landing page is working before you deploy it to your audience.</p><p>On the landing page, enter an email address into the input field and click the button below it. You should then see a thank you message.</p><p>Now go back to the Firebase console and click “Database” on the left menu. You should now see another entry within your database. An entry will look like a bunch of random characters with a + sign next to it. Click the + sign next to each entry and you should see the email address that you entered.</p><p>We’re pretty much done editing. You can do a lot more editing than this including changing the style using CSS. To understand more about editing CSS you can <a href="http://learnlayout.com/">review this tutorial</a>.</p><p><strong>HOW TO PUSH THE CODE TO FIREBASE AND MAKE IT LIVE:</strong></p><p>You should now have edited your HTML/CSS and be ready to deploy your smoke test to Firebase.</p><p>Go to the Firebase console and click “Hosting” on the left menu, then click “Get Started”. You should now see a popup explaining how to deploy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*4L3AmKWfjKJqcHOiT4BqeA.png" /></figure><p>— First, you’ll notice it says you need to install <a href="http://nodejs.org/">Node</a>. It’s pretty easy if you follow the instructions carefully. A great article on <a href="https://www.codementor.io/mercurial/how-to-install-node-js-on-macos-sierra-mphz41ekk">installing Node is available here</a>. Also, make sure you update Node if you’ve previously installed it.</p><p>— If you run into issues it’s usually based on permissions. If you receive any errors from any of the commands below then change your permissions for Node (npm). Errors may include “TypeError: Buffer.alloc is not a function”. To resolve this issue <a href="https://docs.npmjs.com/getting-started/fixing-npm-permissions">please review the information here</a> and <a href="https://github.com/creationix/nvm/blob/master/README.md#usage">try using NVM</a>.</p><p>— Now go to your smoke test folder via Terminal (Mac) or Command Prompt (PC). Enter something like this:</p><pre>$ cd projects/smoke-tests</pre><p>— Once you’re inside your smoke test folder then run this command.</p><pre>$ npm install -g firebase-tools</pre><p>— The Firebase command line tools should now be installed. Now run the following commands (use the same email account that you signed up to Firebase when prompted):</p><pre>$ firebase login</pre><p>Follow the instructions: press space bar on the Hosting option, then select the project you created e.g. smoke-tests, then press enter to use the “public” directory, type “y” for rewrite all urls to /index.html. <strong>Then finally type “n” so you do not overwrite your index.html file</strong></p><pre>$ firebase init</pre><p>— You should now be ready to deploy. Enter the following command (this will push the code to your new Web address):</p><pre>$ firebase deploy</pre><p>Now go to your new web address to check it out e.g. <a href="https://smoke-tests-3e728.firebaseapp.com/">https://smoke-tests-3e728.firebaseapp.com/</a></p><p><strong>ADDING YOUR CUSTOM DOMAIN OR SUB DOMAIN:</strong></p><p>You can use your own domain (or sub domain is probably better) to replace the standard Firebase URL / web address provided. This will require you to <a href="https://www.godaddy.com/">own a domain</a> and be able to edit the DNS in order to point it to Firebase.</p><p>Simply go to the Firebase console and click “Hosting” on the left menu, then click “Connect Domain”. You should now see a popup explaining how to point your domain to your Smoke test landing page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b7w1ByHMZLLArKCK7kUtxA.png" /><figcaption>Click “Connect Domain” and follow the instructions</figcaption></figure><p><strong>A smoke test isn’t just about hosting a landing page and retrieving emails from potential customers. In my next post, I’ll be expanding the above for </strong><a href="https://medium.com/@mikewright_29201/welcome-mailers-and-event-tracking-for-smoke-tests-7d738d2de222"><strong>Welcome Mailers and Event Tracking for your Smoke tests</strong></a><strong>.</strong></p><p><strong><em>Please note:</em></strong><em> Parts of my template code were taken from </em><a href="http://www.fizerkhan.com/blog/posts/Startup-Landing-Pages-with-Firebase.html"><em>an article written by Fizer Khan</em></a><em> which needed to be updated for the latest version of Firebase (</em>4.1.3 <em>at the time of writing).</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=248a4e0638fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>