CQ's Presidential Support studies try to determine how often a legislator votes in line with the President's position:
CQ tries to determine what the president personally, as distinct from other administration officials, does and does not want in the way of legislative action. This is done by analyzing his messages to Congress, news conference remarks and other public statements and documents.
So, these studies only track votes when the President has an explicit, stated opinion on a bill. According to CQ, Senator John McCain has voted with President Bush 100% of the time in 2008 and 95% of the time in 2007: