X-Cart: Difference between revisions

From Growth Agency Wiki
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:


== GTM Installation ==
== GTM Installation ==
The following file need to be modified:
<pre>
/skin/<<>>/customer/home.tpl
</pre>
The Tag Manager will need to be wrapped around with the {literal}{/literal} tags


== Conversion Tracking ==
== Conversion Tracking ==

Revision as of 10:20, 20 August 2018

Google Tag Manager

This will state how to install conversion tracking & GTM on X-Cart

GTM Installation

The following file need to be modified:

/skin/<<>>/customer/home.tpl

The Tag Manager will need to be wrapped around with the {literal}{/literal} tags

Conversion Tracking

where you would place tracking conversion codes:

/skin/<<theme>>/customer/main/order_message.tpl

Original is located in:

/skin/common_files/customer/main/order_message.tpl

code:

{literal}
var dataLayer = window.dataLayer || [];
dataLayer.push({'order_id' : '{/literal}{$orders[0].order.orderid}{literal}', 'order_value' : '{/literal}{$orders[0].order.subtotal}{literal}', 'event' : 'order-submitted'});
{/literal}


Clear Cache

to clear cache type the below URL in the address bar

/cleanup.php