0

我已将跟踪代码安装到该站点,但我需要一些帮助来添加 nesseasry 代码以获取已处理订单的详细信息 提供的文档如下

生成特定订单信息的位置

订单特定信息可以通过 JavaScript 在 Volusion 内的 OrderFinished.asp 页面上生成。将初始化两个 JavaScript 数组,您可能需要注意:

Order Array Contents

Order[0] = Order ID
Order[1] = Unused
Order[2] = Payment Amount
Order[3] = Affiliate Commissionable Value
Order[4] = Sales Tax
Order[5] = Total Shipping Cost
Order[6] = Billing City
Order[7] = Billing State
Order[8] = Billing Country
Order[9] = Email Address
OrderDetails Array Contents

OrderDetails[X][0] = Order ID
OrderDetails[X][1] = Order Detail ID
OrderDetails[X][2] = Product Code
OrderDetails[X][3] = Product Name
OrderDetails[X][5] = Product Price
OrderDetails[X][6] = Quantity
Note that in the above example, [X] refers to an OrderDetail line item number (beginning from zero). There may be multiple OrderDetails arrays - one for each unique item contained within an order.

** 我的目标是获取订单的所有详细信息并使用谷歌分析进行跟踪*

我当前应用的代码是

<!-- Google Code for Adwords Refferal Purchase Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1036766578;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "yqleCOCs4gYQ8pqv7gM";
var google_conversion_value = 0;
var google_remarketing_only = false;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt=""         src="//www.googleadservices.com/pagead/conversion/1036766578/?    value=0&amp;label=yqleCOCs4gYQ8pqv7gM&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

<script type="text/javascript">
var fb_param = {};
fb_param.pixel_id = '6009634664184';
fb_param.value = '0.00';
fb_param.currency = 'USD';
(function(){
  var fpw = document.createElement('script');
  fpw.async = true;
  fpw.src = '//connect.facebook.net/en_US/fp.js';
  var ref = document.getElementsByTagName('script')[0];
  ref.parentNode.insertBefore(fpw, ref);
})();
</script>
<noscript><img height="1" width="1" alt="" style="display:none"     src="https://www.facebook.com/offsite_event.php?id=6009634664184&amp;value=0&amp;currency=USD"     /></noscript>

<!-- Facebook Conversion Code for GI Purchase Conversion -->
<script>(function() {
var _fbq = window._fbq || (window._fbq = []);
if (!_fbq.loaded) {
var fbds = document.createElement('script');
fbds.async = true;
fbds.src = '//connect.facebook.net/en_US/fbds.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(fbds, s);
_fbq.loaded = true;
}
})();
window._fbq = window._fbq || [];
window._fbq.push(['track', '6014711922784', {'value':'0.01','currency':'USD'}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none"     src="https://www.facebook.com/tr?    ev=6014711922784&amp;cd[value]=0.01&amp;cd[currency]=USD&amp;noscript=1" /></noscript>`
4

2 回答 2

0

您的转换代码不是用于 Google Analytics(分析)...而是用于 Google AdWords。

于 2015-01-21T07:59:30.013 回答
0

您从文档中显示的是订单变量如何在订单完成页面上输出。您需要将 javascript 添加到该页面,以将详细信息推送到 Google Analytics 中。

这是通用分析的代码:

<script type="text/javascript"> // Summary  ga('require', 'ecommerce', 'ecommerce.js');     ga('ecommerce:addTransaction', {        id: Order[0], // Order ID       affiliation: 'Convergent7', // Store name - Add yours       revenue: Order[2], // Grand Total       shipping: Order[5] , // Shipping Cost       tax: Order[4] // Sales Tax  }); // Details  for(var i=0;i<OrderDetails.length;i++) {        ga('ecommerce:addItem', {           id: OrderDetails[i][0], // Order Detail ID          sku: OrderDetails[i][2], // Product Code            name: OrderDetails[i][3], // Product Name           category: OrderDetails[i][4], // Category ID            price: OrderDetails[i][5], // Product Price             quantity: OrderDetails[i][6] // Quantity        });     } // Send   ga('ecommerce:send'); </script>

有关详细信息,请参阅以下文章(步骤 3)。http://www.convergent7.com/volusion/universal-analytics-upgrade/

于 2014-07-22T08:34:38.610 回答