@amplitude/analytics-types 2.6.0-featureremoteconfig.1 → 2.7.0-featureremoteconfig.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/config/browser.d.ts +2 -2
- package/lib/cjs/config/browser.d.ts.map +1 -1
- package/lib/cjs/config/browser.js.map +1 -1
- package/lib/cjs/{userInteractions.d.ts → element-interactions.d.ts} +2 -2
- package/lib/cjs/element-interactions.d.ts.map +1 -0
- package/lib/cjs/{userInteractions.js → element-interactions.js} +1 -1
- package/lib/cjs/element-interactions.js.map +1 -0
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +3 -3
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/config/browser.d.ts +2 -2
- package/lib/esm/config/browser.d.ts.map +1 -1
- package/lib/esm/config/browser.js.map +1 -1
- package/lib/esm/{userInteractions.d.ts → element-interactions.d.ts} +2 -2
- package/lib/esm/element-interactions.d.ts.map +1 -0
- package/lib/esm/{userInteractions.js → element-interactions.js} +1 -1
- package/lib/esm/element-interactions.js.map +1 -0
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/index.js.map +1 -1
- package/package.json +2 -2
- package/lib/cjs/userInteractions.d.ts.map +0 -1
- package/lib/cjs/userInteractions.js.map +0 -1
- package/lib/esm/userInteractions.d.ts.map +0 -1
- package/lib/esm/userInteractions.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { IdentityStorageType, Storage } from '../storage';
|
|
|
3
3
|
import { Transport } from '../transport';
|
|
4
4
|
import { Config } from './core';
|
|
5
5
|
import { PageTrackingOptions } from '../page-view-tracking';
|
|
6
|
-
import {
|
|
6
|
+
import { ElementInteractionsOptions } from '../element-interactions';
|
|
7
7
|
export interface BrowserConfig extends ExternalBrowserConfig, InternalBrowserConfig {
|
|
8
8
|
}
|
|
9
9
|
export interface ExternalBrowserConfig extends Config {
|
|
@@ -146,7 +146,7 @@ export interface AutocaptureOptions {
|
|
|
146
146
|
* Enables/disables user interactions tracking.
|
|
147
147
|
* @defaultValue `false`
|
|
148
148
|
*/
|
|
149
|
-
|
|
149
|
+
elementInteractions?: boolean | ElementInteractionsOptions;
|
|
150
150
|
}
|
|
151
151
|
export interface TrackingOptions {
|
|
152
152
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/config/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/config/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,WAAW,aAAc,SAAQ,qBAAqB,EAAE,qBAAqB;CAAG;AAEtF,MAAM,WAAW,qBAAsB,SAAQ,MAAM;IACnD;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,eAAe,CAAC,EAA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;QACV,WAAW,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC;KAC5C,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../../src/config/browser.ts"],"names":[],"mappings":"","sourcesContent":["import { UserSession } from '../user-session';\nimport { IdentityStorageType, Storage } from '../storage';\nimport { Transport } from '../transport';\nimport { Config } from './core';\nimport { PageTrackingOptions } from '../page-view-tracking';\nimport {
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../../src/config/browser.ts"],"names":[],"mappings":"","sourcesContent":["import { UserSession } from '../user-session';\nimport { IdentityStorageType, Storage } from '../storage';\nimport { Transport } from '../transport';\nimport { Config } from './core';\nimport { PageTrackingOptions } from '../page-view-tracking';\nimport { ElementInteractionsOptions } from '../element-interactions';\n\nexport interface BrowserConfig extends ExternalBrowserConfig, InternalBrowserConfig {}\n\nexport interface ExternalBrowserConfig extends Config {\n /**\n * An app version for events tracked. This can be the version of your application.\n * @defaultValue `undefined`\n */\n appVersion?: string;\n /**\n * @deprecated This property is deprecated and will be removed in future versions. Please migrate to using `autocapture` instead.\n * The default event tracking configuration.\n * See {@link https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events}.\n * @defaultValue `true`\n */\n defaultTracking?: boolean | DefaultTrackingOptions;\n /**\n * The configurations for auto-captured events.\n * See {@link https://www.docs.developers.amplitude.com/data/sdks/browser-2/autocapture/}.\n */\n autocapture?: boolean | AutocaptureOptions;\n /**\n * The identifier for the device running your application.\n * @defaultValue `UUID()`\n */\n deviceId?: string;\n /**\n * Configuration for cookie.\n */\n cookieOptions?: CookieOptions;\n /**\n * The storage for user identify.\n * @defaultValue `\"cookie\"`\n */\n identityStorage?: IdentityStorageType;\n /**\n * The partner identifier.\n * Amplitude requires the customer who built an event ingestion integration to add the partner identifier to partner_id.\n * @defaultValue `undefined`\n */\n partnerId?: string;\n /**\n * The custom Session ID for the current session.\n * @defaultValue `timestamp`\n */\n sessionId?: number;\n /**\n * The period of inactivity from the last tracked event before a session expires in milliseconds.\n * @defaultValue `1,800,000` (30 minutes)\n */\n sessionTimeout: number;\n /**\n * The configurations for tracking additional properties.\n * See {@link https://www.docs.developers.amplitude.com/data/sdks/browser-2/#optional-tracking}.\n */\n trackingOptions: TrackingOptions;\n /**\n * Network transport mechanism used to send events.\n * @defaultValue `\"fetch\"`\n */\n transport?: 'fetch' | 'xhr' | 'beacon';\n /**\n * The identifier for the user being tracked.\n * @defaultValue `undefined`\n */\n userId?: string;\n /**\n * User's Nth instance of performing a default Page Viewed event within a session.\n * Used for landing page analysis.\n */\n pageCounter?: number;\n /**\n * Whether to fetch remote configuration.\n * @defaultValue `false`\n */\n fetchRemoteConfig?: boolean;\n}\n\ninterface InternalBrowserConfig {\n cookieStorage: Storage<UserSession>;\n lastEventTime?: number;\n lastEventId?: number;\n transportProvider: Transport;\n}\n\n/**\n * @deprecated This interface is deprecated and will be removed in future versions. Please migrate to using `AutocaptureOptions` instead.\n */\nexport interface DefaultTrackingOptions {\n /**\n * Enables/disables marketing attribution tracking or config with detailed attribution options.\n * @defaultValue `true`\n */\n attribution?: boolean | AttributionOptions;\n /**\n * Enables/disables form downloads tracking.\n * @defaultValue `true`\n */\n fileDownloads?: boolean;\n /**\n * Enables/disables form interaction tracking.\n * @defaultValue `true`\n */\n formInteractions?: boolean;\n /**\n * Enables/disables default page view tracking.\n * @defaultValue `true`\n */\n pageViews?: boolean | PageTrackingOptions;\n /**\n * Enables/disables session tracking.\n * @defaultValue `true`\n */\n sessions?: boolean;\n}\n\nexport interface AutocaptureOptions {\n /**\n * Enables/disables marketing attribution tracking or config with detailed attribution options.\n * @defaultValue `true`\n */\n attribution?: boolean | AttributionOptions;\n /**\n * Enables/disables form downloads tracking.\n * @defaultValue `true`\n */\n fileDownloads?: boolean;\n /**\n * Enables/disables form interaction tracking.\n * @defaultValue `true`\n */\n formInteractions?: boolean;\n /**\n * Enables/disables default page view tracking.\n * @defaultValue `true`\n */\n pageViews?: boolean | PageTrackingOptions;\n /**\n * Enables/disables session tracking.\n * @defaultValue `true`\n */\n sessions?: boolean;\n /**\n * Enables/disables user interactions tracking.\n * @defaultValue `false`\n */\n elementInteractions?: boolean | ElementInteractionsOptions;\n}\n\nexport interface TrackingOptions {\n /**\n * Enables/disables ip address tracking.\n * @defaultValue `true`\n */\n ipAddress?: boolean;\n /**\n * Enables/disables language tracking.\n * @defaultValue `true`\n */\n language?: boolean;\n /**\n * Enables/disables plantform tracking.\n * @defaultValue `true`\n */\n platform?: boolean;\n}\n\nexport interface AttributionOptions {\n /**\n * The rules to determine which referrers are excluded from being tracked as traffic source.\n * @defaultValue `[/your-domain\\.com$/]`\n */\n excludeReferrers?: (string | RegExp)[];\n /**\n * The value to represent undefined/no initial campaign parameter for first-touch attribution.\n * @defaultValue `\"EMPTY\"`\n */\n initialEmptyValue?: string;\n /**\n * The flag of if Amplitude to start a new session if any campaign parameter changes.\n * @defaultValue `false`\n */\n resetSessionOnNewCampaign?: boolean;\n}\n\nexport interface CookieOptions {\n /**\n * The domain property of cookies created.\n * @defaultValue `Your top level domain`\n */\n domain?: string;\n /**\n * The expiration of cookies created in days.\n * @defaultValue `365`\n */\n expiration?: number;\n /**\n * How cookies are sent with cross-site requests.\n * @defaultValue `\"Lax\"`\n */\n sameSite?: 'Strict' | 'Lax' | 'None';\n /**\n * The flag of if send cookies over secure protocols.\n * @defaultValue `false`\n */\n secure?: boolean;\n /**\n * The flag of if upgrade the cookies created by maintenance Browser SDK.\n * @defaultValue `true`\n */\n upgrade?: boolean;\n}\n\ntype HiddenOptions = 'apiKey' | 'transportProvider' | 'requestMetadata';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface BrowserOptions extends Omit<Partial<ExternalBrowserConfig>, HiddenOptions> {}\n\nexport type BrowserRemoteConfig = {\n browserSDK: {\n autocapture?: AutocaptureOptions | boolean;\n };\n};\n"]}
|
|
@@ -14,7 +14,7 @@ export declare const DEFAULT_CSS_SELECTOR_ALLOWLIST: string[];
|
|
|
14
14
|
* Default prefix to allo the plugin to capture data attributes as an event property.
|
|
15
15
|
*/
|
|
16
16
|
export declare const DEFAULT_DATA_ATTRIBUTE_PREFIX = "data-amp-track-";
|
|
17
|
-
export interface
|
|
17
|
+
export interface ElementInteractionsOptions {
|
|
18
18
|
/**
|
|
19
19
|
* List of CSS selectors to allow auto tracking on.
|
|
20
20
|
* When provided, allow elements matching any selector to be tracked.
|
|
@@ -58,4 +58,4 @@ interface Element {
|
|
|
58
58
|
className: string;
|
|
59
59
|
}
|
|
60
60
|
export {};
|
|
61
|
-
//# sourceMappingURL=
|
|
61
|
+
//# sourceMappingURL=element-interactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-interactions.d.ts","sourceRoot":"","sources":["../../src/element-interactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5C;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,UAS1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,oBAAoB,CAAC;AAE/D,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAEvC;;;;;;;OAOG;IACH,wBAAwB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;IAEjF;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,oBAAoB,CAAC,EAAE;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;CACH;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -23,4 +23,4 @@ exports.DEFAULT_CSS_SELECTOR_ALLOWLIST = [
|
|
|
23
23
|
* Default prefix to allo the plugin to capture data attributes as an event property.
|
|
24
24
|
*/
|
|
25
25
|
exports.DEFAULT_DATA_ATTRIBUTE_PREFIX = 'data-amp-track-';
|
|
26
|
-
//# sourceMappingURL=
|
|
26
|
+
//# sourceMappingURL=element-interactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-interactions.js","sourceRoot":"","sources":["../../src/element-interactions.ts"],"names":[],"mappings":";;AAIA;;;;;;;;GAQG;AACU,QAAA,8BAA8B,GAAG;IAC5C,GAAG;IACH,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,UAAU;IACV,OAAO;IACP,0BAA0B;IAC1B,oBAAoB;CACrB,CAAC;AAEF;;GAEG;AACU,QAAA,6BAA6B,GAAG,iBAAiB,CAAC","sourcesContent":["import { Logger } from './logger';\n\nexport type ActionType = 'click' | 'change';\n\n/**\n * Default CSS selectors to define which elements on the page to track.\n * Extend this list to include additional elements to track. For example:\n * ```\n * autocapturePlugin({\n * cssSelectorAllowlist: [...DEFAULT_CSS_SELECTOR_ALLOWLIST, \".my-class\"],\n * })\n * ```\n */\nexport const DEFAULT_CSS_SELECTOR_ALLOWLIST = [\n 'a',\n 'button',\n 'input',\n 'select',\n 'textarea',\n 'label',\n '[data-amp-default-track]',\n '.amp-default-track',\n];\n\n/**\n * Default prefix to allo the plugin to capture data attributes as an event property.\n */\nexport const DEFAULT_DATA_ATTRIBUTE_PREFIX = 'data-amp-track-';\n\nexport interface ElementInteractionsOptions {\n /**\n * List of CSS selectors to allow auto tracking on.\n * When provided, allow elements matching any selector to be tracked.\n * Default is ['a', 'button', 'input', 'select', 'textarea', 'label', '[data-amp-default-track]', '.amp-default-track'].\n */\n cssSelectorAllowlist?: string[];\n\n /**\n * List of page URLs to allow auto tracking on.\n * When provided, only allow tracking on these URLs.\n * Both full URLs and regex are supported.\n */\n pageUrlAllowlist?: (string | RegExp)[];\n\n /**\n * Function to determine whether an event should be tracked.\n * When provided, this function overwrites all other allowlists and configurations.\n * If the function returns true, the event will be tracked.\n * If the function returns false, the event will not be tracked.\n * @param actionType - The type of action that triggered the event.\n * @param element - The [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) that triggered the event.\n */\n shouldTrackEventResolver?: (actionType: ActionType, element: Element) => boolean;\n\n /**\n * Prefix for data attributes to allow auto collecting.\n * Default is 'data-amp-track-'.\n */\n dataAttributePrefix?: string;\n\n /**\n * Options for integrating visual tagging selector.\n */\n visualTaggingOptions?: {\n enabled?: boolean;\n messenger?: Messenger;\n };\n}\n\nexport interface Messenger {\n logger?: Logger;\n setup: () => void;\n}\n\ninterface Element {\n id: string;\n className: string;\n}\n"]}
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -24,5 +24,5 @@ export { UserSession } from './user-session';
|
|
|
24
24
|
export { UTMData } from './utm';
|
|
25
25
|
export { PageTrackingOptions, PageTrackingTrackOn, PageTrackingHistoryChanges } from './page-view-tracking';
|
|
26
26
|
export { OfflineDisabled } from './offline';
|
|
27
|
-
export { Messenger,
|
|
27
|
+
export { Messenger, ElementInteractionsOptions, ActionType, DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, } from './element-interactions';
|
|
28
28
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;A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,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EACL,SAAS,EACT,0BAA0B,EAC1B,UAAU,EACV,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC"}
|
package/lib/cjs/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var status_1 = require("./status");
|
|
|
12
12
|
Object.defineProperty(exports, "Status", { enumerable: true, get: function () { return status_1.Status; } });
|
|
13
13
|
var offline_1 = require("./offline");
|
|
14
14
|
Object.defineProperty(exports, "OfflineDisabled", { enumerable: true, get: function () { return offline_1.OfflineDisabled; } });
|
|
15
|
-
var
|
|
16
|
-
Object.defineProperty(exports, "DEFAULT_CSS_SELECTOR_ALLOWLIST", { enumerable: true, get: function () { return
|
|
17
|
-
Object.defineProperty(exports, "DEFAULT_DATA_ATTRIBUTE_PREFIX", { enumerable: true, get: function () { return
|
|
15
|
+
var element_interactions_1 = require("./element-interactions");
|
|
16
|
+
Object.defineProperty(exports, "DEFAULT_CSS_SELECTOR_ALLOWLIST", { enumerable: true, get: function () { return element_interactions_1.DEFAULT_CSS_SELECTOR_ALLOWLIST; } });
|
|
17
|
+
Object.defineProperty(exports, "DEFAULT_DATA_ATTRIBUTE_PREFIX", { enumerable: true, get: function () { return element_interactions_1.DEFAULT_DATA_ATTRIBUTE_PREFIX; } });
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAkCA,iCAciB;AATf,yGAAA,gBAAgB,OAAA;AAChB,0GAAA,iBAAiB,OAAA;AAMjB,wGAAA,eAAe,OAAA;AAKjB,mCAAqE;AAApD,kGAAA,QAAQ,OAAA;AAQzB,6CAA2D;AAAlD,yGAAA,UAAU,OAAA;AACnB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AAMf,qCAA4C;AAAnC,0GAAA,eAAe,OAAA;AACxB
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAkCA,iCAciB;AATf,yGAAA,gBAAgB,OAAA;AAChB,0GAAA,iBAAiB,OAAA;AAMjB,wGAAA,eAAe,OAAA;AAKjB,mCAAqE;AAApD,kGAAA,QAAQ,OAAA;AAQzB,6CAA2D;AAAlD,yGAAA,UAAU,OAAA;AACnB,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AAMf,qCAA4C;AAAnC,0GAAA,eAAe,OAAA;AACxB,+DAMgC;AAF9B,sIAAA,8BAA8B,OAAA;AAC9B,qIAAA,6BAA6B,OAAA","sourcesContent":["export { AmplitudeReturn } from './amplitude-promise';\nexport { BaseEvent, EventOptions } from './base-event';\nexport {\n Campaign,\n CampaignParser,\n CampaignTracker,\n CampaignTrackerOptions,\n CampaignTrackFunction,\n ClickIdParameters,\n ReferrerParameters,\n UTMParameters,\n} from './campaign';\nexport { BrowserClient, ReactNativeClient, NodeClient } from './client';\nexport {\n AttributionOptions,\n AutocaptureOptions,\n BrowserConfig,\n BrowserOptions,\n Config,\n DefaultTrackingOptions,\n Options,\n NodeConfig,\n NodeOptions,\n ReactNativeConfig,\n ReactNativeOptions,\n ReactNativeTrackingOptions,\n TrackingOptions,\n RequestMetadata,\n HistogramOptions,\n HistogramKey,\n BrowserRemoteConfig,\n} from './config';\nexport { CoreClient } from './client/core-client';\nexport { DestinationContext } from './destination-context';\nexport {\n Event,\n TrackEvent,\n IdentifyEvent,\n GroupIdentifyEvent,\n SpecialEventType,\n IdentifyOperation,\n IdentifyUserProperties,\n ValidPropertyType,\n Identify,\n Revenue,\n RevenueEvent,\n RevenueProperty,\n RevenueEventProperties,\n} from './event';\nexport { EventCallback } from './event-callback';\nexport { EventBridge, EventBridgeChannel, EventBridgeContainer, EventBridgeReceiver } from './event-bridge';\nexport { Logger, LogLevel, LogConfig, DebugContext } from './logger';\nexport { Payload } from './payload';\nexport { Plan } from './plan';\nexport { IngestionMetadata } from './ingestion-metadata';\nexport { Plugin, BeforePlugin, EnrichmentPlugin, DestinationPlugin, PluginType } from './plugin';\nexport { Result } from './result';\nexport { Response, SuccessResponse, InvalidResponse, PayloadTooLargeResponse, RateLimitResponse } from './response';\nexport { QueueProxy, InstanceProxy } from './proxy';\nexport { ServerZone, ServerZoneType } from './server-zone';\nexport { Status } from './status';\nexport { CookieStorageOptions, IdentityStorageType, Storage } from './storage';\nexport { Transport, TransportType } from './transport';\nexport { UserSession } from './user-session';\nexport { UTMData } from './utm';\nexport { PageTrackingOptions, PageTrackingTrackOn, PageTrackingHistoryChanges } from './page-view-tracking';\nexport { OfflineDisabled } from './offline';\nexport {\n Messenger,\n ElementInteractionsOptions,\n ActionType,\n DEFAULT_CSS_SELECTOR_ALLOWLIST,\n DEFAULT_DATA_ATTRIBUTE_PREFIX,\n} from './element-interactions';\n"]}
|
|
@@ -3,7 +3,7 @@ import { IdentityStorageType, Storage } from '../storage';
|
|
|
3
3
|
import { Transport } from '../transport';
|
|
4
4
|
import { Config } from './core';
|
|
5
5
|
import { PageTrackingOptions } from '../page-view-tracking';
|
|
6
|
-
import {
|
|
6
|
+
import { ElementInteractionsOptions } from '../element-interactions';
|
|
7
7
|
export interface BrowserConfig extends ExternalBrowserConfig, InternalBrowserConfig {
|
|
8
8
|
}
|
|
9
9
|
export interface ExternalBrowserConfig extends Config {
|
|
@@ -146,7 +146,7 @@ export interface AutocaptureOptions {
|
|
|
146
146
|
* Enables/disables user interactions tracking.
|
|
147
147
|
* @defaultValue `false`
|
|
148
148
|
*/
|
|
149
|
-
|
|
149
|
+
elementInteractions?: boolean | ElementInteractionsOptions;
|
|
150
150
|
}
|
|
151
151
|
export interface TrackingOptions {
|
|
152
152
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/config/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../src/config/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,WAAW,aAAc,SAAQ,qBAAqB,EAAE,qBAAqB;CAAG;AAEtF,MAAM,WAAW,qBAAsB,SAAQ,MAAM;IACnD;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;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AG;IAChC,UAAU,EAAE;QACV,WAAW,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC;KAC5C,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../../src/config/browser.ts"],"names":[],"mappings":"","sourcesContent":["import { UserSession } from '../user-session';\nimport { IdentityStorageType, Storage } from '../storage';\nimport { Transport } from '../transport';\nimport { Config } from './core';\nimport { PageTrackingOptions } from '../page-view-tracking';\nimport {
|
|
1
|
+
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../../../src/config/browser.ts"],"names":[],"mappings":"","sourcesContent":["import { UserSession } from '../user-session';\nimport { IdentityStorageType, Storage } from '../storage';\nimport { Transport } from '../transport';\nimport { Config } from './core';\nimport { PageTrackingOptions } from '../page-view-tracking';\nimport { ElementInteractionsOptions } from '../element-interactions';\n\nexport interface BrowserConfig extends ExternalBrowserConfig, InternalBrowserConfig {}\n\nexport interface ExternalBrowserConfig extends Config {\n /**\n * An app version for events tracked. This can be the version of your application.\n * @defaultValue `undefined`\n */\n appVersion?: string;\n /**\n * @deprecated This property is deprecated and will be removed in future versions. Please migrate to using `autocapture` instead.\n * The default event tracking configuration.\n * See {@link https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events}.\n * @defaultValue `true`\n */\n defaultTracking?: boolean | DefaultTrackingOptions;\n /**\n * The configurations for auto-captured events.\n * See {@link https://www.docs.developers.amplitude.com/data/sdks/browser-2/autocapture/}.\n */\n autocapture?: boolean | AutocaptureOptions;\n /**\n * The identifier for the device running your application.\n * @defaultValue `UUID()`\n */\n deviceId?: string;\n /**\n * Configuration for cookie.\n */\n cookieOptions?: CookieOptions;\n /**\n * The storage for user identify.\n * @defaultValue `\"cookie\"`\n */\n identityStorage?: IdentityStorageType;\n /**\n * The partner identifier.\n * Amplitude requires the customer who built an event ingestion integration to add the partner identifier to partner_id.\n * @defaultValue `undefined`\n */\n partnerId?: string;\n /**\n * The custom Session ID for the current session.\n * @defaultValue `timestamp`\n */\n sessionId?: number;\n /**\n * The period of inactivity from the last tracked event before a session expires in milliseconds.\n * @defaultValue `1,800,000` (30 minutes)\n */\n sessionTimeout: number;\n /**\n * The configurations for tracking additional properties.\n * See {@link https://www.docs.developers.amplitude.com/data/sdks/browser-2/#optional-tracking}.\n */\n trackingOptions: TrackingOptions;\n /**\n * Network transport mechanism used to send events.\n * @defaultValue `\"fetch\"`\n */\n transport?: 'fetch' | 'xhr' | 'beacon';\n /**\n * The identifier for the user being tracked.\n * @defaultValue `undefined`\n */\n userId?: string;\n /**\n * User's Nth instance of performing a default Page Viewed event within a session.\n * Used for landing page analysis.\n */\n pageCounter?: number;\n /**\n * Whether to fetch remote configuration.\n * @defaultValue `false`\n */\n fetchRemoteConfig?: boolean;\n}\n\ninterface InternalBrowserConfig {\n cookieStorage: Storage<UserSession>;\n lastEventTime?: number;\n lastEventId?: number;\n transportProvider: Transport;\n}\n\n/**\n * @deprecated This interface is deprecated and will be removed in future versions. Please migrate to using `AutocaptureOptions` instead.\n */\nexport interface DefaultTrackingOptions {\n /**\n * Enables/disables marketing attribution tracking or config with detailed attribution options.\n * @defaultValue `true`\n */\n attribution?: boolean | AttributionOptions;\n /**\n * Enables/disables form downloads tracking.\n * @defaultValue `true`\n */\n fileDownloads?: boolean;\n /**\n * Enables/disables form interaction tracking.\n * @defaultValue `true`\n */\n formInteractions?: boolean;\n /**\n * Enables/disables default page view tracking.\n * @defaultValue `true`\n */\n pageViews?: boolean | PageTrackingOptions;\n /**\n * Enables/disables session tracking.\n * @defaultValue `true`\n */\n sessions?: boolean;\n}\n\nexport interface AutocaptureOptions {\n /**\n * Enables/disables marketing attribution tracking or config with detailed attribution options.\n * @defaultValue `true`\n */\n attribution?: boolean | AttributionOptions;\n /**\n * Enables/disables form downloads tracking.\n * @defaultValue `true`\n */\n fileDownloads?: boolean;\n /**\n * Enables/disables form interaction tracking.\n * @defaultValue `true`\n */\n formInteractions?: boolean;\n /**\n * Enables/disables default page view tracking.\n * @defaultValue `true`\n */\n pageViews?: boolean | PageTrackingOptions;\n /**\n * Enables/disables session tracking.\n * @defaultValue `true`\n */\n sessions?: boolean;\n /**\n * Enables/disables user interactions tracking.\n * @defaultValue `false`\n */\n elementInteractions?: boolean | ElementInteractionsOptions;\n}\n\nexport interface TrackingOptions {\n /**\n * Enables/disables ip address tracking.\n * @defaultValue `true`\n */\n ipAddress?: boolean;\n /**\n * Enables/disables language tracking.\n * @defaultValue `true`\n */\n language?: boolean;\n /**\n * Enables/disables plantform tracking.\n * @defaultValue `true`\n */\n platform?: boolean;\n}\n\nexport interface AttributionOptions {\n /**\n * The rules to determine which referrers are excluded from being tracked as traffic source.\n * @defaultValue `[/your-domain\\.com$/]`\n */\n excludeReferrers?: (string | RegExp)[];\n /**\n * The value to represent undefined/no initial campaign parameter for first-touch attribution.\n * @defaultValue `\"EMPTY\"`\n */\n initialEmptyValue?: string;\n /**\n * The flag of if Amplitude to start a new session if any campaign parameter changes.\n * @defaultValue `false`\n */\n resetSessionOnNewCampaign?: boolean;\n}\n\nexport interface CookieOptions {\n /**\n * The domain property of cookies created.\n * @defaultValue `Your top level domain`\n */\n domain?: string;\n /**\n * The expiration of cookies created in days.\n * @defaultValue `365`\n */\n expiration?: number;\n /**\n * How cookies are sent with cross-site requests.\n * @defaultValue `\"Lax\"`\n */\n sameSite?: 'Strict' | 'Lax' | 'None';\n /**\n * The flag of if send cookies over secure protocols.\n * @defaultValue `false`\n */\n secure?: boolean;\n /**\n * The flag of if upgrade the cookies created by maintenance Browser SDK.\n * @defaultValue `true`\n */\n upgrade?: boolean;\n}\n\ntype HiddenOptions = 'apiKey' | 'transportProvider' | 'requestMetadata';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface BrowserOptions extends Omit<Partial<ExternalBrowserConfig>, HiddenOptions> {}\n\nexport type BrowserRemoteConfig = {\n browserSDK: {\n autocapture?: AutocaptureOptions | boolean;\n };\n};\n"]}
|
|
@@ -14,7 +14,7 @@ export declare const DEFAULT_CSS_SELECTOR_ALLOWLIST: string[];
|
|
|
14
14
|
* Default prefix to allo the plugin to capture data attributes as an event property.
|
|
15
15
|
*/
|
|
16
16
|
export declare const DEFAULT_DATA_ATTRIBUTE_PREFIX = "data-amp-track-";
|
|
17
|
-
export interface
|
|
17
|
+
export interface ElementInteractionsOptions {
|
|
18
18
|
/**
|
|
19
19
|
* List of CSS selectors to allow auto tracking on.
|
|
20
20
|
* When provided, allow elements matching any selector to be tracked.
|
|
@@ -58,4 +58,4 @@ interface Element {
|
|
|
58
58
|
className: string;
|
|
59
59
|
}
|
|
60
60
|
export {};
|
|
61
|
-
//# sourceMappingURL=
|
|
61
|
+
//# sourceMappingURL=element-interactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-interactions.d.ts","sourceRoot":"","sources":["../../src/element-interactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5C;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,UAS1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,oBAAoB,CAAC;AAE/D,MAAM,WAAW,0BAA0B;IACzC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAEvC;;;;;;;OAOG;IACH,wBAAwB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;IAEjF;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,oBAAoB,CAAC,EAAE;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;CACH;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -21,4 +21,4 @@ export var DEFAULT_CSS_SELECTOR_ALLOWLIST = [
|
|
|
21
21
|
* Default prefix to allo the plugin to capture data attributes as an event property.
|
|
22
22
|
*/
|
|
23
23
|
export var DEFAULT_DATA_ATTRIBUTE_PREFIX = 'data-amp-track-';
|
|
24
|
-
//# sourceMappingURL=
|
|
24
|
+
//# sourceMappingURL=element-interactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-interactions.js","sourceRoot":"","sources":["../../src/element-interactions.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,MAAM,CAAC,IAAM,8BAA8B,GAAG;IAC5C,GAAG;IACH,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,UAAU;IACV,OAAO;IACP,0BAA0B;IAC1B,oBAAoB;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,IAAM,6BAA6B,GAAG,iBAAiB,CAAC","sourcesContent":["import { Logger } from './logger';\n\nexport type ActionType = 'click' | 'change';\n\n/**\n * Default CSS selectors to define which elements on the page to track.\n * Extend this list to include additional elements to track. For example:\n * ```\n * autocapturePlugin({\n * cssSelectorAllowlist: [...DEFAULT_CSS_SELECTOR_ALLOWLIST, \".my-class\"],\n * })\n * ```\n */\nexport const DEFAULT_CSS_SELECTOR_ALLOWLIST = [\n 'a',\n 'button',\n 'input',\n 'select',\n 'textarea',\n 'label',\n '[data-amp-default-track]',\n '.amp-default-track',\n];\n\n/**\n * Default prefix to allo the plugin to capture data attributes as an event property.\n */\nexport const DEFAULT_DATA_ATTRIBUTE_PREFIX = 'data-amp-track-';\n\nexport interface ElementInteractionsOptions {\n /**\n * List of CSS selectors to allow auto tracking on.\n * When provided, allow elements matching any selector to be tracked.\n * Default is ['a', 'button', 'input', 'select', 'textarea', 'label', '[data-amp-default-track]', '.amp-default-track'].\n */\n cssSelectorAllowlist?: string[];\n\n /**\n * List of page URLs to allow auto tracking on.\n * When provided, only allow tracking on these URLs.\n * Both full URLs and regex are supported.\n */\n pageUrlAllowlist?: (string | RegExp)[];\n\n /**\n * Function to determine whether an event should be tracked.\n * When provided, this function overwrites all other allowlists and configurations.\n * If the function returns true, the event will be tracked.\n * If the function returns false, the event will not be tracked.\n * @param actionType - The type of action that triggered the event.\n * @param element - The [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) that triggered the event.\n */\n shouldTrackEventResolver?: (actionType: ActionType, element: Element) => boolean;\n\n /**\n * Prefix for data attributes to allow auto collecting.\n * Default is 'data-amp-track-'.\n */\n dataAttributePrefix?: string;\n\n /**\n * Options for integrating visual tagging selector.\n */\n visualTaggingOptions?: {\n enabled?: boolean;\n messenger?: Messenger;\n };\n}\n\nexport interface Messenger {\n logger?: Logger;\n setup: () => void;\n}\n\ninterface Element {\n id: string;\n className: string;\n}\n"]}
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -24,5 +24,5 @@ export { UserSession } from './user-session';
|
|
|
24
24
|
export { UTMData } from './utm';
|
|
25
25
|
export { PageTrackingOptions, PageTrackingTrackOn, PageTrackingHistoryChanges } from './page-view-tracking';
|
|
26
26
|
export { OfflineDisabled } from './offline';
|
|
27
|
-
export { Messenger,
|
|
27
|
+
export { Messenger, ElementInteractionsOptions, ActionType, DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, } from './element-interactions';
|
|
28
28
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,E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AM,SAAS,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EACL,SAAS,EACT,0BAA0B,EAC1B,UAAU,EACV,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC"}
|
package/lib/esm/index.js
CHANGED
|
@@ -3,5 +3,5 @@ export { LogLevel } from './logger';
|
|
|
3
3
|
export { ServerZone } from './server-zone';
|
|
4
4
|
export { Status } from './status';
|
|
5
5
|
export { OfflineDisabled } from './offline';
|
|
6
|
-
export { DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, } from './
|
|
6
|
+
export { DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, } from './element-interactions';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkCA,OAAO,EAKL,gBAAgB,EAChB,iBAAiB,EAMjB,eAAe,GAEhB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAU,QAAQ,EAA2B,MAAM,UAAU,CAAC;AAQrE,OAAO,EAAE,UAAU,EAAkB,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMlC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAIL,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAkCA,OAAO,EAKL,gBAAgB,EAChB,iBAAiB,EAMjB,eAAe,GAEhB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAU,QAAQ,EAA2B,MAAM,UAAU,CAAC;AAQrE,OAAO,EAAE,UAAU,EAAkB,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAMlC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAIL,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC","sourcesContent":["export { AmplitudeReturn } from './amplitude-promise';\nexport { BaseEvent, EventOptions } from './base-event';\nexport {\n Campaign,\n CampaignParser,\n CampaignTracker,\n CampaignTrackerOptions,\n CampaignTrackFunction,\n ClickIdParameters,\n ReferrerParameters,\n UTMParameters,\n} from './campaign';\nexport { BrowserClient, ReactNativeClient, NodeClient } from './client';\nexport {\n AttributionOptions,\n AutocaptureOptions,\n BrowserConfig,\n BrowserOptions,\n Config,\n DefaultTrackingOptions,\n Options,\n NodeConfig,\n NodeOptions,\n ReactNativeConfig,\n ReactNativeOptions,\n ReactNativeTrackingOptions,\n TrackingOptions,\n RequestMetadata,\n HistogramOptions,\n HistogramKey,\n BrowserRemoteConfig,\n} from './config';\nexport { CoreClient } from './client/core-client';\nexport { DestinationContext } from './destination-context';\nexport {\n Event,\n TrackEvent,\n IdentifyEvent,\n GroupIdentifyEvent,\n SpecialEventType,\n IdentifyOperation,\n IdentifyUserProperties,\n ValidPropertyType,\n Identify,\n Revenue,\n RevenueEvent,\n RevenueProperty,\n RevenueEventProperties,\n} from './event';\nexport { EventCallback } from './event-callback';\nexport { EventBridge, EventBridgeChannel, EventBridgeContainer, EventBridgeReceiver } from './event-bridge';\nexport { Logger, LogLevel, LogConfig, DebugContext } from './logger';\nexport { Payload } from './payload';\nexport { Plan } from './plan';\nexport { IngestionMetadata } from './ingestion-metadata';\nexport { Plugin, BeforePlugin, EnrichmentPlugin, DestinationPlugin, PluginType } from './plugin';\nexport { Result } from './result';\nexport { Response, SuccessResponse, InvalidResponse, PayloadTooLargeResponse, RateLimitResponse } from './response';\nexport { QueueProxy, InstanceProxy } from './proxy';\nexport { ServerZone, ServerZoneType } from './server-zone';\nexport { Status } from './status';\nexport { CookieStorageOptions, IdentityStorageType, Storage } from './storage';\nexport { Transport, TransportType } from './transport';\nexport { UserSession } from './user-session';\nexport { UTMData } from './utm';\nexport { PageTrackingOptions, PageTrackingTrackOn, PageTrackingHistoryChanges } from './page-view-tracking';\nexport { OfflineDisabled } from './offline';\nexport {\n Messenger,\n ElementInteractionsOptions,\n ActionType,\n DEFAULT_CSS_SELECTOR_ALLOWLIST,\n DEFAULT_DATA_ATTRIBUTE_PREFIX,\n} from './element-interactions';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/analytics-types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0-featureremoteconfig.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Amplitude Inc",
|
|
6
6
|
"homepage": "https://github.com/amplitude/Amplitude-TypeScript",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"files": [
|
|
36
36
|
"lib"
|
|
37
37
|
],
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "bb0d8e6aadf87baa76ba5b1c3a7268d13d1d2978"
|
|
39
39
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"userInteractions.d.ts","sourceRoot":"","sources":["../../src/userInteractions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5C;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,UAS1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,oBAAoB,CAAC;AAE/D,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAEvC;;;;;;;OAOG;IACH,wBAAwB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;IAEjF;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,oBAAoB,CAAC,EAAE;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;CACH;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"userInteractions.js","sourceRoot":"","sources":["../../src/userInteractions.ts"],"names":[],"mappings":";;AAIA;;;;;;;;GAQG;AACU,QAAA,8BAA8B,GAAG;IAC5C,GAAG;IACH,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,UAAU;IACV,OAAO;IACP,0BAA0B;IAC1B,oBAAoB;CACrB,CAAC;AAEF;;GAEG;AACU,QAAA,6BAA6B,GAAG,iBAAiB,CAAC","sourcesContent":["import { Logger } from './logger';\n\nexport type ActionType = 'click' | 'change';\n\n/**\n * Default CSS selectors to define which elements on the page to track.\n * Extend this list to include additional elements to track. For example:\n * ```\n * autocapturePlugin({\n * cssSelectorAllowlist: [...DEFAULT_CSS_SELECTOR_ALLOWLIST, \".my-class\"],\n * })\n * ```\n */\nexport const DEFAULT_CSS_SELECTOR_ALLOWLIST = [\n 'a',\n 'button',\n 'input',\n 'select',\n 'textarea',\n 'label',\n '[data-amp-default-track]',\n '.amp-default-track',\n];\n\n/**\n * Default prefix to allo the plugin to capture data attributes as an event property.\n */\nexport const DEFAULT_DATA_ATTRIBUTE_PREFIX = 'data-amp-track-';\n\nexport interface UserInteractionsOptions {\n /**\n * List of CSS selectors to allow auto tracking on.\n * When provided, allow elements matching any selector to be tracked.\n * Default is ['a', 'button', 'input', 'select', 'textarea', 'label', '[data-amp-default-track]', '.amp-default-track'].\n */\n cssSelectorAllowlist?: string[];\n\n /**\n * List of page URLs to allow auto tracking on.\n * When provided, only allow tracking on these URLs.\n * Both full URLs and regex are supported.\n */\n pageUrlAllowlist?: (string | RegExp)[];\n\n /**\n * Function to determine whether an event should be tracked.\n * When provided, this function overwrites all other allowlists and configurations.\n * If the function returns true, the event will be tracked.\n * If the function returns false, the event will not be tracked.\n * @param actionType - The type of action that triggered the event.\n * @param element - The [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) that triggered the event.\n */\n shouldTrackEventResolver?: (actionType: ActionType, element: Element) => boolean;\n\n /**\n * Prefix for data attributes to allow auto collecting.\n * Default is 'data-amp-track-'.\n */\n dataAttributePrefix?: string;\n\n /**\n * Options for integrating visual tagging selector.\n */\n visualTaggingOptions?: {\n enabled?: boolean;\n messenger?: Messenger;\n };\n}\n\nexport interface Messenger {\n logger?: Logger;\n setup: () => void;\n}\n\ninterface Element {\n id: string;\n className: string;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"userInteractions.d.ts","sourceRoot":"","sources":["../../src/userInteractions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5C;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,UAS1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,oBAAoB,CAAC;AAE/D,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAEvC;;;;;;;OAOG;IACH,wBAAwB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;IAEjF;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,oBAAoB,CAAC,EAAE;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;CACH;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"userInteractions.js","sourceRoot":"","sources":["../../src/userInteractions.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,MAAM,CAAC,IAAM,8BAA8B,GAAG;IAC5C,GAAG;IACH,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,UAAU;IACV,OAAO;IACP,0BAA0B;IAC1B,oBAAoB;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,IAAM,6BAA6B,GAAG,iBAAiB,CAAC","sourcesContent":["import { Logger } from './logger';\n\nexport type ActionType = 'click' | 'change';\n\n/**\n * Default CSS selectors to define which elements on the page to track.\n * Extend this list to include additional elements to track. For example:\n * ```\n * autocapturePlugin({\n * cssSelectorAllowlist: [...DEFAULT_CSS_SELECTOR_ALLOWLIST, \".my-class\"],\n * })\n * ```\n */\nexport const DEFAULT_CSS_SELECTOR_ALLOWLIST = [\n 'a',\n 'button',\n 'input',\n 'select',\n 'textarea',\n 'label',\n '[data-amp-default-track]',\n '.amp-default-track',\n];\n\n/**\n * Default prefix to allo the plugin to capture data attributes as an event property.\n */\nexport const DEFAULT_DATA_ATTRIBUTE_PREFIX = 'data-amp-track-';\n\nexport interface UserInteractionsOptions {\n /**\n * List of CSS selectors to allow auto tracking on.\n * When provided, allow elements matching any selector to be tracked.\n * Default is ['a', 'button', 'input', 'select', 'textarea', 'label', '[data-amp-default-track]', '.amp-default-track'].\n */\n cssSelectorAllowlist?: string[];\n\n /**\n * List of page URLs to allow auto tracking on.\n * When provided, only allow tracking on these URLs.\n * Both full URLs and regex are supported.\n */\n pageUrlAllowlist?: (string | RegExp)[];\n\n /**\n * Function to determine whether an event should be tracked.\n * When provided, this function overwrites all other allowlists and configurations.\n * If the function returns true, the event will be tracked.\n * If the function returns false, the event will not be tracked.\n * @param actionType - The type of action that triggered the event.\n * @param element - The [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) that triggered the event.\n */\n shouldTrackEventResolver?: (actionType: ActionType, element: Element) => boolean;\n\n /**\n * Prefix for data attributes to allow auto collecting.\n * Default is 'data-amp-track-'.\n */\n dataAttributePrefix?: string;\n\n /**\n * Options for integrating visual tagging selector.\n */\n visualTaggingOptions?: {\n enabled?: boolean;\n messenger?: Messenger;\n };\n}\n\nexport interface Messenger {\n logger?: Logger;\n setup: () => void;\n}\n\ninterface Element {\n id: string;\n className: string;\n}\n"]}
|