The National Security Agency is secretly using the tools that enable Internet advertisers to track consumers, using "cookies" and location data to pinpoint targets for government hacking and to bolster surveillance.

The agency's internal presentation slides, provided by former NSA contractor Edward Snowden, show that when companies follow consumers on the Internet to better tailor their advertising, the technique opens the door for similar tracking by the government.

According to the documents, the NSA and its British counterpart, GCHQ, are using the small tracking files called cookies that advertising networks place on computers to identify people browsing the Internet. The intelligence agencies have made particular use of the "PREFID," part of Google tracking software known as the "PREF" cookie.