I spent lot of time to figure out how to do it and I've been using this since july, so now I´m sharing with you.
I love SSI, I´ve been using this technique for more than a decade on my other projects, so since the beggining I'm was shure that´s the way to do it, even on NING! I just was unnable to figure out how!
Here's the step by step, assuming you already know how to use DFP Admanager and that your ads are already on rotation.
- Create your ad spots (top 728, skyscrapper 160x600, middle 468 and so on) on DFP
- populate then with ads
- create your html containers like top.html, footer.html etc with all the DFP code you need to run the ads on your NING adspots and reserve (like cooking, hehehe)
- read the post http://help.ning.com/cgi-bin/ning.cfg/php/enduser/std_adp.php?p_faqid=3613 to understand what I have done
- create 2 .js files for the top and footer like top.js and footer.js
Bellow is my top.js
x$("#xg_navigation").after("<div align=center id='custom_ads'></div>");
var ad_html ='<iframe style="padding-top:2px;" frameborder="0" scrolling="no"allowtransparency="true" marginheight="0" marginwidth="0"src="https://api.ning.com/files/B4...........6nJfx15PgWlcapCqGQe/adtop.html"width="955px" height="205px"></iframe>';
x$("#custom_ads").html(ad_html);
6. Go to your profile and write a public post, with replys and commentsclosed of course, on your blog called top and post top.html (youradmanager html code) as a attached file (Jen's tip!) and save it! Repeat operation for footer.html
7. Go to stats and place the call to your .js files
<script type="text/javascript" src="http://yoursite.com/top.js"></script>
in my case I'm running the .js from my own server but it can be also inserted into a blog post to speed load it a little more.
That´s it!
Hope this helps!
Marcelo
Replies
In case you're wondering of the URL it's http://musiikeando.ning.com. Again, I just started this site, so I'm still working on it.
Oh by the way, Spanish Music is on Autoplay so if you don't want to hear Mexican Music, I suggest turning off your speakers :)
I'm looking for other codes so that my page looks a little bit better. I can't do the codes myself, not now, I don't know how but I'm trying to learn :)
Any suggestions, comments are more then welcome.
Do you have to use an iframe to make this work?
That's what the code says!
Well, what I'm thinking is that we should be able to get a reference to the head section of the page using $("head") and then appendChild() to place our script there. I'm trying that on my site now. Just wondering why the choice of an iframe.
Because after I spend a lot of time, as you, breaking my head, that was the only way I was able to made it work, and I'm doing pretty good this way! My ads are running, the stats are working just fine and the adsense is givin me exactly what I was expecting!
But you can try do it another way, if you discover an easier way than mine please publish it here so others can take advantage too!
Reggards from Rio!
Marcelo