Skip to content
AetherDocs0.1.0-alpha.0

Web SDK

Page views, sign-ins, purchases, and conversions that happen in a browser.

Package@aether/web
Statusalpha
TransportPOST /v1/batch

Install

● bash
npm install @aether/web

Initialize

● typescript
import { AetherSDK } from '@aether/web';

const aether = AetherSDK.init({ tenantId: 'your-tenant-id', appId: 'your-app-id' });
aether.consent.grant(['analytics']);
aether.track('page_view', { path: location.pathname });

What it collects

DataEventsConsent purpose
Page and screen viewspage / screenanalytics
Custom eventstrackanalytics
Sessionsstart, heartbeat, endanalytics
Identity hintsidentify · userId, hashed email, walletpersonalization
Commerceproduct, cart, checkout, order, paymentanalytics
Journeysstart, checkpoint, pause, resume, complete, abandonanalytics
Device contextOS, app version, locale, timezoneanalytics
Marketing contextUTM parameters, referrer, campaignmarketing

How it collects

  1. 01Wait for consentNothing is captured until the purpose for an event is granted.
  2. 02Queue locallyEvents buffer in memory and localStorage for offline spooling.
  3. 03Batch and sendFlushes on size, interval, or page hide.
  4. 04Retry safelyIdempotent retries dedupe on tenant_id:event_id:schema_version for 24 h.
+Does it work with SPAs?
Yes. Route changes become page views, and checkpoints during an active journey.
+Does it set cookies?
It stores an anonymous id in first-party storage only after the analytics purpose is granted.