2013-06-15 4 views
1

고객이 내 사이트에서 PayPal을 통해 제품을 구매할 때마다 제품을 다운로드하기 위해 다시 리디렉션 할 것입니다.Google 애널리틱스 전자 상거래 추적이 PayPal과 함께 작동하지 않음

Analytics에서 해당 트랜잭션을 푸시하고 싶지만 예상대로 작동하지 않습니다.

PayPal은 거래 ID (tx), 지불 금액 (amt)과 같은 몇 가지 $ _GET 변수로 리디렉션합니다.

var _gaq = _gaq || []; 
_gaq.push(['_setAccount', '[MY_CODE_HERE]']); 
_gaq.push(['_setAllowLinker', true]); 
_gaq.push(['_trackPageview']); 

_gaq.push(['_addTrans', 
'<?php echo $_GET['tx']; ?>',       // transaction ID - required 
'<?php echo $_GET['amt']; ?>',      // total - required 
'0',             // tax 
'0'             // shipping 
]); 
_gaq.push(['_addItem', 
'<?php echo $_GET['tx']; ?>',       // transaction ID - required 
'SKU here',           // SKU/code - required 
'Product here',          // product name 
'<?php echo $_GET['amt']; ?>',      // unit price - required 
'1'             // quantity - required 
]); 
_gaq.push(['_trackTrans']); 

(function() { 
// the remaining here. 
})(); 

$_GET['tx']$_GET['amt']는 제대로 작동하지만, 트랜잭션이 분석에 표시되지 않습니다.

프로필이 전자 상거래 사이트로 설정되었습니다. 다른 지불 프로세서 인 FastSpring의 거래를 볼 수 있습니다.

PayPal의 거래가 애널리틱스에 전혀 표시되지 않습니다.

답변

2

_addTrans_addItem은 모두 간단하게 ''과 같은 옵션을 포함하여 모든 설정을 가져야합니다.

_gaq.push(['_addTrans', 
'<?php echo $_GET['tx']; ?>',       // transaction ID - required 
'',             // affiliation or store name 
'<?php echo $_GET['amt']; ?>',      // total - required 
'0',             // tax 
'0',             // shipping 
'',             // city 
'',             // state or province 
''             // country 
]); 
_gaq.push(['_addItem', 
'<?php echo $_GET['tx']; ?>',       // transaction ID - required 
'SKU here',           // SKU/code - required 
'Product here',          // product name 
'',             // category or variation 
'<?php echo $_GET['amt']; ?>',      // unit price - required 
'1'             // quantity - required 
]); 

디버그를 위해 Chrome 확장 프로그램 인 GA Debug를 사용하는 것이 좋습니다.

관련 문제