Let's say I have a pixel from facebook:
<!-- Facebook Conversion Code for OTC -->
<script type="text/javascript">
var fb_param = {};
fb_param.pixel_id = '6018317189824';
fb_param.value = '0.00';
fb_param.currency = 'USD';
(function(){
var fpw = document.createElement('script');
fpw.async = true;
fpw.src = '//connect.facebook.net/en_US/fp.js';
var ref = document.getElementsByTagName('script')[0];
ref.parentNode.insertBefore(fpw, ref);
})();
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/offsite_event.php?id=6018317234888&value=0& ;currency=USD" /></noscript>
What would it look like if it was iframed? I want to know what ot tell the affiliate manager they are supposed to provide to the advertiser.
For an iFrame you must specify a source document, you can't code into it directly.
This is simple. Just take that entire code you have, paste it in a text file. Rename it fb_offer_pixel.html and upload it to your server somewhere sensible. Note you don't need to put html, body etc tags in the file. It's basically a text file... I'm just giving it an html extension to avoid any weird issues.
Then, for the iFrame code, you just need to set the src attribute to that file and send it off to your AM.
Example:
<iframe src="http://mydomain.com/something_sensible/fb_offer_pixel.html" style="display:none;"></iframe>
That's it. The iFrame will be populated with the content of fb_offer_pixel.html, i.e. your entire FB pixel. You could put other things in that html file if you want e.g. your custom audience pixel, retargeting pixels, etc.