Sen. John Rockefeller (D-W.Va) on Friday said he will introduce a “do not track” bill that would allow consumers to block Web sites and marketers from tracking their activity on the Internet.

The bill, to be released next week, comes amid heightened interest by lawmakers in creating new online consumer privacy rules following a hacker attack on Sony PlayStation data and the logging of user location information on Apple’s iPhone and Google Android phones. Rockefeller’s bill is separate from a more comprehensive bill on privacy and security.

“Consumers have a right to know when and how their personal and sensitive information is being used online—and most importantly to be able to say ‘no thanks’ when companies seek to gather that information without their approval,” Rockefeller said in a release.

The legislation, called “Do-Not-Track Online Act of 2011,” works off recommendations by the Federal Trade Commission for such a mechanism.

Specifically, the bill would require online companies to honor a consumer choice not to be tracked online. It would require the Web company to destroy or make anonymous information about users once it is no longer useful. And it would put the FTC in charge of enforcement of companies that violate the law.

Do-not-track mechanisms could vary. But the FTC points to technology introduced voluntarily by Microsoft and Mozilla for their browsers that allow users to control who gets to see their Web activity.

Companies such as Google, Yahoo, Facebook and Time Warner have opposed similar legislation in California that would create a state-mandated “Do Not Track” law for the Internet.

The White House for the first time in April said it supports an Internet privacy law. Reps. Ed Markey (D-Mass) and Joe Barton (R-Tex.) also Friday introduced a do-not-track bill for children and new guidelines against marketing to teens.

Related stories:

Lawmakers introduce youth Do Not Track on Internet bill

Wireless carriers reveal location privacy policies