Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
type: get(clientInformationResponse, 'value.device.type', TYPE_PHONE),
os: get(clientInformationResponse, 'value.device.os.platform', OS_ALL),
state: getState(),
services: get(clientInformationResponse, 'value.device.supportedAnalyticsServices', []),
libVersion: get(clientInformationResponse, 'value.libVersion'),
appVersion: get(clientInformationResponse, 'value.appVersion'),
};
// TODO: instantiate the UnifiedPlugin only if a native tracker is configured (FB, AppsFlyer)
// eslint-disable-next-line no-new
new UnifiedPlugin();
if (appConfig.tracking.hasWebTrackingEngage) {
// eslint-disable-next-line global-require
const GaBase = require('@shopgate/tracking-core/plugins/trackers/GaBase').default;
GaBase.createUniversal({
shopNumber,
codebaseVersion: get(clientInformationResponse, 'value.codebaseVersion'),
config: {
merchant: [],
shopgate: {
id: clientInformation.os === OS_ANDROID ?
appConfig.webTrackingEngage.android :
appConfig.webTrackingEngage.ios,
useNetPrices: false,
},
},
});
}
try {
// eslint-disable-next-line global-require, import/no-dynamic-require