Integrate Google Analytics with Phonegap Application / Apache Cordova with Example

Integrate Google Analytics with Phonegap Application / Apache Cordova with Example

Want create site? Find Free WordPress Themes and plugins.

Tracking user activities / behaviour is very important for business success. In Phonegap Application we’re going to use Google Analytics for tracking user activities . By using google-analytics-plugin we can track user activities, Clicks, Screens, Events, Transactions and more

Screen Shot 2015-07-10 at 6.50.55 pm

Steps for integrate Google Analytics with Phonegap Application

Step1 : Login or Create Google Analytics Account


Step 2 : Create New Property for Mobile App (not website) under your account

Integrate Google Analytics with phonegap


Step 3 : Get your Google analytics ID (UA-XXXX-YYY)

Step 4 : Create your phonegap project

cordova create GoogleAnalytics com.phonegappro.googleanalytics GoogleAnalytics

Step 5 : Add Your Platform (Android / iOS)

cordova platform add android

Step 6: Add your plugin for integrate google analytics with phonegap / apache cordova projects

cordova plugin add

Step 6: Setup your google analytics tracking code on deviceready event'UA-XXXX-YY')

  • To track a Screen (PageView)'Screen Title')
  • To track an Event'Category', 'Action', 'Label', Value) Label and Value are optional, Value is numeric
  • To track an Exception'Description', Fatal) where Fatal is boolean
  • To track User Timing (App Speed)'Category', IntervalInMilliseconds, 'Variable', 'Label') where IntervalInMilliseconds is numeric
  • To add a Transaction (Ecommerce)'ID', 'Affiliation', Revenue, Tax, Shipping, 'Currency Code') where Revenue, Tax, and Shipping are numeric
  • To add a Transaction Item (Ecommerce)'ID', 'Name', 'SKU', 'Category', Price, Quantity, 'Currency Code') where Price and Quantity are numeric
  • To add a Custom Dimension'Key', 'Value', success, error)
  • To set a UserID'my-user-id')
  • To enable verbose logging


Did you find apk for android? You can find new Free Android Games and apps.
  • Coupon Chamber

    where we have to add this‘Screen Title’)

MyMail WordPress Plugin free
Save $50 USD on Ionic Firebase Chat Source CodeEXPLORE