PlaceHistoryHandler and Analytics

20 views
Skip to first unread message

Jake Wharton

unread,
Sep 15, 2011, 9:37:56 AM9/15/11
to google-we...@googlegroups.com
I'm trying to implement analytics tracking in our Place-based GWT 2.2 webapp and finding some trouble listening to History's ValueChangeEvent. The events seem to not be firing as a result of the false argument on this line.

I have tried adding the listener both to the History class directly and in a PlaceHistoryHandler.History implementation but neither seem to be receiving callbacks. Using the PlaceChangeEvent is also unsatisfactory because it is fired before the token is updated.

Is there another method I should be using track history to fire analytics tracking?

Thomas Broyer

unread,
Sep 15, 2011, 9:51:02 AM9/15/11
to google-we...@googlegroups.com
How about providing your own Historian (extending DefaultHistorian) to PlaceHistoryHandler and track changes in the Historian's newItem method (after delegating to super.newItem so that the token is updated)?

Jake Wharton

unread,
Sep 15, 2011, 10:00:26 AM9/15/11
to google-we...@googlegroups.com
That indeed did work. Thank you.
Reply all
Reply to author
Forward
0 new messages