Zen Cart: Difference between revisions
Jump to navigation
Jump to search
Created page with "= Google Tag Manager = Install Tag Manager Main Template file: <pre> includes\templates\<<Theme Folder>>\common\tpl_main_page.php </pre> Could also possibly be template file..." |
No edit summary |
||
| Line 13: | Line 13: | ||
== Conversion URLS == | == Conversion URLS == | ||
sale Thank-you URL: | sale Thank-you URL: | ||
Revision as of 14:01, 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
sale Thank-you URL:
index.php?main_page=checkout_confirmation
Conversion Value
sale Thank-you URL:
index.php?main_page=checkout_confirmation
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>