logo

Custom conversions

Custom conversions are available only on enterprise plan
Custom conversions are available only on enterprise plan
There conversions enable you to create conversions by writing an SQL query that uses any raw data present in your Google BigQuery. A common use-case is tracking offline conversions through CRM systems.
Benefits of using custom conversions:
  1. They are created and maintained by our technical team.
  1. Any data that is in your BigQuery can be used to calculate conversions.

Example

After a user purchases a service on your website, they need to confirm their order when contacted by your call centre staff. Once a call centre operator receives confirmation from a user, they update the status in the CRM system.
To view the users who have confirmed their purchase in the SegmentStream reports, you must load the data from the CRM system into your BigQuery. Subsequently, a custom conversion has to be created with an SQL that will extract conversions from the CRM data, along with a client identifier that will be used to stitch the conversion to the user's website session.
The code below will perform a daily check on website orders created within the last 30 days and designate them as conversions if their statuses in the CRM have been set to 'confirmed' or 'paid'.
sql
SELECT id, userId AS client_id, createdAt AS created, orderValue AS value, 'GBP' AS currency, IF(orderStatus IN ('confirmed', 'paid'), TRUE, FALSE) AS is_qualified FROM `bq-project-id.dataset_id.CRM_order_table_5806956` WHERE DATE(createdAt) > @fill_date - 30
Image without caption