Saturday, 26 April 2014

Adding an RSS feed icon to your blog, using Feedburner

Feedburner's chicklets are used to add the standard "orange radar" button to your blog.  This lets readers to subscribe the RSS feed of your choice.   The information is targeted to Blogger users, but most of it applies to anyone who uses Feedburner.


What is a Chicklet, and why you need one:

Previously I've explained how to remove the (ugly and confusing) "Subscribe to Posts (atom)" link from your blog, and why RSS / Subscribe to Posts is important to your blog and how to create a Feedburner feed for it.

But an RSS feed is useless unless people subscribe to it.  So as well as making the feed, you also need to put something in your blog that lets your readers sign up for it.

A standard option for this is the orange square with "radar" markings on it, which many people call a "chicklet" (since it lets your viewer - the chicken? - have access to the feed you are providing).

Feedburner also has options for:
  • Using a custom icon from popular web aggregators
    I'm not sure that this is a great idea, because you don't know what feed-reader software your readers actually use, and the whole point of a feed is that you don't dictate how people see your blog.
  • Using an icon that promotes Feedburner.  This cute, but I've never seen anyone use it.

How to add a chicklet to your blog:


Log in to Feedburner, using the Google account that owns the feed.

Click on the name of the feed you want to provide a subscription tool for.

Choose the Publicize tab.

Choose the Chicklet Chooser option, from the left navigation bar.

Choose one of the options shown:  the default one is the standard-size RSS-radar-button.

Scroll to the bottom of the screen and either
  • Copy the HTML that is shown, and add it to your blog in the same way that you would add any other 3rd party HTML,

    OR  (note:  there have been some reports that the option below doesn't work any longer, as Blogger has changed but tools like Feedburner have not help up)
  • Choose Blogger from the drop down list beside "use as a widget in", and click Go

    This takes you to a Blogger screen where you can choose which blog you want to add the gadget to (if your current login has more than one), and what title to use for it. 

    When this is done, click Add Widget

    This takes you to the Design > Layout tab, where you can drag-and-drop the widget to wherever you want it.  
    (When I tried it just now, instead of the layout screen I got a "bad request" message.  However pressing Save and then View Blog brought up the blog with the gadget showing, and I was able to go back and edit the layout later on).


What your readers see:

Your readers will see an item, wherever you put it, that looks like this:

or something similar, depending on what option you chose from the Chicklet Chooser screen.

When someone clicks on one of these items, they are taken to either a screen where they choose which feed-reader software to add your site to (if you've used the first option), or to the specific feed-reader software.


Customising the widget code:

If you use the generic RSS button, then you may want to customise the widget code slightly:  It looks ugly not to have a space between the picture and the word "Subscribe" - and it's good to have the phrase "RSS" on the screen because that'ss what RSS-savvy people search for when they're looking at a website and want to find the subscribe option.  I also prefer if the subscribe action opens in a new tab/window, rather than taking the reader away from my blog.

This is quite easy to do, if you put a few line breaks in so you can see that
  • the code is actually two separate link statements
  • the first one has an image (the orange "radar bars" that it takes from Feedburner)
  • the second is a text link
  • both of them link to the RSS feed address

So it's quite easy to add a couple of extra spaces (shown as   ), change the text as I've done below, and add   target="_blank"   to both of the links
<a href="http://feeds.feedburner.com/Blogger-hints-and-tips" rel="alternate" type="application/rss+xml" target="_blank">
<img src="http://www.feedburner.com/fb/images/pub/feed-icon32x32.png" alt="" style="vertical-align:middle;border:0"/>
</a>

&nbsp; &nbsp; &nbsp;

<a href="http://feeds.feedburner.com/Blogger-hints-and-tips" rel="alternate" type="application/rss+xml" target="_blank">

Subscribe via RSS

</a>

I generally also put the option to subscribe to my blog by email and the Feedburner FeedCount item (which shows the number of subscribers) in the same area, to give people options, and to encourage them to subscribe.



Related Articles:

Using Feedburner to give your blog a Subscribe by Email option

Adding 3rd party HTML to your blog

Why RSS / Subscribe to Posts is important to your blog

How to create a Feedburner feed for your blog

Friday, 25 April 2014

Display Google Map using API V2 in android

Displaying Google Map in android using the API version 1 is deprecated now. Google introduce a lot of changes in displaying Google Map using API version 2. In this post i demonstrate how to display the Google Map using API Version 2.
Ads By Google



Step 1:
Install the Google Play Service SDK 
For displaying Map using API V2, you need the Google Play Services. So first step is to open your Android SDK manager and install the Google Play Services.

Step 2:
Add the Google Play Service as a library project into your android work-space. 
After the successful installation of Google Play Service SDK, you can find out the Google play service library project on the following location in your android SDK folder. 
                                           sdk-->Extras-->Google
Import the Google Play Services as a library project into the work-space. Don't forget to choose the options for copy the project into workspace. 
Step 3:
Add the Google play library project into your android project. 
Now you can add google play service-libraries into your project. Right click your project and choose its properties and choose the android option and click add button at the bottom of  the window. 
Step 4:
Generate the SHA-1 fingerprint Using the Java keytool. 
You need to generate the SHA-1 fingerprint using java keytool for obtaining the Map API key. Open your command prompt and type the following command. 
 keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android  
After type the above command you got the certificates figerprints. Copy the SHA-1 fingerprints.

Step 5:
Obtain the Google Map API Key using the SHA-1 Fingerprint and your application package name from the Google console. 
Login into Google console  and at the left corner of the page choose the API's under API's & auth option. Now search for Google Maps Android API V2 and change its status from off to on
Now click Credentials at the left side of the page and click the CREATE NEW KEY button. Choose Android Key option from the dialog window. Now insert your SHA-1 fingerprint and your application package name into the text area of the newly generated dialog window and click create. Now you can see the newly created API KEY for android at the top of the web page. Copy that key. 

Step 6:
Specify the Google Play Service versions in the Manifest file.
Open your android Manifest file and add new Xml tag called meta-data between the Application tag. Specify your API Key as the value for the meta-data. 
 <meta-data  
android:name="com.google.android.maps.v2.API_KEY"
android:value="Enter your API Key Here">
</meta-data>

Step 7:
Add the required permissions in manifest file
We need to specify some permissions in manifest file  for displaying the Google Map. Following are the permissions and its usage. 

android.permission.INTERNET = "used to connect to the Google Map Servers for downloading the map tiles "
android.permission.ACCESS_NETWORK_STATE= "used by the API to check the status of the connection for downloading the data"
com.google.android.providers.gsf.permission.READ_GSERVICES = "Used by the API to access Google web based services".
android.permission.WRITE_EXTERNAL_STORAGE = "Used by the API to save the Map tile data into the external storage".
android.permission.ACCESS_COARSE_LOCATION = "Used by the API to access the WiFi or mobile data to find out the device current location".
android.permission.ACCESS_FINE_LOCATION = "Used by the API to access GPS for finding the current location ".
 <uses-permission android:name="android.permission.INTERNET"/>  
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

Step 8:
Specify the OpenGL ES version in manifest. 
The google Map API V2 uses the OpenGL ES version 2 for rendering the Map on devices. 
  <uses-feature  
android:glEsVersion="0x00020000"
android:required="true"
/>

Step 9:
Add a fragment to the activity-main.xml file for display Map
 <?xml version="1.0" encoding="utf-8"?>  
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"/>

Since Google Map uses the Google play services, it is not possible to test the Google map app in an android virtual device. For testing this app you need to install the .apk file in a real device.

2 things i hate on Facebook Ad Manager and Power Editor

HATE! HATE!! HATE!!!
facebook ad manager
  1. You can't, under no circumstances, change the ad target url! You create an ad with website conversions objective. You create a bunch of them, the whole ad set with many different targeting options. Then you want just copy this ad set and point it to another target url. And you can't! You must click on EACH ad, then create a similar ad - only so you will be able to change ad target url.
  2. If you want hide your affiliate urls, this works ONLY if you create your ads each one new from scratch! If you create an ad with shorten url as target, then create similar ad and input as target url your next shorten url - you mean it would work? NO, damn! Facebook is smart enough to show in the ad body the original url. And it is funny enough to show the SHORTEN url, if you run with the mouse over the opriginal url. Is it not stupid?

Monday, 21 April 2014

Keep a backup copy of complicated gadget settings

This article explains why it's a good idea to keep a backup copy of settings for your gadget, in particular for HTML/Javascript gadgets that have complicated, hard-to-regenerate, code.



Blogger's backup tools let you take copies of:
  • your post-contents and (separately) 
  • your template. 

Some 3rd party backup tools (eg HTTRack) let you make backup copies of how your blog looks - including the consequences of displaying your gadgets.

But as far as i know, there is no way that you can back up the settings (ie parameters or configuration) that are stored inside the widgets on your blog.

This can be a problem if you accidentally remove a gadget, or if you have an HTML gadget and get the code wrong in it: Blogger is quite unforgiving sometimes, and the HTML/Javascript gadget editor simply removes any code that it doesn't understand.

In some cases, this isn't not a big problem  eg if you show a picture as a gadget, then it's generally easy enough to work out characteristics that you would need to enter to re-create the gadget.

But if you lose a complex gadget (eg your own customised set of subscription buttons), then re-creating it could be difficult and time-consuming.

So - for HTML/Javascript gadgets which have code which you think is complex, I recommend keeping a backup copy of the gadget code somewhere.

Personally I usually put it in a post in a private blog where I draft posts and keep the documentation for each blog - but you could use a range of other places, eg a text file on your computer or on Google Drive, or even any email message to yourself.


How to back up code from HTML/Javascript gadgets in a private blog post

Every time you edit a gadget that you want to keep a backup for, then just before you click Save:
  • Press Ctrl/a to select all the text in the gadget window.
  • Press ctrl/C to copy it
  • Switch to use Blogger in a different window
  • Open up the documentation blog, and navigate to the post where you keep the code for that gadget
  • Edit that post - or make a new one if you don't have one already.
  • Make sure that you're in Compose view, and the Options > Compose Mode setting is on "show HTML literally" (ie not on "interpret HTML")
  • Paste the gadget code into the post, and publish it.

Although this sounds tedious, it's really very quick to do. And losing complicated gadget code, even once, is a good incentive to remember to back it up every time.

Hint: Put a comment to remind yourself where to back this gadget at the top and/or bottom of the gadget code. This reduces the chance that you will forget. A comment is done in HTML like this:
<!-- DON'T FORGET TO BACK UP THIS GADGET CODE  -->


How to back up complicated non-code gadgets

If your gadget has complicated settings which aren't code, one option is to take a screen-shot and save it to your photo collection, or even just a text-file or documentation-blog post where you keep notes about what the settings are.

You won't be able to automatically restore your gadget settings from this, but it should be a good reminder of what you need to do (provided you can find the picture when you need it).

Unfortunately there's no easy way to pack up linked-list or blogroll gadgets at the moment. However making a copy of your site using HTTracker will show you the list, and what the items link to.

Or you could build your linked list code manually (using the same trick that that I recommend for getting picture code) and put it into a HTML/Javascript gadget, which is based up as described above. The code for a handcrafted linked-list gadget looks like this:
<ul>
<li>PUT THE TEXT HERE FOR YOUR FIRST LINK TEXT.</li>
<li>PUT THE TEXT HERE FOR YOUR SECOND LINK TEXT.</li>
<li>PUT THE TEXT HERE FOR YOUR THIRD LINK TEXT.</li>
<li>etc</li>
</ul>



Related Articles:

How to add a picture as a gadget in Blogger

Using the post-editor to build HTML code for gadgets

Prepare your blog-posts in private, using a documentation blog

Saturday, 19 April 2014

5 Tips On Using Google AdSense To Make You Money

Google AdSense can be an absolute goldmine for anyone who is willing to invest some time in learning how to use it effectively. A lot of people who start using Google AdSense tend to get turned off by it within the first couple of months because they just don’t seem to be making the money that they had expected.
Arm yourself against making the typical newbie mistakes and read our tips below so that you’ll know just how you can make some good cash off of AdSense.

1. Where Does AdSense Make Sense?

Perhaps the biggest mistake that those who use AdSense make is that they throw ads on every type of website imaginable. Don’t waste your time, effort and ads on sites that won’t be bringing in the cash.
Let’s take a tech info website for example. If you run a site that provides high level tech advice, then there’s a very low chance that anyone visiting your site will bother with your AdSense ads. Why? Because these people just don’t generally click on those types of ads. They know about AdSense, and they didn’t come to your website for anything but the information written on your site. They want answers to a problem, and then they want to get out.
Let’s say you have a website that’s more geared towards sales, however. This would be a better type of site to have ads on as people will be far more likely to click on the advertisements you put up.
It may take a bit of trial and error since some niches tend to do better than others when it comes to these types of ads, but generally speaking, if your blog or website is about selling things, then AdSense will work better for you.

2. “SmartPricing:” Anything But Smart

Whenever possible, you have to avoid Google’s “SmartPricing” scheme. With SmartPricing, Google gives advertisers a discount based on how popular or “valuable” your website is. They tend to base this on your site’s click through ratio.
So if your website has a high click through ratio, then the perceived value of your site is high so then the cost per ad click is higher. If your click through ratio is low, however, the value of your site is “low” so you get less money per click. The difference between a SmartPriced site and a non-SmartPriced site can be anywhere from a couple cents to several dollars in difference.
One way to avoid this is to post your AdSense ads only on your older posts. Why? Because anyone who regularly visits your site isn’t going to click on your ads. If you post them on your older posts however, you’ll be able to possibly keep your click through ratio pretty high. There are a lot of resources out there about how you can change the coding of your website or blog to keep your ads only on your older posts.
Another way to avoid the dreaded SmartPricing is to display your ads to those who have landed on your page through a search engine only. You can again tailor your blog using the “function” file to change where the ads are displayed.

3. Choose The Best Keywords

Google is all about keywords, so in order to make the biggest profit you need to choose the best CPC keywords out there. You can use a number of great tools out there to help identify what the high paying keywords for your niche are, and there are several lists supplied for free, such as www.rumler.com.
Keywords also determine what kind of ads are going to show up on your website or blog. Nothing’s worse than visiting a website that’s cluttered with ads that don’t even make sense. Target your keywords so that you’ll be able to “influence” what types of ads will show up on your blog or site. Make sure that these keywords are on your website or blog entry, but BE CAREFUL. If the keyword density is too high, you WILL be penalized by Google and can even be tossed out of their AdSense program.
TIP: Read Google’s terms of service. Once you’re out of the program, you’re pretty much out for good. Follow the terms of service, stay in their good graces, and write greatcontent so you’ll continue to get visitors who’ll click on your ads.

4. Choose Big Ads

AdSense advertisements come in a variety of formats, so you can tailor the formats to see which works best with your blog. Having an advertisement that looks good on your blog or site is important, but keep this in mind: the large 336×280 rectangle sized advertisements has long proven to give the best payout. Maybe this is because the ad is right in any visitors face, or maybe it’s because that size can display video ads (which are increasing in popularity). Either way, it may be a good idea to start out with an ad around that size.

5. Monitor Your Success

No matter what you do with your blog or website, you need to keep track of how successful your ads are doing. If you don’t monitor your ads, then you will ultimately fail. You’ll be able to pin point which ads work, which don’t, and over time you may discover that certain ads work best at certain times throughout the year while others work best at other times.
One of the best things that we can suggest is that you look at your top 1/5 of pages, and then you take a look at your bottom 1/5 of pages. Why are the top 1/5 of pages making more money? What are you doing right? Try to take what seems to be working with the top 1/5 of your pages and then incorporate those ideas and methods into the bottom 1/5.

You’ll also be able to quickly see whether or not your chosen keywords are making money. If your keywords aren’t working, change them up! You should always do a top keyword run at least once a week to make sure that your site is up to date and current.