How to get one HTML page to layer views controlled by two different servers?

Here is what I have to do ...

I have a server that is a legacy php and java based stack that controls a website and the majority of the UX. I have another server that is a JavaScript stack that is the Looker Course "portal". I want to "embed" the looker portal into the view served by the legacy stack. I'm trying to figure out how I should "layer" the HTML view where the users interactions with the looker portal can be tracked and the HTML can be dynamically generated. Any advice?