Support Home > Over the Top TV SDK Integration > Samsung Smart TV Over the Top SDK Integration

Samsung Smart TV Over the Top SDK Integration

OTT (Over-the-Top) apps running on Samsung Smart TVs may utilize our existing Web SDK.


SDK Integration

Adding the Web SDK to your project involves downloading the Web SDK javascript file and adding it to your Tizen web app.

  1. Download the latest Web SDK javascript file: kochava.js
  2. Add the kochava.js file to the js folder of your Tizen web app project.
  3. Integrate the SDK

     

  4. Create a script to load and start the SDK
  5. function loadScript() {
      if (window.kochava) {
        console.log('Kochava snippet already included');
        return
      }
    
      const kochavaScript = document.createElement('script');
      kochavaScript.type = 'text/javascript';
      kochavaScript.src = 'js/kochava.js';
      kochavaScript.async = true;
    
      kochavaScript.onload = function() {
        window.kochava.startWithAppGuid('YOUR_APP_GUID');
      };
      document.head.appendChild(kochavaScript);
    }
    

     

  6. Call the loadScript function.
  7. var init = function() {
    
      // Your initialization job(s)
    
      loadScript();
    }
    
    

     

At this point SDK integration is complete and the SDK will begin reporting installs for attribution and measurement purposes.

Optional Web SDK functionality such as measuring events and page views is described within our generic Web SDK usage documentation here: JavaScript Web SDK Integration – Kochava Support

Please notify your Client Success Manager if you encounter any roadblocks or questions specific to your target device or platform which are not covered in the documentation.


Gathering and Transmitting the TIFA

SDK VERSION NOTE: This process requires v3.0.0 or higher of the Web SDK.

 

You may optionally gather and transmit the Tizen Identifier for Advertising (TIFA) through the SDK for purposes of measurement and attribution. Follow the steps below to accomplish this; if you are unsure as to whether this is a requirement, please contact your Client Success Manager.

  1. Before starting the SDK, import Samsung’s AdInfo API with the following script.
  2. <script type="text/javascript" src="$WEBAPIS/webapis/webapis.js"></script>

     

    NOTE: More information about the AdInfo API can be found in the AdInfo API Documentation.

  3. Sleep the SDK prior to start to ensure that no measurement signal is transmitted until the TIFA has been gathered. While sleeping, the SDK will queue, but not transmit any measurement signal.
  4.  

    Example:

    kochava.setSleep(true)
    kochava.startWithAppGuid("YOUR-APP-GUID-HERE")

     

  5. Gather the TIFA using the AdInfo API, then register it with the Kochava SDK as a custom device identifier. Wake the SDK to allow queued and future measurement signals to be sent.
  6.  

    Example:

    var TIFA = webapis.adinfo.getTIFA();
    kochava.registerCustomDeviceIdentifier('tifa', TIFA)
    kochava.setSleep(false);

     
     

Last Modified: May 14, 2025 at 7:37 am