iPhoneTwo US senators on Wednesday introduced legislation aimed to make companies like Apple and Google obtain consent before collecting and sharing a customer’s location data. Senators Al Franken (D-Minn.) and Richard Blumenthal (D-Conn.) co-sponsored the bill, which is titled the Location Privacy Protection Act of 2011.

The location information obtained by firms such as Apple and Google and by app developers likely made consumers nervous back in April when it was revealed Apple’s iPhones were storing location data. Google had a similar incident not long after.

“Geolocation technology gives us incredible benefits, but the same information that allows emergency responders to locate us when we’re in trouble is not necessarily information all of us want to share with the rest of the world,” Franken said. “This legislation would give people the right to know what geolocation data is being collected about them and ensure they give their consent before it’s shared with others.”

Franken grilled Google and Apple executives in early May over the issue at a hearing called by the Senate Judiciary Subcommittee on Privacy, Technology, and the Law. “I love that I can use Google Maps — for free, no less,” Franken said at the time. “I love that I can look up the weather on my iPad. But we need a balance.”

Apple’s iOS and Google Android platforms already require users to consent when an app wants to use their location data, but not all of those users are aware that developers then share that location data with third parties.

As the bill makes its way through the Senate, and perhaps later the House, we’ll be sure to keep track of it just as close as your phone is keeping track of you.