This guide will show you how to get selected Hull Events from relevant Users into BigQuery table using BigQuery Streaming API.
Sending events like that allows to analyze events across users. All events data will be available in BigQuery including all propertie and context parameters. On the other hand, the only User information which will be sent is just internal Hull user_id. That allows to group events together but won't allow to read any user attributes in the queries.
Before proceeding please be aware that this is very basic events setup and that your are good with following limitations:
CREATE TABLE hull_bigquery_exporter_demo.hull_events ( event_id STRING NOT NULL, event_name STRING, created_at TIMESTAMP, properties STRING, event_source STRING, event_type STRING, session_id STRING, context STRING, user_id STRING );
Go to the code editor and paste index.js and package.json content from the gist below:
Deploy the function
The setup is done. Every new event matching the whitelists in Outgoing Webhooks Connector will be sent out and inserted into
hull_events table in BigQuery using Streaming API.
Event properties and context parameters are stored in BigQuery table as stringified JSON here is a basic query showing how properties from such string column can be extracted:
SELECT JSON_EXTRACT(properties, '$.foo') AS json_text_string FROM `project-name.hull_bigquery_exporter_demo.hull_events` LIMIT 1000