Google Analytics → Google BigQuery: Session data collection based on Google Analytics data

Important:For the new OWOX BI users, the session data is collected by the new OWOX BI algorithm based on non-sampled hit data. Session data collection based on Google Analytics data is active only for those users who haven't moved to the new algorithm yet.

Before setting up session data collection, you first need to create a streaming pipeline.

The settings and filters applied to your Google Analytics view affect the data in the session streaming tables.

How to set up session data streaming

Step 1. Create a "Session"-scope custom dimension in Google Analytics

If you already have a "Session"-scope custom dimension in Google Analytics or would like to add this custom dimension in the OWOX BI interface, skip this step.

  1. On the Admin page, in the Property column find the Custom definitions block and click Custom dimensions.
  2. Click New custom dimension.
  3. Add the dimension name, set the Scope to Session, and click Create.


Step 2. Set up session data streaming in OWOX BI Pipeline

  1. In OWOX BI Pipeline, select a "User behavior data"-type streaming pipeline. In the pipeline's Settings, find the Session data collection block, then check Based on Google Analytics and click Change settings:


  2. In the Required parameters field, choose the custom dimension you have created as a Session ID, then click Save:


    Note: Here, you select the custom dimension by its name. In the next step, in the tracking code, you must specify the custom dimension index. Here's how to distinguish them in Google Analytics:


  3. Back in the Settings tab, copy the updated tracking code and add it to your website. Now, the index of your custom dimension is added to the code: Integration_code_GA.png

Set up session data collection for optional parameters

To collect User ID data (the user.Id field) and visited pages type data (the hits.pageType field), set these Optional parameters:


User ID is a unique user identifier that lets you associate hit data from different sessions and devices with this one unique user. This data helps you better understand each user’s interaction with your website.

The User ID historical data is being updated only when you use a custom dimension (&cd) to collect User ID values. Thus, we recommend creating a "User"-scope custom dimension to collect these data:



  • The first table with session data will appear within 48 hours.
  • Next tables will become available within 12 hours after the end of the day the sessions get formed.
  • You can see the table structure here.
Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.