Determine which advertisement made a request to /eyeblaster/addineyev2.html

Tal picture Tal · Nov 19, 2012 · Viewed 26.7k times · Source

I have a large website that is using two large online advertisement "Remnant" providers. These providers are such that they start and stop ad campaigns on a regular basis that run on our website.

One of the ads coming from one of the providers is incorrectly making a request to:

/eyeblaster/addineyev2.html

I have determined that the file being requested is used by some websites when the ads on the website are served via iframes. This file in theory would circumvent the cross domain restrictions so that the ad provider could resize the iframe using javascript within the iframe.

I determined this use of the file by stumbling upon this support document:

http://support.google.com/dfp_premium/bin/answer.py?hl=en&answer=1085693

My problem is that our websites do not use iframes to deliver advertisements, so the requests going to the "/eyeblaster/addineyev2.html" URI results in a 404 error, and is unnecessary. Because the error is coming from a large vendor-provided CMS the error renders with our Google Analytics tracking code on it. This has the result of inflating our apparent pageviews.

The pageview inflation can be very severe, because the 404 error page also contains ads. That 404 page could also load the faulty ad, resulting in a recursive loop of ads loading the exact same "/eyeblaster/addineyev2.html" 404 page.

I have thus far been unable to witness an ad making a direct request to this url via Firebug or similar developer tools. Yet, the traffic to this non-existent page is gigantic so the offending ad is certainly still in the mix. The problem is that I cannot figure out which ad is broken, so I can't tell our remnant providers to remove it. Both vendors are feigning ignorance of the issue.

I cannot remove the Google tracking code on the 404 error page, but I can add additional JavaScript to the page.

Is there any way that I could identify the ad causing a request to "/eyeblaster/addineyev2.html" by adding some javascript to the 404 error that results when trying to request that page inside an iframe?

Essentially almost a "frame buster" script that instead of busting the frame, gives information on the HTML nodes nearby the iframe element? I think it's mildly possible, but I'm not seeing a clear path at the moment.

Thanks!

Answer

Tal picture Tal · Nov 20, 2012

I have found my own answer, and I'll share it here for the rare event another Web Developer is trying in vain to pinpoint an ad doing this same thing to them.

The offending digital ad was coming in with an iframe that was pointed toward "/eyeblaster/addineyev2.html" I used this knowledge, and coded the following javascript to gather information about the page that contained the iframe (ie the page with the ad on it).

if(top != self) {
    $.post("/ad_diagnose/log.php", {
        a: $('#ad-div-one', top.document).html(),
        b: $('#ad-div-two', top.document).html(),
        c: $('#ad-div-three', top.document).html(),
        d: $('#ad-div-four', top.document).html(),
        e: $('#ad-div-five', top.document).html(),
    });
}

This JavaScript uses JQuery (which our CMS provider includes on every page anyway). It checks to see if the error page exists in an iframe (top != self), and then it grabs the raw html for every html element on the parent page that should contain an ad.

That data is wrapped into an object, and posted to a simple php script that would write a log of every value posted to it to a file.

In the end, I received a log file with a high likelihood that the offending ad code was within. I was able to do a quick grep on the file and discovered the ad with an iframe pointing toward "/eyeblaster/addineyev2.html"

I hope this helps someone else out there!