<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mike On Ads &#187; rmx direct</title>
	<atom:link href="http://www.mikeonads.com/category/rmx-direct/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikeonads.com</link>
	<description>Ramblings about online advertising, ad networks &#038; other techie randomness</description>
	<lastBuildDate>Mon, 12 Apr 2010 03:59:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to get informative feedback on ads from your users</title>
		<link>http://www.mikeonads.com/2007/04/22/how-to-get-informative-feedback-on-ads-from-your-users/</link>
		<comments>http://www.mikeonads.com/2007/04/22/how-to-get-informative-feedback-on-ads-from-your-users/#comments</comments>
		<pubDate>Mon, 23 Apr 2007 02:29:16 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[ad networks]]></category>
		<category><![CDATA[online advertising]]></category>
		<category><![CDATA[publisher]]></category>
		<category><![CDATA[rmx direct]]></category>

		<guid isPermaLink="false">http://www.mikeonads.com/2007/04/22/how-to-get-informative-feedback-on-ads-from-your-users/</guid>
		<description><![CDATA[For publishers one of the must frustrating aspects of dealing with ad-networks is probably the powerless feeling you get when one of your user&#8217;s complains about a particularly offensive, annoying or suggestive ad that they just saw.  So what can you do?  Here&#8217;s a quick and easy method to provide a &#8220;report this [...]]]></description>
			<content:encoded><![CDATA[<p>For publishers one of the must frustrating aspects of dealing with ad-networks is probably the powerless feeling you get when one of your user&#8217;s complains about a particularly offensive, annoying or suggestive ad that they just saw.  So what can you do?  Here&#8217;s a quick and easy method to provide a &#8220;report this ad&#8221; button for your site.<br />
Here&#8217;s the normal process of ad call:<br />
   &#8211; You put a tag on your page, script src=&#8221;some.adserver.com/someparameters&#8221;><br />
   &#8211; Browser requests javascript, and it returns something like &#8212; document.write(&#8217;<img src="http://some.ad.com/ad.jpg"/>&#8216;);<br />
   &#8211; User sees some.ad.com/ad.jpg</p>
<p>So how do you create a button to &#8216;report an ad&#8217;?  Simple!  You simply create a wrapper function around document.write() to capture all the output.  Then, all you need to do is a little bit of smart javascript and badabing you&#8217;re done!  Credits to <a href="http://www.hedgerwow.com/360/dhtml/js-document-rewrite.html">this page</a> for the document.write JS;.</p>
<p>So how do you wrap document.write()?  Rather easily!  Check it out this IE specific example:</p>
<pre>
(function(){
        var documentWrite = document.write ;
        var createWrapper = function(s){
                writeOutput = writeOutput + "\\n\\n" + s;
                return s;
        };

        document.write = function(s){
               documentWrite(createWrapper(s) );
               document.close();
        }
})();
</pre>
<p>As you can see this is remarkably simple.  Every time document.write() is called we simply append the call to a variable &#8216;writeOutput&#8217;, which you can then do whatever you want with.  I&#8217;ve created a <a href="http://www.mikeonads.com/report_ad_example.html">fully functional example</a> that has the full browser compatible javascript.  It takes the writeOutput from an RMX Direct tag and puts it in a textarea at the top. You can grab the javascript by just viewing the source.  The PHP code for &#8220;report_ad.php&#8221; is extremely simple:</p>
<pre>
$adcontent = htmlentities($_POST[&quot;adcontent&quot;]);
$report = htmlentities($_POST[&quot;addetails&quot;]);

echo &quot;&lt;b&gt;Here is the email you send yourself:&lt;/b&gt;&lt;br&gt;&lt;br&gt;\n&quot;;

echo &quot;&lt;b&gt;Subject:&lt;/b&gt; Uhoh, someone reported an ad!&lt;br&gt;\n&quot;;
echo &quot;&lt;b&gt;User Comments:&lt;/b&gt; $report&lt;br&gt;&lt;br&gt; Here is what happened on the page when the user saw the ad:&lt;br&gt;&lt;br&gt;\n&quot;;
</pre>
<p>Now, it&#8217;s important to realize that this isn&#8217;t a perfect way to do it.  If the advertiser is wrapping content in an IFRAME then this method will simply show you the IFRAME source.  Also, I&#8217;m not sure this will work for all networks.  I&#8217;ve tested it with RMX Direct and Fastclick/Valueclick and it seems to work for both. In the document.write() output you can clearly see the source for the flash files being served. In any case, I hope this will be useful to somebody.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikeonads.com/2007/04/22/how-to-get-informative-feedback-on-ads-from-your-users/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
