Analytics Tracking - Page Title and other RPC values

30 views
Skip to first unread message

Shawn Johnson

unread,
Aug 26, 2015, 2:25:58 PM8/26/15
to GWTP
Hi, We are using GWTP 1.4 with Universal Analytics.  We currently have setup the standard page view to fire onNavigation.

We have been setting our Page Title on some pages in our Presenter, and in other cases it is not setup until after the RPC returns.  Because the Navigation Event has already fired, we end up tracking the Page Title from the previous page.

Another thing that I'd like to do is include some custom dimension values with the page view tracking request.  These again aren't available until after the RPC has returned in the Presenter.

Is there a better way to setup my tracking so that I could set or add-in the additional metadata?  My initial thought was if there was something like the Client Action Handlers for Events, I could intercept the standard Navigation Tracking.  I would still have some kind of unusual need for a wait for data that may or may not come.  Maybe I could extend the NavigationEvent, but not sure how I'd plugin which places use the standard and which use the extended navigation event.

Any ideas?

Thanks!

Richard Wallis

unread,
Aug 27, 2015, 12:55:29 PM8/27/15
to gwt-pl...@googlegroups.com
Not sure there's an elegant solution to this.

Maybe setup a class that catches a custom event and then sets the Window Title and does the analytics call.

Then after your rpc call do something like:

fireEvent(new MyPageNavigationEvent("My Page Title"));  where you were setting the page title before.

And you can adapt the event to include your custom tracking data as well.

--
You received this message because you are subscribed to the Google Groups "GWTP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gwt-platform...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shawn Johnson

unread,
Oct 5, 2015, 6:56:39 PM10/5/15
to GWTP
I agree, I think I have to bite the bullet and just let go of the dream of having the Tracking work tied to the Navigation event.  We already have an event we fire to set the page title and a few other items, we'll likely hook the Tracking into that same event.  Just have to go through and make sure every place is covered by that path.
Reply all
Reply to author
Forward
0 new messages