dcrandall
9 years agoVisitor
Analytics, how do I know when a window is closed, elegantly?
Letting analytics know a new screen has opened is pretty trivial.
Letting analytics know a screen has gone out of scope and closed, or been closed with the .Close() function, is not very easy to do, elegantly.
Right now I have a pretty depthy (gets to like 6-8 screens) application using the screen stack model.
What I need is some way to let analytics know "oh, they closed that window, tell analytics that I'm seeing the window 'underneath' again"
Currently I do, by maintaining a separate stack/last. Before a screen gets closed, I call a 'notify analytics of a close' which will re show the screen underneath to analytics.
There has to be a better way. Ideas?
Letting analytics know a screen has gone out of scope and closed, or been closed with the .Close() function, is not very easy to do, elegantly.
Right now I have a pretty depthy (gets to like 6-8 screens) application using the screen stack model.
What I need is some way to let analytics know "oh, they closed that window, tell analytics that I'm seeing the window 'underneath' again"
Currently I do, by maintaining a separate stack/last. Before a screen gets closed, I call a 'notify analytics of a close' which will re show the screen underneath to analytics.
There has to be a better way. Ideas?