我们正在尝试在 Magento 1.9.4中实现这些DATATRICS脚本。
脚本以静态形式提供:我的问题是我无法确定要在脚本中指定的确切 magento 变量以使其“动态”
你能通过指出确切的“动态”值来帮助我吗?
网络上有值列表吗?我在哪里可以买到它们?
这些值应该被替换而不是“NAME”,“SKU”..等,而不是示例脚本中声明的数字(静态)值。
感谢那些能够帮助我的人
// add the first product to the order
_paq.push(['addEcommerceItem',
"SKU", // (required) SKU: Product unique identifier
"NAME", // (optional) Product name
"CATEGORYNAME", // (optional) Product category. You can also specify an array of up to 5 categories eg. ["CATEGORYNAME", "CATEGORYNAME2", "CATEGORYNAME3"]
20, // (recommended) Product price
1 // (optional, default to 1) Product quantity
]);
// Here it is important to add all other products found in the order
// Specifiy the order details
_paq.push(['trackEcommerceOrder',
"ORDERID", // (required) Unique Order ID
10.70, // (required) Order Revenue grand total (includes tax, shipping, and subtracted discount)
5.5, // (optional) Order sub total (excludes shipping)
5.5, // (optional) Tax amount
5.5, // (optional) Shipping amount
false // (optional) Discount offered (set to false for unspecified parameter)
]);
_paq.push(['trackPageView']);
-
// Set the view of a product
_paq.push(['setEcommerceView',
"SKU", // (required) SKU: Product unique identifier
"NAME", // (optional) Product name
"CATEGORYNAME", // (optional) Product category. You can also specify an array of up to 5 categories eg. ["CATEGORYNAME", "CATEGORYNAME2", "CATEGORYNAME3"]
20, // (recommended) Product price
]);
// Set the view of a category
_paq.push(['setEcommerceView',
false,
false,
"CATEGORYNAME", // You can also specify an array of up to 5 categories eg. ["CATEGORYNAME", "CATEGORYNAME2", "CATEGORYNAME3"]
]);
_paq.push(['trackPageView']);
-
// Add all products found in the cart
_paq.push(['addEcommerceItem',
"SKU", // (required) SKU: Product unique identifier
"NAME", // (optional) Product name
"CATEGORYNAME", // (optional) Product category. You can also specify an array of up to 5 categories eg. ["CATEGORYNAME", "CATEGORYNAME2", "CATEGORYNAME3"]
20, // (recommended) Product price
1 // (optional, default to 1) Product quantity
]);
// Specifiy the order details
_paq.push(['trackEcommerceCartUpdate', 15.5]); // (required) Cart amount
_paq.push(['trackPageView']);