Reported by Michal:
I checked this setApiUrl method for js tracker and there seems to be problem with order of executing fuctions
for some reason trackPageView gets triggered before setAPIUrl and therefore overlay isn't initialized with proper URL
if I put 'trackPageView' in setTimeout statement, then it works ok but I believe it's not a proper solution to this
In c27698f29129c1fe31f9572336620ef2e920276c: Fixes #4856 Make sure setAPIUrl, when called, is executed before any other request is sent.