@jetshop/core 5.15.0-minor.d6073cd2 → 5.15.0
Sign up to get free protection for your applications and to get access to all the features.
- package/analytics/AnalyticsProvider.d.ts +2 -0
- package/analytics/AnalyticsProvider.js +12 -6
- package/analytics/AnalyticsProvider.js.map +1 -1
- package/analytics/integrations/ga4.js +28 -18
- package/analytics/integrations/ga4.js.map +1 -1
- package/analytics/integrations/gtag/gtag.js +28 -18
- package/analytics/integrations/gtag/gtag.js.map +1 -1
- package/analytics/integrations/gtm/gtm.js +21 -13
- package/analytics/integrations/gtm/gtm.js.map +1 -1
- package/analytics/trackerRegistry.d.ts +10 -3
- package/analytics/trackerRegistry.js.map +1 -1
- package/components/ConfigProvider.d.ts +1 -0
- package/components/ConfigProvider.js.map +1 -1
- package/components/Head.js +4 -3
- package/components/Head.js.map +1 -1
- package/components/SortOrder/SortOrderContainer.js +7 -1
- package/components/SortOrder/SortOrderContainer.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +37 -0
@@ -21,6 +21,7 @@ export interface AnalyticsConfig {
|
|
21
21
|
releware?: AnalyticsConfigReleware;
|
22
22
|
trackingAllowed: boolean;
|
23
23
|
consentedToTracking: boolean;
|
24
|
+
useTrackingConsentAPI: boolean;
|
24
25
|
}
|
25
26
|
export interface AnalyticsProviderContext {
|
26
27
|
config: AnalyticsConfig;
|
@@ -40,6 +41,7 @@ export declare const getGoogleAnalytics: (config: BootOptions, selectedChannel:
|
|
40
41
|
useArticleNumberAsId: boolean;
|
41
42
|
tagManagerID: string;
|
42
43
|
additionalGtagTrackingIds: string[];
|
44
|
+
useTrackingConsentAPI: boolean;
|
43
45
|
};
|
44
46
|
declare const AnalyticsProvider: React.FC<AnalyticsProviderProps>;
|
45
47
|
export default AnalyticsProvider;
|
@@ -25,7 +25,8 @@ const initialAnalyticsConfig = {
|
|
25
25
|
uid: null
|
26
26
|
},
|
27
27
|
trackingAllowed: false,
|
28
|
-
consentedToTracking: false
|
28
|
+
consentedToTracking: false,
|
29
|
+
useTrackingConsentAPI: false
|
29
30
|
};
|
30
31
|
export const AnalyticsContext = createContext({
|
31
32
|
config: initialAnalyticsConfig,
|
@@ -52,7 +53,9 @@ export const getGoogleAnalytics = (config, selectedChannel) => {
|
|
52
53
|
: {};
|
53
54
|
let { trackingID, tagManagerID, useArticleNumberAsId,
|
54
55
|
// eslint-disable-next-line prefer-const
|
55
|
-
additionalGtagTrackingIds
|
56
|
+
additionalGtagTrackingIds,
|
57
|
+
// eslint-disable-next-line prefer-const
|
58
|
+
useTrackingConsentAPI } = Object.assign(Object.assign({}, config), channelOverrides);
|
56
59
|
if ((_c = (_b = (_a = selectedChannel.settings) === null || _a === void 0 ? void 0 : _a.tracking) === null || _b === void 0 ? void 0 : _b.ga) === null || _c === void 0 ? void 0 : _c.trackingId) {
|
57
60
|
trackingID = selectedChannel.settings.tracking.ga.trackingId;
|
58
61
|
}
|
@@ -67,14 +70,15 @@ export const getGoogleAnalytics = (config, selectedChannel) => {
|
|
67
70
|
trackingID,
|
68
71
|
useArticleNumberAsId,
|
69
72
|
tagManagerID,
|
70
|
-
additionalGtagTrackingIds
|
73
|
+
additionalGtagTrackingIds,
|
74
|
+
useTrackingConsentAPI
|
71
75
|
};
|
72
76
|
};
|
73
77
|
const AnalyticsProvider = function AnalyticsProvider(props) {
|
74
78
|
const shopConfig = useShopConfig();
|
75
79
|
const { selectedChannel } = useContext(ChannelContext);
|
76
80
|
const consentedToTracking = props.cookies.get('cookieConsent');
|
77
|
-
const { tagManagerID, trackingID, useArticleNumberAsId, additionalGtagTrackingIds } = getGoogleAnalytics(shopConfig, selectedChannel);
|
81
|
+
const { tagManagerID, trackingID, useArticleNumberAsId, additionalGtagTrackingIds, useTrackingConsentAPI } = getGoogleAnalytics(shopConfig, selectedChannel);
|
78
82
|
const { pixelId, token } = getFacebookCapi(selectedChannel);
|
79
83
|
const trackingAllowed = allowsTrackingWithDNT();
|
80
84
|
const analyticsConfig = React.useMemo(() => ({
|
@@ -88,7 +92,8 @@ const AnalyticsProvider = function AnalyticsProvider(props) {
|
|
88
92
|
},
|
89
93
|
releware: props.releware,
|
90
94
|
trackingAllowed: trackingAllowed,
|
91
|
-
consentedToTracking: consentedToTracking === 'agreed'
|
95
|
+
consentedToTracking: consentedToTracking === 'agreed',
|
96
|
+
useTrackingConsentAPI
|
92
97
|
}), [
|
93
98
|
trackingID,
|
94
99
|
additionalGtagTrackingIds,
|
@@ -96,7 +101,8 @@ const AnalyticsProvider = function AnalyticsProvider(props) {
|
|
96
101
|
tagManagerID,
|
97
102
|
props.releware,
|
98
103
|
trackingAllowed,
|
99
|
-
consentedToTracking
|
104
|
+
consentedToTracking,
|
105
|
+
useTrackingConsentAPI
|
100
106
|
]);
|
101
107
|
const { gtm, gtag, releware } = analyticsConfig;
|
102
108
|
const registry = useMemo(() => trackerRegistry({
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AnalyticsProvider.js","sourceRoot":"","sources":["AnalyticsProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAW,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,mBAAmB,EACnB,eAAe,EAEhB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"AnalyticsProv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,QAAQ,CAAC,EAAE;QACpD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,2BAA2B,EAAE,CAAC;KACvD;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
@@ -32,20 +32,27 @@ export function ga4Tracker({ trackingId, additionalGtagTrackingIds = [], currenc
|
|
32
32
|
w.gtag = function gtag() {
|
33
33
|
w.dataLayer.push(arguments);
|
34
34
|
};
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
35
|
+
if (config.useTrackingConsentAPI) {
|
36
|
+
/**
|
37
|
+
NB:
|
38
|
+
Only cookieless pings will be sent to Google servers.
|
39
|
+
There’s also a wait time of 500 milliseconds before any Google tags are allowed to fire,
|
40
|
+
to give time for the update command to be invoked.
|
41
|
+
*/
|
42
|
+
const consent = config.consentedToTracking ? 'granted' : 'denied';
|
43
|
+
gtag()('consent', 'default', {
|
44
|
+
ad_storage: consent,
|
45
|
+
// https://www.simoahava.com/analytics/consent-mode-google-tags/#restrict-advertising-storage
|
46
|
+
analytics_storage: consent,
|
47
|
+
personalization_storage: consent,
|
48
|
+
functionality_storage: 'granted',
|
49
|
+
security_storage: 'granted',
|
50
|
+
wait_for_update: 500
|
51
|
+
});
|
52
|
+
// NB: This only works when you set ad_storage to denied.
|
53
|
+
// https://developers.google.com/tag-platform/devguides/consent#redact_ads_data
|
54
|
+
gtag()('set', 'ads_data_redaction', true);
|
55
|
+
}
|
49
56
|
w.gtag('js', new Date());
|
50
57
|
if (process.env.REACT_APP_DEBUG_MODE === 'true') {
|
51
58
|
gtag()('config', trackingId, {
|
@@ -63,11 +70,14 @@ export function ga4Tracker({ trackingId, additionalGtagTrackingIds = [], currenc
|
|
63
70
|
});
|
64
71
|
gtag();
|
65
72
|
},
|
66
|
-
consent() {
|
67
|
-
|
68
|
-
|
73
|
+
consent(consents) {
|
74
|
+
gtag()('consent', 'update', consents
|
75
|
+
? Object.assign(Object.assign({}, consents), { functionality_storage: 'granted' }) : {
|
69
76
|
ad_storage: 'granted',
|
70
|
-
analytics_storage: 'granted'
|
77
|
+
analytics_storage: 'granted',
|
78
|
+
personalization_storage: 'granted',
|
79
|
+
functionality_storage: 'granted',
|
80
|
+
security_storage: 'granted'
|
71
81
|
});
|
72
82
|
},
|
73
83
|
trackProduct({ quantity, action, product, selectedVariation, list, listName, index, category }, context, eventId) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ga4.js","sourceRoot":"","sources":["ga4.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AAEnF,MAAM,IAAI,GAAG,GAAG,EAAE,CAAE,MAAc,CAAC,IAAI,CAAC;AAkBxC,SAAS,aAAa,CACpB,OAAgB,EAChB,iBAAiC,EACjC,oBAAoB,GAAG,KAAK,EAC5B,gBAAyB,EACzB,QAAiB;;IAEjB,OAAO;QACL,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI;QACxB,OAAO,EAAE,oBAAoB;YAC3B,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa;YACxB,CAAC,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,EAAE,0CAAE,QAAQ,EAAE;QAC3B,KAAK,EAAE,CAAA,MAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,KAAK,0CAAE,MAAM,MAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,MAAM,CAAA;QACjE,aAAa,EAAE,QAAQ;QACvB,YAAY,EAAE,MAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,MAAM,0CAAE,IAAI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CAAA;aAAA,CAAC,CAAC;YACJ,IAAI,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE;gBAChC,YAAY,EAAE,QAAQ;gBACtB,cAAc,EAAE,QAAQ;gBACxB,KAAK;gBACL,OAAO;aACR,CAAC,CAAC;QACL,CAAC;QACD,eAAe,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO;YAChD,IAAI,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE;gBAC3B,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;gBAC9B,OAAO;aACR,CAAC,CAAC;QACL,CAAC;QACD,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAO;YACrC,IAAI,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;QAClE,CAAC;QACD,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO;YAClC,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;QACpD,CAAC;QACD,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO;YACrC,IAAI,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;QACtD,CAAC;QACD,kBAAkB,CAAC,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,OAAO;YAClE,IAAI,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE;gBACjC,aAAa;gBACb,WAAW;gBACX,OAAO;aACR,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
@@ -48,20 +48,27 @@ export const gtagTracker = ({ trackingId, additionalGtagTrackingIds = [], curren
|
|
48
48
|
w.gtag = function gtag() {
|
49
49
|
w.dataLayer.push(arguments); // I'm not sure why but this dosen't work using rest params. Don't change this line
|
50
50
|
};
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
51
|
+
if (config.useTrackingConsentAPI) {
|
52
|
+
/**
|
53
|
+
NB:
|
54
|
+
Only cookieless pings will be sent to Google servers.
|
55
|
+
There’s also a wait time of 500 milliseconds before any Google tags are allowed to fire,
|
56
|
+
to give time for the update command to be invoked.
|
57
|
+
*/
|
58
|
+
const consent = config.consentedToTracking ? 'granted' : 'denied';
|
59
|
+
gtag()('consent', 'default', {
|
60
|
+
ad_storage: consent,
|
61
|
+
// https://www.simoahava.com/analytics/consent-mode-google-tags/#restrict-advertising-storage
|
62
|
+
analytics_storage: consent,
|
63
|
+
personalization_storage: consent,
|
64
|
+
functionality_storage: 'granted',
|
65
|
+
security_storage: 'granted',
|
66
|
+
wait_for_update: 500
|
67
|
+
});
|
68
|
+
// NB: This only works when you set ad_storage to denied.
|
69
|
+
// https://developers.google.com/tag-platform/devguides/consent#redact_ads_data
|
70
|
+
gtag()('set', 'ads_data_redaction', true);
|
71
|
+
}
|
65
72
|
w.gtag('js', new Date());
|
66
73
|
gtag()('config', trackingId, {
|
67
74
|
currency,
|
@@ -78,11 +85,14 @@ export const gtagTracker = ({ trackingId, additionalGtagTrackingIds = [], curren
|
|
78
85
|
});
|
79
86
|
gtag();
|
80
87
|
},
|
81
|
-
consent() {
|
82
|
-
|
83
|
-
|
88
|
+
consent(consents) {
|
89
|
+
gtag()('consent', 'update', consents
|
90
|
+
? Object.assign(Object.assign({}, consents), { functionality_storage: 'granted' }) : {
|
84
91
|
ad_storage: 'granted',
|
85
|
-
analytics_storage: 'granted'
|
92
|
+
analytics_storage: 'granted',
|
93
|
+
personalization_storage: 'granted',
|
94
|
+
functionality_storage: 'granted',
|
95
|
+
security_storage: 'granted'
|
86
96
|
});
|
87
97
|
},
|
88
98
|
trackProduct({ quantity, action, product, selectedVariation, list, listName, index, category }, context, eventId) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gtag.js","sourceRoot":"","sources":["gtag.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,oDAAoD,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAElF,MAAM,IAAI,GAAG,GAAG,EAAE,CAAE,MAAc,CAAC,IAAI,CAAC;AAExC,SAAS,cAAc,CAAC,EACtB,OAAO,EACP,iBAAiB,EACjB,oBAAoB,GAAG,KAAK,EAC5B,gBAAgB,EAChB,QAAQ,GAAG,EAAE,EAOd;IACC,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAClD,IAAI,oBAAoB,EAAE;QACxB,OAAO;YACL,EAAE,EAAE,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,aAAa,KAAI,OAAO,CAAC,aAAa;YAC7D,SAAS,EAAE,OAAO,CAAC,EAAE;YACrB,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,OAAO,EAAE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;YAC5C,UAAU,EAAE,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,aAAa;YAC5C,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,YAAY,EAAE,OAAO,CAAC,aAAa;YACnC,QAAQ;YACR,KAAK;SACN,CAAC;KACH;SAAM;QACL,2IAA2I;QAC3I,yHAAyH;QACzH,OAAO;YACL,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,OAAO,EAAE,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAj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W;YAClB,eAAe,EAAE,IAAI;YACrB,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IACD,eAAe,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO;QAChD,IAAI,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE;YAC3B,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;YAC9B,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IACD,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAO;QACrC,IAAI,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;IACD,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO;QAClC,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;IACpD,CAAC;IACD,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO;QACrC,IAAI,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,kBAAkB,CAAC,EAAE,aAAa,EAAE,WAAW,EAAE,EAAE,QAAQ,EAAE,OAAO;QAClE,IAAI,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE;YACjC,aAAa;YACb,WAAW;YACX,OAAO;SACR,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
@@ -54,23 +54,31 @@ export const gtmTracker = ({ containerId, currency, useArticleNumberAsId = false
|
|
54
54
|
document.location.pathname +
|
55
55
|
document.location.search
|
56
56
|
});
|
57
|
-
|
58
|
-
|
57
|
+
if (config.useTrackingConsentAPI) {
|
58
|
+
/**
|
59
|
+
NB:
|
59
60
|
Only cookieless pings will be sent to Google servers.
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
61
|
+
There’s also a wait time of 500 milliseconds before any Google tags are allowed to fire,
|
62
|
+
to give time for the update command to be invoked.
|
63
|
+
*/
|
64
|
+
const consent = config.consentedToTracking ? 'granted' : 'denied';
|
65
|
+
w.dataLayer.push({
|
66
|
+
event: 'gtm_consent_default',
|
67
|
+
ad_storage: consent,
|
68
|
+
// https://www.simoahava.com/analytics/consent-mode-google-tags/#restrict-advertising-storage
|
69
|
+
analytics_storage: consent,
|
70
|
+
personalization_storage: consent,
|
71
|
+
functionality_storage: 'granted',
|
72
|
+
security_storage: 'granted',
|
73
|
+
wait_for_update: 500
|
74
|
+
});
|
75
|
+
}
|
70
76
|
injectScript({ src: script });
|
71
77
|
},
|
72
78
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
73
|
-
consent(
|
79
|
+
consent() {
|
80
|
+
// Consent updated should be handled from inside GTM
|
81
|
+
},
|
74
82
|
trackProduct({ quantity, action, product, selectedVariation, list, listName, index, category }, context, eventId) {
|
75
83
|
const productData = Object.assign(Object.assign({}, getProductData({
|
76
84
|
product,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gtm.js","sourceRoot":"","sources":["gtm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAOlF,SAAS,IAAI,CAAC,KAA0B;IACtC,IAAI,MAAM,CAAC,SAAS,EAAE;QACpB,IAAI,KAAK,CAAC,SAAS,EAAE;YACnB,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;SAC5C;QAED,MAAM,CAAC,SAAS,CAAC,IA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,EAAE,EAAE,CAAC,EAAE,OAAO;QAC3D,IAAI,CAAC;YACH,KAAK,EAAE,eAAe;YACtB,aAAa;YACb,WAAW;YACX,OAAO;SACR,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
@@ -57,10 +57,16 @@ export interface InitOptions {
|
|
57
57
|
trackerRegistry: TrackerRegistry;
|
58
58
|
config: AnalyticsConfig;
|
59
59
|
}
|
60
|
+
declare type Consent = 'granted' | 'denied';
|
61
|
+
interface BaseConsentEvents {
|
62
|
+
ad_storage: Consent;
|
63
|
+
analytics_storage: Consent;
|
64
|
+
personalization_storage: Consent;
|
65
|
+
security_storage: Consent;
|
66
|
+
[key: string]: Consent;
|
67
|
+
}
|
60
68
|
export interface BaseTrackingEvents {
|
61
|
-
consent: (props:
|
62
|
-
callback?: () => void;
|
63
|
-
}, context: TrackingFunctionContext, eventId?: string) => void;
|
69
|
+
consent: (props: BaseConsentEvents, context: TrackingFunctionContext, eventId?: string) => void;
|
64
70
|
trackProduct: (props: TrackProductProps, context: TrackingFunctionContext, eventId?: string) => void;
|
65
71
|
trackCartCheckout: (props: TrackCartProps, context: TrackingFunctionContext, eventId?: string, callback?: (response: Response) => void) => void;
|
66
72
|
trackCart: (props: TrackCartProps, context: TrackingFunctionContext, eventId?: string) => void;
|
@@ -104,3 +110,4 @@ export declare function trackerRegistry({ config, inServer }: {
|
|
104
110
|
config: AnalyticsConfig;
|
105
111
|
inServer: boolean;
|
106
112
|
}): TrackerRegistry;
|
113
|
+
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"trackerRegistry.js","sourceRoot":"","sources":["trackerRegistry.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,aAAa,MAAM,eAAe,CAAC;
|
1
|
+
{"version":3,"file":"trackerRegistry.js","sourceRoot":"","sources":["trackerRegistry.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,aAAa,MAAM,eAAe,CAAC;AAmJ1C,MAAM,CAAC,MAAM,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iBACL,CAAC,CAAC;aACJ;QACH,CAAC;QACD,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;KAChD,CAAC;IACF,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConfigProvider.js","sourceRoot":"","sources":["ConfigProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAgB,MAAM,OAAO,CAAC;AAM3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
1
|
+
{"version":3,"file":"ConfigProvider.js","sourceRoot":"","sources":["ConfigProvider.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAgB,MAAM,OAAO,CAAC;AAM3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAsG5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAC5C,SAAS,CACV,CAAC;AAEF,MAAM,UAAU,cAAc,CAAC,EAO9B;QAP8B,EAC7B,MAAM,EAAE,UAAU,EAClB,QAAQ,OAKT,EAJI,IAAI,cAHsB,sBAI9B,CADQ;IAKP,MAAM,MAAM,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC5C,OAAO,CACL,oBAAC,iBAAiB,CAAC,QAAQ,kBAAC,KAAK,EAAE,MAAM,IAAM,IAAI,GAChD,QAAQ,CACkB,CAC9B,CAAC;AACJ,CAAC"}
|
package/components/Head.js
CHANGED
@@ -43,8 +43,9 @@ const Head = ({ data, route }) => {
|
|
43
43
|
if (!selectedChannel.language.isDefault) {
|
44
44
|
languageBasename = `/${getLanguageFromCulture(selectedChannel.language.culture)}`;
|
45
45
|
}
|
46
|
-
const
|
47
|
-
|
46
|
+
const hasIndexingOptions = (data.__typename === 'Category' || data.__typename === 'Page') &&
|
47
|
+
data.allowWebIndexing !== undefined;
|
48
|
+
const disallowWebIndexing = (_b = (hasIndexingOptions && !data.allowWebIndexing)) !== null && _b !== void 0 ? _b : false;
|
48
49
|
const fullPath = `${languageBasename}${(route === null || route === void 0 ? void 0 : route.canonicalPath) || ''}`;
|
49
50
|
const href = (route === null || route === void 0 ? void 0 : route.canonicalPath) &&
|
50
51
|
`${selectedChannel.url}${fullPath}${whiteListedSearch}`;
|
@@ -75,7 +76,7 @@ const Head = ({ data, route }) => {
|
|
75
76
|
route.alternateRoutes.map((alternateRoute) => renderAlternateRoutes(alternateRoute, channelsById, selectedChannelGroup &&
|
76
77
|
selectedChannelGroup.map((channel) => channel.id))),
|
77
78
|
href && React.createElement("link", { rel: "canonical", href: href }),
|
78
|
-
|
79
|
+
disallowWebIndexing && React.createElement("meta", { name: "robots", content: "noindex" })),
|
79
80
|
!disableOpenGraphGeneralData && (React.createElement(OpenGraphGeneralPageData, { route: route, data: data })),
|
80
81
|
(route === null || route === void 0 ? void 0 : route.canonicalPath) === '/' && React.createElement(SiteLinksSearchStructuredData, null)));
|
81
82
|
};
|
package/components/Head.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Head.js","sourceRoot":"","sources":["Head.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAWlE,OAAO,KAAK,EAAE,EAAM,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,eAAe,MAAM,0BAA0B,CAAC;AACvD,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,wBAAwB,EAA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 'custom'
|
16
16
|
};
|
17
17
|
export const sortValues = {
|
@@ -41,6 +41,12 @@ export const sortValues = {
|
|
41
41
|
direction: 'DESCENDING'
|
42
42
|
}
|
43
43
|
],
|
44
|
+
bestseller: [
|
45
|
+
{
|
46
|
+
text: t(''),
|
47
|
+
direction: 'DESCENDING'
|
48
|
+
}
|
49
|
+
],
|
44
50
|
custom: [
|
45
51
|
{
|
46
52
|
text: t(''),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SortOrderContainer.js","sourceRoot":"","sources":["SortOrderContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAuB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,gBAGN,MAAM,qDAAqD,CAAC;AAC7D,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAMnF,qDAAqD;AACrD,MAAM,CAAC,MAAM,SAAS,GAA8B;IAClD,IAAI,EAAE,QAAQ;IACd,cAAc,EAAE,QAAQ;IACxB,YAAY,EAAE,MAAM;IACpB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,QAAQ;IACrB,UAAU,EAAE,
|
1
|
+
{"version":3,"file":"SortOrderContainer.js","sourceRoot":"","sources":["SortOrderContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAuB,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,gBAGN,MAAM,qDAAqD,CAAC;AAC7D,OAAO,CAAC,MAAM,eAAe,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AAMnF,qDAAqD;AACrD,MAAM,CAAC,MAAM,SAAS,GAA8B;IAClD,IAAI,EA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AC;YAC1E,IAAI,SAAS,EAAE;gBACb,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;aAC1B;SACF;IACH,CAAC;IASM,MAAM;QACX,OAAO,CACL,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,IACzC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CACN,CAC7B,CAAC;IACJ,CAAC;CACF;AAED,eAAe,UAAU,CAAC,kBAAkB,CAAC,CAAC"}
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
@@ -765,10 +765,40 @@ export type Discount = {
|
|
765
765
|
externalId?: Maybe<Scalars['ID']>;
|
766
766
|
name?: Maybe<Scalars['String']>;
|
767
767
|
value?: Maybe<Price>;
|
768
|
+
type?: Maybe<DiscountType>;
|
768
769
|
description?: Maybe<Scalars['String']>;
|
769
770
|
campaign?: Maybe<Category>;
|
770
771
|
};
|
771
772
|
|
773
|
+
export enum DiscountType {
|
774
|
+
/** No discount defined */
|
775
|
+
Undefined = 'UNDEFINED',
|
776
|
+
/** Discount drops price of the order total by defined amount */
|
777
|
+
FixedAmount = 'FIXED_AMOUNT',
|
778
|
+
/** Discount drops price of the product by X % */
|
779
|
+
Percent = 'PERCENT',
|
780
|
+
/** Discount will get the amount of the cheapest product and use this as a discount */
|
781
|
+
Items = 'ITEMS',
|
782
|
+
/** Discount drops total price of the product if there is at least X of them in cart */
|
783
|
+
ItemsPercentageLimit = 'ITEMS_PERCENTAGE_LIMIT',
|
784
|
+
/** Only a collection of products */
|
785
|
+
OnlyUseLandingPage = 'ONLY_USE_LANDING_PAGE',
|
786
|
+
/** Discount drops price of the least expensive product in cart */
|
787
|
+
PercentOnLeastExpensiveItem = 'PERCENT_ON_LEAST_EXPENSIVE_ITEM',
|
788
|
+
/** Discount drops price of the most expensive product in cart */
|
789
|
+
PercentOnMostExpensiveItem = 'PERCENT_ON_MOST_EXPENSIVE_ITEM',
|
790
|
+
/** Discount allows to get a free gift when the product is added */
|
791
|
+
FreeProduct = 'FREE_PRODUCT',
|
792
|
+
/** Discount allows to get free shipping option for the product */
|
793
|
+
FreeShipping = 'FREE_SHIPPING',
|
794
|
+
/** Discount drops price for the package when all products in the package is added to cart */
|
795
|
+
PackageDiscount = 'PACKAGE_DISCOUNT',
|
796
|
+
/** Discount on the order total from a voucher */
|
797
|
+
BonusVoucherDiscount = 'BONUS_VOUCHER_DISCOUNT',
|
798
|
+
/** Discount allows to buy amount of X of the article, but pay only for amount of Y */
|
799
|
+
BuyXArticlesPayYAmount = 'BUY_X_ARTICLES_PAY_Y_AMOUNT'
|
800
|
+
}
|
801
|
+
|
772
802
|
export type Document = {
|
773
803
|
head?: Maybe<HtmlHead>;
|
774
804
|
primaryRoute?: Maybe<Route>;
|
@@ -2103,6 +2133,8 @@ export type Query = {
|
|
2103
2133
|
customerProductLists: Array<Maybe<CustomerProductList>>;
|
2104
2134
|
/** Fetches customer-unique offers */
|
2105
2135
|
customerLoyalty?: Maybe<CustomerLoyalty>;
|
2136
|
+
/** Lookup a customer by a mobile phone number */
|
2137
|
+
customerLookup?: Maybe<Customer>;
|
2106
2138
|
customer?: Maybe<Customer>;
|
2107
2139
|
/**
|
2108
2140
|
* Used in the sign up process when the shop has a third party customer repository, e.g. Voyado.
|
@@ -2187,6 +2219,11 @@ export type QueryCustomerProductListArgs = {
|
|
2187
2219
|
};
|
2188
2220
|
|
2189
2221
|
|
2222
|
+
export type QueryCustomerLookupArgs = {
|
2223
|
+
phoneNumber?: Maybe<Scalars['String']>;
|
2224
|
+
};
|
2225
|
+
|
2226
|
+
|
2190
2227
|
export type QueryExternalCustomerLookupArgs = {
|
2191
2228
|
key?: Maybe<Scalars['String']>;
|
2192
2229
|
};
|