Data Attributes
HTML attribute configuration reference for the agentic-videos embed script
Configure the embed using HTML data attributes on the script tag. No JavaScript required for basic setup.
Required Attributes
These attributes must be present for the embed to work.
| ATTRIBUTE | TYPE | DESCRIPTION | REQUIRED |
|---|---|---|---|
| data-agentic-video-id | string | The agentic-video resource ID (e.g. agv_…). | Yes |
| data-target-id | string | ID of the DOM element the player mounts into. | Yes |
| data-client-key | string | Client key from Create Client Key API. | Yes |
<script data-client-key="{client_key}" ...></script>Playback Attributes
Control how the video plays on load.
| ATTRIBUTE | TYPE | DEFAULT | VALUES | DESCRIPTION |
|---|---|---|---|---|
| data-autoplay | string | false | true, false | Start the video automatically on load, muted. |
data-autoplay starts playback muted — browsers block audible autoplay without a user gesture. The mute toggle in the control bar is the unmute affordance. Both data-autoplay and data-auto-play are accepted; data-autoplay wins if both are set.
<!-- Auto-start the video, muted -->
<script data-autoplay="true" ...></script>Tracking Attributes
Control analytics and user identification.
| ATTRIBUTE | TYPE | DEFAULT | VALUES | DESCRIPTION |
|---|---|---|---|---|
| data-track | string | true | true, false | false disables Mixpanel telemetry. |
| data-external-id | string | - | Any string | Your user/session identifier (sets Mixpanel distinct_id). |
| data-mixpanel-key | string | - | Any string | Override the Mixpanel project token to send events to your project. |
| data-mixpanel-property-* | string | - | Any string | Add a custom property to every Mixpanel event. |
data-external-id
Pass a custom identifier to link agentic-video sessions to your own user system.
<script data-external-id="session_abc123" ...></script>data-mixpanel-key
Send telemetry to your own Mixpanel project instead of D-ID's.
<script data-mixpanel-key="your_mixpanel_project_token" ...></script>data-mixpanel-property-*
Any attribute prefixed with data-mixpanel-property- is added as a custom property on every event. The suffix becomes the property name.
<script
data-mixpanel-property-plan="enterprise"
data-mixpanel-property-region="us-east"
...
></script>Complete Example
<script
type="module"
src="https://agentic-videos.d-id.com/v1/index.js"
data-client-key="{client_key}"
data-agentic-video-id="{agentic_video_id}"
data-target-id="my-mount"
data-autoplay="true"
data-external-id="user_42"
data-mixpanel-property-plan="pro"
></script>
<div id="my-mount"></div>