Skip to content

Krytius/googleAnalytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cordova GoogleAnalytics Plugin

by Jesse MacFadyen updated by Olivier Louvignes updated by Chris Kihneman updated by Elvis Ferreira Coelho

Adding the Plugin to your project

Using this plugin requires iOS Cordova and the Google Analytics for Mobile Apps SDK (included). The Google Analytics for Mobile

  1. Make sure you are running Cordova(PhoneGap) 3.0
  2. Install using the command:
phonegap local plugin add https://github.com/Krytius/googleAnalytics.git

JAVASCRIPT INTERFACE

// after device ready, create a local alias and start the tracker with your own id.
var googleAnalytics = window.plugins.googleAnalyticsPlugin;
googleAnalytics.startTrackerWithAccountID("UA-XXXXXXXX-X");

// Track an event in your application
// more here : http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html
googleAnalytics.trackEvent("category", "action", "label goes here", 666);

// Track an pageview in your application (must start with a slash)
googleAnalytics.trackPageview("/test");

IOS XCODE

In your Build Settings remove armv7s from Valid Architectures.

BUGS AND CONTRIBUTIONS

Patches welcome! Send a pull request. Since this is not a part of Cordova Core (which requires a CLA), this should be easier.

Post issues in the Cordova Google Groups, include in the subject heading - "GoogleAnalyticsPlugin" or on Github (preferred)

LICENSE

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

DOCS & OTHER HELP

About

Plugin phonegap 3.0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors