You can technically place image requests just about anywhere that supports displaying images, as that's technically what an analytics server call is. If it doesn't, you can also send data directly to Analytics servers using an API call. This addresses about 99% of places where you can access/modify code.
I think your liveagent question is better suited towards the SFDC community, but if you are able to load JS files on the page, DTM would probably be the easiest way to accomplish it. Have a rule fire when the user enters the queue, and a rule that fires when connected with an agent.