We are using MFP 8 which is in bluemix. We tried logging some custom logs to MFP analytics, but it is not getting captured. This is a Cordova app. And there are no error logs also while sending logs to analytics server. As I am new to this, any help would be greatly appreciated.
Asked
Active
Viewed 273 times
0

Dalin Huang
- 11,212
- 5
- 32
- 49

Nirmal Pandey
- 21
- 1
- 5
-
I am assuming that you are using Mobile Foundation service on Bluemix. If so, did you create the Analytics based container via the service? Also, is it just the custom logs that are not being seen in the analytics console or all the data are missing? Can you please give more details – Srikanth K M Apr 25 '17 at 05:46
1 Answers
2
Make sure the App has connected successfully to MFP server before sending the custom data
Code should look like
WL.Analytics.log({"myKey" : "myValue"});
WL.Analytics.send();
View using Analytics console > Apps > Client Log Search - Click search button
Reference: Using Analytics API in Client Applications

krckumar
- 544
- 4
- 21
-
Thanks @Kumar for your response..... But we are already using it.... Do we need to do any configuration in config file? Or any specific sequence need to be follow? – Nirmal Pandey Apr 25 '17 at 05:25
-
If you are using mfp-devkit it is well and good by default analytics is configured. If you are using analytics installed separately you need to configure it manually https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/installation-configuration/production/analytics/configuration/ – krckumar Apr 25 '17 at 05:37
-
JNDI Properties to be configured on MFP Server : mfp.analytics.console.url, mfp.analytics.url, analyticsconsole/mfp.analytics.url, mfp.analytics.username, mfp.analytics.password – krckumar Apr 25 '17 at 05:43
-
we are using mfp-devkit only.....in app.js file using below code to activate logging >>>> WL.Logger.config({capture: true}); WL.Logger.config({autoSendLogs: true}); WL.Logger.config({ level: 'DEBUG' }); WL.Logger.config({ level: 'INFO' }); and in respective controller to capture and send event logger.debug('User clicked on '+obj.title); logger.info('User clicked on '+obj.title);WL.Analytics.log({"myKey" : "myValue"}); WL.Analytics.send(); – Nirmal Pandey Apr 25 '17 at 06:45
-
Were you able to see the App related data on Analytics or just custom logging? This is to make sure the analytics is healthy. I missed to see that you are using Analytics on Bluemix. Please make sure the MFP server's data is flowing to analytics. – krckumar Apr 25 '17 at 11:45