in reply to Re: Google AdSense Code cause double entries of search terms in the log table
in thread Google AdSense Code causes double entries of search terms in the log table

Our log table has an id entry to indicate the ip and time that made the entries.

The second entry consistently has an ip (66.249.71.196) like the following:

66.249.71.196-1292911017

1292911017 is the unix time that made the entry.

ISP for 66.249.71.196 is Google.

I've also tested without using Google AdSense Code. It does not have double entries when no Google AdSense Code is used in the Search Result Page.

From the above evidence, the second entry definitely came from the Google AdSense Code.

It is not like you mentioned due to the script accessed twice, maybe due to some wonky URL setup in my web server.
  • Comment on Re^2: Google AdSense Code cause double entries of search terms in the log table

Replies are listed 'Best First'.
Re^3: Google AdSense Code cause double entries of search terms in the log table
by Anonymous Monk on Dec 21, 2010 at 14:07 UTC

    If you want to ignore searches that come from Google, why not simply do so?

      If you want to ignore searches that come from Google, why not simply do so?

      I don't think you understand the issue or problem when you make such a statement.
      I've a feeling you do not know what Google AdSense is.

      Google AdSense is a Google advertising program that enables website publishers of all sizes to display targeted ads alongside their online content and earn money.

      The purpose of me using Google AdSense in my website is to generate revenues from the Google Ads placed on the site.

      My problem:

      When I place Google AdSense code in my website, it will cause my script to make double entries of the search terms entered in the search form.

      Just curious if any of you have experienced this problem. If you have, how do you fix it?

        You did say that the second hit on your site is always from the same IP. So just ignore that IP for your stats.

        As far as I see from your description, you've got two separate hits. One from the customer, and a second hit from Google, perhaps to check that the ad hit was legit.

        Your script is probably making two entries because it is getting called two times.

        This shouldn't be that complicated...