Implement custom metadata support

Last update: 2023-10-02

You can provide custom metadata on content, ads, and chapter tracking calls by using callback functions.

Callback functions are invoked just before the tracking call is made, so your application can attach the metadata that is specific to an ad or chapter.

  1. Invoke callback functions for content, ads, and chapters.

    vaObj.videoMetadataBlock = function() {
        return {
            "name" : "my-video",
            "genre" : "comedy"
        };
    }
    
    vaObj.adMetadataBlock = function(ad) {
        return {
            "name" : "my-ad",
            "category" : "automotive"
        };
    }
    
    vaObj.chapterMetadataBlock = function(chapter) {
        return {
            "name" : "my-chapter",
            "type" : "quartile"
        };
    }
    

On this page