QInsightTracker Class▲
-
Header: QInsightTracker
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS InsightTracker)
target_link_libraries(mytarget PRIVATE Qt6::InsightTracker)
-
qmake: QT += insighttracker
-
Inherited By:
-
Instantiated By: qml-qtinsighttracker-insighttracker.xml
-
Inherits: QObject
I. Detailed Description▲
QInsightTracker provides a C++ API that can be used to control the tracker and to send events to the back-end server.
II. Member Function Documentation▲
II-1. QInsightTracker::QInsightTracker()▲
Constructs a tracker object. All tracker objects share the same back-end server and configuration.
II-2. [default] QInsightTracker::~QInsightTracker()▲
Destroys the tracker object and frees all allocated resources.
II-3. void QInsightTracker::clearCache()▲
Clear all events from the local cache.
II-4. QInsightConfiguration *QInsightTracker::configuration() const▲
II-5. bool QInsightTracker::isEnabled() const▲
Is tracking enabled. Returns true if tracking is enabled
II-5-1. See Also▲
See also QInsightTracker::setEnabled
II-6. void QInsightTracker::sendClickEvent(const QString &name, const QString &category, int x, int y) const▲
Send a click event name. Event can have extra details with category and click coordinates x and y.
II-7. void QInsightTracker::sendClickEvent(const QString &name, const QString &category, int x, int y, const QString &contextKey, double contextValue) const▲
This is an overloaded function.
Send a click event name with additional context data. Event can have extra details with category and click coordinates x and y. Additional context data can be sent as a key/value pair in contextKey and contextValue.
II-8. void QInsightTracker::sendScreenView(const QString &name) const▲
Send a screen view event name.
II-9. void QInsightTracker::sendScreenView(const QString &name, const QString &contextKey, double contextValue) const▲
This is an overloaded function.
Send a screen view event name with additional context data. Additional context data can be sent as a key/value pair in contextKey and contextValue.
II-10. void QInsightTracker::setEnabled(bool enabled)▲
II-11. void QInsightTracker::startNewSession()▲
Start a new session A new session id is generated and then used in all subsequent events.