Friday, March 20, 2015

Trio of Startup Books: Hooked, Traction and Growth Hacker Marketing

Software is truly eating the world including marketing. A successful new company brings their product or service to market differently now. This is especially true because most products are software or require software infrastructure.

In this changed environment there are a few new terms to describe successful marketing methods. Reading these books about these methods will change your view of marketing. Note that the links are to my Amazon Associate account - that I rarely use - but I wanted a easy way to show the book covers. The books are:

  • Hooked: How To Build Habit-Forming Products by Nir Eyal
  • Traction: A Startup Guide to Getting Customers by Gabriel Weinberg and Justin Mares
  • Growth Hacker Marketing by Ryan Holiday

Hooked





Nir Eyal's book and workbook are guides to building habit forming products. He examined many different companies including Pinterest, Twitter, Instagram and others. This resulted in the Hook Model. The four components are: Trigger, Action, Investment and Variable Reward.

The book is recommended because with this model, you can examine any technology and see how small changes can make it habit forming and thus more profitable. One of the great aspects of the book is that he examines the ethical aspects of using this model. It is great to go viral but the profit is in customer retention which requires making your product a habit.

You can receive the workbook free by signing up for his newsletter. I bought the Kindle version.





Traction

The Bullseye Framework will help you focus on the best method to get traction for your startup. The book has chapters on 19 channels (eg Viral Marketing, Pr, etc.). There are interviews with 40 founder about traction and case studies validate the work. Even if you've already decided on a channel, it is worth considering others.

However, the book makes a convincing case to focus on one channel while the framework makes you consider all. It is a good exercise to really consider all as it helps define your product with some perspective. For my app viral marketing is my focus. The chapter on viral marketing helped with some specific suggestions on how to measure if the strategy is work.

The book's website will give you the first three chapters free when you subscribe to their newsletter. Also links to other reviews. I own the hard cover.





Growth Hacker Marketing

Ryan Holiday comes from a marketing background and convinces us that Growth Hacking is replacing traditional marketing. He ties it into "Product Market Fit" in such a way that Product Market Fit now makes more sense. And I must now emphasis AB testing in my plans.

More than any other blog, article or book, Growth Hacker Marketing validate for me that I'm on the right path in creating my apps. It is not "build it and they will come" but build it and growth hack it without the traditional marketing and advertising.

The book's website will give you a sample chapter and bonuses. There is also a course available. The author has also written an article on 99u called "A Creative Guide to Growth Hacking" which is a good synopsis of the book.

I own the softcover Revised and Expanded version.


So which book do you buy or start with? While I recommend buying all three, I've read them in the order presented above. However, I'd recommend starting with Growth Hacker Marketing.

Obviously, as you can follow the links above, there is alot about these topics available for free on the web, so in some sense the books are optional. But I highly recommend the ideas and concepts that they discuss. Happy growth hacking, getting traction and hooking your users.

PS The app I' working on is http://reading.email - a better way to read newsletters. In alpha.


Tuesday, March 17, 2015

Hapijs for Proxy Routes and mapUri

One of the strengths of Hapijs is the proxy route. This involves making a request to your Hapijs server and having it make a request to another server. Actually a reverse proxy.

First will be a simple, hardcoded proxy. Next example uses the Url query string. Final example uses Url path.

Hello World Proxy

Sometimes a proxy to an absolute url is all that is needed. It is very simple:


var Hapi = require('hapi');
var server = new Hapi.Server();
server.connection({
    host: 'localhost',
    port: 8882
});
server.route({
  method: 'GET',
  path: '/',
  handler: {
    proxy: {
      uri: 'https://www.google.com/search?q=Hello+World'
    }
  }
});

In your browser go to: http://localhost:8882 to see the Google search for "Hello World".

Proxy Using Url Query for Input

But what if you want to search on a query besides "Hello World"? Or need the flexibility for something else. Hapijs provides a mapUri method for proxy to map the request uri to the proxied uri.

This means that your code can take the url, or parts of it, from a request and proxy to a modified uri. In our case the request will have a query ('q=hello+world') that we want to use in the proxy request. Add this route to the above code:


server.route({
  method: 'GET',
  path: '/search',
  handler: {
    proxy: { //https://www.google.com/?gws_rd=ssl#safe=active&q=hello+world
      mapUri: function(request, callback){
        var url='https://www.google.com/search?q='+request.url.query.q;
        callback(null, url);
      }
    }
  }
});

The browse to http://localhost:8882/search?q=hello+world to see the same Google page as above. Now browse to http://localhost:8882/search?q=hello+galaxy to see a search for "Hello Glaxay".

Proxy Using Url Path for Input

What if you wanted the proxy to change based on the path instead of using the query part of the url? For example, http://http://localhost:8882/hello+universe. Add this code to the above:


server.route({
  method: 'GET',
  path: '/{query}',
  handler: {
    proxy: { //https://www.google.com/?gws_rd=ssl#safe=active&q=hello+world
      mapUri: function(request, callback){
        var url="https://www.google.com/search?q="+request.params.query;
        callback(null, url);
      }
    }
  }
});

Now browse to http://http://localhost:8882/hello+universe to see a search for "Hello Universe". Or for something more down to earth: http://http://localhost:8882/earth.



Uses for Proxy


There are many ways to use the proxy. One example is to avoid Cross Site Scripting (CORS) issue. Or when replacing a legacy system a Hapijs server could be stood up with every route being a proxy to start. Then replace one route at a time with new Hapijs code. And of course, using an API where some manipulations is needed.

Conclusion

This tutorial shows how simple it is to do proxies with Hapijs with three short examples. There are several more options not covered above. See the Hapijs documentation for more details.

Note: Hapijs 8.4 was used for the above code.


Other Tutorial

Getting Started With Hapijs and Testing