Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uniswap/analytics

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uniswap/analytics - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

14

lib/cjs/analytics/index.js
"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

5

lib/cjs/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc