I have seen in my forums queries about drop in Google Adsense CTR after using CloudFlare.Many people do not use free content delivery network services of CloudFlare fearing drop in their Google Adsense earnings.
How Google Adsense works?
Google Adsense delivers ads based on
1.Content of your page (contextual)
2.Geographical area of visitor (Geo Targeted)
There are other ways to deliver matching ads on your webpage.But these two are related to this post.
How CloudFlare works?
CloudFlare works as reverse proxy.It stands between your website and the visitor.The static resources of your website (images,videos,css,js) gets loaded by CloudFlare.This is the way it makes your website fast.
How CloudFlare impacts Google Adsense?
As mentioned above CloudFlare stands between your website and visitor.So Google Adsense sees CloudFlare as traffic origin instead of the visitor.The ip address of CloudFlare server is visible instead of the visitor ip address. Due to this Google displays ads relevant to location of CloudFlare server instead of real visitor location.For example if original visitor is from India and CloudFlare server catering the request is in USA then visitor will see ads relevant to visitor of USA.
This wrong geo targeting of ads result in less CTR and hence less earning from Adsense.You can see ads in language other than English (assuming visitor is from English speaking region) CloudFlare server catering the request is in other region.
The solution approach is getting real ip address (that is ip address of visitors) instead of CloudFlare ip address.There are different approaches to do this depending upon web server you are using.Read this post for details of the solution for Apache web server and Nginx web server.
CloudFlare rocketloader issue with Adsense
Below are the solutions in order of performance
Complex customization solution
first line of code before modification
Above line should be changed to
No customization solution
If you are not comfortable with above two methods then you can try this one.This method is the simplest but is worst in terms of performance.In this method you need to disable Rocket Loader by selecting Off.Thus your website will not be able to use benefit of this loader but you can still use free content delivery network facility of CloudFlare.
In case you have used any other method or having issues then please share your thoughts.