Twitter Ads

Hevo can replicate your Twitter Ads’ data to your data warehouse using Twitter API.

For creating Pipelines using this Source, Hevo provides you a fully managed BigQuery data warehouse as a possible Destination. This option remains available till the time you set up your first BigQuery Destination irrespective of any other Destinations that you may have. With the managed warehouse, you are only charged the cost that Hevo incurs for your project in Google BigQuery. The invoice is generated at the end of each month and payment is recovered as per the payment instrument you have set up. You can now create your Pipeline and directly start analyzing your Source data. Read Hevo Managed Google BigQuery.


Apply for a Developer Account

To connect Twitter Ads to Hevo, you need a Twitter app with access to the Twitter Ads API. If you already have a developer account, skip ahead to Step 2.

  1. Go to Twitter’s Apply for access page.

  2. Select Apply for a developer account.

  3. Select Build customized solutions in-house.

  4. Input your organization details and explain how you intend to use the Twitter data in subsequent application screens. For the use case description field, we recommend using the following paragraph:

    We will use Twitter API to pull our advertising data and load it into our data warehouse for internal analytics purposes. My organization is keen to understand our ads' performance on Twitter and also perform comparative analysis with other ads platforms. We will be only pulling data out of Twitter and don't plan to trigger any action on the platform.

    Note: It may take few days for Twitter to approve your developer account.


Prerequisites

  1. Twitter Ads account with ACCOUNT_ADMIN, AD_MANAGER, or CREATIVE_MANAGER permissions.

  2. Twitter Developer Account


Create a Twitter Application

  1. If you already have an application that you can use to connect to HEVO, skip to Step 3.

  2. After your developer account is approved, go to Twitter’s Create Application page to create a Twitter app.

  3. In the Website URL field, fill https://hevodata.com/ .

  4. In the Tell us how this app will be used field, you can fill the following:

    This application will be used to pull analytics on the advertising that I run on the Twitter platform in order to analyse performance.


Submit the Advertising API License Agreement Form

  1. Navigate to the Advertising Api License Agreement.

  2. Fill and submit the form.


Generate Keys and Tokens for Your Account

  1. Go to your Twitter App Dashboard.

  2. Select the application that you created in Step 2.

  3. Click on the Keys and tokens tab.

  4. Create your keys and tokens.

  5. Make a note of these keys and tokens. You will need them to configure Twitter Ads source at HEVO.


Configure Twitter as a Source

Perform the following steps to configure Twitter Ads as the Source in your Pipeline:

  1. Click PIPELINES in the Asset Palette.

  2. Click + CREATE in the Pipelines List View.

  3. In the Select Source Type page, select Twitter Ads.

  4. In the Configure your Twitter Ads Source page, specify the following:

    Twitter Ads Settings

    • Pipeline Name: A unique name for the Pipeline.

    • Enter the following keys and tokens that you created.

      • Consumer API Key
      • Consumer API Secret
      • Access Token
      • Access Token Secret
  5. Click TEST & CONTINUE.

  6. Proceed to configuring the data ingestion and setting up the Destination.


Data Replication

Default Pipeline Frequency Minimum Pipeline Frequency Maximum Pipeline Frequency Custom Frequency Range (Hrs)
1 Hr 15 Mins 24 Hrs 1-24

Note: The custom frequency must be set in hours, as an integer value. For example, 1, 2, 3 but not 1.5 or 1.75.

Objects

  • Historical data: In the first run of the Pipeline, Hevo fetches the data of all the objects in your account and loads it to the Destination.

  • Incremental data: Once the historical load is completed, all new and updated records are synchronized with your Destination once daily. By default, Hevo ingests these records every hour.

Reports

  • Historical data: In the first run of the Pipeline, Hevo replicates the report data for the past 90 days from all the reports in your account.

  • Incremental data: Once the historical load is completed, reports are synchronized with your Destination every hour by default. You can modify this frequency using the Change Schedule option in the Pipeline Summary in the Pipelines Detailed View.

Note: From Release 1.79 onwards, Hevo ingests your historical data using the Recent Data First approach, whereby, the data is ingested in the reverse order, starting from the latest to the earliest. This enables you to have quicker access to the most recent data. This change applies to all new and existing Pipelines.


Schema and Primary Keys

Primary Keys for Objects

Object Primary Keys
ACCOUNTS ACCOUNT_ID, ID
FUNDING_INSTRUMENTS ACCOUNT_ID, ID
CAMPAIGNS ACCOUNT_ID, ID
LINE_ITEMS ACCOUNT_ID, ID
PROMOTED_TWEETS ACCOUNT_ID, ID
MEDIA_CREATIVE ACCOUNT_ID, ID

Primary Keys for Reports

Unsegmented reports

Report Primary Keys
ACCOUNT_REPORT ACCOUNT_ID, ENTITY_ID, DATE, PLACEMENT
CAMPAIGN_REPORT ACCOUNT_ID, ENTITY_ID, DATE, PLACEMENT
FUNDING_INSTRUMENT_REPORT ACCOUNT_ID, ENTITY_ID, DATE, PLACEMENT
LINE_ITEM_REPORT ACCOUNT_ID, ENTITY_ID, DATE, PLACEMENT
PROMOTED_TWEET_REPORT ACCOUNT_ID, ENTITY_ID, DATE, PLACEMENT
MEDIA_CREATIVE_REPORT ACCOUNT_ID, ENTITY_ID, DATE, PLACEMENT

Segmented reports

Report Primary Key
ACCOUNT_AGE_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
ACCOUNT_APP_STORE_CATEGORY_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
ACCOUNT_DEVICES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, PLATFORM_TARGET_VALUE
ACCOUNT_EVENTS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
ACCOUNT_GENDER_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
ACCOUNT_INTERESTS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
ACCOUNT_LOCATIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
ACCOUNT_PLATFORMS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
ACCOUNT_PLATFORM_VERSIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, PLATFORM_TARGET_VALUE
ACCOUNT_POSTAL_CODES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, COUNTRY_TARGET_VALUE
ACCOUNT_REGIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, COUNTRY_TARGET_VALUE
CAMPAIGN_AGE_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
CAMPAIGN_APP_STORE_CATEGORY_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
CAMPAIGN_CONVERSION_TAGS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
CAMPAIGN_DEVICES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, PLATFORM_TARGET_VALUE
CAMPAIGN_EVENTS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
CAMPAIGN_GENDER_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
CAMPAIGN_INTERESTS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
CAMPAIGN_KEYWORDS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
CAMPAIGN_LANGUAGES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
CAMPAIGN_LOCATIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
CAMPAIGN_PLATFORMS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
CAMPAIGN_PLATFORM_VERSIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, PLATFORM_TARGET_VALUE
CAMPAIGN_POSTAL_CODES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, COUNTRY_TARGET_VALUE
CAMPAIGN_REGIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, COUNTRY_TARGET_VALUE
CAMPAIGN_SIMILAR_TO_FOLLOWERS_OF_USER_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
CAMPAIGN_TV_SHOWS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
FUNDING_INSTRUMENT_AGE_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
FUNDING_INSTRUMENT_APP_STORE_CATEGORY_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
FUNDING_INSTRUMENT_CONVERSION_TAGS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
FUNDING_INSTRUMENT_DEVICES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, PLATFORM_TARGET_VALUE
FUNDING_INSTRUMENT_EVENTS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
FUNDING_INSTRUMENT_GENDER_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
FUNDING_INSTRUMENT_INTERESTS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
FUNDING_INSTRUMENT_LOCATIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
FUNDING_INSTRUMENT_PLATFORMS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
FUNDING_INSTRUMENT_PLATFORM_VERSIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, PLATFORM_TARGET_VALUE
FUNDING_INSTRUMENT_REGIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, COUNTRY_TARGET_VALUE
LINE_ITEM_AGE_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
LINE_ITEM_APP_STORE_CATEGORY_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
LINE_ITEM_CONVERSION_TAGS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
LINE_ITEM_DEVICES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, PLATFORM_TARGET_VALUE
LINE_ITEM_EVENTS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
LINE_ITEM_GENDER_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
LINE_ITEM_INTERESTS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
LINE_ITEM_KEYWORDS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
LINE_ITEM_LANGUAGES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
LINE_ITEM_LOCATIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
LINE_ITEM_PLATFORMS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
LINE_ITEM_PLATFORM_VERSIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, PLATFORM_TARGET_VALUE
LINE_ITEM_POSTAL_CODES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, COUNTRY_TARGET_VALUE
LINE_ITEM_REGIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, COUNTRY_TARGET_VALUE
LINE_ITEM_SIMILAR_TO_FOLLOWERS_OF_USER_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
LINE_ITEM_TV_SHOWS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_AGE_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_APP_STORE_CATEGORY_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_CONVERSION_TAGS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_DEVICES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, PLATFORM_TARGET_VALUE
PROMOTED_TWEET_EVENTS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_GENDER_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_INTERESTS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_KEYWORDS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_LANGUAGES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_LOCATIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_PLATFORMSREPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_PLATFORM_VERSIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, PLATFORM_TARGET_VALUE
PROMOTED_TWEET_POSTAL_CODES_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, COUNTRY_TARGET_VALUE
PROMOTED_TWEET_REGIONS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT, COUNTRY_TARGET_VALUE
PROMOTED_TWEET_SIMILAR_TO_FOLLOWERS_USER_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENT_NAME, PLACEMENT
PROMOTED_TWEET_TV_SHOWS_REPORT ACCOUNT_ID, ENTITY_ID, DATE, SEGMENTNAME, PLACEMENT

Data Model

The following is the list of tables that are created at the Destination when you run the Pipeline configured for Twitter Ads:

Objects

  • ACCOUNTS

  • FUNDING_INSTRUMENTS

  • CAMPAIGNS

  • LINE_ITEMS

  • PROMOTED_TWEETS

  • MEDIA_CREATIVE

Reports

You can retrieve the following types of reports:

Unsegmented reports

Unsegmented reports give you the overview-level information of your ad campaign.

  • ACCOUNT_REPORT

  • CAMPAIGN_REPORT

  • FUNDING_INSTRUMENT_REPORT

  • LINE_ITEM_REPORT

  • PROMOTED_TWEET_REPORT

  • MEDIA_CREATIVE_REPORT

Segmented reports

Segmented reports retrieve metrics such as AGE or APP_STORE, allowing partners and advertisers to get detailed information for a particular segment type. For example, to know the success of a campaign based on age, you can fetch the CAMPAIGN_AGE_REPORT.

Read Twitter Ads API Analytics and Metrics and Segmentation.

  • ACCOUNT_AGE_REPORT

  • ACCOUNT_APP_STORE_CATEGORY_REPORT

  • ACCOUNT_DEVICES_REPORT

  • ACCOUNT_EVENTS_REPORT

  • ACCOUNT_GENDER_REPORT

  • ACCOUNT_INTERESTS_REPORT

  • ACCOUNT_LOCATIONS_REPORT

  • ACCOUNT_PLATFORMS_REPORT

  • ACCOUNT_PLATFORM_VERSIONS_REPORT

  • ACCOUNT_POSTAL_CODES_REPORT

  • ACCOUNT_REGIONS_REPORT

  • CAMPAIGN_AGE_REPORT

  • CAMPAIGN_APP_STORE_CATEGORY_REPORT

  • CAMPAIGN_CONVERSION_TAGS_REPORT

  • CAMPAIGN_DEVICES_REPORT

  • CAMPAIGN_EVENTS_REPORT

  • CAMPAIGN_GENDER_REPORT

  • CAMPAIGN_INTERESTS_REPORT

  • CAMPAIGN_KEYWORDS_REPORT

  • CAMPAIGN_LANGUAGES_REPORT

  • CAMPAIGN_LOCATIONS_REPORT

  • CAMPAIGN_PLATFORMS_REPORT

  • CAMPAIGN_PLATFORM_VERSIONS_REPORT

  • CAMPAIGN_POSTAL_CODES_REPORT

  • CAMPAIGN_REGIONS_REPORT

  • CAMPAIGN_SIMILAR_TO_FOLLOWERS_OF_USER_REPORT

  • CAMPAIGN_TV_SHOWS_REPORT

  • FUNDING_INSTRUMENT_AGE_REPORT

  • FUNDING_INSTRUMENT_APP_STORE_CATEGORY_REPORT

  • FUNDING_INSTRUMENT_CONVERSION_TAGS_REPORT

  • FUNDING_INSTRUMENT_DEVICES_REPORT

  • FUNDING_INSTRUMENT_EVENTS_REPORT

  • FUNDING_INSTRUMENT_GENDER_REPORT

  • FUNDING_INSTRUMENT_INTERESTS_REPORT

  • FUNDING_INSTRUMENT_LOCATIONS_REPORT

  • FUNDING_INSTRUMENT_PLATFORMS_REPORT

  • FUNDING_INSTRUMENT_PLATFORM_VERSIONS_REPORT

  • FUNDING_INSTRUMENT_REGIONS_REPORT

  • LINE_ITEM_AGE_REPORT

  • LINE_ITEM_APP_STORE_CATEGORY_REPORT

  • LINE_ITEM_CONVERSION_TAGS_REPORT

  • LINE_ITEM_DEVICES_REPORT

  • LINE_ITEM_EVENTS_REPORT

  • LINE_ITEM_GENDER_REPORT

  • LINE_ITEM_INTERESTS_REPORT

  • LINE_ITEM_KEYWORDS_REPORT

  • LINE_ITEM_LANGUAGES_REPORT

  • LINE_ITEM_LOCATIONS_REPORT

  • LINE_ITEM_PLATFORMS_REPORT

  • LINE_ITEM_PLATFORM_VERSIONS_REPORT

  • LINE_ITEM_POSTAL_CODES_REPORT

  • LINE_ITEM_REGIONS_REPORT

  • LINE_ITEM_SIMILAR_TO_FOLLOWERS_OF_USER_REPORT

  • LINE_ITEM_TV_SHOWS_REPORT

  • PROMOTED_TWEET_AGE_REPORT

  • PROMOTED_TWEET_APP_STORE_CATEGORY_REPORT

  • PROMOTED_TWEET_CONVERSION_TAGS_REPORT

  • PROMOTED_TWEET_DEVICES_REPORT

  • PROMOTED_TWEET_EVENTS_REPORT

  • PROMOTED_TWEET_GENDER_REPORT

  • PROMOTED_TWEET_INTERESTS_REPORT

  • PROMOTED_TWEET_KEYWORDS_REPORT

  • PROMOTED_TWEET_LANGUAGES_REPORT

  • PROMOTED_TWEET_LOCATIONS_REPORT

  • PROMOTED_TWEET_PLATFORMS_REPORT

  • PROMOTED_TWEET_PLATFORM_VERSIONS_REPORT

  • PROMOTED_TWEET_POSTAL_CODES_REPORT

  • PROMOTED_TWEET_REGIONS_REPORT

  • PROMOTED_TWEET_SIMILAR_TO_FOLLOWERS_OF_USER_REPORT

  • PROMOTED_TWEET_TV_SHOWS_REPORT


Source Considerations

  • From version 10 of Twitter Ads API, only advertising-enabled accounts are visible in the Ads Accounts drop-down while configuring Twitter Ads as a Source in Hevo. Any existing Pipelines created with accounts not enabled for advertising are not affected. However, if you want to continue using the non-advertiser accounts, you must enable them for advertising. Read Ads Account creation for the steps.

  • Some fields in the LINE_ITEMS object have been either renamed or deprecated. The field bid_type has been renamed to bid_strategy. The fields automatically_select_bid and tracking_tags have been deprecated. As a result, from Release 1.81 onwards, these fields contain null values in the Destination table. The new field, bid_strategy is automatically mapped if Auto Mapping is enabled.


Limitations

None.



Revision History

Refer to the following table for the list of key updates made to this page:

Date Release Description of Change
Feb-07-2022 1.81 - Reorganized the content in the Data Replication section.
- Segregated the reports content based on their type in sections, Schema and Primary Keys and Data Model.
- Added section, Source Considerations.
Jan-03-2022 1.79 Added information about reverse historical load in the Data Replication section.
Oct-25-2021 NA Added the Pipeline frequency information in the Data Replication section.
Last updated on 20 Sep 2022

Tell us what went wrong