I am trying to include some javascript for the google analytics ecommerce tracking.
In the example code I see something like this, in which I have replaced the variables with my own.
<?php
function getTransactionJs(&$order) {
return <<<HTML
ga('ecommerce:addTransaction', {
'id': '{$order->ord_order_numner}',
'affiliation': 'Marcella',
'revenue': '{$order->total_payment}',
'shipping': '0',
'tax': '0'
});
HTML;
}
echo getTransactionJs($order);
?>
However I met with a syntax error. May I ask what is the meaning of
return <<<HTML
Thanks in advance!