Profits from ad revenue generated from all those Harlem Shake videos you've been watching went to the song's creator thanks to a YouTube system to deal with copyright infringement.

The Harlem Shake, now two weeks into its life as America’s favorite (or most annoying) meme, has shown a surprising resilience in an age when most Internet jokes have a 24-hour shelf life. More than 4,000 videos featuring the words “Harlem Shake” were being posted per day to YouTube during the peak of the mania last week, and new versions continue to crop up. The primary element holding the videos together, which feature everything from dancing walruses to Power Rangers, is the song “Harlem Shake,” a hip-hop instrumental that sports a now-infamous beat drop about 15 seconds in. While the videos are simple fun for the thousands of people that have participated in Harlem Shakes, they’ve become an easy moneymaker for the song’s creator, Baauer, and YouTube itself.

Just a few years ago, copyright lawyers likely would have shut down the Harlem Shake craze before it could really get going—you might remember Viacom’s 2007 lawsuit against Google for allowing copyright-violating videos to spread across YouTube. Now, though, most content creators are working with YouTube to identify copyright-violating material and monetize it instead of delete it.

Through a service called Content ID, YouTube automatically trawls its servers looking for copies of copyrighted materials that owners have asked to be protected. Users of the service can then have these copies removed from YouTube, do nothing, or have ads sold against the videos if they qualify for monetization. When Baauer’s label, Mad Decent, originally uploaded the full “Harlem Shake” song to YouTube in the summer of 2012, they were hoping it would proliferate. “We’ve, from the beginning, been very much a proponent of allowing everybody to do whatever they want with our stuff, as long we’re able to monetize it,” says Jasper Goggins, the manager of the label. “It’s a great way to help spread the music.”

(WATCH: SeaWorld Animals Perform the Harlem Shake)

Thanks to Content ID, Baauer was well positioned to immediately begin profiting when the Harlem Shake meme took off at the start of February. When the University of Georgia does the Harlem Shake underwater or a firefighter does it with a chicken, Baauer and his label get some of the ad revenue, as does YouTube. The people shooting the videos get no money because they are using copyrighted content. So far thousands of Harlem Shake videos totalling tens of millions of views have been claimed by the copyright owners in order to be monetized.

“Often in these cases, whoever’s filming it is just doing it without getting permission,” says E. Michael Harrington, a music business professor and member of the Future of Music Coalition Advisory Board. “Even though it could be a very clever video…the copyright means a lot more.”

Neither YouTube nor Mad Decent would confirm how much money’s been generated from clicks on Harlem Shake videos, but Goggins says he expects it to be a “considerable amount.” Past viral hits on YouTube have generated big paydays for content owners. “Gangnam Style,” the viral sensation of 2012, earned Korean pop star Psy and his handlers a reported $870,000 from YouTube ad revenue alone. The amateur YouTube classic Charlie Bit My Finger video netted Charlie’s parents more than $150,000.

(MORE: Why Beyonce Made No Bills, Bills, Bills for Her Super Bowl Performance)

In some ways, the song “Harlem Shake” was distributed with virality in mind. When it debuted last May, Baauer offered it for free for the first month, a common tactic by his label to generate awareness of new music. Now people are excited to pay for it, as it’s topping the iTunes charts and recently debuted at No. 3 in the UK singles charts.

Not everybody gets to make a Harlem Shake video with no pushback from the content owners, though. When rapper Azealia Banks rapped over the entirety of “Harlem Shake” and posted it on SoundCloud, Baauer’s handlers had it removed, prompting a public spat between the two. “I can kind of see both sides of it,” Joppers says of the Banks-Baauer beef. “But it is a different situation when an artist takes an existing work and writes a new work with it without giving credit or anything else.”

Mostly, though, people have been given the go-ahead to do what they will with “Harlem Shake.” The on-the-fly licensing of the song to manic dancers everywhere exemplifies a potential new revenue stream for musicians that embrace the virality of the Internet.

(MORE: If a Meteorite Hits Your Home, Are You Insured?)

“The idea of trying to control everything seems futile because it’s like whack-a-mole,” says Harrington. ‘It’s going to get out, it’s going to get shared, so you may as well try to profit off of it.”