Настройка электронной торговли в Analytics на примере CMS Simpla

WordPress Rainbow Hilite

 {literal}
<script type='text/javascript'>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-31871436-2']);
_gaq.push(['_trackPageview']);
{/literal}
{$t1 = $order->date|truncate:18:"":true}
{$t2 = date("Y-m-d H:i:s")|truncate:18:"":true}
{if $order->status==0 && $t1 == $t2}
{literal}
<!-- Google Analitycs-->
_gaq.push(['_addTrans','{/literal}{$order->id}{literal}','panda-shop.od.ua','{/literal}{$order->total_price}{literal}','0.00','{/literal}{$order->delivery_price|convert}{literal}','{/literal}{$order->address|escape}{literal}','','']);
{/literal}{foreach $purchases as $purchase}{literal}
_gaq.push(['_addItem','{/literal}{$order->id}{literal}','{/literal}{$purchase->variant->sku|escape}{literal}','{/literal}{$purchase->product_name|escape} ({$purchase->product->brand|escape}){literal}','{/literal}{$purchase->product->cat|escape}{literal}','{/literal}{$purchase->price}{literal}','{/literal}{$purchase->amount}{literal}']);
{/literal}{/foreach}{literal}
_gaq.push(['_trackTrans']); 
{/literal}
{/if}
{literal}
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();   
</script>
{/literal}

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *