Google Analytics for Construct 2 and CocoonIO

Google Analytics

Google Analytics helps you to track your user behaviors in your game. This will deliver data for improving your game to fit the users needs.


At the moment Cocoon has no offical Analytics plugin, yet. But you can use the “Cordova Analytics” Plugin made by Cranberrygame.


Note, you’ll need a premium plugin by Cranberrygame in order to use Google Analytics in your Construct 2 game. Please get it here

[creativ_button url=”″ icon=”shopping-cart” label=”Cranberrygame – Cordova Plugins for C2″ colour=”green” colour_custom=”” size=”medium” edge=”straight” target=”_blank”]

Install the Plugin

Once you own a license for the Cordova Plugin package by cranberrygame, unzip it and go to the …\12_Cordova_extension_analytics\… folder and drag’n’drop following file into Construct 2.



Then a little window pops up. Click Install.


Restart Construct 2, then the plugin can  be used.

Construct 2 Code

Now you can import the plugin into your Construct 2 project.


The plugin overs two actions.

  • Track Screen (for the current screen like “settings”, “game” and so on)
  • Track Event (for tracking, for instance what button gets pressed and so on)

So you can create a global event sheet and a function in order to track your events and screens, or you add a tracking action to each event (I recommend to use a function). We will provide an example file soon.

Google Analytics Tracking ID


It seems that Google Analytics is not allowing to add analytics for apps and games anymore. They only offer Firebase now as analytics tool. However there is no working Construct 2 plugin yet.

Login to your Google Analytics account over here.

[creativ_button url=”” icon=”” label=”Google Analytics” colour=”orange” colour_custom=”” size=”medium” edge=”straight” target=”_blank”]

Then go to the “Manage” tab and create a new property.


After that, select “Mobile App” and enter the needed information like the app name.


Click on Create ID in order to get your ID. Copy your ID from here and insert it at the Cordova GoogleAnalytics Plugin.


For that, just select the plugin in your Construct 2 project.


Install the plugin in Cocoon

Please visit your Cocoon Dashboard and select your project.

[creativ_button url=”” icon=”user” label=” Dashboard” colour=”blue” colour_custom=”” size=”medium” edge=”straight” target=”_blank”]

Then go to the “Plugins” tab and choose “Custom”. Enter there following Repo-URL.

Please note, that the link above doesn’t work anymore with the latest Cocoon version. Please use this link instead.



and click Install. (Don’t forget to save then!)


Build your game and you’re done! Google Analytics will show the first data in the next few hours.

Updated on January 31, 2021
Was this article helpful?

Related Articles

Not the solution you were looking for?
Click the link below to submit a support ticket
Visist our Forum!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.