WWE isn't just scripted wrestling matches. It's a media powerhouse.

Heading into negotiations for a new TV licensing deal, WWE has two of the most popular shows on cable, a streaming video network with original content and a social media following sports leagues can only dream of catching.

WWE is now worth nearly $3 billion. Sales swelled 11% in 2016 and grew another 10% last year.

The stock has raced out of the gate this year, jumping 12%. Last year, WWE (WWE) climbed 66%.

"For a company that writes stories, it's a pretty good one," Brandon Ross, a media analyst at BTIG Research, said.

Related: Vince McMahon says he's reviving the XFL

Why WWE?

WWE is a mix of live sports and reality TV. Unlike pro sports, the company can tailor plots and craft matches to meet fan preferences, giving it complete control over its content.

"WWE knows it is in the entertainment business, and has been for decades," said Jay Rosenstein, a former CBS Sports executive and current adjunct professor at New York University's Tisch Center for Sports Management. "It has done a masterful job of creating stars and strong personalities."

High-flying athletes and soap opera sagas attract a passionate fan base. WWE "creates storylines so you can identify with one of those wrestlers for a decade," Needham analyst Laura Martin said.

The "constant battle for control between Vince [McMahon] and the fans" also hooks viewers, explained David Meltzer, who's run Wrestling Observer Newsletter since 1983.

McMahon, WWE's CEO, is a lightning rod for criticism, and he even plays a character in the ring. Fans voice their opinions and try to sway the results of matches.

Related: Surprise Trump winner: The WWE

Social media is one measure of WWE's success.

More than 21 million people subscribe to WWE's YouTube channel to watch highlights, nearly three times more than any sports league. John Cena is the most-liked active U.S. athlete on Facebook. And WWE says it had a whopping 20 billion views on social and digital platforms in 2017.

All those eyeballs translate into data about fans' favorite athletes and matches, advertising dollars, ticket and merchandise sales. The WWE also promotes its streaming network on social media and TV.

WWE's hot streak ties back to a risky decision McMahon made in 2014.

For years, WWE had relied heavily on a lucrative TV deal with NBCUniversal to license "Raw" and "Smackdown" on USA Network and revenue from cash cow pay-per-view events such as Wrestlemania and Summerslam.

McMahon blew up the model, betting big on digital. "They self-disrupted," said Ross.

WWE created its own Netflix-style channel, WWE Network, streamed directly to consumers instead of through distribution platforms like cable. For $9.99 a month, fans could subscribe to all WWE shows, including pay-per-view events, and access thousands of hours of WWE's content library.

The move backfired.

NBC believed the new network would eat into TV ratings and low-balled a renewal offer. Shares plunged 44% in a single day.

The media landscape looks a lot different today. WWE turned out to be at the front of a shift to direct-to-consumer content that's shaken up the industry. The streaming network gave WWE new information about its fans to craft compelling stories.

Related: ESPN's streaming service will cost $4.99

"The market loves over-the-top solutions to watch television. Investors think that's where the future of TV is," Martin said.

WWE Network has around 1.5 million subscribers and they haven't come at the cost of ratings as TV executives feared. Although Smackdown and Raw ratings are down on USA, they still averaged more than 3 million viewers a show in 2017, according to Nielsen data. Raw ratings are in line with NBA games on broadcast TV and nearly double NBA games on cable.

Related: The WWE is red hot again. Here's why.

WWE has struggled to attract top advertising rates in part because it's not considered premium live sports content, but Raw and Smackdown still "represent critical ratings contributors to NBC's largest cable network," Morgan Stanley analyst Benjamin Swinburne wrote in a research note last week. Swinburne expects a new licensing deal to boost revenue by 25% and expand WWE's profit margins.

BTIG's Ross thinks revenue will climb even higher than that, especially as more bidders enter the mix. Analysts agree that Fox could make a play for WWE rights as it focuses more on sports in the wake of its deal with Disney.

Facebook also has WWE on its radar. In December, the two companies announced a 12-episode WWE series on Facebook Watch that could be a test run for an expanded streaming partnership similar to the NFL and Amazon, according to Ross.

"It would not surprise us if WWE took the risk of putting their television content on a digital platform. We've seen them be forward-thinking," Ross said.

Pro sports can learn from WWE, analysts agree. McMahon understood early on that social media was a tool to grow the brand. WWE and its stars' relentless promotion on Twitter, Facebook, Instagram and YouTube engages fans and builds excitement.

"The way you bring your next customer in is through sharing," Martin said. "It's how you get the next kid."

McMahon's willingness to experiment also offers lessons for leagues and their distributors reluctant to disrupt decades of tradition, according to Ross.

WWE "adapted social and digital distribution as quickly as consumer preferences changed instead of trying to protect their legacy business."