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

A modified version of our Web SDK is provided to integrate into your Tizen web app.

NOTE: You may alternatively use our unmodified Web SDK, however the nuances of Tizen can prevent this from working out-of-the-box depending on your environment, which is why we provide a modified version described below.

  1. Download the SDK.
  2. Download the latest Tizen-specific Web SDK javascript file: kochava-ts-tizen.js

  3. Integrate the SDK.
  4. Add the kochava-ts-tizen.js file to the js folder of your Tizen web app project.
    Integrate the SDK

     

  5. Create a function to load the SDK script.
  6.  

    Example (A function which loads the kochava-ts-tizen.js script)

    Load the SDK Script

     

  7. Call the loadKochavaScript() function.
  8. The loadKochavaScript() function should be called only once per page view or app launch. Your Kochava app GUID is entered here along with other preferences.

    • app_id — Replace ‘YOUR_APP_GUID’ with your Kochava App GUID. For more information on locating your App GUID, refer to our Locating your App GUID support documentation.
    • verbose — Set to true for verbose logging to the console. Set to false to suppress all logging.
    • use_cookie — Set to true to drop Cookie on the website to track a device across sub-domains. Set to false to not drop the Cookie and rely only on local storage for tracking.
    • disable_auto_install — Set this value to true to stop the SDK from automatically signaling an install when the SDK is initialized for the first time.
    • identity_link — Set to an object of key-value pairs that provides a means for linking different identities with Kochava devices. E.g., {“User ID”: “123456789”, “Login”: “username”}.

     

    Example (Call the loadKochavaScript() function once)

    Call the Kochava Load Script

     

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 tracking 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 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: Jan 24, 2024 at 10:33 am