MultiMC5/libraries/ganalytics
Petr Mrázek d5fdc23eb2 NOISSUE dumb down Windows version detection...
Hopefully the analytics thing will accept it this time.
2016-11-25 00:39:15 +01:00
..
include NOISSUE add analytics settings (enable/disable) 2016-11-24 04:10:07 +01:00
src NOISSUE dumb down Windows version detection... 2016-11-25 00:39:15 +01:00
CMakeLists.txt NOISSUE send custom analytics values 2016-11-22 02:46:18 +01:00
LICENSE.txt NOISSUE import google analytics from third party 2016-11-20 12:04:29 +01:00
README.md NOISSUE import google analytics from third party 2016-11-20 12:04:29 +01:00

qt-google-analytics

Qt5 classes for providing google analytics usage in a Qt/QML application.

Building

Include qt-google-analytics.pri in your .pro file.

Using

Please make sure you have set your application information using QApplication::setApplicationName and QApplication::setApplicationVersion.

In C++:

GAnalytics tracker("UA-my-id");
tracker.sendScreenView("Main Screen");

In QtQuick:

Register the class on the C++ side using qmlRegisterType<GAnalytics>("analytics", 0, 1, "Tracker");

Tracker {
  id: tracker
  trackingID: "UA-my-id"
}

[...]
tracker.sendScreenView("Main Screen")

There is also an example application in the examples folder.

License

Copyright (c) 2014-2016, University of Applied Sciences Augsburg. All rights reserved. Distributed under the terms and conditions of the BSD License. See separate LICENSE.txt.