Tracking parent url for an AD pixel

Hi,
I am using a tracking pixel 1x1 gif.
IS there a way to log the referrer url? when calling the referrer function in .NET I get the url of the ad.
I think this is because my pixel is fired from within iframe.

Any suggestion on how to get the original url the ad displayed in?

Thanks