To pass Permutive segments into JW Player for targeting you'll need to make a small update to your player implementation:

First you need to create a variable with all Permutive segments;

var playerSegsPerm = encodeURIComponent('&permutive=' + encodeURIComponent(JSON.parse(localStorage._pdfps || '[]').slice(0,250).join(',')));

Next you need to update advertising.tag or advertising.schedule (depending on your setup) to include the variable data. This can be done by appending playerSegsPerm to your cust_params or custom_params.

Please note that the below examples assume that cust_param is the last parameter of the tag/schedule URL. If this is not the case you need to make sure to add playerSegsPerm at the right location (after cust_param and before the last &).

Updating your player implementation

If your JW Player initialisation looks like this:

jwplayer("player-page").setup({
  playlist: '<https://cdn.jwplayer.com/v2/media/X4sxRXHw>',
  image: '<https://cdn.jwplayer.com/v2/media/X4sxRXHw/poster.jpg>',
  title: "IDC FutureScape: Worldwide CIO Agenda 2019 Predictions",
  advertising: {
    client: "googima",
    tag: "<https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/1234/domain.US_E_Computerworld.com/video_section&ciu_szs=300x250,728x90&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=[referrer_url]&description_url=http%3A%2F%2Fwww.computerworld.com&correlator=[timestamp]&cust_params=video-id%3D92347%26video-channel%3Dc-suite%26video-campaign%3D%26video-series%3D%26video-category%3Dit-management%2Cinternet-of-things%2Ccio-role%26video-tag%3D%26devsite%3Dfalse>"
  },
  mediaid: "X4sxRXHw"
});

you need to update it like below:

var playerSegsPerm = encodeURIComponent('&permutive=' + encodeURIComponent(JSON.parse(localStorage._pdfps || '[]').slice(0,250).join(',')));
jwplayer("player").setup({
  playlist: '<https://cdn.jwplayer.com/v2/media/X4sxRXHw>',
  image: '<https://cdn.jwplayer.com/v2/media/X4sxRXHw/poster.jpg>',
  title: "IDC FutureScape: Worldwide CIO Agenda 2019 Predictions",
  advertising: {
    client: "googima",
    tag: "<https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/1234/domain.US_E_Computerworld.com/video_section&ciu_szs=300x250,728x90&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=[referrer_url]&description_url=http%3A%2F%2Fwww.computerworld.com&correlator=[timestamp]&cust_params=video-id%3D92347%26video-channel%3Dc-suite%26video-campaign%3D%26video-series%3D%26video-category%3Dit-management%2Cinternet-of-things%2Ccio-role%26video-tag%3D%26devsite%3Dfalse>" + playerSegsPerm
  },
  mediaid: "X4sxRXHw"
});

cust_params not last URL parameter

See below as an example of how you could include the Permutive segments at the right location. Please note that this is only an example and might need to be adjusted for your setup.

var tagURL = '...'; // your advertising.tag or advertising.schedule
var playerSegsPerm = encodeURIComponent('&permutive=' + encodeURIComponent(JSON.parse(localStorage._pdfps || '[]').slice(0,250).join(',')));
 
tagURL = tagURL.replace(/(cust_params[^&]+)/, '$1' + playerSegsPerm);

More examples

var playerSegsPerm = encodeURIComponent('&permutive=' + encodeURIComponent(JSON.parse(localStorage._pdfps || '[]').slice(0,250).join(',')));
jwplayer("player").setup({
  width: '100%',
  height: '100%',
  autostart: true,
  aspectratio: "16:9",
  displaytitle: false,
  playlist: [{
    image: "<https://www.domain.com.au/dimg/640x360/dimg/mre18_025_iphonexs_xsmax-100771795-orig.jpg>",
    mediaid: "None",
    sources: [{
      file: "<https://s3-ap-southeast-2.amazonaws.com/domain.storage/videos_converted/videos/files/mre18_025_iphonexs_xsmax-90587-orig.mp4>",
      label: "HD"
    }],
    title: ""
  }],
  advertising: {
    client: "vast",
    schedule: "<https://pubads.g.doubleclick.net/gampad/ads?sz=640x360&amp;iu=/1234/domain.com.au/ros_section&amp;ciu_szs&amp;impl=s&amp;gdfp_req=1&amp;env=vp&amp;output=xml_vmap1&amp;unviewed_position_start=1&amp;url=http%3A//www.domain.com.au/video/646656/apple-iphone-xs-xs-max-unveil/&amp;correlator=8406446&amp;custom_params=node%3D646656%26site%3Dpcw>" + playerSegsPerm
  },
  sharing: {
    link: "<http://www.domain.com.au/video/646656/apple-iphone-xs-xs-max-unveil/>",
  }
});


Please note:

  • This integration only works for targeting and not event collection
  • This integration only works on web (not AMP or FIA)

If you have any further questions please reach out to our support team via Live Chat or email at support@permutive.com.

Did this answer your question?