• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • ⚠️ Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • ✅ Confirm that the server meets the System Requirements
    • 🔥 Check for any available Hotfix - your issue could be already reported/fixed
    • 📚 Read documentation - It will be required to Debug and understand Errors for a faster support response

Want to block adsense ads for specific country using IP filtering

ss132203

Chevereto Member
For my last month earnings 6% of my total was invalid traffic. Earlier it was couple of bucks but now its too much. I googled how to track invalid traffic and checked my adsense stats. What I noticed was that few countries were bombing clicks and lowering my RPM, been happening for weeks. What I want is a way out so that I can stop serving ads for specific country. There is a method with Google DFP but its outta my head reach.

I think chev does have built it Geo IP tracking or something by which it changes site language. Can that be used to stop ads for a country ?

Second thing, I was looking into style.css to see the width of ad spaces inside image viewer. I want to set a custom width for responsive adsense ads. Currently it goes max 1200 px I want to limit it to 1000px.
 
hat I noticed was that few countries were bombing clicks and lowering my RPM
I honestly think you're over estimating how much Google gives to bad clicks. Google will not credit bad clicks but will still show them. They have various detection methods to show what is a bad click and not. And while it may change your ratio, it should hurt your cash flow.

Geoblocking is a very difficult thing overall... Sitepoint has a decent article on various methods. https://www.sitepoint.com/how-to-block-entire-countries-from-accessing-website/

One option that I use is to .htaccess to geoblock large blocks of IPs are that from specific countries, or owned by specific telcoms/companies. Some of the Chinese search engines and Russian ones like Yandex can be a bit more over zealous with their indexing.

You should go through your logs and figure out what are the ips that are most harmful to you. If you notice a bunch in the same family 1.1.1.1 and then 1.1.1.5 you may wish to block all in the 1.1.1.x family with a blanket ban. Using https://iplookup.flagfox.net/?ip= helps to know and cross check ips to country/telcom.

If you need an IP database you can try Maxmind's Free version. http://dev.maxmind.com/geoip/legacy/geolite/
 
Regardless why you want to do this, the best way to do it is by downloading a database of the network blocks by each country then on every load perform a lookup to see if the client address is in the negated range.

By the way, this question is totally out of the scope of Chevereto's Tech support. Moving to Server & Configuration.
 
I use Plesk and host my few sites in my own server. Thing is if i block traffic from server they won't be able to see the content. But also these countries are responsible for ssh brute force attacks on my server. I think something's really going wrong.

I've mailed Google about dfp method. Just read site point article seems do able and I might get cloudfare free plan with built in Plesk plugin for a testimonial.

The only reason is my RPM, too many clicks always lower my rpm from 2-2.5 to 0.7-1.3. So if I block countries and get avg views with stable RPM my earnings won't get affected so much.

What about the ad spaces? Using two up and bottom responsive codes and want to limit their width to 1000px for desktop. I just want the code to read the max width as 1000px because using two 160x600 banners left and right the image.
 
What about the ad spaces? Using two up and bottom responsive codes and want to limit their width to 1000px for desktop. I just want the code to read the max width as 1000px because using two 160x600 banners left and right the image.

CSS max-width: 1000px;
 
What about the ad spaces? Using two up and bottom responsive codes and want to limit their width to 1000px for desktop. I just want the code to read the max width as 1000px because using two 160x600 banners left and right the image.
Have you tried tossing it in a div/span with the measurements you want and see what it does?
 
You do it like this...
Code:
<div style="max-width:100px;margin-left:auto;margin-right:auto;">
ad code here
</div>

And if you want to show ad based on width of image use...
Code:
get_image()["width"]
 
CSS max-width: 1000px;
Not working

Have you tried tossing it in a div/span with the measurements you want and see what it does?
I did but my code was incorrect

You do it like this...
Code:
<div style="max-width:100px;margin-left:auto;margin-right:auto;">
ad code here
</div>

And if you want to show ad based on width of image use...
Code:
get_image()["width"]
This worked

Thank you
 
Back
Top