Returning Click Events

Learn how to configure your implementation to record click impressions for the recommendation feedback loop.

Use the following steps to configure click recording for your implementation:

  1. Set up your web pages and/or apps to show Ooyala Discovery recommendations.
  2. Get the generated device_id: For Flash, the following example function gets the Flash device_id:
    public function get deviceId():String {
     var so:SharedObject = SharedObject.getLocal("auth");
     var deviceId:String = ? : null;
     return (deviceId == null || deviceId == "") ? "unknown" : deviceId;
    Note: If the device ID is unavailable, the example function returns unknown.
  3. When a user clicks a recommend video, make a post request that contains the bucket_info parameter from the clicked video recommendation, as shown in the following code example:

    Ooyala Discovery returns a 200 response.

Note: Try out the code samples using your account credentials in the Ooyala Scratchpad. To launch the Scratchpad, go to Ooyala API Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad.