PHP Code:
<?php
//-Add the tracking script only for the checkout_success page
$customer_email_info = $db->Execute ("SELECT customers_email_address FROM " . TABLE_CUSTOMERS . " WHERE customers_id = " . (int)$_SESSION['customers_id'] . " LIMIT 1");
if (!$customer_email_info->EOF) {
$customers_email_address = $customer_email_info->fields['customers_email_address'];
?>
<script type="text/javascript" src="https://tracking.trovaprezzi.it/javascripts/tracking.min.js" async="true"></script>
<script type="text/javascript">
window._tt = window._tt || [];
window._tt.push({ event: "setAccount", id: "RMUnJ1SUw1" });
window._tt.push({ event: "setOrderId", order_id: "<?php echo $order_id; ?>" });
window._tt.push({ event: "setEmail", email: "<?php echo $customers_email_address; ?>" });
<?php
foreach ($orders->products as $current_product) {
?>
window._tt.push({ event: "addItem", sku: "<?php echo $current_product['model']; ?>" , product_name: "<?php echo $current_product['name']; ?>" });
<?php
}
?>
window._tt.push({ event: "orderSubmit"});
</script>
<?php
}
but nothing happens