[Question] What is the correct way to use Google Analytics Plugin?

[Question] What is the correct way to use Google Analytics Plugin?

  

I tried to use the GA plugin but in the analytics web it shows nothing. 0 active user. 

Can someone help me? 

Thanks. 

Hello Karel,


Have you set the correct identifiers? Also, have you followed this post?


Cheers!

Armando Gomes wrote:

Hello Karel,


Have you set the correct identifiers? Also, have you followed this post?


Cheers!

Hi Armando,

Yes i did set the correct ID. and yes I did follow the post but didnt get the same result.

I dont know if the plugin load correctly. If i tried to debug in the browser, it says cordova not available. 


That's correct. Cordova plugins don't work in the browser. Check this piece of documentation, namely:

Use the Chrome browser in your PC to debug your mobile app if you don't need to execute native plugins, since they will not be available.

Any Cordova plugin is a native plugin. Also, take a look at this class from OutSystems.


EDIT: adding to this, you can always generate a native build for Android and use an Android Virtual Device (Android Studio) to debug your application. Please note that some plugins might not be able to work propertly, despite Google Analytics being plausible to work.


Let me know if this helps.