Help Getting my adsense code working in with my banner rotations

craigiri

Well-known member
I use an external banner program which is called from scripts that are in the XF forums.

The banner program can either serve banners or "raw code", which is where I previously (in my old forum) put the google adsense code. This worked fine in my old forum - the banner program would serve the banners and the adsense in rotations as per my settings.

However, in XF the banners work fine...but the adsense code does not, instead showing no banner. Adsense throws off an error - I know it is not related to google or adsense or my site.

The direct url to such a call - that works too. It's only in XF that it does not work.

Mostly likely the "raw" code has to be served up with some kind of object wrapped around it. I tried an iframe and it worked to some degree, but that does not seem like the proper solution for various reasons - most importantly because only the google adsense needs served that way, not all the banners.

BTW, regular full-time adsense placements work fine in my XF install....the problem I am having is only in pulling it in during the rotations....

If anyone has any hints or the skills to tackle this, please contact me by PM. I am willing to pay for a decent solution.

(EDIT) - Just writing this message got me thinking - and I appear to have solved the problem! The answer lies in breaking up the adsense code and putting the larger top part of it in the XF template...no matter what (whether the ad is served or not) and then just delivering the single short JS which serves the ad it self.

That seems to have fixed it......I'll leave this up for folks to reference if they have similar problems.
 
Top Bottom