Google Analytics Plugin

Integrate with Google Analytics to measure user interactions for your mobile and desktop apps.

Measure User Interactions

Send your app's page views or custom events to Google Analytics to learn more about the usage patterns of your apps.

Advanced Analytics

See how your users navigate through your apps, which content is the most valuable for your users and more.


The Google Analytics Plugin lets you measure user interactions for your mobile and desktop apps. It allows to track screen views and custom events to gain insights into your app's usage.

The two main methods for using the Google Analytics plugin and reports are GoogleAnalytics::logScreen and GoogleAnalytics::logEvent.

Example Usage

To see an integration example of the Google Analytics plugin have a look at the V-Play Plugin Demo app.

The GoogleAnalytics item can be used like any other QML item. Add a single instance of the item to the root item of your QML files:

 import VPlayPlugins 1.0

 GoogleAnalytics {
   id: ga

   // Property tracking ID from Google Analytics Dashboard
   propertyId: "UA-32264673-5"

You can then track screens like this (the onEntered signal :

 AboutScreen {
   onEntered: ga.logScreen("About")

To track custom events, e.g. from a button press, you can use the following code snippet:

 Button {
   text: "Start Game"
   onClicked: ga.logEvent("User Action", "Start Clicked")

Available QML Items


Google Analytics Plugin lets you measure user interactions for your mobile and desktop apps


Windows & macOS

Make sure to set the application identifier in your main.cpp file before initializing the QML engine:

 int main(int argc, char *argv[])
     QGuiApplication app(argc, argv);

     // Add this line to match your application identifier:

     QQmlApplicationEngine engine;

     return app.exec();

If you want to see information about the app version within the Google Analytics Dashboard add a second line just below the above:

 // Set your app's current version number here:

Note: If you're only using the iOS & Android version of the plugin you don't need to modify your main.cpp file, as these values are read from the underyling platform itself.

Google Analytics Account

Set up a Google Analytics user account at and create a new "Mobile App property like described here. You later on need the generated tracking ID (UA-xxxxxxxx-y).

Note: It usually takes some time for new properties to set up before Google Analytics shows some tracking data.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support