Using the Feedback Loop Routes

Learn how to use the Feedback Loop routes.

To track each instance where a video is shown and recommended to the user using a Discovery API request, use the /v2/discover/feedback/impression route, as shown in the following example.
[POST] /v2/discover/feedback/impression{  
	"device_id":"device_id",
	"bucket_info":"bucket_info",
    "ui_tag":"tag1"
}

To track each instance where a user starts to watch a Discovery recommended video, use the /v2/discover/feedback/play route, as shown in the following code sample.

Note: Impressions must be recorded for each video shown to the user, not merely once per batch.
[POST] /v2/discover/feedback/play{  
	"device_id":"device_id",
	"bucket_info":"bucket_info",
    "ui_tag":"tag1"
}
The following table describes the parameters to use with the Feedback Loop routes.
Parameter Description
device_id Ooyala-generated device id, which is is specific to the user, browser, or device.
bucket_info An encoded string that includes information about how the batch of recommendations is generated, the video position, and other useful user center metrics.
ui_tag Optional parameter to describe where the recommendations appear on the device screen. The value can be an alphanumeric string of up to 80 characters long, and cannot use the string default. A use case for this parameter would be to add the ID value of the element that contains the recommendations.

The JSON response to every request for content from Discovery includes blobs (for each video in the list of recommendations) specified in bucket_info. For example, when you call /v2/discover/trending, the response's bucket_info blob might look like the following example (with added line breaks):

"bucket_info": "1{\"encoded\":
    \"eNpNjtsKhCAQht9lrmNR1+zwMiElrVAqOhtE27vv2Abr3fynjzkg6GgcDlsY\\n
    7tyRdfIlHNJw9oQKz5RT3YKDnFQQTRzL0TJI9WF2BXmYfLb7WgUh6TdAf\\n
    MEft3osmeydkxqBdaQF0pdFHcwMBfSCLhmjRepdy5SyZTl87pB+nRNVoxmGx\\n
    Ca9Pn13N1e/TPislxF+1jZRFJmTRbEVTZG3HbgXnF+k0UNc=\",\"position\":2}",

Copy the associated bucket_info and return it to Ooyala in feedback via one of the following routes:

Was this article helpful?