---
updatedAt: 2026-06-11T13:27:42.000Z
---

Fetch the complete documentation index at: https://developers.dailymotion.com/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Ad tag macros

Improve ad targeting using ad macros

## What are advertising macros?

An ad macro is a placeholder you can add in your [VAST](https://iabtechlab.com/standards/vast/) ad tag and which will dynamically insert values before the ad is served to your Player.

These ad macros are using **tag variables,** which are **predefined values** that can be used to **pass information about the content, the user or the device**.

Ad macros allow Dailymotion **to optimize fill rate and ad targeting on your content inventory**.

<br />

## Implement ad macros

Ad macros can be implemented following these steps:

1. **Define your needs -** Reach out to your Dailymotion Account Manager to discuss in detail your targeting needs and your specifications.
2. **Define the right tag variables -** Dailymotion will define the tags fitting your requirements and implement them in your VAST tag.

<br />

## Supported tag variables

The tables below provide a non-exhaustive list of tag variables that we support, and examples illustrating how they are replaced with real values at runtime in an ad request.

<br />

### Ad request data

<Table>
  <thead>
    <tr>
      <th>

      </th>

      <th>

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

  <tbody>
    <tr>
      <td>
        `[CACHEBUSTING]`
      </td>

      <td>
        The correlator parameter is used to associate multiple ad requests from the same page view, ensuring competitive exclusions, even without cookies.

        **- If the IMA SDK is used:** The SDK automatically sets the value of the correlator. If your Player attempts to set it, the SDK will override it with its own value. **- If the IMA SDK is not used:** You must set this parameter with a unique, positive, random integer value.

        Example:   `correlator=2843743232552991`
      </td>
    </tr>

    <tr>
      <td>
        `${DMX_VPA}`
      </td>

      <td>
        VPA = Video Play Automatic  
        Indicates if the ad starts with autoplay or on click.

        Possible values are `click` if the ad waits for the user to click, or `auto` if it plays automatically.

        Example:  
        Click: `vpa=click` Autoplay: `vpa=auto`
      </td>
    </tr>

    <tr>
      <td>
        `${DMX_VPMUTE}`
      </td>

      <td>
        Indicates whether the ad video was played with sound (0) or without sound (1).

        Example:  
        `vpmute=0` `vpmute=1`
      </td>
    </tr>

    <tr>
      <td>
        `${context.position}`
      </td>

      <td>
        Indicates the ad position.

        Possible values: `preroll` `midroll` `postroll`

        Example:   `content.position=preroll`
      </td>
    </tr>

    <tr>
      <td>
        `${context.realautoplay}`
      </td>

      <td>
        Indicates if the ad is set to play automatically (1) or not (0)      Example:   `context.realautoplay=0`   `context.realautoplay=1`
      </td>
    </tr>

    <tr>
      <td>
        `${context.height}`
      </td>

      <td>
        Height of the current creative in pixels.
      </td>
    </tr>

    <tr>
      <td>
        `${context.width}`
      </td>

      <td>
        Width of the current creative in pixels.
      </td>
    </tr>
  </tbody>
</Table>

<br />

### GDPR

<Table>
  <thead>
    <tr>
      <th>

      </th>

      <th>

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

  <tbody>
    <tr>
      <td>
        `${reader.gdpr.flag}`
      </td>

      <td>
        Indicates if GDPR is required (1) or not (0).   This must be used with the `gdpr_consent` macro below. The [IAB Europe Transparency Consent Framework](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework)  **must be** implemented on your site/app for this macro to work. Examples: GDPR required: `gdpr=1` GDPR not required: `gdpr=0`
      </td>
    </tr>

    <tr>
      <td>
        `${reader.gdpr.consent}`
      </td>

      <td>
        User GDPR consent string.

        Example: `gdpr_consent=CQHuct[...]AA.f_wACHwAAA`
      </td>
    </tr>
  </tbody>
</Table>

<br />

### Player data

<Table>
  <thead>
    <tr>
      <th>

      </th>

      <th>

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

  <tbody>
    <tr>
      <td>
        `${context.embedder}`
      </td>

      <td>
        The URL of the website on which the Player is embedded.

        Example:   `description_url=https%3a%2f%2fdailymotion.com`
      </td>
    </tr>

    <tr>
      <td>
        `${context.publisher.reference}`
      </td>

      <td>
        Indicates the Partner's Player ID. Each Player has a unique ID that allows them to be identified.

        Example:   `context.publisher.reference=xbzld`
      </td>
    </tr>

    <tr>
      <td>
        `${context.autoplay}`
      </td>

      <td>
        Indicates if the Player starts automatically when the user is landing on the page, even if the Player is not visible.

        Possible values are `true` if the Player starts automatically, or `false` if the Player does not start automatically.

        Example:   `context.autoplay=false`
      </td>
    </tr>

    <tr>
      <td>
        `${context.playervolume}`
      </td>

      <td>
        Indicates the volume at which the video is played:  
        -1 indicates a video on mute 0 to 10 indicates the volume range
      </td>
    </tr>
  </tbody>
</Table>

<br />

### Content data

<Table>
  <thead>
    <tr>
      <th>
        `${owner.id}`
      </th>

      <th>
        Dailymotion profile ID.      Example:   `owner.id=20684807`
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `${owner.name}`
      </td>

      <td>
        Dailymotion profile name.

        Example:   `owner.name=canalplus`
      </td>
    </tr>

    <tr>
      <td>
        `${content.id}`
      </td>

      <td>
        The ID of the content.

        Example:   `content.id=560837706`
      </td>
    </tr>

    <tr>
      <td>
        `${content.xid}`
      </td>

      <td>
        The ID of the video.

        Example:   `content.xid=x99wp56`
      </td>
    </tr>

    <tr>
      <td>
        `${content.title}`
      </td>

      <td>
        Title of the video.

        Example:   `content.title=En décembre sur CANAL+`
      </td>
    </tr>

    <tr>
      <td>
        `${content.description}`
      </td>

      <td>
        Description of the content.

        Example:   `content.description=Your video description`
      </td>
    </tr>

    <tr>
      <td>
        `${content.lang}`
      </td>

      <td>
        Video language.

        Example:   `lang=fr`
      </td>
    </tr>

    <tr>
      <td>
        `${content.tags}`
      </td>

      <td>
        Keywords that Partner defined in their Dailymotion Studio to describe a video.

        Example:   `content.tags=cinéma,le cercle cinéma, canalplus`
      </td>
    </tr>

    <tr>
      <td>
        `${content.type}`
      </td>

      <td>
        The type of content.

        Possible values:   `vod` or `live`

        Example:   `content.type=vod`
      </td>
    </tr>

    <tr>
      <td>
        `${content.duration}`
      </td>

      <td>
        Content duration in seconds.

        Example:   `content.duration=479`
      </td>
    </tr>
  </tbody>
</Table>

> 📘 Note:
>
> For optimal performance, only use tag variables supported by your ad server. See the **<Anchor label="ad servers supported by Dailymotion" target="_blank" href="https://developers.dailymotion.com/v2/docs/ad-tag-macros#supported-ad-servers">ad servers supported by Dailymotion</Anchor>**.

<Callout icon="💡" theme="default">
  ### More customization options:

  If you have specific needs that go beyond standard macros, you can **further optimize your ad targeting and dynamically send additional custom values** through the Player parameters using our **<Anchor label="Custom Config solution" target="_blank" href="https://developers.dailymotion.com/v2/docs/custom-config">Custom Config solution</Anchor>**.

  Please contact your Dailymotion Account Manager for more information.
</Callout>

<br />

## Ad macro example

> 👍 Reminder:
>
> As a publisher, you don’t have to handle variables. This process is entirely managed by our team.

Once you've defined your needs and communicated them to your Account Manager, **Dailymotion will add dedicated tag variables** in your VAST tag. For example, we might add `${context.embedder}` and `[CACHEBUSTING]`.

Your VAST with tag variables will look like this on Dailymotion side:

```
https://pubads.g.doubleclick.net/gampad/ads?description_url=${context.embedder}&correlator=[CACHEBUSTING]&iu=/123456/test&sz=640x360&env=vp&impl=s&gdfp_req=1&output=vast&unviewed_position_start=1
```

<br />

At runtime, the **tag variables will dynamically be replaced with actual values**.

For example, `${context.embedder}` might be replaced by `https://dailymotion.com` and `[CACHEBUSTING]` might be replaced by a unique value like `2843743232552991`, which will look like this:

```
https://pubads.g.doubleclick.net/gampad/ads?description_url=https%3a%2f%2fdailymotion.com&correlator=2843743232552991&iu=/123456/test&sz=640x360&env=vp&impl=s&gdfp_req=1&output=vast&unviewed_position_start=1
```

<br />

## Supported ad servers

Dailymotion may integrate **ad servers that are compliant with the** [IAB's VAST standard](https://iabtechlab.com/standards/vast/). Dailymotion supports – but is not restrictive to – the following ad servers:

|                 |             |                   |          |
| :-------------- | :---------- | :---------------- | :------- |
| AdForm          | Brightroll  | Google Ad Manager | Nexx360  |
| Smart Ad Server | SpotXchange | Springserver      | SunMedia |