summaryrefslogtreecommitdiffstats
path: root/libraries/ganalytics/README.md
blob: d7e1e33c7d524f74e33ce34747d4916b4d4963b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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.