Today I noticed that a few Google advertisements in an adsence block on one of my pages were trying to display a file called "/pagead/badge/checkout_999999.gif" from my server. I did a bit of investigating and found out that the companies behind these adverts use Google Checkout and "checkout_999999.gif" is supposed to be a tiny shopping kart icon with a tooltip which reads "This site accepts Google Checkout".
My problem is that "/pagead/badge/checkout_999999.gif" doesn't exist on my server. What do you do to handle this on your website? e.g:
Save the logo () on your server in the place it is expected by Google?
Use a mod_rewrite rule to redirect the request? To where though?
Find a adsense option to turn off Google checkout enabled adverts? (I looked but couldn't see one?)
Ignore the issue and get on with something important
Back-story - please ignore unless very bored: Page 2 of the search page on our site suddenly stopped working and I didn't know why. It turned out to be related to Google adsense. We use PHP session variables to save search criteria over different pages which worked fine for a while but then randomly stopped working. Random bugs are the worst! I was trying to work out what else is random on the page and decided that the Google ads were the only other random thing. Sure enough, sometimes a particular advert seemed to clear the session variables and break the search. What was actually happening was that the advert was requesting a image from our server ("checkout_999999.gif") which didn't exist and Apache was behind-the-scenes redirecting to the site homepage which unfortunately clears the session variables needed for the search - hence the non-obvious breakage. I'm a bit worried that Google ads can request random files from my sever? I'd prefer if they could only use absolute URL's if they want to include logo's or other media.
Sounds like a bug with google adsense delivery. File a bug with them is your best bet for a long-term fix.
After playing around with Apache mod_rewrite for a while I have found a rule that seems to fix my Google Adsense issue:
RewriteRule ^\/pagead\/badge\/checkout\_999999\.gif$ http://pagead2.googlesyndication.com/pagead/badge/checkout_999999.gif [R=301,L]
The problem is I'm not sure how to stop a similar thing happening in the future if Google decides to hotlink to a different file?
As Google doesn't care about the problem (previous posts were sent in June and we are now in October... and the bug was reported directely to Google), I decided to put an image on my server that would suggest the user to click on the ad!
Clicks then increased!!
As this is my server, I can do what I want and that's not my problem if Google asks for files on my server. They cost me money by using my bandwidth and connecting to my server, I am now paid for that!!
You should do the same...
Related
working with a custom built click tracking solution within Laravel.
I have a PHP file that is included on each page that sends off an API call to another site that tracks each visit.
I've done plenty of work to make sure it ignores scrapers and crawlers etc but it's still firing everytime the website is shown within Google search results.
Is there something I can do that will be prevent this file being included unless its an actual visit?
Currently getting a lot of 'organic' visits tracking when its not a visit but instead just someone seeing the website listed on Google.
Thanks.
I’m reading out through a lot of tutorials and different websites, although I’m not a programmer, I tried my best, as I’m sure it can be done, but I’m on a dead end.
I’m trying to use the HTTP header that Cloudflare sends ["HTTP_CF_IPCOUNTRY"]); to redirect the user to its country. I need to be able to send multiple locations to same country (Mexico, Spain, Colombia.... to mysite.com/es/) and i need to be able to create multiple rules (so send Spanish speakers to mysite.com/es and German speakers to mysite.com/de/ and if not set, then redirect to main site mysite.com). It should be just necessary to create a redirection from the home page (mysite.com).
Would anyone help me doing so on the functions.php file or any other method? I tried looking for a plugin as well… I’m really surprised no one, not even Cloudflare put this on a plugin.
Thanks a lot.
It is not default functionality within your Cloudflare account, but it can be accomplished with some tinkering on your server. This discussion has details that might be helpful to review.
Also, this is something that should be pretty easy to accomplish with a Cloudflare Worker, but you would need some programming chops to try that.
Google analytics is installed on my website. My website is built using Wordpress and using the plugin "Insert Headers and Footers" I pasted the code from Google Analytics. I can confirm that it works on some pages, but not all.
The website is an e-commerce store so not having the tracking on every page is making it hard to establish funnels.
I realized my e-commerce data was not being tracked so I researched the issue and learned about Google Tag Assistant. I installed this add-on and sure enough, no tags are reporting back for some of my store pages.
The below screenshot is from the Google Analytics report from the Tag Assistant. It shows that no tags are set on my page https://www.californiabeardco.com/store/ or https://www.californiabeardco.com/product/beard-oil/
The main site is https://www.californiabeardco.com
Interestingly, the analytics seem to work on the homepage and the cart/checkout pages, but not the store/product pages.
I'm really not sure what to do, I thought that the insert headers and footers plugin would insert the analytics code onto every page on my site.
I appreciate any insight you may have to offer, thanks!
Is there a particular event that isn't reporting that you are expecting to see?
Using the 'Google Analytics Debugger' Chrome extension, I can see that Google Analytics is initialized on each page and is reporting page views.
I think you recently added Google Analytical Code.Give it some time and Google will fix this. I added it in one of my site and my problem was same as you. I waited for 1-2 weeks until it resolved automatically.
Why can You just paste Google code to footer.php ? Other problem can be ajax pagination but this also can be fixed by refresh code after every ajax request.
Ps. And yes, sometimes You just must wait and Google will start working. You can check page source - if there is google code then it will start working, if not - You make something wrong.
I have written a PHP based blog for the company i work for. Not using any frameworks. I am having trouble tracking users who come from my facebook page's posts to my blog (not wordpress).
I have created a shortlink url. Let's say it is sample.co and it redirects traffic to sample.com. Everything seems fine until here. The problem starts here.
I am adding all user's ip's, user agents. But if even i get 500 visits, my code adds somethig like 3.000 visits. Facebook stats and Analytics shows similar stats (~500 visits). I see that ip's added to MySQL are all different. It usually happens with Android users. I have read somewhere that Facebook sometimes renders to their users the actual URL when FB shows the post. I mean instead of the widget, Facebook shows the whole page. I am not quite sure about that to be honest.
To solve this problem, I have created and added an jquery script to my page and listened users' scroll event. It worked great. Not seeing too much traffic. But this time the problem is i am counting less users. Even I get 500 users from facebook and Analytics shows similar results, my script adds only 200-300 to MySQL.
Does anyone know a better way to track real traffic? Or do you aware of such problem?
Thanks
It should be filtered on the basis of user agent.
https://developers.facebook.com/docs/sharing/webmasters/crawler
how to detect search engine bots with php?
Identifying users through IP is a good idea, but if your IP keeps changing, it's a good idea to use cookies.
http://php.net/manual/en/function.uniqid.php
If the cookie does not exist, you should see it as a new user.
I have found the answer. The problem is called preview (prefetch). Here is the link:
https://www.facebook.com/business/help/1514372351922333
Simply, facebook preloads everything when FB shows the thumbnail to the visitor to speed up your page's load speed. They send X-Purpose: preview header. So you can simply check if HTTP_X_PURPOSE header's value is preview or not. If so, do not count it as a visitor.!
Here are more detailed descriptions:
http://inchoo.net/dev-talk/mitigating-facebook-x-fb-http-engine-liger/
http://inchoo.net/dev-talk/magento-website-hammering-facebook-liger/
I am a beginner in web development. I am developing a website. From few days my site is not gonna run in good way. When i write down the URL of site and hit enter key. Than a window is displayed.
I searched it on google. But i'm failed to sort out this.
I don't understand how to remove it. Please any one can help me how i can sort out this.
Thanks
Add your site to google webmasters and check which urls / pages are creating errors under security issues. Simply delete / fix that files and submit review request to google.
More info, http://www.wpbeginner.com/wp-tutorials/how-to-fix-this-site-ahead-contains-harmful-programs-error-in-wordpress/