When write capture fails

105 views
Skip to first unread message

Cory Gwin

unread,
Feb 3, 2012, 11:55:15 AM2/3/12
to writeCapture.js Users
Hey all,

I am working on implementing this wonderful tool, I have noticed it
some times will fail for different reasons, bad ads or browser support
issue etc. In the wiki I noticed a section on What to try when
writeCapture fails with a write to iframe option
var doc = iframe.contentWindow.document;
doc.open();
doc.write(badHTML);
doc.close();

My question is, how do I know if writecapture fails? Can I put the
call in a try?

Also when I minimize the code I keep getting a syntax error of
Unexpected token (
http://jsfiddle.net/H4ty5/

Thanks for the help :)
CG

Cory Gwin

unread,
Feb 3, 2012, 12:08:16 PM2/3/12
to writeCapture.js Users
I re-compressed the nolib file and it seems to have fixed my error. So
ignore that part :)
> Unexpected token (http://jsfiddle.net/H4ty5/

noah

unread,
Feb 3, 2012, 3:04:05 PM2/3/12
to writecaptu...@googlegroups.com
"When writeCapture fails" is a set of general workarounds, not so much
error handling.

There isn't currently an error callback in writeCapture. One could be
added, but I doubt it would be very useful. We have no way of knowing
if a 3rd party script encountered an error while being downloaded or
executed because we have to rely on script tag injection, which
doesn't provide a error callback. That's where 99% of failures will
be, so your pretty much just out of luck,

Cory Gwin

unread,
Feb 3, 2012, 3:17:04 PM2/3/12
to writeCapture.js Users
Is there any way to know if writecapture is supported by a browser. I
ask because if it is not supported I would like to just do the
document.write

Cory Gwin

unread,
Feb 3, 2012, 3:17:57 PM2/3/12
to writeCapture.js Users
Could you also check for errors by checking to see what was added to
the page and some how compare to what is expected?

On Feb 3, 2:04 pm, noah <iamn...@gmail.com> wrote:

noah

unread,
Feb 3, 2012, 4:22:47 PM2/3/12
to writecaptu...@googlegroups.com
writeCapture is compatible with all browsers. The problem is that some
ad code + writeCapture is not compatible with all browsers. There
isn;t a way to know what should be rendered or if an ad is
incompatible ahead of time because we don't know what is in the
script. Unfortunately, it's just a matter of trial and error.

Sean Ford

unread,
Feb 3, 2012, 6:00:01 PM2/3/12
to writecaptu...@googlegroups.com
I have our ad server, DoubleClick, serving through writeCapture enhanced jQuery statements exclusively across more than 50 websites, no issues. We serve rich media, text, straight images, and HTML ads. Which types of ads are you finding to be incompatible?

Sean Ford

Cory Gwin

unread,
Feb 6, 2012, 9:48:30 AM2/6/12
to writecaptu...@googlegroups.com
I am not really sure what the ones that are failing are. I will look into it.

Thanks,
CG

Cory Gwin

unread,
Feb 13, 2012, 11:17:11 AM2/13/12
to writeCapture.js Users
Figuring out what ads are failing is trying... Just curious I am using
DFP any idea how to get at which ad has loaded from the front end it
would help greatly in this testing period to see what is working so I
can find what isn't

Thanks
CG

On Feb 3, 5:00 pm, Sean Ford <saabs...@gmail.com> wrote:
> I have our ad server, DoubleClick, serving through writeCapture enhanced jQuery statements exclusively across more than 50 websites, no issues. We serve rich media, text, straight images, and HTML ads. Which types of ads are you finding to be incompatible?
>
> Sean Ford
>
Reply all
Reply to author
Forward
0 new messages