google adsense for mobile

Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Wed May 10, 2017 1:33 pm
Reply with quote
Report this post
I'm trying to use Google Adsense page level ads for mobile viewers.
I implemented the Google code in /layout/blocks/head.php as you recommended in the forum.
In Google preview http://czpz.org#googleads it seems that work and I can see page level ads on mobile.
But in http://czpz.org there are no ads.

This is the part of head.php
?>

<!--[if IE 9]>
<link rel="stylesheet" href="<?php echo $this->API->URLtemplate(); ?>/css/ie/ie9.css" type="text/css" />
<![endif]-->

<!--[if IE 8]>
<link rel="stylesheet" href="<?php echo $this->API->URLtemplate(); ?>/css/ie/ie8.css" type="text/css" />
<![endif]-->

<!--[if lte IE 7]>
<link rel="stylesheet" href="<?php echo $this->API->URLtemplate(); ?>/css/ie/ie7.css" type="text/css" />
<![endif]-->

<!--[if lte IE 9]>
<script type="text/javascript" src="<?php echo $this->API->URLtemplate() . '/js/ie.js'; ?>"></script>
<![endif]-->

<!--[if (gte IE 6)&(lte IE 8)]>
<script type="text/javascript" src="<?php echo $this->API->URLtemplate() . '/js/respond.js'; ?>"></script>
<script type="text/javascript" src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-6137536926055483",
enable_page_level_ads: true
});
</script>

<?php
if(
JRequest::getCmd('option') == 'com_config' ||
(
JRequest::getCmd('option') == 'com_content' &&
JRequest::getCmd('layout') == 'edit'
)
) {
$doc = JFactory::getDocument();
$doc->addStyleSheet($this->API->URLbase() . '/media/jui/css/bootstrap.min.css');
$doc->addStyleSheet($this->API->URLbase() . '/media/jui/css/bootstrap-responsive.min.css');
$doc->addStyleSheet($this->API->URLbase() . '/media/jui/css/bootstrap-extended.css');
$doc->addStyleSheet($this->API->URLbase() . '/media/jui/css/icomoon.css');
$doc->addStyleSheet($this->API->URLbase() . '/media/jui/css/chosen.css');
$doc->addStyleSheet($this->API->URLbase() . '/media/media/css/mediamanager.css');
}

// EOF
What can I do to start ads?
Thanks in advance
User avatar
Junior Boarder

teitbite
Wed May 17, 2017 7:50 am
Reply with quote
Report this post
Hi

This code only loads Google Ads scripts, but additionally You need to specify places where ads should be displayed. Best for that will be banners component with the code for banners itself which You should get from google ads.
User avatar
Moderator

GK User
Wed May 17, 2017 5:30 pm
Reply with quote
Report this post
This code is only for mobile, not for the web. So according to google it should show ads only on mobile view. It is a page-level code:
Mobile ads that stick to the edge of the user’s screen and are easily dismissable.
Mobile full-screen ads that appear between page loads on your site and can be easily dismissed by your users.
Google recomend:
After you've generated the ad code for your page-level ads, you'll need to place the code once on each page on which you want to show the ads. You should place your ad code in the <head> tag (or at the top of the body) of your page.
There are no banners needed.
User avatar
Junior Boarder

teitbite
Sat May 20, 2017 4:53 pm
Reply with quote
Report this post
Hi

I've checked the code and google is adding an iframe on top of the site, but it's simply empty, so I think it's not being attached on Googleads side. Try switch to Protostar and add same code there and check again. Protostar is a joomla default template so it will test template is not blocking it somehow, but since the iframe is launch than it's hardly unlikely it does.
User avatar
Moderator

GK User
Tue May 23, 2017 1:13 pm
Reply with quote
Report this post
Now It works! It is amazing, because I didn't do anything. It seems that sending a complaint to you is enough to make things working. :) Sorry about disturbance and thanks. Probably it was a Google issue.
Best regards Stoicho
User avatar
Junior Boarder

teitbite
Sat May 27, 2017 1:56 pm
Reply with quote
Report this post
Hi

Great to hear that. So I'm guessing google has fixed it on their side or it just needed some time to get some informations from Your site to start work. Closing this thread than.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.