@amplitude/analytics-client-common
Advanced tools
Comparing version 2.2.4 to 2.2.5-featureremoteconfig.0
@@ -1,9 +0,18 @@ | ||
import { AttributionOptions, BrowserOptions, DefaultTrackingOptions, PageTrackingOptions } from '@amplitude/analytics-types'; | ||
export declare const isAttributionTrackingEnabled: (defaultTracking: DefaultTrackingOptions | boolean | undefined) => boolean; | ||
export declare const isFileDownloadTrackingEnabled: (defaultTracking: DefaultTrackingOptions | boolean | undefined) => boolean; | ||
export declare const isFormInteractionTrackingEnabled: (defaultTracking: DefaultTrackingOptions | boolean | undefined) => boolean; | ||
export declare const isPageViewTrackingEnabled: (defaultTracking: DefaultTrackingOptions | boolean | undefined) => boolean; | ||
export declare const isSessionTrackingEnabled: (defaultTracking: DefaultTrackingOptions | boolean | undefined) => boolean; | ||
import { AttributionOptions, AutocaptureOptions, BrowserOptions, PageTrackingOptions, ElementInteractionsOptions } from '@amplitude/analytics-types'; | ||
export declare const isAttributionTrackingEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
export declare const isFileDownloadTrackingEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
export declare const isFormInteractionTrackingEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
export declare const isPageViewTrackingEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
export declare const isSessionTrackingEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
/** | ||
* Returns true if | ||
* 1. autocapture === true | ||
* 2. if autocapture.elementInteractions === true | ||
* 3. if autocapture.elementInteractions === object | ||
* otherwise returns false | ||
*/ | ||
export declare const isElementInteractionsEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
export declare const getElementInteractionsConfig: (config: BrowserOptions) => ElementInteractionsOptions | undefined; | ||
export declare const getPageViewTrackingConfig: (config: BrowserOptions) => PageTrackingOptions; | ||
export declare const getAttributionTrackingConfig: (config: BrowserOptions) => AttributionOptions; | ||
//# sourceMappingURL=default-tracking.d.ts.map |
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAttributionTrackingConfig = exports.getPageViewTrackingConfig = exports.isSessionTrackingEnabled = exports.isPageViewTrackingEnabled = exports.isFormInteractionTrackingEnabled = exports.isFileDownloadTrackingEnabled = exports.isAttributionTrackingEnabled = void 0; | ||
exports.getAttributionTrackingConfig = exports.getPageViewTrackingConfig = exports.getElementInteractionsConfig = exports.isElementInteractionsEnabled = exports.isSessionTrackingEnabled = exports.isPageViewTrackingEnabled = exports.isFormInteractionTrackingEnabled = exports.isFileDownloadTrackingEnabled = exports.isAttributionTrackingEnabled = void 0; | ||
var tslib_1 = require("tslib"); | ||
/** | ||
* Returns false if defaultTracking === false or if defaultTracking[event], | ||
* Returns false if autocapture === false or if autocapture[event], | ||
* otherwise returns true | ||
*/ | ||
var isTrackingEnabled = function (defaultTracking, event) { | ||
if (typeof defaultTracking === 'boolean') { | ||
return defaultTracking; | ||
var isTrackingEnabled = function (autocapture, event) { | ||
if (typeof autocapture === 'boolean') { | ||
return autocapture; | ||
} | ||
if ((defaultTracking === null || defaultTracking === void 0 ? void 0 : defaultTracking[event]) === false) { | ||
if ((autocapture === null || autocapture === void 0 ? void 0 : autocapture[event]) === false) { | ||
return false; | ||
@@ -17,22 +17,49 @@ } | ||
}; | ||
var isAttributionTrackingEnabled = function (defaultTracking) { | ||
return isTrackingEnabled(defaultTracking, 'attribution'); | ||
var isAttributionTrackingEnabled = function (autocapture) { | ||
return isTrackingEnabled(autocapture, 'attribution'); | ||
}; | ||
exports.isAttributionTrackingEnabled = isAttributionTrackingEnabled; | ||
var isFileDownloadTrackingEnabled = function (defaultTracking) { | ||
return isTrackingEnabled(defaultTracking, 'fileDownloads'); | ||
var isFileDownloadTrackingEnabled = function (autocapture) { | ||
return isTrackingEnabled(autocapture, 'fileDownloads'); | ||
}; | ||
exports.isFileDownloadTrackingEnabled = isFileDownloadTrackingEnabled; | ||
var isFormInteractionTrackingEnabled = function (defaultTracking) { | ||
return isTrackingEnabled(defaultTracking, 'formInteractions'); | ||
var isFormInteractionTrackingEnabled = function (autocapture) { | ||
return isTrackingEnabled(autocapture, 'formInteractions'); | ||
}; | ||
exports.isFormInteractionTrackingEnabled = isFormInteractionTrackingEnabled; | ||
var isPageViewTrackingEnabled = function (defaultTracking) { | ||
return isTrackingEnabled(defaultTracking, 'pageViews'); | ||
var isPageViewTrackingEnabled = function (autocapture) { | ||
return isTrackingEnabled(autocapture, 'pageViews'); | ||
}; | ||
exports.isPageViewTrackingEnabled = isPageViewTrackingEnabled; | ||
var isSessionTrackingEnabled = function (defaultTracking) { | ||
return isTrackingEnabled(defaultTracking, 'sessions'); | ||
var isSessionTrackingEnabled = function (autocapture) { | ||
return isTrackingEnabled(autocapture, 'sessions'); | ||
}; | ||
exports.isSessionTrackingEnabled = isSessionTrackingEnabled; | ||
/** | ||
* Returns true if | ||
* 1. autocapture === true | ||
* 2. if autocapture.elementInteractions === true | ||
* 3. if autocapture.elementInteractions === object | ||
* otherwise returns false | ||
*/ | ||
var isElementInteractionsEnabled = function (autocapture) { | ||
if (typeof autocapture === 'boolean') { | ||
return autocapture; | ||
} | ||
if (typeof autocapture === 'object' && | ||
(autocapture.elementInteractions === true || typeof autocapture.elementInteractions === 'object')) { | ||
return true; | ||
} | ||
return false; | ||
}; | ||
exports.isElementInteractionsEnabled = isElementInteractionsEnabled; | ||
var getElementInteractionsConfig = function (config) { | ||
if ((0, exports.isElementInteractionsEnabled)(config.autocapture) && | ||
typeof config.autocapture === 'object' && | ||
typeof config.autocapture.elementInteractions === 'object') { | ||
return config.autocapture.elementInteractions; | ||
} | ||
return undefined; | ||
}; | ||
exports.getElementInteractionsConfig = getElementInteractionsConfig; | ||
var getPageViewTrackingConfig = function (config) { | ||
@@ -39,0 +66,0 @@ var trackOn = function () { return false; }; |
@@ -16,3 +16,3 @@ export { CampaignParser } from './attribution/campaign-parser'; | ||
export { getGlobalScope } from './global-scope'; | ||
export { getPageViewTrackingConfig, getAttributionTrackingConfig, isAttributionTrackingEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, isPageViewTrackingEnabled, isSessionTrackingEnabled, } from './default-tracking'; | ||
export { getPageViewTrackingConfig, getAttributionTrackingConfig, getElementInteractionsConfig, isAttributionTrackingEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, isPageViewTrackingEnabled, isSessionTrackingEnabled, isElementInteractionsEnabled, } from './default-tracking'; | ||
//# sourceMappingURL=index.d.ts.map |
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isSessionTrackingEnabled = exports.isPageViewTrackingEnabled = exports.isFormInteractionTrackingEnabled = exports.isFileDownloadTrackingEnabled = exports.isAttributionTrackingEnabled = exports.getAttributionTrackingConfig = exports.getPageViewTrackingConfig = exports.getGlobalScope = exports.getLanguage = exports.IdentityEventSender = exports.setConnectorUserId = exports.setConnectorDeviceId = exports.getAnalyticsConnector = exports.FetchTransport = exports.CookieStorage = exports.getStorageKey = exports.getOldCookieName = exports.getCookieName = exports.isNewSession = exports.getQueryParams = exports.BASE_CAMPAIGN = exports.WebAttribution = exports.getDefaultExcludedReferrers = exports.createCampaignEvent = exports.isExcludedReferrer = exports.isNewCampaign = exports.CampaignTracker = exports.CampaignParser = void 0; | ||
exports.isElementInteractionsEnabled = exports.isSessionTrackingEnabled = exports.isPageViewTrackingEnabled = exports.isFormInteractionTrackingEnabled = exports.isFileDownloadTrackingEnabled = exports.isAttributionTrackingEnabled = exports.getElementInteractionsConfig = exports.getAttributionTrackingConfig = exports.getPageViewTrackingConfig = exports.getGlobalScope = exports.getLanguage = exports.IdentityEventSender = exports.setConnectorUserId = exports.setConnectorDeviceId = exports.getAnalyticsConnector = exports.FetchTransport = exports.CookieStorage = exports.getStorageKey = exports.getOldCookieName = exports.getCookieName = exports.isNewSession = exports.getQueryParams = exports.BASE_CAMPAIGN = exports.WebAttribution = exports.getDefaultExcludedReferrers = exports.createCampaignEvent = exports.isExcludedReferrer = exports.isNewCampaign = exports.CampaignTracker = exports.CampaignParser = void 0; | ||
var campaign_parser_1 = require("./attribution/campaign-parser"); | ||
@@ -42,2 +42,3 @@ Object.defineProperty(exports, "CampaignParser", { enumerable: true, get: function () { return campaign_parser_1.CampaignParser; } }); | ||
Object.defineProperty(exports, "getAttributionTrackingConfig", { enumerable: true, get: function () { return default_tracking_1.getAttributionTrackingConfig; } }); | ||
Object.defineProperty(exports, "getElementInteractionsConfig", { enumerable: true, get: function () { return default_tracking_1.getElementInteractionsConfig; } }); | ||
Object.defineProperty(exports, "isAttributionTrackingEnabled", { enumerable: true, get: function () { return default_tracking_1.isAttributionTrackingEnabled; } }); | ||
@@ -48,2 +49,3 @@ Object.defineProperty(exports, "isFileDownloadTrackingEnabled", { enumerable: true, get: function () { return default_tracking_1.isFileDownloadTrackingEnabled; } }); | ||
Object.defineProperty(exports, "isSessionTrackingEnabled", { enumerable: true, get: function () { return default_tracking_1.isSessionTrackingEnabled; } }); | ||
Object.defineProperty(exports, "isElementInteractionsEnabled", { enumerable: true, get: function () { return default_tracking_1.isElementInteractionsEnabled; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -1,9 +0,18 @@ | ||
import { AttributionOptions, BrowserOptions, DefaultTrackingOptions, PageTrackingOptions } from '@amplitude/analytics-types'; | ||
export declare const isAttributionTrackingEnabled: (defaultTracking: DefaultTrackingOptions | boolean | undefined) => boolean; | ||
export declare const isFileDownloadTrackingEnabled: (defaultTracking: DefaultTrackingOptions | boolean | undefined) => boolean; | ||
export declare const isFormInteractionTrackingEnabled: (defaultTracking: DefaultTrackingOptions | boolean | undefined) => boolean; | ||
export declare const isPageViewTrackingEnabled: (defaultTracking: DefaultTrackingOptions | boolean | undefined) => boolean; | ||
export declare const isSessionTrackingEnabled: (defaultTracking: DefaultTrackingOptions | boolean | undefined) => boolean; | ||
import { AttributionOptions, AutocaptureOptions, BrowserOptions, PageTrackingOptions, ElementInteractionsOptions } from '@amplitude/analytics-types'; | ||
export declare const isAttributionTrackingEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
export declare const isFileDownloadTrackingEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
export declare const isFormInteractionTrackingEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
export declare const isPageViewTrackingEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
export declare const isSessionTrackingEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
/** | ||
* Returns true if | ||
* 1. autocapture === true | ||
* 2. if autocapture.elementInteractions === true | ||
* 3. if autocapture.elementInteractions === object | ||
* otherwise returns false | ||
*/ | ||
export declare const isElementInteractionsEnabled: (autocapture: AutocaptureOptions | boolean | undefined) => boolean; | ||
export declare const getElementInteractionsConfig: (config: BrowserOptions) => ElementInteractionsOptions | undefined; | ||
export declare const getPageViewTrackingConfig: (config: BrowserOptions) => PageTrackingOptions; | ||
export declare const getAttributionTrackingConfig: (config: BrowserOptions) => AttributionOptions; | ||
//# sourceMappingURL=default-tracking.d.ts.map |
import { __assign } from "tslib"; | ||
/** | ||
* Returns false if defaultTracking === false or if defaultTracking[event], | ||
* Returns false if autocapture === false or if autocapture[event], | ||
* otherwise returns true | ||
*/ | ||
var isTrackingEnabled = function (defaultTracking, event) { | ||
if (typeof defaultTracking === 'boolean') { | ||
return defaultTracking; | ||
var isTrackingEnabled = function (autocapture, event) { | ||
if (typeof autocapture === 'boolean') { | ||
return autocapture; | ||
} | ||
if ((defaultTracking === null || defaultTracking === void 0 ? void 0 : defaultTracking[event]) === false) { | ||
if ((autocapture === null || autocapture === void 0 ? void 0 : autocapture[event]) === false) { | ||
return false; | ||
@@ -15,17 +15,42 @@ } | ||
}; | ||
export var isAttributionTrackingEnabled = function (defaultTracking) { | ||
return isTrackingEnabled(defaultTracking, 'attribution'); | ||
export var isAttributionTrackingEnabled = function (autocapture) { | ||
return isTrackingEnabled(autocapture, 'attribution'); | ||
}; | ||
export var isFileDownloadTrackingEnabled = function (defaultTracking) { | ||
return isTrackingEnabled(defaultTracking, 'fileDownloads'); | ||
export var isFileDownloadTrackingEnabled = function (autocapture) { | ||
return isTrackingEnabled(autocapture, 'fileDownloads'); | ||
}; | ||
export var isFormInteractionTrackingEnabled = function (defaultTracking) { | ||
return isTrackingEnabled(defaultTracking, 'formInteractions'); | ||
export var isFormInteractionTrackingEnabled = function (autocapture) { | ||
return isTrackingEnabled(autocapture, 'formInteractions'); | ||
}; | ||
export var isPageViewTrackingEnabled = function (defaultTracking) { | ||
return isTrackingEnabled(defaultTracking, 'pageViews'); | ||
export var isPageViewTrackingEnabled = function (autocapture) { | ||
return isTrackingEnabled(autocapture, 'pageViews'); | ||
}; | ||
export var isSessionTrackingEnabled = function (defaultTracking) { | ||
return isTrackingEnabled(defaultTracking, 'sessions'); | ||
export var isSessionTrackingEnabled = function (autocapture) { | ||
return isTrackingEnabled(autocapture, 'sessions'); | ||
}; | ||
/** | ||
* Returns true if | ||
* 1. autocapture === true | ||
* 2. if autocapture.elementInteractions === true | ||
* 3. if autocapture.elementInteractions === object | ||
* otherwise returns false | ||
*/ | ||
export var isElementInteractionsEnabled = function (autocapture) { | ||
if (typeof autocapture === 'boolean') { | ||
return autocapture; | ||
} | ||
if (typeof autocapture === 'object' && | ||
(autocapture.elementInteractions === true || typeof autocapture.elementInteractions === 'object')) { | ||
return true; | ||
} | ||
return false; | ||
}; | ||
export var getElementInteractionsConfig = function (config) { | ||
if (isElementInteractionsEnabled(config.autocapture) && | ||
typeof config.autocapture === 'object' && | ||
typeof config.autocapture.elementInteractions === 'object') { | ||
return config.autocapture.elementInteractions; | ||
} | ||
return undefined; | ||
}; | ||
export var getPageViewTrackingConfig = function (config) { | ||
@@ -32,0 +57,0 @@ var trackOn = function () { return false; }; |
@@ -16,3 +16,3 @@ export { CampaignParser } from './attribution/campaign-parser'; | ||
export { getGlobalScope } from './global-scope'; | ||
export { getPageViewTrackingConfig, getAttributionTrackingConfig, isAttributionTrackingEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, isPageViewTrackingEnabled, isSessionTrackingEnabled, } from './default-tracking'; | ||
export { getPageViewTrackingConfig, getAttributionTrackingConfig, getElementInteractionsConfig, isAttributionTrackingEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, isPageViewTrackingEnabled, isSessionTrackingEnabled, isElementInteractionsEnabled, } from './default-tracking'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -16,3 +16,3 @@ export { CampaignParser } from './attribution/campaign-parser'; | ||
export { getGlobalScope } from './global-scope'; | ||
export { getPageViewTrackingConfig, getAttributionTrackingConfig, isAttributionTrackingEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, isPageViewTrackingEnabled, isSessionTrackingEnabled, } from './default-tracking'; | ||
export { getPageViewTrackingConfig, getAttributionTrackingConfig, getElementInteractionsConfig, isAttributionTrackingEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, isPageViewTrackingEnabled, isSessionTrackingEnabled, isElementInteractionsEnabled, } from './default-tracking'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@amplitude/analytics-client-common", | ||
"version": "2.2.4", | ||
"version": "2.2.5-featureremoteconfig.0", | ||
"description": "", | ||
@@ -39,4 +39,4 @@ "author": "Amplitude Inc", | ||
"@amplitude/analytics-connector": "^1.4.8", | ||
"@amplitude/analytics-core": "^2.3.0", | ||
"@amplitude/analytics-types": "^2.6.0", | ||
"@amplitude/analytics-core": "^2.4.0-featureremoteconfig.0", | ||
"@amplitude/analytics-types": "^2.7.0-featureremoteconfig.0", | ||
"tslib": "^2.4.1" | ||
@@ -47,3 +47,3 @@ }, | ||
], | ||
"gitHead": "bd12b9b751890e3e1b802235a748d729c624866f" | ||
"gitHead": "bb0d8e6aadf87baa76ba5b1c3a7268d13d1d2978" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
233069
2149
1