Jonathan Hohrath
Jonathan Hohrath

Reputation: 21

In GA360 Bigquery data, how are user visits broken into GA360 sesions?

Unsure of how GA360 breaks up user visits into sessions. We have session timeout set up for 30 minutes. However, notice that there are a large number of visitors that have multiple visits (and corresponding bigquery rows) inside 30 minutes.

For example, the below query yields a large fraction of our total visitors having the earliest visit start time and latest visit start time falling within a 30 minute window:

  FullVisitorId,
  min(TIMESTAMP_SECONDS(VisitStartTime)) as first_time,
  max(TIMESTAMP_SECONDS(VisitStartTime)) as last_time,
  (max(VisitStartTime) - min(VisitStartTime)) / 60 as time_diff_min, 
  count(*) as visitcount
FROM
  `project.dataset.ga_sessions_*`
WHERE
  FullVisitorId in 
  (SELECT FullVisitorId from `project.dataset.124196983.ga_sessions_*` GROUP BY FullVisitorId HAVING count(*) > 1)
GROUP BY 
  FullVisitorId
HAVING
  time_diff_min < 30

Upvotes: 1

Views: 187

Answers (1)

LUIS PEREIRA
LUIS PEREIRA

Reputation: 488

There are two methods by which a session ends:

  1. Time-based expiration:

    • After 30 minutes of inactivity
    • At midnight
  2. Campaign change:

    • If a user arrives via one campaign, leaves, and then comes back via a different campaign.

So looking at the 30 minutes wouldn't be enough to count the number of sessions.

You can find the official documentation here: https://support.google.com/analytics/answer/2731565

Upvotes: 2

Related Questions