...
Basic knowledge of Treasure Data, including the TD Toolbelt
A Facebook Page/Ad account with Leads retrieval permission
Authorized Treasure Data account access
Obtain Get Ad ID and Form ID
Ad ID
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 Ad ID column as shown on the image
Form ID
You can retrieve Form ID from Publishing Tools > Lead Ads Form and hover over the existing Form as shown.
Getting the Lead Form’s Field Name
Numbered Headings | ||||
---|---|---|---|---|
| ||||
Go to your Lead Ads FormsClick the Download button and select Download new leadsChoose CSV to download the CSV file.Open the downloaded CSV file, the field names for your form as shown. |
Use the TD Console to Create Your Connection
...
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.
Numbered Headings | ||||
---|---|---|---|---|
| ||||
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. |
...
Using OAuth
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
or |
...
|
...
|
...
|
...
|
Transfer Your Facebook Leads Data to Treasure Data
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.
Connection
...
Type a name for your Source in the Data Transfer
...
field.
- Select Next.
Source Table
...
Info |
---|
|
- Edit the following parameters:
Parameters:
- Ad Account ID: (Optional) Your Facebook ad account id
AD ID/Form ID: (Required if Ad Account ID is not set) Leads data can be imported by Ad Id or Form ID.
See the Appendix for details how to get Ad ID and Form IDCreated Time From: (Optional) Import Leads data submitted
since from this time until the current time. The field accepts ISO 8601 date-time format.
E.g. For example, 2020-01-01T00:00:00+0700
Incremental: Only import new data since the last run.
- Enable Guess Schema: Use this feature to let the connector guess the form fields automatically, or you can
manually enter - type the form fields by
unchecking - clearing this
checkbox - and
fill - filling in the Field Name and Data Type in the FORM FIELDS.
- Field Name: The Lead Form field name.
See the Appendix for how to get the Lead Form’s Field Name- filling in the Field Name and Data Type in the FORM FIELDS.
Data Type: The data type of this field.
Timestamp format: You provide the timestamp format if the field is a timestamp field e.g. %Y-%m-%dT%H:%M:%S%z
Data Settings
Data Settings allows you to customize the data transfer.
Info |
---|
|
Data Settings
...
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 column if you find the data type or timestamp format is invalid for that column.
...
.
Data Preview
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
...
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
How to Get Ad ID and Form ID
Ad ID
You can retrieve the Ad ID by adding Ad ID column to your Ads Manager screen. From Ads Manager screen, click the (+) sign from the right-hand-side, choose Customize Columns... and search for Ad ID column as shown on the image
Form ID
You can retrieve Form ID from Publishing Tools > Lead Ads Form and hover over the existing Form as shown.
Getting the Lead Form’s Field Name
...
start-numbering-with | 1 |
---|---|
start-numbering-at | h5 |
Go to your Lead Ads Forms
Click the Download button and select Download new leads
Choose CSV to download the CSV file.
Open the downloaded CSV file, the field names for your form as shown.
...