Showing posts with label Templates. Show all posts
Showing posts with label Templates. Show all posts

How to Display Alternate Content to AdBlock Users

Ad blocking software like AdBlock and Ghostery are installed on millions of computers and thus affecting the bottom line of web publishers who are dependent on online advertising networks like Google AdSense to pay their bills. It takes time and effort to maintain a website but if the visitors are blocking ads, the revenues are reduced. Ars Technica says this is equivalent to running a restaurant where people come and eat but without paying.
As a website publisher, you have a few options. You can detect Adblock on the visitor’s computer and hide your content if the ads are being blocked. That’s going too far but you may ask for donations (OK Cupid does this) or request social payments (Like or Tweet to view the whole page) from AdBlock users.
The other more practical option is that you display alternative content to people who are blocking ads. For instance, you may display a Facebook Like box or a Twitter widget in the place of ads, you may run in-house ads promoting articles from your own website (similar to Google DFP) or you may display any custom message (see example>>>)
to the visitor.




Before we get into the implementation details.  It contains regular AdSense ads but if you are using an Ad blocking software, a Facebook Like box will be displayed inside the vacant ad space.


It is relatively easy to build such a solution for your website. Open your web page that contains Google AdSense ads and copy-paste the following snippet before the closing
tag. The script looks for the first AdSense ad unit on your page and if it is found to be empty (because the ads are being blocked), an alternative HTML message is displayed in the available ad space.
You can put a Facebook Like box, a YouTube video, a Twitter widget, an image banner, a site search box or even plain text.


  1. <script>


  2. // Run after all the page elements have loaded

  3. window.onload = function(){


  4. // This will take care of asynchronous Google ads

  5. setTimeout(function() {


  6. // We are targeting the first banner ad of AdSense

  7. var ad = document.querySelector("ins.adsbygoogle");


  8. // If the ad contains no innerHTML, ad blockers are at work

  9. if (ad && ad.innerHTML.replace(/\s/g, "").length == 0) {


  10. // Since ad blocks hide ads using CSS too

  11. ad.style.cssText = 'display:block !important';


  12. // You can put any text, image or even IFRAME tags here

  13. ad.innerHTML = 'Your custom HTML messages goes here';


  14. }


  15. }, 2000); // The ad blocker check is performed 2 seconds after the page load

  16. };


  17. </script>



One more thing. The above snippet only detects blocking of AdSense ads and replaces them with alternate content. The process would would however not be very different for BuySellAds or other advertising networks.

Find How Many Visitors Are Not Seeing Ads on your Website

Find How Many Visitors Are Not Seeing Ads on your Website

Adblocking software like AdBlock Plus have become mainstream and now pose a significant threat to web businesses that are dependent on online advertisements. The problem is so severe that Google and Amazon are paying the writers of AdBlock Plus to whitelist their ads. This may be seen as some kind of extortion but with billions of dollars at stake, the advertising companies have chosen to take the more profitable route.
It is estimated that ~5% of website visitors are blocking ads (PDF report) and the situation could be far worse for websites that have a more tech-savvy audience. If you are curious to know how many people visiting your own site are blocking AdSense and other ads, here’s a little trick.

Track Adblock Users with Google Analytics

Open your website template and copy-paste the snippet below before the closingbody. This code will detect the presence of adblocking software on the visitor’s browser and, if found, an event gets logged into your Google Analytics account.

  1. <script>


  2. window.onload = function() {


  3. // Delay to allow the async Google Ads to load

  4. setTimeout(function() {


  5. // Get the first AdSense ad unit on the page

  6. var ad = document.querySelector("ins.adsbygoogle");


  7. // If the ads are not loaded, track the event

  8. if (ad && ad.innerHTML.replace(/\s/g, "").length == 0) {

  9.  

  10. if (typeof ga !== 'undefined') {

  11.  

  12. // Log an event in Universal Analytics

  13. // but without affecting overall bounce rate

  14. ga('send', 'event', 'Adblock', 'Yes', {'nonInteraction': 1});

  15.  

  16. } else if (typeof _gaq !== 'undefined') {

  17.  

  18. // Log a non-interactive event in old Google Analytics

  19. _gaq.push(['_trackEvent', 'Adblock', 'Yes', undefined, undefined, true]);

  20.  

  21. }

  22. }

  23. }, 2000); // Run ad block detection 2 seconds after page load

  24. };


  25. </script>


The snippet works for both Universal Analytics and the older version of Google Analytics tracker that used the _gaq object. As a web publisher, your only option is to serve alternate content to AdBlock users so the visitors at least see some content in place of the ads.
One big caveat though – it will fail if the ad blocking extension installed on the visitor’s computer has blocked Google Analytics as well. Some of the popular choices like ฮผBlock, NoScript and Ghostery do block Google Analytics so the approach won’t work and you may have to build your own in-house solution – like downloading an image hosted on your own server and then counting the hits to that image through the Apache server logs.
The Best Websites to Learn Coding Online

The Best Websites to Learn Coding Online

The Learn to Code movement has picked up momentum worldwide and that is actually a good thing as even basic programming skills can have a major impact. If you can teach yourself how to write code, you gain a competitive edge over your peers, you can think more algorithmically and thus can tackle problems more efficiently.
Learn Programming
Don’t just download the latest app, help redesign it. Don’t just play on your phone, program it. — Obama.
There’s no reason why shouldn’t know the basics of coding. You can automate tasks, you can program your Excel sheets, improve workflows, you can extract data from websites and accomplish so much more with code. You may not be in the business of writing software programs but knowing the basics of coding will help you communicate more effectively with developers.
Gone are the days when you had to enroll in expensive computer training classes as now exist a plethora of web-based courses that will help you learn programming at your own pace in the comfort of your web browser.

The Best Sites to Learn Programming

If you are ready to take the plunge, here are some of the best websites that offer courses in a variety of programming languages for free. I have also added a list of companion ebooks that will give you a more in-depth understanding of the language and they don’t cost anything either.
Online Courses & ScreencastsProgramming Books (Free)
JavaScriptCode Academy, Learn Street,Code Combat, Code AvengersEloquent JavaScript,JavaScript Guide,Speaking JS, JS The Right Way, Oh My JS,Canvassing
HTML & CSSCode Academy, Don’t Fear The Internet, Tutsplus, Learn Layout, A to Z CSS, Dash, Web Accessibility, The Hello World,Khan Academy, HTML5 from ScratchMozilla, Dive into HTML5, 20 Things I Learned, HTML Dog,HTML & CSS, HTML5 for Designers, DOM Enlightenment, HTML Canvas
jQueryCode Academy, Tutsplus, Code SchooljQuery Fundamentals,Learn jQuery
PythonCode Academy, Google, Learn Street, Python Tutor,IHeartPYPython for You and Me,  Dive into Python, Learn Python the Hard Way,Think Python, Python for Fun, Tango with Django,Django
Ruby & Ruby on RailsCode Academy, TryRubyCode Learn, Railscasts, Rubymonk,Learn StreetWhy’s (Poignant) Guide to Ruby, Learn Ruby the Hard Way, Learn to Program, Learn Rails by Example
PHPCode AcademyPHP Programming,Practical PHP
Also see: How to Learn Regular Expressions (RegEx)
Google Apps ScriptGetting Started, Office Hours, Google Scripts Examples,Learning Apps Script
WordPressTreehouse, WordPress TV
Linux & Shell ScriptingStanford.edu, Explain ShellConquer the Command Line
Node.jsNodetuts, Node SchoolThe Node Beginner Book,Mixu’s Node book, Node Up and Running,Mastering Node.js
Angular JSCode School, Egg Head, Learn AngularAngular JS Tutorial,Thinking Angular,Angular Tutorial, Getting Started (Adobe)
Also see: Learn Touch Typing & Code Faster
Git (version control)Code School, Git Immersion,GitHub Training, UdacityPro Git, Learn Git, Gists in Github
Objective-C (iOS & Mac)Code School, Stanford, iTunesU
Chrome Dev ToolsCode School, Dev Tools Secret, Chrome Dev Tools Tutorial,Udacity, Building Browser Apps
Go LanguageGolang.org, GopherCastsProgramming in Go, Go by Example, Learning Go,Building Web Apps with Go, Learning Go
JavaLearn Java, Coding Bat, Java Udemy, LearnerooProgramming in Java,Thinking in Java, O’Reilly Learning Java, Think Java, Java & CS, Java for Python Devs
Android App DevelopmentUdacity (Google Developers), Coursera, The New Boston,Google University, App Development Essentials, Code Learn,App Inventor (Visual)
D3 (data visualization)Data Visualization for the Web, Dashing D3, D3 Tips & Tricks
Also see: Learn VIM, the text editor for programmers
SQL (Databases)SQL Zoo, SQL @Stanford, Essential SQL, SQL for Nerds,Intro to SQL, SQL Bolt, PHP & MySQL
Everything ElseUdacity, edX.org, Coursera, Udemy$, Lynda$, Pluralsight$,Treehouse$, Open Consortium, One Month Rails$

Teaching Kids to Code

If there are kids in the family, you should download either Tynker (Android/iOS) or the Hopscotch app for iPad and they can learn the basics of programming through games and puzzles.
There’s also Scratch, an MIT project that allows kids to program their own stories and games visually. Scratch is available as a web app or you can download it on your Mac/Windows/Linux computer for offline use. Microsoft TouchDevelop, Blockly and Alice are some other web apps that will introduce the concepts of computer progamming to your children.
On a related note, the following chart from Google Trends shows the relative search popularity of various programming languages over the last 5 years. The interest in PHP has dipped over the years, JavaScript has more or less maintained its position while the popularity of Python & Node.js is on the rise.
Popularity of Programming Languages
Newsgator vs Bloglines vs Google Reader

Newsgator vs Bloglines vs Google Reader

Here, we are comparing the three most popular web-based RSS readers - Newsgator Online Web Edition, Bloglines and Google Reader. All of them are server-based aggregation systems. 

For our comparison, we created a new account in each of the services and imported the CNet's Blog 100 OPML Source File [#] The scores for comparison categories are mentioned in brackets.

Setting up a New Account:
Bloglines and Google Reader require an email address to create an account that also becomes your login. Your email is verified before you can start using these services. In Newgator Online, the username and email address are different. The e-mail address is also not verified. (NG: 5, GR: 4, BL: 4)

Adding New Feeds:
All these services allow importing of OPML file or directly adding new feeds by specifying the URL. Google Reader was faster than Newgator and Bloglines when importing new content from the OMPL file. During the Import process, only Newsgator lets you further select or deselect feeds mentioned in the OPML file. Bloglines and Newsgator imported all the feeds without giving any such option. (NG: 4.5, GR: 4, BL: 4)

Navigating the Feeds:
Unlike Newsgator Online, Bloglines and Google reader support shortcut keys. With a single key, you can mark the entire session as read. Or open the original post in a new window. (NG: 2, GR: 4, BL: 4.5)

User Interface:
Bloglines displays information in two HTML frames - the left pane has all the feeds listed while the right pane shows corresponding posts, search results and other tips. Newsgator sports a similar interface to Bloglines but it scrolls both the panes together. This gets annoying particularly when a feed has long posts or lot of posts. Google Reader has a very different interface based on Ajax technology . It shows individual posts title on the left pane and the actual post on the right pane. To read a post, you will need to click it. I like Bloglines simple yet uncluttered interface. (NG: 3, GR: 4, BL: 5)

Finding New Source:
All these three services provide a search feature. In my comparison, I searched for feeds related to "Google" - Most of the search results in Newsgator were irrelevant. Even the Official Google blogs were missing in the search results. Google, as expected, wins by a huge margin, both in terms of relevance and freshness of content. Though Bloglines results were disappointing, Bloglines is the only service that lets you limit your search to your subscriptions only. (NG: 1, GR: 5, BL: 2)

Customization Features:
In Bloglines, you can choose either to view complete entries or Summaries or Titles only. You can also attach notes to individual feeds. Google Reader uses labels. Bloglines provides multiple options for sorting feeds. You can filter items in Bloglines based on the time the item was published. In Google Reader, feeds can be filterned based on labels or Title of the feed. (NG: 2, GR: 3, BL: 4)

Other Good Features:
Newsgator Smart Feeds let you track reference to any URL. This is a feature similar to the Google link: syntax. 

Both Newsgator and Bloglines display the number of subscribers associated with each feed but Bloglines even goes a step further, it displays the list of public subscribers. Google has no such option till now. 

Bloglines let you create a custom blog (hosted on Bloglines) to store and share your clippings and favorites. Clipping facility is available in Newsgator also but Bloglines provides a nice WYSIWYG editor for further rich-editing of clips. (NG: 2, GR: 2, BL: 4)

Conclusion:
Here are the final scores:

Google Reader: 26
Bloglines: 27.5
Newsgator Online Web Edition Free: 19.5

Bloglines wins but Google Reader, still in beta, is close. Google Reader outperformed everyone when searching for new content but Bloglines interface and usability make it a big winner.
Which Adsense Format and Color Scheme Performs Best

Which Adsense Format and Color Scheme Performs Best

Should I use the 300x250 Adsense Rectangle or the much wider 336x280 for maximizing clicks? What do I select - 4 or 5 ads per adlink unit ? Will text only ads perform better than text+image ads ? Should I hide the colored border ?

These are some very common questions among web publishers especially those who have just gained admission to the University of Adsense. While the answer is to keep on experimenting, most Adsense experts employ a simple technique called "AB Split Testing" to optimize their Adsense ads.

The basic idea is to display different Adsense formats at the same location simultaneously but randomly. [This is done using the random() function in Javascript that generates a number between 0 and 1 with equal probability]

Here's a sample scenario to help you determine what format works best for your site - 300x250 or 338x280 ?

Step 1: Create two custom Adsense channels - name them as 300x250 and 336x280.

Step 2: Generate the Adsense Javascript code for each of these Adsense formats. Everything will be common in two code snippets except the value of following variables: google_ad_channel, google_ad_width, google_ad_height and google_ad_format.

Step 3: This is an important step, you will merge the two Adsense snippets in such a fashion that each makes an appearance on your web pages nearly 50% of the time. Here's a sample code:


<script type="text/javascript">
var google_ads = Math.random();
if (google_ads < .5){
google_ad_channel = "300x250Channel";google_ad_width = 300;
google_ad_height = 250;google_ad_format = "300x250_as";
} else {
google_ad_channel = "336x280Channel";google_ad_width = 336;
google_ad_height = 280;google_ad_format = "336x280_as";
}
google_ad_client = "pub-xxx";google_ad_type = "text_image";
google_color_border = "FFFFFF";google_color_bg = "FFFFFF";
google_color_link = "0000FF";google_color_text = "000000";
google_color_url = "0000FF";
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

Monitor the performance (CTR, eCPM) of the two Adsense channels for a week or two to know which of the two Ad formats are converting better. [Switch to Advanced reports, select the two Adsense for Content channels and group by both date and channel]

In the next iteration, you may try the same trick with two different color schemes but keeping the Ad format same - just create separate Adsense channels for each color scheme.

If you are displaying Adsense ads on the homepage of blogs or other places where content changes very frequently, it's a good idea to test between Text and Text+Image ads. 

The contextual ads may not be very relevant on blog homepage or archives because of the dynamic content and therefore CPM based Image ads may bring in more revenue.


Google Domains

Google Domains

Gary Price of Resourceshelf published the complete list of 400 recently registered Google domains (none owned by Google). Most of the domains are up for-sale or for some sales trick. 

One of these viz. www.Googleiche.com, routes to http://www.nichebot.com/g/ - a keyword suggestion tool?. 
How to Enable Google Plus Commenting on BlogSpot Blogs

How to Enable Google Plus Commenting on BlogSpot Blogs

Long time back, Google announced about Google plus commenting system, and now it’s finally available for BlogSpot blogs. Compare to default blogger commenting system, Google plus commenting system gives you more power to go social, and will help you to build a better community around your BlogSpot blog. If you have a blogger enabled blog, you should consider enabling Google plus comment system on your blog.  This guide will help you to get started.
There are two steps which you need to do:
  • If you have not integrated your blog with Google plus before, you need to integrate it.
  • Enable Google plus comments
I highly recommend you to migrate your existing commenting system on BlogSpot to Google plus. Before you do so, do read following points:
  • If you change your blog URL, your existing Google + comments will disappear. So, if you are planning to get a custom domain name for your BlogSpot blog, you should get it, before migrating to Google plus commenting system.
  • If you are using 3rd party commenting system like DISQUS, you will lose all the comments.  If you are using Blogger default commenting system, you will be able to retain all your comments.
  • If your readers don’t have a Google plus profile, he will not be able to comment. Though, he will be prompted to create one. One big cons of Google+ commenting system.
  • If your blog have adult nature content (mature content), you will not be able to use Google+ commenting system. (grayed comment box)
  • If you are using custom BlogSpot template, you can get code from this page to add Google plus comment box.
I will explain the complete procedure, and features of Google+ comments for BlogSpot blogs below.

How to connect BlogSpot blog to Google plus:

Login to your BlogSpot dashboard, and click on blog for which you want to connect to Google plus account. This will also help you to get Google authorship for your BlogSpot blog, or you could directly publish about new posts to your Google plus profile, or to your Google plus page. You can find more information on official help page here.
Once you are inside your BlogSpot dashboard, click on Google plus on left sidebar. On the page, click on get started:
Integrate Google plus BlogSpot Blog
Before you make the switch, do remember your profile information from Blogger will not be migrated to your Google plus profile. So, before making the switch, copy the profile information from your Blogger profile to Google plus.
migrate Google plus blogger
Now, click on Switch now, and your blogSpot blog is linked to your Google plus profile. On the next page, you can select the box to add the blog in your profile, which you should do, if you wish to take advantage of Google authorship (Profile picture in Google search).

Enabling Google plus Comment system on BlogSpot blog + Features:

First lets look at features & benefits of enabling Google+ comments on your Blog:
  • More Social media interaction:  One direct benefit is, more social media interaction and social media signals. Since, social media signals is one of the major ranking (SEO) factor, it will help you to improve your overall blog traffic.
  • No login: Usually most of the users are using Google services, and if your readers are already logged into their Google account, they don’t need to add any details like Website address, Name-email to comment on. This will also help BlogSpot bloggers to get more comments on their blog post.
  • More comments: When people will comment on linked post on Google plus, those comments will automatically be displayed on original blog post, and vice-versa. This will also encourage blogspot bloggers to be extra active on Google+. Smart move Google!.
Now, if you have associated your BlogSpot blogs with your Google plus profile, you can quicklyenable Google plus comment system on your blog. Go back to Google plus link under your blog dashboard, and select the option which says “Use Google+ comments on this blog”.
Google plus commenting system
Here is your updated comment box will look like:
Google+ comment
Over all, Google plus commenting system has more pros than the cons. The tough decision is for old bloggers who are blogging on BlogSpot platform for long, and using 3rd party commenting system. From future perspective, Google plus commenting system is good and have many advantages for your blog, but if you are considering to switch to WordPress in near future, you might not want to use Google plus commenting system.
Installing a Blogger theme

Installing a Blogger theme


This tutorial will get your newly acquired Blogger theme up and running on your blog in just a few minutes. This tutorial is for Blogger themes only. If you want to know how to add a theme to Wordpress, check our guide on installing Wordpress themes.
  1. Open a new tab or window and go to Blogger.com.
  2. Log in to the website. If you are already logged in, look for this window:

3.Click the Manage layout link at the bottom.
4.Now you should see your blog's template. Here you can move sidebar items (called widgets) and add new ones. However, your first task is changing your theme.
5.In the menu, choose edit HTML.
6.When you arrive at the Edit HTML page, it's a good idea to back up your existing template. Click the download full template link to do so.
7.When you made sure you've got a backup of the old template on your hard drive, it's time to change your old template to a new one.
8.Find the ZIP archive you downloaded from this website and unzip/unrar it.
9.In the folder contained in the archive, there are three files: license.txt, readme.txt and themename.xml . For instance, if you downloaded the Grandaddy deluxe theme, the .xml file will be named grandaddydeluxe.xml or something similar.
Now you have 2 options.

Either open the .xml file in a plain text editor (like Notepad on Windows) and copy paste the contents to the edit template field.
Or, use the restore template function to upload your new template. This seems illogical, but it's the easiest way to add a new theme.
Click the browse button and find the .xml file on your hard drive. Hit the upload button.
Don't forget to save your template.
Presto! Your blog has officially been pimped.
Installing a Wordpress theme

Installing a Wordpress theme

Installing a Wordpress theme


Installing a Wordpress theme is fast and easy. However, it should be noted that if your blog is hosted by Wordpress, you cannot use custom downloaded themes. How can you tell? If your blog URL looks like http://www.blogname.wordpress.com/, it's hosted by Wordpress, meaning you can't install custom themes.

However, if you have your own domain and self-hosted blog running Wordpress, here's how to change your theme:
  1. Connect to your server with an FTP client and navigate to your wordpress folder. You should see a bunch of files and folders, including wp-content and wp-admin.
  2. Now navigate to wp-content/themes/ . If you don't have any custom themes, you will see two folders there: default and classic. These are the two themes that ship with a default Wordpress installation.
  3. Unzip the ZIP archive you downloaded from this website. It will contain a folder with the theme name, a readme txt file, and a license txt file
  4. Upload the theme folder to the wp-content/themes/ folder on your web server. Make sure the upload finishes before you close your FTP client.
  5. Log in to the admin area of your website (by appending /wp-admin/ to the URL)
  6. Now navigate to Navigation > Themes.
    7. The newly uploaded theme should be available under available themes. For example, if you downloaded Apple trees for Wordpress:
    8. Click the theme link to use the theme.
    9. Presto! Your Wordpress blog or website has officialy been pimped.

Kategori

Kategori