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

# TikTok

> Connect TikTok Ads to SegmentStream and import campaign cost data.

## Getting started

**1. Navigate to Data Sources**

Inside the admin panel navigate to the **Data Sources** page and click **+ NEW** on the top right corner.

**2. Select TikTok**

Choose **TikTok** from the list.

**3. Authenticate**

Click **To continue, authenticate with TikTok** and go through the authentication and setup flow.

**4. Name the data source**

Name your data source.

**5. Save**

Click **Save**.

## UTM tagging best practices

Adding a `utm_id` parameter to your tagging template will guarantee improved stitching quality of costs to sessions without altering the rest of your existing UTM tags.

**1. Open URL parameters**

In the **Destination** section of your ad setup, click on the **Build URL parameters** option.

**2. Add utm\_id parameter**

Click **+ Add**. Enter `utm_id` in the left input field, and `__CAMPAIGN_ID__-__AID__-__CID__` into the right input field.

**3. Apply**

Click **Apply**.

## Supported dynamic URL parameters

TikTok allows the use of dynamic URL tagging parameters to track campaigns.

SegmentStream supports the following parameters:

| Name | Description |
| - | - |
| `__CAMPAIGN_NAME__` | Advertising campaign name. |
| `__CAMPAIGN_ID__` | Advertising campaign ID. |
| `__AID_NAME__` | Ad group name. |
| `__AID__` | Ad group ID. |
| `__CID_NAME__` | Creative name. |
| `__CID__` | Creative ID. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.