Youbora Destination

Segment makes it easy to send your data to Youbora (and lots of other destinations). Once you've tracked your data through our open source libraries we'll translate and route your data to Youbora in the format they understand. Learn more about how to use Youbora with Segment.

Getting Started

Web Destination

When you toggle on Youbora for a website in Segment, this is what happens:

  • Our CDN is updated within 5-10 minutes. Then our snippet will start asynchronously loading Youbora’s Javascript onto your page. This means you should remove Youbora’s snippet from your page.
  • Youbora will automatically start recording data.

Video Playback Started

When a user starts playback of a video, you should use our Video Playback Started event. We will map the properties from the Video Playback Started event to the following Youbora video metadata fields:

Youbora ParameterSegment PropertyData Type
liveproperties.livestreamBoolean
properties.qualityproperties.qualityString
durationproperties.total_lengthInteger
properties.device.manufacturercontext.device.manufacturerString
properties.device.typecontent.device.modelString
Referrercontext.page.urlString
deviceIdcontext.device.idArray

Due to a discrepancy between Youbora and Segment’s specs, many of the properties that would typically be sent with a ‘Video Content Started’ event must be sent with this event instead and passed as integration specific options. The following properties fall under this category:

Youbora ParameterSegment PropertyData Type
totalBytestotalBytesInteger
RenditionrenditionString
cdncdnString
properties.filenamefilenameString
properties.content_idcontentIdString
properties.transaction_typetransactionTypeString
properties.content_typecontentTypeString
properties.content_metadata.titlecontentMetadata.titleString
properties.content_metadata.genrecontentMetadata.genreString
properties.content_metadata.languagecontentMetadata.languageString
properties.content_metadata.yearcontentMetadata.yearInteger
properties.content_metadata.castcontentMetadata.castString
properties.content_metadata.directorcontentMetadata.directorString
properties.content_metadata.ownercontentMetadata.ownerString
properties.content_metadata.parentalcontentMetadata.parentalString
properties.content_metadata.pricecontentMetadata.priceInteger
properties.content_metadata.ratingcontentMetadata.ratingString
properties.content_metadata.audioTypecontentMetadata.audioTypeString
properties.content_metadata.audioChannelscontentMetadata.audioChannelsString
properties.device.yeardevice.yearString
properties.device.firmwaredevice.firmwareString

Example

analytics.track('Video Playback Started', {
    livestream: false,
    quality: '1080p',
    total_length: 400
  }, {
  page: {
    url: 'lego.com'
  },
  device: {
    id: '432',
    manufacturer: 'Apple',
    model: 'iphone 4'
  },
  integrations: {
    Youbora: {
      contentId: '29802',
      transactionType: 'rental',
      contentType: 'Movie',
      totalBytes: 3200,
      rendition: '4',
      cdn: '1',
      contentMetadata: {
        title: 'Lego Movie',
        genre: 'documentary',
        owner: 'Segment',
        filename: 'lego_video',
        language: 'English',
        year: 2017,
        cast: 'Justin, Jim',
        director: 'Rick',
        parental: 'R',
        price: 4,
        rating: 4,
        audioType: 'Dolby',
        audioChannels: 5.1
      },
      device: {
        year: 2015,
        firmware: 3.0
      }
    }
  }
});

Video Content Started

When the video content actully begins playing, you should use our Video Content Started event. We will map the properties from the Video Playback Started event to the following Youbora video metadata fields:

Youbora ParameterSegment PropertyData Type
eventTimeproperties.positionInteger

Using the difference in time between when Video Playback Started and Video Content Started, Youbora will calculate the join time for you, but if you prefer to provide this value yourself, you may provide it as the integration specific option joinTime.

Example

analytics.track('Video Content Started', { position: 5 });

Video Playback Paused/Resumed

When a user pauses/resumes playback of a video, you should use our Video Playback Paused and Video Playback Resumed events. We will map the properties from these event to the following Youbora video metadata fields:

Youbora ParameterSegment PropertyData Type
timeproperties.positionInteger

If the user pauses during an ad, please be sure to fill the properties.ad_asset_id field from our spec for both calls, as we use its presence to determine whether the pause is occuring during an ad or not.

Example

analytics.track('Video Playback Paused', {
    ad_asset_id: '12345',
    position: 243
});

analytics.track('Video Playback Resumed', {
    ad_asset_id: '12345',
});

Video Playback Seek Started/Completed

When the video content actully begins playing, you should use our Video Playback Seek Started and Video Playback Seek Completed events. Youbora internally calculates the duration of the seek but if you would prefer to provide this value yourself you can pass it as the integration-specific option duration.

Example

analytics.track('Video Playback Seek Started');

analytics.track('Video Playback Seek Completed');

Video Content/Ad Playing

To send pings as the video content is playing, you should use our Video Content Playing and Video Ad Playing events. We will map the properties from these events to the following Youbora video metadata fields:

Youbora ParameterSegment PropertyData Type
timeproperties.positionInteger
bitrateproperties.bitrateInteger

Additionally, the following Youbora fields can be passed as integration specific options:

Youbora ParameterSegment Integration Specific PropertyData Type
throughputthroughputInteger
totalBytestotalBytesInteger
dataTypedataTypeInteger

Example

analytics.track('Video Content Playing', {
  position: 42,
  bitrate: 32
  }, {
  integrations: {
    Youbora: {
      throughput: 40,
      totalBytes: 324,
      dataType: 0
    }
  }
});

Video Playback Buffer Started/Completed

When the video content buffers during playback, you should use our Video Playback Buffer Started and Video Playback Buffer Completed events. We will map the properties from these events to the following Youbora video metadata fields:

Youbora ParameterSegment PropertyData Type
timeproperties.positionInteger
adPlayheadproperties.positionInteger

If the buffer occurs during an ad, please be sure to fill the properties.ad_asset_id field from our spec for both calls, as we use its presence to determine whether the buffer is occuring during an ad or not.

The time difference between these two events are also used to calculate ad join time. In order for this to function properly, Video Playback Buffer Started must be sent immediately when an ad begins to load and Video Playback Buffer Completed must be sent when the ad content actually begins playing.

Youbora internally calculates the duration of the buffer but if you would prefer to provide this value yourself you can pass it as the integration-specific option duration.

Example

analytics.track('Video Buffer Started');

analytics.track('Video Buffer Completed', { position: 3 });

Video Playback Interrupted

When playback of a video is interrupted, you should use our Video Playback Interrupted event. We will map the properties from these events to the following Youbora video metadata fields:

Youbora ParameterSegment PropertyData Type
msgproperties.methodString

Additionally, the error code can be attached as the integration specific option errorCode.

Example

analytics.track('Video Playback Interrupted', { method: 'browser redirect' }, {
  integrations: {
    Youbora: {
      errorCode: 32
    }
  }
});

Video Playback Completed

To track the completion of the video playback session, please use our Video Playback Completed event.

Example

analytics.track('Video Playback Completed');

Video Ad Started

When an ad begins to load, you should use our Video Ad Started event. We will map the properties from these events to the following Youbora video metadata fields:

Youbora ParameterSegment PropertyData Type
typeproperties.typeString
adTitleproperties.titleString
adDurationproperties.total_lengthInteger

Additionally, the following Youbora fields can be passed as integration specific options:

Youbora ParameterSegment Integration Specific PropertyData Type
adNumberadNumberInteger
adResourceadResourceString
adCampaignadCampaignString

Example

analytics.track('Video Ad Started', {
  type: 'mid-roll',
  title: 'kellogs ad',
  total_length: 30
  }, {
  integrations: {
    Youbora: {
      adNumber: 1,
      adResource: 'kellog.mp4',
      adCampaign: 'Campaign 1'
    }
  }
});

Video Ad Completed

To track the completion of an ad, please use our Video Ad Completed event. We will map the properties from these events to the following Youbora video metadata fields:

Youbora ParameterSegment PropertyData Type
adPlayheadproperties.positionString

Additionally, you can fill the Youbora adBitrate field by passing in the integration specific option bitrate.

Example

analytics.track('Video Ad Completed', { position: 43 }, {
  integrations: {
    Youbora: {
      bitrate: 32
    }
  }
});

Supported Sources and Connection Modes

WebMobileServer
📱 Device-based
☁️ Cloud-based

To learn more about about Connection Modes and what dictates which we support, see here.

Settings

Segment lets you change these destination settings via your Segment dashboard without having to touch any code.

Account Code

Your Youbora account code


If you have any questions or see anywhere we can improve our documentation, please let us know or kick off a conversation in the Segment Community!