Twitter Audience Insights enables you to collect quantitative data on Twitter audiences. You can import your insight data into Arm Treasure Data for integration with your other data resources on the Treasure Data platform.
- Basic knowledge of Treasure Data, including the Treasure Data Toolbelt.
- A Twitter Ads Account or an account with Ads Manager role.
- Authorized Treasure Data Twitter app access to your Twitter Ads Account
Step 1: Create a new connection
Go to Treasure Data Connections. Locate and select Twitter Audience Insights.
The dialog opens.
Select an existing OAuth connection for Twitter, or click the link under OAuth connection to create a new connection.
Create a new OAuth connection
Log into your Twitter account in a browser:
Grant access to the Treasure Data app.
Next, go back to Treasure Data Connections. Repeat the first step (
Create a new connection) and choose your new OAuth connection.
Provide a name for your newly created connection and
Step 2: Configure to start transfer of data from Twitter Audience Insights to Treasure Data.
In the My Connections tab, look for the connection you created. Select the connector and click
New Transfer to start a transfer.
Complete the connector parameters information:
- Ad Account ID (required): This is your Twitter Ads Account ID. See Appendix A for information about retrieving an account id.
- Audience Type (required): Name of Audience Type that you are retrieving data from.
- Audience Values : The ID or name of the specific audience group/sub-set. For example, when Audience Type is Twitter Ads Campaign, the value is individual campaign's name or ID.
- Interaction Type : The interaction type for the specific audience group/sub-set. Depends on audience type and accepts Conversion, Engagement and Impression
Following table lists supported values for the Audience Type , Audience Values and Interaction Type
|Audience Type||Audience Values||Interaction Type|
|ALL ON TWITTER||NA||Impression, Conversion or Engagement|
|CAMPAIGN||Individual ID or name of the campaign. A blank value retrieves all campaigns data||Impression, Conversion or Engagement|
|ORGANIC||Individual ID or name of the organic group||Impression, Conversion or Engagement|
|APP||Individual ID or name of the mobile application||Refer to the Twitter Ads Documentation|
Here is a sample configuration:
Step 3: Review the data
After clicking on
Next, you see a sample set of data for preview
The data contains several columns for the desired Audience Insights. Appendix B provides a brief description of what they are.
Step 4: Import data into Treasure Data
If the preview data is acceptable, go to the
Next. If you want to make changes to the import details. click
Advanced Settings contains some options to control the retrying mechanism for getting data from Twitter API. These values are best kept at their default values and tuned only when there is issue with network connections.
- Retry Limit (optional, default
3): Number of retries before before the connector stops trying to connect.
- Retry Initial wait in Milliseconds (optional, default
10000): Interval to retry if a recoverable error occurs (in millisecond).
- Retry Max wait in Milliseconds (optional, default to
300000) : Maximum time in milliseconds between retrying attempts.
Next allows you to import the data into your target database and table as shown in the following dialog:
Finally, specify the schedule of the data transfer using the following dialog and click
You will see the new data transfer in progress listed under the
My Input Transfers tab and a corresponding job will be listed in the Jobs section.
Appendix A: Twitter Ads Account info
Access to an Ads Account is the pre-requisite to retrieve data for Audience Insights. The account ID can be retrieved from the Account Settings Page
or from your Ads Insights URL.
Example : ads.twitter.com/accounts//audience_insights
Appendix B: Imported data and their columns
Some information about the columns of the Insights record:
|time||The Unix timestamp of the importing event||Created by importing job audience_type|
|audience_type||The Audience Type, value of ALL_ON_TWITTER, CAMPAIGN, APP or ORGANIC||Defined in Twitter Audience Insights specification audience_id|
|audience_id||The ID of the specific sub type/ sub-grouping of the Audience Type||The internal Twitter ID for the specific type. May not be visible on the Dashboard|
|audience_name||The name of the specific sub type/sub-grouping of the Audience Type (if available)||The name appears on Twitter Ads Dashboard|
|interaction_type||The type of the interaction for this Audience Insights, can be IMPRESSION, ENGAGEMENT or CONVERSION||The default is IMPRESSION|
|home_value||Information about the home values of the audience, divided into segments||Includes all data from Twitter|
|marital_status||Marriage information about the audience||As provided on Twitter|
- Several more data columns contain information about the audience. Each column is a data summary for each category on the Twitter Ads Dashboard