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.

ATTRIBUTETYPEDESCRIPTIONREQUIRED
data-agentic-video-idstringThe agentic-video resource ID (e.g. agv_…).Yes
data-target-idstringID of the DOM element the player mounts into.Yes
data-client-keystringClient key from Create Client Key API.Yes
<script data-client-key="{client_key}" ...></script>

Playback Attributes

Control how the video plays on load.

ATTRIBUTETYPEDEFAULTVALUESDESCRIPTION
data-autoplaystringfalsetrue, falseStart 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.

ATTRIBUTETYPEDEFAULTVALUESDESCRIPTION
data-trackstringtruetrue, falsefalse disables Mixpanel telemetry.
data-external-idstring-Any stringYour user/session identifier (sets Mixpanel distinct_id).
data-mixpanel-keystring-Any stringOverride the Mixpanel project token to send events to your project.
data-mixpanel-property-*string-Any stringAdd 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>

FAQ