Updated script to include browser window/tab close

Added GTM datalayer event on browser window or tab close