Google reverse an analytic
- by Dan
I am confused about what code must be executed to reverse a google analytic. I have the following code pasted within a test page:
<body onLoad=”function()”>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-25305776-3']);
_gaq.push(['_trackPageview']);
_gaq.push(['_addTrans',
'11455', // order ID - required
'-42.38', // total - required
'-2.38', // tax
'-15.00' // shipping
]);
_gaq.push(['_addItem',
'11455', // order ID - necessary to associate item with transaction
'Evan Turner Turningpoint™ Basketball Pants', // product name
'25.00', // 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';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Is this correct? Thanks!