Sample Implementation
There are 2 methods that must be called for application analytics to perform correctly. These must be called after any of the configuration options have been set:
Insert a call to BangoAgent::onStartSession(QString), passing it your ApplicationId.
We recommend placing this call in the constructor method in your application.
MainWindow::MainWIndow
{
// Configuration options set
BangoAgent::onStartSession(ApplicationID);
// your code
}
Insert a call to BangoAgent::onEndSession() when a session is complete.
We recommend placing this call in the destructor method of your application.
MainWindow::~MainWIndow
{
BangoAgent::onEndSession();
// your code
}
You can then use either the generic method to log an event:
BangoAgent::onEvent(eventName, eventDetail, eventValue, eventParameters)
Alternatively you can use a predefined event method to log a predefined event type:
BangoAgent::onSearch(eventName, eventDetail, eventValue, eventParameters)
BangoAgent::onPageView(eventName, eventDetail, eventValue, eventParameters)