DFP/ Admanager How to

Display two creatives simultaneously on a page DFP Google Admanager

I was caught up with a problem where I had a display two creatives simultaneously on a page where I had two placements. I had 3 sets of two creatives each which were to be shown as a set every time the page loaded. That means no ads of different sets can be shown together.

There is no apparent option in DFP/ Google Ad manager to show two creatives in sync, but I was able to find a workaround, explained below;

  1. Create a new lineitem/slide for every set of creatives and added two creatives each in those slides.
  2. In the Settings panel go to see the Adjust Delivery panel on right, go to Display Creatives option and choose As many as possible from the drop down.

    display creatives option in DFP
  3. Below Display Creatives you will see Rotate Creatives, choose Evenly from the drop down for this column.

    Rotate Creatives option in DFP
  4. Do the same for every lineitem.
  5. Make sure that all the lineitems have similarity in every other criteria, that is no lineitem supersedes any other lineitem in any way, may it be the cost, or priority, or any other metric.

This is it, all your creatives will now be shown as a set of creatives each time.


Make a simpler login URL for your WordPress blog

We usually use the more technical looking to logon to our wordpress blogs. We can make this url simpler and shorter. Such as or or

This will need the hosted version of wordpress plus access on your .htaccess file which will be placed in the root directory of your blog.

open your .htaccess and add the following line at the bottom of the file.

Redirect 301 /login /wp-admin

This line will permanently redirect all requests to the /login of your site to /wp-admin. Which will then show the login form. Hence you can use or to login to your blog

Your can use any other easier alias instead of the word login. Just incorporate that alias in the line of code given above, replace login with that alias

If you have installed the core wordpress in someother directory then give the respective path to wp-admin. For example if your wordpress core is installed in Then the line of code would be

Redirect 301 /login /wordpress/wp-admin

Please note that this code will work on almost all the blogs installations unless your blog is not installed in the root of your domain. You can contact me for such blog installations.

Facebook How to Tips

How to clear Facebook Share’s Cache

Facebook share is good, simple, lets us share almost everything on web in seconds. But Facebook caches already shared urls/pages for better performance. This causes issues at time when we update the title, picture being shared or the description of the page because Facebook still shows the older version of the page.

For modifying which image, title and description FB chooses, read this

I will discuss three simple ways to force facebook to go and fetch the latest stuff from the page being shared.

Method 1 :

Facebook treats each url as unique and caches the page based on that url, so if you want to share the latest url the simplest solution is to add a query string with the url being shared. In simple words just add ?v=1 at the end of the url. Any number can be used in place of 1,

This method is fairly simple but it doesn’t retain the share count for this page, as it treats this page as a different url hence the count for this url will be restarted from 0. Plus if someone else shares the original url without the querystring the information will still be the old one.

Method 2:

Using url shortner services like shorten your url form and then use the new url for Facebook share. This too is a simple and quite popular method but has the same issues as the first one.

Method 3:

Facebook has a tool called Debugger (formerly known as URL Linter). This tool gives us an idea about how a url will be shared on Facebook, what content, which image will be fetched. Further details about this tool can be found here.

We can use this tool for any url and it fetches the latest title, description, excerpt and other stuff that will be shown while sharing the link. If you use an already shared URL with this tool then Facebook fetches the latest content, and also updates it cache with the latest content.

With this methos the url remains the same hence the share count will persist and the content will be updated. Someone else sharing the url will also see the latest content now. So this method is of course the best.

The Debugger tool can be accessed here.

Found this post helpful? Want to return the favor? Use the button below :)

Facebook Tips

How will a page show up on Facebook Share.

Facebook share is widely used these days to share web pages people like, on their profile. The sharing mechanism is quite simple, fetches the related image and excerpt from the url being shared to ensure that the person seeing the post gets an idea of what the shared page is about. A webdesigner has control over how the webpage will look when shared on facebook. How to control what image and text shows up when your page is shared is explained here.

This post is focused on how to test exactly what your page will look like, even the minor details. Facebook has a very simple tool for this called URL Linter.

Just paste the URL of the page to be tested and facebook will fetch the title, description/excerpt, image, the link shown with the post, and any other meta properties on the page. This is extremely helpful for any page which is expected to be shared alot on fb, so that it can be tested before making it public. Another advantage of using this url linter is that once you make changes to your page and try the linter it will go for the latest version and not show the cached copy while normal facebook share will show a cached copy for a url that has been shared previously.

I hope this post gives you an edge while using Facebook share.

Found this post helpful? Want to return the favor? Use the button below :)

Code Javascript

Javascript Objects and Javascript Arrays

I came across some interesting facts regarding Javascript Objects and Javascript Arrays which I will be discussing below.

Most of us are familiar with Javascript objects and arrays. Technically Javascript Arrays are also Javascript objects, even the typeof Javascript Array will also give its type as object and not array

typeof is a simple JS operator which returns typeof the element passed.

But there are some tiny , interesting and somewhat buggy aspects of Javascript arrays.

  • If in a Javascript Array, you set index 100 to have any value then the length of this array will be returned as 101. JS will fill the rest 100 keys (0 – 99) with null values
    Try this :

    var test_array = Array();
    test_array.length;    //returns 0 this time
    test_array[100] = 'I am hundred';
    test_array.length;    //returns 101 now
  • Javascript Arrays cannot ideally be treated as Associative Arrays. You can set and access associative keys but when you do so Javascript arrays work 100% as JS objects and the length of the array wont increase no matter ho many associative keys and respective values you keep on adding.
    var test_array = Array();
    test_array.length;    //returns 0 this time
    test_array['key1'] = 'I am key 1';
    test_array['key2'] = 'I am key 2';
    test_array.length;    //again 0
  • The fact above also concludes that JS objects dont have any length property, so we cannot determine whether an object is empty or not with the length property.

Yet another issue on Facebook

The site with more than 500 Million Users, is tough to get away with bugs. They obviously cannot regenerate each and every flow after integration of their new features.

Anyways this is the one that I just came across while posting a link on a friend’s wall and tagging him in that post too. Seems pretty simple but I bet you wont be able to do this, atleast at the time of writing this post. It gives up a popup error stating Something went wrong. We’re working on getting it fixed as soon as we can.

I tried the same on some other people’s walls too but the result was this same bug,

I hope FB has an auto ticketer to ticket such bugs so that they come to notice, if not than Facebook you might find this post someday :).