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 (e.g., utm_source, kochava_device_id) in localStorage and optionally through cookie collection 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
- Copy the Code Snippet
Paste the following code into the head of the site:
<script>!function(e,t,o,a,n,c,s,i){var r=window.kochava=window.kochava||[];if(r.loaded)window.console&&console.error&&console.error("Kochava snippet already included");else{r.loaded=!0,r.methods=["page","identify","activity","conversion","init","submitCookieId","getCookieId","getMAID","getKochavaId"],stub=function(e){return function(){var t=Array.prototype.slice.call(arguments);return t.unshift(e),"function"==typeof r.push&&r.push(t),r}};for(var d=0;d<r.methods.length;d++){var u=r.methods[d];r[u]=stub(u)}r.init((new Date).getTime(),e,n,c,s,i),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=("https:"===document.location.protocol?"https://":"http://")+"assets.kochava.com/kochava.js/"+t+"/kochava.min.js",a||(e.src=e.src+"?c="+Math.random());var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(e,o)}(),o&&null!=e&&""!=e&&r.page()}}("YOUR_APP_GUID","v2.2",true,false,true,true,null,false);</script>
- 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.
- 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.
- Cookie Collection — 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.
- 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”}.
- 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.

A. Replace with Kochava App GUID
B. Version Control
C. Autopage
D. Cache
E. Verbose
F. Cookies
G. Identity Link
H. Disable Auto Install
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.
Sample String —
kochava.identify('custom_id_here', callback);
Sample Object with Key/Value —
kochava.identify({
customer_id: '1234abcd'
}, callback);
Authentication —
None
Page:
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.
kochava.page('page_name', {
key: 'value'
}, callback);
Authentication —
None
Activity:
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.
kochava.activity('event_name', {
key: 'value'
}, callback);
Authentication —
None
Install:
The install is automatically sent for you and you do not need to send this activity unless you have set “Disable Auto Install” to true. If you’ve set this value to true, you must manually send the install only once. It is your responsibility to ensure this function is called only once per user.
kochava.activity("install", {}, callback);
Alternatively, if you have an identity link in scope at the moment you wish to send the install, call installWithIdentity() with an object containing identity key and value pairs as the first parameter. This will ensure the identity link is included directly within the manually triggered install payload.
kochava.installWithIdentity({identityKey: 'identityValue'},callback)
Authentication —
None
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 (e.g., utm_source, kochava_device_id) in localStorage and optionally through cookie collection 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
- Copy the Code Snippet
Paste the following code into the head of the site:
<script>!function(e,t,o,a,n,c){var r=window.kochava=window.kochava||[];if(r.loaded)window.console&&console.error&&console.error("Kochava snippet already included");else{r.loaded=!0,r.methods=["page","identify","activity","conversion","init","submitCookieId","getCookieId","getMAID","getKochavaId"],stub=function(e){return function(){var t=Array.prototype.slice.call(arguments);return t.unshift(e),r.push(t),r}};for(var i=0;i<r.methods.length;i++){var s=r.methods[i];r[s]=stub(s)}r.init((new Date).getTime(),e,n,c),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=("https:"===document.location.protocol?"https://":"http://")+"assets.kochava.com/kochava.js/"+t+"/kochava.min.js",a||(e.src=e.src+"?c="+Math.random());var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(e,o)}(),o&&r.page()}}("YOUR_KOCHAVA_APP_GUID","v2.1",true,false,false,false);</script>
- 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.
- 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.
- Cookie Collection – 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.

A. Replace with Kochava App GUID
B. Version Control
C. Autopage
D. Cache
E. Verbose
F. Cookies
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.
Sample String —
kochava.identify('custom_id_here', callback);
Sample Object with Key/Value —
kochava.identify({
customer_id: '1234abcd'
}, callback);
Authentication —
None
Page:
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.
kochava.page('page_name', {
key: 'value'
}, callback);
Authentication —
None
Activity:
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.
kochava.activity('event_name', {
key: 'value'
}, callback);
Authentication —
None
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
- Copy the Code Snippet
Paste the following code into the head of the site:
<script>!function(e,t,o,a,n){var i=window.kochava=window.kochava||[];if(i.loaded)window.console&&console.error&&console.error("Kochava snippet already included");else{i.loaded=!0,i.methods=["page","identify","activity","conversion","init","submitCookieId","getCookieId","getMAID"],stub=function(e){return function(){var t=Array.prototype.slice.call(arguments);return t.unshift(e),i.push(t),i}};for(var r=0;r<i.methods.length;r++){var c=i.methods[r];i[c]=stub(c)}i.init((new Date).getTime(),e,!0),function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=("https:"===document.location.protocol?"https://":"http://")+"assets.kochava.com/kochava.js/v2/kochava.min.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}(),i.page()}}("YOUR_KOCHAVA_APP_GUID","v2",true,false,false);</script>
- 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.
- 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.
Sample String —
kochava.identify('custom_id_here', callback);
Sample Object with Key/Value —
kochava.identify({
name: 'John Smith',
email: 'johnsmith@gmail.com'
}, callback);
Authentication —
None
Page:
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.
kochava.page('page_name', {
key: 'value'
}, callback);
Authentication —
None
Activity:
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.
kochava.activity('event_name', {
key: 'value'
}, callback);
Authentication —
None