Extension
Website
Extension tracking calls resolve when an event is saved for delivery, not when the server receives it. A failed call rejects; handle failures so analytics does not interrupt your extension’s main features.
identify() and clearIdentity() resolve when the identity change is saved locally. See Events for property limits and Identify users for identity rules.
Configuration
Both entry points accept the same project ID. The extension entry point also accepts your welcome page and an optional uninstall page:analytics.init({ projectId }). Initialize the extension SDK in the background; its listeners register immediately, and subsequent calls wait for initialization.
track
analytics.track(name, properties?) records an extension custom event. The event name is a string; properties are optional strings or finite numbers. Events carry installation and event context.
_, which crxbase uses for platform events. The SDK does not block those names. See Events and views for property limits.
view
analytics.view(name?) records an extension view. Pass a string to use a custom name; otherwise the SDK detects a common surface when possible and uses unknown if it cannot.
identify and clearIdentity
analytics.identify(id) sets a nonblank string identifier for future extension events. analytics.clearIdentity() clears it for future events. Neither call creates an event or changes earlier events. See Identify users for identifier limits and examples.
attributeInstall
Callanalytics.attributeInstall() on your website’s welcome page after initializing the website SDK. It associates eligible acquisition information with the extension installation. A missing or invalid installation handoff does not create an install or attribution. The method does not return a queued, skipped, or failed status value.
recordUninstall
Callanalytics.recordUninstall() on your configured uninstall page after initializing the website SDK. It reports the removal using the installation information supplied to the page. Reporting is optional and best effort.
