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 = so.data.auth ? so.data.auth : 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:
    [POST]/v2/discover/feedback/play{  
       "device_id":"device_id",
       "bucket_info":"bucket_info",
       "ui_tag":"tag1"
    }            

    Ooyala Discovery returns a 200 response.

Note:

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

Was this article helpful?