Enable rich media interaction signals in the Connect web library

The rich media interaction signal captures user interactions with video and audio content on your website. This enables audience segmentation based on content consumption patterns and engagement levels.

Reasons to enable:

  • Track customer video review engagement
  • Monitor product video consumption
  • Measure tutorial or demo video completion
  • Understand audio content engagement
  • Segment users based on media interaction behavior

Availability: Premium and Ultimate


Implementation considerations

Capturing data

Most video players offer well-documented APIs that you can use to capture interaction events. Consult your video player API documentation to identify available events and how to access media information.

Interaction types

The signal supports these interaction types:

  • LOAD - Media file begins loading
  • LAUNCH - User initiates playback
  • PAUSE - User pauses playback
  • CONTINUE - User resumes playback after pausing
  • COMPLETE - User reaches the end of the media
  • STOP - User stops playback before completion
  • ENLARGE - User enters fullscreen or expands player

Event timing

Some players fire events multiple times (for example, multiple pause/play cycles). Decide whether to track every interaction or only significant milestones.


Configuration

Method

TLT.logSignal(signalObject)

Sends the signal to the Acoustic Connect endpoint as a JSON object. The Connect library must be initialized before calling this method.

Signal structure

Top-level fields

  • category: String - Valid value - Behavior.
  • description: String - Description of the signal
  • effect: String - Describes the effect of the signal on engagement. Valid values: negative, positive. Use positive for rich media interactions.
  • name: String - Name to differentiate this signal from others (for example, "Product review interaction from website"). Max length - 256 chars.
  • signalType (required): String - Valid value - richMediaInteraction.

Signal content

  • interactionType: String - The type of user interaction with the media. Valid values: LOAD, LAUNCH, PAUSE, CONTINUE, COMPLETE, STOP, ENLARGE.
  • mediaCategory: String - The category the media falls into (for example, "video", "audio", "product demo").
  • mediaId (required): String - The URL or unique identifier of the media file. You can extract the ID from video element attributes or retrieve it from the video player API.
  • mediaName: String - The title of the audio or video file
  • signalCustomAttributes: Array of objects - Additional custom attributes. Each object has name and value string fields.
  • url: String - The URL of the page where the media file is embedded.

Notes:

  • If any required field is missing or invalid, the entire signal will be discarded.
  • Optional fields enhance the signal but won't prevent processing if omitted or invalid.

Basic example

const signal = {
    // Required fields
    signalType: "richMediaInteraction",
    category: "Behavior",
    name: "richMediaInteraction from website",
    mediaId: "https://example.com/videos/product-demo.mp4",
    effect: "positive",

    // Optional fields
    interactionType: "LAUNCH",
    mediaCategory: "Product Demo",
    mediaName: "Wireless Headphones Demo",
    url: window.location.href
};

// Send the signal
TLT.logSignal(signal);

Complete implementation example - Video.js

This example tracks video interactions using the Video.js player API:

const signal = {
    signalType: "richMediaInteraction",
    category: "Behavior",
    name: "richMediaInteraction generated by website",
    mediaId: "",
    effect: "positive",
    url: "",
    mediaCategory: "",
    mediaName: "",
    interactionType: ""
};

function sendRichMediaInteractionSignal(mediaId, mediaName, interactionType) {
    signal.mediaId = mediaId;
    signal.url = window.location.href;
    signal.mediaCategory = "Video";
    signal.mediaName = mediaName;
    signal.interactionType = interactionType;

    console.log("richMediaInteraction signal:", JSON.stringify(signal, undefined, 2));
    TLT.logSignal(signal);
}

// Check that the Connect SDK is present and videojs API is available
// See videojs player API documentation: https://docs.videojs.com/
if (window.TLT && window.TLT.isInitialized() && typeof window.videojs === "function") {
    // Initialize video player and attach event listeners
    const player = window.videojs("example_video");

    player.ready(function () {
        const mediaId = player.currentSrc() || player.cache_.src;
        const mediaName = mediaId.substring(mediaId.lastIndexOf("/") + 1);

        // Track play event
        player.on("play", function () {
            sendRichMediaInteractionSignal(mediaId, mediaName, "CONTINUE");
        });

        // Track pause event
        player.on("pause", function () {
            sendRichMediaInteractionSignal(mediaId, mediaName, "PAUSE");
        });

        // Track completion event
        player.on("ended", function () {
            sendRichMediaInteractionSignal(mediaId, mediaName, "COMPLETE");
        });
    });
}

Extended example - HTML5 video element

This example tracks interactions using the native HTML5 video element:

const signal = {
    signalType: "richMediaInteraction",
    category: "Behavior",
    name: "richMediaInteraction generated by website",
    mediaId: "",
    effect: "positive",
    url: window.location.href,
    mediaCategory: "Video",
    mediaName: "",
    interactionType: ""
};

function sendRichMediaInteractionSignal(video, interactionType) {
    signal.mediaId = video.currentSrc;
    signal.mediaName = video.getAttribute("data-video-title") || "Untitled Video";
    signal.interactionType = interactionType;

    console.log("richMediaInteraction signal:", JSON.stringify(signal, undefined, 2));
    TLT.logSignal(signal);
}

// Check that the Connect SDK is present
if (window.TLT && window.TLT.isInitialized()) {
    // Find all video elements on the page
    const videos = document.querySelectorAll("video");

    videos.forEach(function (video) {
    // Track when video starts loading
        video.addEventListener("loadstart", function () {
            sendRichMediaInteractionSignal(video, "LOAD");
        });

        // Track when user starts playback
        video.addEventListener("play", function () {
            // Distinguish between initial launch and resume
            if (video.currentTime === 0) {
                sendRichMediaInteractionSignal(video, "LAUNCH");
            } else {
                sendRichMediaInteractionSignal(video, "CONTINUE");
            }
        });

        // Track when user pauses
        video.addEventListener("pause", function () {
            sendRichMediaInteractionSignal(video, "PAUSE");
        });

        // Track when video completes
        video.addEventListener("ended", function () {
            sendRichMediaInteractionSignal(video, "COMPLETE");
        });

        // Track fullscreen toggle
        video.addEventListener("fullscreenchange", function () {
            if (document.fullscreenElement) {
                sendRichMediaInteractionSignal(video, "ENLARGE");
            }
        });
    });
}

Best practices

  1. Ensure the same media file always uses the same identifier across pages.
  2. Populate mediaName for better reporting and analysis.
  3. Use mediaCategory to group related content (product videos, tutorials, reviews).
  4. If your page has multiple videos, ensure each is tracked independently.
  5. Test the signal on desktop and mobile players.

Troubleshooting

Signals not firing for video interactions?

  • Verify the video player API is loaded before your signal code runs.
  • Check that event listeners are properly attached to the player.
  • Confirm the player fires the expected events (check player documentation).
  • Use console.log() to verify events are triggered.

Media ID not captured correctly?

  • Check the player API method for retrieving the video source.
  • Verify the video element has the src attribute or source element.
  • Look for alternative methods like currentSrc() or cache_.src.
  • Test with both directly embedded videos and playlist scenarios.

Duplicate signals for single interaction?

  • Some players fire events multiple times during state changes.
  • Add debouncing logic to prevent duplicate signals.
  • Check if multiple event listeners are attached accidentally.
  • Consider tracking only key milestones rather than every state change.

Player not detected?

  • Ensure the video player library loads before your signal code.
  • Check for correct player initialization syntax.
  • Verify player ID or selector matches your HTML.
  • Test with both ready events and direct initialization.