PhoneGap / Ionic 1
Imal Perera  

PhoneGap, Google analytics

Spread the love

To track the application we can integrate google analytics to native ore hybrid applications. this post is about integrating google analytic to phonegap application

1. first create a google analytics account.
2. There Admin -> (Create Account) select “Create new account” from drop down
3. select “App” from “What would you like to track?”
4. fill the rest of the filed by giving the relevant details
5. Hit “Get Tracking ID” and copy paste it to a note pad file 🙂

Ok Now we are half way through, next thing we need to know is that google analytics is not a functionality directly come from the cordova.js, this work as a plugin so we need to refer that plugin js file in our souce code also need to put a line in the config.xml.


Open your Config.xml and add the below line


You can get a clear idea on how GA works from the following code example.


  
		
		
		
		
	
	
	
		

Analytics Test!!!!!!!!




I’m expecting you to know Phonegap basic usage but if you are a beginner to phonegap above might not give much sense to you, if so please contact me i’ll help you with the process

Leave A Comment