Reputation:
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:
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
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