Asp.net 使用.Net通过Paypal设置google电子商务跟踪
我需要有GA电子商务跟踪系统设置为我的网站与.net。 我的交易来自贝宝 如果有人曾经有过这方面的经验,如果你能提供指导或简单的代码示例,那就太好了Asp.net 使用.Net通过Paypal设置google电子商务跟踪,asp.net,paypal,Asp.net,Paypal,我需要有GA电子商务跟踪系统设置为我的网站与.net。 我的交易来自贝宝 如果有人曾经有过这方面的经验,如果你能提供指导或简单的代码示例,那就太好了 <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-########-#']); _gaq.push(['_setDomainName', '.mydomain.com']); _
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-########-#']);
_gaq.push(['_setDomainName', '.mydomain.com']);
_gaq.push(['_trackPageview']);
_gaq.push(['_addTrans',
'117', // order ID - required
'StoreName.com', // affiliation or store name
'35.96', // total - required
'0', // tax
'0', // shipping
'', // city
'', // state or province
'' // country
]);
_gaq.push(['_addItem',
'117', // order ID - required
'1', // SKU/code - required
'1 Pack', // product name
'Catagory5', // catagory
'35.96, // unit price - required
'1' // quantity - required
]);
_gaq.push(['_trackTrans']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
})();
</script>
var _gaq=_gaq | |[];
_gaq.push([“设置帐户”、“UA-)-;
_gaq.push([''u setDomainName','.mydomain.com']);
_gaq.push([''u trackPageview']);
_gaq.push(['''u addTrans',
“117”,//订单ID-必需
'StoreName.com',//附属关系或门店名称
“35.96”,//总计-必填项
“0”,//税
“0”,//正在传送
'',//城市
'',//州或省
''/国家
]);
_gaq.push(附加项),
“117”,//订单ID-必需
“1”,//SKU/代码-必需
“1个包装”,//产品名称
“分类5”,//分类
'35.96,//单价-必需
'1'//数量-必需
]);
_gaq.push([''u trackTrans']);
(功能(){
var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;
ga.src=('https:'==document.location.protocol?'https://ssl' : 'http://www“)+”.google analytics.com/ga.js';
(document.getElementsByTagName('head')[0]| | document.getElementsByTagName('body')[0])。appendChild(ga);
})();
您只需将Google Analytics提供给您的Javascript代码片段放在感谢/回执页面上,然后使用您的购物车数据或您正在使用的任何内容动态填充它
但是,如果您想确保准确跟踪,您需要确保使用PayPal的Express Checkout API,而不是标准的HTML按钮,因为如果没有API,就无法保证用户将返回到您的最终页面,因此在这些情况下,它不会被跟踪。使用快速结帐,这不会是一个问题 嘿,谢谢你的回复……我需要添加我在代码段顶部添加的代码还是较短版本的代码段?这是与基本分析代码段分开的额外代码段。这里有一个指南:贝宝转账怎么样?我是否需要将其包含在我的代码隐藏中?还是不需要?你是说从PayPal转账到你的银行?你不想在分析电子商务跟踪中跟踪这一点,因为这不是实际销售。抱歉,Paypal数据传输就像paylap自动生成的代码