Showing posts with label Mobile. Show all posts
Showing posts with label Mobile. Show all posts

Sunday, 1 May 2016

How to set up Page-level AdSense ads in your blog

This article describes Page-level ads, a new type of AdSense advertisement which Google has recently introduced.   It includes how to set up these ads if you use Blogger, and some troubleshooting information about them.  

It also describes how to fix an error in the code which is supplied, which causes a message like "Attribute name "async" associated with an element type "script" must be followed by the ' = ' character".



What are Page Level AdSense ads

Google has recently introduced a new type of Adsense ad-units, which may be shown to people who visit a website using a mobile device (eg smartphone of tablet),

There are two types of Page-level ads:
  • Vignette ads:   When a visitor on your site clicks on a link to another page on you site, a vignette ad may be loaded as a full-page overlay which the user needs to close before they see the page which they navigated to.
  • Overlay ads:   these are smaller ads which show at the top or bottom of your screen, and which "stick" to the edge, so they seem to stay in place as the user scrolls up and down your site.   The visit may click on them in the usual way.

For Blogger users, these ads are only currently available if you have a full AdSense account: if you only have a hosted AdSense account, then you cannot get the code to install them.   But if you do have a full AdSense account (either because you have a custom domain, or because you signed up for AdSense before the "host AdSense account" option was introduced), they are attractive because they don't count towards the count of advertisement-units which you are allowed to display on each page.

They also only work if you have a mobile theme switched on for your blog, so that visitors who use a mobile device see mobile-optimised screen.


How to install AdSense Page Level ads in Blogger

Log in to your AdSense account.

Go to the My Ads tab

Turn on one or both of  Overlay or Vignette ads options.
(By default, they are both turned Off.    Click on the empty box beside the "0" to turn an option to  on:  in these controls, 0 means "off" and 1 means "on".)




Click the < > Get Code button.

Copy the code that is generated.

Switch to Blogger, and edit your theme in the usual way.

Find the text   <head>    (including the brackets).

On the very next line after <head>, paste in your code.

Optional - but highly recommended - add comments to clearly show what this code is for.   I usually use
<!-- START ADSENSE PAGE LEVEL ADS -->
and then the code goes in here ...
<!-- END ADSENSE PAGE LEVEL ADS -->
Preview the theme, and make sure it's working.
(See Troubleshooting section below if you get a message about   Attribute name "async" associated with an element type "script"    or similar.

Save the theme.



Job done!   This is all you need to do to enable page-levels ads for your blog:   you do not need to install gadgets to say where these ads go, because Google handles this for you.


How to see what page-level ads look like in your blog

Visit your blog using a smartphone or tablet.

Add the text   #googleads   at the end of the website address, so it changes from something like:
http://blogger-hints-and-tips.blogspot.com/?m=1
to something like:
http://blogger-hints-and-tips.blogspot.com/?m=1#googleads

After this, when you click on a link to move a different page in your blog,  a Vignette style ad will display - these are whole-page ads, which include a "close ad" button, like this:



Troubleshooting

Extra "src" text in the ad-code

Right now, there is a problem with the code that AdSense are providing.   I don't know if this is because Blogger doesn't understand a feature that AdSense is using, or if it's a genuine bug.    But if you see a message like this when you try to preview the theme:
Could not load theme preview: Error parsing XML, line 21, column 15: Attribute name "async" associated with an element type "script" must be followed by the ' = ' character.
then there's a very simple change that you have to make.

All you have to do is delete the "src" immediately after the word async.

So your code changes from like this:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-DONT-USE-MY-NUMBER-GET-YOUR-OWN-PUBLISHER-ID",
    enable_page_level_ads: true
  });
</script>

to like this:
<script async ="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-DONT-USE-MY-NUMBER-GET-YOUR-OWN-PUBLISHER-ID",
    enable_page_level_ads: true
  });
</script>

Different Page Level settings for different websites

If you are using Adsense across several different websites, then you may want to enable one of vignette or overlay ads on some sites, and a different option on others.

Currently, there is no way to do this:  you must choose one combination of:
  • No Page Level ads
  • Overlay ads only, no Vignette ads
  • No Overlay ads, but do show Vignette ads
  • Allowing Google to choose Overlay and/or Vignette ads

Stop Vignette ads being attached to some links

By default, any link to another page in your blog may have a Vignette ad attached to it.    However there may be some links which you specifically don't want this to happen to - for example if the user really needs to remember what was on the current page once the get to the next one.

You can prevent any Vignette ads being displayed when a user clicks a link by adding a tag to the link.

The tag to add is:
data-google-vignette=”false”

and you need to switch to Edit HTML (top left of the post-editor window) to add it.

This is an example link to another page on this blog which is prevented from having a Vignette ad, and this is the HTML code I've used to achieve this.
<a data-google-vignette=”false” href="http://blogger-hints-and-tips.blogspot.com/2010/02/stop-malicious-use-of-your-adsense.html">an example link</a> 

More help

Google have provided more information about Page level ads here.



Related Articles

Setting up a mobile theme for your blog

Editing your Blogger theme

Hosted AdSesne accounts for Blogger users

Tuesday, 18 November 2014

How to turn on a mobile theme / template for blogs in Blogger

This article explains why mobile mattes for some blogs (but not all), what tools Blogger has provided to help with this, and how to set up a mobile theme (aka template) for your blog.  It also links to Google's mobile testing tool, which shows you how your blog looks on a mobile device.



By default, when someone uses a smartphone, tablet or other mobile device to look at your blog, they see the "full site" just like they would if they were using a PC.   The pages aren't set up to work well on their small screen, but they have access to all the features and gadgets you've installed.

In some cases, this is fine.  For example, when I first wrote this article, I looked at the statistics for this site and hardly any of the visitors were mobile.   However now, a couple of years later things have changed and I've implemented a mobile theme for this blog.

But for other blogs, especially ones that have maps and other location-information or which people read on the go, having a mobile-friendly theme is very important:   for example, on my public-transport blog, over 25% of visitors are using mobile, and that figure is growing.  Making my site work well for these visitors is definitely important for its long-term future (and my short term advertising revenue!)


What's available

Blogger have made a set of mobile themes, to match the standard Designer Themes, and so far only one to match the Dynamic theme(s).

We cannot control the layout of gadgets on these - when the screen is only 300-ish pixels wide, there's not much room to move.

But we can add and remove gadgets, and also by choosing a custom template get colour settings that match our main blog.


How to enable a mobile theme / template for your blog

Log in to Blogger using an account with administrator rights to the blog.

Go to the Themes tab.

If your blog has a Designer or Dynamic theme, then there will be a Mobile option to the right of the "Live on Blog" area.



If the blog is not set up to use a mobile theme ,then the word Disabled will be in the middle of the picture area - although it may be hard to read if your base template (chosen in the Live on Blog area) has a picture behind it.

Click on the gear-wheel underneath the picture to see the mobile options.

Select "Yes.  Show mobile template on mobile devices."



Either leave the mobile template on Default, or select one of the other options.
  • If you choose Default, your mobile template will use the standard template matching your desktop template.
  • If you choose Custom, your mobile template will use the colour-scheme and various features from your desktop template, and you will be able to makes changes to these settings.

Use the Preview button if you want to see what your blog will look like with the selected template on a mobile device.

When you are happy with your selection, press Save.


What your readers see

Visitors to your blog who are using a desktop PC (or laptop or netbook or any other machine with a full-size screen) won't see anything different.

Readers who are using an internet-enabled cellphone (ie smartphone), tablet, iPad, etc will see a different view:
  • They won't have a sidebar
  • The gadgets will be limited (unless you add some extra ones) and in the header and footer only
  • On the home-page there will just be the title, thumbnail and snippet for each post, and a button for read-more (this is irrespective of where you've put the jump-break) - notice that the usual methods of giving your blog a home-page don't always work.
  • Custom styles that you have added to the template may not be applied (this has happened on one blog where I use styles, I'm still investigating whether it's a feature of all mobile templates, or just due to the way I added these particular styles).
  • There will be buttons at the bottom of the page for Home, <   and > .    I think that the latter two refer to older and newer posts (though possible they are the opposite way around from what I expect).
  • There will be a link to "view web version", which lets your visitor switch to to see the blog using the desktop template.

I have a  feeling that there may be some other differences too - very keen to hear about any others you've spotted.


Seeing what your mobile readers see

The absolute best way that I've found to accurately experience my blogs as mobile visitors see them is to use a mobile device myself:
  • Just like preview mode in the Post-editor, the mobile preview mode shows a "look and feel" view, which is not entirely accurate.   For example in the picture above, it shows part of the most-recent article insteaod of just the post title and mini-snippet that I see when I look at the site on my phone.
  • The screen-size testers that I've tried out (ie software tools that mimic showing your website in various different screen sizes) don't actually use the mobile template - I suspect that this is due to the way that Blogger detects mobile devices.

However you can see any blog as it would be on a mobile device by appending /?m=1 to the end of the URL.    For example, to see this blog in mobile, I would look at http://blogger-hints-and-tips.blogspot.com/?m=1      If you're going to use this approach, it's best to re-size your browser window so that it's about 300px wide - from my netbook, that's about 1/3 of the screen size, but it would be less from machiens with bigger screens.


Another approach is to use Google's Mobile Friendly Testing tool, which will
... analyze a URL and report if the page has a mobile-friendly design.
As well as showing you how your blog looks, it also reports on any issues that have been found.






Related Articles

Adding gadgets to your mobile template.

Removing the attribution from moblile blogs

Showing a Google custom map on your blog

Advertising programmes for websites

Types of Blogger template

Administrator rights to your blog

Monday, 7 July 2014

How to copy and paste a website address on an Android smartphone

This article explains how to copy and paste a website address (URL) when you are using the Chrome browser on an Android smartphone.



Copy and paste on an Android phone

When you are using an Android cellphone, the usual way to copy-and-paste text is to "long-click" on one word, and after it is selected, drag the selector-bars at either end to select more of the text.

After this, you have options on a list at the very top of the screen to cut, copy and page.

But this doesn't work on the Chrome browser's address-bar, ie the place where you type in website addresses, or see the address which your currently viewed pages has.

Here, there is no long-click, and you have to use a slightly different approach.


How to copy a web-address on a Smartphone using Google Android and Chrome


1 Inside Chrome, go to the website and page that you want to copy the address from.


2 From the top right handcorner, choose the Overflow menu button: this is three vertical dots.


3 From the menu that opens, choose Share


4 choose Copy to clipboard from the list of sharing options.


Step 1: Choose Share

Step 2: copy-to-clipboard
Now, when you go into other applications and pages, you can long-press, and a small PASTE button will appear.   Click this - and watch your copied link get pasted.


Troubleshooting

Remember that if it's a Blogger site that the link came from, you may need to remove the " /?m=1" from the end of the URL, for the sake of non-mobile users of the place where you are pasting the link.


How exactly is this a Blogger tip?

Fair question - this a blog about using Blogger, Google's website tool for the rest of us, not about Android phones!   But as more and more people are using mobiles, and so mobile-friendly themes become ever-more important) I still think it's relevant - here's why:

Even with a new phone running a very recent version of the Android operating system, I still find it too hard to write anything exepct the simplest posts on the phone.

But I've found that I can do more and more of the promotional and social-media aspects of managing my blogs on the phone in my "spare mintues", eg while I'm on a bus, or sitting in a waiting room. Very often, this involves locating a blog-post which answers a question, and posting a short summary and link to the post there. An of course to do this, I need to copy the link to the post. So copy-and-pasting website URLs is now one of the tasks need to do fairly often.




Related Articles

Making a social media / communications plan for your blog

Turning off Blogger's mobile theme

Thursday, 13 June 2013

Why enabling a mobile template just became more important to some bloggers

This QuickTip explains some recent announcements from Google  about SEO and mobile devices, and what they mean for Blogger users.


quick-tips logo

If SEO matters for your blog, and your blog is relevant for users with moble devices, then you pretty much need to enable a mobile template.

Why?   In short, because this recent post from Webmaster Central says that for Google the ranking of search results on mobile devices is now impacted by how well sites are optimized for mobile devices.

This means that if you haven't set up your blog for mobile, then it won't come up so highly in the search results seen by mobile users.

As well as the template, there are a range of other factors that affect how well your site works for mobile. Blogger users cannot control a lot of them, though we can think about:

Also, remember that if you make a home-page using a custom re-direct, this will only work in your desktop version. The re-direct isn't applied for mobile viewers, they just see your most recent posts in mobile-friendly tiles.

Wednesday, 12 December 2012

How to get rid of annoying mobile ads on your Android Phone

Sometimes when you try to download android apps from Google play app store or play downloader games like Angle Bird, they sometimes push annoying ads to your smartphone, and you find it really boring that you want to remove all the annoying ads on your android device. But how to get rid of these annoying mobile ads on Android Phone?
annoying mobile ads on Android Phone
Being a long android lover, I have discovered a list of good tips and powerful apps for you here. If you have the same problem, Follow the Tutorials to have a try and you will find it really useful.

1. Download free app called AirPush Detector

AirPush Detector is the app that detects other installed applications to see which apps appear to use notification ad frameworks and users can easily uninstall them.

The app can't block ads, but at least it can tell you which apps are causing them. So you must uninstall the app to stop the ads.

Now for the trick
  • After you've detected and deleted the apps which push ads, head to the Google Play Store.
  • Once inside the Play Store, tap on Settings.
  • Inside Settings, uncheck "Google AdMob Ads”, this will make sure that you will no longer receive targeted ads from Google.
Apart from AirPush Detector, there are similar apps in Google Play Store like Adblock Plus or AppBrain Ad Detector.

2. If your phone is rooted, you can try AdFree and AdAway. Both of the apps are free.
AdFree removes most ads in the browser and other apps. It does this by nullifying requests to known host names in the system hosts file, and AdAway is a similar app like AdFree.