Skip to content

trackkit / index / ProviderInstance

Interface: ProviderInstance ​

Defined in: types.ts:559

Internal

Low-level provider instance contract.

Implemented by provider adapters / clients (GA4, Plausible, Umami, etc.) and consumed by the facade. Most applications never interact with this directly.

Properties ​

name ​

name: string

Defined in: types.ts:561

Provider identifier, e.g. 'ga4' or 'plausible'.

Methods ​

track() ​

track(name, props, pageContext): Promise<void>

Defined in: types.ts:570

Track a custom event.

Parameters ​

name ​

string

Event name (e.g. "button_click").

props ​

Props

Event properties (may be empty).

pageContext ​

PageContext

Page context for the event.

Returns ​

Promise<void>


pageview() ​

pageview(pageContext): Promise<void>

Defined in: types.ts:577

Track a page view.

Parameters ​

pageContext ​

PageContext

Page context for the page view.

Returns ​

Promise<void>


identify() ​

identify(userId, pageContext): void

Defined in: types.ts:585

Identify the current user.

Parameters ​

userId ​

User identifier or null to clear.

null | string

pageContext ​

PageContext

Page context for the identification event.

Returns ​

void


destroy() ​

destroy(): void

Defined in: types.ts:590

Clean up and destroy the provider.

Returns ​

void

Released under the MIT License.