CS
This commit is contained in:
parent
a7f38bf474
commit
6915872212
@ -4,21 +4,21 @@
|
||||
ga('require', 'ecommerce', 'ecommerce.js');
|
||||
|
||||
ga('ecommerce:addTransaction', {
|
||||
'id': '{$trans.id}', // Transaction ID. Required
|
||||
'affiliation': '{$trans.store}', // Affiliation or store name.
|
||||
'revenue': '{$trans.total}', // Grand Total.
|
||||
'shipping': '{$trans.shipping}', // Shipping.
|
||||
'tax': '{$trans.tax}' // Tax.
|
||||
'id': '{$trans.id}', // Transaction ID. Required
|
||||
'affiliation': '{$trans.store}', // Affiliation or store name.
|
||||
'revenue': '{$trans.total}', // Grand Total.
|
||||
'shipping': '{$trans.shipping}', // Shipping.
|
||||
'tax': '{$trans.tax}' // Tax.
|
||||
});
|
||||
|
||||
{foreach from=$items item=item}
|
||||
ga('ecommerce:addItem', {
|
||||
'id': '{$item.OrderId}', // Transaction ID. Required.
|
||||
'name': '{$item.Product}', // Product name. Required.
|
||||
'sku': 'DD23444', // SKU/code.
|
||||
'category': '{$item.Category}', // Category or variation.
|
||||
'price': '{$item.Price}', // Unit price.
|
||||
'quantity': '{$item.Quantity}' // Quantity.
|
||||
'id': '{$item.OrderId}', // Transaction ID. Required.
|
||||
'name': '{$item.Product}', // Product name. Required.
|
||||
'sku': 'DD23444', // SKU/code.
|
||||
'category': '{$item.Category}', // Category or variation.
|
||||
'price': '{$item.Price}', // Unit price.
|
||||
'quantity': '{$item.Quantity}' // Quantity.
|
||||
});
|
||||
{/foreach}
|
||||
|
||||
@ -28,22 +28,22 @@
|
||||
ga('require', 'ec');
|
||||
|
||||
{foreach from=$items item=item}
|
||||
ga('ec:addProduct', { // Provide product details in an productFieldObject.
|
||||
'id': '{$item.SKU}', // Product ID (string).
|
||||
'name': '{$item.Product}', // Product name (string).
|
||||
'category': '{$item.Category}', // Product category (string).
|
||||
'brand': '{$item.Category}', // Product brand (string).
|
||||
'price': '{$item.Price}', // Product price (currency).
|
||||
'quantity': {$item.Quantity} // Product quantity (number).
|
||||
ga('ec:addProduct', { // Provide product details in an productFieldObject.
|
||||
'id': '{$item.SKU}', // Product ID (string).
|
||||
'name': '{$item.Product}', // Product name (string).
|
||||
'category': '{$item.Category}', // Product category (string).
|
||||
'brand': '{$item.Category}', // Product brand (string).
|
||||
'price': '{$item.Price}', // Product price (currency).
|
||||
'quantity': {$item.Quantity} // Product quantity (number).
|
||||
});
|
||||
{/foreach}
|
||||
|
||||
ga('ec:setAction', 'purchase', { // Transaction details are provided in an actionFieldObject.
|
||||
'id': '{$trans.id}', // (Required) Transaction id (string).
|
||||
'affiliation': '{$trans.store}', // Affiliation (string).
|
||||
'revenue': '{$trans.total}', // Revenue (currency).
|
||||
'tax': '{$trans.tax}', // Tax (currency).
|
||||
'shipping': '{$trans.shipping}', // Shipping (currency).
|
||||
ga('ec:setAction', 'purchase', { // Transaction details are provided in an actionFieldObject.
|
||||
'id': '{$trans.id}', // (Required) Transaction id (string).
|
||||
'affiliation': '{$trans.store}', // Affiliation (string).
|
||||
'revenue': '{$trans.total}', // Revenue (currency).
|
||||
'tax': '{$trans.tax}', // Tax (currency).
|
||||
'shipping': '{$trans.shipping}', // Shipping (currency).
|
||||
});
|
||||
|
||||
{literal}
|
||||
|
Loading…
Reference in New Issue
Block a user