Report Recent Google Mediabot Visits

In this example, we report recent Google Adsense mediabot (ad server crawler) visits.  (The ad server agent identifies itself as "Mediapartners-Google".)  Why would you want to know this?  Maybe you have introduced a new page.  Or maybe you are employing section targeting or using other on-page tweaks to attract more relevant advertisements.  Any additions or changes you make won't take effect unless and until the ad server spider comes crawling.  If the spider doesn't come crawling, maybe you have a problem that needs fixing.

The GoogleMediabotVisit script might send an alert message like the following:

                                PIKT ALERT
                         Fri Sep  9 05:40:06 2005
                                 calgary

INFO:
    GoogleMediabotVisit
        Report recent Google mediabot visits

        devnotes/devnotes_1.7.x_developing_alarm_scripts.html: 09/Sep/2005:02:26:37
        devnotes/devnotes_1.9.x_system_files_backup.html: 09/Sep/2005:04:44:39
        samples/files_system_root_core_file_alarms.cfg.html: 09/Sep/2005:04:12:31
        samples/main_cf_files.cfg.html: 09/Sep/2005:03:51:55

In the GoogleMediabotVisit script following, note how it uses a Perl script, googlebot.pl, for its input.

GoogleMediabotVisit

        init
                status =piktstatus
                level =piktlevel
                task "Report recent Google mediabot visits"
                input proc "=httpd_cgibin_root/googlebot.pl pikt"
                seps "|"
                dat $page [1]
                dat $date [3]
                keys $page

        rule
                if $date ne %date
                        output mail "$page: $date"
                fi

A companion script, GooglebotVisit, reports recent visits by the Google googlebot (search engine spider).  (Note the similarity between the two scripts, the only significant difference being the change in the date field position.)

For more examples, see Samples.

 
Home | FAQ | News | Intro | Samples | Tutorial | Reference | Software
Developer's Notes | Licensing | Authors | Pikt-Users | Pikt-Workers | Related Projects | Site Index | Privacy Policy | Contact Us
Page best viewed at 1024x768 or greater.   Page last updated 2018-01-02.   This site is PIKT® powered.
Copyright © 1998-2018 Robert Osterlund. All rights reserved.
Home FAQ News Intro Samples Tutorial Reference Software
PIKT Logo
PIKT Page Title
View sample
non-search links
Pikt script