Closed
Description
Preconditions
- Set Analytics code in admin
- Load any page
Steps to reproduce
- None
Expected result
- pageview is triggered once
Actual result
- pageview is triggered twice
It looks like a problem in the GoogleAnalytics/view/frontend/web/js/google-analytics.js file, line 54 on, which calls ga('send', 'pageview'...
twice:
`
ga('send', 'pageview' + config.pageTrackingData.optPageUrl);
// Process orders data
if (config.ordersTrackingData) {
ga('require', 'ec', 'ec.js');
//Set currency code
ga('set', 'currencyCode', config.ordersTrackingData.currency);
// Collect product data for GA
if (config.ordersTrackingData.products) {
$.each(config.ordersTrackingData.products, function (index, value) {
ga('ec:addProduct', value);
});
}
// Collect orders data for GA
if (config.ordersTrackingData.orders) {
$.each(config.ordersTrackingData.orders, function (index, value) {
ga('ec:setAction', 'purchase', value);
});
}
ga('send', 'pageview');`
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.2 release lineThe issue has been fixed in 2.3 release lineGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release