MissingRequest2

How to track versioned requests?

Sometimes it is needed that some requests or loaded javascript files are versioned. For example, someone releases the new version 1.1 of your favorite javascript framework. In most cases, this means the javascript file that is included on your web page changes its name (e.g. framework1.0.js to framework1.1.js).

If your MissingRequest2 check fails afterward that could mean that you did check for the exact version of the file. That’s a good idea if you want to be sure the version does not get updates coincidentally. In most cases, it’s not. If the version does not matter for the test case there is an easy way to make the checks more robust. Just use regular expressions.

It is possible to use a placeholder where the version number is. In our example, it would be “framework(.*).js”. From now on it is only needed that there is a framework.js file loaded. No matter what version.

How we handle Google Analytics?

One of our unique selling points is that we are using real browsers instead of just downloading the HTML files. This comes handy because a lot of page rendering is done via javascript. This global trend cannot be stopped anymore.

On the one hand, this is exactly what our users need, but on the other hand, there is one big disadvantage. Using a real browser also means running all javascript on the page including counting pixels like google analytics. As a consequence, a lot of new users and page impressions would appear within the tracking statistics that are not real. That is why we handle google analytics requests a little bit different.

We changed the behavior of our browser in a way that always when they should request the google analytics counting pixel we redirect them to example.com. The good thing with redirects is that the initial request is still visible within our tools.

Table of contents