This release is a pre-release and may not be stable for production use.
Web Analytics Unit (WAUnit)
WAUnit is a testing framework for 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:
A python unittest using Selenium Webdriver is executed
A local proxy captures the Google Analytics hits
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.
Requirements
Python 2.7
Selenium
mitmproxy
Installation
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
Quickstart
If you are not familiar with Selenium read the getting started with Selenium Python Bindings. Watch the Youtube video ‘Getting Started with WAUnit’
Create a folder for the project
Create a configuration file: wunit.cfg
Start the proxy: waunitproxy –config wunit.cfg
A file named hitdata.db will be created in your home directory
Download [sample.py](#) to your project directory
Execute the sample with: python sample.py
wunit.cfg
[WAUnit]
Only googleanalyticsuniversal is available right now
parser = googleanalyticsuniversal
[Proxy] host = 127.0.0.1
port = 8080
hitsdb = hitsdata
Questions? Comments?
Drop me a line at @joaocorreia
Release files for waunit 0.0.4a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| waunit-0.0.4a1.tar.gz | 5.3 kB | Details |
Release files / waunit-0.0.4a1.tar.gz
| Download URL | waunit-0.0.4a1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa92741fd80525ff0398a0288ea48bfaf652c2b023ece2552c1b6e608b9e9379
|
|
BLAKE2b-256 checksum How to use checksums |
fdd4cfdf991b02643695b856718846efde3e71f69ce92456afbc2d0fdb9b737d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |