We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7dc2b3 commit 5fd7481Copy full SHA for 5fd7481
app/code/Magento/GoogleAnalytics/view/frontend/web/js/google-analytics.js
@@ -51,10 +51,9 @@ define([
51
if (config.pageTrackingData.isAnonymizedIpActive) {
52
ga('set', 'anonymizeIp', true);
53
}
54
- ga('send', 'pageview' + config.pageTrackingData.optPageUrl);
55
56
// Process orders data
57
- if (config.ordersTrackingData) {
+ if (config.ordersTrackingData.length) {
58
ga('require', 'ec', 'ec.js');
59
60
ga('set', 'currencyCode', config.ordersTrackingData.currency);
@@ -74,6 +73,9 @@ define([
74
73
75
76
ga('send', 'pageview');
+ } else {
77
+ // Process Data if not orders
78
+ ga('send', 'pageview' + config.pageTrackingData.optPageUrl);
79
80
81
0 commit comments