Paramaterized Ad Targeting


Kaltura player features robust VAST support for prerolls, midrolls, overlays, companions and postrolls

Runtime Ad Tag URL targeting

Set user data against player: Target Hotel Ad Target Hooroo
  1. // Within VAST config we pass the custom macro:
  2. 'vast': {
  3. 'numPreroll':"1",
  4. 'prerollUrl': localPath + 'targetAds.php?target={myAdTarget.target}' ,
  5. 'loadAdsOnPlay': true
  6. ...
  7. }
  8.  
  9. // Within the button click handler we set the custom property)
  10. 'readyCallback': function( playerId ){
  11. var kdp = $('#' + playerId )[0];
  12. $('#targetHotel').click(function(){
  13. kdp.setKDPAttribute('myAdTarget', 'target', 'hotel');
  14. });
  15. $('#targetHooro').click(function(){
  16. kdp.setKDPAttribute('myAdTarget', 'target', 'hooroo');
  17. })
  18. }
html5 qunit | flash qunit