Facebook says it will shut down its controversial marketing feature Beacon, an application that broadcasts users' activities, including purchases, on other websites to their Facebook friends.

The feature was adopted in November 2007 and immediately drew complaints from Facebook users who said it invaded their privacy.

Beacon would track a Facebook user's purchases and other activities on partners' websites and add those activities to the user's feed. In December 2007, Facebook founder Mark Zuckerberg publicly apologized for the implementation of Beacon and allowed users to permanently turn off the tool.

Facebook said late Friday that Beacon would end completely as part of a class-action lawsuit settlement. The company, based in Palo Alto, Calif., also said it would pay $9.5 million US to create a foundation to promote online privacy, safety and security.

The proposed settlement must be approved by a judge.

Barry Schnitt, Facebook's director of policy communications, said in a release that Beacon and the controversy surrounding it "underscored how critical it is to provide extensive user control over how information is shared."

When it was launched in the middle of the holiday shopping season of 2007, a number of Facebook users complained that Beacon ruined some Christmas surprises.

One partner in Beacon was Blockbuster, meaning a user's movie rentals could be broadcast on Facebook. A class-action lawsuit alleged that the feature violated the Video Privacy Protection Act, which prohibits sharing video renting or buying habits without consent.

Some of the features of Beacon have been implemented in a separate feature, called Facebook Connect, which allows websites and desktop and iPhone apps to use Facebook login information.

Schnitt said Facebook Connect allows users to have much more control over how their online activities are shared with Facebook friends.