It was 1999, a year when the Backstreet Boys sat atop the Billboard charts and Nokia reigned as the king of cell phones. MBA student Chris Barton had an idea that would later revolutionize the world of audio recognition for music lovers. With three other co-founders, he created a startup that makes it possible for people to use their cell phones to identify the music playing around them. That company was Shazam, and it became an instant hit.

Nearly two decades later, the mobile world has radically changed. Touchscreen phones and mobile apps proliferate, an era ushered in by Apple’s iPhone and app store. Still, Shazam remained largely moored in the past even as the music industry was already singing a different tune. “We were selling MP3 downloads,” said CEO Rich Riley at a recent Wharton Leadership Lecture. But “people are streaming music, not buying it.”

The original Shazam service worked this way: Users would dial “2580” on their cell phone and let their device listen to music they wanted to identify. Shazam would text them the song title and name of the artist. The company also offered MP3 music downloads and its technology powered music services of telecom carriers in a ‘white label’ arrangement.

When Riley joined the company in 2013, Shazam had graduated to a mobile app but essentially had not changed its core business model as mainly a music-recognition service. While there was talk about becoming a music aggregator like Spotify, “I wasn’t crazy about it in terms of that wasn’t our core competency,” he said. “We had enough trouble being Shazam.”

“Shazam” That Coke bottle

Banking on his 14-year tenure rising up Yahoo’s ranks, Riley decided to turn Shazam into an advertising-driven business. Key to that initiative would be to push Shazam’s functionality beyond recognition of music into “visual capabilities” such that users could use their phone cameras to “Shazam” a product and be directed to videos and other media.

Why advertising? “I just grew up in the advertising business,” Riley said. But the transition proved to be more difficult than they had expected. “Shazam wasn’t in advertising. We weren’t [tracked by online measurement firm] comScore. We were on the wrong ad server. We had the wrong relationships.” Moreover, the legacy business declined a lot faster than projected, and business from its telecom partners was flat or declining.

As part of its reinvention, the company this year launched “Shazam for Brands,” a service that lets users “Shazam” TV commercials, radio spots, print ads and packaging and receive additional marketing or other content. For example, Coca-Cola drinkers can scan a song printed on special bottles to create a video of themselves lip-synching to the music. Also, a Disney collaboration to promote the movie “Ant-Man” lets users “Shazam” posters to get the superhero’s vantage point or create a selfie with him to share on social media. Other marketing partners include Target, Nike and BMW.

This summer, Shazam announced a partnership with major radio station owners — iHeartMedia, Cumulus, Entercom, Cox and Sun Broadcast Group — to provide an audio audience measurement service using its technology. Shazam also added functionality that lets its app recognize beacons — small devices that send signals typically indoors or in closed spaces.

It partnered with Exterion Media and Fox to promote the “Kung Fu Panda 3” movie using beacons embedded in double-decker British buses. When bus riders open the Shazam app, it will listen for beacon signals and serve up movie content such as trailers. “We Shazam-enable everything they do,” Riley said. And by delivering longer content, Shazam can lengthen user engagement on mobile devices, which is more valuable to advertisers.

Today, advertising makes up the largest part of Shazam’s business.

Today, advertising makes up the largest part of Shazam’s business. “It is growing nicely and scaling,” Riley said. “It’s the future for us.” This week, privately held Shazam announced that it has finally turned a profit before interest, depreciation and amortization charges amid double-digit revenue growth. It also said it has hit a threshold of one billion downloads.

That’s a big change from 2014, when the British company posted a loss of 14.8 million pounds despite booking revenue of 36 million pounds, according to a U.K. regulatory filing. Since Riley became CEO, the company has snagged three rounds of funding — with the latest $30 million round giving it a $1 billion valuation. Backers include Kleiner Perkins Caufield & Byers, Acacia Capital Partners, Institutional Venture Partners and DN Capital.

Yahoo Days

Riley has experience turning around companies. At Yahoo, he was tasked to revive its European business years ago. “Yahoo Europe was losing a lot of money,” he said. “I did what I called a control-alt-delete reboot” or sweeping change in operations. One of the problems was that there were country silos. “We had the ‘queen of France’ or ‘king of Spain’ and they didn’t want to do business with each other.” So Riley took away the barriers: Instead of country leaders, they became regional chiefs like European head of sales.

Riley learned a lot from his tenure at Yahoo. He joined the company in 1999, when it was the toast of Silicon Valley. “We were the hottest brand,” he said. Reflecting on its fall, he said one problem was that the company delved into too many things, expanding “a mile wide and an inch deep.” Back then, it was tops in search, but Yahoo only had three people dedicated to it compared to an upcoming startup called Google, which had put vastly more people on just search. What’s more is that “we lost our consumer obsession and we got really tripped up into the quarterly earnings scene” of having to meet or exceed Wall Street’s short-term projections, he said. “We got into a bad loop” and it didn’t help that Yahoo hired a slew of “professional CEOs.”

It was one such former professional CEO, however, who brought Riley back to the U.S. — the tough-talking Carol Bartz. Later, CEO Marissa Mayer would offer him the COO job, but he turned it down because he wanted to run his own company as a CEO. That’s when Riley decided to join Shazam. (Yahoo’s core operations are currently being acquired by Verizon for $4.8 billion.)

“For Shazam, identifying music, that’s our Google search.… We’re going to be the best in the world on that.”

A Billion Pieces of Data Daily

At Shazam, one urgent priority is to monetize the one billion data points it collects daily. This information can be sold to record labels and help them pinpoint potential hits early. During a recent meeting with record label executives in London, Riley said he was able to show “heat maps” of the top 40 songs to track their popularity arcs. For instance, it showed a song gaining steam in a small French town before spreading from there. “See how a hit happens,” he said. “By Shazaming, you’re telling us what you love.”

Shazam is adding about 10 million new users a month and has more than 100 million monthly active users. Pivotal to its growth was being embedded into Siri, Apple’s voice-activated digital assistant, as well as the command “Ok Google” for Android users. Shazam also was the only app live-demoed at Apple Watch’s debut. “That’s like winning [NBC’s reality singing contest] ‘The Voice’,” said Riley, who did the Apple deal. Despite the risk of cannibalization, more such embedded partnerships are forthcoming. “If we can put [Shazam] in front of consumers, they’ll use it,” he said.

But one thing the company won’t change is its obsession with being the best in audio recognition. “For Shazam, identifying music, that’s our Google search,” Riley said. “We’re going to be the best in the world on that. … That’s just sacred.” Its metric is the recognition rate — the percentage of songs it can correctly identify. Riley said the company has a few rivals, but it is not content with just being “a little bit better [than them]. We want to just blow them away,” he said. “We never want to take our eye off that goal.”