cmackay / google-analytics-plugin

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

Custom timing #30

Closed ishaigor closed 9 years ago

ishaigor commented 9 years ago

Hi Craig

I checked the API of the plugin and could not find implementation for custom timing: https://developers.google.com/analytics/solutions/mobile-implementation-guide#timings. Would love to have that available.

Thank you for all the enhancements you already did :-) Irena

cmackay commented 9 years ago

Hi Irena,

I added support for user timing and published a new release. I haven't tested it thoroughly since it will take time for the user timing to show up in the reports. It appears to successfully send the timing request so it should be working. The call is:

// Sends a user timing
//
//  category    - String    (required)
//  variable    - String    (required)
//  label       - String    (required)
//  time        - Number    (required)
//  success     - Function  (optional)
//  error       - Function  (optional)
analytics.sendTiming(category, variable, label, time, success, error);

Let me know if you have any questions or comments.

Thanks,

-Craig

cmackay commented 9 years ago

Hi Irena,

I just checked the analytics console and the user timing data is showing up. Let me know if you have any additional ideas or comments.

Thanks,

-Craig