user2129147
user2129147

Reputation:

Google Analytics loses tracking after a few minutes

I set up Google Analytics for both iOS and Android as described in both tutorials (Android & iOS).

Here's my analytics.xml for Android:

<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="TypographyDashes">
    <string name="ga_trackingId">UA-xxxx-y</string>
    <bool name="ga_autoActivityTracking">true</bool>
    <integer name="ga_sessionTimeout">-1</integer>
</resources>

In Android I set up the EasyTracker object in my Activity#onStart() as:

EasyTracker easyTracker = EasyTracker.getInstance(this).activityStart(this);

And in iOS, in my AppDelegate:

[[GAI sharedInstance] trackerWithTrackingId:kTrackingId];

And my ViewController#viewDidLoad that extends GAITrackedViewController:

self.screenName = @"My ViewController";

I can see the value of 1 (or 2, if I'm testing with both devices) in the GA's website (Reporting > Real-Time Session), specifically in this part:

GA's screenshot

The problem is that both devices, with both screens active, only maintains that count in GA's website for a few minutes, even though I'm not closing the app or putting them to sleep. What's happening? Help please!

Upvotes: 2

Views: 526

Answers (1)

Glauco Neves
Glauco Neves

Reputation: 3539

Take a look at: https://support.google.com/analytics/answer/1638635?hl=en

Active Visitor Metrics

In Real-Time, a user is active if he or she has triggered an event or pageview within the past 5 minutes. Note that this is different from standard reports in which a session is defined by a 30 minute window.

Upvotes: 2

Related Questions