
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
affitor-sdk
Advanced tools
Affitor browser tracking SDK — typed init()/signup() for affiliate attribution.
Affitor browser tracking SDK — typed init() / signup() for affiliate attribution.
Wraps the Affitor tracker: captures ?aff= attribution, stores the click id in a
first-party cookie (affitor_click_id), and reports click + lead (signup) events.
Same endpoints and payloads as the legacy affitor-tracker.js script.
npm i affitor-sdk
import { init, signup } from 'affitor-sdk';
// On app load (client-side):
init({ programId: 123 });
// At signup / checkout:
await signup('customer_123', 'user@example.com');
SSR-safe: init() is a no-op on the server, so importing it anywhere in a
Next.js / SSR app is safe.
| Option | Type | Description |
|---|---|---|
programId | number | string | Affiliate program id. |
debug | boolean | Verbose console logging. |
cookieDomain | string | Force a cookie domain (e.g. .example.com). Auto-detected otherwise. |
apiBase | string | Override the tracking API base (default https://api.affitor.com). |
init(options) — start attribution (captures ?aff=, loads/sets the cookie).signup(customerKey, email?) — track a lead/signup.trackClick(affiliateUrl?, existingClickId?) — track a click manually.getClickId() — current click id, or null.getData() — { clickId, programId, hasAttribution, affiliateUrl }.A class export (AffitorTracker) is also available for multi-instance use.
FAQs
Affitor browser tracking SDK — typed init()/signup() for affiliate attribution.
We found that affitor-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.