Google Analytics data streaming

Google Analytics data streaming is a Google Analytics data collection method which is independent from the Google Analytics API. Hits and sessions are collecting in real time to the data specified warehouse.

Supported Data warehouses:

  • Google BigQuery
  • Clickhouse

Configuring of Data Collection

  1. Create the project;
  2. Install the JavaScript code obtained with customTask in Google Tag Manager;

Make sure you have connected customTask to all GTM tags.
From now on, all Google Analytics data will be duplicated to your data warehouse.

Data Structure

Google Analytics data is collecting in two tables: hits and sessions.
You can see the structure of the tables and the description of the parameters below. 

Hits table

Column name

Description

hitId

ID of the hit

date

Hit date in UTC.

dateTime

Date and time of the hit in UTC.

timestamp

It’s the sequence number of the byte in the eventhub. This is a service value for counting sessions.

userId

User Id number. Contains the transmitted to Google Analytics value.

clientId

The ID of the Google Analytics cookie. Set at the device level.

type

Type of hit.

nonInteractionHit

If the request is the result of an interaction, this field gets the value 1. Otherwise (if the interaction event is set to false), the field takes the null value.

rentaId

Unlike client Id, it is the unique value within different domains. It is used to analyze the intersection of the audience, building attribution between sites.

ydclid

Contains Yandex Direct Click ID. The mark is assigned by Renta if the import of costs is enabled in the interface.

fbclid

Contains Facebook Click ID. The mark is assigned by Renta if the import of costs is enabled in the interface.

content

Maintance of utm_content

medium

Maintance of utm_medium

term

Maintance of utm_source

campaign

Maintance of utm_term

source

Maintance of utm_campain

gclid

Contains Google Click ID if auto-tagging between Google Ads and Google Analytics is enabled.

dclid

Contains a DoubleClick Click ID if auto-tagging between Google Ads and Google Analytics is enabled.

dataSource

The data source for the request. By default, requests from analytics.js they will have the web value, and requests from the mobile SDK will have the app value.

deviceBrowser

Browser (for instance, Chrome or Firefox).

deviceBrowserVersion

Browser version.

deviceOperatingSystem

Operationg system (for instance, Macintosh or Windows).

deviceOperatingSystemVersion

Operationg system version.

deviceIp

IP-address

deviceUserAgent

User Agent

deviceScreenResolution

The resolution (width and height) of the screen in pixels (for instance, 800×600).

deviceScreenColors

The bit depth of colors supported by the screen (for example, 8-bit, 24-bit, etc.).

deviceViewPortSize

The size of the viewport in the browser. The initial dimensions are recorded in pixels in the format width x height, for example 1920 x 960.

deviceDocEncoding

Encoding. For instance, UTF-8.

deviceJavaEnabled

Whether Java is supported in the visitor’s browser.

deviceFlashVersion

The version of the Adobe Flash plugin in the visitor’s browser.

location

URL with additional parameters. For instance: https://site.com/catalog/platya?page=2

hostname

Domain. 

For instance: https://site.com/

path

The path of the page URL.

For instance: /catalog/platya

title

Title of the page.

page

The full URL path.

For instance: https://site.com/catalog/platya

documentReferrer

If the medium field has the value referral, the path of the traffic source is indicated here, and the host name is contained in the source field.

applicationName

Application name.

applicationId

Application ID.

applicationVersion

Application version.

applicationInstallerId

ID of the service from which the app was downloaded (for instance, Google Play). By default, this parameter is determined based on the PackageManager#getInstallerPackageName method.

eventCategory

Event category.

eventAction

Event action.

eventLabel

Event label.

eventValue

Event value.

transactionId

E-commerce transaction ID.

transactionAffiliation

Information about partners transmitted to the e-commerce tracking code.

transactionRevenue

Total revenue from the transaction.

transactionTax

Total transaction tax.

transactionShipping

The total cost of delivery for the transaction.

itemPrice

The price of the product.

itemQuantity

The number of purchased products.

itemCode

The code of the local currency used in the transaction.

itemCategory

Product category.

productAction

Advanced e-commerce events. Example: detail, add, checkout, checkout_option, purchase, remove.

couponCode

Contains the promo coupon that was applied to the transaction.

productActionList

The name of the list in which the product was shown or the click occurred. For instance, “Home Page Promotion”, “Also viewed”, “Recommended Products”, “Search Results”, etc.

checkoutStepOption

This field is filled in if information about the stage of purchase registration is transmitted with the request.

currencyCode

The code of the local currency used in the transaction.

promoAction

The type of action within the PROMOTION Enhanced E commerce. For instance: clicks.

checkoutStep

Indication of the step of placing the order. It is set in the advanced e-commerce settings.

socialNetwork

The name of the social network that acts as a traffic source; for instance, Google+, Blogger.

socialAction

A social action registered in the tracking code of a social network (“Share”, “Send a tweet”, etc.).

socialActionTarget

For social interactions, the URL (or resource) where the action in the social network was received is indicated here.

timingCategory

Used to simplify reporting. All user time variables are grouped into logical groups.

timingVariableName

The variable is used for flexible visualization of user time in reports.

timingLabel

The name of the tracked resource action.

timingPageLoadTime

The total time (in milliseconds) from the start of viewing the selection page (for instance, clicking on a link) to the completion of its loading in the browser.

timingDnsTime

The total time (in milliseconds) of DNS queries for this page for all samples.

timingPageDownloadTime

The total time (in milliseconds) of page loading for all samples.

timingRedirectResponseTime

The total time (in milliseconds) of the server’s response to the user’s request for all samples, including the network response time for the user’s location.

timingTcpConnectTime

The average time (in milliseconds) taken to establish a TCP connection to this page for all samples.

timingServerResponseTime

The total time (in milliseconds) of the server’s response to the user’s request for all samples, including the network response time for the user’s location.

timingDomInteractiveTime

The time (in milliseconds), including the network response time for the user’s location, which the browser spends processing the document (domInteractive).

timingContentLoadTime

The sample (or number) of page views used to calculate the average page load time.

timingTime

 

exceptionDescription

The number of exceptions sent to Analytics.

exceptionFatal

The number of exceptions sent to Analytics for which isFatal takes the value true.

experimentId

ID of the experiment.

experimentVariant

A variant or combination of variants presented in the experiment’s appeal.

customDimensions.index

Index of the special parameter.

customDimensions.value

The value of a special parameter.

customMetrics.index

The index of a special indicator.

customMetrics.value

The value of a special indicator.

product.index

Product position.

product.id

ID of the product.

product.name

Name of the product.

product.brand

Brand of the product.

product.category

Category of the product.

product.variant

Variant of the product.

product.price

Price of the product.

product.quantity

Quantity of the product.

product.couponCode

Coupon code of the product.

product.position

The product’s position in the list where it was shown.

promotion.index

The index of the advertising campaign.

promotion.id

The ID of the advertising campaign.

promotion.name

The name of the advertising campaign.

promotion.creative

The text or version of the ad associated with the advertising campaign.

promotion.position

The position of the advertising campaign on the site.

impressionList.index

Index of the list.

impressionList.id

ID of the list.

impressionList.productIndex

Product position in the list.

impressionList.name

The name of the list in which the product was shown or the click occurred. For instance, “Home Page Promotion”, “Also viewed”, “Recommended Products”, “Search Results”, etc.

impressionList.brand

The name of the brand in which the product was shown.

impressionList.category

The name of the category in which the product was shown.

impressionList.variant

A variant of the product in which the product was shown.

impressionList.price

The cost of the product in which the product was shown

impressionList.position

The product’s position in the list where it was shown.

impressionList.itemListName

The name of the list in which the product was shown.

Sessions table

Column name

Description

sessionId

Session number. It’s the unique value.

clientId

The ID of the Google Analytics cookie. Set at the device level.

userIds

User Id number. Contains the value passed to Google Analytics.

hitIds

A list of hits that composes SessionID.

totalHits

Number of hits during the session.

transactionIds

Transaction IDs that were reached within the session.

totalTransactions

The number of transactions that were reached during the session.

totalPageviews

Number of pages views.

totalEvents

Number of events.

timestamp

It’s the sequence number of the byte in the eventhub. This is a service value for counting sessions.

dateTime

Session start time in UTC. Is the first dateTime within the session.

dateTimeLast

The end of the session in UTC. Is the last hit within the session.

date

Session start date in UTC.

secondsInSession

Session duration in seconds.

content

Maintance of utm_content

medium

Maintance of utm_medium

source

Maintance of utm_source

term

Maintance of utm_term

campaign

Maintance of utm_campain

gclid

Contains Google Click ID if auto-tagging between Google Ads and Google Analytics is enabled.

ydclid

Contains Yandex Direct Click ID. The mark is assigned by Renta if the import of expenses is enabled in the interface.

fbclid

Contains Facebook Click ID. The mark is assigned by Renta if the import of expenses is enabled in the interface.

mtclid

Contains MyTargetClick ID. The mark is assigned by Renta if the import of expenses is enabled in the interface.

device

Device type: desktop, tablet, mobile, TV. 

ip

IP of the device.

city

City.

country

Country.

region

Region.

browser

Browser.

browserVersion

Browser version.

operatingSystem

Operating system.

operatingSystemVersion

Operating system version.

landingPage

The login page of the site. It’s the page of the first hit.

hostname

Domain name. Determined by the landing Page.

checkoutSteps

Contains the numbers of the steps that were reached during the checkout process. The extended e-commerce has to be configured.

productActions

Transmitted the Information about the stage of placing an order.

exitPage

Exit page. The last page viewed during the session.

bounce

Returns 1 if there was a failure within the session. The failure is fixed if there was only one hit in the session.

Sign

It’s contained only in ClickHouse integrations. Used for CollapsingMergeTree tables, as an alternative to final.

clicks

The attributed number of clicks within the session.

cost

The attributed costs within the session.

impressions

The attributed number of impressions within the session.

customerIdName

Advertising account ID.

account

Name of the advertising channel.

adId

Ad ID.

campaignId

Campaign ID.

adGroupId

Ad group ID.

keywordId

Keyword/Target ID

visitSession

The user’s session number. If this is the first session, the field is set to 1.

newVisits

If this is the first visit, then 1. In other cases it’s going to have an empty value.

documentReferral

Domain name without utm tags. For instance, if the transition was from http://convert.ua/contacts?source=test, then document Referrer = convert.ua .

DocumentReferrer

The full address of the page from which the transition to the site was made. The logic is similar to documentReferrer, but returns the full path of url: http://site.com/contactsAttributionModel

The attribution model is a set of rules for distributing the conversion value among advertising channels in order to increase ROAS.

Renta supports two attribution models:

  • Based on the Markov ML model
  • Funnel-based 

The results of the attribution model are uploaded to a separate table.

To enable the attribution model, contact technical support or a dedicated manager.

The connection time is 24 hours.