QInsightTracker Class

Control the Qt Insight Tracker and send events to the back-end server. 更多...

頭: #include <QInsightTracker>
qmake: QT += insighttracker
實例化: InsightTracker
繼承: QObject

公共函數

QInsightTracker ()
void clearCache ()
QInsightConfiguration * configuration () const
void interaction (const QString & name , const QString & category = QString()) const
void interaction (const QString & name , const QString & contextKey , double contextValue , const QString & category = QString()) const
bool isEnabled () const
void setEnabled (bool enabled )
void startNewSession ()
void transition (const QString & name ) const
void transition (const QString & name , const QString & contextKey , double contextValue ) const

詳細描述

QInsightTracker provides a C++ API that can be used to control the tracker and to send events to the back-end server.

成員函數文檔編製

QInsightTracker:: QInsightTracker ()

Constructs a tracker object. All tracker objects share the same back-end server and configuration.

void QInsightTracker:: clearCache ()

Clear all events from the local cache.

QInsightConfiguration *QInsightTracker:: configuration () const

Configure the tracker

另請參閱 QInsightConfiguration .

void QInsightTracker:: interaction (const QString & name , const QString & category = QString()) const

Send a interaction event name . The optional category parameter can be used to filter tracking of the events.

另請參閱 QInsightConfiguration::setCategories .

void QInsightTracker:: interaction (const QString & name , const QString & contextKey , double contextValue , const QString & category = QString()) const

Send a interaction event name with additional context data. Context data can be sent as a key/value pair in contextKey and contextValue . The optional category parameter can be used to filter tracking of the events.

另請參閱 QInsightConfiguration::setCategories .

bool QInsightTracker:: isEnabled () const

Is tracking enabled. Returns true if tracking is enabled

另請參閱 QInsightTracker::setEnabled .

void QInsightTracker:: setEnabled ( bool enabled )

Enable or disable tracking.

另請參閱 QInsightTracker::isEnabled .

void QInsightTracker:: startNewSession ()

Start a new session A new session id is generated and then used in all subsequent events.

void QInsightTracker:: transition (const QString & name ) const

Send a transition event name . Use transition events to track the current state of the UI. Transition events can be sent whenever your application changes UI views or states, or whenever there are other UI flow changes such as dialog and notification pop-ups.

void QInsightTracker:: transition (const QString & name , const QString & contextKey , double contextValue ) const

Send a transition event name with additional context data. Context data can be sent as a key/value pair in contextKey and contextValue . Use transition events to track the current state of the UI. Transition events can be sent whenever your application changes UI views or states, or whenever there are other UI flow changes such as dialog and notification pop-ups.