Tracking with Measurement Protocol

To collect the majority of user behavior events to BigQuery, OWOX BI, using either the customTask or analytics.js method, duplicates all the data Google Analytics collects from the website and sends it to the dedicated OWOX BI access point.

For collecting offline events or the events that happen after the user’s session on the website, Google Analytics offers using Measurement Protocol. The protocol can send any kind of user behavior data directly to Google Analytics using an HTTP request.

If you send certain events to Google Analytics via Measurement Protocol, you need to duplicate them to the OWOX BI access point as well. The access point is, where UA-XXXXX-X — is your Google Analytics tracking ID.

Without duplicating the request, the event data won’t get to BigQuery, which will result in data discrepancy with Google Analytics.

Sending requests

Sending requests to our access point is no different from sending them to Google Analytics: you send data as a POST or a GET request. See how the requests look like in Google documentation.

For a POST request, you need to specify a payload data identical to the one you send to Google Analytics.

Here’s an example of how it should look like:


NoteWhen sending a POST request to the OWOX BI access point, make sure you have the GET parameter tid specified — it’s the tracking ID of your Google Analytics property from which OWOX BI sends data to BigQuery.

For a GET request, specify the set of parameters in the request body.

We recommend using POST requests for sending data to our access point.

NoteData sent to the access point will appear in Google BigQuery only.
To send the data to Google Analytics, you still need to send a request to

Using the queueTime (&qt) parameter and updating data

When sending data via Measurement Protocol, there can be cases when the transaction happens after the user session time on the website is expired. For example, online payment processing by a bank can take up to several days, and the transaction event will be sent only after that.

To avoid creating a separate session for such events, specify the &qt (queueTime) parameter in your request. This is a time period in milliseconds between the moment the hit happened and the moment it was sent.

When using the &qt parameter, the time when the hit received (the time field) is calculated considering the time difference specified in the &qt parameter.

When you send a non-zero &qt parameter:

  • Hits will always get to the hit data table (streaming) in BigQuery irrespective of the parameter’s value.
  • Session data collection based on the OWOX BI algorithm features the maximum &qt parameter’s value as 30 days. The hits will get to the relevant session in the session data tables (owoxbi_sessions) within 30 days* after the event happened.
  • For session data collection based on the Google Analytics algorithm, the hits will be assigned to the corresponding sessions within 48 hours* considering the clientId and timestamp values sent in the custom dimension (&cd).
    *After the end of the day when the events happened in the Google Analytics property timezone.
  • A hit will get to a data table for the date calculated considering the difference in time between the value of &qt parameter and the actual time the hit was sent.
    Example: Today is August 10th, 2019. A hit sent with &qt=86400000 (-24 hours) will get into a hit data table collected for August 9th, 2019.

Note:If the &qt parameter is more than 4 hours, the hit won’t get to Google Analytics. This will lead to data discrepancy: OWOX BI will get more data than Google Analytics.
Set the &qt parameter's value to more than 4 hours only if you need the events sent via Measurement Protocol to get to the sessions during which they've happened.

Learn how the qt parameter affects assigning transactions to user sessions from this article.


  • The request must contain the clientId (&cid) or the userId (&uid) parameter. Without sending at least one of these parameters, a hit will be processed neither in OWOX BI nor in Google Analytics.
  • If you use several hits to send data of a single transaction, you should submit unique parameter values in the actionField object per hit. For example, you can do it by entering different values for Revenue, Tax, or Affiliation in each actionField object. Otherwise, out of two (or more) hits with the same parameter values in the actionField object, only one hit will be recorded by GA.

    While OWOX BI will record all the transaction hits regardless of the received values in the actionField object.

  • In OWOX BI Pipeline, the maximum hit payload size is 16 KB. If exceeded this limit, hits won't be processed and sent to BigQuery.
  • In Google Analytics hit payload must be no longer than 8 KB.

Anytime you can check the number of transactions collected to the BigQuery tables. Read more

HTTP request example



"v": 1,
"tid": "UA-XXXXX-X",
"cid": "111111111.111111111",
"t": "event",
"ec": "Call",
"ea": "Request",
"el": "Form №1",
"ev": 0,
"dh": "",
"ds": "call-center",
"uip": "",
"ua": "Mozilla/5.0 (compatible; Googlebot/2.1; +",
"dr": "",
"qt": 0

Parameter breakdown example:

hitid 4a44b2ce-be1b-41f3-8153-50b65461911e

clientId 111111111.111111111
type event
eventInfo.eventCategory Call
Form №1
eventInfo.eventValue 0
dataSource call-center
device.ip server ip
device.userAgent Mozilla/5.0 (compatible; Googlebot/2.1; +
Was this article helpful?
3 out of 3 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.