Monday, December 5, 2016

Re: Integrating Google Analytics with GWT (SPA) Application to capture the User Flow

Thanks jens..now my worry is if i add this global handler will it create performance issue?
 
Event.addNativePreviewHandler(new NativePreviewHandler() {
 public void onPreviewNativeEvent(final NativePreviewEvent event) {
   final int eventType = event.getTypeInt();
   switch (eventType) {
     case Event.ONMOUSEMOVE:
       //mouse tracking logic?
     System.out.println("mousemove clicked");
       break;
     case Event.ONCLICK:
    System.out.println("on clikc clicked"+Element.as(event.getNativeEvent().getEventTarget()).getAttribute("data-tracking"));
     
    googleAnalyticsTrackPageView(Element.as(event.getNativeEvent().getEventTarget()).getAttribute("data-tracking"));
     
       break;
     default:
       // not interested in other events
   }
 }
}); 

What is the best way to handle this?

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment