cordova - Phonegap 2.8.1 Analytics plugin for iOS -
i'm using this tutorial implementing google analytics plugin in phonegap 2.8.1 project. after following steps, build successfuly , code running, , see in console analytics site returning 200 http status code (ok). i'm still seeing no hits in google analytics website itself. can in figuring out problem?
take @ pg google analytic plugin , instruction directly them: https://github.com/phonegap-build/gaplugin
remember: use mobile google analytic, have create mobile application tracking on ga account work.
otherwise, see alternative solution not using plugin: how use google analytics phonegap without plugin?
========= requirement v2 ga plugin
since not on pg 3, not need plugman. have include plugin manually.
your app must link following frameworks:
coredata.framework systemconfiguration.framework libz.dylib libgoogleanalytics.a
include following file:
gai.h gaitrackedviewcontroller.h gaitracker.h gaitransaction.h gaitransactionitem.h libgoogleanalytics.a
you can find these files here: https://github.com/phonegap-build/gaplugin/tree/master/src/ios
may need other linker flag: remove "-all_load" , add "-objc"
then include plugin:
gaplugin.h gaplugin.m
add config.xml:
<feature name="gaplugin"> <param name="ios-package" value="gaplugin"/> </feature>
and include , call javascript in html5 code after deviceready event.