Commit 42d9e5c33a52fe1887941759c4a9af0f3e6c4251

Authored by Yarik
1 parent f0988547

Google ecommerce

Showing 1 changed file with 1 additions and 28 deletions   Show diff stats
frontend/views/order/success.php
@@ -49,34 +49,7 @@ @@ -49,34 +49,7 @@
49 <a href="/" style="display:inline">« На главную</a> 49 <a href="/" style="display:inline">« На главную</a>
50 </div> 50 </div>
51 <!-- Google ECommerce Code --> 51 <!-- Google ECommerce Code -->
52 - <script>  
53 - ga('require', 'ecommerce');  
54 - <?php  
55 - $sum = 0;  
56 - foreach ($order->products as $product) {  
57 - ?>  
58 - ga(  
59 - 'ecommerce:addItem', {  
60 - 'id': '<?= $order->id; ?>',  
61 - 'name': '<?= $product->product_name; ?>',  
62 - 'price': '<?= $product->price; ?>',  
63 - 'sku': '<?= $product->sku; ?>',  
64 - 'quantity': '<?= $product->quantity; ?>'  
65 - }  
66 - );  
67 - <?php  
68 - $sum += $product->sum_cost;  
69 - }  
70 - ?>  
71 - ga(  
72 - 'ecommerce:addTransaction', {  
73 - 'id': '<?= $order->id; ?>',  
74 - 'affiliation': 'www.linija-svitla.ua',  
75 - 'revenue': '<?= $sum; ?>',  
76 - }  
77 - );  
78 - ga('ecommerce:send');  
79 - </script> 52 +
80 </td> 53 </td>
81 </tr> 54 </tr>
82 </tbody> 55 </tbody>