Google Analytics Web Tester

About this site

Google Analytics Web Tester is a tool to help developers, digital analysts and QAs validate the implementation of Google Analytics tracking on a website. By regularly executing automated tests on the site, teams can detect unexpected behaviors as soon as it happens, and fix them before the site goes live.

Motivation

Testing proper implementation of Google Analytics Tracking on a website can be a tricky thing to do. Unless you run a daily gamut of tests, what works one day may be broken the next one without you ever noticing.

But it doesn't have to be that way.

This library eases the process of writing automated tests by providing a set of easy to use utility methods. It comes with an AngularJS demo application to show how to validate that the ga() snippet receives the expected data when the user interacts with the page.

Whether using the Google Analytics snippet directly (ga()) or Google Tag Manager, all tracking interactions can be recorded the exact same way: