Google Analytics on Bada
Our company decided to add Google Analytics to one of our mobile applications. Almost immediately, I found a solution for J2ME , but I just did not find a ready-made solution for Bada. Since the Google Analytics API is just HTTP requests with the correct parameters, we can only implement this under Bada.
So here we go:
All we need to do is implement two queries: PageView, Event.
For this, I chose the architecture adopted in a similar solution for J2ME

The PageView and Event classes are inherited from the Request base class and override the url method. Url is formed from a set of parameters that are collected in the TrackingUrl class. Class Tracker is the manager to our requests. The PageView and Event requests are launched from the Tracker class as they are received - the AddRequestToQueue method. At the same time, the Tracker class can send only one request. Therefore, it is best to create a global variable of type Tracker at the project level.
The sequence of actions that trigger the request can be represented as the following diagram: In the test example, I added 2 buttons on the form that launch PageView or Event requests, respectively. The PageView request is used to enter statistics on visiting pages (forms) in your application. An example of running a PageView request:

Where pageTitle is the name or title of your
page (form).
Event request is used to enter statistics about the actions of your users in the application. For example, you can keep track of how often the user of your application clicks on a button. An example of starting an Event request: Where category is the name of the category, action is the user action (for example: select, clicked, etc.), label is additional data about the user action. Here you can download a test project with all source codes. Just remember to add your “tracking code”! I hope that this post will be useful for developers for the Bada mobile platform. I will be glad to comments and additions.
So here we go:
All we need to do is implement two queries: PageView, Event.
For this, I chose the architecture adopted in a similar solution for J2ME

The PageView and Event classes are inherited from the Request base class and override the url method. Url is formed from a set of parameters that are collected in the TrackingUrl class. Class Tracker is the manager to our requests. The PageView and Event requests are launched from the Tracker class as they are received - the AddRequestToQueue method. At the same time, the Tracker class can send only one request. Therefore, it is best to create a global variable of type Tracker at the project level.
The sequence of actions that trigger the request can be represented as the following diagram: In the test example, I added 2 buttons on the form that launch PageView or Event requests, respectively. The PageView request is used to enter statistics on visiting pages (forms) in your application. An example of running a PageView request:

String pageTitle = "Main page";
request = new PageView(pageTitle);
// Send "PageView" request
pTracker->AddRequestToQueue(request);
Where pageTitle is the name or title of your
page (form).
Event request is used to enter statistics about the actions of your users in the application. For example, you can keep track of how often the user of your application clicks on a button. An example of starting an Event request: Where category is the name of the category, action is the user action (for example: select, clicked, etc.), label is additional data about the user action. Here you can download a test project with all source codes. Just remember to add your “tracking code”! I hope that this post will be useful for developers for the Bada mobile platform. I will be glad to comments and additions.
String category = "Category";
String action = "Select";
String label = "Event button";
// Send "Event" request
request = new Event(category, action, label, 0);
pTracker->AddRequestToQueue(request);
// TODO: Add your tracking code here
String trackingCode = "Enter your tracking code here!";
pTracker = new Tracker();