Skip to content
Snippets Groups Projects
Commit c87d925b authored by Ievgen Shakhsuvarov's avatar Ievgen Shakhsuvarov Committed by GitHub
Browse files

MAGETWO-86630: Magento 2.2 Develop fix for #12221 Google Analytics Pageview Triggered twice #13034

parents 5bd01048 6c58188f
No related merge requests found
...@@ -51,10 +51,9 @@ define([ ...@@ -51,10 +51,9 @@ define([
if (config.pageTrackingData.isAnonymizedIpActive) { if (config.pageTrackingData.isAnonymizedIpActive) {
ga('set', 'anonymizeIp', true); ga('set', 'anonymizeIp', true);
} }
ga('send', 'pageview' + config.pageTrackingData.optPageUrl);
// Process orders data // Process orders data
if (config.ordersTrackingData) { if (config.ordersTrackingData.length) {
ga('require', 'ec', 'ec.js'); ga('require', 'ec', 'ec.js');
//Set currency code //Set currency code
...@@ -75,6 +74,9 @@ define([ ...@@ -75,6 +74,9 @@ define([
} }
ga('send', 'pageview'); ga('send', 'pageview');
}else{
// Process Data if not orders
ga('send', 'pageview' + config.pageTrackingData.optPageUrl);
} }
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment