Google Analytics Real-Time Data → Google BigQuery: Set up session data streaming based on Google Analytics data

 

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

Note: 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.

HC_create_session_id_eng.gif

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:

    Domains0eng.png

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

    Session_data_settings_GA.png

    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:

    SessionID_Name_and_Index.png

  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:

Based_on_GA_optional_parameters.png

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:

__gif_user-id-en_01_.gif

Notes:

  • 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

0 Comments

Please sign in to leave a comment.