Zen Cart: Difference between revisions
Jump to navigation
Jump to search
Undo revision 22 by Aaron.trevellick@adrac.co.uk (talk) |
No edit summary |
||
| Line 24: | Line 24: | ||
== Conversion Value == | == Conversion Value == | ||
At End of: | At End of: | ||
Revision as of 14:02, 8 June 2018
Google Tag Manager
Install Tag Manager
Main Template file:
includes\templates\<<Theme Folder>>\common\tpl_main_page.php
Could also possibly be template file:
includes\templates\<<Theme Folder>>\checkout_success\tpl_main_page.php
Conversion URLS
Contact Thank-you URL:
index.php?main_page=contact_us&action=success
sale Thank-you URL:
index.php?main_page=checkout_confirmation
Conversion Value
At End of:
includes\templates\<<Theme Folder>>\templates\tpl_checkout_success.php
Place:
<?php
$orders = $db->Execute('SELECT * FROM zen_orders WHERE orders_id = ' . $zv_orders_id . ' LIMIT 1');
$order_total = $orders->fields['order_total'];
?>
<script>dataLayer.push({'order_id' : '<?php echo $zv_orders_id ?>', 'order_value' : '<?php echo $order_total ?>', 'event' : 'order-submitted'});</script>