====== Google Analytics: Adjusting for Canceled or Returned Orders ====== ===== Problem: no way to remove transactions ===== Any ROI calculation shown in your Google Analytics reports becomes misleading unless returned and canceled orders are taken into account. Unfortunately Google Analytics at this time does not offer a robust set of feature to take into account canceled or returned orders. The only information provided by Google is contained in the following article. http://www.google.com/support/analytics/bin/answer.py?hl=en-uk&answer=72290 ===== Solution: posting "negative" transactions ===== We have taken the information in the article mentioned above and created a tool in the ProductCart Control Panel that allows you to post a negative transaction to Google Analytics, as this article suggests. It's important to understand that the negative transaction will only be applied from the date it is submitted, and not from the date the order was originally placed. So if an order is placed on the 1st of the month and is then returned on the 15th, the negative transaction will likely be posted to Google Analytics on that day. That means that sales reports for the first two weeks (1st through the 14th) will be incorrect. Unfortunately there is no workaround for this problem. ===== Add tracking code to the refund file ===== You need to make a small code change to one of the Google Analytics files to use this feature. * In the [[ga_productcart#step_3_-_upload_the_productcart-google_analytics_files|Google Analytics files that you have downloaded]], browse to the //pcadmin// folder for the version that you are using * Locate the file //**pcGA_refundSubmit.asp**// * Locate the area of the code (after line 30) where the Google Analytics tracking code should be saved * Replace the existing code with yours, which is [[ga_tracking#getting_the_tracking_code|the tracking code mentioned here]]. * Save the file and upload it to the pcadmin folder (which has [[how_to:rename_pcadmin_folder|likely been renamed]] on your store). ===== How to post a refund or cancellation ===== ==== Adding a link to the Control Panel navigation ==== In the Control Panel, navigate to the page **//pcGA_refund.asp//**. If you want to, you can add a link to this page by editing the Control Panel navigation links. - Download the file //pcv4_navigation_links.asp// from the Control Panel folder and make a backup copy of it - Open it with your favorite HTML editor or Notepad - Locate the unordered list that starts with:
  • Orders