Javascript Redirect goes to Wrong Domain

I have a redirect that happens after a user submits a form. Users should move through the funnel like this: --->

Problem - The redirect ignores the domain name (i.e. SiteB). It sends visitors to

Here's the code:

        var tracker = ga.getAll()[0];
        var linkerParam = tracker.get('linkerParam');
                 var url = '' + linkerParam;
        window.setTimeout(window.location = url, 4000);

This code is meant to append Google Analytics cross-domain tracking code. The form plugin (Formidable Pro) also has a redirect option built-in. When activated, it also redirects to the wrong page.

I'm not sure where to start looking. I had added a Category Base in Permalinks. I've just removed it, hoping this might be the problem. Any ideas / help would be greatly appreciated!