Wouldn't this just be a matter of adding a component at the page level which calls the Phoenix Socket function? This should be framework agnostic since the post you linked above just works with React.
Rails also has websocket support but those are not as performant as Phoenix