eBay's top two affiliate marketers have been arrested after allegedly defrauding the online auction site of millions of dollars.

Shawn Hogan and Brian Dunning pleaded guilty to wire fraud after a collaborative sting operation between the FBI and eBay revealed that the two had separately employed cookie stuffing schemes to collect a total of $35 million from eBay's affiliate marketer program.

The aforementioned program encourages individuals to push ads or links for ongoing auctions on their own networks. If an ad leads to sale, eBay gives the affiliate a certain percentage of the profit. Currently, 26,000 individuals partake in the affiliate program.

Hogan and Dunning were able to game the system with clever—and illegal—schemes that would credit them for referring buyers to the site. Hogan developed a widget called Geo Visitors, which tells bloggers and website owners where in the world readers are coming from. Dunning developed a similar widget called WhoLinked, which told web pages who had linked to them. The two widgets provided useful data to those who installed them. It also installed a tracking cookie on anyone who clicked on them.

The cookie would indefinitely keep track of what sites a user was browsing (unless that person cleared his or her browser). If at any point, that individual ended up on eBay and purchased something, the cookie would notify eBay that the sale should be credited to Hogan or Dunning.

The widgets worked like gangbusters. According to an in depth report by Business Insider, who broke the story, Hogan's widget stuffed 650,000 eBay cookies, while Dunning's stuffed 20,000. This scheme resulted in huge profits for both men. Hogan collected close to $28 million, while Dunning made a more modest $7 million.

eBay wised up to the schemes when Dunning's brother Todd snitched on Hogan in 2006. eBay conducted an initial investigation, but it didn't yield anything.

Eventually, the company implemented "Trip-Wire," a sting operation that would catch both scammers. The company installed a small, invisible GIF on its homepage. The GIF would load for anyone who spent time on the site, something Hogan and Dunning's so-called referrals weren't doing. According to eBay, more than 99 percent of traffic coming from these two men were faked.

Hogan and Dunning not only maintain that eBay knew exactly what they were doing, but that the company had actively encouraged them to up their fraudulent activity. Hogan details in a 2010 blog post that he was treated to dinner at a fancy Las Vegas restaurant by company executives so that they could discuss how he could drive more traffic to the site.

During that dinner, the eBay execs made mention of a "black budget," a "large allotment of money that eBay was free to do what they wanted with," in an effort to get him on board.

For their part, eBay dismisses these claims, telling Business Insider that the company "has zero tolerance for criminal activity on its platforms," and that they "are pleased that justice has been served in this matter."

The two pleaded guilty to the charge of wire fraud. They will be sentenced later this year and could face up to 20 years of prison.

H/T Business Insider | Photo via Ryan Fanshaw/Flickr