Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Web Analytics Unit (WAUnit)

WAUnit is a testing framework developed by Joao Correia <>. The current version is targeted for use with Google Analytics (other platforms coming soon).

When you setup custom tracking for a website you have to validate if the hits are correct, HitInspect automates the verification of tracking specifications.

Watch the Youtube video 'WAUnit Overview'.

In a nutshell this is how it works:

  1. A python unittest using Selenium Webdriver is executed
  2. A local proxy captures the Google Analytics hits
  3. The unittest compares the specs with the proxy hit log and returns OK/FAIL for each test and detailed information on what doesn’t match.


  • Python 2.7
  • Selenium
  • mitmproxy


Install WAUnit using pip. Notice a core requirement is mitmproxy. Be sure to install SSL certificates for mitmproxy so the proxy can capture SSL traffic.

python pip install WAUnit


If you are not familiar with Selenium read the getting started with Selenium Python Bindings. Watch the Youtube video 'Getting Started with WAUnit'

  1. Create a folder for the project
  2. Create a configuration file: wunit.cfg
  3. Start the proxy: waunitproxy –config wunit.cfg
  4. A file named hitdata.db will be created in your home directory
  5. Download [](#) to your project directory
  6. Execute the sample with: python


Only googleanalyticsuniversal is available right now
parser = googleanalyticsuniversal

[Proxy] host =
port = 8080
hitsdb = hitsdata