analytics-client
Advanced tools
Comparing version 2.0.0-feature-use-ts-client-92dbefedcaa6c9b515cda6eeaf5b7743907f5629 to 2.0.0-feature-use-ts-client-99530d5c885a4814b8967dbf314f81eb7b6131af
@@ -59,4 +59,4 @@ { | ||
"versionist": { | ||
"publishedAt": "2022-10-23T17:58:18.560Z" | ||
"publishedAt": "2022-10-25T13:55:44.914Z" | ||
} | ||
} |
@@ -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,7 @@ "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 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,3 +24,3 @@ return identifyObject; | ||
function DefaultClient(config) { | ||
this.amplitudeInstance = amplitude.createInstance(); | ||
this.amplitudeInstance = (0, analytics_browser_1.createInstance)(); | ||
var amplConfig = Object.assign({}, config.amplitude); | ||
@@ -89,3 +89,3 @@ if (config.endpoint) { | ||
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 +92,0 @@ if (props.set.hasOwnProperty(key)) { |
@@ -34,3 +34,2 @@ "use strict"; | ||
var entry = window.performance.getEntriesByType('navigation'); | ||
console.log(entry); | ||
if (!entry || entry.length < 1) { | ||
@@ -37,0 +36,0 @@ return {}; |
{ | ||
"name": "analytics-client", | ||
"version": "2.0.0-feature-use-ts-client-92dbefedcaa6c9b515cda6eeaf5b7743907f5629", | ||
"version": "2.0.0-feature-use-ts-client-99530d5c885a4814b8967dbf314f81eb7b6131af", | ||
"description": "Convenient builders to compose analytics tools", | ||
@@ -59,4 +59,4 @@ "repository": { | ||
"versionist": { | ||
"publishedAt": "2022-10-23T17:58:18.560Z" | ||
"publishedAt": "2022-10-25T13:55:44.914Z" | ||
} | ||
} |
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
129678
22
544