Pepsi: Brewing up viral magic

FORTUNE — Pepsi Max might not be the only brand that debuted a television spot during last night’s Game 1 of the NBA Finals with hopes that the campaign goes viral. But it is the only one entering the process backwards.

Much like with the Super Bowl and the Olympics, marketers want to capitalize on the millions who tune in to watch Kevin Durant and LeBron James go head to head. (An average of just over 17 million viewers tuned in last year to watch Dirk Nowitzki down James and his South Beach crew.) Joining them this year will be a grizzled old veteran, “Uncle Drew,” who made waves last month in a Pepsi Max video on YouTube. In the five-minute clip, “Uncle Drew” amuses, then mesmerizes, a pick-up basketball game and its fans with crossovers and dunks unbecoming of a white-bearded, paunch-carrying old man, and only possible because the true identity of “Uncle Drew” was a carefully disguised young basketball star, the clip’s writer-director Kyrie Irving.

Pepsi Max’s brand team put out the video without any media buys on May 18, just several days after Irving won the NBA’s Rookie of the Year award in a landslide. Between Irving’s crossovers and that fortuitous timing, “Uncle Drew” has been watched over 9 million time on YouTube, with a 98% positive feedback rate of “likes” to “dislikes.”

The PepsiCo brand (PEP) realized it had a hit on its hands for a low-cost, which has led to an unusual move—the transition of an ad spot from YouTube video to primetime television spot. While the use of online teasers and viral campaigns has become one of the new staples of Super Bowl advertising, the “Uncle Drew” strategy is more speculative and much less expensive.

MORE: 5 Ways the Super Bowl ad playbook has changed

With Super Bowl advertising, long-tailed campaigns such as a product launch tend to outperform one-off commercials, according to marketing expert Derek Rucker of Northwestern University’s Kellogg School of Management. High profile television spots have a better return when a part of a broader effort that out lives the event itself. Marketers now push to stretch out the time of relevance of their spots, from teasers to user contests and follow-up ads.

“Uncle Drew” will go about this backwards, with the push for viral online momentum predating the high-profile spot. Pepsi Max is sitting on what is close to a sure thing. Even then, Pepsi Max brand team member Sam Duboff, who led creation and development of the piece, says “Uncle Drew” had to satisfy three major metrics in order to justify its adaptation into a television segment. “Uncle Drew” had to keep viewers engaged, hit the brand’s target demographic, and generate its own legs through word of mouth. With 80% of viewers watching through the 4-minute mark, a 82.1% male viewer group that skewed towards the brand’s core 25-44 age group, and over 5 million views from embedded YouTube players suggesting the viewer watched over a media site or Facebook (FB), Duboff and his team hit all three.

The 30-second version of the ad will appear in Games 1, 2, and 3 of the Finals, and Pepsi Max will also buy advertising space towards an “ESPN takeover.” Because Pepsi Max filmed the piece for its online efforts, Duboff says it can funnel the lion’s share of its project budget into these later media buys. It’s a model that other brand marketers will be sure to watch carefully. With Irving under contract and his award and the Finals coming up at the right time, Pepsi Max had several lucky factors break its way. But its general model, to focus on a high-quality online video and then be opportunistic in its follow-up investment, can work for many brands.

MORE: Fortune’s 2011 40 Under 40

“There’s always going to be room for the big, Super Bowl type commercial,” Duboff says. “But with online distribution channels, there’s room to be craftier.” Expect other brands to scramble to add this trick to their strategic arsenal. The hard part will be finding the next character with moves like Uncle Drew’s.

Subscribe to Well Adjusted, our newsletter full of simple strategies to work smarter and live better, from the Fortune Well team. Sign up today.