Art
Art

Reputation: 286

Android Google Analytics V2 myTracker

I would like to track a view in my Android application using Manual Screen Tracking. I read here https://developers.google.com/analytics/devguides/collection/android/v2/screens that I need to use this code:

myTracker.trackView("Home Screen");

But Eclipse shows an error (myTracker cannot be resolved) when I use it.

I have no trouble with EasyTracker.

import com.google.analytics.tracking.android.EasyTracker;

EasyTracker.getInstance().activityStart(this);

Upvotes: 2

Views: 1238

Answers (1)

Codo
Codo

Reputation: 78835

Try:

Tracker myTracker = EasyTracker.getTracker();
myTracker.trackView("Home Screen");

Upvotes: 3

Related Questions