You can connect Facebook Lead Ads Connector with your Facebook Page or Ad Account to import Leads data into Treasure Data.
This topic includes:
Basic knowledge of Treasure Data, including the TD Toolbelt
A Facebook Page/Ad account with Leads retrieval permission
Authorized Treasure Data account access
You can retrieve the Ad ID by adding the Ad ID column to your Ads Manager screen. From the Ads Manager screen, click the (+) sign from the right-hand-side, select Customize Columns... and search for the Ad ID column as shown on the image
You can retrieve Form ID from Publishing Tools > Lead Ads Form and hover over the existing Form as shown.
Navigate to the Lead Ads Forms.
Select Download new leads.
Select CSV to download the CSV file.
Open the downloaded CSV file, the field names for your form are as shown:
You complete configuration in both the Facebook interface and in Treasure Data.
When you configure a data connection, you provide authentication to access the integration. In Treasure Data, you configure the authentication and then specify the source information.
Go to Integrations Hub > Catalog and search and select Facebook Lead Ads.
The following dialog opens.
The method you use to authenticate Treasure Data with Facebook affects the steps you take to enable the data connector to import from Facebook.
After creating the authenticated connection, you are automatically taken to the Authentications tab. Look for the connection you created and click New Source.
Search for the connection you created.
Select New Source. The Create Source dialog opens.
Type a name for your Source in the Data Transfer field.
AD ID/Form ID: (Required if Ad Account ID is not set) Leads data can be imported by Ad Id or Form ID.
Created Time From: (Optional) Import Leads data submitted from this time until the current time. The field accepts ISO 8601 date-time format. For example, 2020-01-01T00:00:00+0700.
Incremental: Only import new data since the last run.
Data Type: The data type of this field.
Timestamp format: You provide the timestamp format if the field is a timestamp field, for example, %Y-%m-%dT%H:%M:%S%z.
Data Settings allows you to customize the data transfer.
Do not change the Column Name. Field names in the lead form are used as column names when import. However, special characters (not alphanumeric or underscore “_”) are not supported and will be converted to underscore.
Select Next. The Data Settings page opens.
Optionally, edit the data settings or skip this page of the dialog.
Skip invalid record(s): If selected, skips invalid Leads data and continues to import others. If not selected, jobs fail when invalid data is encountered.
Schema Settings: You can change the Data Type or Timestamp format column if you find the data type or timestamp format is invalid for that column.