Qt Insight Tracker Overview

Tracking Application Usage

You can use Qt Insight Tracker to track application usage with two event types: screen view events and click events.

Use screen view event to get insight into how users navigate your application. You can track events whenever your application changes views or has similar UI flow changes.

From QML code, this can be done for example with:

    onStateChanged: InsightTracker.sendScreenView(applicationFlow.state);

Use click events to track which part of UI user most often clicks. Individual UI elements can send the event with QML code:

    MouseArea {
        anchors.fill: parent
        onClicked: {
            InsightTracker.sendClickEvent(root.text, root.InsightCategory.category, mouseX, mouseY);
        onPressed: {
            glow.visible = true

Some additional information about the device (model, variant, screen resolution, and screen type) and the application (version, build, and Qt version) is sent automatically on the application start.

A UUID is generated on the first use of Qt Insight Tracker and used in all the events sent to the back-end server. It can identify all the events coming from one particular device but not individual users.

Enabling Tracking

Qt Insight Tracker does not collect or send any data unless the application explicitly enables it through the API. The application must have user's concent before enabling the tracking.


You can configure Qt Insight Tracker with a JSON configuration file and with C++ and QML APIs. The configuration file is read at startup and you can change the values from application code. You must make all configuration changes before enabling the tracking.

To configure Qt Insight Tracker using a configuration file, add the following JSON file:

    "server" : "collect-insight.qt.io",
    "token" : "00000000-0000-0000-0000-000000000000",

A token is used to match the data your application sends to your Qt Insight Organization and you can find your token from the Qt Insight Console.

To configure Qt Insight Tracker from your application, add the following to your QML code:

InsightConfiguration {
    token: "1234"
    syncInterval: 3600

or your C++ code:

QInsightTracker tracker;

For more details on the configuration file syntax and the API, see QInsightConfiguration.

Event Caching

By default, the tracked events are cached locally before being sent to the back-end server. The tracked info is then retained if network connectivity is not available or the application exits before the data has been sent. An SQLite database is used for caching, but the implementation allows adding other storage types later.

Event Filtering

Certain events can be filtered before they are sent to the back-end server. This can be done with catogories which can be attached to the QML components using InsightCategory or used in the API calls.

Then you can configure the tracker with QInsightConfiguration::setCategories() to only track events with matching category.

© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.