> ## Documentation Index
> Fetch the complete documentation index at: https://developer.dashsocial.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Track ad campaign trends with graph reports

> Visualize ad campaign performance trends over time using time-series data.

Pull time-series ad campaign data to track performance trends over time. Use the data to visualize day-by-day metrics and identify patterns in ad campaign activity.

***

## Use cases

Tracking ad campaign trends manually across weeks or months wastes hours. Graph reports give you time-series data ready to visualize instantly.

<CardGroup cols={3}>
  <Card title="Track campaign momentum">
    Visualize daily campaign performance to spot trends and optimize in real-time
  </Card>

  <Card title="Identify peak performance">
    Compare ad performance across date ranges to understand when campaigns perform best
  </Card>

  <Card title="Monitor spend efficiency">
    Track cost-per-click and conversion trends over time to optimize budget allocation
  </Card>
</CardGroup>

***

## Before you start

Prerequisites:

* **API Key** - Your authentication token - Get your API key from the [API Quickstart](https://developer.dashsocial.com/guides/get-started/quickstart).
* **Brand ID** - Your brand's unique ID
* **Connected Ad Accounts** - Meta Ads and/or TikTok Ads accounts connected in Dash Social

Supported platforms:

* Meta Ads
* TikTok Ads

<Warning>
  **Connect ad accounts first:** Report on ad accounts connected in Dash Social only. Connect your ad accounts in **Dash Social → Settings → Ad Account Management** before using this API.
</Warning>

<Callout icon="💡" theme="default">
  ### Test in the dashboard first

  Preview ad campaign graph reports in the Dash Social Dashboard to understand the data structure before pulling via API.
</Callout>

***

## Implementation

### Step 1: Get ad account IDs

Get the ad account IDs for your connected advertising accounts. Each platform has a different endpoint.

#### For Meta Ads

Send a GET request:

```http theme={null}
GET https://facebook.dashsocial.com/brands/{brand_id}/ad_accounts
```

Replace `{brand_id}` with your brand ID (e.g., `144`).

#### For TikTok Ads

Send a GET request:

```http theme={null}
GET https://tiktok.dashsocial.com/marketing/brands/{brand_id}/ad_accounts
```

Replace `{brand_id}` with your brand ID (e.g., `144`).

Sample response (both platforms):

```json theme={null}
[
    {
        "id": "1368643043296927",
        "name": "Demo Ad Account",
        "status": "ACTIVE"
    }
]
```

Collect each ad account `id` value. You'll use these in Step 2.

<Callout icon="💡" theme="default">
  ### Compare across platforms

  To compare multiple platforms, call both endpoints separately to get ad account IDs for Meta and TikTok.
</Callout>

***

### Step 2: Get ad campaigns

Retrieve the ad campaigns under each ad account. Each platform has a different endpoint.

#### For Meta Ads

Send a PUT request:

```http theme={null}
PUT https://facebook.dashsocial.com/brands/marketing_v2/campaigns
body = {
  "ad_account_ids": ["1368643043296927"],
  "brand_ids": [144]
}
```

#### For TikTok Ads

Send a PUT request:

```http theme={null}
PUT https://tiktok.dashsocial.com/marketing/ad_campaigns
body = {
  "brand_ids": [144],
  "source_ad_account_ids": ["7113956961980284930"]
}
```

Sample response (both platforms):

```json theme={null}
[
    {
        "brand_ids": [2000],
        "id": 9226231,
        "name": "Ad Campaign 1 GBP",
        "source_ad_account_id": "demo_ag10808192",
        "source_campaign_id": "demo1_3112",
        "source_created_time": "2024-01-09T10:00:00+00:00",
        "source_updated_time": null,
        "status": "PAUSED"
    }
]
```

Collect each `source_ad_account_id` and `source_campaign_id` value. Format as comma-separated values for the report API:

* Ad account IDs: `1368643043296927,7113956961980284930`
* Campaign IDs: `120236587787680490,120236587787680491`

***

### Step 3: Map your report parameters

Map the available parameters before making the API call:

<Table>
  <thead>
    <tr>
      <th>
        Parameter
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `brand_ids`
      </td>

      <td>
        Your brand ID.
      </td>
    </tr>

    <tr>
      <td>
        `channels`
      </td>

      <td>
        Ad platform to report on:

        * Meta Ads: `META_ADS`
        * TikTok Ads: `TIKTOK_ADS`

        Only one channel can be specified per request.
      </td>
    </tr>

    <tr>
      <td>
        `metrics`
      </td>

      <td>
        Metric to track over time. See [Metrics](#metrics) section below for all options.

        Request multiple metrics by separating with commas (e.g., `LINK_CLICKS,IMPRESSIONS,SPEND`)
      </td>
    </tr>

    <tr>
      <td>
        `source_ad_account_ids`
      </td>

      <td>
        Comma-separated ad account IDs from Step 1: `1368643043296927,7113956961980284930`
      </td>
    </tr>

    <tr>
      <td>
        `source_campaign_ids`
      </td>

      <td>
        Comma-separated campaign IDs from Step 2: `120236587787680490,120236587787680491`
      </td>
    </tr>

    <tr>
      <td>
        `start_date` / `end_date`
      </td>

      <td>
        Reporting period in `YYYY-MM-DD` format. The graph report returns daily data points for each date in this range.
      </td>
    </tr>

    <tr>
      <td>
        `context_start_date` / `context_end_date`
      </td>

      <td>
        Comparison date range for period-over-period analysis. Use same dates as `start_date` / `end_date` if no comparison needed
      </td>
    </tr>

    <tr>
      <td>
        `report_type`
      </td>

      <td>
        Set to `ADS_GRAPH` for time-series data
      </td>
    </tr>

    <tr>
      <td>
        `time_scale`
      </td>

      <td>
        Time granularity for data aggregation:

        * `DAILY` - Daily data points (default)
        * `MONTHLY` - Monthly data points

        Optional. Defaults to `DAILY` if not specified.
      </td>
    </tr>
  </tbody>
</Table>

***

### Step 4: Request the graph report

Send a GET request using the parameters from Step 3.

This example gets daily link clicks for Meta Ads campaigns during August 2025:

```http theme={null}
GET https://dashboard.dashsocial.com/reports/data?channels=META_ADS&
		start_date=2025-08-10&
		end_date=2025-08-20&
		metrics=LINK_CLICKS&
		brand_ids=144&
		report_type=ADS_GRAPH&
		context_start_date=2024-07-01&
		context_end_date=2024-07-31&
		source_ad_account_ids=1368643043296927&
		source_campaign_ids=120236587787680490
```

<Callout icon="💡" theme="default">
  ### Compare multiple platforms

  Make separate requests for each channel: `META_ADS`, `TIKTOK_ADS`. Combine results in your dashboard or analytics tool.
</Callout>

Sample response:

```json theme={null}
{
    "data": {
        "120236587787680490": {
            "META_ADS": {
                "LINK_CLICKS": {
                    "2025-08-10": 120.0,
                    "2025-08-11": 145.0,
                    "2025-08-12": 132.0,
                    "2025-08-13": 158.0,
                    "2025-08-14": 167.0,
                    "2025-08-15": 189.0,
                    "2025-08-16": 201.0,
                    "2025-08-17": 178.0,
                    "2025-08-18": 194.0,
                    "2025-08-19": 156.0,
                    "2025-08-20": 143.0
                }
            },
            "campaign_name": "Summer Sale Campaign",
            "data_type": "CAMPAIGN",
            "metrics": {
                "LINK_CLICKS": {
                    "META_ADS": {
                        "2025-08-10": 120.0,
                        "2025-08-11": 145.0,
                        "2025-08-12": 132.0,
                        "2025-08-13": 158.0,
                        "2025-08-14": 167.0,
                        "2025-08-15": 189.0,
                        "2025-08-16": 201.0,
                        "2025-08-17": 178.0,
                        "2025-08-18": 194.0,
                        "2025-08-19": 156.0,
                        "2025-08-20": 143.0
                    }
                }
            },
            "source_ad_account_id": "1368643043296927",
            "source_campaign_id": "120236587787680490",
            "user_has_access": true
        }
    },
    "product_category": "ADS"
}
```

***

### Step 5: Interpret the response

The response includes time-series data for each ad campaign.

#### Response structure

Each campaign includes:

* **`data_type`**: `CAMPAIGN`
* **`campaign_name`**: Name of the ad campaign
* **`source_ad_account_id`**: Ad account ID
* **`source_campaign_id`**: Campaign ID
* **Date-keyed metrics**: Each metric is organized by date (e.g., `"2025-08-10": 120.0`). This makes it easy to plot on line charts or trend graphs.

#### Example insights

From the sample response:

* **Summer Sale Campaign** had peak performance on August 16 with 201 link clicks
* Performance showed an upward trend from August 10-16
* Click volume decreased in the final days of the period (August 17-20)

<Warning>
  **Common errors:**

  * **Invalid channel name** - Use `META_ADS` or `TIKTOK_ADS`. Only one channel per request.
  * **Invalid ad account or campaign ID** - Verify IDs match the responses from Steps 1-2.
  * **Missing context dates** - Include `context_start_date` and `context_end_date` for trend analysis.
  * **Sparse data** - Some dates may have null values if the campaign was paused or had no activity.
</Warning>

***

## Metrics

<Tabs>
  <Tab title="Meta Ads">
    | Metric Name            | Description                                                                                                                                                             | Metric API Name      |
    | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
    | Clicks (All) - Ads     | The total number of times the ads in your selected campaign were clicked during the Reporting Period                                                                    | `CLICKS`             |
    | CTR - Ads              | The percentage of times people clicked your ads after seeing them during the Reporting Period. CTR = Total Clicks / Impressions                                         | `CLICK_THROUGH_RATE` |
    | Conversion Rate - Ads  | The percentage of people who saw the ad and performed the desired action                                                                                                | `CONVERSION_RATE`    |
    | CPC - Ads              | The average cost per click on your social ads during the Reporting Period.CPC = Spend / Total Clicks                                                                    | `COST_PER_CLICK`     |
    | CPM - Ads              | The average cost per 1,000 impressions on your selected ad campaign during the Reporting Period. CPM = Total Spend / Impressions                                        | `COST_PER_MILE`      |
    | Engagements - Ads      | The total number of engagements on all ads within your selected campaign during the Reporting Period                                                                    | `ENGAGEMENTS`        |
    | Engagement Rate - Ads  | The total percentage of users who engaged with your selected campaign after seeing an ad during the Reporting Period. Engagement Rate = Total Engagements / Impressions | `ENGAGEMENT_RATE`    |
    | Frequency - Ads        | The average number of times users saw ads in your campaign during the Reporting Period                                                                                  | `FREQUENCY`          |
    | Impressions - Ads      | The total number of impressions the ads in your selected campaign received during the Reporting Period                                                                  | `IMPRESSIONS`        |
    | Link Clicks - Ads      | The total number of times links on the ads in your selected campaign were clicked during the Reporting Period                                                           | `LINK_CLICKS`        |
    | Page Engagements - Ads | The total number of engagements your page and its posts received from your ads during the Reporting Period                                                              | `PAGE_ENGAGEMENTS`   |
    | Reach - Ads            | The total number of unique accounts that saw ads within your selected campaign during the Reporting Period.                                                             | `REACH`              |
    | ROAS - Ads             | The total return on ad spend for your selected campaign, as provided by Meta.ROAS = Calculated Purchase Conversion Value / Amount Spent                                 | `RETURN_ON_AD_SPEND` |
    | Amount Spent - Ads     | The average cost per click on your social ads during the Reporting Period.CPC = Spend / Total Clicks                                                                    | `TOTAL_SPENT`        |
    | Video Views - Ads      | The total number of times videos in your selected ad campaign were viewed for over 3 seconds during the Reporting Period                                                | `VIDEO_VIEWS`        |
    | Web Conversions - Ads  | The estimated number of conversions your selected ad campaign received during the Reporting Period, as measured by the Meta Pixel installed on your website             | `WEB_CONVERSIONS`    |
  </Tab>

  <Tab title="TikTok Ads">
    | Metric Name                     | Description                                                                                                                                                | Metric API Name                  |
    | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
    | Clicks - Ads                    | The number of clicks on your ads that led to a destination, such as a website, during the Reporting Period.                                                | `CLICKS`                         |
    | CTR - Ads                       | The percentage of times people saw your ad and performed a click (destination) during the reporting period.                                                | `CLICK_THROUGH_RATE_DESTINATION` |
    | CPC - Ads                       | The average cost per click on your ads during the Reporting Period that led to a destination, such as a website or landing page.                           | `COST_PER_CLICK`                 |
    | CPM - Ads                       | The average cost per 1,000 impressions on your selected ad campaign during the Reporting Period.                                                           | `COST_PER_MILE`                  |
    | Engaged Views - Ads             | The number of times that videos in your campaign have been played for at least 6 seconds, or received at least 1 engagement within 1 day of seeing the ad. | `ENGAGED_VIEW`                   |
    | Clicks (All) - Ads              | The total number of all clicks on your ads, including link clicks, likes, shares, and comments, during the Reporting Period.                               | `ENGAGEMENTS`                    |
    | Frequency - Ads                 | The average number of times users saw ads in your campaign during the Reporting Period.                                                                    | `FREQUENCY`                      |
    | Impressions - Ads               | The total number of times users saw ads in your campaign during the Reporting Period.                                                                      | `IMPRESSIONS`                    |
    | Reach - Ads                     | The estimated number of unique accounts that saw ads within your selected campaign during the Reporting Period.                                            | `REACH`                          |
    | Real Time Conversions - Ads     | The number of conversions your ad campaign received during the Reporting Period, based on the objective and settings selected in campaign setup.           | `REAL_TIME_CONVERSIONS`          |
    | Real Time Conversion Rate - Ads | The percentage of ad conversions achieved per impression on your ad campaign during the Reporting Period.                                                  | `REAL_TIME_CONVERSION_RATE`      |
    | Amount Spent - Ads              | The total amount of money you've spent on your selected ad campaign during the Reporting Period.                                                           | `TOTAL_SPENT`                    |
    | Video View 100% - Ads           | The number of times that videos in your campaign were played to 100% completion during the Reporting Period.                                               | `VIDEO_VIEWS_P100`               |
    | Video View 50% - Ads            | The number of times that videos in your campaign were played to 50% of their length during the Reporting Period.                                           | `VIDEO_VIEWS_P50`                |
    | Video Watched (6 sec) - Ads     | The number of times that videos in your campaign were played for at least 6 seconds during the Reporting Period. Replays are not counted.                  | `VIDEO_WATCHED_6S`               |
  </Tab>
</Tabs>

## Next steps

With your ad campaign graph data, you can:

* **Build trend visualizations** - Plot each campaign as a separate line on a chart
* **Identify performance patterns** - Spot weekly patterns or optimal days for ad delivery
* **Track campaign lifecycles** - Visualize performance from launch through optimization
* **Compare campaign effectiveness** - Benchmark multiple campaigns against each other

Related guides:

* [Monitor Ad Campaign Metrics Across Brands](https://developer.dashsocial.com/guides/monitor-ad-campaign-metrics-across-brands)
* [View Full API Reference](https://developers.dashsocial.com/reference/get_reports-data)
