In India the E Commerce market is getting bigger day by day and it has been estimated that it will be doubled in few years. The biggest E Commerce company in India is flipkart which gives affiliate for its products. Many of the bloggers in India are using this to earn money. But some blog may come at a problem that they have to show this flipkart Ads on for countries visitor’s also which is WASTE!
So this post will help them to show flipkart affiliate in India only and some other Ads in other countries. For this I will be using a wordpress plugin called Custom Content by Country (by iControlWP) to know how to use it see this link.
Flipkart Affiliate in India
1) Install Custom Content by Country (by iControlWP) in your wordpress site. http://wordpress.org/plugins/custom-content-by-country
2) Get a flipkart affiliate link
e.g. <iframe src='http://www.flipkart.com/affiliate/displayWidget?affrid=WRID-140221180151276165' frameborder=0 height=160 width=780></iframe>
1) Go to your wordpress dashboard and install this country filtering plugin mentioned above, it will then ask you to install ip2nation (it maps your country based on your IP address) information’s into your database (don’t worry they will be installed remotely by the plugin if you select OK).
2) Activate the plugin from its dashboard. If you are using any caching plugin (like W3 Total Cache, WP Super cache) then enable W3TC Compatibility Mode option from the dashboard.
3) This W3TC Compatibility Mode when enable will turn off page caching for pages that use these shortcodes.
4) Now enclose the flipkart affiliate code with this tag
“[CBC show=”Y” country=”in”]….put your code here…[CBC]”
It will look like this
[CBC show="y" country="in"]<iframe src='http://www.flipkart.com/affiliate/displayWidget?affrid=WRID-140221180151276165' frameborder=0 height=160 width=780></iframe>[/CBC][CBC_COUNTRY]
5) For clear understanding I have used [CBC_COUNTRY] shortcode to show the country.
6) The screenshot below shows the webpage(were the Ad is placed) in India, see that in India the flipkart Ad is shown.
7) The screenshot below shows the webpage(were the Ad is placed) in United States, see that in United States the flipkart Ad is not shown.