On the back of a fine midweek triumph at Notts County, Stevenage cemented second spot with only their second home win of the campaign, to leave the Iron in a precarious 22nd place.
Despite the gulf between the two sides in the table it was mostly even with Mark Duffy and Leon Clarke going close for the visitors, but they had no response to Tansey's 75th minute strike.
In an uneventful first-half, Boro had the game's first meaningful attempt, as Filipe Morais' centre eventually fell to Tansey, whose curling effort from the edge of the box struck the crossbar. At the other end, Mark Duffy went close for The Iron, as he fired narrowly over from 20 yards.
It was Boro who started the brighter after the interval, and Robin Shroot, who netted the winner on Tuesday, let fly from distance, forcing Sam Slocombe into a smart stop down low to his right. In response, the excellent Clarke bustled his way into the box before seeing Steve Arnold palm his near-post strike behind for a corner.
But with quarter of an hour to play, Tansey's masterful 25-yard free-kick curled beyond the despairing dive of Slocombe and into the top corner.