-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentProgress: needs update
Description
There is currently no support for multi currency in the magento google analytics module. It's a 1 minute change and should really be included as default as most stores will use Google analytics and if they have multiple currencies not having multicurrency support will skew their data.
In the google analytics module block Ga.php the below needs to be changed from
$result[] = sprintf(
"ga('ec:setAction', 'purchase', {
'id': '%s',
'affiliation': '%s',
'revenue': '%s',
'tax': '%s',
'shipping': '%s'
});",
$order->getIncrementId(),
$this->escapeJsQuote($this->_storeManager->getStore()->getFrontendName()),
$order->getBaseGrandTotal(),
$order->getBaseTaxAmount(),
$order->getBaseShippingAmount()
);
to
$result[] = sprintf(
"ga('ec:setAction', 'purchase', {
'id': '%s',
'affiliation': '%s',
'revenue': '%s',
'tax': '%s',
'shipping': '%s',
'currency': '%s'
});",
$order->getIncrementId(),
$this->escapeJsQuote($this->_storeManager->getStore()->getFrontendName()),
$order->getBaseGrandTotal(),
$order->getBaseTaxAmount(),
$order->getBaseShippingAmount(),
$order->getOrderCurrencyCode()
);
Metadata
Metadata
Assignees
Labels
Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentProgress: needs update