cmackay / google-analytics-plugin

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

Set User ID support #50

Closed haroondilshad closed 9 years ago

haroondilshad commented 9 years ago

Hey, thanks for the plugin. It just works. Do we have something like setUserId('my-user-id') with which the user specific things could be tracked? I need it in kind of an urgency

cmackay commented 9 years ago

Thanks @RonCan! To set the user id you should be able to set it using something like the below snippet. For more info on other params, this page has the supported features for the measurement protocol. All of which should work with the plugin. https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#uid

analytics.set('uid', '<the_user_id>');

Thanks!

-Craig