example.com has a link on their website which is on same domain like,
<a href="https://example.com?ref=mywebsite.tld">Reference</a>
example.com?ref=mywebsite.tld
doesn't redirect with 302/301, it's just opening a blank page with a few line of javascript code and redirect to our website with javascript on page load,
location.href = "http://mywebsite.tld"
Does Google count this type of redirection as backlink?