react-marketing-tools 0.2.2 → 0.2.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/README.md +7 -2
- package/dist/index.d.ts +4 -38
- package/dist/{analytics → lib/analytics}/analyticsEventService.d.ts +0 -0
- package/dist/{analytics → lib/analytics}/ga4GoogleAnalyticsEventTracking.d.ts +0 -0
- package/dist/{analytics → lib/analytics}/handleDataLayerPush.d.ts +0 -0
- package/dist/{analytics → lib/analytics}/helpers.d.ts +0 -0
- package/dist/{analytics → lib/analytics}/types.d.ts +0 -0
- package/dist/{buildConfig → lib/buildConfig}/index.d.ts +0 -0
- package/dist/{buildConfig → lib/buildConfig}/types.d.ts +0 -0
- package/dist/lib/index.d.ts +25 -0
- package/dist/{ipInfo → lib/ipInfo}/index.d.ts +0 -0
- package/dist/{ipInfo → lib/ipInfo}/types.d.ts +0 -0
- package/dist/lib/types.d.ts +14 -0
- package/dist/{utilities → lib/utilities}/assertValueCheckers.d.ts +0 -0
- package/dist/{utilities → lib/utilities}/commonFunctions.d.ts +0 -0
- package/dist/{utilities → lib/utilities}/cookies.d.ts +0 -0
- package/dist/manifest.json +7 -0
- package/dist/react-marketing-tools.es.js +3506 -2890
- package/dist/react-marketing-tools.umd.js +27 -1
- package/package.json +3 -2
- package/dist/types.d.ts +0 -3
package/README.md
CHANGED
|
@@ -90,8 +90,13 @@ COMING SOON: [React Marketing Tools Demo](https://)
|
|
|
90
90
|
## Usage with Provider
|
|
91
91
|
```js
|
|
92
92
|
import { useState, useEffect, useCallback, useRef } from 'react'
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
93
|
+
import { useMarketingApi, useMarketingState } from './lib'
|
|
94
|
+
import {
|
|
95
|
+
EventNameInfo,
|
|
96
|
+
ProviderApiProps,
|
|
97
|
+
ProviderStateProps,
|
|
98
|
+
TrackAnalyticsEventOptions,
|
|
99
|
+
} from './types'
|
|
95
100
|
|
|
96
101
|
function App() {
|
|
97
102
|
const [count, setCount] = useState(0)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,38 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export declare type ProviderStateProps = {
|
|
6
|
-
appName: string;
|
|
7
|
-
appSessionCookieName: string;
|
|
8
|
-
analyticsPlatform: Platform;
|
|
9
|
-
eventActionPrefixList: Record<string, string>;
|
|
10
|
-
analyticsGlobalEventActionList: Record<string, string>;
|
|
11
|
-
};
|
|
12
|
-
export declare type ProviderApiProps = {
|
|
13
|
-
trackAnalyticsEvent: (options: TrackAnalyticsEventOptions) => Promise<void>;
|
|
14
|
-
showMeBuildInAnalyticsPlatform: () => void;
|
|
15
|
-
showMeBuildInEventActionPrefixList: () => void;
|
|
16
|
-
showMeBuildInGlobalEventActionList: () => void;
|
|
17
|
-
};
|
|
18
|
-
export declare const ContextState: import("react").Context<ProviderStateProps>;
|
|
19
|
-
export declare const ContextApi: import("react").Context<ProviderApiProps>;
|
|
20
|
-
declare type ReactMarketingProviderProps = {
|
|
21
|
-
children: ReactNode;
|
|
22
|
-
};
|
|
23
|
-
export declare const ReactMarketingProvider: ({ children, }: ReactMarketingProviderProps) => JSX.Element;
|
|
24
|
-
/**
|
|
25
|
-
* @property {string} appName
|
|
26
|
-
* @property {string} appSessionCookieName
|
|
27
|
-
* @property {object} analyticsPlatform
|
|
28
|
-
* @property {object} eventActionPrefixList
|
|
29
|
-
* @property {object} analyticsGlobalEventActionList
|
|
30
|
-
*/
|
|
31
|
-
export declare const useMarketingState: () => ProviderStateProps;
|
|
32
|
-
/**
|
|
33
|
-
* @property {function} trackAnalyticsEvent(options)
|
|
34
|
-
* @property {function} showMeBuildInAnalyticsPlatform
|
|
35
|
-
* @property {function} showMeBuildInEventActionPrefixList
|
|
36
|
-
* @property {function} showMeBuildInGlobalEventActionList
|
|
37
|
-
*/
|
|
38
|
-
export declare const useMarketingApi: () => ProviderApiProps;
|
|
1
|
+
export * from './lib/analytics/types'
|
|
2
|
+
export * from './lib/buildConfig/types'
|
|
3
|
+
export * from './lib/ipInfo/types'
|
|
4
|
+
export * from './lib/types'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode, Context } from 'react';
|
|
2
|
+
import { ProviderApiProps, ProviderStateProps } from './types';
|
|
3
|
+
export { buildConfig, analyticsPlatform } from './buildConfig';
|
|
4
|
+
export { trackAnalyticsEvent } from './analytics/analyticsEventService';
|
|
5
|
+
export declare const ContextState: Context<ProviderStateProps>;
|
|
6
|
+
export declare const ContextApi: Context<ProviderApiProps>;
|
|
7
|
+
declare type ReactMarketingProviderProps = {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare const ReactMarketingProvider: ({ children, }: ReactMarketingProviderProps) => JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* @property {string} appName
|
|
13
|
+
* @property {string} appSessionCookieName
|
|
14
|
+
* @property {object} analyticsPlatform
|
|
15
|
+
* @property {object} eventActionPrefixList
|
|
16
|
+
* @property {object} analyticsGlobalEventActionList
|
|
17
|
+
*/
|
|
18
|
+
export declare const useMarketingState: () => ProviderStateProps;
|
|
19
|
+
/**
|
|
20
|
+
* @property {function} trackAnalyticsEvent(options)
|
|
21
|
+
* @property {function} showMeBuildInAnalyticsPlatform
|
|
22
|
+
* @property {function} showMeBuildInEventActionPrefixList
|
|
23
|
+
* @property {function} showMeBuildInGlobalEventActionList
|
|
24
|
+
*/
|
|
25
|
+
export declare const useMarketingApi: () => ProviderApiProps;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Platform, TrackAnalyticsEventOptions } from '..';
|
|
2
|
+
export declare type ProviderStateProps = {
|
|
3
|
+
appName: string;
|
|
4
|
+
appSessionCookieName: string;
|
|
5
|
+
analyticsPlatform: Platform;
|
|
6
|
+
eventActionPrefixList: Record<string, string>;
|
|
7
|
+
analyticsGlobalEventActionList: Record<string, string>;
|
|
8
|
+
};
|
|
9
|
+
export declare type ProviderApiProps = {
|
|
10
|
+
trackAnalyticsEvent: (options: TrackAnalyticsEventOptions) => Promise<void>;
|
|
11
|
+
showMeBuildInAnalyticsPlatform: () => void;
|
|
12
|
+
showMeBuildInEventActionPrefixList: () => void;
|
|
13
|
+
showMeBuildInGlobalEventActionList: () => void;
|
|
14
|
+
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|