Scan your whole stack
Are you using @capillarytech/cap-hydra-web-sdk?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.10.8
@capillarytech/cap-hydra-web-sdk was last scanned on 1 Dec 2026 at version 1.10.8. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.10.8 LATEST | 1 Dec 2026 | No rules fired |
| 1.10.8-beta.feat-pkg-migration-under-org.1 | 1 Dec 2026 | No rules fired |
| 0.0.0-stage | 1 Dec 2026 | Not shown |
Findings for v1.10.8. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.10.8; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
A comprehensive guide for integrating the Hydra WebSDK into your web application for event tracking, user identification, and analytics.
Choose the release channel that matches your environment:
| Channel | When to use | npm tag |
|---|---|---|
Production (@latest) |
Live / production apps — stable, fully tested | (default) |
Beta (@beta) |
Staging / pre-release testing — latest features before stable cut | @beta |
NPM (recommended):
# Production (stable)
npm install @capillarytech/cap-hydra-web-sdk
# Beta (pre-release / testing)
npm install @capillarytech/cap-hydra-web-sdk@beta
CDN / Script tag:
<!-- Production -->
<script src="https://cdn.jsdelivr.net/npm/@capillarytech/cap-hydra-web-sdk@latest/dist/index.umd.min.js"></script>
<!-- Beta -->
<script src="https://cdn.jsdelivr.net/npm/@capillarytech/cap-hydra-web-sdk@beta/dist/index.umd.min.js"></script>
Beta channel: Beta builds are published manually from feature/UAT branches and carry the branch name and a build number (e.g.
1.10.8-beta.feature-login.42).@betaalways points at the most recent beta from any branch, so pin the exact version when testing a specific branch. Switch to production once the release is cut.
ES6 Modules (TypeScript / JavaScript):
import { HydraSDK } from '@capillarytech/cap-hydra-web-sdk';
CommonJS:
const { HydraSDK } = require('@capillarytech/cap-hydra-web-sdk');
When using the CDN script tag, HydraSDK is available as a global on the window object.
Call HydraSDK.initialize() once at application startup. The SDK uses Firebase Remote Config to fetch backend configuration (accountId, baseURL, debugLevel, etc.) automatically — you only need to provide Firebase credentials and the Remote Config key.
import { HydraSDK } from '@capillarytech/cap-hydra-web-sdk';
HydraSDK.initialize({
firebaseConfig: {
apiKey: 'YOUR_FIREBASE_API_KEY',
authDomain: 'your-app.firebaseapp.com',
databaseURL: 'https://your-app.firebaseio.com',
projectId: 'your-project-id',
storageBucket: 'your-app.appspot.com',
messagingSenderId: '123456789',
appId: 'your-firebase-app-id',
},
remoteConfigKey: 'your_app_config_key',
appVersion: '1.0.0',
});
Important: Initialize the SDK at module load time — not inside React
useEffect, AngularngOnInit, or similar async lifecycle hooks. This ensures the SDK instance exists before any component attempts to use it. In a React app, wrap the call in a small service module (e.g.services/sdkService.ts) that callsHydraSDK.initialize()at the top level, then import that module wherever you needHydraSDK.
// Track a page view (auto-captures URL and title)
HydraSDK.pageView();
// Track a custom event
HydraSDK.track('page_view', {
page: 'homepage',
});
// Track with detailed properties
HydraSDK.track('add_to_cart', {
product_id: 'shoe-123',
product_name: 'Nike Air Max',
quantity: 1,
price: 129.99,
currency: 'USD',
});
When a user logs in, call identify() to link their activity to a known identity:
HydraSDK.identify({
identifier: { type: 'email', cuid: 'user@example.com' },
actionType: 'USER_REGISTER',
traits: {
firstName: 'John',
lastName: 'Doe',
},
});
Supported identifier types: 'email', 'mobile', 'externalId'.
When the user logs out, call reset() to return to anonymous tracking:
HydraSDK.reset();
The SDK supports two bootstrap modes, selected by whether remoteConfigKey is present in the config passed to initialize():
firebaseConfig + remoteConfigKey. Values like accountId, baseURL, debugLevel, etc. are fetched automatically from Firebase Remote Config.firebaseConfig and remoteConfigKey entirely and pass accountId, baseURL, and orgId directly instead. No Firebase project is required in this mode unless notifications (push) is also configured.| Field | Type | Description |
|---|---|---|
firebaseConfig |
FirebaseConfig |
Firebase project configuration |
remoteConfigKey |
string |
Key to fetch SDK config from Remote Config |
| Field | Type | Default | Description |
|---|---|---|---|
appVersion |
string |
— | Host application version (populates app_version in events) |
retryDelays |
number[] |
[60000, 120000, 240000, 480000, 900000] |
Custom retry delays in milliseconds |
notifications |
NotificationConfig |
— | Push notification configuration |
The following fields are fetched from Firebase Remote Config. Do not set them manually.
| Field | Required | Default | Description |
|---|---|---|---|
accountId |
Yes | — | Organization account identifier |
baseURL |
Yes | — | API base URL for all SDK requests |
orgId |
Yes | — | Organization ID for API authentication |
brandId |
No | — | Brand identifier for namespaced database names |
applicationId |
No | — | Application identifier for namespaced database names |
source |
No | WEBPUSH |
Source identifier for visitor profiles |
channelType |
No | web |
Communication channel type |
sessionTimeoutMinutes |
No | 30 |
Session inactivity timeout in minutes |
batchSize |
No | 50 |
Max events per batch request |
debugLevel |
No | NONE |
Logging level (NONE / ERROR / WARN / INFO / DEBUG / VERBOSE) |
gamificationWriteKey |
Yes* | — | Gamification write key; gamification auto-initializes on user signin once this and gamificationBaseUrl are set. Required to enable gamification. |
gamificationBaseUrl |
Yes* | — | Gamification API base URL. Required to enable gamification — there is no built-in default endpoint. |
*
gamificationWriteKeyandgamificationBaseUrlare both required to enable gamification. Omit both if gamification is not being used.
Example Remote Config JSON (stored as the value of your remoteConfigKey in Firebase Console):
{
"accountId": "100458",
"baseURL": "https://api.example.capillarytech.com",
"orgId": "100458",
"brandId": "1",
"applicationId": "2",
"source": "WEBPUSH",
"channelType": "web",
"sessionTimeoutMinutes": 30,
"batchSize": 50,
"debugLevel": "NONE",
"gamificationWriteKey": "wk_live_xxxxxxxxxx",
"gamificationBaseUrl": "https://gamification.example.capillarytech.com"
}
Gamification is opt-in. With both fields above configured, campaigns and entry points are fetched and rendered automatically after
identify()— no other host-app code is required beyond placing a<div id="{hookId}"></div>for EMBEDDED/NATIVE_BANNER container types. Once a user explicitly closes a campaign, it won't reopen again until a new session starts, by default — no configuration needed. See DEVELOPER_GUIDE.md §14 for the full container/content-type reference, the session-dismissal rules, and the 7 engagement-tracking events sent automatically alongsidetrack()/pageView().
If you don't want to depend on Firebase at all, omit firebaseConfig and remoteConfigKey from initialize() and pass the config directly instead:
HydraSDK.initialize({
accountId: '100458',
baseURL: 'https://api.example.capillarytech.com',
orgId: '100458',
// Everything below is optional (same fields, same defaults as Remote Config bootstrap) —
// except the gamification pair, which is required together only if you want gamification.
brandId: '1',
applicationId: '2',
sessionTimeoutMinutes: 30,
batchSize: 50,
debugLevel: 'NONE',
gamificationWriteKey: 'wk_live_xxxxxxxxxx',
gamificationBaseUrl: 'https://gamification.example.capillarytech.com',
});
| Field | Required? | Notes |
|---|---|---|
accountId |
Yes | Same field as the Remote Config JSON's accountId |
baseURL |
Yes | Same field as the Remote Config JSON's baseURL |
orgId |
Yes | Same field as the Remote Config JSON's orgId |
| Everything else | No | Same fields and requirements as the "Auto-populated Fields" table above (gamification's 3 fields are still required together if enabling gamification) |
No Firebase project is required in this mode, except for push notifications — see Push Notifications below.
This is also how to use a different config source than this SDK's built-in Remote Config fetch. Fetch your config however you like and pass the values in directly; there's nothing Firebase-specific about this mode.
All 15 public methods are static and accessed via HydraSDK.*. All methods (except initialize) internally wait for SDK initialization to complete before executing.
initialize(config)Creates and initializes the SDK singleton. Must be called once before any other method. Safe to call multiple times — subsequent calls return the existing instance.
const sdk = HydraSDK.initialize({
firebaseConfig: {/* ... */},
remoteConfigKey: 'your_app_config_key',
appVersion: '1.0.0',
});
| Parameter | Type | Required | Description |
|---|---|---|---|
config |
WebSDKConfig |
Yes | SDK configuration object |
track(eventName, properties?)Tracks a custom behavioral event.
HydraSDK.track('button_click', {
button_id: 'checkout',
page: 'cart',
value: 99.99,
});
| Parameter | Type | Required | Description |
|---|---|---|---|
eventName |
string |
Yes | Name of the event |
properties |
Record<string, unknown> |
No | Custom event properties |
If gamification is configured and a gamification entry point is set up with triggerType: "ACTION_EVENT" for this eventName, this same track() call also evaluates and, if its display conditions pass, opens that entry point — no separate call is needed. Unlike screen-triggered campaigns, an ACTION_EVENT entry point isn't rationed by a frequency cap and isn't blocked once its campaign is marked completed — it keeps responding to every occurrence of its event.
Overlay campaigns queue, they don't stack. If a matching entry point is a pop-up, bottom sheet, or chat box and another overlay campaign is already open, it waits in a priority-ordered queue and shows automatically once the current one closes — you never see two overlay campaigns on screen at once. Icon buttons, banners, and embeds are unaffected and open immediately. See DEVELOPER_GUIDE.md's Campaign Queue section for the full ordering/persistence rules.
pageView(options?)Tracks a page view event. If called with no arguments, automatically captures the current URL and page title.
// Automatic capture
HydraSDK.pageView();
// With custom options
HydraSDK.pageView({
page_url: 'https://example.com/products/123',
page_title: 'Product Detail',
page_category: 'product',
properties: { productId: 'SKU-123' },
});
| Parameter | Type | Required | Description |
|---|---|---|---|
options |
PageViewOptions |
No | Page view metadata |
PageViewOptions fields:
| Field | Type | Description |
|---|---|---|
page_url |
string |
Override the current page URL |
page_title |
string |
Override the current page title |
referrer |
string |
Override the page referrer |
page_category |
string |
Page category (e.g., 'blog', 'product', 'checkout') |
properties |
Record<string, unknown> |
Custom properties |
These same keys (page_url, page_title, referrer, page_category) are what's sent as the
page_view event's attributes. See
DEVELOPER_GUIDE.md § Automatic Event Attributes
for the full schema, including the automatic scroll_depth event.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.