It may have been a long time coming, but after a string of court cases and the advent of new technology, it appears that the music industry is finally winning the battle against illegal downloads.
Platforms such as iTunes and Spotify, which have given consumers a legal source of digital music, have helped to nullify the threat of illegal downloads. Global pop megastar Beyoncé has gone one step further: Her new album went straight onto iTunes this month, with no prerelease publicity in the hope that it would combat piracy.
Fresh data by analytics company Musicmetric have revealed that the album was downloaded more than 240,000 times via BitTorrents—file-sharing sites that facilitate the illegal download of music—in its first week after release. The album sold 991,000 legal copies in its first 10 days, according to Billboard.
While illegal downloads still remain high, what's intriguing, according to the London and Los Angeles-based firm, was the lack of file-sharing before the official release date. That was one of the "unequivocal" differences between Beyoncé's album and other major releases, Musicmetric said in a press release Monday.
But there's more. This data collated from BitTorrents are now being used for good, according to the company, effectively turning the pirates against themselves. Musicmetric said illegal downloads can be translated into extra sales in the long run.
"It's very global data, so you can start drilling down to what areas regionally an artist is popular," Gregory Mead, CEO of Semetric, which owns Musicmetric, told CNBC on Monday. "You can also see what other people are downloading along with, for example, the new Bruno Mars release. So you can start profiling fans all the way down to a town or a city level. So it's very useful marketing information."
Musicmetric told CNBC that the service is used by all major record labels in some form and enables the industry to pinpoint flaws in marketing campaigns and highlight growth potential.
It can therefore lead record labels to explore markets where their music is not available legally and can initiate opportunities for tours, merchandise sales and brand partnerships. For instance, the analytics software has highlighted growth potential in the South American market for the legendary heavy metal band Iron Maiden.
Brazil has the largest number of peer-to-peer file shares of Iron Maiden tracks, ahead of the U.S. and the U.K., the company said. Five South American countries, including Brazil, Venezuela, Mexico, Colombia and Chile, are also among the top 10 countries with the most Iron Maiden Twitter followers, it added.
(Read more: Did Beyoncé's album just prove marketing is dead?)
Musicmetric has recorded the major-label acts that had received the highest amounts of downloads this year. Bruno Mars, Rihanna and Daft Punk led the pack, it said, with the top twenty artists on the list receiving 64.5 million BitTorrent downloads in total.
Long considered to be a major hindrance to revenues, these peer-to-peer file-sharing sites have been fought by the industry. Napster, seen as the pioneer of BitTorrents, ceased operations in 2001 after running afoul of copyright infringement laws.
The iTunes music store, launched in 2003, gave consumers a legitimate way to buy digital music. iTunes has been joined by legal streaming sites such as Spotify and Deezer, which let users stream music live via an internet connection but also promote the legal purchase and download of tracks. The threat of illegal file-sharing has receded in the face of this multipronged attack.
According to research released in February by the NPD Group, a global information company, illegal music file-sharing declined significantly in 2012. The number of consumers using peer-to-peer (P2P) services to download music fell 17 percent from the 2011, it said. When P2P file- sharing peaked in 2005, one in five Internet users 13 and older (33 million people) used such services to download music. That number fell to 11 percent (21 million people) last year.
Streaming services are contributing to that downward trend, which is continuing, Mead at Semetric told CNBC. "The future shows a lot more streaming services, and that's going to start to become much more mainstream around the world," he added.
While there's evidence that streaming sites are helping the record industry, they aren't without critics.
Spotify, for example, went on a charm offensive recently to win back major artists who have criticized the way it pays royalties. Radiohead and Atoms for Peace frontman Thom Yorke called the service "the last, desperate fart of a dying corpse," arguing that Spotify pays musicians meagerly for streaming their songs.
in what it said is an attempt to bring more transparency to the process, the Swedish business, recently valued at $4 billion, has launched a new website explaining how royalties are paid to rights holders.
—CNBC.com's Matt Clinch. Follow him on Twitter