react-marketing-tools 0.3.3 → 0.3.5

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.
@@ -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,38 @@ 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 ServerLocationData = {
60
+ SERVER_CITY: string;
61
+ SERVER_COUNTRY: string;
62
+ SERVER_HOSTNAME: string;
63
+ SERVER_IP: string;
64
+ SERVER_LOCATION: string;
65
+ SERVER_POSTAL: string;
66
+ SERVER_REGION: string;
67
+ SERVER_TIMEZONE: string;
68
+ };
69
+ export type IpInfo = {
70
+ city: string;
71
+ country: string;
72
+ SERVER_HOSTNAME: string;
73
+ hostname: string;
74
+ ip: string;
75
+ loc: string;
76
+ postal: string;
77
+ region: string;
78
+ timezone: string;
79
+ };
80
+ export type Ga4GoogleAnalyticsEventTracking = AnalyticsTrackerDataOptions;
81
+ export type Platform = 'GOOGLE' | 'FACEBOOK' | 'DATALAYER_PUSH';
82
+ export type AnalyticsPlatform = {
62
83
  [key in Platform]: Platform;
63
84
  };
64
- export declare type Tokens = {
85
+ export type Tokens = {
65
86
  IP_INFO_TOKEN?: string;
66
87
  GA4_PUBLIC_API_SECRET?: string;
67
88
  GA4_PUBLIC_MEASUREMENT_ID?: string;
68
89
  };
69
- export declare type Config = {
90
+ export type Config = {
70
91
  TOKENS?: Tokens;
71
92
  appName: string;
72
93
  appSessionCookieName: string;
@@ -77,7 +98,7 @@ export declare type Config = {
77
98
  eventActionPrefixList: Record<string, string>;
78
99
  analyticsGlobalEventActionList: Record<string, string>;
79
100
  };
80
- export declare type BuildConfigOptions = {
101
+ export type BuildConfigOptions = {
81
102
  appName: string;
82
103
  appSessionCookieName: string;
83
104
  eventActionPrefix?: Record<string, string>;
@@ -89,14 +110,14 @@ export declare type BuildConfigOptions = {
89
110
  withServerLocationInfo?: boolean;
90
111
  };
91
112
  export declare let config: Config;
92
- export declare type ProviderStateProps = {
113
+ export type ProviderStateProps = {
93
114
  appName: string;
94
115
  appSessionCookieName: string;
95
116
  analyticsPlatform: AnalyticsPlatform;
96
117
  eventActionPrefixList: Record<string, string>;
97
118
  analyticsGlobalEventActionList: Record<string, string>;
98
119
  };
99
- export declare type ProviderApiProps = {
120
+ export type ProviderApiProps = {
100
121
  trackAnalyticsEvent: (options: TrackAnalyticsEventOptions) => Promise<void>;
101
122
  showMeBuildInAnalyticsPlatform: () => void;
102
123
  showMeBuildInEventActionPrefixList: () => void;
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "react-marketing-tools",
3
- "version": "0.3.3",
3
+ "type": "module",
4
+ "version": "0.3.5",
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/)",
@@ -13,8 +14,11 @@
13
14
  "url": "https://github.com/bronz3beard/react-marketing-tools/issues"
14
15
  },
15
16
  "files": [
16
- "dist",
17
- "README.md"
17
+ "./dist",
18
+ "./dist/manifest.json",
19
+ "./dist/react-data-matrix.es.js",
20
+ "./dist/react-data-matrix.umd.js",
21
+ "./README.md"
18
22
  ],
19
23
  "keywords": [
20
24
  "javascript",
@@ -86,8 +90,8 @@
86
90
  "prettier": "^2.7.1",
87
91
  "react": "^18.2.0",
88
92
  "react-dom": "^18.2.0",
89
- "typescript": "^4.9.4",
90
- "vite": "^3.0.0",
93
+ "typescript": "^5.3.3",
94
+ "vite": "^5.0.10",
91
95
  "vite-plugin-dts": "^1.7.1"
92
96
  }
93
97
  }
@@ -1,60 +0,0 @@
1
- export declare type Event = {
2
- name: string;
3
- params: Record<AllowedTypes, AllowedTypes>;
4
- };
5
- export declare type GooglePayload = {
6
- non_personalized_ads: boolean;
7
- client_id: string;
8
- user_id: string;
9
- user_properties: {
10
- user_id: string;
11
- user_type: string;
12
- client_id: string;
13
- };
14
- events: Event[];
15
- };
16
- export declare type EventNameInfo = {
17
- eventName: string;
18
- description?: string;
19
- actionPrefix: string;
20
- globalAppEvent: string;
21
- previousGlobalAppEvent?: string;
22
- };
23
- export declare type AllowedTypes = string | number;
24
- export declare type TrackAnalyticsEventOptions = {
25
- data: Record<AllowedTypes, AllowedTypes>;
26
- eventNameInfo: EventNameInfo;
27
- analyticsType: string;
28
- userDataToHashKeyArray: Array<string> | null;
29
- dataLayerCheck: boolean;
30
- consoleLogData?: object;
31
- };
32
- export declare type GlobalVars = {
33
- app: string;
34
- device_category?: string | undefined;
35
- device_os?: string | undefined;
36
- device_browser?: string | undefined;
37
- };
38
- export declare type DataLayer = {
39
- event: string;
40
- globalVars: GlobalVars;
41
- journeyProps: Record<any, any>;
42
- userProps: Record<any, any>;
43
- };
44
- export declare type ConsoleLogData = {
45
- showGlobalVars?: boolean;
46
- showJourneyPropsPayload?: boolean;
47
- showUserProps?: boolean;
48
- };
49
- interface AnalyticsTrackerDataOptions {
50
- consoleLogData: ConsoleLogData | null;
51
- data: Record<any, any>;
52
- eventName: string;
53
- globalAppEvent: string;
54
- userDetails: Record<any, any>;
55
- }
56
- export interface HandleDataLayerPushOptions extends AnalyticsTrackerDataOptions {
57
- dataLayerCheck: boolean;
58
- }
59
- export declare type Ga4GoogleAnalyticsEventTracking = AnalyticsTrackerDataOptions;
60
- export {};
@@ -1,21 +0,0 @@
1
- export declare type ServerLocationData = {
2
- SERVER_CITY: string;
3
- SERVER_COUNTRY: string;
4
- SERVER_HOSTNAME: string;
5
- SERVER_IP: string;
6
- SERVER_LOCATION: string;
7
- SERVER_POSTAL: string;
8
- SERVER_REGION: string;
9
- SERVER_TIMEZONE: string;
10
- };
11
- export declare type IpInfo = {
12
- city: string;
13
- country: string;
14
- SERVER_HOSTNAME: string;
15
- hostname: string;
16
- ip: string;
17
- loc: string;
18
- postal: string;
19
- region: string;
20
- timezone: string;
21
- };