mcfly soft
mcfly soft

Reputation: 11645

howto properly add statistics to google analytics from a android app to see correct session duration

i would like to see the duration my users are in my app. I mean exitapp-startapp should be a measure in google analytics ?

When starting my app I call :

t.send(new HitBuilders.AppViewBuilder()
            .setNewSession()
            .build());

But how to indicate, that my app is stopped or exited ?

Upvotes: 1

Views: 55

Answers (1)

dev.bmax
dev.bmax

Reputation: 10601

After some research on that topic I have come with the conclusion that an app does not explicitly report a session end. Rather the session duration is measured based on the time between the consecutive hits which have been reported since the beginning of a new session and either a session timeout or going to the background.

Upvotes: 1

Related Questions