Facebook and Bing Audiences

Updated by Ole Dallerup

With Dreamdata, you can quickly build Audiences on top of all your first-party data. Likewise, targeting contacts and companies with Google Ads Customer Match or LinkedIn Matched Audiences with a couple of syncs is easy.

At Dreamdata, we strive to add more functionality to our customers. Please don't worry- we plan to add more integration. However, we also don't believe you should limit yourself to using services we have yet to integrate.

This guide will walk you through the process of building audiences in Dreamdata. Using Dreamdata Data Warehouse and reverse ETL, you can seamlessly sync these audiences to Facebook Audiences and Bing Custom Audiences. Best of all, this process is fully automated, eliminating the need for manual file uploads.

To follow this guide, its required that you have signed up to a Reverse ETL tool.
Its required that you have setup your Dreamdata Data Warehouse and have access to it, and you need to understand a minimum level of SQL (Structured Query Language).
All SQL Queries in this article needs some adjustments depending what data warehouse you use.

1. Build your Audience to target

First you use Dreamdata to build a contact audience. Within 24 hours this audience will get synced automatically to your data warehouse.

To query the data warehouse you would need to run a query similar to this, note here we are selecting all fields, but also generating a SHA265 of the email address. That email_hash field will be needed later to share with Facebook or Bing to avoid sharing PII data directly with those platforms. All PII data should normally get hashed to avoid sharing PII data directly.

The query also extract a phone number, Facebook Ads support matching on the phone number. As phone number is not a default field within Dreamdata you need to select the phone number as CRM field. The phone number is not required, but might improve your match rate.

SELECT
TO_HEX(SHA256(email)) AS email_hash,
CASE
WHEN NULLIF(JSON_VALUE(custom_properties, '$.phone'), '') IS NOT NULL
THEN TO_HEX(SHA256(JSON_VALUE(custom_properties, '$.phone')))
ELSE NULL
END AS phone,
c.*
FROM `contacts` AS c
INNER JOIN UNNEST(audiences) AS a
WHERE a.name = 'my_icp_audience'

2. Setting up you Reverse ETL tool

If you have not already done this, you need to prepare your Reverse ETL tool and connect with the relevant tools.

  1. You need to setup your data warehouse in your Reverse ETL tool.
  2. Connect with Facebook Ads or Bing Ads within your Reverse ETL tool.
  3. Create a Model or Dataset within the Reverse ETL tool using the SQL Query from (1).

3. Setting up the sync and schedules

Copy and adjust the query from (1) and make sure it give the right results.

Depending on the Reverse ETL tool you use, you will need to do a mapping of the fields. Below is an example from Hightouch connecting with Bing Custom Audiences and another using Census with Facebook Audiences.

To understand when the data in your data warehouse updates, read more here.

Facebook Audiences (with Census)

Bing Custom Audiences (with Hightouch)


How did we do?