Only if the internet service provider AND the specific web site BOTH record, retain, and offer that data.
Actually it is more complicated than that. Though this in theory would be about foreign nationals getting visas to enter the US, so that would negate what goes on in the US.
In the US the NSA does broad data collection and requires ISP's to cooperate.
https://en.wikipedia.org/wiki/Utah_Data_Center
Documents leaked to the media in June 2013 described PRISM, a national security electronic surveillance program operated by the NSA, as enabling in-depth surveillance on live internet communications and stored information.[10][11] Reports linked the data center to the NSA's controversial expansion of activities, which store extremely large amounts of data. Privacy and civil liberties advocates raised concerns about the unique capabilities that such a facility would give to intelligence agencies.
<snip>
An article by Forbes estimates the storage capacity as between 3 and 12 exabytes in the near term, based on analysis of unclassified blueprints, but mentions Moore's Law, meaning that advances in technology could be expected to increase the capacity by orders of magnitude in the coming years.
Anywho, back to foreigners...there is a huge difference between large scale data sweeps like PRISM, and targeted hacking/monitoring/tracking of specific individuals digital footprint. Yeah, if the CIA thinks they have a link to a major player (like a key leader in al Qaeda), they would put major resources into probing even in most any foreign nation legally within that nation or otherwise. And even then, I'm sure they have a significant failure rate, whatever it might be. If it was a friendly western country, they would probably as their respective intelligence agency to probe if allowed. The US certainly can't make foreign ISP's cooperate with broad data collation, never mind the mind boggling data storage and processing requires of such metadata.
However, in the context of dealing with 10,000,000 visa applications a year, this is utterly absurd. Specifically, the US agencies absolutely could not chase down all the userid's on their own. And even if given them by 10 million potential visitors, the US has almost no capacity to root around to learn anything by it. Even assuming they could reduce the 10 million to 500,000 of the most suspicious, that would be a hell of a lot of manual investigation effort to try and find anything. Even assuming that some cubical warrior could search thru one person's application information and digital footprint in a day, this person could only process 250 applicants a year. They would need 2,000 employees and another massive data center to search thru such noise. Never mind how does one investigate some guy out of Riyadh, Karachi, or Ankara? I'm sure the CIA has lots of mind blowing tools to do all sorts of nefarious things (
Stuxnet), but to do this against simple visa applicants...again utterly absurd.
Then again, in Yorkshire...
http://www.datacenterknowledge.com/archives/2016/10/07/intercept-theres-nsa-data-center-uk/
Menwith Hill Station in North Yorkshire is the largest base NSA spies have built outside of the US. The facility’s scope has widened from its original purpose of monitoring Soviet communications during the Cold War to playing a key role in the NSA’s global surveillance network.
The 10,000-square foot data center was built between 2009 and 2012 as part of a new $40 million operations building at the base, according to The Intercept. No further details have been revealed about the server farm, other than its purpose of storing and analyzing data collected through intercepted communications.