rozmova-analytics 1.1.46 → 1.1.47

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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Dict } from "mixpanel-browser";
1
+ import { Config, Dict } from "mixpanel-browser";
2
2
  import { AnalyticsCommonParams, EventParams, ForcedAttributionProperties, UserAttributionProperties } from "./types";
3
3
  type GConfig = {
4
4
  userId?: string;
@@ -12,13 +12,14 @@ declare class Analytics {
12
12
  private dataLayer;
13
13
  private lastGConfig;
14
14
  private mxDistinctId;
15
- init({ isProd, locale, platform, isClearly, config, trackPageScroll, }?: {
15
+ init({ isProd, locale, platform, isClearly, config, trackPageScroll, mixpanelConfig, }?: {
16
16
  isProd?: boolean;
17
17
  locale?: string;
18
18
  platform?: string;
19
19
  isClearly?: boolean;
20
20
  config?: GConfig;
21
21
  trackPageScroll?: boolean;
22
+ mixpanelConfig?: Partial<Config>;
22
23
  }): Promise<void>;
23
24
  private processDataLayer;
24
25
  getGAClientId(): Promise<string | null>;
@@ -48,11 +49,9 @@ declare class Analytics {
48
49
  getUserId: () => string;
49
50
  getAttributionProperties(forcedAttributionProperties?: ForcedAttributionProperties): Promise<UserAttributionProperties>;
50
51
  trackPageScroll(customElement?: HTMLElement): () => void;
52
+ start_session_recording: () => void;
53
+ stop_session_recording: () => void;
51
54
  trackFirstPartyEvent(eventName: string, properties?: EventParams, forcedAttributionProperties?: ForcedAttributionProperties): Promise<Response>;
52
- recording: {
53
- start: () => void;
54
- stop: () => void;
55
- };
56
55
  }
57
56
  declare const _default: Analytics;
58
57
  export default _default;
package/dist/index.esm.js CHANGED
@@ -31736,7 +31736,7 @@ class Analytics {
31736
31736
  dataLayer = [];
31737
31737
  lastGConfig = {};
31738
31738
  mxDistinctId = null;
31739
- async init({ isProd, locale, platform, isClearly, config, trackPageScroll = true, } = {}) {
31739
+ async init({ isProd, locale, platform, isClearly, config, trackPageScroll = true, mixpanelConfig = {}, } = {}) {
31740
31740
  insertCustomerIOScript();
31741
31741
  storeGeoParam();
31742
31742
  const userId = getUserId();
@@ -31759,6 +31759,7 @@ class Analytics {
31759
31759
  persistence: "cookie",
31760
31760
  batch_requests: false,
31761
31761
  loaded: (mixpanel) => (this.mxDistinctId = mixpanel.get_distinct_id()),
31762
+ ...mixpanelConfig,
31762
31763
  });
31763
31764
  this.setConfig(config);
31764
31765
  this.trackPageView();
@@ -32006,6 +32007,8 @@ class Analytics {
32006
32007
  scrollTarget.addEventListener("scroll", handleScroll);
32007
32008
  return () => scrollTarget.removeEventListener("scroll", handleScroll);
32008
32009
  }
32010
+ start_session_recording = () => mixpanel.start_session_recording();
32011
+ stop_session_recording = () => mixpanel.stop_session_recording();
32009
32012
  async trackFirstPartyEvent(eventName, properties, forcedAttributionProperties) {
32010
32013
  const attributionProperties = await this.getAttributionProperties(forcedAttributionProperties);
32011
32014
  const attributionJSON = JSON.stringify(attributionProperties);
@@ -32021,10 +32024,6 @@ class Analytics {
32021
32024
  headers,
32022
32025
  });
32023
32026
  }
32024
- recording = {
32025
- start: mixpanel.start_session_recording,
32026
- stop: mixpanel.stop_session_recording,
32027
- };
32028
32027
  }
32029
32028
  var index = new Analytics();
32030
32029
 
package/dist/index.js CHANGED
@@ -31738,7 +31738,7 @@ class Analytics {
31738
31738
  dataLayer = [];
31739
31739
  lastGConfig = {};
31740
31740
  mxDistinctId = null;
31741
- async init({ isProd, locale, platform, isClearly, config, trackPageScroll = true, } = {}) {
31741
+ async init({ isProd, locale, platform, isClearly, config, trackPageScroll = true, mixpanelConfig = {}, } = {}) {
31742
31742
  insertCustomerIOScript();
31743
31743
  storeGeoParam();
31744
31744
  const userId = getUserId();
@@ -31761,6 +31761,7 @@ class Analytics {
31761
31761
  persistence: "cookie",
31762
31762
  batch_requests: false,
31763
31763
  loaded: (mixpanel) => (this.mxDistinctId = mixpanel.get_distinct_id()),
31764
+ ...mixpanelConfig,
31764
31765
  });
31765
31766
  this.setConfig(config);
31766
31767
  this.trackPageView();
@@ -32008,6 +32009,8 @@ class Analytics {
32008
32009
  scrollTarget.addEventListener("scroll", handleScroll);
32009
32010
  return () => scrollTarget.removeEventListener("scroll", handleScroll);
32010
32011
  }
32012
+ start_session_recording = () => mixpanel.start_session_recording();
32013
+ stop_session_recording = () => mixpanel.stop_session_recording();
32011
32014
  async trackFirstPartyEvent(eventName, properties, forcedAttributionProperties) {
32012
32015
  const attributionProperties = await this.getAttributionProperties(forcedAttributionProperties);
32013
32016
  const attributionJSON = JSON.stringify(attributionProperties);
@@ -32023,10 +32026,6 @@ class Analytics {
32023
32026
  headers,
32024
32027
  });
32025
32028
  }
32026
- recording = {
32027
- start: mixpanel.start_session_recording,
32028
- stop: mixpanel.stop_session_recording,
32029
- };
32030
32029
  }
32031
32030
  var index = new Analytics();
32032
32031