Google BigQuery → Facebook Audience pipeline set-up

The Google BigQuery → Facebook Audience pipeline has an alpha status and is not publicly available. To enable the feature in your OWOX BI project, contact Support at bi@owox.com

How the pipeline works

The Google BigQuery → Facebook Audience pipeline automatically imports the audience segment data from Google BigQuery to Facebook.
There is no need to gather data into the .csv table and upload it manually via the Facebook interface anymore. Just combine the segment data by SQL query in your Google BigQuery project, set up the pipeline, and OWOX BI will start uploading data to Facebook on a daily basis.

Preliminary requirements

Prior to setting up the pipeline, make sure you have:

1. The relevant data for the segment creation. It can be either _fbp or CRM data (e.g. emails, phone numbers). Data can be taken from different datasets and tables, yet it should be stored within a single Google BigQuery project.

2. SQL query to combine data. You will need to add the query to the pipeline settings. As a result of the query run, you should receive a list of specific identifiers. See the details in the table below. 

Segment data type Value format in the SQL query

_fbp

An identifier that is assigned to a user by Facebook.
A string of letters and digits in the lower register divided by a period:

fb.1.1578477309111.708206298

Learn how to collect _fbp into session tables

СRM data

A list of fields with the following values:

  • Phone number.
    A numeric string that contains a mobile phone number with a country code. No spaces or other symbols are allowed.
    79995551111
  • Email address.
    A string of Latin letters including the "@" symbol and a domain name. The upper case is not allowed.
    email@gmail.com

 

3. Facebook Pixel ID. It is required if you are going to create segments based on _fbp.

Please make a test run of your SQL query in Google BigQuery before you apply this query to the pipeline.

How to set up the pipeline

The Google BigQuery → Facebook Audience pipeline has an alpha status and is not publicly available. To enable the feature in your OWOX BI project, you should send your request to bi@owox.com.
You will then be provided with a direct link to the pipeline set-up page. Follow the instructions below to complete the pipeline creation.

Step 1. Select Google BigQuery as a data source.

1.png

Step 2. Select Facebook as a destination location for the audience segment import.

2.png

Step 3. Grant OWOX BI access to Google BigQuery. Make sure your Google account is assigned the BigQuery Data Editor и BigQuery User roles in Google Cloud Platform. To check/grant the permissions, go to the Identity and Access Management page in your Google Cloud Platform project. Read more in Google documentation.

3.png

Step 4. Select the required Google BigQuery project.

4.png

Step 5. Grant OWOX BI access to your Facebook Audience account. 

5.png

Step 6. Select an ad account for the audience segment import. Make sure your Facebook account is assigned the edit rights for the relevant ad account.

6.png

Step 7. Select a segment data type.

7.png

If you select “Website user behavior data”, ensure that the _fbp (facebook browser id) is collected. Read more

For the “Website user behavior data” data type, you should also provide a Facebook Pixel ID that is used for the selected ad account.

Step 8. Create an audience.

8.png

Step 9. Сlick Create pipeline.

The pipeline will be created with the Blocked status. To unblock the pipeline, navigate to the Query tab and paste SQL query. As a result of the query run, you should receive a list of identifiers (e.g.  _fbp for “User behavior data” or phone numbers for “CRM data”).

9.png

SQL query requirements:

  • If the ”User behavior data“ type is selected, define all the following parameters in the upper case format after the SELECT statement: FBP, EMAIL, PHONE, IP, USER AGENT. See the example below.
SELECT
  cd.value AS FBP,
  user.phone AS PHONE,
  user.email AS EMAIL,
  device.ip AS IP,
  device.userAgent AS USER_AGENT
  FROM
  ……
  • If the ”CRM data“ type is selected, define both EMAIL and PHONE parameters in the upper case format after the SELECT statement. The example is shown below.
SELECT
  user.email AS EMAIL,
  user.phone AS PHONE
  FROM
  ……

Step 10. Once you paste the SQL query, click Activate pipeline.

If the query is written correctly, the pipeline will change its status to Running. OWOX BI will start creating the segment. Once the segment is created, it will be sent to Facebook Audience automatically. Information is updated every 24 hours from the moment the pipeline is created.

At any time, you can adjust your SQL query. To do it, go to the Query tab, make the edits, then click Apply changes.

10.png

If you need assistance, contact Support at bi@owox.com.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.