3

I found the documentation for filtering IPs from Google Analytics, but the address of the several locations of our company all have dynamic IP addresses that change every 30 days from what I'm told.

I know from working with Dynamic DNS that the provider usually gives you a script that you configure your router to run when it's IP address changes or when it is restarted, which passes the new IP address to the DDNS server. I'm wondering if there might be a way to write or use a preexisting script to do the same thing with the Google Analytics API.

5
  • 1
    I think where your real problem is going to be is handling filtering different IP addresses during different time periods. For instance, you want to run a report for the month of May. In the first half of the month, you had address 1.1.1.1 and in the second half you had 2.2.2.2. How do you tell the report to filter 1.1.1.1 from May 1st to 15th, but not from the 16th to 31st, as well as filtering 2.2.2.2 from the 16th to 31st, but not from the 1st to 15th. The only thing that comes to mind is running reports based on when the IP changes, but that's cumbersome at best.
    – Phil Erb
    Commented Jul 2, 2012 at 19:03
  • @PhilErb I think it will work okay, because it's only filtering visits from a particular IP during a time period when the data is being collected. Meaning that IP addresses are filtered out in realtime (at least I think so). And IP addresses aren't part of the querying of the data we are doing.
    – leeand00
    Commented Jul 2, 2012 at 19:15
  • (maybe that's another question...so many questions...)
    – leeand00
    Commented Jul 2, 2012 at 19:19
  • Ah here we go, yup, that's not a problem, it's filtered at the time of data collection: webmasters.stackexchange.com/questions/21947/…
    – leeand00
    Commented Jul 2, 2012 at 19:20
  • This also makes it a best practice to not collect any data until your GA account is completely setup. :(
    – leeand00
    Commented Jul 2, 2012 at 19:25

1 Answer 1

1

Assuming that your offices are well setup and making system changes a breeze then you should update the host files on the machines so that Google ads to not display on this machines in the first place.

You should be able to do an audit on peoples host files and just add this line.

127.0.0.1 pagead2.googlesyndication.com 

There may be other hostnames that Google adsense uses so be sure to check they are blocked, the other down bit about this is your never see adverts on any sites but do you really want these in anycase?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.