Is it correct to contract who + had= who'd ??????
Who had been there before you? = Who'd been there before you ?
Yes it's correct in informal English.
But remember "who'd" can also be a contraction for 'who would'.
e.g. 'Who'd have guessed?"