@amplitude/analytics-core 2.13.0 → 2.14.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/index.d.ts +1 -0
- package/lib/cjs/index.d.ts.map +1 -1
- package/lib/cjs/index.js +7 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/types/frustration-interactions.d.ts +87 -0
- package/lib/cjs/types/frustration-interactions.d.ts.map +1 -0
- package/lib/cjs/types/frustration-interactions.js +44 -0
- package/lib/cjs/types/frustration-interactions.js.map +1 -0
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/types/frustration-interactions.d.ts +87 -0
- package/lib/esm/types/frustration-interactions.d.ts.map +1 -0
- package/lib/esm/types/frustration-interactions.js +41 -0
- package/lib/esm/types/frustration-interactions.js.map +1 -0
- package/package.json +2 -2
package/lib/cjs/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export { UserSession } from './types/user-session';
|
|
|
36
36
|
export { Plugin, BeforePlugin, DestinationPlugin, EnrichmentPlugin, PluginType } from './types/plugin';
|
|
37
37
|
export { Result } from './types/result';
|
|
38
38
|
export { ElementInteractionsOptions, Messenger, ActionType, DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, DEFAULT_ACTION_CLICK_ALLOWLIST, } from './types/element-interactions';
|
|
39
|
+
export { FrustrationInteractionsOptions, DEFAULT_DEAD_CLICK_ALLOWLIST, DEFAULT_RAGE_CLICK_ALLOWLIST, DEFAULT_RAGE_CLICK_THRESHOLD, DEFAULT_RAGE_CLICK_WINDOW_MS, DEFAULT_DEAD_CLICK_WINDOW_MS, } from './types/frustration-interactions';
|
|
39
40
|
export { PageTrackingOptions, PageTrackingTrackOn, PageTrackingHistoryChanges } from './types/page-view-tracking';
|
|
40
41
|
export { Status } from './types/status';
|
|
41
42
|
export { BrowserConfig, BrowserOptions, DefaultTrackingOptions, TrackingOptions, AutocaptureOptions, CookieOptions, AttributionOptions, } from './types/browser-config';
|
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,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,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1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NetworkRequestEvent = exports.networkObserver = exports.NetworkEventCallback = exports.Status = exports.DEFAULT_ACTION_CLICK_ALLOWLIST = exports.DEFAULT_DATA_ATTRIBUTE_PREFIX = exports.DEFAULT_CSS_SELECTOR_ALLOWLIST = exports.OfflineDisabled = exports.ServerZone = exports.SpecialEventType = exports.IdentifyOperation = exports.STORAGE_PREFIX = exports.AMPLITUDE_PREFIX = exports.LogLevel = exports.FetchTransport = exports.BaseTransport = exports.getStorageKey = exports.CookieStorage = exports.MemoryStorage = exports.createIdentifyEvent = exports.UUID = exports.getClientStates = exports.getClientLogConfig = exports.debugWrapper = exports.returnWrapper = exports.getQueryParams = exports.getLanguage = exports.getOldCookieName = exports.getCookieName = exports.isNewSession = exports.setConnectorUserId = exports.setConnectorDeviceId = exports.getAnalyticsConnector = exports.getGlobalScope = exports.Logger = exports.RequestMetadata = exports.Config = exports.IdentityEventSender = exports.Destination = exports.RevenueProperty = exports.Revenue = exports.Identify = exports.AmplitudeCore = void 0;
|
|
3
|
+
exports.NetworkRequestEvent = exports.networkObserver = exports.NetworkEventCallback = exports.Status = exports.DEFAULT_DEAD_CLICK_WINDOW_MS = exports.DEFAULT_RAGE_CLICK_WINDOW_MS = exports.DEFAULT_RAGE_CLICK_THRESHOLD = exports.DEFAULT_RAGE_CLICK_ALLOWLIST = exports.DEFAULT_DEAD_CLICK_ALLOWLIST = exports.DEFAULT_ACTION_CLICK_ALLOWLIST = exports.DEFAULT_DATA_ATTRIBUTE_PREFIX = exports.DEFAULT_CSS_SELECTOR_ALLOWLIST = exports.OfflineDisabled = exports.ServerZone = exports.SpecialEventType = exports.IdentifyOperation = exports.STORAGE_PREFIX = exports.AMPLITUDE_PREFIX = exports.LogLevel = exports.FetchTransport = exports.BaseTransport = exports.getStorageKey = exports.CookieStorage = exports.MemoryStorage = exports.createIdentifyEvent = exports.UUID = exports.getClientStates = exports.getClientLogConfig = exports.debugWrapper = exports.returnWrapper = exports.getQueryParams = exports.getLanguage = exports.getOldCookieName = exports.getCookieName = exports.isNewSession = exports.setConnectorUserId = exports.setConnectorDeviceId = exports.getAnalyticsConnector = exports.getGlobalScope = exports.Logger = exports.RequestMetadata = exports.Config = exports.IdentityEventSender = exports.Destination = exports.RevenueProperty = exports.Revenue = exports.Identify = exports.AmplitudeCore = void 0;
|
|
4
4
|
var core_client_1 = require("./core-client");
|
|
5
5
|
Object.defineProperty(exports, "AmplitudeCore", { enumerable: true, get: function () { return core_client_1.AmplitudeCore; } });
|
|
6
6
|
var identify_1 = require("./identify");
|
|
@@ -68,6 +68,12 @@ var element_interactions_1 = require("./types/element-interactions");
|
|
|
68
68
|
Object.defineProperty(exports, "DEFAULT_CSS_SELECTOR_ALLOWLIST", { enumerable: true, get: function () { return element_interactions_1.DEFAULT_CSS_SELECTOR_ALLOWLIST; } });
|
|
69
69
|
Object.defineProperty(exports, "DEFAULT_DATA_ATTRIBUTE_PREFIX", { enumerable: true, get: function () { return element_interactions_1.DEFAULT_DATA_ATTRIBUTE_PREFIX; } });
|
|
70
70
|
Object.defineProperty(exports, "DEFAULT_ACTION_CLICK_ALLOWLIST", { enumerable: true, get: function () { return element_interactions_1.DEFAULT_ACTION_CLICK_ALLOWLIST; } });
|
|
71
|
+
var frustration_interactions_1 = require("./types/frustration-interactions");
|
|
72
|
+
Object.defineProperty(exports, "DEFAULT_DEAD_CLICK_ALLOWLIST", { enumerable: true, get: function () { return frustration_interactions_1.DEFAULT_DEAD_CLICK_ALLOWLIST; } });
|
|
73
|
+
Object.defineProperty(exports, "DEFAULT_RAGE_CLICK_ALLOWLIST", { enumerable: true, get: function () { return frustration_interactions_1.DEFAULT_RAGE_CLICK_ALLOWLIST; } });
|
|
74
|
+
Object.defineProperty(exports, "DEFAULT_RAGE_CLICK_THRESHOLD", { enumerable: true, get: function () { return frustration_interactions_1.DEFAULT_RAGE_CLICK_THRESHOLD; } });
|
|
75
|
+
Object.defineProperty(exports, "DEFAULT_RAGE_CLICK_WINDOW_MS", { enumerable: true, get: function () { return frustration_interactions_1.DEFAULT_RAGE_CLICK_WINDOW_MS; } });
|
|
76
|
+
Object.defineProperty(exports, "DEFAULT_DEAD_CLICK_WINDOW_MS", { enumerable: true, get: function () { return frustration_interactions_1.DEFAULT_DEAD_CLICK_WINDOW_MS; } });
|
|
71
77
|
var status_1 = require("./types/status");
|
|
72
78
|
Object.defineProperty(exports, "Status", { enumerable: true, get: function () { return status_1.Status; } });
|
|
73
79
|
var network_observer_1 = require("./network-observer");
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAA0D;AAAjD,4GAAA,aAAa,OAAA;AACtB,uCAAiD;AAAxC,oGAAA,QAAQ,OAAA;AACjB,qCAA+D;AAAtD,kGAAA,OAAO,OAAA;AAAY,0GAAA,eAAe,OAAA;AAC3C,qDAAoD;AAA3C,0GAAA,WAAW,OAAA;AACpB,+CAAyD;AAAhD,+GAAA,mBAAmB,OAAA;AAC5B,mCAA4D;AAA1C,gGAAA,MAAM,OAAA;AAAE,yGAAA,eAAe,OAAA;AACzC,mCAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,+CAAgD;AAAvC,8GAAA,cAAc,OAAA;AACvB,6DAAwG;AAA/F,4HAAA,qBAAqB,OAAA;AAAE,2HAAA,oBAAoB,OAAA;AAAE,yHAAA,kBAAkB,OAAA;AACxE,qCAAyC;AAAhC,uGAAA,YAAY,OAAA;AACrB,6CAAgE;AAAvD,4GAAA,aAAa,OAAA;AAAE,+GAAA,gBAAgB,OAAA;AACxC,uCAAyC;AAAhC,uGAAA,WAAW,OAAA;AACpB,+CAAgD;AAAvC,8GAAA,cAAc,OAAA;AAEvB,yDAAwE;AAA/D,+GAAA,aAAa,OAAA;AACtB,uCAAkF;AAAzE,qG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,OAAA;AAYf,uDAA2E;AAAlE,wHAAA,oBAAoB,OAAA;AAAE,mHAAA,eAAe,OAAA;AAC9C,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA","sourcesContent":["export { AmplitudeCore, CoreClient } from './core-client';\nexport { Identify, IIdentify } from './identify';\nexport { Revenue, IRevenue, RevenueProperty } from './revenue';\nexport { Destination } from './plugins/destination';\nexport { IdentityEventSender } from './plugins/identity';\nexport { IConfig, Config, RequestMetadata } from './config';\nexport { Logger, ILogger, LogConfig } from './logger';\nexport { getGlobalScope } from './global-scope';\nexport { getAnalyticsConnector, setConnectorDeviceId, setConnectorUserId } from './analytics-connector';\nexport { isNewSession } from './session';\nexport { getCookieName, getOldCookieName } from './cookie-name';\nexport { getLanguage } from './language';\nexport { getQueryParams } from './query-params';\n\nexport { returnWrapper, AmplitudeReturn } from './utils/return-wrapper';\nexport { debugWrapper, getClientLogConfig, getClientStates } from './utils/debug';\nexport { UUID } from './utils/uuid';\nexport { createIdentifyEvent } from './utils/event-builder';\n\nexport { MemoryStorage } from './storage/memory';\nexport { CookieStorage } from './storage/cookie';\nexport { getStorageKey } from './storage/helpers';\n\nexport { BaseTransport } from './transports/base';\nexport { FetchTransport } from './transports/fetch';\n\nexport { LogLevel } from './types/loglevel';\nexport { AMPLITUDE_PREFIX, STORAGE_PREFIX } from './types/constants';\nexport { Storage, IdentityStorageType } from './types/storage';\nexport { Event, IdentifyOperation, SpecialEventType, IdentifyEvent, GroupIdentifyEvent } from './types/event/event';\nexport { EventOptions, BaseEvent } from './types/event/base-event';\nexport { IngestionMetadata } from './types/event/ingestion-metadata';\nexport { ServerZoneType, ServerZone } from './types/server-zone';\nexport { OfflineDisabled } from './types/offline';\nexport { Plan } from './types/event/plan';\nexport { TransportType, Transport } from './types/transport';\nexport { Payload } from './types/payload';\nexport { Response } from './types/response';\nexport { UserSession } from './types/user-session';\nexport { Plugin, BeforePlugin, DestinationPlugin, EnrichmentPlugin, PluginType } from './types/plugin';\nexport { Result } from './types/result';\nexport {\n ElementInteractionsOptions,\n Messenger,\n ActionType,\n DEFAULT_CSS_SELECTOR_ALLOWLIST,\n DEFAULT_DATA_ATTRIBUTE_PREFIX,\n DEFAULT_ACTION_CLICK_ALLOWLIST,\n} from './types/element-interactions';\nexport {\n FrustrationInteractionsOptions,\n DEFAULT_DEAD_CLICK_ALLOWLIST,\n DEFAULT_RAGE_CLICK_ALLOWLIST,\n DEFAULT_RAGE_CLICK_THRESHOLD,\n DEFAULT_RAGE_CLICK_WINDOW_MS,\n DEFAULT_DEAD_CLICK_WINDOW_MS,\n} from './types/frustration-interactions';\nexport { PageTrackingOptions, PageTrackingTrackOn, PageTrackingHistoryChanges } from './types/page-view-tracking';\nexport { Status } from './types/status';\nexport {\n BrowserConfig,\n BrowserOptions,\n DefaultTrackingOptions,\n TrackingOptions,\n AutocaptureOptions,\n CookieOptions,\n AttributionOptions,\n} from './types/browser-config';\nexport { BrowserClient } from './types/browser-client';\n\nexport { NetworkEventCallback, networkObserver } from './network-observer';\nexport { NetworkRequestEvent } from './network-request-event';\nexport { NetworkTrackingOptions, NetworkCaptureRule } from './types/network-tracking';\n"]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ActionType, Messenger } from './element-interactions';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for dead clicks tracking
|
|
4
|
+
*/
|
|
5
|
+
export interface DeadClickOptions {
|
|
6
|
+
/**
|
|
7
|
+
* CSS selectors to define which elements on the page to track for dead clicks.
|
|
8
|
+
* A dead click is a click that doesn't result in any visible change or navigation.
|
|
9
|
+
*/
|
|
10
|
+
cssSelectorAllowlist?: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Configuration options for rage clicks tracking
|
|
14
|
+
*/
|
|
15
|
+
export interface RageClickOptions {
|
|
16
|
+
/**
|
|
17
|
+
* CSS selectors to define which elements on the page to track for rage clicks.
|
|
18
|
+
* A rage click is multiple rapid clicks on the same element within a 3s time window.
|
|
19
|
+
*/
|
|
20
|
+
cssSelectorAllowlist?: string[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Configuration options for frustration interactions tracking.
|
|
24
|
+
* This includes dead clicks and rage clicks tracking.
|
|
25
|
+
*/
|
|
26
|
+
export interface FrustrationInteractionsOptions {
|
|
27
|
+
/**
|
|
28
|
+
* List of page URLs to allow auto tracking on.
|
|
29
|
+
* When provided, only allow tracking on these URLs.
|
|
30
|
+
* Both full URLs and regex are supported.
|
|
31
|
+
*/
|
|
32
|
+
pageUrlAllowlist?: (string | RegExp)[];
|
|
33
|
+
/**
|
|
34
|
+
* Function to determine whether an event should be tracked.
|
|
35
|
+
* When provided, this function overwrites all other allowlists and configurations.
|
|
36
|
+
* If the function returns true, the event will be tracked.
|
|
37
|
+
* If the function returns false, the event will not be tracked.
|
|
38
|
+
* @param actionType - The type of action that triggered the event.
|
|
39
|
+
* @param element - The [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) that triggered the event.
|
|
40
|
+
*/
|
|
41
|
+
shouldTrackEventResolver?: (actionType: ActionType, element: DomElement) => boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Prefix for data attributes to allow auto collecting.
|
|
44
|
+
* Default is 'data-amp-track-'.
|
|
45
|
+
*/
|
|
46
|
+
dataAttributePrefix?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Options for integrating visual tagging selector.
|
|
49
|
+
*/
|
|
50
|
+
visualTaggingOptions?: {
|
|
51
|
+
enabled?: boolean;
|
|
52
|
+
messenger?: Messenger;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Configuration for dead clicks tracking
|
|
56
|
+
*/
|
|
57
|
+
deadClicks?: DeadClickOptions;
|
|
58
|
+
/**
|
|
59
|
+
* Configuration for rage clicks tracking
|
|
60
|
+
*/
|
|
61
|
+
rageClicks?: RageClickOptions;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Default CSS selectors for dead clicks tracking
|
|
65
|
+
*/
|
|
66
|
+
export declare const DEFAULT_DEAD_CLICK_ALLOWLIST: string[];
|
|
67
|
+
/**
|
|
68
|
+
* Default CSS selectors for rage clicks tracking
|
|
69
|
+
*/
|
|
70
|
+
export declare const DEFAULT_RAGE_CLICK_ALLOWLIST: string[];
|
|
71
|
+
/**
|
|
72
|
+
* Default time window for dead clicks (3 seconds)
|
|
73
|
+
*/
|
|
74
|
+
export declare const DEFAULT_DEAD_CLICK_WINDOW_MS = 3000;
|
|
75
|
+
/**
|
|
76
|
+
* Default time window for rage clicks (3 seconds)
|
|
77
|
+
*/
|
|
78
|
+
export declare const DEFAULT_RAGE_CLICK_WINDOW_MS = 3000;
|
|
79
|
+
/**
|
|
80
|
+
* Default threshold for rage clicks (5 clicks)
|
|
81
|
+
*/
|
|
82
|
+
export declare const DEFAULT_RAGE_CLICK_THRESHOLD = 5;
|
|
83
|
+
type DomElement = typeof globalThis extends {
|
|
84
|
+
Element: new (...args: any) => infer T;
|
|
85
|
+
} ? T : never;
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=frustration-interactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frustration-interactions.d.ts","sourceRoot":"","sources":["../../../src/types/frustration-interactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;;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,UAAU,KAAK,OAAO,CAAC;IAEpF;;;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;IACF;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAgBD;;GAEG;AACH,eAAO,MAAM,4BAA4B,UAOxC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,UAAQ,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,4BAA4B,OAAQ,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,4BAA4B,OAAO,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAK9C,KAAK,UAAU,GAAG,OAAO,UAAU,SAAS;IAC1C,OAAO,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC,CAAC;CACxC,GACG,CAAC,GACD,KAAK,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_RAGE_CLICK_THRESHOLD = exports.DEFAULT_RAGE_CLICK_WINDOW_MS = exports.DEFAULT_DEAD_CLICK_WINDOW_MS = exports.DEFAULT_RAGE_CLICK_ALLOWLIST = exports.DEFAULT_DEAD_CLICK_ALLOWLIST = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var CLICKABLE_ELEMENT_SELECTORS = [
|
|
6
|
+
'a',
|
|
7
|
+
'button',
|
|
8
|
+
'[role="button"]',
|
|
9
|
+
'[role="link"]',
|
|
10
|
+
'[role="menuitem"]',
|
|
11
|
+
'[role="menuitemcheckbox"]',
|
|
12
|
+
'[role="menuitemradio"]',
|
|
13
|
+
'[role="option"]',
|
|
14
|
+
'[role="tab"]',
|
|
15
|
+
'[role="treeitem"]',
|
|
16
|
+
'[contenteditable="true" i]',
|
|
17
|
+
];
|
|
18
|
+
/**
|
|
19
|
+
* Default CSS selectors for dead clicks tracking
|
|
20
|
+
*/
|
|
21
|
+
exports.DEFAULT_DEAD_CLICK_ALLOWLIST = tslib_1.__spreadArray([
|
|
22
|
+
'input[type="button"]',
|
|
23
|
+
'input[type="submit"]',
|
|
24
|
+
'input[type="reset"]',
|
|
25
|
+
'input[type="image"]',
|
|
26
|
+
'input[type="file"]'
|
|
27
|
+
], tslib_1.__read(CLICKABLE_ELEMENT_SELECTORS), false);
|
|
28
|
+
/**
|
|
29
|
+
* Default CSS selectors for rage clicks tracking
|
|
30
|
+
*/
|
|
31
|
+
exports.DEFAULT_RAGE_CLICK_ALLOWLIST = ['*'];
|
|
32
|
+
/**
|
|
33
|
+
* Default time window for dead clicks (3 seconds)
|
|
34
|
+
*/
|
|
35
|
+
exports.DEFAULT_DEAD_CLICK_WINDOW_MS = 3000;
|
|
36
|
+
/**
|
|
37
|
+
* Default time window for rage clicks (3 seconds)
|
|
38
|
+
*/
|
|
39
|
+
exports.DEFAULT_RAGE_CLICK_WINDOW_MS = 3000;
|
|
40
|
+
/**
|
|
41
|
+
* Default threshold for rage clicks (5 clicks)
|
|
42
|
+
*/
|
|
43
|
+
exports.DEFAULT_RAGE_CLICK_THRESHOLD = 5;
|
|
44
|
+
//# sourceMappingURL=frustration-interactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frustration-interactions.js","sourceRoot":"","sources":["../../../src/types/frustration-interactions.ts"],"names":[],"mappings":";;;;AAsEA,IAAM,2BAA2B,GAAG;IAClC,GAAG;IACH,QAAQ;IACR,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,2BAA2B;IAC3B,wBAAwB;IACxB,iBAAiB;IACjB,cAAc;IACd,mBAAmB;IACnB,4BAA4B;CAC7B,CAAC;AAEF;;GAEG;AACU,QAAA,4BAA4B;IACvC,sBAAsB;IACtB,sBAAsB;IACtB,qBAAqB;IACrB,qBAAqB;IACrB,oBAAoB;kBACjB,2BAA2B,UAC9B;AAEF;;GAEG;AACU,QAAA,4BAA4B,GAAG,CAAC,GAAG,CAAC,CAAC;AAElD;;GAEG;AACU,QAAA,4BAA4B,GAAG,IAAK,CAAC;AAElD;;GAEG;AACU,QAAA,4BAA4B,GAAG,IAAI,CAAC;AAEjD;;GAEG;AACU,QAAA,4BAA4B,GAAG,CAAC,CAAC","sourcesContent":["import { ActionType, Messenger } from './element-interactions';\n\n/**\n * Configuration options for dead clicks tracking\n */\nexport interface DeadClickOptions {\n /**\n * CSS selectors to define which elements on the page to track for dead clicks.\n * A dead click is a click that doesn't result in any visible change or navigation.\n */\n cssSelectorAllowlist?: string[];\n}\n\n/**\n * Configuration options for rage clicks tracking\n */\nexport interface RageClickOptions {\n /**\n * CSS selectors to define which elements on the page to track for rage clicks.\n * A rage click is multiple rapid clicks on the same element within a 3s time window.\n */\n cssSelectorAllowlist?: string[];\n}\n\n/**\n * Configuration options for frustration interactions tracking.\n * This includes dead clicks and rage clicks tracking.\n */\nexport interface FrustrationInteractionsOptions {\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: DomElement) => 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 * Configuration for dead clicks tracking\n */\n deadClicks?: DeadClickOptions;\n\n /**\n * Configuration for rage clicks tracking\n */\n rageClicks?: RageClickOptions;\n}\n\nconst CLICKABLE_ELEMENT_SELECTORS = [\n 'a',\n 'button',\n '[role=\"button\"]',\n '[role=\"link\"]',\n '[role=\"menuitem\"]',\n '[role=\"menuitemcheckbox\"]',\n '[role=\"menuitemradio\"]',\n '[role=\"option\"]',\n '[role=\"tab\"]',\n '[role=\"treeitem\"]',\n '[contenteditable=\"true\" i]',\n];\n\n/**\n * Default CSS selectors for dead clicks tracking\n */\nexport const DEFAULT_DEAD_CLICK_ALLOWLIST = [\n 'input[type=\"button\"]',\n 'input[type=\"submit\"]',\n 'input[type=\"reset\"]',\n 'input[type=\"image\"]',\n 'input[type=\"file\"]',\n ...CLICKABLE_ELEMENT_SELECTORS,\n];\n\n/**\n * Default CSS selectors for rage clicks tracking\n */\nexport const DEFAULT_RAGE_CLICK_ALLOWLIST = ['*'];\n\n/**\n * Default time window for dead clicks (3 seconds)\n */\nexport const DEFAULT_DEAD_CLICK_WINDOW_MS = 3_000;\n\n/**\n * Default time window for rage clicks (3 seconds)\n */\nexport const DEFAULT_RAGE_CLICK_WINDOW_MS = 3000;\n\n/**\n * Default threshold for rage clicks (5 clicks)\n */\nexport const DEFAULT_RAGE_CLICK_THRESHOLD = 5;\n\n// DomElement is [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) if the dom library is included in tsconfig.json\n// and never if it is not included\n// eslint-disable-next-line no-restricted-globals\ntype DomElement = typeof globalThis extends {\n Element: new (...args: any) => infer T;\n}\n ? T\n : never;\n"]}
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export { UserSession } from './types/user-session';
|
|
|
36
36
|
export { Plugin, BeforePlugin, DestinationPlugin, EnrichmentPlugin, PluginType } from './types/plugin';
|
|
37
37
|
export { Result } from './types/result';
|
|
38
38
|
export { ElementInteractionsOptions, Messenger, ActionType, DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, DEFAULT_ACTION_CLICK_ALLOWLIST, } from './types/element-interactions';
|
|
39
|
+
export { FrustrationInteractionsOptions, DEFAULT_DEAD_CLICK_ALLOWLIST, DEFAULT_RAGE_CLICK_ALLOWLIST, DEFAULT_RAGE_CLICK_THRESHOLD, DEFAULT_RAGE_CLICK_WINDOW_MS, DEFAULT_DEAD_CLICK_WINDOW_MS, } from './types/frustration-interactions';
|
|
39
40
|
export { PageTrackingOptions, PageTrackingTrackOn, PageTrackingHistoryChanges } from './types/page-view-tracking';
|
|
40
41
|
export { Status } from './types/status';
|
|
41
42
|
export { BrowserConfig, BrowserOptions, DefaultTrackingOptions, TrackingOptions, AutocaptureOptions, CookieOptions, AttributionOptions, } from './types/browser-config';
|
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,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,kBA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AAC;AAClH,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EACL,aAAa,EACb,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/lib/esm/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export { IdentifyOperation, SpecialEventType } from './types/event/event';
|
|
|
26
26
|
export { ServerZone } from './types/server-zone';
|
|
27
27
|
export { OfflineDisabled } from './types/offline';
|
|
28
28
|
export { DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, DEFAULT_ACTION_CLICK_ALLOWLIST, } from './types/element-interactions';
|
|
29
|
+
export { DEFAULT_DEAD_CLICK_ALLOWLIST, DEFAULT_RAGE_CLICK_ALLOWLIST, DEFAULT_RAGE_CLICK_THRESHOLD, DEFAULT_RAGE_CLICK_WINDOW_MS, DEFAULT_DEAD_CLICK_WINDOW_MS, } from './types/frustration-interactions';
|
|
29
30
|
export { Status } from './types/status';
|
|
30
31
|
export { NetworkEventCallback, networkObserver } from './network-observer';
|
|
31
32
|
export { NetworkRequestEvent } from './network-request-event';
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAc,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAa,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,EA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C;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,EAAS,iBAAiB,EAAE,gBAAgB,EAAqC,MAAM,qBAAqB,CAAC;AAGpH,OAAO,EAAkB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAQlD,OAAO,EAIL,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAYxC,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export { AmplitudeCore, CoreClient } from './core-client';\nexport { Identify, IIdentify } from './identify';\nexport { Revenue, IRevenue, RevenueProperty } from './revenue';\nexport { Destination } from './plugins/destination';\nexport { IdentityEventSender } from './plugins/identity';\nexport { IConfig, Config, RequestMetadata } from './config';\nexport { Logger, ILogger, LogConfig } from './logger';\nexport { getGlobalScope } from './global-scope';\nexport { getAnalyticsConnector, setConnectorDeviceId, setConnectorUserId } from './analytics-connector';\nexport { isNewSession } from './session';\nexport { getCookieName, getOldCookieName } from './cookie-name';\nexport { getLanguage } from './language';\nexport { getQueryParams } from './query-params';\n\nexport { returnWrapper, AmplitudeReturn } from './utils/return-wrapper';\nexport { debugWrapper, getClientLogConfig, getClientStates } from './utils/debug';\nexport { UUID } from './utils/uuid';\nexport { createIdentifyEvent } from './utils/event-builder';\n\nexport { MemoryStorage } from './storage/memory';\nexport { CookieStorage } from './storage/cookie';\nexport { getStorageKey } from './storage/helpers';\n\nexport { BaseTransport } from './transports/base';\nexport { FetchTransport } from './transports/fetch';\n\nexport { LogLevel } from './types/loglevel';\nexport { AMPLITUDE_PREFIX, STORAGE_PREFIX } from './types/constants';\nexport { Storage, IdentityStorageType } from './types/storage';\nexport { Event, IdentifyOperation, SpecialEventType, IdentifyEvent, GroupIdentifyEvent } from './types/event/event';\nexport { EventOptions, BaseEvent } from './types/event/base-event';\nexport { IngestionMetadata } from './types/event/ingestion-metadata';\nexport { ServerZoneType, ServerZone } from './types/server-zone';\nexport { OfflineDisabled } from './types/offline';\nexport { Plan } from './types/event/plan';\nexport { TransportType, Transport } from './types/transport';\nexport { Payload } from './types/payload';\nexport { Response } from './types/response';\nexport { UserSession } from './types/user-session';\nexport { Plugin, BeforePlugin, DestinationPlugin, EnrichmentPlugin, PluginType } from './types/plugin';\nexport { Result } from './types/result';\nexport {\n ElementInteractionsOptions,\n Messenger,\n ActionType,\n DEFAULT_CSS_SELECTOR_ALLOWLIST,\n DEFAULT_DATA_ATTRIBUTE_PREFIX,\n DEFAULT_ACTION_CLICK_ALLOWLIST,\n} from './types/element-interactions';\nexport {\n FrustrationInteractionsOptions,\n DEFAULT_DEAD_CLICK_ALLOWLIST,\n DEFAULT_RAGE_CLICK_ALLOWLIST,\n DEFAULT_RAGE_CLICK_THRESHOLD,\n DEFAULT_RAGE_CLICK_WINDOW_MS,\n DEFAULT_DEAD_CLICK_WINDOW_MS,\n} from './types/frustration-interactions';\nexport { PageTrackingOptions, PageTrackingTrackOn, PageTrackingHistoryChanges } from './types/page-view-tracking';\nexport { Status } from './types/status';\nexport {\n BrowserConfig,\n BrowserOptions,\n DefaultTrackingOptions,\n TrackingOptions,\n AutocaptureOptions,\n CookieOptions,\n AttributionOptions,\n} from './types/browser-config';\nexport { BrowserClient } from './types/browser-client';\n\nexport { NetworkEventCallback, networkObserver } from './network-observer';\nexport { NetworkRequestEvent } from './network-request-event';\nexport { NetworkTrackingOptions, NetworkCaptureRule } from './types/network-tracking';\n"]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ActionType, Messenger } from './element-interactions';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for dead clicks tracking
|
|
4
|
+
*/
|
|
5
|
+
export interface DeadClickOptions {
|
|
6
|
+
/**
|
|
7
|
+
* CSS selectors to define which elements on the page to track for dead clicks.
|
|
8
|
+
* A dead click is a click that doesn't result in any visible change or navigation.
|
|
9
|
+
*/
|
|
10
|
+
cssSelectorAllowlist?: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Configuration options for rage clicks tracking
|
|
14
|
+
*/
|
|
15
|
+
export interface RageClickOptions {
|
|
16
|
+
/**
|
|
17
|
+
* CSS selectors to define which elements on the page to track for rage clicks.
|
|
18
|
+
* A rage click is multiple rapid clicks on the same element within a 3s time window.
|
|
19
|
+
*/
|
|
20
|
+
cssSelectorAllowlist?: string[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Configuration options for frustration interactions tracking.
|
|
24
|
+
* This includes dead clicks and rage clicks tracking.
|
|
25
|
+
*/
|
|
26
|
+
export interface FrustrationInteractionsOptions {
|
|
27
|
+
/**
|
|
28
|
+
* List of page URLs to allow auto tracking on.
|
|
29
|
+
* When provided, only allow tracking on these URLs.
|
|
30
|
+
* Both full URLs and regex are supported.
|
|
31
|
+
*/
|
|
32
|
+
pageUrlAllowlist?: (string | RegExp)[];
|
|
33
|
+
/**
|
|
34
|
+
* Function to determine whether an event should be tracked.
|
|
35
|
+
* When provided, this function overwrites all other allowlists and configurations.
|
|
36
|
+
* If the function returns true, the event will be tracked.
|
|
37
|
+
* If the function returns false, the event will not be tracked.
|
|
38
|
+
* @param actionType - The type of action that triggered the event.
|
|
39
|
+
* @param element - The [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) that triggered the event.
|
|
40
|
+
*/
|
|
41
|
+
shouldTrackEventResolver?: (actionType: ActionType, element: DomElement) => boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Prefix for data attributes to allow auto collecting.
|
|
44
|
+
* Default is 'data-amp-track-'.
|
|
45
|
+
*/
|
|
46
|
+
dataAttributePrefix?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Options for integrating visual tagging selector.
|
|
49
|
+
*/
|
|
50
|
+
visualTaggingOptions?: {
|
|
51
|
+
enabled?: boolean;
|
|
52
|
+
messenger?: Messenger;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Configuration for dead clicks tracking
|
|
56
|
+
*/
|
|
57
|
+
deadClicks?: DeadClickOptions;
|
|
58
|
+
/**
|
|
59
|
+
* Configuration for rage clicks tracking
|
|
60
|
+
*/
|
|
61
|
+
rageClicks?: RageClickOptions;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Default CSS selectors for dead clicks tracking
|
|
65
|
+
*/
|
|
66
|
+
export declare const DEFAULT_DEAD_CLICK_ALLOWLIST: string[];
|
|
67
|
+
/**
|
|
68
|
+
* Default CSS selectors for rage clicks tracking
|
|
69
|
+
*/
|
|
70
|
+
export declare const DEFAULT_RAGE_CLICK_ALLOWLIST: string[];
|
|
71
|
+
/**
|
|
72
|
+
* Default time window for dead clicks (3 seconds)
|
|
73
|
+
*/
|
|
74
|
+
export declare const DEFAULT_DEAD_CLICK_WINDOW_MS = 3000;
|
|
75
|
+
/**
|
|
76
|
+
* Default time window for rage clicks (3 seconds)
|
|
77
|
+
*/
|
|
78
|
+
export declare const DEFAULT_RAGE_CLICK_WINDOW_MS = 3000;
|
|
79
|
+
/**
|
|
80
|
+
* Default threshold for rage clicks (5 clicks)
|
|
81
|
+
*/
|
|
82
|
+
export declare const DEFAULT_RAGE_CLICK_THRESHOLD = 5;
|
|
83
|
+
type DomElement = typeof globalThis extends {
|
|
84
|
+
Element: new (...args: any) => infer T;
|
|
85
|
+
} ? T : never;
|
|
86
|
+
export {};
|
|
87
|
+
//# sourceMappingURL=frustration-interactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frustration-interactions.d.ts","sourceRoot":"","sources":["../../../src/types/frustration-interactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;;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,UAAU,KAAK,OAAO,CAAC;IAEpF;;;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;IACF;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAgBD;;GAEG;AACH,eAAO,MAAM,4BAA4B,UAOxC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,UAAQ,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,4BAA4B,OAAQ,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,4BAA4B,OAAO,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAK9C,KAAK,UAAU,GAAG,OAAO,UAAU,SAAS;IAC1C,OAAO,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC,CAAC;CACxC,GACG,CAAC,GACD,KAAK,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { __read, __spreadArray } from "tslib";
|
|
2
|
+
var CLICKABLE_ELEMENT_SELECTORS = [
|
|
3
|
+
'a',
|
|
4
|
+
'button',
|
|
5
|
+
'[role="button"]',
|
|
6
|
+
'[role="link"]',
|
|
7
|
+
'[role="menuitem"]',
|
|
8
|
+
'[role="menuitemcheckbox"]',
|
|
9
|
+
'[role="menuitemradio"]',
|
|
10
|
+
'[role="option"]',
|
|
11
|
+
'[role="tab"]',
|
|
12
|
+
'[role="treeitem"]',
|
|
13
|
+
'[contenteditable="true" i]',
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* Default CSS selectors for dead clicks tracking
|
|
17
|
+
*/
|
|
18
|
+
export var DEFAULT_DEAD_CLICK_ALLOWLIST = __spreadArray([
|
|
19
|
+
'input[type="button"]',
|
|
20
|
+
'input[type="submit"]',
|
|
21
|
+
'input[type="reset"]',
|
|
22
|
+
'input[type="image"]',
|
|
23
|
+
'input[type="file"]'
|
|
24
|
+
], __read(CLICKABLE_ELEMENT_SELECTORS), false);
|
|
25
|
+
/**
|
|
26
|
+
* Default CSS selectors for rage clicks tracking
|
|
27
|
+
*/
|
|
28
|
+
export var DEFAULT_RAGE_CLICK_ALLOWLIST = ['*'];
|
|
29
|
+
/**
|
|
30
|
+
* Default time window for dead clicks (3 seconds)
|
|
31
|
+
*/
|
|
32
|
+
export var DEFAULT_DEAD_CLICK_WINDOW_MS = 3000;
|
|
33
|
+
/**
|
|
34
|
+
* Default time window for rage clicks (3 seconds)
|
|
35
|
+
*/
|
|
36
|
+
export var DEFAULT_RAGE_CLICK_WINDOW_MS = 3000;
|
|
37
|
+
/**
|
|
38
|
+
* Default threshold for rage clicks (5 clicks)
|
|
39
|
+
*/
|
|
40
|
+
export var DEFAULT_RAGE_CLICK_THRESHOLD = 5;
|
|
41
|
+
//# sourceMappingURL=frustration-interactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frustration-interactions.js","sourceRoot":"","sources":["../../../src/types/frustration-interactions.ts"],"names":[],"mappings":";AAsEA,IAAM,2BAA2B,GAAG;IAClC,GAAG;IACH,QAAQ;IACR,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,2BAA2B;IAC3B,wBAAwB;IACxB,iBAAiB;IACjB,cAAc;IACd,mBAAmB;IACnB,4BAA4B;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,IAAM,4BAA4B;IACvC,sBAAsB;IACtB,sBAAsB;IACtB,qBAAqB;IACrB,qBAAqB;IACrB,oBAAoB;UACjB,2BAA2B,SAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,IAAM,4BAA4B,GAAG,CAAC,GAAG,CAAC,CAAC;AAElD;;GAEG;AACH,MAAM,CAAC,IAAM,4BAA4B,GAAG,IAAK,CAAC;AAElD;;GAEG;AACH,MAAM,CAAC,IAAM,4BAA4B,GAAG,IAAI,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,IAAM,4BAA4B,GAAG,CAAC,CAAC","sourcesContent":["import { ActionType, Messenger } from './element-interactions';\n\n/**\n * Configuration options for dead clicks tracking\n */\nexport interface DeadClickOptions {\n /**\n * CSS selectors to define which elements on the page to track for dead clicks.\n * A dead click is a click that doesn't result in any visible change or navigation.\n */\n cssSelectorAllowlist?: string[];\n}\n\n/**\n * Configuration options for rage clicks tracking\n */\nexport interface RageClickOptions {\n /**\n * CSS selectors to define which elements on the page to track for rage clicks.\n * A rage click is multiple rapid clicks on the same element within a 3s time window.\n */\n cssSelectorAllowlist?: string[];\n}\n\n/**\n * Configuration options for frustration interactions tracking.\n * This includes dead clicks and rage clicks tracking.\n */\nexport interface FrustrationInteractionsOptions {\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: DomElement) => 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 * Configuration for dead clicks tracking\n */\n deadClicks?: DeadClickOptions;\n\n /**\n * Configuration for rage clicks tracking\n */\n rageClicks?: RageClickOptions;\n}\n\nconst CLICKABLE_ELEMENT_SELECTORS = [\n 'a',\n 'button',\n '[role=\"button\"]',\n '[role=\"link\"]',\n '[role=\"menuitem\"]',\n '[role=\"menuitemcheckbox\"]',\n '[role=\"menuitemradio\"]',\n '[role=\"option\"]',\n '[role=\"tab\"]',\n '[role=\"treeitem\"]',\n '[contenteditable=\"true\" i]',\n];\n\n/**\n * Default CSS selectors for dead clicks tracking\n */\nexport const DEFAULT_DEAD_CLICK_ALLOWLIST = [\n 'input[type=\"button\"]',\n 'input[type=\"submit\"]',\n 'input[type=\"reset\"]',\n 'input[type=\"image\"]',\n 'input[type=\"file\"]',\n ...CLICKABLE_ELEMENT_SELECTORS,\n];\n\n/**\n * Default CSS selectors for rage clicks tracking\n */\nexport const DEFAULT_RAGE_CLICK_ALLOWLIST = ['*'];\n\n/**\n * Default time window for dead clicks (3 seconds)\n */\nexport const DEFAULT_DEAD_CLICK_WINDOW_MS = 3_000;\n\n/**\n * Default time window for rage clicks (3 seconds)\n */\nexport const DEFAULT_RAGE_CLICK_WINDOW_MS = 3000;\n\n/**\n * Default threshold for rage clicks (5 clicks)\n */\nexport const DEFAULT_RAGE_CLICK_THRESHOLD = 5;\n\n// DomElement is [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) if the dom library is included in tsconfig.json\n// and never if it is not included\n// eslint-disable-next-line no-restricted-globals\ntype DomElement = typeof globalThis extends {\n Element: new (...args: any) => infer T;\n}\n ? T\n : never;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/analytics-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Amplitude Inc",
|
|
6
6
|
"homepage": "https://github.com/amplitude/Amplitude-TypeScript",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"files": [
|
|
43
43
|
"lib"
|
|
44
44
|
],
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "d54bd9c08df3fec7480bd8834b4a4bf0e5d8eddd"
|
|
46
46
|
}
|