Session length
This article explains visit session length in AudienceStream.
How it works
Session length determines when AudienceStream ends a visit. When a visit reaches the session length without a new event, the visit ends and AudienceStream performs end-of-visit processing. The next event from the visitor starts a new visit. AudienceStream has a maximum visit length of 24 hours, regardless of event activity.
Session lengths
In AudienceStream, the default session length is set based on the platform that sends the events:
- Web: 30 minutes (10 minutes if one event and no follow-up events).
- Mobile App: 2 minutes.
- Omnichannel: 1 minute.
- File Import: 1 minute.
- Collect API: 30 minutes.
The platform is based on the reserved attribute named platform
according to the following values:
- Web:
platform
is set toweb
or not set. - Mobile:
platform
is set to one of the following:android
,ios
,win
,bb10
, ornative_mobile
.
Customize session length
To customize the session length, set the data layer variable _dc_ttl_
to a value in milliseconds on the first event of a session. For example, to set the session length to five minutes, add the following to the event: "_dc_ttl_": 300000
. The session length cannot be changed after it has been set.
To set a custom session length, omit the platform
variable. If you set a custom value for platform
, the session length defaults to 30 minutes.
This page was last updated: March 18, 2025