@phygitallabs/tapquest-core 6.7.15 → 6.7.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/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -12
- package/dist/index.d.ts +2 -12
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -1
- package/src/modules/consent/index.ts +8 -7
- package/src/modules/data-tracking/DataTrackingConsentSync.tsx +64 -62
- package/src/modules/data-tracking/hooks/index.ts +15 -9
- package/src/modules/data-tracking/index.ts +2 -1
- package/src/modules/session-replay/providers/SessionReplayProvider.tsx +160 -161
- package/src/modules/user-campaign/index.ts +1 -0
- package/src/providers/ServicesProvider.tsx +6 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -33,7 +33,9 @@ export * from "./modules/session-replay";
|
|
|
33
33
|
|
|
34
34
|
export * from "./modules/action-logs";
|
|
35
35
|
|
|
36
|
-
export * from "./modules/consent";
|
|
36
|
+
// export * from "./modules/consent";
|
|
37
|
+
|
|
38
|
+
export * from "./modules/user-campaign";
|
|
37
39
|
|
|
38
40
|
// Export types
|
|
39
41
|
export * from "./types/common";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
// Consent implementation commented out
|
|
2
|
+
// export {
|
|
3
|
+
// PhygitalConsentProvider,
|
|
4
|
+
// usePhygitalConsent,
|
|
5
|
+
// useLatestConsentByUserId,
|
|
6
|
+
// CookieConsentBanner,
|
|
7
|
+
// PolicyPopup,
|
|
8
|
+
// } from "@phygitallabs/phygital-consent";
|
|
@@ -1,72 +1,74 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
// Consent implementation commented out
|
|
4
|
+
// import { usePhygitalConsent } from "@phygitallabs/phygital-consent";
|
|
5
|
+
// import { useEffect } from "react";
|
|
6
|
+
// import { useDataTracking } from "./hooks";
|
|
6
7
|
|
|
7
|
-
type GtagConsent = (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
) => void;
|
|
8
|
+
// type GtagConsent = (
|
|
9
|
+
// command: "consent",
|
|
10
|
+
// action: "default" | "update",
|
|
11
|
+
// params: Record<string, string>
|
|
12
|
+
// ) => void;
|
|
12
13
|
|
|
13
|
-
/** Consent Mode v2: block analytics and ad tags until user accepts. */
|
|
14
|
-
const GTAG_CONSENT_DENIED = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} as const;
|
|
14
|
+
// /** Consent Mode v2: block analytics and ad tags until user accepts. */
|
|
15
|
+
// const GTAG_CONSENT_DENIED = {
|
|
16
|
+
// analytics_storage: "denied",
|
|
17
|
+
// ad_storage: "denied",
|
|
18
|
+
// ad_user_data: "denied",
|
|
19
|
+
// ad_personalization: "denied",
|
|
20
|
+
// } as const;
|
|
20
21
|
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export function DataTrackingConsentSync() {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
// /**
|
|
23
|
+
// * Syncs cookie consent to GA, GTM, PostHog, OpenReplay, and Google AdSense.
|
|
24
|
+
// * - On mount: sets gtag/GTM consent default to denied.
|
|
25
|
+
// * - When analytics allowed: grants analytics_storage (GA/GTM), opts in PostHog, starts OpenReplay.
|
|
26
|
+
// * - When advertising allowed: grants ad_storage, ad_user_data, ad_personalization (AdSense).
|
|
27
|
+
// * Must be used under PhygitalConsentProvider; for OpenReplay also under SessionReplayProvider.
|
|
28
|
+
// * Renders nothing.
|
|
29
|
+
// */
|
|
30
|
+
// export function DataTrackingConsentSync() {
|
|
31
|
+
// const consent = usePhygitalConsent() as {
|
|
32
|
+
// isAnalyticsAllowed?: boolean;
|
|
33
|
+
// isAdvertisingAllowed?: boolean;
|
|
34
|
+
// };
|
|
35
|
+
// const isAnalyticsAllowed = consent.isAnalyticsAllowed ?? false;
|
|
36
|
+
// const isAdvertisingAllowed = consent.isAdvertisingAllowed ?? false;
|
|
37
|
+
// const { togglePostHog, toggleOpenReplay, toggleGoogleAdSense, pauseGoogleAdSense } =
|
|
38
|
+
// useDataTracking();
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
40
|
+
// // Default: deny all consent (run once on mount)
|
|
41
|
+
// useEffect(() => {
|
|
42
|
+
// if (typeof window === "undefined") return;
|
|
43
|
+
// const w = window as Window & { dataLayer?: unknown[]; gtag?: GtagConsent };
|
|
44
|
+
// w.dataLayer = w.dataLayer || [];
|
|
45
|
+
// if (typeof w.gtag === "function") {
|
|
46
|
+
// w.gtag("consent", "default", { ...GTAG_CONSENT_DENIED });
|
|
47
|
+
// } else {
|
|
48
|
+
// (w.dataLayer as unknown[]).push(["consent", "default", { ...GTAG_CONSENT_DENIED }]);
|
|
49
|
+
// }
|
|
50
|
+
// }, []);
|
|
49
51
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
// // Google AdSense: grant ad consent when allowed, revoke (pause) when denied
|
|
53
|
+
// useEffect(() => {
|
|
54
|
+
// if (isAdvertisingAllowed) {
|
|
55
|
+
// toggleGoogleAdSense();
|
|
56
|
+
// } else {
|
|
57
|
+
// pauseGoogleAdSense();
|
|
58
|
+
// }
|
|
59
|
+
// }, [isAdvertisingAllowed, toggleGoogleAdSense, pauseGoogleAdSense]);
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
// // PostHog: opt in when analytics allowed
|
|
62
|
+
// useEffect(() => {
|
|
63
|
+
// if (!isAnalyticsAllowed) return;
|
|
64
|
+
// togglePostHog();
|
|
65
|
+
// }, [isAnalyticsAllowed, togglePostHog]);
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
// // OpenReplay: init and start when analytics allowed
|
|
68
|
+
// useEffect(() => {
|
|
69
|
+
// if (!isAnalyticsAllowed) return;
|
|
70
|
+
// toggleOpenReplay();
|
|
71
|
+
// }, [isAnalyticsAllowed, toggleOpenReplay]);
|
|
70
72
|
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
+
// return null;
|
|
74
|
+
// }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// Consent implementation commented out
|
|
2
|
+
// import { usePhygitalConsent } from "@phygitallabs/phygital-consent";
|
|
2
3
|
import posthog from "posthog-js";
|
|
3
4
|
import { useSessionReplay } from "../../../modules/session-replay";
|
|
4
5
|
|
|
@@ -53,16 +54,17 @@ const pushEventToPosthog = (eventName: string, eventData: Record<string, any>) =
|
|
|
53
54
|
};
|
|
54
55
|
|
|
55
56
|
/** Consent flags from PhygitalConsentProvider (isAdvertisingAllowed may be added in newer versions). */
|
|
56
|
-
interface ConsentFlags {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
57
|
+
// interface ConsentFlags {
|
|
58
|
+
// isAnalyticsAllowed: boolean;
|
|
59
|
+
// isAdvertisingAllowed?: boolean;
|
|
60
|
+
// }
|
|
60
61
|
|
|
61
62
|
function useDataTracking() {
|
|
62
63
|
const { initTracker, startTracking, setUserId, setMetadata } = useSessionReplay();
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
const
|
|
64
|
+
// Consent implementation commented out: no provider, use stub (tracking off)
|
|
65
|
+
// const consent = usePhygitalConsent() as unknown as ConsentFlags;
|
|
66
|
+
const isAnalyticsAllowed = false; // consent.isAnalyticsAllowed ?? false;
|
|
67
|
+
const isAdvertisingAllowed = false; // consent.isAdvertisingAllowed ?? false;
|
|
66
68
|
|
|
67
69
|
/** Load GA script and grant analytics consent. No-op if analytics consent is denied or script already loaded. */
|
|
68
70
|
const loadGA = (gaId: string) => {
|
|
@@ -190,7 +192,11 @@ function useDataTracking() {
|
|
|
190
192
|
if (useTools.includes("ga") && isAnalyticsAllowed) {
|
|
191
193
|
pushEventToGA(eventName, eventData);
|
|
192
194
|
}
|
|
193
|
-
if (
|
|
195
|
+
if (
|
|
196
|
+
useTools.includes("posthog") &&
|
|
197
|
+
isAnalyticsAllowed &&
|
|
198
|
+
typeof posthog?.capture === "function"
|
|
199
|
+
) {
|
|
194
200
|
pushEventToPosthog(eventName, eventData);
|
|
195
201
|
}
|
|
196
202
|
};
|
|
@@ -2,188 +2,187 @@ import React, { createContext, useReducer } from "react";
|
|
|
2
2
|
import { v4 as uuidV4 } from "uuid";
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
SessionReplayProviderProps,
|
|
6
|
+
TrackerState,
|
|
7
|
+
TrackerAction,
|
|
8
|
+
TrackerContextValue,
|
|
9
|
+
OpenReplayConfig,
|
|
10
10
|
} from "../types";
|
|
11
11
|
|
|
12
|
-
import {
|
|
13
|
-
isBrowser
|
|
14
|
-
} from "../utils";
|
|
12
|
+
import { isBrowser } from "../utils";
|
|
15
13
|
|
|
16
14
|
export const TrackerContext = createContext<TrackerContextValue | null>(null);
|
|
17
15
|
|
|
18
16
|
function defaultGetUserId(): string {
|
|
19
|
-
|
|
17
|
+
return uuidV4();
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
async function newTracker(config: OpenReplayConfig) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
tracker.setUserID(userId);
|
|
67
|
-
console.log("User ID set:", userId);
|
|
68
|
-
}
|
|
21
|
+
try {
|
|
22
|
+
// Dynamic import for SSR compatibility
|
|
23
|
+
const OpenReplay = (await import("@openreplay/tracker")).default;
|
|
24
|
+
|
|
25
|
+
// Get user ID function (custom or default UUID generator)
|
|
26
|
+
const getUserId =
|
|
27
|
+
config?.userIdEnabled && config?.getUserId ? config.getUserId : defaultGetUserId;
|
|
28
|
+
|
|
29
|
+
// Build tracker configuration
|
|
30
|
+
const trackerConfig: any = {
|
|
31
|
+
projectKey: config?.projectKey || process.env.NEXT_PUBLIC_OPENREPLAY_PROJECT_KEY,
|
|
32
|
+
ingestPoint: config?.ingestPoint,
|
|
33
|
+
// Capture options
|
|
34
|
+
captureExceptions: config.captureExceptions ?? true,
|
|
35
|
+
capturePerformance: config.capturePerformance ?? true,
|
|
36
|
+
// Network tracking
|
|
37
|
+
network: config.network || {
|
|
38
|
+
capturePayload: true,
|
|
39
|
+
sanitizer: (data: any) => data,
|
|
40
|
+
},
|
|
41
|
+
// Console tracking
|
|
42
|
+
console: config.console || {
|
|
43
|
+
levels: ["error", "warn", "log"],
|
|
44
|
+
},
|
|
45
|
+
// Privacy settings
|
|
46
|
+
obscureTextEmails: config.obscureTextEmails ?? true,
|
|
47
|
+
obscureTextNumbers: config.obscureTextNumbers ?? false,
|
|
48
|
+
obscureInputEmails: config.obscureInputEmails ?? true,
|
|
49
|
+
// Development mode
|
|
50
|
+
__DISABLE_SECURE_MODE:
|
|
51
|
+
config.__DISABLE_SECURE_MODE ??
|
|
52
|
+
(typeof process !== "undefined" && process.env?.NODE_ENV === "development"),
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// Initialize tracker
|
|
56
|
+
const tracker = new OpenReplay(trackerConfig);
|
|
57
|
+
|
|
58
|
+
// Set user ID if enabled
|
|
59
|
+
if (config?.userIdEnabled) {
|
|
60
|
+
const userId = getUserId();
|
|
61
|
+
tracker.setUserID(userId);
|
|
62
|
+
console.log("User ID set:", userId);
|
|
63
|
+
}
|
|
69
64
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
console.log("OpenReplay tracker initialized");
|
|
66
|
+
console.log("Project Key:", trackerConfig.projectKey);
|
|
67
|
+
console.log("Ingest Point:", trackerConfig.ingestPoint);
|
|
73
68
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
69
|
+
return tracker;
|
|
70
|
+
} catch (error: any) {
|
|
71
|
+
console.error("Failed to create tracker:", error);
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
79
74
|
}
|
|
80
75
|
|
|
81
76
|
function reducer(state: TrackerState, action: TrackerAction): TrackerState {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
default:
|
|
157
|
-
return state;
|
|
158
|
-
}
|
|
77
|
+
const { debug = false } = state.config;
|
|
78
|
+
|
|
79
|
+
switch (action.type) {
|
|
80
|
+
case "init":
|
|
81
|
+
// Only initialize if tracker doesn't exist and we're in browser
|
|
82
|
+
if (!state.tracker && isBrowser()) {
|
|
83
|
+
if (!state.config.projectKey && !process.env.NEXT_PUBLIC_OPENREPLAY_PROJECT_KEY) {
|
|
84
|
+
console.warn(debug, "Project key not found. Skipping session replay initialization.");
|
|
85
|
+
return state;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Return state with tracker promise
|
|
89
|
+
// The tracker will be created asynchronously
|
|
90
|
+
return {
|
|
91
|
+
...state,
|
|
92
|
+
tracker: newTracker(state.config),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return state;
|
|
96
|
+
|
|
97
|
+
case "start":
|
|
98
|
+
// Start tracking if tracker exists
|
|
99
|
+
if (state.tracker) {
|
|
100
|
+
Promise.resolve(state.tracker)
|
|
101
|
+
.then((tracker) => {
|
|
102
|
+
tracker.start();
|
|
103
|
+
console.log(debug, "Session replay tracker started");
|
|
104
|
+
})
|
|
105
|
+
.catch((error) => {
|
|
106
|
+
console.error("Failed to start tracker:", error);
|
|
107
|
+
});
|
|
108
|
+
} else {
|
|
109
|
+
console.warn(debug, "Tracker not initialized. Call initTracker() first.");
|
|
110
|
+
}
|
|
111
|
+
return state;
|
|
112
|
+
|
|
113
|
+
case "setUserId":
|
|
114
|
+
// Set or update user ID
|
|
115
|
+
if (state.tracker) {
|
|
116
|
+
Promise.resolve(state.tracker)
|
|
117
|
+
.then((tracker) => {
|
|
118
|
+
tracker.setUserID(action.payload);
|
|
119
|
+
console.log(debug, "User ID updated:", action.payload);
|
|
120
|
+
})
|
|
121
|
+
.catch((error) => {
|
|
122
|
+
console.error("Failed to set user ID:", error);
|
|
123
|
+
});
|
|
124
|
+
} else {
|
|
125
|
+
console.warn(debug, "Tracker not initialized. Call initTracker() first.");
|
|
126
|
+
}
|
|
127
|
+
return state;
|
|
128
|
+
|
|
129
|
+
// Set metadata
|
|
130
|
+
case "setMetadata":
|
|
131
|
+
if (state.tracker) {
|
|
132
|
+
Promise.resolve(state.tracker)
|
|
133
|
+
.then((tracker) => {
|
|
134
|
+
Object.entries(action.payload || {})?.forEach(([key, value]) => {
|
|
135
|
+
tracker.setMetadata(key, value);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
console.log(debug, "Metadata updated:", action.payload.metadata);
|
|
139
|
+
})
|
|
140
|
+
.catch((error) => {
|
|
141
|
+
console.error("Failed to set metadata:", error);
|
|
142
|
+
});
|
|
143
|
+
} else {
|
|
144
|
+
console.warn(debug, "Tracker not initialized. Call initTracker() first.");
|
|
145
|
+
}
|
|
146
|
+
return state;
|
|
147
|
+
|
|
148
|
+
default:
|
|
149
|
+
return state;
|
|
150
|
+
}
|
|
159
151
|
}
|
|
160
152
|
|
|
161
153
|
export const SessionReplayProvider: React.FC<SessionReplayProviderProps> = ({
|
|
162
|
-
|
|
163
|
-
|
|
154
|
+
children,
|
|
155
|
+
config = {},
|
|
164
156
|
}) => {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
157
|
+
const [, dispatch] = useReducer(reducer, {
|
|
158
|
+
tracker: null,
|
|
159
|
+
config,
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
const initTracker = () => dispatch({ type: "init" });
|
|
163
|
+
const startTracking = () => dispatch({ type: "start" });
|
|
164
|
+
const setUserId = (userId: string) => dispatch({ type: "setUserId", payload: userId });
|
|
165
|
+
const setMetadata = (metadata: Record<string, any>) =>
|
|
166
|
+
dispatch({ type: "setMetadata", payload: metadata });
|
|
167
|
+
|
|
168
|
+
// // init and start tracker
|
|
169
|
+
// useEffect(() => {
|
|
170
|
+
// initTracker();
|
|
171
|
+
// startTracking();
|
|
172
|
+
// }, []);
|
|
173
|
+
|
|
174
|
+
return (
|
|
175
|
+
<TrackerContext.Provider
|
|
176
|
+
value={{
|
|
182
177
|
initTracker,
|
|
183
178
|
startTracking,
|
|
184
179
|
setUserId,
|
|
185
|
-
setMetadata
|
|
186
|
-
|
|
180
|
+
setMetadata,
|
|
181
|
+
}}
|
|
182
|
+
>
|
|
183
|
+
{children}
|
|
184
|
+
</TrackerContext.Provider>
|
|
185
|
+
);
|
|
187
186
|
};
|
|
188
187
|
|
|
189
188
|
export default SessionReplayProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useUserCampaignAction } from "@phygitallabs/api-core";
|
|
@@ -4,8 +4,9 @@ import { PGLCoreServiceProvider } from "@phygitallabs/api-core";
|
|
|
4
4
|
import { RewardServiceProvider } from "@phygitallabs/reward";
|
|
5
5
|
import { AchievementServiceProvider } from "@phygitallabs/achievement";
|
|
6
6
|
import { GenerateCertificateServiceProvider } from "@phygitallabs/generate-certificate";
|
|
7
|
-
|
|
8
|
-
import {
|
|
7
|
+
// Consent implementation commented out
|
|
8
|
+
// import { PhygitalConsentProvider } from "@phygitallabs/phygital-consent";
|
|
9
|
+
// import { DataTrackingConsentSync } from "../modules/data-tracking";
|
|
9
10
|
|
|
10
11
|
import serviceApiUrl from "../constants/service";
|
|
11
12
|
import { APIConfig, ServiceConfig } from "../types/service";
|
|
@@ -141,6 +142,7 @@ export const ServicesProvider: React.FC<ServicesProviderProps> = ({
|
|
|
141
142
|
{...commonServiceConfig}
|
|
142
143
|
baseURL={`${serviceApiUrl[environment].API_GENERATE_CERTIFICATE_URL}/v1`}
|
|
143
144
|
>
|
|
145
|
+
{/* Consent implementation commented out
|
|
144
146
|
<PhygitalConsentProvider
|
|
145
147
|
{...commonServiceConfig}
|
|
146
148
|
deviceId={deviceUid}
|
|
@@ -154,6 +156,8 @@ export const ServicesProvider: React.FC<ServicesProviderProps> = ({
|
|
|
154
156
|
<DataTrackingConsentSync />
|
|
155
157
|
{children}
|
|
156
158
|
</PhygitalConsentProvider>
|
|
159
|
+
*/}
|
|
160
|
+
{children}
|
|
157
161
|
</GenerateCertificateServiceProvider>
|
|
158
162
|
</AchievementServiceProvider>
|
|
159
163
|
</RewardServiceProvider>
|