@microsoft/applicationinsights-clickanalytics-js 3.0.3-nightly3.2305-14 → 3.0.3-nightly3.2307-24
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/browser/es5/{ai.clck.3.0.3-nightly3.2305-14.gbl.js → ai.clck.3.0.3-nightly3.2307-24.cjs.js} +151 -122
- package/browser/es5/ai.clck.3.0.3-nightly3.2307-24.cjs.js.map +1 -0
- package/browser/es5/ai.clck.3.0.3-nightly3.2307-24.cjs.min.js +6 -0
- package/browser/es5/ai.clck.3.0.3-nightly3.2307-24.cjs.min.js.map +1 -0
- package/browser/es5/{ai.clck.3.0.3-nightly3.2305-14.cjs.js → ai.clck.3.0.3-nightly3.2307-24.gbl.js} +174 -99
- package/browser/es5/ai.clck.3.0.3-nightly3.2307-24.gbl.js.map +1 -0
- package/browser/es5/ai.clck.3.0.3-nightly3.2307-24.gbl.min.js +6 -0
- package/browser/es5/ai.clck.3.0.3-nightly3.2307-24.gbl.min.js.map +1 -0
- package/browser/es5/ai.clck.3.0.3-nightly3.2307-24.integrity.json +66 -0
- package/browser/es5/{ai.clck.3.0.3-nightly3.2305-14.js → ai.clck.3.0.3-nightly3.2307-24.js} +153 -101
- package/browser/es5/ai.clck.3.0.3-nightly3.2307-24.js.map +1 -0
- package/browser/es5/ai.clck.3.0.3-nightly3.2307-24.min.js +6 -0
- package/browser/es5/ai.clck.3.0.3-nightly3.2307-24.min.js.map +1 -0
- package/browser/es5/ai.clck.3.cjs.js +150 -98
- 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 +152 -100
- 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 +66 -0
- package/browser/es5/ai.clck.3.js +152 -100
- 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 +150 -98
- 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 +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 +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 +1 -1
- package/dist-es5/handlers/DomContentHandler.js +1 -1
- package/package.json +7 -6
- package/types/applicationinsights-clickanalytics-js.d.ts +141 -1
- package/types/applicationinsights-clickanalytics-js.namespaced.d.ts +141 -1
- package/browser/es5/ai.clck.3.0.3-nightly3.2305-14.cjs.js.map +0 -1
- package/browser/es5/ai.clck.3.0.3-nightly3.2305-14.cjs.min.js +0 -6
- package/browser/es5/ai.clck.3.0.3-nightly3.2305-14.cjs.min.js.map +0 -1
- package/browser/es5/ai.clck.3.0.3-nightly3.2305-14.gbl.js.map +0 -1
- package/browser/es5/ai.clck.3.0.3-nightly3.2305-14.gbl.min.js +0 -6
- package/browser/es5/ai.clck.3.0.3-nightly3.2305-14.gbl.min.js.map +0 -1
- package/browser/es5/ai.clck.3.0.3-nightly3.2305-14.integrity.json +0 -66
- package/browser/es5/ai.clck.3.0.3-nightly3.2305-14.js.map +0 -1
- package/browser/es5/ai.clck.3.0.3-nightly3.2305-14.min.js +0 -6
- package/browser/es5/ai.clck.3.0.3-nightly3.2305-14.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.0.3-nightly3.
|
|
2
|
+
* Application Insights JavaScript SDK - Click Analytics, 3.0.3-nightly3.2307-24
|
|
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 =
|
|
149
|
+
ClickAnalyticsPlugin.Version = '3.0.3-nightly3.2307-24';
|
|
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, _c, _d;\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_BEHAVIOR_VALIDATOR, _DYN_CAPTURE_ALL_META_DAT2, _DYN_CONTENT_NAME, _DYN_DEFAULT_RIGHT_CLICK_3, _DYN_INDEX_OF, _DYN_LENGTH, _DYN_META_DATA_PREFIX, _DYN_PAGE_ACTION_PAGE_TAG0, _DYN_PAGE_NAME, _DYN_PAGE_TYPE, _DYN_PARENT_DATA_TAG, _DYN_REQUEST_URI, _DYN_TRACK_PAGE_ACTION, _DYN_USE_DEFAULT_CONTENT_1, _DYN__DO_UNLOAD } 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((_b = {},\r\n _b[_DYN_PAGE_ACTION_PAGE_TAG0 /* @min:pageActionPageTags */] = cfgDfFunc(),\r\n _b[_DYN_PAGE_NAME /* @min:pageName */] = cfgDfFunc(),\r\n _b[_DYN_CONTENT_NAME /* @min:contentName */] = cfgDfFunc(),\r\n _b)),\r\n pageTags: {},\r\n coreData: cfgDfMerge((_c = {\r\n referrerUri: hasDocument() ? getDocument().referrer : \"\"\r\n },\r\n _c[_DYN_REQUEST_URI /* @min:requestUri */] = cfgDfString(),\r\n _c[_DYN_PAGE_NAME /* @min:pageName */] = cfgDfString(),\r\n _c[_DYN_PAGE_TYPE /* @min:pageType */] = cfgDfString(),\r\n _c)),\r\n dataTags: cfgDfMerge((_d = {},\r\n _d[_DYN_USE_DEFAULT_CONTENT_1 /* @min:useDefaultContentNameOrId */] = false,\r\n _d.aiBlobAttributeTag = DEFAULT_AI_BLOB_ATTRIBUTE_TAG,\r\n _d.customDataPrefix = cfgDfValidate(_dataPrefixChk, DEFAULT_DATA_PREFIX),\r\n _d[_DYN_CAPTURE_ALL_META_DAT2 /* @min:captureAllMetaDataContent */] = false,\r\n _d.dntDataTag = DEFAULT_DONOT_TRACK_TAG,\r\n _d[_DYN_META_DATA_PREFIX /* @min:metaDataPrefix */] = cfgDfString(),\r\n _d[_DYN_PARENT_DATA_TAG /* @min:parentDataTag */] = cfgDfString(),\r\n _d))\r\n },\r\n _a[_DYN_BEHAVIOR_VALIDATOR /* @min:behaviorValidator */] = cfgDfFunc(function (key) { return key || \"\"; }),\r\n _a[_DYN_DEFAULT_RIGHT_CLICK_3 /* @min:defaultRightClickBhvr */] = cfgDfString(),\r\n _a.dropInvalidEvents = false,\r\n _a.urlCollectHash = false,\r\n _a.urlCollectQuery = false,\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[_DYN_PAGE_ACTION_PAGE_TAG0 /* @min:%2epageActionPageTags */], metaTags, logger);\r\n // Default to DOM autoCapture handler\r\n if (_autoCaptureHandler) {\r\n _autoCaptureHandler[_DYN__DO_UNLOAD /* @min:%2e_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\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.0.3-nightly3.2305-14\";\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
|
+
{"version":3,"file":"ClickAnalyticsPlugin.js.map","sources":["ClickAnalyticsPlugin.js"],"sourcesContent":["/**\r\n* @copyright Microsoft 2020\r\n*/\r\nvar _a, _b, _c, _d;\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_BEHAVIOR_VALIDATOR, _DYN_CAPTURE_ALL_META_DAT2, _DYN_CONTENT_NAME, _DYN_DEFAULT_RIGHT_CLICK_3, _DYN_INDEX_OF, _DYN_LENGTH, _DYN_META_DATA_PREFIX, _DYN_PAGE_ACTION_PAGE_TAG0, _DYN_PAGE_NAME, _DYN_PAGE_TYPE, _DYN_PARENT_DATA_TAG, _DYN_REQUEST_URI, _DYN_TRACK_PAGE_ACTION, _DYN_USE_DEFAULT_CONTENT_1, _DYN__DO_UNLOAD } 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((_b = {},\r\n _b[_DYN_PAGE_ACTION_PAGE_TAG0 /* @min:pageActionPageTags */] = cfgDfFunc(),\r\n _b[_DYN_PAGE_NAME /* @min:pageName */] = cfgDfFunc(),\r\n _b[_DYN_CONTENT_NAME /* @min:contentName */] = cfgDfFunc(),\r\n _b)),\r\n pageTags: {},\r\n coreData: cfgDfMerge((_c = {\r\n referrerUri: hasDocument() ? getDocument().referrer : \"\"\r\n },\r\n _c[_DYN_REQUEST_URI /* @min:requestUri */] = cfgDfString(),\r\n _c[_DYN_PAGE_NAME /* @min:pageName */] = cfgDfString(),\r\n _c[_DYN_PAGE_TYPE /* @min:pageType */] = cfgDfString(),\r\n _c)),\r\n dataTags: cfgDfMerge((_d = {},\r\n _d[_DYN_USE_DEFAULT_CONTENT_1 /* @min:useDefaultContentNameOrId */] = false,\r\n _d.aiBlobAttributeTag = DEFAULT_AI_BLOB_ATTRIBUTE_TAG,\r\n _d.customDataPrefix = cfgDfValidate(_dataPrefixChk, DEFAULT_DATA_PREFIX),\r\n _d[_DYN_CAPTURE_ALL_META_DAT2 /* @min:captureAllMetaDataContent */] = false,\r\n _d.dntDataTag = DEFAULT_DONOT_TRACK_TAG,\r\n _d[_DYN_META_DATA_PREFIX /* @min:metaDataPrefix */] = cfgDfString(),\r\n _d[_DYN_PARENT_DATA_TAG /* @min:parentDataTag */] = cfgDfString(),\r\n _d))\r\n },\r\n _a[_DYN_BEHAVIOR_VALIDATOR /* @min:behaviorValidator */] = cfgDfFunc(function (key) { return key || \"\"; }),\r\n _a[_DYN_DEFAULT_RIGHT_CLICK_3 /* @min:defaultRightClickBhvr */] = cfgDfString(),\r\n _a.dropInvalidEvents = false,\r\n _a.urlCollectHash = false,\r\n _a.urlCollectQuery = false,\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[_DYN_PAGE_ACTION_PAGE_TAG0 /* @min:%2epageActionPageTags */], metaTags, logger);\r\n // Default to DOM autoCapture handler\r\n if (_autoCaptureHandler) {\r\n _autoCaptureHandler[_DYN__DO_UNLOAD /* @min:%2e_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\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.0.3-nightly3.2307-24';\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"}
|
package/dist-es5/Enums.js
CHANGED
package/dist-es5/common/Utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/applicationinsights-clickanalytics-js",
|
|
3
|
-
"version": "3.0.3-nightly3.
|
|
3
|
+
"version": "3.0.3-nightly3.2307-24",
|
|
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",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"types": "types/applicationinsights-clickanalytics-js.d.ts",
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"scripts": {
|
|
12
|
+
"clean": "git clean -xdf",
|
|
12
13
|
"build": "npm run build:esm && npm run build:browser && npm run sri && npm run dtsgen",
|
|
13
14
|
"build:esm": "grunt clickanalytics",
|
|
14
15
|
"build:browser": "rollup -c rollup.config.js --bundleConfigAsCjs",
|
|
@@ -26,7 +27,7 @@
|
|
|
26
27
|
"@microsoft/ai-test-framework": "0.0.1",
|
|
27
28
|
"@microsoft/applicationinsights-rollup-plugin-uglify3-js": "1.0.0",
|
|
28
29
|
"@microsoft/applicationinsights-rollup-es5": "1.0.2",
|
|
29
|
-
"@microsoft/api-extractor": "^7.18.
|
|
30
|
+
"@microsoft/api-extractor": "^7.18.19",
|
|
30
31
|
"typescript": "^4.9.3",
|
|
31
32
|
"tslib": "^2.0.0",
|
|
32
33
|
"globby": "^11.0.0",
|
|
@@ -48,10 +49,10 @@
|
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"@microsoft/dynamicproto-js": "^2.0.2",
|
|
50
51
|
"@microsoft/applicationinsights-shims": "3.0.1",
|
|
51
|
-
"@microsoft/applicationinsights-core-js": "3.0.3-nightly3.
|
|
52
|
-
"@microsoft/applicationinsights-common": "3.0.3-nightly3.
|
|
53
|
-
"@microsoft/applicationinsights-properties-js": "3.0.3-nightly3.
|
|
54
|
-
"@nevware21/ts-utils": ">= 0.9.
|
|
52
|
+
"@microsoft/applicationinsights-core-js": "3.0.3-nightly3.2307-24",
|
|
53
|
+
"@microsoft/applicationinsights-common": "3.0.3-nightly3.2307-24",
|
|
54
|
+
"@microsoft/applicationinsights-properties-js": "3.0.3-nightly3.2307-24",
|
|
55
|
+
"@nevware21/ts-utils": ">= 0.9.6 < 2.x"
|
|
55
56
|
},
|
|
56
57
|
"repository": {
|
|
57
58
|
"type": "git",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft.ApplicationInsights, 3.0.3-nightly3.
|
|
2
|
+
* Microsoft.ApplicationInsights, 3.0.3-nightly3.2307-24
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -44,6 +44,112 @@ export declare class ClickAnalyticsPlugin extends BaseTelemetryPlugin {
|
|
|
44
44
|
trackPageAction(pageAction?: IPageActionTelemetry, customProperties?: ICustomProperties): void;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
/**
|
|
48
|
+
* ClickAnalytics Configuration
|
|
49
|
+
*/
|
|
50
|
+
export declare interface IClickAnalyticsConfiguration {
|
|
51
|
+
/**
|
|
52
|
+
* Automatic capture configuration. Default is true
|
|
53
|
+
*/
|
|
54
|
+
autoCapture?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Callbacks configuration
|
|
57
|
+
*/
|
|
58
|
+
callback?: IValueCallback;
|
|
59
|
+
/**
|
|
60
|
+
* Page tags
|
|
61
|
+
*/
|
|
62
|
+
pageTags?: {
|
|
63
|
+
[name: string]: string | number | boolean | string[] | number[] | boolean[] | object;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Core data configuration
|
|
67
|
+
*/
|
|
68
|
+
coreData?: ICoreData;
|
|
69
|
+
/**
|
|
70
|
+
* Custom Data Tags provided to ovverride default tags used to capture click data.
|
|
71
|
+
*/
|
|
72
|
+
dataTags?: ICustomDataTags;
|
|
73
|
+
/**
|
|
74
|
+
* Validator to use for the data-bhvr value
|
|
75
|
+
*/
|
|
76
|
+
behaviorValidator?: (value: string | number) => string | number;
|
|
77
|
+
/**
|
|
78
|
+
* Default Behavior value when Right Click event has occured. This
|
|
79
|
+
* value will be ovverriden if the element has the data-*-bhvr attribute present.
|
|
80
|
+
*/
|
|
81
|
+
defaultRightClickBhvr?: string | number;
|
|
82
|
+
/**
|
|
83
|
+
* Flag to drop events that do not have custom event names, no parentId and no data in content (basically no useful click data).
|
|
84
|
+
* Default will be false
|
|
85
|
+
*/
|
|
86
|
+
dropInvalidEvents?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Enables the logging of values after a "#" character of the URL. Default is "false."
|
|
89
|
+
*/
|
|
90
|
+
urlCollectHash?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Enables the logging of the query string of the URL. Default is "false."
|
|
93
|
+
*/
|
|
94
|
+
urlCollectQuery?: boolean;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Core data configuration
|
|
99
|
+
*/
|
|
100
|
+
declare interface ICoreData {
|
|
101
|
+
/**
|
|
102
|
+
* document.referrer is the default. This is used to override the default value.
|
|
103
|
+
*/
|
|
104
|
+
referrerUri?: string;
|
|
105
|
+
/**
|
|
106
|
+
* window.location.href is the default. This is used to override the default value.
|
|
107
|
+
*/
|
|
108
|
+
requestUri?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Default page name is derived from the url. This is used to override the default.
|
|
111
|
+
*/
|
|
112
|
+
pageName?: string;
|
|
113
|
+
/**
|
|
114
|
+
* PageType is captured from a meta tag named awa-pageType. This is used to override the value or bypass defining meta tags.
|
|
115
|
+
*/
|
|
116
|
+
pageType?: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Custom Data Tags Configuration
|
|
121
|
+
*/
|
|
122
|
+
declare interface ICustomDataTags {
|
|
123
|
+
/**
|
|
124
|
+
* 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.
|
|
125
|
+
*/
|
|
126
|
+
useDefaultContentNameOrId?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Automatic capture content name and value of elements which are tagged with provided prefix
|
|
129
|
+
*/
|
|
130
|
+
customDataPrefix?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Click Analytics supports a JSON blob content meta data tagging instead of individual data-* attributes. The default attribute is data-ai-blob. This property allows for changing that attribute name.
|
|
133
|
+
*/
|
|
134
|
+
aiBlobAttributeTag?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Automatic capture metadata name and content with provided prefix
|
|
137
|
+
*/
|
|
138
|
+
metaDataPrefix?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Automatic capture all metadata names and content. Default is false. If enabled this will override provided metaTagPrefix.
|
|
141
|
+
*/
|
|
142
|
+
captureAllMetaDataContent?: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Stop traversing up the DOM to capture content name and value of elements when encountered with this tag
|
|
145
|
+
*/
|
|
146
|
+
parentDataTag?: string;
|
|
147
|
+
/**
|
|
148
|
+
* Custom attribute Tag to not track telemetry data
|
|
149
|
+
*/
|
|
150
|
+
dntDataTag?: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
47
153
|
/**
|
|
48
154
|
* Page Action event
|
|
49
155
|
*/
|
|
@@ -98,4 +204,38 @@ declare interface IPageActionTelemetry extends IEventTelemetry {
|
|
|
98
204
|
parentId?: string;
|
|
99
205
|
}
|
|
100
206
|
|
|
207
|
+
/**
|
|
208
|
+
* PageTags format
|
|
209
|
+
*/
|
|
210
|
+
declare interface IPageTags {
|
|
211
|
+
/**
|
|
212
|
+
* Meta data tags
|
|
213
|
+
*/
|
|
214
|
+
metaTags?: {
|
|
215
|
+
[name: string]: string;
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* Any other page tag
|
|
219
|
+
*/
|
|
220
|
+
[name: string]: string | number | boolean | string[] | number[] | boolean[] | object | undefined;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Value Callbacks configuration
|
|
225
|
+
*/
|
|
226
|
+
declare interface IValueCallback {
|
|
227
|
+
/**
|
|
228
|
+
* Function to override the default pageName capturing behavior.
|
|
229
|
+
*/
|
|
230
|
+
pageName?: () => string;
|
|
231
|
+
/**
|
|
232
|
+
* A callback function to augument the default pageTags collected during pageAction event.
|
|
233
|
+
*/
|
|
234
|
+
pageActionPageTags?: (element?: Element) => IPageTags;
|
|
235
|
+
/**
|
|
236
|
+
* A callback function to populate customized contentName.
|
|
237
|
+
*/
|
|
238
|
+
contentName?: (element?: any, useDefaultContentName?: boolean) => string;
|
|
239
|
+
}
|
|
240
|
+
|
|
101
241
|
export { }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Microsoft.ApplicationInsights, 3.0.3-nightly3.
|
|
2
|
+
* Microsoft.ApplicationInsights, 3.0.3-nightly3.2307-24
|
|
3
3
|
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* Microsoft Application Insights Team
|
|
@@ -39,6 +39,112 @@ declare namespace ApplicationInsights {
|
|
|
39
39
|
trackPageAction(pageAction?: IPageActionTelemetry, customProperties?: ICustomProperties): void;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* ClickAnalytics Configuration
|
|
44
|
+
*/
|
|
45
|
+
interface IClickAnalyticsConfiguration {
|
|
46
|
+
/**
|
|
47
|
+
* Automatic capture configuration. Default is true
|
|
48
|
+
*/
|
|
49
|
+
autoCapture?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Callbacks configuration
|
|
52
|
+
*/
|
|
53
|
+
callback?: IValueCallback;
|
|
54
|
+
/**
|
|
55
|
+
* Page tags
|
|
56
|
+
*/
|
|
57
|
+
pageTags?: {
|
|
58
|
+
[name: string]: string | number | boolean | string[] | number[] | boolean[] | object;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Core data configuration
|
|
62
|
+
*/
|
|
63
|
+
coreData?: ICoreData;
|
|
64
|
+
/**
|
|
65
|
+
* Custom Data Tags provided to ovverride default tags used to capture click data.
|
|
66
|
+
*/
|
|
67
|
+
dataTags?: ICustomDataTags;
|
|
68
|
+
/**
|
|
69
|
+
* Validator to use for the data-bhvr value
|
|
70
|
+
*/
|
|
71
|
+
behaviorValidator?: (value: string | number) => string | number;
|
|
72
|
+
/**
|
|
73
|
+
* Default Behavior value when Right Click event has occured. This
|
|
74
|
+
* value will be ovverriden if the element has the data-*-bhvr attribute present.
|
|
75
|
+
*/
|
|
76
|
+
defaultRightClickBhvr?: string | number;
|
|
77
|
+
/**
|
|
78
|
+
* Flag to drop events that do not have custom event names, no parentId and no data in content (basically no useful click data).
|
|
79
|
+
* Default will be false
|
|
80
|
+
*/
|
|
81
|
+
dropInvalidEvents?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Enables the logging of values after a "#" character of the URL. Default is "false."
|
|
84
|
+
*/
|
|
85
|
+
urlCollectHash?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Enables the logging of the query string of the URL. Default is "false."
|
|
88
|
+
*/
|
|
89
|
+
urlCollectQuery?: boolean;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Core data configuration
|
|
94
|
+
*/
|
|
95
|
+
interface ICoreData {
|
|
96
|
+
/**
|
|
97
|
+
* document.referrer is the default. This is used to override the default value.
|
|
98
|
+
*/
|
|
99
|
+
referrerUri?: string;
|
|
100
|
+
/**
|
|
101
|
+
* window.location.href is the default. This is used to override the default value.
|
|
102
|
+
*/
|
|
103
|
+
requestUri?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Default page name is derived from the url. This is used to override the default.
|
|
106
|
+
*/
|
|
107
|
+
pageName?: string;
|
|
108
|
+
/**
|
|
109
|
+
* PageType is captured from a meta tag named awa-pageType. This is used to override the value or bypass defining meta tags.
|
|
110
|
+
*/
|
|
111
|
+
pageType?: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Custom Data Tags Configuration
|
|
116
|
+
*/
|
|
117
|
+
interface ICustomDataTags {
|
|
118
|
+
/**
|
|
119
|
+
* 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.
|
|
120
|
+
*/
|
|
121
|
+
useDefaultContentNameOrId?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Automatic capture content name and value of elements which are tagged with provided prefix
|
|
124
|
+
*/
|
|
125
|
+
customDataPrefix?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Click Analytics supports a JSON blob content meta data tagging instead of individual data-* attributes. The default attribute is data-ai-blob. This property allows for changing that attribute name.
|
|
128
|
+
*/
|
|
129
|
+
aiBlobAttributeTag?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Automatic capture metadata name and content with provided prefix
|
|
132
|
+
*/
|
|
133
|
+
metaDataPrefix?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Automatic capture all metadata names and content. Default is false. If enabled this will override provided metaTagPrefix.
|
|
136
|
+
*/
|
|
137
|
+
captureAllMetaDataContent?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Stop traversing up the DOM to capture content name and value of elements when encountered with this tag
|
|
140
|
+
*/
|
|
141
|
+
parentDataTag?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Custom attribute Tag to not track telemetry data
|
|
144
|
+
*/
|
|
145
|
+
dntDataTag?: string;
|
|
146
|
+
}
|
|
147
|
+
|
|
42
148
|
/**
|
|
43
149
|
* Page Action event
|
|
44
150
|
*/
|
|
@@ -93,5 +199,39 @@ declare namespace ApplicationInsights {
|
|
|
93
199
|
parentId?: string;
|
|
94
200
|
}
|
|
95
201
|
|
|
202
|
+
/**
|
|
203
|
+
* PageTags format
|
|
204
|
+
*/
|
|
205
|
+
interface IPageTags {
|
|
206
|
+
/**
|
|
207
|
+
* Meta data tags
|
|
208
|
+
*/
|
|
209
|
+
metaTags?: {
|
|
210
|
+
[name: string]: string;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Any other page tag
|
|
214
|
+
*/
|
|
215
|
+
[name: string]: string | number | boolean | string[] | number[] | boolean[] | object | undefined;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Value Callbacks configuration
|
|
220
|
+
*/
|
|
221
|
+
interface IValueCallback {
|
|
222
|
+
/**
|
|
223
|
+
* Function to override the default pageName capturing behavior.
|
|
224
|
+
*/
|
|
225
|
+
pageName?: () => string;
|
|
226
|
+
/**
|
|
227
|
+
* A callback function to augument the default pageTags collected during pageAction event.
|
|
228
|
+
*/
|
|
229
|
+
pageActionPageTags?: (element?: Element) => IPageTags;
|
|
230
|
+
/**
|
|
231
|
+
* A callback function to populate customized contentName.
|
|
232
|
+
*/
|
|
233
|
+
contentName?: (element?: any, useDefaultContentName?: boolean) => string;
|
|
234
|
+
}
|
|
235
|
+
|
|
96
236
|
|
|
97
237
|
}
|