Google reverse an analytic
Posted
by
Dan
on Pro Webmasters
See other posts from Pro Webmasters
or by Dan
Published on 2012-07-02T16:26:36Z
Indexed on
2012/07/02
21:23 UTC
Read the original article
Hit count: 310
google-analytics
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!
© Pro Webmasters or respective owner