Collecting data from Twitter Ads

This guide explains how to collect data from Twitter Ads. To learn how to collect data from a different data source, go back to the Available data sources in Adverity overview.

Introduction

For a list of the fields that you can collect from Twitter Ads, see Twitter Ads.

You can retrieve information for cards created through Twitter Ads API or ads.twitter.com. You cannot retrieve information for cards created through the Twitter user interface.

  • Twitter Ads can collect a maximum of 1 million rows per single report. To fetch more data than this, split your fetch into smaller date ranges in the Initial Fetch step of creating a datastream.

Prerequisites

Before you start collecting data from Twitter Ads, perform all of the following actions:

  • Ensure that the Twitter user who sets up the authorization has one of the following roles:

    • Ad Manager

    • Account Administrator

Creating a datastream to collect data from Twitter Ads

The basics of creating a datastream to collect data from any data source are explained in our guide to Creating a datastream. This guide contains information about the specific steps to create a datastream to fetch data from Twitter Ads.

Authorization: Allow Adverity to access Twitter Ads

  1. If you choose Access using your credentials or Access using someone else's credentials, in Set up or edit Accounts, you or the person granting access must choose one of the following options:

    • Choose Grant access to all Accounts, including those created in the future to allow Adverity to access all existing Accounts and all Accounts created in the future.

    • Choose Select specific Accounts to which you want to grant access to determine the specific Accounts that you want Adverity to access. Adverity will not automatically have access to Accounts created in the future. You will need to grant Adverity access to any Accounts created in the future.

    If you use your credentials to grant Adverity access to Twitter Ads, all the Accounts available to you using your credentials will be visible in the Authorizations page to all Adverity users with permission to edit this authorization.

    If someone else uses their credentials to grant Adverity access to Twitter Ads, the same applies to the Accounts available using their credentials.

    This is important to consider if you do not want all Adverity users with permission to edit the authorization to be able to see the details of the Accounts. For more information about user permissions, see Managing user permissions.

Configuration: Choose the data you want to collect from Twitter Ads

To choose what data to collect and customize the Twitter Ads datastream configuration, follow these steps:

  1. (Optional) Rename your datastream.

  1. In Accounts, select the accounts for which to collect data. If you do not select any items in a drop-down list, Adverity collects data for all items in the drop-down list.

  2. (Optional) Select the Exclude accounts checkbox to exclude the selected accounts.

  1. In Report type, select the type of data to collect from Twitter Ads. The fields you need to configure in the following steps differ according to the report type you select.

  1. In Level, select the type of data to collect from Twitter Ads. The configuration options below may change depending on the selected level.

  2. In Entities, select the entities to include in the report.

  1. In Metrics and Dimensions, change the list of fields that you want to see in your data extract.

  1. In Placement, select the ad placement type. If you do not select any items in a drop-down list, Adverity collects data for all items in the drop-down list.

  2. In Granularity, select the time unit in which you want to retrieve your data.

  3. Select the Include mentions and replies checkbox to collect data for mentions and replies to your tweets.

  1. In Campaigns, select the campaigns for which to collect data. If you do not select any items in a drop-down list, Adverity collects data for all items in the drop-down list.

  1. Select the Include inactive campaigns checkbox to include campaigns older than 90 days.

  2. In Segmentation, select how to segment your data.

  3. Select the Media screenshots enabled checkbox to capture media screenshots.

What's next?

Troubleshooting Twitter Ads

I see an error message when fetching data from Twitter Ads

The Expect time to be midnight in the account's local timezone for day granularity error message appears because you are trying to fetch data for a date range over 90 days.

To resolve this issue, fetch data for a date range shorter than 90 days.

My ad name has not been updated in the data I have collected from Twitter Ads

If you have updated the name of an ad in the Twitter Ads UI but the new name does not appear in the data collected from Twitter Ads, follow these steps to update the name:

  1. Synchronize the metadata for the authorization you are using to collect the data.

  2. Delete any cached tweets.

  3. Wait until the update queue is empty, which means the metadata has been synchronized.

  4. Fetch your data again to check that the name has been updated.

I cannot collect card data from Twitter Ads

The Twitter user who authorizes Adverity to access Twitter Ads must have an Ad Manager or Account Administrator role in order to fetch the card_name and website_card_url fields:

To collect data about these card fields, follow these steps:

  1. Update the permissions of the Twitter user who used their credentials to grant the authorization to one of the following roles:

    • Ad Manager

    • Account Administrator

  2. Update the authorization to Twitter Ads. For more information, see Updating an authorization.

  3. Contact your Adverity Customer Success manager. Our Engineering Team needs to manually sync all tweet data (including card data) within the Adverity platform.

  4. Collect data from Twitter Ads using the updated authorization. If these fields are still not present in your data extract, contact the Adverity Support team.

Advanced Twitter Ads tips

Configuring screenshot capture for Twitter Ads

To access the Twitter Ads configuration page and enable screenshot capture, follow these steps:

  1. Select the workspace you work with in Adverity and then, in the platform navigation menu, click Datastreams.

  2. Open the Twitter Ads datastream by clicking on its name.

  3. In the top navigation panel, click Settings.

  4. In the General section of the page, fill in the following fields:

    Media Screenshots enabled

    To take screenshots of your ads, select this checkbox and make sure Dimensions contains the field tweet_id.

    The screenshots are saved in the same storage as the Twitter Ads data extracts. For more information, see Setting up storage for data extracts. The screenshots are stored until you delete them manually from the storage, or delete the Twitter Ads datastream.