rozmova-analytics 1.1.47 → 1.1.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,57 +1,56 @@
1
1
  {
2
2
  "name": "rozmova-analytics",
3
- "version": "1.1.47",
3
+ "version": "1.1.49",
4
4
  "description": "A collection of JavaScript functions for Rozmova analytics",
5
- "main": "dist/index.js",
6
- "module": "dist/index.esm.js",
7
- "types": "dist/index.d.ts",
8
- "scripts": {
9
- "build": "rollup -c",
10
- "lint": "eslint 'src/**/*.{ts,tsx}'",
11
- "lint:fix": "eslint 'src/**/*.{ts,tsx}' --fix",
12
- "format": "prettier --write 'src/**/*.{ts,tsx}'",
13
- "prepare": "husky install"
14
- },
15
- "keywords": [
16
- "analytics",
17
- "google-analytics",
18
- "mixpanel",
19
- "javascript",
20
- "npm-package"
21
- ],
22
5
  "author": "Bohdan Solokha",
23
6
  "license": "MIT",
7
+ "type": "module",
8
+ "main": "./dist/index.cjs",
9
+ "module": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "import": {
14
+ "types": "./dist/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "require": {
18
+ "types": "./dist/index.d.cts",
19
+ "default": "./dist/index.cjs"
20
+ }
21
+ }
22
+ },
24
23
  "files": [
25
24
  "dist"
26
25
  ],
26
+ "sideEffects": false,
27
+ "dependencies": {
28
+ "js-cookie": "^3.0.5",
29
+ "mixpanel-browser": "^2.78.0",
30
+ "nanoid": "^3.3.8",
31
+ "vanilla-cookieconsent": "^3.0.1"
32
+ },
27
33
  "devDependencies": {
28
- "@babel/cli": "^7.22.0",
29
- "@babel/core": "^7.22.0",
30
- "@babel/preset-env": "^7.22.0",
31
- "@babel/preset-typescript": "^7.26.0",
32
- "@rollup/plugin-commonjs": "^28.0.2",
33
- "@rollup/plugin-node-resolve": "^16.0.0",
34
- "@rollup/plugin-terser": "^0.4.4",
35
34
  "@types/gtag.js": "^0.0.20",
36
35
  "@types/js-cookie": "^3.0.6",
37
- "@types/mixpanel-browser": "^2.50.2",
38
36
  "@types/node": "^22.10.2",
39
- "@typescript-eslint/eslint-plugin": "^8.18.2",
40
- "@typescript-eslint/parser": "^8.18.2",
41
- "eslint": "^8.57.0",
42
- "eslint-config-prettier": "^9.1.0",
43
- "eslint-plugin-import": "^2.31.0",
44
- "eslint-plugin-prettier": "^5.2.1",
45
- "husky": "^8.0.0",
46
- "prettier": "^3.4.2",
47
- "rollup": "^4.30.0",
48
- "rollup-plugin-typescript2": "^0.36.0",
37
+ "tsup": "^8.5.1",
49
38
  "typescript": "^5.7.2"
50
39
  },
51
- "dependencies": {
52
- "js-cookie": "^3.0.5",
53
- "mixpanel-browser": "^2.78.0",
54
- "nanoid": "^3.3.8",
55
- "vanilla-cookieconsent": "^3.0.1"
40
+ "keywords": [
41
+ "analytics",
42
+ "google-analytics",
43
+ "mixpanel"
44
+ ],
45
+ "scripts": {
46
+ "prebuild": "rm -rf dist",
47
+ "build": "tsup",
48
+ "dev": "tsup --watch",
49
+ "clean": "rm -rf dist",
50
+ "check": "biome check ./src",
51
+ "check:fix": "biome check --write ./src",
52
+ "format": "biome format --write ./src",
53
+ "lint": "biome lint ./src",
54
+ "type-check": "tsc --noEmit"
56
55
  }
57
- }
56
+ }
@@ -1,21 +0,0 @@
1
- import { EventParams } from "./types";
2
- export declare function insertCustomerIOScript(): void;
3
- export declare const generateUserId: () => string;
4
- export declare const getUserId: () => string;
5
- export declare const getCurrentParams: () => any;
6
- export declare const storeGeoParam: () => void;
7
- export declare const initialLoginEvent: (trackEvent: (eventName: string, properties?: EventParams, services?: {
8
- ga?: boolean;
9
- mixpanel?: boolean;
10
- customerIO?: boolean;
11
- }) => void) => void;
12
- export declare const setProfileId: (profileId: string) => void;
13
- export declare const getProfileId: () => string | undefined;
14
- export declare const resetProfileId: () => void;
15
- export declare const setProfileEmail: (email: string) => void;
16
- export declare const getProfileEmail: () => string | undefined;
17
- export declare const resetProfileEmail: () => void;
18
- export declare const getLastListNameAndIndex: () => {
19
- listName: string | null;
20
- index: string | null;
21
- };
@@ -1,12 +0,0 @@
1
- export declare const USER_ID_KEY = "rid";
2
- export declare const PARAMS_COOKIE_NAME = "rozmovaAnalyticsParams";
3
- export declare const UTM_KEYS: string[];
4
- export declare const GOOGLE_ANALYTICS_ID = "G-GYQLL028VQ";
5
- export declare const GA_SERVER_CONTAINER_URL = "https://tagging.clearly.help";
6
- export declare const MIXPANEL_TOKEN = "9d4cb3d213e5aee689ea01dd68ad65ad";
7
- export declare const CUSTOMER_IO_WRITE_KEY = "e6d009719c77519432c3";
8
- export declare const SUPPORTED_LANGUAGES: string[];
9
- export declare const GA_ECOMMERCE_EVENTS: string[];
10
- export declare const INTERNAL_USER_EMAILS: string[];
11
- export declare const CREATE_THERAPY_PAGE_PLACEMENT_KEY = "createTherapyPlacementPage";
12
- export declare const RANKING_SESSION_ID_KEY = "rankingSessionId";
@@ -1 +0,0 @@
1
- export declare const initCookieConsentBanner: (lng: string, isClearly: boolean) => void;
package/dist/helpers.d.ts DELETED
@@ -1,21 +0,0 @@
1
- export declare const setQueryParam: (name: string, value: string) => void;
2
- export declare const getQueryParam: (name: string) => string | null;
3
- export declare const isMetaBrowser: () => any;
4
- export declare const getBrowserLanguage: () => string;
5
- export declare function detectBrowser(): "Microsoft Edge" | "Chrome" | "Firefox" | "Safari" | "Opera" | "Internet Explorer" | "Unknown";
6
- export declare function detectDeviceType(): "Mobile" | "Desktop";
7
- export declare function detectOS(): "Windows" | "macOS" | "Linux" | "Android" | "iOS" | "Unknown OS";
8
- export declare const getDomain: () => string;
9
- export declare const getReferrer: () => string | null;
10
- export declare function getSearchQueryFromReferrer(): string | null;
11
- export declare const getClientIdFromCookies: () => string | null;
12
- export declare const getGAClientId: () => Promise<string | null>;
13
- export declare function getGASessionId(): string | null;
14
- export declare const setGAClientId: (clientId: string) => void;
15
- export declare const getLocaleFromURL: (isClearly?: boolean) => string;
16
- export declare const getUserType: (email?: string) => "external" | "internal";
17
- export declare function shallowEqual(obj1: Record<string, unknown>, obj2: Record<string, unknown>): boolean;
18
- export declare function toNumberValue(value: number | string | null): number | null;
19
- export declare function b64EncodeUnicode(str: string): string;
20
- export declare const getAPIEndpoint: (isProd: boolean, endpoint: string) => string;
21
- export declare const isNewSession: (prevSessionIdKey: string) => boolean;