Trouble @Twitter

FORTUNE — In March, shortly after Jack Dorsey went back to work for Twitter, the company he co-founded four years ago, he did a Q&A session with an entre­preneurship

class at Columbia Business School. As students tapped away on their laptops (were they sending tweets?), Dorsey, 34, answered questions about his commitment to his new gig as Twitter’s product chief. Dorsey, after all, is also CEO of Square, a hot payments business, and he returns to Twitter after a rocky run as its CEO — the board demoted him in 2008. (Co-founder Evan Williams took over and held the job for almost two years; then operating chief Dick Costolo assumed the top job.) “Seems like a revolving door,” mused the interviewer.

Dorsey laughed lightly and replied, “You know, we’re just individuals. We’re just humans running these companies.” And he compared managing a startup to, of all things, supervising a theater company.

There’s no shortage of drama at Twitter these days: Besides the CEO shuffles, there are secret board meetings, executive power struggles, a plethora of coaches and consultants, and disgruntled founders. (Like Williams. The day after Dorsey announced his return to the company — via tweet, naturally — Williams quit his day-to-day duties at the company, although he remains a board member and Twitter’s largest shareholder, with an estimated 30% to 35% stake.) These theatrics, which go well beyond the usual angst at a new venture, have contributed to a growing perception that innovation has stalled and management is in turmoil at one of Silicon Valley’s most promising startups, which some 20 million active users rely on each month for updates on everything from subway delays to election results — and which a growing number of companies, big and small, seek to use to market themselves and track customers.

Just two years ago Twitter was the hottest thing on the web. But in the past year U.S. traffic at Twitter.com, the site users visit to read and broadcast 140-character messages, has leveled off. Nearly half the people who have Twitter accounts are no longer active on the network, according to an ExactTarget report from January 2011. It has been months — an eternity in Silicon Valley — since the company rolled out a new product that excited consumers. Facebook’s Mark Zuckerberg used to watch developments at Twitter obsessively; now he pays much less attention to the rival service. Meanwhile companies are hungry to advertise, but Twitter hasn’t been able to provide marketers with enough opportunities. Last year the company pulled in a mere $45 million in ad revenue, according to research firm eMarketer. Facebook brought in $1.86 billion.

Twitter doesn’t lack talented engineers, potential paying customers, or loyal users — and it certainly has plenty of money in the bank: It has raised more than $360 million from such heavyweights as Jeff Bezos and Kleiner Perkins. The problem is a board and top executive team that don’t always appear to have control of its wide-ranging cast of characters, including founders who have attained near-celebrity status (another co-founder, Biz Stone, is a regular on NPR, and earlier this year Dorsey was profiled in Vanity Fair), headstrong and divisive managers, and investors used to getting their way. For some time Twitter’s runaway growth — in the first half of 2009, Twitter added more users more quickly than almost any web service in history — masked its execution problems. But now, with growth of traffic to its site slowing and its rivals beefing up (new social-media darling Groupon has raised more than $1 billion, and Facebook has been on a hiring spree), Twitter needs to get its act together or risk losing buzz, potential ad revenue, and its bright future too.

To be fair, Twitter’s founders didn’t set out to build the next Facebook: Consumers turned it into a social phenomenon and kept signing on to see what it was about. Dorsey, Stone, and Williams started the service as an experimental side project; it was never designed to accommodate the 200 million–plus registered accounts worldwide it now hosts. Twitter crashed so frequently in its early days that its “fail whale” logo that signaled the service was down became a cultural icon emblazoned on ironic hipster T-shirts.

Twitter executives say they spent much of 2010 investing in infrastructure to make the service more reliable. They also have taken steps to address management shortcomings. Twitter has worked with famed startup coach Bill Campbell, an Apple board member and former Intuit (INTU) CEO. Costolo, Twitter’s current CEO, spent his first six weeks on the job creating and refining the company’s first mission statement—“Instantly connect people everywhere to what’s most meaningful to them”—and reminding Twitter employees how valued they are. And the company tells Fortune that in coming months Twitter will roll out new features and ad products, including a set of services aimed at helping small businesses market themselves on Twitter. Says Costolo: “We’ve only achieved 1% of what Twitter can be.”

Yet even as management tackles its executive and product problems, a major challenge looms: Twitter needs to figure out what it wants to be when it grows up. It’s one of the reasons Dorsey is back at Twitter, but coming up with Twitter’s raison d’être is a tall order for a visionary who has another big job. Twitter CEO Costolo insists that the company isn’t a “social network.” But what is it? A media company? A communications tool? Or even something more? Twitter executives need to answer those questions, and fast. “Twitter could be 10 or even 100 times bigger. I’m hopeful for that,” says Reid Hoffman, co-founder of LinkedIn and a partner at Greylock Partners. (Hoffman doesn’t own a direct stake in Twitter, but he reached out to Fortune to offer his comments when he learned a story was in the works.) “But it’s not a given. It’s never a given.”

Twitter’s rocky road to social-media stardom

Twitter hates being lumped in with Facebook as a social network, but comparing the two companies helps illustrate why Twitter finds itself stuck in neutral. Not long after founding Facebook in his Harvard dorm room, CEO Mark Zuckerberg stopped talking about the company as a social site and started telling people he was building a digital phone book for the new millennium, and he never wavered from that grandiose vision. He brought in seasoned executives to manage the company early on, and although he still dabbles in writing code, he spends his time refining the product and strategy. He’s been criticized for being ruthless, ambitious, and single-minded in his quest to build Facebook — a common knock on the few founders who stay atop their companies. (Exhibit A: Bill Gates.)

The Twitter trio took a quirkier, more meandering path to social-media stardom. In 2006, Evan Williams was striking out with Odeo, the startup he’d founded to help people discover and create podcasts. Apple’s (AAPL) iTunes had rendered his idea irrelevant. Trouble was, he still had venture capital funding. Williams encouraged employees to experiment with new ideas, hoping something might stick. Jack Dorsey, a young engineer with a deep understanding of the tech behind taxi-dispatch services, suggested a service called Twttr (the vowels came later) that would let people answer the question “What are you doing?” by text message. The idea resonated, and so, with help from Biz Stone, Odeo’s creative director, Dorsey built a prototype in two weeks. When the company was incorporated a year later, Dorsey, the brains behind the product, became CEO, and Stone was chief creative officer. Williams, who grabbed the title of Twitter chairman, didn’t join Twitter full-time until the spring of 2008.

Unsure of what they’d created, the founders basically turned Twitter over to its users — initially a bunch of techie early adopters — and watched what they did with it. The result was a bit of anarchy: The crowd developed an unintuitive language all its own (the hashtags and retweets and other abbreviations all came from users); an ecosystem of independent “dashboard” companies such as TweetDeck and HootSuite emerged to help consumers manage their Twittering — a development that would prove to be a mixed blessing for Twitter (more on that in a moment).

Despite the funky jargon, consumers hopped on in droves (Oprah joined!), and Twitter’s servers and software couldn’t keep up with demand. By the end of 2008 the board decided that Dorsey, a taciturn engineer with no previous management experience, was no longer the right CEO. Williams, who succeeded him, has been accused of pushing Dorsey out, but in an exclusive interview for this story, he put the responsibility for making that decision on the broader board: “We thought about recruiting somebody from the outside,” he says, “but the company at that stage was so fragile that bringing in someone from outside was risky. So the VCs asked me if I would do it.”

By that time, communication among the Twitter founders, especially Dorsey and Williams, had started to fray. According to Greg Kidd, an early investor, Dorsey today is circumspect but firm on the subject of his relationship with Williams. “The most he’s ever said about Ev is, ‘We don’t talk.’”

The Evan Williams years

When he took over as CEO in 2008, Williams faced huge challenges. The company had just 20 employees, almost entirely engineers, and during the first six months of his tenure, Twitter jumped from 5 million registered accounts to 71.3 million. The service was becoming more than just a venue for idle chatter, a fact driven home when, in 2009, the government put in a call to Williams to ask him to delay maintenance on the service so that Iranian voters could protest the election.

Williams, a reserved Nebraskan, recognized his strengths and weaknesses. That year he told Fortune, “Focus was always a big problem for me. I think about my last company, and in the last year before I shut it down I started 32 projects, one of which I completed.” Nevertheless, Williams did manage to finish a number of projects at Twitter: He migrated Twitter to a new data center and revamped its technology; moved headquarters as the company grew, landing in offices in downtown San Francisco; made six small acquisitions; and hired another 280 employees, including most of the current management team.

In the fall of 2009 he brought on Dick Costolo, who had sold Feedburner to Google (goog), as the company’s chief operating officer. A friend to Williams, Costolo had already been advising the company on an informal basis and was an angel investor in Twitter. Having dabbled in improvisational theater early in his adulthood, Costolo inspires confidence with his refined public speaking ability, quick wit, and fast decision-making skills. Costolo’s mandate was to figure out a way Twitter could make money and help Williams grow the company. Half a year after he arrived, he got up before a New York City audience to announce Twitter’s killer ad product, Promoted Tweets (basically, ad-supported tweets), and implied that more tools for marketers were on the way.

Meanwhile Twitter turned to startup whisperer Bill Campbell and others to help Williams and Costolo strengthen management (For more on Campbell, see “The Secret Coach.”). Campbell is the guy who helped Eric Schmidt take on the role of CEO and worked closely with the Google founders; he is referred to with deference in the Valley as “the coach.” The results were mixed: Campbell attended board meetings, met with executives to offer advice, and was often seen around the office on Monday afternoons. He took an especially active role in trying to help the company’s vice president of product, Jason Goldman, forge a working relationship with newly recruited engineering vice president Mike Abbott. Both credit him with helping them work together. But many sources say the relationship never got sorted out. In December, Goldman left abruptly and was replaced on the board. Campbell, who declined to comment, spends less time at Twitter now, sources close to the company say.

By October 2010, Williams had run out of steam. There are different accounts of why he left Twitter. Williams says he demoted himself, naming his friend Costolo to replace him. Multiple sources close to the board say its members asked him to step aside, but no board member will confirm that. Whatever the reason, Williams left in December for vacation, extended it to January, then through March. On March 29, the day after Dorsey returned as product chief, Williams announced he wouldn’t return to the company in a management role.

How big is it really? And is it a moneymaker?

Much like learning to surf or ride a bike, you have to develop a feel for using Twitter. Many users never do, signing up to try it and then giving up. But for those who commit, it’s addictive, entertaining, and cool. It’s emerging as a real-time news reader, offering users a sampling of what’s going on in the world. Dip into your Twitter stream for two minutes, and you may discover that four New York Times journalists were kidnapped in Libya and your train line is experiencing delays. But to the uninitiated, the service is a bit of a mystery.

Just how popular is Twitter? Tracking its growth is complicated in part because many people tweet via dashboards such as TweetDeck (making it hard for Twitter to aggregate the mass viewership that many advertisers covet). The company says it has more than 200 million registered accounts (Facebook has 600 million subscribers), but users are allowed multiple accounts. The company also trumpets that the service had 155 million tweets daily by the end of the first quarter, a jump of 41% over the prior quarter, but many tweets — news headlines, for example — are often churned out by computers, not humans visiting Twitter.com. One key measurement of Twitter’s popularity, Twitter.com’s traffic, indicates a disturbing trend: ComScore shows that growth of U.S. visitors to the site has leveled off more than a year after its massive spike upward in 2009. (Twitter disputes this, pointing to Quantcast data that show a 50% increase in worldwide traffic in the past five months.)

Indeed, Twitter continues to enjoy accelerating growth overseas, and data that Twitter provides from Google Analytics show that international traffic to the site jumped 83% in the past year. But slowing growth in the U.S. market is an important indicator of the company’s health — the U.S. is the biggest ad market and vital to Twitter’s moneymaking plans. It also is worth noting that the 20-month plateau has come so early in the company’s trajectory; it is one thing for a company with dominant market share to peak. Twitter was a niche when its domestic traffic started to flatten.

To be sure, garnering new users and boosting traffic to Twitter’s website are only one piece of the moneymaking equation. Many believe that Twitter’s search results, which increasingly show up on other sites, are its real jewels. For anyone striving to see events as they unfold, there are few better places to turn. And thanks to two critical search deals signed in 2009, those results frequently turn up tweets in Google and Microsoft’s (MSFT) Bing searches. Type “Obama budget” into Google, and on the first page of results, alongside links to traditional news outlets and the federal government website Whitehouse.gov, you may see a link to a Politico blog that someone you follow has tweeted. This is one area in which the service has the upper hand over Facebook. Facebook communications are private unless a user chooses to make them public; all tweets are public, which gives marketers a potentially richer pool of content for targeted ads.

Right now, however, advertisers have limited options on Twitter. There are ad-sponsored tweets that appear at the top of search results — on Twitter.com or some Twitter services — and relate to the nature of the inquiry. Search for “Jet Blue” on Twitter, for example, and your first result is a promoted tweet posted by @DeltaVacations. Then there are promoted accounts, basically paid ads that sit in the right-hand corner of Twitter.com. Promoted Trends, the most expensive option of the bunch, can appear just once in a day and occur when a company pays to place its topic (#ChipotleGold) among the most organically popular topics (Rihanna and Britney). Verizon Wireless (vz) ran six Promoted Trends for an NCAA March Madness campaign, paying $120,000 a day for the global ads.

But Twitter executives aren’t always on the same page when it comes to moneymaking endeavors — perhaps because the company lacks a coherent philosophy about what it wants to deliver to customers in the first place. At the beginning of March, the company released an updated Twitter iPhone application with a new feature called a Quick Bar. This bar ran across the top of a Twitter stream and broadcast trending topics. It included the things people were actually tweeting about most, but also the occasional promoted trend, for which companies paid $120,000. A small group of vocal tech pundits cried foul, with one dubbing it the “Dickbar,” after Costolo. The company immediately modified the product. “They roll things out in an almost sheepish way,” says eMarketer analyst Paul Verna. “When it doesn’t work out, they say it was a test. It’s like a batter getting up to the plate and bunting all the time.”

Can they get their act together?

Three days after Dorsey’s March 28 return to daily duty at Twitter, the company killed the Dickbar. Dorsey came back to Twitter after the company had tried and failed to lure two senior product managers from Google. In both cases the company was fairly close to closing the deal when Google made counteroffers, showering them with restricted stock grants that are reported to be worth more than $50 million in each case. (Clearly, product people are in high demand in Silicon Valley.) And so product development will fall to Dorsey and new hire Satya Patel, who earlier spent four years working on AdSense at Google — but Patel also plans to keep board seats on the startups he advises. Dorsey, too, will continue to run Square, which is currently in high-growth mode. On the day the announcement was made, Dorsey, who declined requests to be interviewed for this article, tweeted, “Today I’m thrilled to get back to work at @Twitter leading product as Executive Chairman. And yes: leading @Square forevermore as CEO.” Though Dorsey, through a spokesman, denies saying it, three people close to Square say Dorsey told them that he views his involvement with Twitter as short term.

Costolo doesn’t think this part-time arrangement is problematic. He’s hopeful Dorsey will draw on his design background to inspire Twitter’s ranks and shape the evolution of the product. (Dorsey’s Square has won plaudits for its elegant design.) “I asked Jack to come back in this role to be the conceptual authority on the products at Twitter and to work with the design and user-support team to allow us to bring clarity to the process of how we develop at Twitter,” he said.

Since Twitter was invented, Internet behemoths have been clamoring to buy it in the belief that it is the one social service with the potential to compete with Facebook. Last fall Microsoft, Google, and Facebook itself all considered buying the company. Microsoft never made an offer, according to sources, but Facebook is believed to have offered $2 billion for Twitter, and Google, by far the most serious, offered as much as $10 billion. Many question why Twitter didn’t sell itself. Microsoft once offered to pay $44.6 billion for Yahoo (yhoo), after all. Today Yahoo is valued at half that.

Twitter’s board members are a high-powered crew. Besides William, Dorsey, and Costolo, the board includes venture capitalists Peter Fenton, Fred Wilson, and Bijan Sabet, former Netscape CFO Peter Currie, former Doubleclick CEO David Rosenblatt, and Flipboard founder Mike McCue. These alpha males disagree about a lot of things, according to many sources, but they all agreed not to sell Twitter. Indeed, in a hotly contested financing round, the company raised another $200 million led by Kleiner Perkins at a $3.7 billion valuation. When the company accepted the financing, management and the existing board felt that Kleiner partner John Doerr did not belong on the board. He is a board member at Google, which is a potential acquirer of Twitter, and a source of future employees. Instead, Twitter and Kleiner Perkins decided they’d choose two mutually agreed-upon representatives to join Twitter’s board.

That’s why it was odd that when the January board meeting rolled around, Doerr showed up. No one will say whether he was invited — and no one there told him to go home. Instead, the board called a private executive session after the official board meeting to hash out the more sensitive business. Asked about this directly, Costolo said he would not discuss it, and Doerr didn’t return requests for an interview.

Board member Peter Fenton, a partner at Benchmark Capital, acknowledges that the making of Twitter hasn’t been pretty. “The act of getting from there to here was violent,” he says. “We’ve had a revolving door of senior leaders who leave.” But he says he’s pleased with the current crew. “The attribute I’ve now been able to see is that the team is building the respect and affection that is required to get to the next level.”

It’s almost quaint to hear one of Silicon Valley’s most sophisticated investors speak of “respect” and “affection.” When tech investors and entrepreneurs talk about expanding their companies, they tend to focus on new products or untapped markets. On the other hand, if Dorsey is right and managing a startup is indeed like managing a theatrical company, it probably is a good idea to give the performers and stagehands a little love. That way maybe they can #gettheiracttogether.