Android : Error while integrating google analytics in android application

on Monday, September 1, 2014


I am trying to integrate the google analytics in my android application and I am following this tutorial. Now I am getting error in this step. See the below code.



GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
Tracker t = (trackerId == TrackerName.APP_TRACKER) ? analytics.newTracker(PROPERTY_ID)
: (trackerId == TrackerName.GLOBAL_TRACKER) ? analytics.newTracker(R.xml.global_tracker)
: analytics.newTracker(R.xml.ecommerce_tracker);
mTrackers.put(trackerId, t);


Here the newtracker before the bracket is always showing error. I don't know what to do.


Kindly, Help me to fix this.


0 comments:

Post a Comment