package com.cjmalloy.analytics.client;

public class GoogleAnalytics
{

    public static native void sendEvent(String category, String action) /*-{

        $wnd.ga('send', 'event', category, action);
     }-*/;

    public static native void sendEvent(String category, String action, HitCallback callback) /*-{

        $wnd.ga('send', 'event', category, action,
            {'hitCallback': $entry(function(){callback.@com.cjmalloy.analytics.client.GoogleAnalytics.HitCallback::call()();})});
     }-*/;

    public static native void sendEvent(String category, String action, String label) /*-{

        $wnd.ga('send', 'event', category, action, label);
     }-*/;

    public static native void sendEvent(String category, String action, String label, HitCallback callback) /*-{

        $wnd.ga('send', 'event', category, action, label,
            {'hitCallback': $entry(function(){callback.@com.cjmalloy.analytics.client.GoogleAnalytics.HitCallback::call()();})});
     }-*/;

    public static native void sendEvent(String category, String action, String label, int value) /*-{

        $wnd.ga('send', 'event', category, action, label, value);
     }-*/;

    public static native void sendEvent(String category, String action, String label, int value, HitCallback callback) /*-{

        $wnd.ga('send', 'event', category, action, label, value,
            {'hitCallback': $entry(function(){callback.@com.cjmalloy.analytics.client.GoogleAnalytics.HitCallback::call()();})});
     }-*/;

    public static void trackHistoryEvent(String historyToken)
    {
        sendEvent("gwt-history", "click", historyToken);
    }

    public static void trackOutboundLink(String url)
    {
        sendEvent("outbound", "click", url);
    }

    public static void trackOutboundLink(String url, HitCallback callback)
    {
        sendEvent("outbound", "click", url, callback);
    }

    public static interface HitCallback
    {
        void call();
    }
}

@@ -1612,16 +1612,19 @@
 oryToken
+, 1
 );%0A    %7D
@@ -1726,16 +1726,19 @@
 ck%22, url
+, 1
 );%0A    %7D
@@ -1863,16 +1863,19 @@
 k%22, url,
+ 1,
  callbac

Set default value to 1. Needed for goals.