1
votes

I'm using IBM MFP 7.1 and trying to send simple custom data to localhost server. The code is like this:

.controller('favoriteButtonCtrl', function($scope) {
    var event ='';
    $scope.ButtonA = function(){
      event = {buttonPress: 'buttona'};
      WL.Analytics.log(event, 'Custom event for button A press');
      WL.Analytics.send();
      alert(event.buttonPress);
    };
    $scope.ButtonB = function(){
      event = {buttonPress: 'buttonb'};
      WL.Analytics.log(event, 'Custom event for button B press');
      WL.Analytics.send();
      alert(event.buttonPress);
    };
    $scope.ButtonC = function(){
      event = {buttonPress: 'buttonc'};
      WL.Analytics.log(event, 'Custom event for button C press');
      WL.Analytics.send();
      alert(event.buttonPress);
    };
})

First try attempt was successful i can create a pie chart using the data. However, when i retry after sometime (using different network and i did clear cache and cookies of my browser) i can not get any new data from my app.

It was recorded on server log not on Analytics level but Trace level.

1
What do you mean "using different network" Is your application able to connect to the MobileFirst server? Is your device on the same network? What are your JNDI property for wl.analytics.url?Chevy Hungerford
I'm using different internet connection thus my ip changed while i still use localhost (in case it might be the cause). I'm using development server and didn't change any default properties.rizkiana novitasari
Just now i'm using my first internet connection. Clean the project and restarted the server. and it works again! all the data add up and i saw the custom data on analytic dashboard. I'm wondering what went wrong...rizkiana novitasari

1 Answers

1
votes

From the comments:

Just now i'm using my first internet connection. Clean the project and restarted the server. and it works again! all the data add up and i saw the custom data on analytic dashboard. I'm wondering what went wrong...

It appears this is a user error by connecting to a different network than the one the server was running on, thus it would be not possible to collect data if the server and the device are not on the same network...