@microsoft/applicationinsights-clickanalytics-js 3.4.0-nightlybeta3.2505-36 → 3.4.0-nightlybeta3.2507-23
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/README.md +23 -23
- package/browser/es5/{ai.clck.3.4.0-nightlybeta3.2505-36.cjs.js → ai.clck.3.4.0-nightlybeta3.2507-23.cjs.js} +234 -23
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-23.cjs.js.map +1 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-23.cjs.min.js +6 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-23.cjs.min.js.map +1 -0
- package/browser/es5/{ai.clck.3.4.0-nightlybeta3.2505-36.gbl.js → ai.clck.3.4.0-nightlybeta3.2507-23.gbl.js} +236 -25
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-23.gbl.js.map +1 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-23.gbl.min.js +6 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-23.gbl.min.js.map +1 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-23.integrity.json +66 -0
- package/browser/es5/{ai.clck.3.4.0-nightlybeta3.2505-36.js → ai.clck.3.4.0-nightlybeta3.2507-23.js} +236 -25
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-23.js.map +1 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-23.min.js +6 -0
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2507-23.min.js.map +1 -0
- package/browser/es5/ai.clck.3.cjs.js +233 -22
- package/browser/es5/ai.clck.3.cjs.js.map +1 -1
- package/browser/es5/ai.clck.3.cjs.min.js +2 -2
- package/browser/es5/ai.clck.3.cjs.min.js.map +1 -1
- package/browser/es5/ai.clck.3.gbl.js +235 -24
- package/browser/es5/ai.clck.3.gbl.js.map +1 -1
- package/browser/es5/ai.clck.3.gbl.min.js +2 -2
- package/browser/es5/ai.clck.3.gbl.min.js.map +1 -1
- package/browser/es5/ai.clck.3.integrity.json +25 -25
- package/browser/es5/ai.clck.3.js +235 -24
- package/browser/es5/ai.clck.3.js.map +1 -1
- package/browser/es5/ai.clck.3.min.js +2 -2
- package/browser/es5/ai.clck.3.min.js.map +1 -1
- package/dist/es5/applicationinsights-clickanalytics-js.js +233 -22
- package/dist/es5/applicationinsights-clickanalytics-js.js.map +1 -1
- package/dist/es5/applicationinsights-clickanalytics-js.min.js +2 -2
- package/dist/es5/applicationinsights-clickanalytics-js.min.js.map +1 -1
- package/dist-es5/Behaviours.js +1 -1
- package/dist-es5/ClickAnalyticsPlugin.js +2 -2
- package/dist-es5/ClickAnalyticsPlugin.js.map +1 -1
- package/dist-es5/DataCollector.js +4 -3
- package/dist-es5/DataCollector.js.map +1 -1
- package/dist-es5/Enums.js +1 -1
- package/dist-es5/Interfaces/Datamodel.js +1 -1
- package/dist-es5/__DynamicConstants.js +1 -1
- package/dist-es5/applicationinsights-clickanalytics-js.js +3 -2
- package/dist-es5/applicationinsights-clickanalytics-js.js.map +1 -1
- package/dist-es5/common/Utils.js +1 -1
- package/dist-es5/events/PageAction.js +1 -1
- package/dist-es5/events/WebEvent.js +1 -1
- package/dist-es5/handlers/AutoCaptureHandler.js +4 -4
- package/dist-es5/handlers/AutoCaptureHandler.js.map +1 -1
- package/dist-es5/handlers/DomContentHandler.js +1 -1
- package/package.json +4 -4
- package/types/applicationinsights-clickanalytics-js.d.ts +185 -6
- package/types/applicationinsights-clickanalytics-js.namespaced.d.ts +460 -14
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.cjs.js.map +0 -1
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.cjs.min.js +0 -6
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.cjs.min.js.map +0 -1
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.gbl.js.map +0 -1
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.gbl.min.js +0 -6
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.gbl.min.js.map +0 -1
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.integrity.json +0 -66
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.js.map +0 -1
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.min.js +0 -6
- package/browser/es5/ai.clck.3.4.0-nightlybeta3.2505-36.min.js.map +0 -1
package/dist-es5/Behaviours.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Click Analytics, 3.4.0-nightlybeta3.
|
|
2
|
+
* Application Insights JavaScript SDK - Click Analytics, 3.4.0-nightlybeta3.2507-23
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -146,7 +146,7 @@ var ClickAnalyticsPlugin = /** @class */ (function (_super) {
|
|
|
146
146
|
// Removed Stub for ClickAnalyticsPlugin.prototype.initialize.
|
|
147
147
|
// Removed Stub for ClickAnalyticsPlugin.prototype.processTelemetry.
|
|
148
148
|
// Removed Stub for ClickAnalyticsPlugin.prototype.trackPageAction.
|
|
149
|
-
ClickAnalyticsPlugin.Version = '3.4.0-nightlybeta3.
|
|
149
|
+
ClickAnalyticsPlugin.Version = '3.4.0-nightlybeta3.2507-23';
|
|
150
150
|
return ClickAnalyticsPlugin;
|
|
151
151
|
}(BaseTelemetryPlugin));
|
|
152
152
|
export { ClickAnalyticsPlugin };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClickAnalyticsPlugin.js.map","sources":["ClickAnalyticsPlugin.js"],"sourcesContent":["/**\r\n* @copyright Microsoft 2020\r\n*/\r\nvar _a, _b;\r\nimport { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { PropertiesPluginIdentifier } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, _throwInternal, arrForEach, cfgDfFunc, cfgDfMerge, cfgDfString, cfgDfValidate, createProcessTelemetryContext, dumpObj, getExceptionName, isNullOrUndefined, onConfigChange, throwError, unloadComponents } from \"@microsoft/applicationinsights-core-js\";\r\nimport { getDocument, hasDocument, objDeepFreeze, strSubstring, strTrim } from \"@nevware21/ts-utils\";\r\nimport { _DYN_CAPTURE_ALL_META_DAT1, _DYN_DEFAULT_RIGHT_CLICK_2, _DYN_INDEX_OF, _DYN_LENGTH, _DYN_META_DATA_PREFIX, _DYN_PARENT_DATA_TAG, _DYN_TRACK_PAGE_ACTION, _DYN_USE_DEFAULT_CONTENT_0 } from \"./__DynamicConstants\";\r\nimport { BehaviorEnumValidator, BehaviorMapValidator, BehaviorValueValidator, DEFAULT_AI_BLOB_ATTRIBUTE_TAG, DEFAULT_DATA_PREFIX, DEFAULT_DONOT_TRACK_TAG } from \"./common/Utils\";\r\nimport { PageAction } from \"./events/PageAction\";\r\nimport { AutoCaptureHandler } from \"./handlers/AutoCaptureHandler\";\r\nimport { DomContentHandler } from \"./handlers/DomContentHandler\";\r\nexport { BehaviorMapValidator, BehaviorValueValidator, BehaviorEnumValidator };\r\nvar defaultValues = objDeepFreeze((_a = {\r\n autoCapture: true,\r\n callback: cfgDfMerge({\r\n pageActionPageTags: cfgDfFunc(),\r\n pageName: cfgDfFunc(),\r\n contentName: cfgDfFunc()\r\n }),\r\n pageTags: {},\r\n coreData: cfgDfMerge({\r\n referrerUri: hasDocument() ? getDocument().referrer : \"\",\r\n requestUri: cfgDfString(),\r\n pageName: cfgDfString(),\r\n pageType: cfgDfString()\r\n }),\r\n dataTags: cfgDfMerge((_b = {},\r\n _b[_DYN_USE_DEFAULT_CONTENT_0 /* @min:useDefaultContentNameOrId */] = false,\r\n _b.aiBlobAttributeTag = DEFAULT_AI_BLOB_ATTRIBUTE_TAG,\r\n _b.customDataPrefix = cfgDfValidate(_dataPrefixChk, DEFAULT_DATA_PREFIX),\r\n _b[_DYN_CAPTURE_ALL_META_DAT1 /* @min:captureAllMetaDataContent */] = false,\r\n _b.dntDataTag = DEFAULT_DONOT_TRACK_TAG,\r\n _b[_DYN_META_DATA_PREFIX /* @min:metaDataPrefix */] = cfgDfString(),\r\n _b[_DYN_PARENT_DATA_TAG /* @min:parentDataTag */] = cfgDfString(),\r\n _b)),\r\n behaviorValidator: cfgDfFunc(function (key) { return key || \"\"; })\r\n },\r\n _a[_DYN_DEFAULT_RIGHT_CLICK_2 /* @min:defaultRightClickBhvr */] = cfgDfString(),\r\n _a.dropInvalidEvents = false,\r\n _a.urlCollectHash = false,\r\n _a.urlCollectQuery = false,\r\n _a.trackElementTypes = cfgDfString(\"A,BUTTON,AREA,INPUT\"),\r\n _a));\r\nfunction _dataPrefixChk(val) {\r\n return val && val[_DYN_INDEX_OF /* @min:%2eindexOf */](DEFAULT_DATA_PREFIX) === 0;\r\n}\r\nvar ClickAnalyticsPlugin = /** @class */ (function (_super) {\r\n __extends(ClickAnalyticsPlugin, _super);\r\n function ClickAnalyticsPlugin() {\r\n var _this = _super.call(this) || this;\r\n _this.identifier = \"ClickAnalyticsPlugin\";\r\n _this.priority = 181;\r\n var _config;\r\n var _pageAction;\r\n var _autoCaptureHandler;\r\n var _contentHandler;\r\n var _autoCapture;\r\n dynamicProto(ClickAnalyticsPlugin, _this, function (_self, _base) {\r\n var _identifier = _self.identifier;\r\n _initDefaults();\r\n _self.initialize = function (config, core, extensions, pluginChain) {\r\n if (isNullOrUndefined(core)) {\r\n throwError(\"Error initializing\");\r\n }\r\n _super.prototype.initialize.call(_this, config, core, extensions, pluginChain);\r\n _populateDefaults(config);\r\n // Find the properties plugin.\r\n var _propertiesExtension;\r\n arrForEach(extensions, function (extension) {\r\n if (extension.identifier === PropertiesPluginIdentifier) {\r\n _propertiesExtension = extension;\r\n }\r\n });\r\n // Append Click Analytics Plugin Version to SDK version.\r\n if (_propertiesExtension && _propertiesExtension.context && _propertiesExtension.context.internal) {\r\n var theVersion = _propertiesExtension.context.internal.sdkVersion;\r\n if (theVersion) {\r\n theVersion += \"_ClickPlugin\" + ClickAnalyticsPlugin.Version;\r\n if (theVersion[_DYN_LENGTH /* @min:%2elength */] > 64) {\r\n theVersion = strTrim(strSubstring(theVersion, 0, 64));\r\n }\r\n _propertiesExtension.context.internal.sdkVersion = theVersion;\r\n }\r\n }\r\n };\r\n _self.processTelemetry = function (env, itemCtx) {\r\n _self.processNext(env, itemCtx);\r\n };\r\n _self[_DYN_TRACK_PAGE_ACTION /* @min:%2etrackPageAction */] = function (pageAction, customProperties) {\r\n try {\r\n _pageAction[_DYN_TRACK_PAGE_ACTION /* @min:%2etrackPageAction */](pageAction, customProperties);\r\n }\r\n catch (e) {\r\n _throwInternal(_self.diagLog(), 1 /* eLoggingSeverity.CRITICAL */, 103 /* _eInternalMessageId.TrackPageActionEventFailed */, \"trackPageAction failed, page action event will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState, asyncCallback) {\r\n return unloadComponents([\r\n _autoCaptureHandler,\r\n _contentHandler,\r\n _pageAction\r\n ], unloadCtx, unloadState, function () {\r\n _initDefaults();\r\n asyncCallback && asyncCallback();\r\n });\r\n };\r\n function _populateDefaults(config) {\r\n var core = _self.core;\r\n _self._addHook(onConfigChange(config, function (details) {\r\n var config = details.cfg;\r\n var ctx = createProcessTelemetryContext(null, config, core);\r\n var _config = ctx.getExtCfg(_identifier, defaultValues);\r\n var logger = _self.diagLog();\r\n _contentHandler = new DomContentHandler(_config, logger);\r\n var metaTags = _contentHandler.getMetadata();\r\n _pageAction = new PageAction(_self, _config, _contentHandler, _config.callback.pageActionPageTags, metaTags, logger);\r\n // Default to DOM autoCapture handler\r\n if (_autoCaptureHandler) {\r\n _autoCaptureHandler._doUnload();\r\n }\r\n _autoCaptureHandler = new AutoCaptureHandler(_self, _config, _pageAction, logger);\r\n var autoCapture = !!_config.autoCapture;\r\n if (!_autoCapture && autoCapture) {\r\n _autoCaptureHandler.click();\r\n }\r\n _autoCapture = autoCapture;\r\n }));\r\n }\r\n function _initDefaults() {\r\n _config = null;\r\n _pageAction = null;\r\n _autoCaptureHandler = null;\r\n _contentHandler = null;\r\n _autoCapture = false;\r\n }\r\n });\r\n return _this;\r\n }\r\n ClickAnalyticsPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ClickAnalyticsPlugin.prototype.processTelemetry = function (env, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Logs a page action event.\r\n * @param IPageActionTelemetry - The page action event to log.\r\n * @param customProperties - Additional data used to filter events and metrics. Defaults to empty.\r\n */\r\n ClickAnalyticsPlugin.prototype.trackPageAction = function (pageAction, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ClickAnalyticsPlugin.Version = '3.4.0-nightlybeta3.
|
|
1
|
+
{"version":3,"file":"ClickAnalyticsPlugin.js.map","sources":["ClickAnalyticsPlugin.js"],"sourcesContent":["/**\r\n* @copyright Microsoft 2020\r\n*/\r\nvar _a, _b;\r\nimport { __extends } from \"tslib\";\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { PropertiesPluginIdentifier } from \"@microsoft/applicationinsights-common\";\r\nimport { BaseTelemetryPlugin, _throwInternal, arrForEach, cfgDfFunc, cfgDfMerge, cfgDfString, cfgDfValidate, createProcessTelemetryContext, dumpObj, getExceptionName, isNullOrUndefined, onConfigChange, throwError, unloadComponents } from \"@microsoft/applicationinsights-core-js\";\r\nimport { getDocument, hasDocument, objDeepFreeze, strSubstring, strTrim } from \"@nevware21/ts-utils\";\r\nimport { _DYN_CAPTURE_ALL_META_DAT1, _DYN_DEFAULT_RIGHT_CLICK_2, _DYN_INDEX_OF, _DYN_LENGTH, _DYN_META_DATA_PREFIX, _DYN_PARENT_DATA_TAG, _DYN_TRACK_PAGE_ACTION, _DYN_USE_DEFAULT_CONTENT_0 } from \"./__DynamicConstants\";\r\nimport { BehaviorEnumValidator, BehaviorMapValidator, BehaviorValueValidator, DEFAULT_AI_BLOB_ATTRIBUTE_TAG, DEFAULT_DATA_PREFIX, DEFAULT_DONOT_TRACK_TAG } from \"./common/Utils\";\r\nimport { PageAction } from \"./events/PageAction\";\r\nimport { AutoCaptureHandler } from \"./handlers/AutoCaptureHandler\";\r\nimport { DomContentHandler } from \"./handlers/DomContentHandler\";\r\nexport { BehaviorMapValidator, BehaviorValueValidator, BehaviorEnumValidator };\r\nvar defaultValues = objDeepFreeze((_a = {\r\n autoCapture: true,\r\n callback: cfgDfMerge({\r\n pageActionPageTags: cfgDfFunc(),\r\n pageName: cfgDfFunc(),\r\n contentName: cfgDfFunc()\r\n }),\r\n pageTags: {},\r\n coreData: cfgDfMerge({\r\n referrerUri: hasDocument() ? getDocument().referrer : \"\",\r\n requestUri: cfgDfString(),\r\n pageName: cfgDfString(),\r\n pageType: cfgDfString()\r\n }),\r\n dataTags: cfgDfMerge((_b = {},\r\n _b[_DYN_USE_DEFAULT_CONTENT_0 /* @min:useDefaultContentNameOrId */] = false,\r\n _b.aiBlobAttributeTag = DEFAULT_AI_BLOB_ATTRIBUTE_TAG,\r\n _b.customDataPrefix = cfgDfValidate(_dataPrefixChk, DEFAULT_DATA_PREFIX),\r\n _b[_DYN_CAPTURE_ALL_META_DAT1 /* @min:captureAllMetaDataContent */] = false,\r\n _b.dntDataTag = DEFAULT_DONOT_TRACK_TAG,\r\n _b[_DYN_META_DATA_PREFIX /* @min:metaDataPrefix */] = cfgDfString(),\r\n _b[_DYN_PARENT_DATA_TAG /* @min:parentDataTag */] = cfgDfString(),\r\n _b)),\r\n behaviorValidator: cfgDfFunc(function (key) { return key || \"\"; })\r\n },\r\n _a[_DYN_DEFAULT_RIGHT_CLICK_2 /* @min:defaultRightClickBhvr */] = cfgDfString(),\r\n _a.dropInvalidEvents = false,\r\n _a.urlCollectHash = false,\r\n _a.urlCollectQuery = false,\r\n _a.trackElementTypes = cfgDfString(\"A,BUTTON,AREA,INPUT\"),\r\n _a));\r\nfunction _dataPrefixChk(val) {\r\n return val && val[_DYN_INDEX_OF /* @min:%2eindexOf */](DEFAULT_DATA_PREFIX) === 0;\r\n}\r\nvar ClickAnalyticsPlugin = /** @class */ (function (_super) {\r\n __extends(ClickAnalyticsPlugin, _super);\r\n function ClickAnalyticsPlugin() {\r\n var _this = _super.call(this) || this;\r\n _this.identifier = \"ClickAnalyticsPlugin\";\r\n _this.priority = 181;\r\n var _config;\r\n var _pageAction;\r\n var _autoCaptureHandler;\r\n var _contentHandler;\r\n var _autoCapture;\r\n dynamicProto(ClickAnalyticsPlugin, _this, function (_self, _base) {\r\n var _identifier = _self.identifier;\r\n _initDefaults();\r\n _self.initialize = function (config, core, extensions, pluginChain) {\r\n if (isNullOrUndefined(core)) {\r\n throwError(\"Error initializing\");\r\n }\r\n _super.prototype.initialize.call(_this, config, core, extensions, pluginChain);\r\n _populateDefaults(config);\r\n // Find the properties plugin.\r\n var _propertiesExtension;\r\n arrForEach(extensions, function (extension) {\r\n if (extension.identifier === PropertiesPluginIdentifier) {\r\n _propertiesExtension = extension;\r\n }\r\n });\r\n // Append Click Analytics Plugin Version to SDK version.\r\n if (_propertiesExtension && _propertiesExtension.context && _propertiesExtension.context.internal) {\r\n var theVersion = _propertiesExtension.context.internal.sdkVersion;\r\n if (theVersion) {\r\n theVersion += \"_ClickPlugin\" + ClickAnalyticsPlugin.Version;\r\n if (theVersion[_DYN_LENGTH /* @min:%2elength */] > 64) {\r\n theVersion = strTrim(strSubstring(theVersion, 0, 64));\r\n }\r\n _propertiesExtension.context.internal.sdkVersion = theVersion;\r\n }\r\n }\r\n };\r\n _self.processTelemetry = function (env, itemCtx) {\r\n _self.processNext(env, itemCtx);\r\n };\r\n _self[_DYN_TRACK_PAGE_ACTION /* @min:%2etrackPageAction */] = function (pageAction, customProperties) {\r\n try {\r\n _pageAction[_DYN_TRACK_PAGE_ACTION /* @min:%2etrackPageAction */](pageAction, customProperties);\r\n }\r\n catch (e) {\r\n _throwInternal(_self.diagLog(), 1 /* eLoggingSeverity.CRITICAL */, 103 /* _eInternalMessageId.TrackPageActionEventFailed */, \"trackPageAction failed, page action event will not be collected: \" + getExceptionName(e), { exception: dumpObj(e) });\r\n }\r\n };\r\n _self._doTeardown = function (unloadCtx, unloadState, asyncCallback) {\r\n return unloadComponents([\r\n _autoCaptureHandler,\r\n _contentHandler,\r\n _pageAction\r\n ], unloadCtx, unloadState, function () {\r\n _initDefaults();\r\n asyncCallback && asyncCallback();\r\n });\r\n };\r\n function _populateDefaults(config) {\r\n var core = _self.core;\r\n _self._addHook(onConfigChange(config, function (details) {\r\n var config = details.cfg;\r\n var ctx = createProcessTelemetryContext(null, config, core);\r\n var _config = ctx.getExtCfg(_identifier, defaultValues);\r\n var logger = _self.diagLog();\r\n _contentHandler = new DomContentHandler(_config, logger);\r\n var metaTags = _contentHandler.getMetadata();\r\n _pageAction = new PageAction(_self, _config, _contentHandler, _config.callback.pageActionPageTags, metaTags, logger);\r\n // Default to DOM autoCapture handler\r\n if (_autoCaptureHandler) {\r\n _autoCaptureHandler._doUnload();\r\n }\r\n _autoCaptureHandler = new AutoCaptureHandler(_self, _config, _pageAction, logger);\r\n var autoCapture = !!_config.autoCapture;\r\n if (!_autoCapture && autoCapture) {\r\n _autoCaptureHandler.click();\r\n }\r\n _autoCapture = autoCapture;\r\n }));\r\n }\r\n function _initDefaults() {\r\n _config = null;\r\n _pageAction = null;\r\n _autoCaptureHandler = null;\r\n _contentHandler = null;\r\n _autoCapture = false;\r\n }\r\n });\r\n return _this;\r\n }\r\n ClickAnalyticsPlugin.prototype.initialize = function (config, core, extensions, pluginChain) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ClickAnalyticsPlugin.prototype.processTelemetry = function (env, itemCtx) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n /**\r\n * Logs a page action event.\r\n * @param IPageActionTelemetry - The page action event to log.\r\n * @param customProperties - Additional data used to filter events and metrics. Defaults to empty.\r\n */\r\n ClickAnalyticsPlugin.prototype.trackPageAction = function (pageAction, customProperties) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n ClickAnalyticsPlugin.Version = '3.4.0-nightlybeta3.2507-23';\r\n return ClickAnalyticsPlugin;\r\n}(BaseTelemetryPlugin));\r\nexport { ClickAnalyticsPlugin };\r\n//# sourceMappingURL=ClickAnalyticsPlugin.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA,gFAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;mEAaM;AACN;AACA;AACA;AACA;AACA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Click Analytics, 3.4.0-nightlybeta3.
|
|
2
|
+
* Application Insights JavaScript SDK - Click Analytics, 3.4.0-nightlybeta3.2507-23
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* @copyright Microsoft 2020
|
|
7
7
|
*/
|
|
8
|
-
import { getDocument, getLocation, getWindow, hasDocument, isFunction } from "@microsoft/applicationinsights-core-js";
|
|
8
|
+
import { fieldRedaction, getDocument, getLocation, getWindow, hasDocument, isFunction } from "@microsoft/applicationinsights-core-js";
|
|
9
9
|
import { scheduleTimeout } from "@nevware21/ts-utils";
|
|
10
10
|
import { _DYN_CORE_DATA, _DYN_LENGTH, _DYN_PAGE_NAME, _DYN_REQUEST_URI, _DYN_TAG_NAME, _DYN_TO_UPPER_CASE } from "./__DynamicConstants";
|
|
11
11
|
import { findClosestAnchor, isValueAssigned } from "./common/Utils";
|
|
@@ -125,7 +125,7 @@ export function getPageName(config, overrideValues) {
|
|
|
125
125
|
* @param location - window.location or document.location
|
|
126
126
|
* @returns Flag indicating if an element is market PII.
|
|
127
127
|
*/
|
|
128
|
-
export function sanitizeUrl(config, location) {
|
|
128
|
+
export function sanitizeUrl(config, location, rootConfig) {
|
|
129
129
|
if (!location) {
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
@@ -138,6 +138,7 @@ export function sanitizeUrl(config, location) {
|
|
|
138
138
|
if (!!config.urlCollectQuery) { // false by default
|
|
139
139
|
url += (isValueAssigned(location.search) ? location.search : "");
|
|
140
140
|
}
|
|
141
|
+
url = fieldRedaction(url, rootConfig);
|
|
141
142
|
return url;
|
|
142
143
|
}
|
|
143
144
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataCollector.js.map","sources":["DataCollector.js"],"sourcesContent":["/**\r\n* @copyright Microsoft 2020\r\n*/\r\nimport { getDocument, getLocation, getWindow, hasDocument, isFunction } from \"@microsoft/applicationinsights-core-js\";\r\nimport { scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { _DYN_CORE_DATA, _DYN_LENGTH, _DYN_PAGE_NAME, _DYN_REQUEST_URI, _DYN_TAG_NAME, _DYN_TO_UPPER_CASE } from \"./__DynamicConstants\";\r\nimport { findClosestAnchor, isValueAssigned } from \"./common/Utils\";\r\nvar clickCaptureInputTypes = { BUTTON: true, CHECKBOX: true, RADIO: true, RESET: true, SUBMIT: true };\r\n/**\r\n * Get Image href of a given HTMLImageElement\r\n * @param element - An html image element\r\n * @returns Href value.\r\n */\r\nexport function getImageHref(element) {\r\n var temp = element;\r\n if (temp) {\r\n var parent = findClosestAnchor(temp);\r\n if (parent[_DYN_LENGTH /* @min:%2elength */] === 1) {\r\n var firstParent = parent[0];\r\n if (firstParent.href) {\r\n return firstParent.href;\r\n }\r\n else if (firstParent.src) {\r\n return (firstParent.src);\r\n }\r\n }\r\n }\r\n return \"\";\r\n}\r\n/**\r\n * Get click target\r\n * @returns Click target URI\r\n */\r\nexport function getClickTarget(element) {\r\n var clickTarget = \"\";\r\n switch (element[_DYN_TAG_NAME /* @min:%2etagName */]) {\r\n case \"A\":\r\n case \"AREA\":\r\n clickTarget = element.href || \"\";\r\n break;\r\n case \"IMG\":\r\n clickTarget = getImageHref(element);\r\n break;\r\n case \"INPUT\":\r\n var type = element.type;\r\n if (type && (clickCaptureInputTypes[type[_DYN_TO_UPPER_CASE /* @min:%2etoUpperCase */]()])) {\r\n var loc = getLocation() || {};\r\n if (element.form) {\r\n clickTarget = element.form.action || (loc.pathname || \"\");\r\n }\r\n else {\r\n clickTarget = loc.pathname || \"\";\r\n }\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n return clickTarget;\r\n}\r\n/**\r\n * Execute callback when DOM finish loading\r\n */\r\nexport function onDomLoaded(callback) {\r\n onDomReadyDo(function () {\r\n if (hasDocument() && getDocument().readyState === \"complete\") {\r\n callback();\r\n }\r\n else {\r\n var win = getWindow();\r\n if (win) {\r\n if (win.addEventListener) {\r\n win.addEventListener(\"load\", function () {\r\n callback();\r\n }); // NB **not** 'onload'\r\n }\r\n else if (win.attachEvent) {\r\n win.attachEvent(\"onload\", function () {\r\n callback();\r\n }); // IE8\r\n }\r\n }\r\n }\r\n });\r\n}\r\n// use smallest domready ever for IE8. When IE8 is deprecated, use addEventListener('DomContentLoaded')\r\nfunction onDomReadyDo(f) {\r\n /// <summary> fires function f on domRead </summary>\r\n /// <param type='function'>function to call on domRead</param>\r\n var doc = getDocument() || {};\r\n /in/.test(doc.readyState) ? scheduleTimeout(function () {\r\n onDomReadyDo(f);\r\n }, 100) : f.call();\r\n}\r\n/**\r\n * Gets the pageName from the DOM or by calling a override if set.\r\n * @param config - configuration object\r\n * @returns Page name.\r\n */\r\nexport function getPageName(config, overrideValues) {\r\n /// <summary>\r\n /// Gets the pageName from the DOM or by calling a override if set.\r\n /// </summary>\r\n if (overrideValues && overrideValues[_DYN_PAGE_NAME /* @min:%2epageName */]) {\r\n return overrideValues[_DYN_PAGE_NAME /* @min:%2epageName */];\r\n }\r\n else if (config.callback && isFunction(config.callback[_DYN_PAGE_NAME /* @min:%2epageName */])) {\r\n return config.callback[_DYN_PAGE_NAME /* @min:%2epageName */]();\r\n }\r\n else if (config.coreData && config.coreData[_DYN_PAGE_NAME /* @min:%2epageName */]) {\r\n return config.coreData[_DYN_PAGE_NAME /* @min:%2epageName */];\r\n }\r\n else {\r\n var doc = getDocument();\r\n return doc && doc.title || \"\";\r\n }\r\n}\r\n/**\r\n * Sanitize URL values\r\n * @param config - Configuration\r\n * @param location - window.location or document.location\r\n * @returns Flag indicating if an element is market PII.\r\n */\r\nexport function sanitizeUrl(config, location) {\r\n if (!location) {\r\n return null;\r\n }\r\n var url = location.protocol + \"//\" + (location.hostname || location.host) + // location.hostname is not supported on Opera and Opera for Android\r\n (isValueAssigned(location.port) ? \":\" + location.port : \"\") +\r\n location.pathname;\r\n if (!!config.urlCollectHash) { // false by default\r\n url += (isValueAssigned(location.hash) ? location.hash : \"\");\r\n }\r\n if (!!config.urlCollectQuery) { // false by default\r\n url += (isValueAssigned(location.search) ? location.search : \"\");\r\n }\r\n return url;\r\n}\r\n/**\r\n * Get URI, sanitize the value if configured on\r\n * @param config - Configuration\r\n * @param location - window.location or document.location\r\n * @returns Flag indicating if an element is market PII.\r\n */\r\nexport function getUri(config, location) {\r\n if (config[_DYN_CORE_DATA /* @min:%2ecoreData */] && config[_DYN_CORE_DATA /* @min:%2ecoreData */][_DYN_REQUEST_URI /* @min:%2erequestUri */] && config[_DYN_CORE_DATA /* @min:%2ecoreData */][_DYN_REQUEST_URI /* @min:%2erequestUri */] !== \"\") {\r\n return config[_DYN_CORE_DATA /* @min:%2ecoreData */][_DYN_REQUEST_URI /* @min:%2erequestUri */];\r\n }\r\n return sanitizeUrl(config, location);\r\n}\r\n//# sourceMappingURL=DataCollector.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
|
1
|
+
{"version":3,"file":"DataCollector.js.map","sources":["DataCollector.js"],"sourcesContent":["/**\r\n* @copyright Microsoft 2020\r\n*/\r\nimport { fieldRedaction, getDocument, getLocation, getWindow, hasDocument, isFunction } from \"@microsoft/applicationinsights-core-js\";\r\nimport { scheduleTimeout } from \"@nevware21/ts-utils\";\r\nimport { _DYN_CORE_DATA, _DYN_LENGTH, _DYN_PAGE_NAME, _DYN_REQUEST_URI, _DYN_TAG_NAME, _DYN_TO_UPPER_CASE } from \"./__DynamicConstants\";\r\nimport { findClosestAnchor, isValueAssigned } from \"./common/Utils\";\r\nvar clickCaptureInputTypes = { BUTTON: true, CHECKBOX: true, RADIO: true, RESET: true, SUBMIT: true };\r\n/**\r\n * Get Image href of a given HTMLImageElement\r\n * @param element - An html image element\r\n * @returns Href value.\r\n */\r\nexport function getImageHref(element) {\r\n var temp = element;\r\n if (temp) {\r\n var parent = findClosestAnchor(temp);\r\n if (parent[_DYN_LENGTH /* @min:%2elength */] === 1) {\r\n var firstParent = parent[0];\r\n if (firstParent.href) {\r\n return firstParent.href;\r\n }\r\n else if (firstParent.src) {\r\n return (firstParent.src);\r\n }\r\n }\r\n }\r\n return \"\";\r\n}\r\n/**\r\n * Get click target\r\n * @returns Click target URI\r\n */\r\nexport function getClickTarget(element) {\r\n var clickTarget = \"\";\r\n switch (element[_DYN_TAG_NAME /* @min:%2etagName */]) {\r\n case \"A\":\r\n case \"AREA\":\r\n clickTarget = element.href || \"\";\r\n break;\r\n case \"IMG\":\r\n clickTarget = getImageHref(element);\r\n break;\r\n case \"INPUT\":\r\n var type = element.type;\r\n if (type && (clickCaptureInputTypes[type[_DYN_TO_UPPER_CASE /* @min:%2etoUpperCase */]()])) {\r\n var loc = getLocation() || {};\r\n if (element.form) {\r\n clickTarget = element.form.action || (loc.pathname || \"\");\r\n }\r\n else {\r\n clickTarget = loc.pathname || \"\";\r\n }\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n return clickTarget;\r\n}\r\n/**\r\n * Execute callback when DOM finish loading\r\n */\r\nexport function onDomLoaded(callback) {\r\n onDomReadyDo(function () {\r\n if (hasDocument() && getDocument().readyState === \"complete\") {\r\n callback();\r\n }\r\n else {\r\n var win = getWindow();\r\n if (win) {\r\n if (win.addEventListener) {\r\n win.addEventListener(\"load\", function () {\r\n callback();\r\n }); // NB **not** 'onload'\r\n }\r\n else if (win.attachEvent) {\r\n win.attachEvent(\"onload\", function () {\r\n callback();\r\n }); // IE8\r\n }\r\n }\r\n }\r\n });\r\n}\r\n// use smallest domready ever for IE8. When IE8 is deprecated, use addEventListener('DomContentLoaded')\r\nfunction onDomReadyDo(f) {\r\n /// <summary> fires function f on domRead </summary>\r\n /// <param type='function'>function to call on domRead</param>\r\n var doc = getDocument() || {};\r\n /in/.test(doc.readyState) ? scheduleTimeout(function () {\r\n onDomReadyDo(f);\r\n }, 100) : f.call();\r\n}\r\n/**\r\n * Gets the pageName from the DOM or by calling a override if set.\r\n * @param config - configuration object\r\n * @returns Page name.\r\n */\r\nexport function getPageName(config, overrideValues) {\r\n /// <summary>\r\n /// Gets the pageName from the DOM or by calling a override if set.\r\n /// </summary>\r\n if (overrideValues && overrideValues[_DYN_PAGE_NAME /* @min:%2epageName */]) {\r\n return overrideValues[_DYN_PAGE_NAME /* @min:%2epageName */];\r\n }\r\n else if (config.callback && isFunction(config.callback[_DYN_PAGE_NAME /* @min:%2epageName */])) {\r\n return config.callback[_DYN_PAGE_NAME /* @min:%2epageName */]();\r\n }\r\n else if (config.coreData && config.coreData[_DYN_PAGE_NAME /* @min:%2epageName */]) {\r\n return config.coreData[_DYN_PAGE_NAME /* @min:%2epageName */];\r\n }\r\n else {\r\n var doc = getDocument();\r\n return doc && doc.title || \"\";\r\n }\r\n}\r\n/**\r\n * Sanitize URL values\r\n * @param config - Configuration\r\n * @param location - window.location or document.location\r\n * @returns Flag indicating if an element is market PII.\r\n */\r\nexport function sanitizeUrl(config, location, rootConfig) {\r\n if (!location) {\r\n return null;\r\n }\r\n var url = location.protocol + \"//\" + (location.hostname || location.host) + // location.hostname is not supported on Opera and Opera for Android\r\n (isValueAssigned(location.port) ? \":\" + location.port : \"\") +\r\n location.pathname;\r\n if (!!config.urlCollectHash) { // false by default\r\n url += (isValueAssigned(location.hash) ? location.hash : \"\");\r\n }\r\n if (!!config.urlCollectQuery) { // false by default\r\n url += (isValueAssigned(location.search) ? location.search : \"\");\r\n }\r\n url = fieldRedaction(url, rootConfig);\r\n return url;\r\n}\r\n/**\r\n * Get URI, sanitize the value if configured on\r\n * @param config - Configuration\r\n * @param location - window.location or document.location\r\n * @returns Flag indicating if an element is market PII.\r\n */\r\nexport function getUri(config, location) {\r\n if (config[_DYN_CORE_DATA /* @min:%2ecoreData */] && config[_DYN_CORE_DATA /* @min:%2ecoreData */][_DYN_REQUEST_URI /* @min:%2erequestUri */] && config[_DYN_CORE_DATA /* @min:%2ecoreData */][_DYN_REQUEST_URI /* @min:%2erequestUri */] !== \"\") {\r\n return config[_DYN_CORE_DATA /* @min:%2ecoreData */][_DYN_REQUEST_URI /* @min:%2erequestUri */];\r\n }\r\n return sanitizeUrl(config, location);\r\n}\r\n//# sourceMappingURL=DataCollector.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA"}
|
package/dist-es5/Enums.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Click Analytics, 3.4.0-nightlybeta3.
|
|
2
|
+
* Application Insights JavaScript SDK - Click Analytics, 3.4.0-nightlybeta3.2507-23
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
import { Behavior } from "./Behaviours";
|
|
7
8
|
import { BehaviorEnumValidator, BehaviorMapValidator, BehaviorValueValidator, ClickAnalyticsPlugin } from "./ClickAnalyticsPlugin";
|
|
8
|
-
export { ClickAnalyticsPlugin, BehaviorMapValidator, BehaviorValueValidator, BehaviorEnumValidator };
|
|
9
|
+
export { Behavior, ClickAnalyticsPlugin, BehaviorMapValidator, BehaviorValueValidator, BehaviorEnumValidator };
|
|
9
10
|
//# sourceMappingURL=applicationinsights-clickanalytics-js.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applicationinsights-clickanalytics-js.js.map","sources":["applicationinsights-clickanalytics-js.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { BehaviorEnumValidator, BehaviorMapValidator, BehaviorValueValidator, ClickAnalyticsPlugin } from \"./ClickAnalyticsPlugin\";\r\nexport { ClickAnalyticsPlugin, BehaviorMapValidator, BehaviorValueValidator, BehaviorEnumValidator };\r\n//# sourceMappingURL=applicationinsights-clickanalytics-js.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA"}
|
|
1
|
+
{"version":3,"file":"applicationinsights-clickanalytics-js.js.map","sources":["applicationinsights-clickanalytics-js.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved.\r\n// Licensed under the MIT License.\r\nimport { Behavior } from \"./Behaviours\";\r\nimport { BehaviorEnumValidator, BehaviorMapValidator, BehaviorValueValidator, ClickAnalyticsPlugin } from \"./ClickAnalyticsPlugin\";\r\nexport { Behavior, ClickAnalyticsPlugin, BehaviorMapValidator, BehaviorValueValidator, BehaviorEnumValidator };\r\n//# sourceMappingURL=applicationinsights-clickanalytics-js.js.map"],"names":[],"mappings":";;;;AAA4D;AAC1B;AAClC;AACA;AACA;AACA"}
|
package/dist-es5/common/Utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Application Insights JavaScript SDK - Click Analytics, 3.4.0-nightlybeta3.
|
|
2
|
+
* Application Insights JavaScript SDK - Click Analytics, 3.4.0-nightlybeta3.2507-23
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import dynamicProto from "@microsoft/dynamicproto-js";
|
|
9
9
|
import { createUniqueNamespace, eventOff, eventOn, getDocument, getWindow, isNullOrUndefined, mergeEvtNamespace, onConfigChange } from "@microsoft/applicationinsights-core-js";
|
|
10
|
-
import { arrMap, strTrim } from "@nevware21/ts-utils";
|
|
10
|
+
import { arrIncludes, arrMap, strTrim } from "@nevware21/ts-utils";
|
|
11
11
|
import { ActionType } from "../Enums";
|
|
12
12
|
import { _DYN_ACTION_TYPE, _DYN_CLICK_COORDINATE_X, _DYN_CLICK_COORDINATE_Y, _DYN_CUSTOM_DATA_PREFIX, _DYN_DATA_TAGS, _DYN_INDEX_OF, _DYN_PARENT_NODE, _DYN_TAG_NAME, _DYN_TO_UPPER_CASE, _DYN__CONFIG } from "../__DynamicConstants";
|
|
13
13
|
import { isElementDnt, isKeyboardEnter, isKeyboardSpace, isLeftClick, isMiddleClick, isRightClick } from "../common/Utils";
|
|
@@ -92,11 +92,11 @@ var AutoCaptureHandler = /** @class */ (function () {
|
|
|
92
92
|
while (element && element[_DYN_TAG_NAME /* @min:%2etagName */]) {
|
|
93
93
|
// control property will be available for <label> elements with 'for' attribute, only use it when is a
|
|
94
94
|
// valid JSLL capture element to avoid infinite loops
|
|
95
|
-
if (element.control && _clickCaptureElements
|
|
95
|
+
if (element.control && arrIncludes(_clickCaptureElements, element.control[_DYN_TAG_NAME /* @min:%2etagName */][_DYN_TO_UPPER_CASE /* @min:%2etoUpperCase */]())) {
|
|
96
96
|
element = element.control;
|
|
97
97
|
}
|
|
98
98
|
var tagNameUpperCased = element[_DYN_TAG_NAME /* @min:%2etagName */][_DYN_TO_UPPER_CASE /* @min:%2etoUpperCase */]();
|
|
99
|
-
if (!_clickCaptureElements
|
|
99
|
+
if (!arrIncludes(_clickCaptureElements, tagNameUpperCased)) {
|
|
100
100
|
element = element.parentElement || element[_DYN_PARENT_NODE /* @min:%2eparentNode */];
|
|
101
101
|
continue;
|
|
102
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoCaptureHandler.js.map","sources":["AutoCaptureHandler.js"],"sourcesContent":["/**\r\n* @copyright Microsoft 2020\r\n*/\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { createUniqueNamespace, eventOff, eventOn, getDocument, getWindow, isNullOrUndefined, mergeEvtNamespace, onConfigChange } from \"@microsoft/applicationinsights-core-js\";\r\nimport { arrMap, strTrim } from \"@nevware21/ts-utils\";\r\nimport { ActionType } from \"../Enums\";\r\nimport { _DYN_ACTION_TYPE, _DYN_CLICK_COORDINATE_X, _DYN_CLICK_COORDINATE_Y, _DYN_CUSTOM_DATA_PREFIX, _DYN_DATA_TAGS, _DYN_INDEX_OF, _DYN_PARENT_NODE, _DYN_TAG_NAME, _DYN_TO_UPPER_CASE, _DYN__CONFIG } from \"../__DynamicConstants\";\r\nimport { isElementDnt, isKeyboardEnter, isKeyboardSpace, isLeftClick, isMiddleClick, isRightClick } from \"../common/Utils\";\r\nvar clickCaptureInputTypes = { BUTTON: true, CHECKBOX: true, RADIO: true, RESET: true, SUBMIT: true };\r\nvar AutoCaptureHandler = /** @class */ (function () {\r\n /**\r\n * @param analyticsPlugin - WebAnalytics plugin\r\n * @param traceLogger - Trace logger to log to console.\r\n */\r\n function AutoCaptureHandler(_analyticsPlugin, _config, _pageAction, _traceLogger) {\r\n this._analyticsPlugin = _analyticsPlugin;\r\n this._config = _config;\r\n this._pageAction = _pageAction;\r\n this._traceLogger = _traceLogger;\r\n var _evtNamespace = mergeEvtNamespace(createUniqueNamespace(\"AutoCaptureHandler\"), _analyticsPlugin._evtNamespace);\r\n var _clickCaptureElements;\r\n var unloadHandler = onConfigChange(_config, function () {\r\n _clickCaptureElements = arrMap(_config.trackElementTypes[_DYN_TO_UPPER_CASE /* @min:%2etoUpperCase */]().split(\",\"), function (tag) { return strTrim(tag); });\r\n });\r\n dynamicProto(AutoCaptureHandler, this, function (_self) {\r\n _self.click = function () {\r\n var win = getWindow();\r\n var doc = getDocument();\r\n if (win) {\r\n // IE9 onwards addEventListener is available, 'click' event captures mouse click. mousedown works on other browsers\r\n var event_1 = (navigator.appVersion[_DYN_INDEX_OF /* @min:%2eindexOf */](\"MSIE\") !== -1) ? \"click\" : \"mousedown\";\r\n eventOn(win, event_1, _processClick, _evtNamespace);\r\n eventOn(win, \"keyup\", _processClick, _evtNamespace);\r\n }\r\n else if (doc) {\r\n // IE8 and below doesn't have addEventListener so it will use attachEvent\r\n // attaching to window does not work in IE8\r\n eventOn(doc, \"click\", _processClick, _evtNamespace);\r\n eventOn(doc, \"keyup\", _processClick, _evtNamespace);\r\n }\r\n };\r\n _self._doUnload = function (unloadCtx, unloadState, asyncCallback) {\r\n eventOff(getWindow(), null, null, _evtNamespace);\r\n eventOff(getDocument(), null, null, _evtNamespace);\r\n unloadHandler && unloadHandler.rm();\r\n unloadHandler = null;\r\n };\r\n function _capturePageAction(element, overrideValues, customProperties, isRightClick) {\r\n var donotTrackTag = _self._config.dataTags[_DYN_CUSTOM_DATA_PREFIX /* @min:%2ecustomDataPrefix */] + _self[_DYN__CONFIG /* @min:%2e_config */][_DYN_DATA_TAGS /* @min:%2edataTags */].dntDataTag;\r\n if (!isElementDnt(element, donotTrackTag)) {\r\n _self._pageAction.capturePageAction(element, overrideValues, customProperties, isRightClick);\r\n }\r\n }\r\n // Process click event\r\n function _processClick(clickEvent) {\r\n var _a;\r\n var win = getWindow();\r\n if (isNullOrUndefined(clickEvent) && win) {\r\n clickEvent = win.event; // IE 8 does not pass the event\r\n }\r\n if (clickEvent) {\r\n var element = clickEvent.srcElement || clickEvent.target;\r\n // populate overrideValues\r\n var overrideValues = (_a = {},\r\n _a[_DYN_CLICK_COORDINATE_X /* @min:clickCoordinateX */] = clickEvent.pageX,\r\n _a[_DYN_CLICK_COORDINATE_Y /* @min:clickCoordinateY */] = clickEvent.pageY,\r\n _a);\r\n var isRightClickObj = isRightClick(clickEvent);\r\n if (isRightClickObj) {\r\n overrideValues[_DYN_ACTION_TYPE /* @min:%2eactionType */] = ActionType.CLICKRIGHT;\r\n }\r\n else if (isLeftClick(clickEvent)) {\r\n overrideValues[_DYN_ACTION_TYPE /* @min:%2eactionType */] = ActionType.CLICKLEFT;\r\n }\r\n else if (isKeyboardEnter(clickEvent)) {\r\n overrideValues[_DYN_ACTION_TYPE /* @min:%2eactionType */] = ActionType.KEYBOARDENTER;\r\n }\r\n else if (isKeyboardSpace(clickEvent)) {\r\n overrideValues[_DYN_ACTION_TYPE /* @min:%2eactionType */] = ActionType.KEYBOARDSPACE;\r\n }\r\n else if (isMiddleClick(clickEvent)) {\r\n overrideValues[_DYN_ACTION_TYPE /* @min:%2eactionType */] = ActionType.CLICKMIDDLE;\r\n }\r\n else {\r\n return;\r\n }\r\n while (element && element[_DYN_TAG_NAME /* @min:%2etagName */]) {\r\n // control property will be available for <label> elements with 'for' attribute, only use it when is a\r\n // valid JSLL capture element to avoid infinite loops\r\n if (element.control && _clickCaptureElements
|
|
1
|
+
{"version":3,"file":"AutoCaptureHandler.js.map","sources":["AutoCaptureHandler.js"],"sourcesContent":["/**\r\n* @copyright Microsoft 2020\r\n*/\r\nimport dynamicProto from \"@microsoft/dynamicproto-js\";\r\nimport { createUniqueNamespace, eventOff, eventOn, getDocument, getWindow, isNullOrUndefined, mergeEvtNamespace, onConfigChange } from \"@microsoft/applicationinsights-core-js\";\r\nimport { arrIncludes, arrMap, strTrim } from \"@nevware21/ts-utils\";\r\nimport { ActionType } from \"../Enums\";\r\nimport { _DYN_ACTION_TYPE, _DYN_CLICK_COORDINATE_X, _DYN_CLICK_COORDINATE_Y, _DYN_CUSTOM_DATA_PREFIX, _DYN_DATA_TAGS, _DYN_INDEX_OF, _DYN_PARENT_NODE, _DYN_TAG_NAME, _DYN_TO_UPPER_CASE, _DYN__CONFIG } from \"../__DynamicConstants\";\r\nimport { isElementDnt, isKeyboardEnter, isKeyboardSpace, isLeftClick, isMiddleClick, isRightClick } from \"../common/Utils\";\r\nvar clickCaptureInputTypes = { BUTTON: true, CHECKBOX: true, RADIO: true, RESET: true, SUBMIT: true };\r\nvar AutoCaptureHandler = /** @class */ (function () {\r\n /**\r\n * @param analyticsPlugin - WebAnalytics plugin\r\n * @param traceLogger - Trace logger to log to console.\r\n */\r\n function AutoCaptureHandler(_analyticsPlugin, _config, _pageAction, _traceLogger) {\r\n this._analyticsPlugin = _analyticsPlugin;\r\n this._config = _config;\r\n this._pageAction = _pageAction;\r\n this._traceLogger = _traceLogger;\r\n var _evtNamespace = mergeEvtNamespace(createUniqueNamespace(\"AutoCaptureHandler\"), _analyticsPlugin._evtNamespace);\r\n var _clickCaptureElements;\r\n var unloadHandler = onConfigChange(_config, function () {\r\n _clickCaptureElements = arrMap(_config.trackElementTypes[_DYN_TO_UPPER_CASE /* @min:%2etoUpperCase */]().split(\",\"), function (tag) { return strTrim(tag); });\r\n });\r\n dynamicProto(AutoCaptureHandler, this, function (_self) {\r\n _self.click = function () {\r\n var win = getWindow();\r\n var doc = getDocument();\r\n if (win) {\r\n // IE9 onwards addEventListener is available, 'click' event captures mouse click. mousedown works on other browsers\r\n var event_1 = (navigator.appVersion[_DYN_INDEX_OF /* @min:%2eindexOf */](\"MSIE\") !== -1) ? \"click\" : \"mousedown\";\r\n eventOn(win, event_1, _processClick, _evtNamespace);\r\n eventOn(win, \"keyup\", _processClick, _evtNamespace);\r\n }\r\n else if (doc) {\r\n // IE8 and below doesn't have addEventListener so it will use attachEvent\r\n // attaching to window does not work in IE8\r\n eventOn(doc, \"click\", _processClick, _evtNamespace);\r\n eventOn(doc, \"keyup\", _processClick, _evtNamespace);\r\n }\r\n };\r\n _self._doUnload = function (unloadCtx, unloadState, asyncCallback) {\r\n eventOff(getWindow(), null, null, _evtNamespace);\r\n eventOff(getDocument(), null, null, _evtNamespace);\r\n unloadHandler && unloadHandler.rm();\r\n unloadHandler = null;\r\n };\r\n function _capturePageAction(element, overrideValues, customProperties, isRightClick) {\r\n var donotTrackTag = _self._config.dataTags[_DYN_CUSTOM_DATA_PREFIX /* @min:%2ecustomDataPrefix */] + _self[_DYN__CONFIG /* @min:%2e_config */][_DYN_DATA_TAGS /* @min:%2edataTags */].dntDataTag;\r\n if (!isElementDnt(element, donotTrackTag)) {\r\n _self._pageAction.capturePageAction(element, overrideValues, customProperties, isRightClick);\r\n }\r\n }\r\n // Process click event\r\n function _processClick(clickEvent) {\r\n var _a;\r\n var win = getWindow();\r\n if (isNullOrUndefined(clickEvent) && win) {\r\n clickEvent = win.event; // IE 8 does not pass the event\r\n }\r\n if (clickEvent) {\r\n var element = clickEvent.srcElement || clickEvent.target;\r\n // populate overrideValues\r\n var overrideValues = (_a = {},\r\n _a[_DYN_CLICK_COORDINATE_X /* @min:clickCoordinateX */] = clickEvent.pageX,\r\n _a[_DYN_CLICK_COORDINATE_Y /* @min:clickCoordinateY */] = clickEvent.pageY,\r\n _a);\r\n var isRightClickObj = isRightClick(clickEvent);\r\n if (isRightClickObj) {\r\n overrideValues[_DYN_ACTION_TYPE /* @min:%2eactionType */] = ActionType.CLICKRIGHT;\r\n }\r\n else if (isLeftClick(clickEvent)) {\r\n overrideValues[_DYN_ACTION_TYPE /* @min:%2eactionType */] = ActionType.CLICKLEFT;\r\n }\r\n else if (isKeyboardEnter(clickEvent)) {\r\n overrideValues[_DYN_ACTION_TYPE /* @min:%2eactionType */] = ActionType.KEYBOARDENTER;\r\n }\r\n else if (isKeyboardSpace(clickEvent)) {\r\n overrideValues[_DYN_ACTION_TYPE /* @min:%2eactionType */] = ActionType.KEYBOARDSPACE;\r\n }\r\n else if (isMiddleClick(clickEvent)) {\r\n overrideValues[_DYN_ACTION_TYPE /* @min:%2eactionType */] = ActionType.CLICKMIDDLE;\r\n }\r\n else {\r\n return;\r\n }\r\n while (element && element[_DYN_TAG_NAME /* @min:%2etagName */]) {\r\n // control property will be available for <label> elements with 'for' attribute, only use it when is a\r\n // valid JSLL capture element to avoid infinite loops\r\n if (element.control && arrIncludes(_clickCaptureElements, element.control[_DYN_TAG_NAME /* @min:%2etagName */][_DYN_TO_UPPER_CASE /* @min:%2etoUpperCase */]())) {\r\n element = element.control;\r\n }\r\n var tagNameUpperCased = element[_DYN_TAG_NAME /* @min:%2etagName */][_DYN_TO_UPPER_CASE /* @min:%2etoUpperCase */]();\r\n if (!arrIncludes(_clickCaptureElements, tagNameUpperCased)) {\r\n element = element.parentElement || element[_DYN_PARENT_NODE /* @min:%2eparentNode */];\r\n continue;\r\n }\r\n else {\r\n // Check allowed INPUT types\r\n var sendEvent = tagNameUpperCased === \"INPUT\" ? clickCaptureInputTypes[element.type[_DYN_TO_UPPER_CASE /* @min:%2etoUpperCase */]()] : true;\r\n if (sendEvent) {\r\n _capturePageAction(element, overrideValues, {}, isRightClickObj);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n // handle automatic event firing on user click\r\n AutoCaptureHandler.prototype.click = function () {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n AutoCaptureHandler.prototype._doUnload = function (unloadCtx, unloadState, asyncCallback) {\r\n // @DynamicProtoStub -- DO NOT add any code as this will be removed during packaging\r\n };\r\n return AutoCaptureHandler;\r\n}());\r\nexport { AutoCaptureHandler };\r\n//# sourceMappingURL=AutoCaptureHandler.js.map"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;2DAKM,CAAC;;;;;8BACuB;AAC9B;AACA;AACA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-clickanalytics-js",
|
|
3
|
-
"version": "3.4.0-nightlybeta3.
|
|
3
|
+
"version": "3.4.0-nightlybeta3.2507-23",
|
|
4
4
|
"description": "Microsoft Application Insights Click Analytics extension",
|
|
5
5
|
"homepage": "https://github.com/microsoft/ApplicationInsights-JS#readme",
|
|
6
6
|
"author": "Microsoft Application Insights Team",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@microsoft/dynamicproto-js": "^2.0.3",
|
|
53
53
|
"@microsoft/applicationinsights-shims": "3.0.1",
|
|
54
|
-
"@microsoft/applicationinsights-core-js": "3.4.0-nightlybeta3.
|
|
55
|
-
"@microsoft/applicationinsights-common": "3.4.0-nightlybeta3.
|
|
56
|
-
"@microsoft/applicationinsights-properties-js": "3.4.0-nightlybeta3.
|
|
54
|
+
"@microsoft/applicationinsights-core-js": "3.4.0-nightlybeta3.2507-23",
|
|
55
|
+
"@microsoft/applicationinsights-common": "3.4.0-nightlybeta3.2507-23",
|
|
56
|
+
"@microsoft/applicationinsights-properties-js": "3.4.0-nightlybeta3.2507-23",
|
|
57
57
|
"@nevware21/ts-utils": ">= 0.11.8 < 2.x"
|
|
58
58
|
},
|
|
59
59
|
"repository": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft.ApplicationInsights, 3.4.0-nightlybeta3.
|
|
2
|
+
* Microsoft.ApplicationInsights, 3.4.0-nightlybeta3.2507-23
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -23,6 +23,106 @@ import { IProcessTelemetryContext } from '@microsoft/applicationinsights-core-js
|
|
|
23
23
|
import { ITelemetryItem } from '@microsoft/applicationinsights-core-js';
|
|
24
24
|
import { ITelemetryPluginChain } from '@microsoft/applicationinsights-core-js';
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* @copyright Microsoft 2020
|
|
28
|
+
*/
|
|
29
|
+
export declare enum Behavior {
|
|
30
|
+
UNDEFINED = 0,
|
|
31
|
+
NAVIGATIONBACK = 1,
|
|
32
|
+
NAVIGATION = 2,
|
|
33
|
+
NAVIGATIONFORWARD = 3,
|
|
34
|
+
APPLY = 4,
|
|
35
|
+
REMOVE = 5,
|
|
36
|
+
SORT = 6,
|
|
37
|
+
EXPAND = 7,
|
|
38
|
+
REDUCE = 8,
|
|
39
|
+
CONTEXTMENU = 9,
|
|
40
|
+
TAB = 10,
|
|
41
|
+
COPY = 11,
|
|
42
|
+
EXPERIMENTATION = 12,
|
|
43
|
+
PRINT = 13,
|
|
44
|
+
SHOW = 14,
|
|
45
|
+
HIDE = 15,
|
|
46
|
+
MAXIMIZE = 16,
|
|
47
|
+
MINIMIZE = 17,
|
|
48
|
+
BACKBUTTON = 18,
|
|
49
|
+
STARTPROCESS = 20,
|
|
50
|
+
PROCESSCHECKPOINT = 21,
|
|
51
|
+
COMPLETEPROCESS = 22,
|
|
52
|
+
SCENARIOCANCEL = 23,
|
|
53
|
+
DOWNLOADCOMMIT = 40,
|
|
54
|
+
DOWNLOAD = 41,
|
|
55
|
+
SEARCHAUTOCOMPLETE = 60,
|
|
56
|
+
SEARCH = 61,
|
|
57
|
+
SEARCHINITIATE = 62,
|
|
58
|
+
TEXTBOXINPUT = 63,
|
|
59
|
+
VIEWCART = 82,
|
|
60
|
+
ADDWISHLIST = 83,
|
|
61
|
+
FINDSTORE = 84,
|
|
62
|
+
CHECKOUT = 85,
|
|
63
|
+
REMOVEFROMCART = 86,
|
|
64
|
+
PURCHASECOMPLETE = 87,
|
|
65
|
+
VIEWCHECKOUTPAGE = 88,
|
|
66
|
+
VIEWCARTPAGE = 89,
|
|
67
|
+
VIEWPDP = 90,
|
|
68
|
+
UPDATEITEMQUANTITY = 91,
|
|
69
|
+
INTENTTOBUY = 92,
|
|
70
|
+
PUSHTOINSTALL = 93,
|
|
71
|
+
SIGNIN = 100,
|
|
72
|
+
SIGNOUT = 101,
|
|
73
|
+
SOCIALSHARE = 120,
|
|
74
|
+
SOCIALLIKE = 121,
|
|
75
|
+
SOCIALREPLY = 122,
|
|
76
|
+
CALL = 123,
|
|
77
|
+
EMAIL = 124,
|
|
78
|
+
COMMUNITY = 125,
|
|
79
|
+
VOTE = 140,
|
|
80
|
+
SURVEYCHECKPOINT = 145,
|
|
81
|
+
REGISTRATIONINITIATE = 161,
|
|
82
|
+
REGISTRATIONCOMPLETE = 162,
|
|
83
|
+
CANCELSUBSCRIPTION = 163,
|
|
84
|
+
RENEWSUBSCRIPTION = 164,
|
|
85
|
+
CHANGESUBSCRIPTION = 165,
|
|
86
|
+
REGISTRATIONCHECKPOINT = 166,
|
|
87
|
+
CHATINITIATE = 180,
|
|
88
|
+
CHATEND = 181,
|
|
89
|
+
TRIALSIGNUP = 200,
|
|
90
|
+
TRIALINITIATE = 201,
|
|
91
|
+
SIGNUP = 210,
|
|
92
|
+
FREESIGNUP = 211,
|
|
93
|
+
PARTNERREFERRAL = 220,
|
|
94
|
+
LEARNLOWFUNNEL = 230,
|
|
95
|
+
LEARNHIGHFUNNEL = 231,
|
|
96
|
+
SHOPPINGINTENT = 232,
|
|
97
|
+
VIDEOSTART = 240,
|
|
98
|
+
VIDEOPAUSE = 241,
|
|
99
|
+
VIDEOCONTINUE = 242,
|
|
100
|
+
VIDEOCHECKPOINT = 243,
|
|
101
|
+
VIDEOJUMP = 244,
|
|
102
|
+
VIDEOCOMPLETE = 245,
|
|
103
|
+
VIDEOBUFFERING = 246,
|
|
104
|
+
VIDEOERROR = 247,
|
|
105
|
+
VIDEOMUTE = 248,
|
|
106
|
+
VIDEOUNMUTE = 249,
|
|
107
|
+
VIDEOFULLSCREEN = 250,
|
|
108
|
+
VIDEOUNFULLSCREEN = 251,
|
|
109
|
+
VIDEOREPLAY = 252,
|
|
110
|
+
VIDEOPLAYERLOAD = 253,
|
|
111
|
+
VIDEOPLAYERCLICK = 254,
|
|
112
|
+
VIDEOVOLUMECONTROL = 255,
|
|
113
|
+
VIDEOAUDIOTRACKCONTROL = 256,
|
|
114
|
+
VIDEOCLOSEDCAPTIONCONTROL = 257,
|
|
115
|
+
VIDEOCLOSEDCAPTIONSTYLE = 258,
|
|
116
|
+
VIDEORESOLUTIONCONTROL = 259,
|
|
117
|
+
ADBUFFERING = 283,
|
|
118
|
+
ADERROR = 284,
|
|
119
|
+
ADSTART = 285,
|
|
120
|
+
ADCOMPLETE = 286,
|
|
121
|
+
ADSKIP = 287,
|
|
122
|
+
ADTIMEOUT = 288,
|
|
123
|
+
OTHER = 300
|
|
124
|
+
}
|
|
125
|
+
|
|
26
126
|
export declare function BehaviorEnumValidator(enumObj: any): (key: string) => any;
|
|
27
127
|
|
|
28
128
|
export declare function BehaviorMapValidator(map: any): (key: string) => any;
|
|
@@ -99,10 +199,30 @@ export declare interface IClickAnalyticsConfiguration {
|
|
|
99
199
|
trackElementTypes?: string;
|
|
100
200
|
}
|
|
101
201
|
|
|
202
|
+
/**
|
|
203
|
+
* Content interface
|
|
204
|
+
*/
|
|
205
|
+
export declare interface IContent {
|
|
206
|
+
/**
|
|
207
|
+
* Friendly name (Content Name) of the content to be used reporting/visualization purposes
|
|
208
|
+
*/
|
|
209
|
+
cN?: string;
|
|
210
|
+
/**
|
|
211
|
+
* Unique identifier (friendly names allowed) of the content (Content Id) as designated by the content provider.
|
|
212
|
+
* The name should be unique per contentSource such that the two make up the compound key and such that the contentId can be
|
|
213
|
+
* looked up in the contentSource for additional metadata.
|
|
214
|
+
*/
|
|
215
|
+
id?: string;
|
|
216
|
+
/**
|
|
217
|
+
* User specified custom content properties
|
|
218
|
+
*/
|
|
219
|
+
[name: string]: string | number | boolean | string[] | number[] | boolean[] | object | undefined;
|
|
220
|
+
}
|
|
221
|
+
|
|
102
222
|
/**
|
|
103
223
|
* Core data configuration
|
|
104
224
|
*/
|
|
105
|
-
declare interface ICoreData {
|
|
225
|
+
export declare interface ICoreData {
|
|
106
226
|
/**
|
|
107
227
|
* document.referrer is the default. This is used to override the default value.
|
|
108
228
|
*/
|
|
@@ -124,7 +244,7 @@ declare interface ICoreData {
|
|
|
124
244
|
/**
|
|
125
245
|
* Custom Data Tags Configuration
|
|
126
246
|
*/
|
|
127
|
-
declare interface ICustomDataTags {
|
|
247
|
+
export declare interface ICustomDataTags {
|
|
128
248
|
/**
|
|
129
249
|
* When a particular element is not tagged with content name prefix or content name prefix is not provided by user, this flag is used to collect standard HTML attribute for contentName and id.
|
|
130
250
|
*/
|
|
@@ -155,10 +275,69 @@ declare interface ICustomDataTags {
|
|
|
155
275
|
dntDataTag?: string;
|
|
156
276
|
}
|
|
157
277
|
|
|
278
|
+
export { ICustomProperties }
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Override values interface
|
|
282
|
+
*/
|
|
283
|
+
export declare interface IOverrideValues {
|
|
284
|
+
/**
|
|
285
|
+
* One of the awa.behavior values.
|
|
286
|
+
*/
|
|
287
|
+
behavior?: string | number;
|
|
288
|
+
/**
|
|
289
|
+
* Page name
|
|
290
|
+
*/
|
|
291
|
+
pageName?: string;
|
|
292
|
+
/**
|
|
293
|
+
* Page type
|
|
294
|
+
*/
|
|
295
|
+
pageType?: string;
|
|
296
|
+
/**
|
|
297
|
+
* KVP to be added to the page tags collected
|
|
298
|
+
*/
|
|
299
|
+
pageTags?: any;
|
|
300
|
+
/**
|
|
301
|
+
* Indicates if the event was fired automatically
|
|
302
|
+
*/
|
|
303
|
+
isAuto?: boolean;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export declare interface IPageActionOverrideValues extends IOverrideValues {
|
|
307
|
+
/**
|
|
308
|
+
* Uri of the referrer page
|
|
309
|
+
*/
|
|
310
|
+
refUri?: string;
|
|
311
|
+
/**
|
|
312
|
+
* One of the awa.actionType values
|
|
313
|
+
*/
|
|
314
|
+
actionType?: string;
|
|
315
|
+
/**
|
|
316
|
+
* Target uri for PageAction events
|
|
317
|
+
*/
|
|
318
|
+
targetUri?: string;
|
|
319
|
+
/**
|
|
320
|
+
* Click coordinates relative to the top left of the fully rendered content area in the browser
|
|
321
|
+
*/
|
|
322
|
+
clickCoordinateX?: number;
|
|
323
|
+
/**
|
|
324
|
+
* Click coordinates relative to the top left of the fully rendered content area in the browser
|
|
325
|
+
*/
|
|
326
|
+
clickCoordinateY?: number;
|
|
327
|
+
/**
|
|
328
|
+
* KVP of the content
|
|
329
|
+
*/
|
|
330
|
+
content?: any;
|
|
331
|
+
/**
|
|
332
|
+
* KVPs to be added to the content tags collected on a Page Action event; extends the items in the Content blob in Page Action events
|
|
333
|
+
*/
|
|
334
|
+
contentTags?: any;
|
|
335
|
+
}
|
|
336
|
+
|
|
158
337
|
/**
|
|
159
338
|
* Page Action event
|
|
160
339
|
*/
|
|
161
|
-
declare interface IPageActionTelemetry extends IEventTelemetry {
|
|
340
|
+
export declare interface IPageActionTelemetry extends IEventTelemetry {
|
|
162
341
|
/**
|
|
163
342
|
* Target uri for PageAction events
|
|
164
343
|
*/
|
|
@@ -212,7 +391,7 @@ declare interface IPageActionTelemetry extends IEventTelemetry {
|
|
|
212
391
|
/**
|
|
213
392
|
* PageTags format
|
|
214
393
|
*/
|
|
215
|
-
declare interface IPageTags {
|
|
394
|
+
export declare interface IPageTags {
|
|
216
395
|
/**
|
|
217
396
|
* Meta data tags
|
|
218
397
|
*/
|
|
@@ -228,7 +407,7 @@ declare interface IPageTags {
|
|
|
228
407
|
/**
|
|
229
408
|
* Value Callbacks configuration
|
|
230
409
|
*/
|
|
231
|
-
declare interface IValueCallback {
|
|
410
|
+
export declare interface IValueCallback {
|
|
232
411
|
/**
|
|
233
412
|
* Function to override the default pageName capturing behavior.
|
|
234
413
|
*/
|