Vote count:
0
It is possible to track all Activities with Google Analytics automatically, when you enable the ga_autoActivityTracking attrubute in the tracker config.
So I'm asking myself when this action gets fired, because I want to exclude it on a special time.
Is it fired when some of the onCreate, onResume or other methods of a Activity getting called?
I'm starting the tracking in MyApplications onCreate() methode:
@Override
public void onCreate(){
if (GooglePlayServicesUtil.isGooglePlayServicesAvailable(this)== ConnectionResult.SUCCESS) {
// Get tracker.
Tracker t = getTracker(
MyApplication.TrackerName.APP_TRACKER);
// Send screen view.
t.send(new HitBuilders.AppViewBuilder().build());
}
}
and initialize the tracker with the following file:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Enable automatic Activity measurement -->
<bool name="ga_autoActivityTracking">true</bool>
<!-- The screen names that will appear in reports -->
<screenName name="de.example.app.MainActivity">
MainActivity
</screenName>
...
<string name="ga_trackingId">UA-59000000-1</string>
</resources>
asked 25 secs ago
When is the ga_autoActivityTracking fired?
Aucun commentaire:
Enregistrer un commentaire