Zen Cart: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 1: | Line 1: | ||
= Google Tag Manager = | == Google Tag Manager == | ||
Install Tag Manager | Install Tag Manager | ||
| Line 12: | Line 12: | ||
</pre> | </pre> | ||
== Conversion URLS == | === Conversion URLS === | ||
Contact Thank-you URL: | Contact Thank-you URL: | ||
<pre> | <pre> | ||
| Line 23: | Line 23: | ||
</pre> | </pre> | ||
== Conversion Value == | === Conversion Value === | ||
At End of: | At End of: | ||
Revision as of 16:43, 1 December 2020
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>
If a fatal error occurs at same location of script, check the table name matches to the database as can be changed