Support Home > SDK Integration > Web SDK Integration

Web SDK Integration

This feature is available only with paid Kochava accounts. Contact us to learn more.

Feature Summary: The Kochava Web SDK solution will provide marketers with Web Tracking capabilities.


By including the provided snippets of javascript code in the header of any website, marketers will have unlimited tracking capabilities.The javascript code will store/persist data in localStorage (e.g., utm_source, kochava_device_id) allowing the configurable and robust Kochava attribution engine to leverage this data for tracking purposes. The marketer can also opt to turn on page tracking, which will make each page of the integrated website a first class event, which can be visualized through our suite of analytics and reporting tools. Tracking all the activity (pages and conversions) will allow the marketer to visualize all website activity and attribute conversion events – all through our real-time analytics. Now Marketers can understand all efforts, across all channels and mediums through a single dashboard.


Minimum Requirements:

  • None

Integrating the SDK

  1. Copy the Code Snippet
  2. Paste the following code into the head of the site:


  3. Replace YOUR_KOCHAVA_GUID with your Kochava App GUID.
    For more information on locating your App GUID, refer to our Locating your App GUID support documentation. 

    NOTE: The Kochava Web SDK is loaded asynchronously with the web page in order to not affect page load time.

    NOTE: The Kochava APP GUID can be set to null if only the resolver functions are being utilized.

  4. Edit Optional Settings:
    • Version Control – This option controls the SDK version that is loaded. It is recommended that the current version be loaded unless specifically instructed.
    • Autopage – Set to true in order to send a page event automatically on every page load. Set to false to send a page load only on manual calls to the page function.
    • Cache – Set to true to allow browsers to cache the SDK code. Set to false to force the SDK code to be loaded with every page load.
    • Verbose – Set to true for Verbose logging to the console. Set to false to suppress all logging.

    A. Replace with Kochava App GUID.
    B. Version Control.
    C. Autopage.
    D. Cache.
    E. Verbose.

Authentication Types

Basic Authentication:

Functions that require basic authentication only require an API-Key.


Digest Authentication:

Each function that uses digest authentication will require the following parameters:

  • api-key: Assigned/provided by Kochava
  • account-secret: Assigned/provided by Kochava
  • nonce: A randomly generated string that is unique to each call of the function
  • auth_code: A string that is formed by hashing *(sha256)* the concatenation of your api-key + nonce + account-secret (in that order)
  • async: A boolean value that determines whether calls are made synchronously or asynchronously. Set to true to call function asynchronously.

Standard Functions

Identify Users:

The identify function tells Kochava who the current user is. This method provides Kochava with a unique user ID and any other user specific data available. Calls to kochava.identify will send the user data to the Kochava Identify API, allowing the data to be used for attribution.

NOTE: Calls to this function are optional. This function may be used to associate a custom ID with the page visitor.


Sample String —

NOTE: If a string is passed instead of an object, that value will be associated with the key “custom_id”.


Sample Object with Key/Value —

NOTE: Any custom Key/Value pairs may be used.


Authentication — None


The page function allows you to record page views on your website, along with optional metadata information about the page being viewed. If you do not specify a page name, Kochava will dynamically collect the page from the URL.


Authentication — None


The Activity function allows you to record custom actions or events which your users are performing or completing throughout your site. Every integrated action or event that is triggered can include optional metadata properties which can be exposed via reporting and analytics. These integrated activities can also act as engagement/conversion events through the tracking URL creation process.

NOTE: For more information on standard events within Kochava, refer to our Post-Install Event Examples support documentation.


Authentication — None

Resolver Functions

WARNING: In order to utilize the Resolver functionality, an additional API key must be obtained. Contact your Client Success Management team for further details.


Get Cookie ID:

The Get Cookie ID function returns the Kochava Cookie/Identity.


Authentication — Basic

Submit Cookie ID:

The Submit Cookie ID function passes the partner identifier which is stored with the Kochava ID within the 1st party Kochava Cookie.

NOTE: auth_code = sha256(apikey + nonce + secret)


Authentication — Digest


Returns the Kochava Identity and Device ID if there is a link stored in a cookie on the device.

NOTE: auth_code = sha256(apikey + nonce + secret)


Authentication — Digest


Last Modified: Mar 11, 2019 at 2:08 pm