Skip to main content
Every block on this page is copied from the .d.ts files of @grainql/tag 4.5.1 and @grainql/analytics-web 3.4.2. When a sentence on this site disagrees with a block here, the block wins. A field with ? is optional.

Grain Tag

GrainTagConfig

The argument of init.
Read Configuration options.

GrainTagInstance

The return value of init and getInstance.
Read Core methods.

DataLayerConnectorConfig

The element type of the updateDataLayerConnectors argument. The package does not export this name, so declare the shape in your own code when you need it.

EventPayload

The shape of one event on the wire.

GrainEvent

An event before the SDK fills in the user ID and the timestamp.

ConsentMode

The value of consentMode in GrainTagConfig.

ConsentState

The return value of consent.status.

UTMParameters

The UTM parameters of the current URL.

FirstTouchAttribution

The stored source of the first visit.

HeatmapClickData

One recorded click.

HeatmapScrollData

One recorded scroll segment.

Analytics Web

The template event property types are on Template methods.

GrainConfig

The argument of new GrainAnalytics and createGrainAnalytics.
Every field, its default, and its meaning are on Configuration options.

GrainEvent

The object form of track.
The Grain Tag GrainEvent has a number timestamp. The Analytics Web GrainEvent has a Date timestamp.

EventPayload

The shape of one event on the wire.

AuthStrategy

The value of authStrategy in GrainConfig and LoginOptions.
Read Authentication.

AuthProvider

The object that supplies the JWT for the JWT strategy.

ConsentMode

The value of consentMode in GrainConfig.

ConsentState

The return value of getConsentState, and the argument of a consent listener.
The Grain Tag ConsentState has a number timestamp. The Analytics Web ConsentState has a Date timestamp.

CookieConfig

The options of the cookie that holds the permanent ID.

SendEventOptions

The last argument of track and of every template method.

SetPropertyOptions

The last argument of setProperty.

LoginOptions

The argument of login.

PropertyPayload

The shape of a setProperty request on the wire. Every value is a string.

RemoteConfigRequest

The shape of a configuration request on the wire.

RemoteConfigOptions

The options argument of getConfigAsync, getAllConfigsAsync, and fetchConfig.
The field table is on Configuration methods.

RemoteConfigResponse

The return value of fetchConfig.

RemoteConfigCache

The record that the client stores under configCacheKey in localStorage.

ConfigChangeListener

The argument of addConfigChangeListener and removeConfigChangeListener.

ReferrerCategory

The category that the client assigns to a referrer.

UTMParameters

The UTM parameters of the current URL.

FirstTouchAttribution

The stored source of the first visit.

InteractionConfig

One automatic interaction tracker from the dashboard.

SectionConfig

One automatic section tracker from the dashboard.

AutoTrackingConfig

The automatic tracking definition that the API returns.

SectionViewData

One recorded section view.

SectionTrackingOptions

The thresholds that decide when a section view counts. Read Attention quality.

ErrorDigest

The summary of the events in a failed request.

FormattedError

The record that the client logs when a request fails. Read Errors and retries.

React

GrainProviderProps

The props of GrainProvider.

UseConfigOptions

The options argument of useConfig.

UseConfigResult

The return value of useConfig.

UseAllConfigsOptions

The options argument of useAllConfigs.

UseAllConfigsResult

The return value of useAllConfigs.

TrackFunction

The return value of useTrack.

ConsentBannerProps

The props of ConsentBanner.

PrivacyPreferenceCenterProps

The props of PrivacyPreferenceCenter.

CookieNoticeProps

The props of CookieNotice.

PrivacyPreferences

The preferences field of usePrivacyPreferences.

DataDeletionOptions

The argument of useDataDeletion.
Read React hooks for the hook and component signatures.