X-Cart: Difference between revisions

From Growth Agency Wiki
Jump to navigation Jump to search
Created page with "= Google Tag Manager = where you would place tracking conversion codes: /customer/main/order_message.tpl"
 
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Google Tag Manager =
= Google Tag Manager =
This will state how to install conversion tracking & GTM on X-Cart
== GTM Installation ==
The following file need to be modified:
<pre>
/skin/<<theme>>/customer/home.tpl
</pre>
The Tag Manager will need to be wrapped around with the {literal}{/literal} tags
== Conversion Tracking ==
where you would place tracking conversion codes:
where you would place tracking conversion codes:


/customer/main/order_message.tpl
<pre>
/skin/<<theme>>/customer/main/order_message.tpl
</pre>
 
Original is located in:
 
<pre>
/skin/common_files/customer/main/order_message.tpl
</pre>
 
code:
 
<pre>
{literal}
<script>
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'});
</script>
{/literal}
</pre>
 
== Clear Cache ==
 
to clear cache type the below URL in the address bar
 
<pre>
/cleanup.php
</pre>

Latest revision as of 10:29, 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/<<theme>>/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}
<script>
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'});
</script>
{/literal}

Clear Cache

to clear cache type the below URL in the address bar

/cleanup.php