A simple example of a metric that doesn't worry about updating history, and just updates a single value in response to an action. This is for apps that cannot simply increment by a fixed amount.
#include <QtCore/QCoreApplication>
int main(int argc, char *argv[]) {
QCoreApplication application(argc, argv);
manager->add(
"<b>%1</b> photos taken today").emptyDataString(
"No photos taken today").textDomain(APP_ID)));
PhotoLibrary photoLibrary;
metric->update(photoLibrary.size());
return 0;
}