@uniswap/analytics
Advanced tools
Comparing version 1.2.0 to 1.3.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.user = exports.sendAnalyticsEvent = exports.initializeAnalytics = exports.analyticsConfig = void 0; | ||
exports.user = exports.getSessionId = exports.getUserId = exports.getDeviceId = exports.sendAnalyticsEvent = exports.initializeAnalytics = exports.analyticsConfig = void 0; | ||
const analytics_browser_1 = require("@amplitude/analytics-browser"); | ||
@@ -57,2 +57,14 @@ const ApplicationTransport_1 = require("./ApplicationTransport"); | ||
exports.sendAnalyticsEvent = sendAnalyticsEvent; | ||
function getDeviceId() { | ||
return (0, analytics_browser_1.getDeviceId)(); | ||
} | ||
exports.getDeviceId = getDeviceId; | ||
function getUserId() { | ||
return (0, analytics_browser_1.getUserId)(); | ||
} | ||
exports.getUserId = getUserId; | ||
function getSessionId() { | ||
return (0, analytics_browser_1.getSessionId)(); | ||
} | ||
exports.getSessionId = getSessionId; | ||
/** | ||
@@ -59,0 +71,0 @@ * Class that exposes methods to mutate the User Model's properties in |
@@ -17,3 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.OriginApplication = exports.user = exports.sendAnalyticsEvent = exports.initializeAnalytics = void 0; | ||
exports.OriginApplication = exports.user = exports.getUserId = exports.getSessionId = exports.getDeviceId = exports.sendAnalyticsEvent = exports.initializeAnalytics = void 0; | ||
__exportStar(require("./analytics/Trace.js"), exports); | ||
@@ -24,4 +24,7 @@ __exportStar(require("./analytics/TraceEvent.js"), exports); | ||
Object.defineProperty(exports, "sendAnalyticsEvent", { enumerable: true, get: function () { return index_js_1.sendAnalyticsEvent; } }); | ||
Object.defineProperty(exports, "getDeviceId", { enumerable: true, get: function () { return index_js_1.getDeviceId; } }); | ||
Object.defineProperty(exports, "getSessionId", { enumerable: true, get: function () { return index_js_1.getSessionId; } }); | ||
Object.defineProperty(exports, "getUserId", { enumerable: true, get: function () { return index_js_1.getUserId; } }); | ||
Object.defineProperty(exports, "user", { enumerable: true, get: function () { return index_js_1.user; } }); | ||
var ApplicationTransport_js_1 = require("./analytics/ApplicationTransport.js"); | ||
Object.defineProperty(exports, "OriginApplication", { enumerable: true, get: function () { return ApplicationTransport_js_1.OriginApplication; } }); |
@@ -23,2 +23,5 @@ import { OriginApplication } from './ApplicationTransport'; | ||
export declare function sendAnalyticsEvent(eventName: string, eventProperties?: Record<string, unknown>): void; | ||
export declare function getDeviceId(): string | undefined; | ||
export declare function getUserId(): string | undefined; | ||
export declare function getSessionId(): number | undefined; | ||
declare type UserValue = string | number | boolean | string[] | number[]; | ||
@@ -25,0 +28,0 @@ /** |
export * from './analytics/Trace.js'; | ||
export * from './analytics/TraceEvent.js'; | ||
export { initializeAnalytics, sendAnalyticsEvent, user } from './analytics/index.js'; | ||
export { initializeAnalytics, sendAnalyticsEvent, getDeviceId, getSessionId, getUserId, user, } from './analytics/index.js'; | ||
export { OriginApplication } from './analytics/ApplicationTransport.js'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { Identify, identify, init, track } from '@amplitude/analytics-browser'; | ||
import { Identify, identify, init, track, getDeviceId as getAmplitudeDeviceId, getUserId as getAmplitudeUserId, getSessionId as getAmplitudeSessionId, } from '@amplitude/analytics-browser'; | ||
import { ApplicationTransport } from './ApplicationTransport'; | ||
@@ -53,2 +53,11 @@ let isInitialized = false; | ||
} | ||
export function getDeviceId() { | ||
return getAmplitudeDeviceId(); | ||
} | ||
export function getUserId() { | ||
return getAmplitudeUserId(); | ||
} | ||
export function getSessionId() { | ||
return getAmplitudeSessionId(); | ||
} | ||
/** | ||
@@ -55,0 +64,0 @@ * Class that exposes methods to mutate the User Model's properties in |
@@ -23,2 +23,5 @@ import { OriginApplication } from './ApplicationTransport'; | ||
export declare function sendAnalyticsEvent(eventName: string, eventProperties?: Record<string, unknown>): void; | ||
export declare function getDeviceId(): string | undefined; | ||
export declare function getUserId(): string | undefined; | ||
export declare function getSessionId(): number | undefined; | ||
declare type UserValue = string | number | boolean | string[] | number[]; | ||
@@ -25,0 +28,0 @@ /** |
export * from './analytics/Trace.js'; | ||
export * from './analytics/TraceEvent.js'; | ||
export { initializeAnalytics, sendAnalyticsEvent, user } from './analytics/index.js'; | ||
export { initializeAnalytics, sendAnalyticsEvent, getDeviceId, getSessionId, getUserId, user, } from './analytics/index.js'; | ||
export { OriginApplication } from './analytics/ApplicationTransport.js'; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@uniswap/analytics", | ||
"description": "Uniswap analytics", | ||
"repository": "https://github.com/Uniswap/analytics", | ||
"license": "MIT", | ||
@@ -71,3 +72,3 @@ "publishConfig": { | ||
}, | ||
"version": "1.2.0" | ||
"version": "1.3.0" | ||
} |
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
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 repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
82229
713