analytics-client
Advanced tools
Comparing version 2.0.0-feature-use-ts-client-3c1193910d44f9dab951c1a429f0d5e1e018f61c to 2.0.0-feature-use-ts-client-7e0074d7ec0239e5b9f6e8bc4ee02a0892d1ebd3-1
export { AnalyticsUrlParams } from './src/url-params'; | ||
export { Client, Config, createClient, createNoopClient } from './src/client'; | ||
export { createMarketingClient } from './src/marketingClient'; | ||
export { Experiment, LocalExperiment } from './src/experiment'; | ||
export { WebTracker, createWebTracker } from './src/web'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createWebTracker = exports.createNoopClient = exports.createClient = exports.AnalyticsUrlParams = void 0; | ||
exports.createWebTracker = exports.LocalExperiment = exports.createMarketingClient = exports.createNoopClient = exports.createClient = exports.AnalyticsUrlParams = void 0; | ||
var url_params_1 = require("./src/url-params"); | ||
@@ -9,4 +9,8 @@ Object.defineProperty(exports, "AnalyticsUrlParams", { enumerable: true, get: function () { return url_params_1.AnalyticsUrlParams; } }); | ||
Object.defineProperty(exports, "createNoopClient", { enumerable: true, get: function () { return client_1.createNoopClient; } }); | ||
var marketingClient_1 = require("./src/marketingClient"); | ||
Object.defineProperty(exports, "createMarketingClient", { enumerable: true, get: function () { return marketingClient_1.createMarketingClient; } }); | ||
var experiment_1 = require("./src/experiment"); | ||
Object.defineProperty(exports, "LocalExperiment", { enumerable: true, get: function () { return experiment_1.LocalExperiment; } }); | ||
var web_1 = require("./src/web"); | ||
Object.defineProperty(exports, "createWebTracker", { enumerable: true, get: function () { return web_1.createWebTracker; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -27,2 +27,3 @@ { | ||
"@amplitude/analytics-browser": "^1.5.4", | ||
"@amplitude/marketing-analytics-browser": "^0.2.4", | ||
"js-cookie": "^3.0.1" | ||
@@ -60,4 +61,4 @@ }, | ||
"versionist": { | ||
"publishedAt": "2022-10-23T18:35:13.331Z" | ||
"publishedAt": "2022-11-02T12:44:39.594Z" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import * as amplitude from '@amplitude/analytics-browser'; | ||
import { Identify, Types } from '@amplitude/analytics-browser'; | ||
export interface Properties { | ||
@@ -19,3 +19,3 @@ [key: string]: any; | ||
setUserProperties(props: UserProperties): void; | ||
identify(identify: amplitude.Identify): void; | ||
identify(identify: Identify): void; | ||
} | ||
@@ -27,3 +27,3 @@ export interface Config { | ||
componentVersion?: string; | ||
amplitude?: Omit<amplitude.Types.BrowserOptions, keyof AmplitudeOverride>; | ||
amplitude?: Omit<Types.BrowserOptions, keyof AmplitudeOverride>; | ||
deviceId?: string; | ||
@@ -30,0 +30,0 @@ } |
@@ -13,7 +13,8 @@ "use strict"; | ||
exports.createNoopClient = exports.createClient = void 0; | ||
var amplitude = require("@amplitude/analytics-browser"); | ||
var analytics_browser_1 = require("@amplitude/analytics-browser"); | ||
var package_json_1 = require("../package.json"); | ||
var common_1 = require("./common"); | ||
var config_1 = require("./config"); | ||
var getIdentifyObject = function () { | ||
var identifyObject = new amplitude.Identify(); | ||
var identifyObject = new analytics_browser_1.Identify(); | ||
identifyObject.set(config_1.USER_PROP_ANALYTICS_CLIENT_VERSION, package_json_1.version); | ||
@@ -24,6 +25,6 @@ return identifyObject; | ||
function DefaultClient(config) { | ||
this.amplitudeInstance = amplitude.createInstance(); | ||
this.amplitudeInstance = (0, analytics_browser_1.createInstance)(); | ||
var amplConfig = Object.assign({}, config.amplitude); | ||
if (config.endpoint) { | ||
amplConfig.serverUrl = "https://".concat(config.endpoint, "/amplitude/2/httpapi"); | ||
amplConfig.serverUrl = (0, common_1.getAmplitudeEndpoint)(config.endpoint); | ||
} | ||
@@ -89,3 +90,3 @@ if (config.deviceId) { | ||
DefaultClient.prototype.setUserProperties = function (props) { | ||
var identify = new amplitude.Identify(); | ||
var identify = new analytics_browser_1.Identify(); | ||
for (var key in props.set) { | ||
@@ -92,0 +93,0 @@ if (props.set.hasOwnProperty(key)) { |
{ | ||
"name": "analytics-client", | ||
"version": "2.0.0-feature-use-ts-client-3c1193910d44f9dab951c1a429f0d5e1e018f61c", | ||
"version": "2.0.0-feature-use-ts-client-7e0074d7ec0239e5b9f6e8bc4ee02a0892d1ebd3-1", | ||
"description": "Convenient builders to compose analytics tools", | ||
@@ -27,2 +27,3 @@ "repository": { | ||
"@amplitude/analytics-browser": "^1.5.4", | ||
"@amplitude/marketing-analytics-browser": "^0.2.4", | ||
"js-cookie": "^3.0.1" | ||
@@ -60,4 +61,4 @@ }, | ||
"versionist": { | ||
"publishedAt": "2022-10-23T18:35:13.331Z" | ||
"publishedAt": "2022-11-02T12:44:39.594Z" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
154425
28
638
3
+ Added@amplitude/analytics-client-common@0.4.1(transitive)
+ Added@amplitude/analytics-core@0.10.1(transitive)
+ Added@amplitude/analytics-types@0.13.0(transitive)
+ Added@amplitude/marketing-analytics-browser@0.2.9(transitive)
+ Added@amplitude/plugin-page-view-tracking-browser@0.4.9(transitive)
+ Added@amplitude/plugin-web-attribution-browser@0.4.2(transitive)