Google analytics event /goal tracking for hubspot forms & chat with google tag manager

And regarding the Chat actions? I´ve been not able to fully understand how to track actions on the live chat such as email submission and open chats.