The Science Behind Viral Apps (and How to Build One)

Josiah Humphrey
Nov 3, 2017 · 21 min read
Image for post
Image for post
Originally published on

Despite a combined 5 million apps currently available for download on Google’s Play Store and Apple’s App Store, smartphone users allocate approximately 85% of their total usage time to 5 apps or fewer.

Plus, nearly 4 out 5 users never use an app again 72 hours after first installing it. Clearly, the vast majority of mobile app companies are failing to retain their users.

In contrast, successful mobile app companies create engaging, habit-forming apps that spread virally and help create massive new user communities.

But how, exactly, can you create an addictive, viral app? In this article I’ll discuss the psychological science behind building truly addictive mobile apps.

Mapping Out the Terrain

Image for post
Image for post

I recently emphasized the importance of embracing a holistic strategy to creating mobile apps:

“The key to building a high quality, robust, and addictive app that resonates well with end users is to explicitly approach the developing, testing, launching, marketing, and selling of the app with the intention of creating an in-demand product within a hungry market that solves a pressing customer pain and organically encourages viral and habitual engagement”.

In a nutshell, these core dynamics represent the major elements on which contemporary tech startups must focus if they wish to build and sustain high-growth businesses.

Over the past 4 or 5 months, we here at Appster have published a number of highly detailed articles that explore mobile app creation from a variety of business and development perspectives.

Today’s article will focus primarily on the ways in which startups can utilize the psychological science behind habit formation to develop addictive apps that users will both love and willingly share with others.

In discussing these various ideas and tactics, I’m taking for granted that you have already familiarized yourself with the following core principles — if you’re not yet acquainted with these key ideas then be sure to click the links below and read through the corresponding Appster articles:

  1. Addictive mobile apps effectively solve pressing user problems (e.g., the need for interpersonal connection) and respond to significant market demands (e.g., demand for an easy-to-use, location-based mobile dating service) (1, 2, 3);
  2. Viral apps are fundamentally rooted in minimum viable products that have been “stress-tested” in the real world (1, 2, 3);
  3. Successful apps are released and marketed to the right populations at the right times, i.e., the companies behind these apps intentionally target specific users (early adopters) at first and only afterwards “cross the chasm” (into the mainstream) when appropriate (1, 2, 3);
  4. Viral apps are typically based on one or more effective monetization strategies; and
  5. The startups behind addictive apps regularly analyze (and respond to) various key financial and mobile-specific metrics.

With these preliminaries now sorted out, let’s explore the meaning of “virality” from the standpoint of app popularity.

We’ll then delve into the details of the psychology (and neurobiology) of habit formation, using this understanding to then guide a discussion of building and marketing addictive apps.

What Is “Virality”?

Image for post
Image for post

What do we mean when we talk about something “going viral” or achieving “viral growth”, or indeed an app becoming a “viral app”?

“Virality”, which is a key driver of a company’s capacity to scale operations, can be thought of in two ways:

  1. As a general term applied to the Internet: “The tendency of an image, video, or piece of information to be circulated rapidly and widely from one Internet user to another; the quality or fact of being viral” (source); and
  2. As a specific term applied to customer acquisition: “A phenomenon in which users acquire other users, usually through some referral mechanism built into the product on offer” (source).

We can understand the essence of virality as it applies to customer acquisition by examining conventional vs. non-conventional marketing funnels.

The conventional marketing funnel: businesses pay lots of money (e.g., via advertising) to drive traffic towards their products (websites, apps, etc.) in an effort to convert a small fraction of that traffic into active, paying customers.

The viral marketing funnel: instead of a large number of potential customers transforming into a small number of actual customers, a small amount of actual customers help bring in exponentially more customers through the organic use and sharing of the product or service (e.g., app).

Viral marketing works in such a way that each new user brings in one or more new users, who then bring in one or more new users themselves, and so on:

Image for post
Image for post

Typically, viral growth follows from either the organic use of a product — e.g., a new Facebook user naturally suggesting that his friends give the social media site a try — and/or the operation of a referral system — e.g., a Lyft user circulating a referral code that allows her and the person who applies her code to each cash-in a free ride.

More technically, viral growth is often identified with a “viral coefficient” above 1.0.

Your viral coefficient represents the number of new users that each existing user brings over to your company.

For example, a viral coefficient of 3.0 (which, by the way, is quite high) means that on average:

  • 100 users refer an additional 300 users;
  • Those 300 users then bring over 900 more users, and so on.

Why is a viral coefficient above 1.0 so important?

Because, as I’ve noted in the past, “if your startup can maintain a viral coefficient above 1.0 then you don’t need any sort of substantial marketing budget to keep growing”.

The kind of viral growth we’re discussing here, i.e., a situation in which “word of mouth” brings exponentially more and more users into the growing user base, is captured by the notion of “viral loop”.

This term describes the process through which a user progresses from first encountering your product to then being incentivized to recommend it to others (sources: 1, 2, 3).

Here’s a simple illustration of the viral loop process by Tapdaq’s Sam Hutchings:

Image for post
Image for post

As the following diagram demonstrates, viral growth entails:

  • Buying some initial traffic to get eyes on your app and thereby acquire a few initial users;
  • Building a habit-forming app (more on this shortly!) that convinces your initial users to start using your app (i.e., “activation”);
  • Incentivizing your initial users to refer additional traffic to your company at no cost to you; and
  • Repeating the process over again.
Image for post
Image for post

The key to establishing an effective viral loop is offering one or more features or rewards that incentivize(s) your users to share your app with others.

Rather than relying on annoying ads and other forms of intrusive spam, you should offer your users something of value.

Valuable incentives are tangible and immediate; they make your users willing to bring their friends, family, and/or colleagues over to your app.

It’s vital that you streamline the reward-granting process by making it as easy-to-understand and easy-to-complete as possible.

You will absolutely lose out on opportunities to grow your user base if you make your reward activations too confusing to carry out.

Dropbox and Uber are two examples of startups that have successfully utilized viral marketing to significantly increase the sizes of their user bases and the popularity of their products/services.

When Dropbox first launched, the file-sharing website offered free additional storage space to all users who referred others to the platform, helping the company acquire 1 million users in the first 7 months of its operations.

Uber’s dual-side referral code system — whereby person A receives a free $10 ride credit when person B, who also gets a $10 ride credit, signs up for Uber using person’s A unique referral code — is so successful that approximately 50% of new Uber customers arrive via referral.

Uber’s dual-side referral code system:

Image for post
Image for post

Everything that I’ve discussed so far is based on the assumption that you have, in fact, built an app that people actually want to use.

If your users have no desire to use your app, let alone to spread it amongst their friends, then it doesn’t matter how enticing you make your reward offers because nobody will care and your app will fail.

For instance, what use would a free $10 Uber ride coupon be if the Uber app itself constantly crashed on your phone? No use at all, obviously.

We can think of efforts to incentivize users to share your app with others as analogous to the final decorations of a dessert: no amount of frosting, however pretty or tempting, will lead somebody to willingly bite into a horribly tasting cake.

Similarly, you need to build a thoroughly “tasty” app, i.e., one that your users simply can’t be without, before you try and encourage your users to recruit others to your app.

Only then should you concentrate on implementing marketing efforts that can help you achieve viral loops.

We must, therefore, explore the psychology of addiction in order to develop an understanding of how to create habit-forming apps that your users will truly love.

The Psychology of Habit Formation

Image for post
Image for post

Your number one objective when designing and developing your app should to be to create an app that your users will use habitually.

This may sound obvious but it’s worth stating outright: you must develop an app that your users will return to again and again and again.

Think Facebook, Instagram, and Spotify: are these single-use apps? Or do people spend hours on them everyday?

When you post a status update to Facebook, share a new photo on Instagram, or listen to a single song on Spotify do you then close the app for good and refuse to return to it for months at a time?

It’s highly unlikely that you do.

Instead, you browse your friends’ status updates, comment on and/or like other people’s pictures, listen to similar songs or albums to the current track, etc.

You know how people grab their phones as soon as they wake up in the morning and immediately open their preferred news, social, financial, etc. apps?

That’s precisely the kind of habitual use — the kind of “addiction” — for which you should be aiming.

This isn’t a matter of trying to trick or manipulate people into behaving against their wills or their best interests.

Rather, it’s about understanding human psychology (and neurobiology) so as to create a product that simultaneously offers your users genuine value and makes it possible for your startup to operate and grow as a business.

The English Oxford Living Dictionary defines “habit” as a “settled or regular tendency or practice, especially one that is hard to give up”.

Charles Duhigg, author of The Power of Habit, contends that “a simple neurological loop resides at the core of every habit, a loop that consists of three parts: a cue, a routine and a reward”.

Image for post
Image for post

The cue, i.e., trigger, prompts or stimulates the behaviour in question; the routine represents the habitual action itself; and the reward is “how our neurology learns to encode this pattern for the future” (source).

In order for a habit to take hold, all three elements must be present.

Hazel Gale offers a more detailed explanation of Duhigg’s model, noting:

“The cue is the thing that triggers the habitual behaviour. It could be a negative emotion like loneliness, boredom or stress. Or, it could be a certain situation, a group of friends, the time of the day, etc.

The routine is the habit itself: the biting of nails, smoking of cigarettes, or walking over to the fridge and eating a massive lump of cheese.

The reward could be anything pleasurable. It might be as obvious as the physical stimulation of nicotine or sugar. It could be connected to a feeling of acceptance, belonging or achievement; or it could simply be an excuse to get away from your desk.”

This is a very rudimentary overview of habit formation; let’s get a little more technical.

Over the millennia, human beings have developed a variety of systems in the brain that function so as to motivate us to do certain things, including eating, sleeping, and procreating.

Specifically, our ape brains are setup to encourage us to seek out activities that (hypothetically) contribute to our abilities to live and flourish, with various neurological (i.e., chemical) rewards existing to compensate us when we do such things.

This, in short, is why activities like sex and eating are pleasurable experiences (i.e., this is nature’s way of rewarding us for staying alive and passing on our genes) (source).

Now, in order to truly understand the dynamics of habit formation and addiction we must discuss the basics of two key neurotransmitters.

(A “neurotransmitter” is a brain chemical that communicates information between neuronal synapses — essentially, it helps different parts of the brain communicate amongst themselves).

The first noteworthy neurotransmitter is “dopamine”, which:

“…helps control the brain’s reward and pleasure centers. Dopamine also helps regulate movement and emotional responses, and it enables us not only to see rewards, but to take action to move toward them.”

The dopaminergic system is often haphazardly referred to as the brain’s “pleasure sensor” but this isn’t an entirely accurate description.

Dopamine operates primarily in the leading up to the experience of pleasure:

“Dopamine causes seeking behavior. Dopamine causes you to want, desire, seek out, and search. It increases your general level of arousal and your goal-directed behavior. The dopamine seeking system keeps you motivated to move through your world, learn, and survive. It’s not just about physical needs such as food, or sex, but also about abstract concepts. Dopamine makes you curious about ideas and fuels your searching for information” (source).

Dopamine is about wanting: it propels you to take action, to pursue goals, to “go after something” in the anticipation of the expected rewards.

The second important class of neurotransmitters is “opiates”, which are the “feel good” chemicals that your brain produces when you actively experience something pleasurable (such as eating a bowl of tasty ice cream).

Opiates are all about liking and achieving: they are the product of actually experiencing pleasure, i.e., the resultant state of euphoria that arises when you accomplish something (sources: 1, 2).

Both dopamine and opiates are implicated in habit-forming behaviours:

  • The first, the “wanting” system, represents the drive to seek something out (e.g., driving to the bank, taking out money, and then visiting a convenience store to purchase a pack of cigarettes or loading up a web browser, typing a phrase or question into a search engine, and trying to locate a specific piece of information); and
  • The second, the “liking” system, represents the satisfaction of the craving (e.g., the pleasurable sensations experienced after inhaling the cigarette smoke or finding the information you need).

When it comes to creating addictive apps, it’s important to recognize that the dopaminergic system is stronger, i.e., it generates more of an influence on our behaviour, than the opiod system.

In other words, people are driven more by the seeking out of pleasure than they are by the actual experiencing of pleasure itself.

Evolution is such that we human beings have a stronger compulsion to search for things — to solve puzzles, discover new information, plan out courses of action, compile patterns, etc. — than to realize objectives (source).

There’s one final matter of psychology/neurobiology that we need to address before we can move onto exploring the implications of all this science for building addictive apps that go viral.

Dopamine exerts the most influential effect on our actions when we engage in activities that are rife with unpredictability and anticipation.

In simple terms, our brains release greater amounts of dopamine, i.e., motivate us more feverishly, when we try to achieve objectives with unclear chances of success than when we have a solid understanding of the likelihood of the outcome:

“Because arousal decreases with frequent and predictable exposure, scientists now understand that reward anticipation is a much more powerful mediator of strong addictions than outcome evaluation of the stimulus themselves” (source).

In other words, the more times you do something, the less exciting the process becomes precisely because you can accurately anticipate the outcome.

Neuroscientist Robert Sapolsky conducted experiments on monkeys that bear this out.

Sapolsky trained his monkeys to recognize that if they pressed a lever — i.e., the “work” — ten times after a nearby light came on — i.e., the “signal” — then a food treat — i.e., the “reward” — would be dispensed following the tenth lever press.

That is: see lightpress lever ten timestreat is dispensed.

Sapolsky then measured the monkeys’ dopamine levels and found the following pattern:

Image for post
Image for post

This graph shows that the monkeys started releasing dopamine immediately after the signal (i.e., the light) appeared and then sharply stopped releasing dopamine after they began pressing the level (i.e., the work).

This shows that dopamine is concerned primarily with seeking, not with earning or achieving.

What’s even more interesting, however, is what happened when Sapolsky modified the experiment such that the monkeys received treats only 50% of the time after pressing the lever:

Image for post
Image for post

Amazingly, this reveals that the monkeys’ dopamine levels shot up dramatically when they were unsure as to whether they’d receive a treat after performing the work.

These results demonstrate that apes (including us humans!) and ape-like creatures respond far more strongly to novel and unpredictable stimuli than to familiar and expectable occurrences.

You need only consider the excitement and nervousness you feel the first few times you go on a date with a new romantic partner and compare those sensations to what it’s like to be in a years-long relationship to recognize the validity of this insight.

In order to appreciate the significance of this crucial scientific finding — i.e., that human beings seem to be more motivated by seeking, searching, and planning activities and by experiencing novelty and unpredictability than by accomplishing activities and by encountering predictability and familiarity — let’s now look at psychologist and entrepreneur Nir Eyal’s influential ideas concerning the building of habit-forming products.

The “Hook Model” of Habit-Forming Products

Image for post
Image for post

Applying the scientific principles and findings we’ve been discussing so far to the world of business, Nir Eyal outlines a model for “manufactur[ing] desire by guiding users through a series of experiences designed to create habits”.

Eyal calls these habits “hooks”, and they’re intended to produce self-generating feedback loops in which users become more and more likely to “automatically” use products or services (i.e., in a reflex-like manner).

The Hook Model contains four key elements, each of which contributes to the development of a user’s “addiction” to a product or service:

  1. Trigger: that which stimulates action. Triggers come in two forms. External triggers, which arise in a person’s environment. Examples: advertisements, emails, and Internet links. Internal triggers, which emerge from within a person. Examples: feelings of hunger, boredom, and curiosity. Eyal argues that the goal, from a business perspective, is to utilize external triggers (e.g., advertisements) to naturally and progressively form internal triggers within users (e.g., the “instant” desire to eat a certain kind of food whenever hungry).
  2. Action: the hoped-for behaviour. Examples: clicking on an online advertisement or opening up a just-received email. Users must be both motivated and able to take the intended action. Motivation is driven by one or more incentives, e.g., the desire to figure out a problem, satisfy curiosity, or receive a reward. Ability is determined by how easy or difficult it is to complete the given action, e.g., completing three vs. twelve steps before being able to use a downloaded app.
  3. Variable reward: the unpredictable/random compensation for taking the action. Drawing explicitly on research showing that dopamine increases most dramatically when novel and unexpected circumstances arise (see above), Eyal insists that “[v]ariable schedules of reward are one of the most powerful tools that companies use to hook users”. Examples: music-streaming apps that offer endless varieties of songs, artists, and albums, Twitter’s auto-generated suggested followers links, or Pinterest’s ever-changing display of “pins”.
  4. Investment: further behaviours that encourage a deeper, longer-lasting engagement with the product or service. This is all about convincing users to do something that increases the likelihood that they will continue using your product, share it with others, and consistently pass through the entire hook process over and over. The objective is to eliminate as much friction as possible in order to incentivize users to “stick with” your company. Eyal: “Inviting friends, stating preferences, building virtual assets, and learning to use new features are all commitments that improve the service for the user”. Examples: building up a collection of photos, comments, and likes on Instagram or joining Facebook groups and contributing to discussions (source).

Here, then, is a summary of Eyal’s hook model:

Image for post
Image for post

As the following image shows, the most popular apps today all utilize the hook method for creating habit-forming apps:

Image for post
Image for post

(Note: the above two images come from our 20+ page, highly detailed, expert white paper on creating addictive apps!)

Putting It All Together: Practical Guidelines

Image for post
Image for post

Now that we’ve traced through the theoretical principles underlying addiction and the key business models behind the creation of habit-forming apps, let’s end this article by discussing some practical strategies you can use to develop the next truly “addictive” app.

First, include as much novelty, unpredictability, and puzzle-solving elements in your app as is reasonably possible.

As we’ve discussed, human beings are especially motivated by seeking, searching, and planning activities, by the desire to figure something out, particularly when an unanticipated challenge or confusion arises.

Your app, thus, should capitalize on the fact that “[w]e are the most relentlessly curious species on the planet” (source).

If you’re building a mobile game then there are many different ways to introduce new, surprising elements into the experience, including having users discover special items, encounter unexpected bosses, and receive unanticipated rewards for completing tasks.

Non-Game apps can capitalize on novelty and problem-solving as well.

Indeed, “slaying new messages in your inbox stimulates neurons similar to those stimulated by playing StarCraft” (source).

Uber, for instance, provides real-time GPS tracking of its drivers, and this feature engages passengers’ curiosity and planning faculties as they wait for their cars to arrive:

  • “Is she going to take this route or that one?”
  • “Would he arrive faster if he turned on that street?”
  • “Why isn’t her car moving? Is there some sort of accident at that intersection?” Etc.

Finally, you should absolutely make (careful) use of triggers, i.e., push notifications, within your app.

Push notifications allow an app to send a notification to a user’s smartphone without requiring the user to take any action to bring about the message.

I recently pointed out the importance of designing such triggers into mobile apps:

“These kinds of triggers are incredibly addicting not only because they cause a person to experience a short burst of pleasure whenever they arise but also because they “prime” that individual to then anticipate additional notifications in order to experience similar feelings of pleasure. You need to keep bringing users back to your app, and push notifications are an incredibly effective way to do so.”

Again, it’s the dominance of dopamine and the powerful role it plays when we engage in searching and anticipating activities that make push notifications so enticing and distracting.

Every time a user receives an unexpected notification, desire-producing chemicals in the brain go crazy as the user takes action to figure out what special message awaits.

Be sure to incorporate such triggers into your mobile app.

At the same time, however, it’s imperative that you don’t scare off your users by “overdoing it”.

In this context, follow these guidelines for success:

  1. Use an opt-in/opt-out system instead of arbitrarily forcing notifications to users’ phones;
  2. Design your triggers around the most common and rewarding digital events rather than utilizing them for every single action that takes place;
  3. Do not add vibration to push notifications — it’s annoying and ineffective; and
  4. Personal your notifications to make them less intrusive (e.g., “Kevin just liked your photo, Mark!”)

A second key strategy is to utilize the power of gamification.

Gamification”, an increasingly popular tactic used by mobile app developers, involves the incorporation of game-like elements into the finishing of a set of tasks with the intention of capitalizing on the human drive to overcome obstacles, accumulate accomplishments, and receive recognition for our triumphs.

We are a puzzle solving and conquering species, which means that people are naturally drawn to tasks if they require us to proceed through various stages in order to achieve a goal that offers the potential for reward.

Dropbox’s 250mb freebie offer is a great example of gamification.

It offers users the ability to claim additional free storage if they “conquer” various tasks that, in fact, encourage greater user investment in Dropbox’s service (thus operating as a “win-win” for both parties):

Image for post
Image for post

FourSquare’s/Swarm’s awarding of different “badges” based on the number and types of user check-ins represents another popular and successful use of gamification by a mobile app.

Third, make your app onboarding experience as streamlined, engaging, and friction-free as you can.

App onboarding refers to the process of introducing users to your app, familiarizing them with how it works, and convincing them to become long-term users (or, even better, “app ambassadors” who actively promote your app to others) (sources: 1, 2, 3).

The major objective of app onboarding is to guide users along the path of using your app until they reach their “Aha! Moment”, i.e., the moment when they become convinced of the value that your app provides to their lives and they then become dedicated users.

In a previous article, I described six specific strategies that startups can use to maximize the app onboarding experience for their users:

  1. Reduce friction by removing unnecessary obstacles in the sign-up process;
  2. Provide a clear indication of progress by showing users how many steps must be completed before the app can be used freely;
  3. Use social sign-ups through Twitter, Facebook, etc. in order to make the registration and login process as painless as possible;
  4. Offer incentives by presenting freebies (e.g., free storage space or discount codes);
  5. Provide use cases that clearly others successfully and easily using the app; and
  6. Use brief yet helpful tutorials that quickly solve common problems or clear up confusion.

Examples of mobile apps that offer users social sign-ups:

Image for post
Image for post

Last of all, be sure to encourage (lots of) user investment in your app.

As Nir Eyal emphasizes, convincing users to take specific actions that create ever-deeper connections with your app serves to “make the trigger more engaging, the action easier, and the reward more exciting with every pass through the Hook”.

How can you get your users to invest in your app?

Here’s where you need to capitalize on the notion of the sunk costs trap.

The “sunk costs trap” refers to a phenomenon in which we become more liable to stick with (or finish) some system, task, or behaviour the more resources we sink into it.

Practically, we’re all familiar with how this works:

  • You’re far less likely to abandon Instagram and join a rival mobile photography app if you’ve spent the last two years building up your Instagram profile, using specific hashtags, following friends, etc. than if you just joined 36 hours ago.
  • You’re far more liable to abandon Dropbox in order to join a competing online file storage service if you’ve used Dropbox for only a few days as compared to, for instance, the past 10 months. It’d be too much of a hassle to move, re-organize, and re-share across all your devices all the files you’ve been storing on Dropbox for nearly a year in order to make the switch.

The examples are endless.

The point, then, is that you must encourage investment on behalf of your users so as to increase user retention and thereby boost the virality of your app.

And you do this by rewarding your users the more that they use and share your app, e.g., via referral systems, the awarding of digital goods for completing certain steps (e.g., sharing ten new photos within a set period of time), clear indications of progress (e.g., progressing to new learning levels in an educational app), etc.

Once you’ve designed and developed addictive qualities into your app and released it to the public, it’s then time to launch a PR and marketing campaign.


If you enjoyed reading this article and you’re looking for a more comprehensive overview of building habit-forming apps then I strongly suggest taking a look at our 20+ page expert white on creating addictive apps!

Originally published at


Thanks for reading!

If you enjoyed this article, feel free to hit that clap button below 👏 to help others find it!

Image for post
Image for post
Image for post
Image for post

Got an idea for an app? Let’s talk.

We’ve helped build over 12 multi-million dollar startups in the last few years. Check out how we can help you.

Image for post
Image for post

The Startup

Medium's largest active publication, followed by +716K people. Follow to join our community.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app