Skip to content

Commit

Permalink
yaParams
Browse files Browse the repository at this point in the history
Расширенный отчет для Яндекс.Метрика.
  • Loading branch information
dmitry-fomin committed Oct 2, 2014
1 parent d7ef2b7 commit d0e382e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion inc/counters.html
Expand Up @@ -58,6 +58,15 @@

{if $GLOBS.YACOUNTER && $GLOBS.YACOUNTER|strpos:'Например' !== 0}
<script type="text/javascript">
{if $order_id && !$order_show}
var yaParams = {
order_id: "{$order_id}",
order_price: {$order_total|replace:',':'.'},
currency: "{$GLOBS.currency.code}",
exchange_rate: 1
};
{foreach from=$basketdata item=item name="orderitems"}yaParams.push( { id: "{$item.oid}", name: "{$item.content.name}", price: {$item.content.price|replace:',':'.'}, quantity: {$item.count} } );{/foreach}
{/if}
$(function (){
$('a.inbasket').on('click', function(){
try { yaCounter{$GLOBS.YACOUNTER}.reachGoal('ProductPutFromCatalog'); }
Expand Down Expand Up @@ -89,7 +98,8 @@
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
trackHash:true } );
trackHash:true,
params:window.yaParams || { } } );
} catch(e) { }
});

Expand Down

0 comments on commit d0e382e

Please sign in to comment.