0

我们正在尝试在 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']);
4

1 回答 1

0

请查看以下文档:

https://help.datatrics.com/en/collections/1864777-tracking-scripts#ecommerce-scripts

上面的脚本有更好的文档记录,并且更清楚你需要什么来制作“动态”。

我希望这有帮助!您还可以通过单击本文档中右下角的聊天气泡与 Datatrics 聊天。

[编辑] 如果您将 Google 跟踪代码管理器与增强型电子商务一起使用,那么在那里实现这些脚本可能会更容易。有一个复制/粘贴脚本可以捕获所有 GTM 增强型电子商务数据并将其发送到 Datatrics 跟踪脚本。

于 2019-08-08T07:55:36.133 回答