Eliminate Duplicate Transactions in Google Analytics

This simple piece of javascript will reduce (or even eliminate) the number of duplicate transactions which are recorded in your Google Analytics reports.

The script works by checking whether the client browser has already sent a tracking notification to Google for this transaction id. It places a long term cookie on the client machine, ensuring that subsequent views of the same page from that client browser do not send further transaction notifications.

It works by replacing the usual tracking code in your receipt / transaction confirmation web page with the following code:

<script src="checkissent.js" type="text/javascript"></script>
<script type="text/javascript">
if(!checkIsSent('YOUR CART ID HERE')){
 
      PASTE YOUR GOOGLE TRANSACTION TRACKING CODE HERE
  } </script>

Download the script here.

Legalese

Whilst we've made every effort to make this script both bomb and idiot proof, the usual disclaimers apply: Invent Partners accepts no liability for any loss or damages incurred by the use or misuse of this script. Sorry.

Contact Us