Hello,
I want to be able to create Google Analytic's Events from GWT. I am
able to call the trackPageview method but not the trackEvent from GWT
using JSNI.
Working:
public static native void trackPageView(String pageName)
/*-{
$wnd.pageTracker._trackPageview(pageName);
}-*/;
NOT Working:
public static native void trackEvent(String category, String action)
/*-{
$wnd.pageTracker._trackEvent(category, action);
}-*/;
Any ideas??
also from the HTML page i am able to track events by calling this
method in the onclick tag: pageTracker._trackEvent('category',
'action');
i also tried:
public static native void trackEvent(String category, String
action)
/*-{
try{
var ga = $wnd._gat._getTracker("UA-
XXXXXX");
ga._setSessionTimeout("5");
ga._initData();
ga._trackEvent(category, action);
}
catch (err) {}
}-*/;
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=.