Chrome Custom Tab Help

Is it possible for the chrome custom tab to activate a block when you close the tab? I am trying to make it so when you close the screen, it will signal to display an advertisement.

I don’t think it is possible but I think you can do this logic for WebViewer.