TikTok Ads

The TikTok Ads Connector provides automated access to ad analytics. For more information about TikTok Ads, please consult their API documentation.

Prerequisites

The TikTok connector requires a user with read access to TikTok ads data. To add a credential for this connector, click Connect to login with TikTok when adding a Key to the switchboard KeyStore.

Scheduling

The TikTok Ads connector can be scheduled to ingest data once per day at a user-defined hour and timezone. By default, the connector will run once at 6am PT. See Daily Scheduling for more information.

Parameters

Metrics
Required. Metrics to query. Auction and Reservation Ads support different metrics, see Auction Ads Report Supplement-Supported Metrics and Reservation Ads Report Supplement-Supported Metrics.
Dimensions
Required. For a full list of supported dimensions see Auction Advertising Report Supplement-Supported Dimensions and Reservation Ads Report Supplement-Supported Dimensions
Report type
Required. Allowed values are:
  • BASIC - Basic data report
  • AUDIENCE - Audience analysis data report. Only Auction Ads support this report type
  • PLAYABLE_MATERIAL - Playable ads data report. Only Auction Ads support this report type
  • CATALOG - DPA ads data report. Only Auction Ads support this report type.
Service type
Optional. Allowed values are:
  • AUCTION_ADGROUP
  • AUCTION_CAMPAIGN
  • AUCTION_AD
  • RESERVATION_CAMPAIGN
  • AUCTION_ADVERTISER
  • RESERVATION_ADVERTISER
  • RESERVATION_AD
Data Level
Required. Allowed values are:
  • AUCTION_AD
  • AUCTION_ADGROUP
  • AUCTION_ADVERTISER
  • AUCTION_CAMPAIGN
  • RESERVATION_AD
  • RESERVATION_ADVERTISER
  • RESERVATION_CAMPAIGN

Sample Switchboard Script

import tik_tok_ads_audience from {
    type: "tiktok:ads";
    key: "TikTok key";
    report_type: "AUDIENCE";
    metrics: [
                "campaign_name",
                "campaign_id",
                "adgroup_name",
                "adgroup_id",
                "ad_name",
                "ad_text",
                "spend",
                "cpc",
                "cpm",
                "impressions",
                "clicks",
                "ctr"
    ];
    dimensions: ['ad_id', 'country_code', 'stat_time_day'];
    data_level: "AUCTION_AD";
} using {
    dimensions: {
        ad_id: integer;
        stat_time_day: datetime;
        country_code: string;
    };
    metrics: {
        ad_name: string;
        ad_text: string;
        adgroup_id: integer;
        adgroup_name: string;
        campaign_id: integer;
        campaign_name: string;
        cpm: float;
        ctr: float;
        cpc: float;
        reach: integer;
        spend: float;
        impressions: integer;
        clicks: integer;
    };
};