react-marketing-tools 0.3.2 → 0.3.4

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/types.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export declare type Event = {
1
+ export type Event = {
2
2
  name: string;
3
3
  params: Record<AllowedTypes, AllowedTypes>;
4
4
  };
5
- export declare type GooglePayload = {
5
+ export type GooglePayload = {
6
6
  non_personalized_ads: boolean;
7
7
  client_id: string;
8
8
  user_id: string;
@@ -13,15 +13,15 @@ export declare type GooglePayload = {
13
13
  };
14
14
  events: Event[];
15
15
  };
16
- export declare type EventNameInfo = {
16
+ export type EventNameInfo = {
17
17
  eventName: string;
18
18
  description?: string;
19
19
  actionPrefix: string;
20
20
  globalAppEvent: string;
21
21
  previousGlobalAppEvent?: string;
22
22
  };
23
- export declare type AllowedTypes = string | number;
24
- export declare type TrackAnalyticsEventOptions = {
23
+ export type AllowedTypes = string | number;
24
+ export type TrackAnalyticsEventOptions = {
25
25
  data: Record<AllowedTypes, AllowedTypes>;
26
26
  eventNameInfo: EventNameInfo;
27
27
  analyticsType: string;
@@ -29,19 +29,19 @@ export declare type TrackAnalyticsEventOptions = {
29
29
  dataLayerCheck: boolean;
30
30
  consoleLogData?: object;
31
31
  };
32
- export declare type GlobalVars = {
32
+ export type GlobalVars = {
33
33
  app: string;
34
34
  device_category?: string | undefined;
35
35
  device_os?: string | undefined;
36
36
  device_browser?: string | undefined;
37
37
  };
38
- export declare type DataLayer = {
38
+ export type DataLayer = {
39
39
  event: string;
40
40
  globalVars: GlobalVars;
41
41
  journeyProps: Record<any, any>;
42
42
  userProps: Record<any, any>;
43
43
  };
44
- export declare type ConsoleLogData = {
44
+ export type ConsoleLogData = {
45
45
  showGlobalVars?: boolean;
46
46
  showJourneyPropsPayload?: boolean;
47
47
  showUserProps?: boolean;
@@ -56,17 +56,17 @@ export interface AnalyticsTrackerDataOptions {
56
56
  export interface HandleDataLayerPushOptions extends AnalyticsTrackerDataOptions {
57
57
  dataLayerCheck: boolean;
58
58
  }
59
- export declare type Ga4GoogleAnalyticsEventTracking = AnalyticsTrackerDataOptions;
60
- export declare type Platform = 'GOOGLE' | 'FACEBOOK' | 'DATALAYER_PUSH';
61
- export declare type AnalyticsPlatform = {
59
+ export type Ga4GoogleAnalyticsEventTracking = AnalyticsTrackerDataOptions;
60
+ export type Platform = 'GOOGLE' | 'FACEBOOK' | 'DATALAYER_PUSH';
61
+ export type AnalyticsPlatform = {
62
62
  [key in Platform]: Platform;
63
63
  };
64
- export declare type Tokens = {
64
+ export type Tokens = {
65
65
  IP_INFO_TOKEN?: string;
66
66
  GA4_PUBLIC_API_SECRET?: string;
67
67
  GA4_PUBLIC_MEASUREMENT_ID?: string;
68
68
  };
69
- export declare type Config = {
69
+ export type Config = {
70
70
  TOKENS?: Tokens;
71
71
  appName: string;
72
72
  appSessionCookieName: string;
@@ -77,7 +77,7 @@ export declare type Config = {
77
77
  eventActionPrefixList: Record<string, string>;
78
78
  analyticsGlobalEventActionList: Record<string, string>;
79
79
  };
80
- export declare type BuildConfigOptions = {
80
+ export type BuildConfigOptions = {
81
81
  appName: string;
82
82
  appSessionCookieName: string;
83
83
  eventActionPrefix?: Record<string, string>;
@@ -89,14 +89,14 @@ export declare type BuildConfigOptions = {
89
89
  withServerLocationInfo?: boolean;
90
90
  };
91
91
  export declare let config: Config;
92
- export declare type ProviderStateProps = {
92
+ export type ProviderStateProps = {
93
93
  appName: string;
94
94
  appSessionCookieName: string;
95
95
  analyticsPlatform: AnalyticsPlatform;
96
96
  eventActionPrefixList: Record<string, string>;
97
97
  analyticsGlobalEventActionList: Record<string, string>;
98
98
  };
99
- export declare type ProviderApiProps = {
99
+ export type ProviderApiProps = {
100
100
  trackAnalyticsEvent: (options: TrackAnalyticsEventOptions) => Promise<void>;
101
101
  showMeBuildInAnalyticsPlatform: () => void;
102
102
  showMeBuildInEventActionPrefixList: () => void;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "react-marketing-tools",
3
- "version": "0.3.2",
3
+ "type": "module",
4
+ "version": "0.3.4",
4
5
  "description": "React Marketing Tools are a set of tools to make it easier for you to implement analytics and track user journeys, interactions throughout your App. using dataLayer/Google Tag Manager, GA4 fetch directly or coming soon facebook pixel.",
5
6
  "license": "MIT",
6
7
  "author": "bronz3beard <exempli.gratia.webdesign@gmail.com> (https://www.heyrory.com/)",
@@ -86,8 +87,8 @@
86
87
  "prettier": "^2.7.1",
87
88
  "react": "^18.2.0",
88
89
  "react-dom": "^18.2.0",
89
- "typescript": "^4.9.4",
90
- "vite": "^3.0.0",
90
+ "typescript": "^5.3.3",
91
+ "vite": "^5.0.10",
91
92
  "vite-plugin-dts": "^1.7.1"
92
93
  }
93
94
  }
File without changes