rozmova-analytics 1.0.15 → 1.0.17

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/README.md CHANGED
@@ -13,10 +13,10 @@ Install the package using npm:
13
13
  npm install rozmova-analytics
14
14
  ```
15
15
 
16
- Alternatively, you can include the library via jsDelivr:
16
+ Alternatively, you can include the library via jsDelivr to use in browser:
17
17
 
18
18
  ```bash
19
- <script src="https://cdn.jsdelivr.net/npm/rozmova-analytics/dist/index.js"></script>
19
+ <script src="https://cdn.jsdelivr.net/npm/rozmova-analytics/dist/index.umd.js"></script>
20
20
  ```
21
21
 
22
22
  ## Usage
@@ -45,6 +45,20 @@ setUser('user-id-123', { email: 'user@example.com', name: 'John Doe' });
45
45
  trackEvent('button_click', { button_name: 'Sign Up' });
46
46
  ```
47
47
 
48
+ Or use in browser:
49
+
50
+ ```javascript
51
+
52
+ // Initialize the library
53
+ window.Analytics.init('en', 'web');
54
+
55
+ // Set user
56
+ window.Analytics.setUser('user-id-123', { email: 'user@example.com', name: 'John Doe' });
57
+
58
+ // Track an event
59
+ window.Analytics.trackEvent('button_click', { button_name: 'Sign Up' });
60
+ ```
61
+
48
62
  ## API
49
63
 
50
64
  ### `init(locale?: string, platform?: string)`
@@ -5,3 +5,5 @@ export declare const GOOGLE_ANALYTICS_ID = "G-9PCTLFE0F6";
5
5
  export declare const GA_SERVER_CONTAINER_URL = "https://tagging.clearly.help";
6
6
  export declare const MIXPANEL_TOKEN = "9d4cb3d213e5aee689ea01dd68ad65ad";
7
7
  export declare const CUSTOMER_IO_WRITE_KEY = "e6d009719c77519432c3";
8
+ export declare const IS_CLEARLY: boolean;
9
+ export declare const SUPPORTED_LANGUAGES: string[];
package/dist/helpers.d.ts CHANGED
@@ -10,3 +10,4 @@ export declare const getReferrer: () => string | null;
10
10
  export declare function getSearchQueryFromReferrer(): string | null;
11
11
  export declare const getGAClientId: () => string;
12
12
  export declare function getGASessionId(): string | null;
13
+ export declare const getLocaleFromURL: () => string;