Integrate the Kahuna SDK for JavaScript

Integrate the Kahuna SDK for JavaScript

To integrate Kahuna with your application

    1. Add the following script to your HTML page before the closing </head> tag.

      Replace INSERT_APP_NAME and INSERT_APP_VERSION with the name and version of your application. Replace INSERT_ENVIRONMENT with s for sandbox or p for production.

<script src=""></script>
<script type="text/javascript">    Kahuna.setEnvironment('INSERT_ENVIRONMENT'); 
    Kahuna.init('KAHUNA_SECRET_KEY', 'INSERT_APP_NAME', 'INSERT_APP_VERSION');</script>   
  1. In your JavaScript, add a track start event so that Kahuna knows when each user launches your application.

  2. Track another custom event from your application. Use the following code snippet and replace EVENT_NAME_HERE with your custom event.


Now that you have integrated the JavaScript SDK, add user credentials. Follow the steps in Add User Credentials.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request