Show Menu
TOPICS×

Implement standard ad metadata using JavaScript 3.x

Implemement standard ad metadata

For standard ad metadata, create a dictionary of standard ad metadata key value pairs using the keys for your platform:
var adObject = ADB.Media.createAdObject(<AD_NAME>, <AD_ID>, <POSITION>, <LENGTH>); // Set standard Ad Metadata var adMetadata = {}; adMetadata[MediaHeartbeat.AdMetadataKeys.ADVERTISER] = "Sample Advertiser"; adMetadata[MediaHeartbeat.AdMetadataKeys.CAMPAIGN_ID] = "Sample Campaign"; tracker.trackEvent(ADB.Media.Event.AdStart, adObject, adMetadata);