Google 애널리틱스에서 거래를 추적하는 데 문제가 있습니다. 주문 확인 페이지에서 생성하는 코드는 다음과 같습니다.Google 애널리틱스에서 거래를 추적하지 않음
이 중 하나를 디버깅하는 방법을 모르겠다. Google js에서 오류 코드를 가져 오는 방법에 대한 정보를 찾을 수 없습니다. 내가 할 수만 있다면 방화범의 콘솔에서 실행할 것입니다. 이 시점에서 나는 진행하는 방법에 붙어있다.
<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>
주셔서 감사합니다.
단가 이후 오타가 발견되었습니다. – reconbot