// Function to return the JavaScript representation of a TransactionData object.
function getTransactionJs(&$trans) {
return <<<HTML
ga(‘ecommerce:addTransaction’, {
‘id’: ‘{$trans[‘id’]}’,
‘affiliation’: ‘{$trans[‘affiliation’]}’,
‘revenue’: ‘{$trans[‘revenue’]}’,
‘shipping’: ‘{$trans[‘shipping’]}’,
‘tax’: ‘{$trans[‘tax’]}’
});
HTML;
}

// Function to return the JavaScript representation of an ItemData object.
function getItemJs(&$transId, &$item) {
return <<


My Cart

Your cart is currently empty.

← Return To Shop

JOIN OUR

NEWSLETTER

 

 

 

Sign up today & be the first to

receive special offers!

 

 

You have Successfully Subscribed!

JOIN OUR

NEWSLETTER

 

 

 

Sign up today & be the first to

receive special offers!

 

 

You have Successfully Subscribed!