Reputation: 88277
I have set my session timeout at 1hr
I am using the measurement API since its a Samsung Tizen TV application and I cannot use the official Web/Android/iOS SDKs.
I am sending
var params = {
v: 1,
tid: GA_TRACKING_ID,
cid: data.deviceId,
t: 'pageview',
dh: '...',
dp: encodeURIComponent($location.path()),
cd: transition.to().title + ($stateParams.gaTitle ? ' (' + $stateParams.gaTitle + ')' : '') || 'Unknown',
an: '...',
'ga:mobileDeviceModel': data.deviceModel
};
And every 10 mins, I am sending
var params = {
v: 1,
tid: GA_TRACKING_ID,
cid: data.deviceId,
t: 'event',
ec: 'RefreshToken',
ea: 'Starting',
el: '',
ev: '',
ni: 1,
an: '...',
'ga:mobileDeviceModel': data.deviceModel
};
To refresh my application token and at the same time, an attempt to extend my session. It seems like this 2nd event is not tracked in my GA dashboard, I dont see it in Realtime events nor Behaviour > Events after 1 day.
Even if the event to "extend" session is not working, shouldn't my session time be ~1hr since the timeout is that time? And I did not manually end the session.
UPDATE
Notice there are events <10 mins ago, but there are 0 users online, even though my browser is still online
Upvotes: 2
Views: 833
Reputation: 13495
ev: '',
must be a number (or omitted):
ev: 10,
(the event values now corresponds to the number of idle/keep-alive minutes)
GA appears to be calculating sessions purely on interactive hits, so ni unfortunately wont work and should be omitted or disabled:
ni: 0,
These are optional in the event context but you should use them to match the previous page or screen. Otherwise, you will not be able to use page dimensions in the event reports or build precise filtered views as you have more data.
Upvotes: 1
Reputation: 11
The realtime dashboard only shows users that where active in the last 5 minutes. The session timeout setting isn't used here. In my opinion you don't need this session timeout setting if your every-10-minute event call would work. My guess is that something is wrong with that call. It should always show up in the realtime-events dashboard.
Upvotes: 1