The issue was with window.outerWidth == 0 in BAS, and some startnge code window.outerWidth || window.innerWidth from recaptcha service. If window.outerWidth == 0, so function, which calculates screen width, returned window.innerWidth which was always 304px, because code executed in captcha frame.
@Diya.3rif twitter email is a little bit tricky. They have fake url in email.
Anyway I prepared code for you that extracts url param from original url.
It uses split function to exctract query param like this