Adsense Exchange problem

Posted in: Newspaper
Post count: 9

Hello,

i have this AdSense code

<script type=”text/javascript”><!–
google_ad_client = “ca-pub-1234567890123456”;
/* Citypatras.gr / 336×280 */
google_ad_slot = “1234567890/1234567890″;
google_ad_width = 336;
google_ad_height = 280;
//–>
</script>
<script type=”text/javascript”
src=”//pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>

But the Custom ad print this without adslot:
<script type=”text/rocketscript”>
var td_screen_width = document.body.clientWidth;

if ( td_screen_width >= 1200 ) {
/* large monitors */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:300px;height:600px” data-ad-client=”ca-pub-1234567890123456″ data-ad-slot=””></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}

if ( td_screen_width >= 1019 && td_screen_width < 1200 ) {
/* landscape tablets */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:300px;height:600px” data-ad-client=”ca-pub-1234567890123456″ data-ad-slot=””></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}

if ( td_screen_width >= 768 && td_screen_width < 1019 ) {
/* portrait tablets */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:300px;height:600px” data-ad-client=”ca-pub-1234567890123456″ data-ad-slot=””></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}

if ( td_screen_width < 768 ) {
/* Phones */
document.write(‘<ins class=”adsbygoogle” style=”display:inline-block;width:300px;height:600px” data-ad-client=”ca-pub-1234567890123456″ data-ad-slot=””></ins>’);
(adsbygoogle = window.adsbygoogle || []).push({});
}
</script>

data-ad-slot is empty.

Can you fix it?

Thanks a lot!

Post count: 9

Hello,

this is right. I’m a premium member on AdSense, and this code is from Premium Account.
AdSense Send me all the premium codes by email.

if you want just tell me where is the function who fetch and extract adsense properties.

Thank a lot.

Post count: 6600

Hi,

I understand. Have you tried using it just like this: google_ad_slot = "1234567890";?
You can find it here: http://screencast.com/t/7SlL7upl

Thanks

Post count: 9

Hello,

the two numbers is differents.

i make change on pattern and now it’s ok.
preg_match(‘/”([a-zA-Z0-9\s]+)”/’, $explode_ad_code[1], $matches_add_slot)

to

preg_match(‘/”([a-zA-Z0-9\/\s]+)”/’, $explode_ad_code[1], $matches_add_slot);

Now include the symbol “/”.

Thanks a lot!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.