BigQuery
Setting up a connection with BigQuery
Overview
Connection Type:
Installation Instructions
Multi-touch attribution support
Converge preprocesses all events and enriches them with all available profile, session and attribution information to make your attribution data warehouse queries as simple as possible.
Profile Information
Every event that is forwarded includes all available information Converge has on that profile until that moment, ranging from $ip_address
all the way to $email
.
Events that typically do not have an $email
property associated with them (e.g. $page_load
) will still contain this property if we were able to identify this profile before the $page_load
happened.
Profile Merging
Converge may combine multiple profiles into one if there is an overlap in aliases.
This means that the profile_id
field in your events table may become out of date.
Under the ‘Advanced’ tab of the BigQuery connection configuration, you can configure a table to stream these profile merges to.
You can create this table as follows:
- Under your Converge dataset (
converge_data
), create a new table, e.g.profile_merges
. - In the Schema section, flip the switch to Edit as text and paste the schema below. Click on Create Table after.
To use this table, it’s important to note that profiles maybe merged multiple times. For example profile A and B could be mapped to C as follows:
(A, C)
(B, C)
Later on, profile C could be merged into profile D:(C, D)
In this case, profiles A, B, and C, would all be mapped to D. To deal with this, we recommend creating a (materialized) view that recursively resolves these mappings. Here’s an example query to achieve this:
WITH RECURSIVE profile_merges AS (
SELECT timestamp, old_profile_id, new_profile_id, 1 depth
FROM `your-project-name.your-dataset-name.profile_merges`
UNION ALL
SELECT pmr.timestamp, pm.old_profile_id, pmr.new_profile_id, pm.depth + 1 depth
FROM profile_merges pm
JOIN `your-project-name.your-dataset-name.profile_merges` pmr
ON pm.new_profile_id = pmr.old_profile_id
)
SELECT old_profile_id, max_by(new_profile_id, depth) new_profile_id
FROM profile_merges
GROUP BY old_profile_id
Pre-processed Attribution
Converge automatically attributes all events (e.g. Placed Order
, Add To Cart
, etc.) based on the most popular attribution models.
- First Touch: Attributes full credit for conversion to the initial touchpoint in the customer journey.
- First Touch Paid Only: Credits only to the first paid interaction for the conversion; exclusive to paid channels.
- Last Touch: Assigns full credit for the conversion to the final touchpoint in the customer journey.
- Last Touch Paid Only: Attributes conversion solely to the last paid interaction; focuses on the final touchpoint within paid channels.
Session Information for custom multitouch attribution models
Converge sends over all sessions with their attribution information (e.g. utm_source
, utm_campaign
, etc.) so you can assign custom credit to each of these touchpoints — allowing you to create your fully custom multitouch attribution model.
An example query
As an example, the following query on top of the Converge Table gives you the number of times an SKU was ordered:
SELECT
string(item.sku) sku, count(*) order_count
FROM `your-project-name.your-dataset-name.your-table-name`
LEFT JOIN unnest(json_extract_array(event_properties.items,'$')) item
WHERE event_name = 'Placed Order'
GROUP BY sku
ORDER BY order_count DESC
your-project-name
, your-dataset-name
and your-table-name
with your appropriate values. Converge functionality
This integration supports the following Converge connection functionality.
Converge Feature | Supported |
---|---|
Custom Events | |
Filters | |
Server-side Conversions |
Event Mapping
Converge automatically sends all implemented events from the Converge Spec and any custom events to BigQuery.
Converge Event Name | BigQuery Name |
---|---|
$page_load | $page-load |
Viewed Product | Viewed Product |
Viewed Collection | Viewed Collection |
Added To Cart | Added To Cart |
Started Checkout | Started Checkout |
Added Payment Info | Added Payment Info |
Placed Order | Placed Order |
Started Subscription | Started Subscription |
Received Refund | Received Refund |