Cordova/PhoneGap Custom Events for Analytics

I'm attempting to integrate some custom events to trigger automations from my Cordova/PhoneGap app, but I don't see anywhere in the cordova plugin documentation on how to do this. Is it not possible using the plugin? If not, does anyone know how I can send a custom event using cordova?


Didn't find what you were looking for?

New post



  • Hi Keenan,

    Custom events are supported with the Urban Airship PhoneGap plugin. While we don't currently offer a direct method to create a custom event, we do offer a method to run actions in our actions framework which can be used to create a custom event.

    To trigger the custom event action you'll use the runAction() method. Here's our documentation on that.

    For example:

    var event = { 
    "event_name": "User event occurred", 
    "event_value": 1.00 
    UAirship.runAction("add_custom_event_action", event)

    The event value is optional and the "add_custom_event_action" is the key that our SDK will recognize to create the custom event.

    Comment actions Permalink
  • AHA! Perfect, thanks!

    Comment actions Permalink
  • Version 6.2.0 of the Urban Airship PhoneGap/Cordova Plugin now includes a direct method for adding Custom Events. 

    var event = {
        "name": "Event name",
        "value": 123.45
    Comment actions Permalink

Please sign in to leave a comment.