Skip to main content

1. Get your SDK key

Log in to the Hacktionbase dashboard, navigate to Settings → Widget, and copy your SDK key and tenant slug.

2. Add the script

Paste this snippet before the closing </body> tag of your website:
<script>
  (function(w, d, s) {
    var js = d.createElement(s);
    js.src = 'https://sdk.hacktionbase.com/hacktionbase.js';
    js.async = 1;
    js.onload = function() {
      Hacktionbase.init({
        sdkKey: 'YOUR_SDK_KEY',
        tenant: 'YOUR_TENANT_SLUG'
      });
    };
    d.head.appendChild(js);
  })(window, document, 'script');
</script>
This mounts the chat widget and starts tracking page views automatically.

3. Identify users

When a user logs in, call identify to link their activity to a known profile:
Hacktionbase.identify({
  id: 'user_123',
  email: 'jane@example.com',
  name: 'Jane Doe'
});

4. Track events

Record custom events with optional properties:
Hacktionbase.track('project_created', {
  projectName: 'My Project',
  plan: 'growth'
});

5. Open the widget

The widget appears as a floating bubble. You can also control it programmatically:
Hacktionbase.open();   // Open the panel
Hacktionbase.close();  // Close the panel
Hacktionbase.toggle(); // Toggle open/close

Next steps

SDK Reference

Explore all SDK methods and configuration options.

Widget Configuration

Customize colors, position, and behavior.