Hi I am new to the Mobile First analytic . I Created one Mobile First native android project and now i want to integrate analytics with that. I am mentioning code snippet using for analytics.
WLAnalytics.setContext(this); // Inside onCreate Meathod of my activity WLAnalytics.enable();
String json = "any";
try {
WLAnalytics.log("Custom event", new JSONObject(json));
} catch (JSONException e) {
e.printStackTrace();
}
WLAnalytics.send();
and i followed below mentioned article for that
Try this:
WLAnalytics.setContext(this);
WLAnalytics analytic = new WLAnalytics();
try {
analytic.log("this", new JSONObject("{\"android\" : \"message\"}"));
} catch(Exception e){
}
analytic.send();
You are not creating a JSON message. My key is 'android' and my value is 'message'