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

# Naming Patterns & Tokens

> Use dynamic tokens to automatically name campaigns, ad sets, and ads with consistent, readable naming conventions.

Naming patterns (also called **naming conventions**) let you define a template for how campaigns, ad sets, and ads are named when published to Meta. Instead of typing names manually, use **tokens** — placeholders wrapped in curly braces that get replaced with real values at publish time. This keeps your naming conventions consistent across every launch.

## How It Works

Write a pattern using any combination of plain text and tokens:

```
{budget_type} | {campaign_objective} | {launch_date}
```

At publish time, this becomes:

```
CBO | SALES | 2025-03-15
```

Tokens resolve to actual values from your draft — targeting, creatives, campaign settings, and more. Any token that has no value is removed automatically, and leftover separators are cleaned up so you never get names like `CBO | | 2025-03-15`.

## Where to Set Naming Patterns

You configure naming patterns at three levels in the launch wizard:

| Level        | Wizard Step         | What It Names                   |
| ------------ | ------------------- | ------------------------------- |
| **Campaign** | Campaign Settings   | The campaign published to Meta  |
| **Ad Set**   | Ad Sets & Targeting | Each ad set within the campaign |
| **Ad**       | Ads & Creatives     | Each individual ad              |

## Preset Templates

AdStellar includes two built-in presets so you can get started without building a pattern from scratch:

<CardGroup cols={2}>
  <Card title="Basic" icon="bolt">
    Quick identification with essential info.

    * **Campaign:** `{campaign_objective} | {launch_date}`
    * **Ad Set:** `{audience_template_name} | {locations} | {custom_audiences}`
    * **Ad:** `{creative_template_name} | {headline} | {primary_text_preview} | {media_filename}`
  </Card>

  <Card title="Advanced" icon="sliders">
    Comprehensive naming with full details.

    * **Campaign:** `{budget_type} | {campaign_objective} | {conversion_event} | {launch_date}`
    * **Ad Set:** `{audience_template_name} | {locations} | {age} | {gender} | {custom_audiences}`
    * **Ad:** `{creative_template_name} | {headline} | {primary_text_preview} | {media_filename} | {cta} | {creative_type}`
  </Card>
</CardGroup>

Select a preset from the template dropdown on any naming field, or choose **Custom** to build your own.

## Available Tokens

### Campaign Tokens

| Token                  | Example Value | Description                                                     |
| ---------------------- | ------------- | --------------------------------------------------------------- |
| `{campaign_objective}` | `SALES`       | Campaign objective — TRAFFIC, LEADS, or SALES                   |
| `{conversion_event}`   | `Purchase`    | Optimization event — Purchase, Lead, AddToCart, etc.            |
| `{launch_date}`        | `2025-03-15`  | Date the campaign is published (YYYY-MM-DD)                     |
| `{budget_type}`        | `CBO`         | Budget structure — CBO (campaign budget) or ABO (ad set budget) |

### Ad Set Tokens

| Token                      | Example Value       | Description                                         |                                                   |
| -------------------------- | ------------------- | --------------------------------------------------- | ------------------------------------------------- |
| `{audience_template_name}` | `Cometly Audiences` | Name of the saved audience template                 |                                                   |
| `{locations}`              | `USA,UK,CA`         | Target locations (first 3)                          |                                                   |
| `{age}`                    | `25-34`             | Age range targeting                                 |                                                   |
| `{gender}`                 | `All`               | Gender targeting — Male, Female, or All             |                                                   |
| `{interests}`              | `Technology,Gaming` | Interest targeting (first 3)                        |                                                   |
| `{custom_audiences}`       | `Website Visitors`  | Custom audience names (first 2)                     |                                                   |
| `{lookalike_audiences}`    | `1% Lookalike`      | Lookalike audience names                            |                                                   |
| `{placement}`              | `Advantage+`        | Placement type — Advantage+ or specific placements  |                                                   |
| `{optimization_goal}`      | `LINK_CLICKS`       | Ad set optimization goal                            |                                                   |
| `{campaign_name}`          | \`SALES             | 2025-03-15\`                                        | The generated campaign name (from campaign level) |
| `{variant_index}`          | `1`                 | Variant number (1, 2, 3…) for unique identification |                                                   |

### Ad Tokens

| Token                      | Example Value       | Description                                         |                             |                           |
| -------------------------- | ------------------- | --------------------------------------------------- | --------------------------- | ------------------------- |
| `{headline}`               | `Shop Our Sale`     | Ad headline (truncated to 20 characters)            |                             |                           |
| `{primary_text_preview}`   | `Get 50% off today` | First 5 words of primary text                       |                             |                           |
| `{cta}`                    | `SHOP_NOW`          | CTA button — SHOP\_NOW, LEARN\_MORE, SIGN\_UP, etc. |                             |                           |
| `{creative_type}`          | `IMAGE`             | Creative format — IMAGE or VIDEO                    |                             |                           |
| `{landing_page}`           | `example.com`       | Destination URL domain                              |                             |                           |
| `{campaign_name}`          | \`SALES             | 2025-03-15\`                                        | The generated campaign name |                           |
| `{adset_name}`             | \`USA,UK            | 25-34                                               | All\`                       | The generated ad set name |
| `{creative_template_name}` | `Summer Sale`       | Name of the saved creative template                 |                             |                           |
| `{media_filename}`         | `summer-sale`       | Media asset filename (without extension)            |                             |                           |

### Creative Testing Mode Tokens (Ad Set Level)

When [Creative Testing Mode](/guides/launch/creative-testing-mode) is enabled, each ad set corresponds to a single creative. This unlocks creative-related tokens at the ad set level so you can identify which creative each ad set contains:

| Token                      | Example Value       | Description                              |
| -------------------------- | ------------------- | ---------------------------------------- |
| `{headline}`               | `Shop Now`          | Ad headline (truncated to 20 characters) |
| `{primary_text_preview}`   | `Get 50% off today` | First 5 words of primary text            |
| `{cta}`                    | `SHOP_NOW`          | CTA button                               |
| `{creative_type}`          | `IMAGE`             | Creative format — IMAGE or VIDEO         |
| `{landing_page}`           | `example.com`       | Destination URL domain                   |
| `{creative_template_name}` | `Summer Sale`       | Name of the creative template            |
| `{media_filename}`         | `summer-sale`       | Media asset filename                     |

<Tip>
  In Creative Testing Mode, a pattern like `{audience_template_name} | {creative_template_name} | {media_filename}` makes it easy to see both the audience and creative for each ad set at a glance in Meta Ads Manager.
</Tip>

## Saving Custom Templates

Once you've built a naming pattern you like, save it as a reusable template:

<Steps>
  <Step title="Build your pattern">
    Type your pattern using tokens and plain text, or start from a preset and modify it.
  </Step>

  <Step title="Save the template">
    Click **Save as Template** and give it a name. The template saves the patterns for all three levels (campaign, ad set, and ad).
  </Step>

  <Step title="Reuse across launches">
    Select your saved template from the dropdown on any future launch. Templates are available to everyone on your team.
  </Step>
</Steps>

You can rename or delete saved templates from the same dropdown menu.

## Tips for Effective Naming

<Tip>
  Consistent naming makes campaigns dramatically easier to find, filter, and analyze in Meta Ads Manager. Pick a convention and stick with it.
</Tip>

* **Start ad set names with `{audience_template_name}`** — makes it easy to filter by audience in Ads Manager.
* **Include `{creative_template_name}` or `{media_filename}` in ad names** — quickly see which creative is performing best.
* **Add `{launch_date}` to campaign names** — essential when running similar campaigns over time.
* **Use `{variant_index}` for deduplication** — if multiple ad sets use the same audience, the variant index keeps names unique.
* **Use separators consistently** — pick `|`, `-`, or `_` and stick with one style. Pipes (`|`) are popular because they're visually distinct.
* **Keep patterns concise** — Meta truncates names longer than 400 characters in some views. AdStellar enforces this limit automatically.

## Examples

### E-Commerce Brand

| Level    | Pattern                                                       | Result                                           |
| -------- | ------------------------------------------------------------- | ------------------------------------------------ |
| Campaign | `{campaign_objective} \| {conversion_event} \| {launch_date}` | `SALES \| Purchase \| 2025-03-15`                |
| Ad Set   | `{audience_template_name} \| {locations} \| {age}`            | `High-Intent Shoppers \| USA \| 25-44`           |
| Ad       | `{creative_template_name} \| {headline} \| {cta}`             | `Spring Collection \| Shop the Look \| SHOP_NOW` |

### Agency Managing Multiple Clients

| Level    | Pattern                                                         | Result                                           |
| -------- | --------------------------------------------------------------- | ------------------------------------------------ |
| Campaign | `{budget_type} \| {campaign_objective} \| {launch_date}`        | `CBO \| LEADS \| 2025-03-15`                     |
| Ad Set   | `{audience_template_name} \| {custom_audiences} \| {locations}` | `Retargeting Pool \| Website Visitors \| USA,UK` |
| Ad       | `{media_filename} \| {creative_type} \| {cta}`                  | `hero-video-v2 \| VIDEO \| LEARN_MORE`           |

### Creative Testing Setup

| Level    | Pattern                                                                   | Result                                         |
| -------- | ------------------------------------------------------------------------- | ---------------------------------------------- |
| Campaign | `CTM \| {campaign_objective} \| {launch_date}`                            | `CTM \| SALES \| 2025-03-15`                   |
| Ad Set   | `{audience_template_name} \| {creative_template_name} \| {variant_index}` | `Broad US \| Summer Sale \| 1`                 |
| Ad       | `{creative_template_name} \| {headline} \| {media_filename}`              | `Summer Sale \| 50% Off Today \| promo-banner` |

## How Token Resolution Works

When you publish a campaign, AdStellar resolves tokens in order:

1. **Campaign name** is generated first using campaign-level tokens.
2. **Ad set names** are generated next — the `{campaign_name}` token is available here because the campaign name was already resolved.
3. **Ad names** are generated last — both `{campaign_name}` and `{adset_name}` tokens are available because both were already resolved.

If a token has no value (for example, `{custom_audiences}` when no custom audiences are used), it's removed from the name and any surrounding separators are cleaned up automatically.
