cmackay / google-analytics-plugin

Cordova Google Analytics Plugin for Android & iOS
Apache License 2.0
89 stars 43 forks source link

Events are not tracked on Android #8

Closed patrickschaper closed 10 years ago

patrickschaper commented 10 years ago

Devices: Any Android v4+ device (other Android devices not tested)

Description: Success callback function is called but no event is tracked at Google Analytics.

Call:

navigator.analytics.sendEvent(
            "app", 
            "webapp_loaded", 
            null, 
            null, 
            function() {
                console.log('Success - tracker has tracked event: "' + eventCategory + '" -> "' + eventAction + '" : "' + eventLabel + '"' + ' : ' + eventValue);
            },
            function() {
                console.warn('Tracking event: "' + eventCategory + '" -> "' + eventAction + '" : "' + eventLabel + '"' + ' : "' + eventValue + '" failed!');
            }
        );

Notes:

Work-around: It works when optional arguments event label and value are set (e.g. with empty string and 0). Null values will not work!

cmackay commented 10 years ago

@yesman82 Thanks a lot for the info. I appreciate the detailed description of the issue. I can add defaults for those values. I will hopefully get around to adding sometime in the next couple days and submit a new version or if you are interested in submitting a pull request feel free. If not no problem, I will update it. If you additional feedback or comments, let me know. Thanks!